; LLVM IR from VastoLorde95/Competitive-Programming :: Codejam/2016/Round 2/Problem A/A.ll (Z5solvev)

; 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"

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@n = external dso_local global i32, align 4
@r = external dso_local global i32, align 4
@p = external dso_local global i32, align 4
@s = external dso_local global i32, align 4
@a = external dso_local global [32768 x i32], align 16
@tot = external dso_local global [4 x i32], align 16
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [12 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3dfsiii(i32 noundef, i32 noundef, i32 noundef) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z5checkv() #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3srtNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef) #0

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.2, ptr noundef @n, ptr noundef @r)
  %11 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.2, ptr noundef @p, ptr noundef @s)
  call void @llvm.memset.p0.i64(ptr align 16 @a, i8 0, i64 131072, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #6
  store i32 1, ptr %1, align 4, !tbaa !5
  br label %12

12:                                               ; preds = %109, %0
  %13 = load i32, ptr %1, align 4, !tbaa !5
  %14 = icmp sle i32 %13, 3
  br i1 %14, label %16, label %15

15:                                               ; preds = %12
  store i32 2, ptr %2, align 4
  br label %112

16:                                               ; preds = %12
  %17 = load i32, ptr %1, align 4, !tbaa !5
  call void @_Z3dfsiii(i32 noundef %17, i32 noundef 1, i32 noundef 1)
  call void @llvm.memset.p0.i64(ptr align 16 @tot, i8 0, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %18

18:                                               ; preds = %33, %16
  %19 = load i32, ptr %3, align 4, !tbaa !5
  %20 = load i32, ptr @n, align 4, !tbaa !5
  %21 = shl i32 1, %20
  %22 = icmp slt i32 %19, %21
  br i1 %22, label %24, label %23

23:                                               ; preds = %18
  store i32 5, ptr %2, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  br label %36

24:                                               ; preds = %18
  %25 = load i32, ptr %3, align 4, !tbaa !5
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds [32768 x i32], ptr @a, i64 0, i64 %26
  %28 = load i32, ptr %27, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [4 x i32], ptr @tot, i64 0, i64 %29
  %31 = load i32, ptr %30, align 4, !tbaa !5
  %32 = add nsw i32 %31, 1
  store i32 %32, ptr %30, align 4, !tbaa !5
  br label %33

33:                                               ; preds = %24
  %34 = load i32, ptr %3, align 4, !tbaa !5
  %35 = add nsw i32 %34, 1
  store i32 %35, ptr %3, align 4, !tbaa !5
  br label %18, !llvm.loop !9

36:                                               ; preds = %23
  %37 = call noundef zeroext i1 @_Z5checkv()
  br i1 %37, label %38, label %108

38:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 32, ptr %4) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %39

39:                                               ; preds = %79, %38
  %40 = load i32, ptr %5, align 4, !tbaa !5
  %41 = load i32, ptr @n, align 4, !tbaa !5
  %42 = shl i32 1, %41
  %43 = icmp slt i32 %40, %42
  br i1 %43, label %45, label %44

44:                                               ; preds = %39
  store i32 8, ptr %2, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %82

45:                                               ; preds = %39
  %46 = load i32, ptr %5, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [32768 x i32], ptr @a, i64 0, i64 %47
  %49 = load i32, ptr %48, align 4, !tbaa !5
  %50 = icmp eq i32 %49, 1
  br i1 %50, label %51, label %58

51:                                               ; preds = %45
  %52 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %4, i8 noundef signext 80)
          to label %53 unwind label %54

53:                                               ; preds = %51
  br label %78

54:                                               ; preds = %73, %64, %51
  %55 = landingpad { ptr, i32 }
          cleanup
  %56 = extractvalue { ptr, i32 } %55, 0
  store ptr %56, ptr %6, align 8
  %57 = extractvalue { ptr, i32 } %55, 1
  store i32 %57, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %107

58:                                               ; preds = %45
  %59 = load i32, ptr %5, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [32768 x i32], ptr @a, i64 0, i64 %60
  %62 = load i32, ptr %61, align 4, !tbaa !5
  %63 = icmp eq i32 %62, 2
  br i1 %63, label %64, label %67

64:                                               ; preds = %58
  %65 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %4, i8 noundef signext 82)
          to label %66 unwind label %54

66:                                               ; preds = %64
  br label %77

67:                                               ; preds = %58
  %68 = load i32, ptr %5, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [32768 x i32], ptr @a, i64 0, i64 %69
  %71 = load i32, ptr %70, align 4, !tbaa !5
  %72 = icmp eq i32 %71, 3
  br i1 %72, label %73, label %76

73:                                               ; preds = %67
  %74 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %4, i8 noundef signext 83)
          to label %75 unwind label %54

75:                                               ; preds = %73
  br label %76

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

77:                                               ; preds = %76, %66
  br label %78

78:                                               ; preds = %77, %53
  br label %79

79:                                               ; preds = %78
  %80 = load i32, ptr %5, align 4, !tbaa !5
  %81 = add nsw i32 %80, 1
  store i32 %81, ptr %5, align 4, !tbaa !5
  br label %39, !llvm.loop !11

82:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 32, ptr %8) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull align 8 dereferenceable(32) %4)
          to label %83 unwind label %89

83:                                               ; preds = %82
  invoke void @_Z3srtNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %8, ptr noundef %9)
          to label %84 unwind label %93

84:                                               ; preds = %83
  %85 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull align 8 dereferenceable(32) %8)
          to label %86 unwind label %97

86:                                               ; preds = %84
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #6
  %87 = invoke i32 @puts(ptr noundef @.str.3)
          to label %88 unwind label %103

88:                                               ; preds = %86
  store i32 1, ptr %2, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %4) #6
  br label %112

89:                                               ; preds = %82
  %90 = landingpad { ptr, i32 }
          cleanup
  %91 = extractvalue { ptr, i32 } %90, 0
  store ptr %91, ptr %6, align 8
  %92 = extractvalue { ptr, i32 } %90, 1
  store i32 %92, ptr %7, align 4
  br label %102

93:                                               ; preds = %83
  %94 = landingpad { ptr, i32 }
          cleanup
  %95 = extractvalue { ptr, i32 } %94, 0
  store ptr %95, ptr %6, align 8
  %96 = extractvalue { ptr, i32 } %94, 1
  store i32 %96, ptr %7, align 4
  br label %101

97:                                               ; preds = %84
  %98 = landingpad { ptr, i32 }
          cleanup
  %99 = extractvalue { ptr, i32 } %98, 0
  store ptr %99, ptr %6, align 8
  %100 = extractvalue { ptr, i32 } %98, 1
  store i32 %100, ptr %7, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  br label %101

101:                                              ; preds = %97, %93
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #6
  br label %102

102:                                              ; preds = %101, %89
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #6
  br label %107

103:                                              ; preds = %86
  %104 = landingpad { ptr, i32 }
          cleanup
  %105 = extractvalue { ptr, i32 } %104, 0
  store ptr %105, ptr %6, align 8
  %106 = extractvalue { ptr, i32 } %104, 1
  store i32 %106, ptr %7, align 4
  br label %107

107:                                              ; preds = %103, %102, %54
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #6
  br label %117

108:                                              ; preds = %36
  br label %109

109:                                              ; preds = %108
  %110 = load i32, ptr %1, align 4, !tbaa !5
  %111 = add nsw i32 %110, 1
  store i32 %111, ptr %1, align 4, !tbaa !5
  br label %12, !llvm.loop !12

112:                                              ; preds = %88, %15
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #6
  %113 = load i32, ptr %2, align 4
  switch i32 %113, label %122 [
    i32 2, label %114
    i32 1, label %116
  ]

114:                                              ; preds = %112
  %115 = call i32 (ptr, ...) @printf(ptr noundef @.str.4)
  br label %116

116:                                              ; preds = %114, %112
  ret void

117:                                              ; preds = %107
  %118 = load ptr, ptr %6, align 8
  %119 = load i32, ptr %7, align 4
  %120 = insertvalue { ptr, i32 } poison, ptr %118, 0
  %121 = insertvalue { ptr, i32 } %120, i32 %119, 1
  resume { ptr, i32 } %121

122:                                              ; preds = %112
  unreachable
}

declare i32 @__isoc99_scanf(ptr noundef, ...) #3

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32), i8 noundef signext) #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32)) #5

; Function Attrs: mustprogress uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #0 align 2

declare i32 @puts(ptr noundef) #3

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

attributes #0 = { mustprogress 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 #1 = { mustprogress 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { "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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { inlinehint mustprogress 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 #6 = { 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++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}


; 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"

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@n = external dso_local global i32, align 4
@r = external dso_local global i32, align 4
@p = external dso_local global i32, align 4
@s = external dso_local global i32, align 4
@a = external dso_local local_unnamed_addr global [32768 x i32], align 16
@tot = external dso_local local_unnamed_addr global [4 x i32], align 16
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [12 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3dfsiii(i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z5checkv() local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3srtNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef) local_unnamed_addr #0

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::__cxx11::basic_string", align 8
  %2 = alloca %"class.std::__cxx11::basic_string", align 8
  %3 = alloca %"class.std::__cxx11::basic_string", align 8
  %4 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull @n, ptr noundef nonnull @r)
  %5 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull @p, ptr noundef nonnull @s)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(131072) @a, i8 0, i64 131072, i1 false)
  tail call void @_Z3dfsiii(i32 noundef 1, i32 noundef 1, i32 noundef 1)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) @tot, i8 0, i64 16, i1 false)
  %6 = load i32, ptr @n, align 4, !tbaa !5
  %.not = icmp eq i32 %6, 31
  br i1 %.not, label %._crit_edge, label %.lr.ph.preheader

7:                                                ; preds = %._crit_edge
  tail call void @_Z3dfsiii(i32 noundef 2, i32 noundef 1, i32 noundef 1)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) @tot, i8 0, i64 16, i1 false)
  %8 = load i32, ptr @n, align 4, !tbaa !5
  %.not.1 = icmp eq i32 %8, 31
  br i1 %.not.1, label %._crit_edge.1, label %.lr.ph.preheader.1

.lr.ph.preheader.1:                               ; preds = %7
  %9 = shl nuw nsw i32 1, %8
  %wide.trip.count.1 = zext nneg i32 %9 to i64
  %xtraiter46 = and i64 %wide.trip.count.1, 3
  %10 = icmp ult i32 %8, 2
  br i1 %10, label %._crit_edge.1.loopexit.unr-lcssa, label %.lr.ph.preheader.1.new

.lr.ph.preheader.1.new:                           ; preds = %.lr.ph.preheader.1
  %unroll_iter49 = and i64 %wide.trip.count.1, 2147483644
  br label %.lr.ph.1

.lr.ph.1:                                         ; preds = %.lr.ph.1, %.lr.ph.preheader.1.new
  %indvars.iv.1 = phi i64 [ 0, %.lr.ph.preheader.1.new ], [ %indvars.iv.next.1.3, %.lr.ph.1 ]
  %niter50 = phi i64 [ 0, %.lr.ph.preheader.1.new ], [ %niter50.next.3, %.lr.ph.1 ]
  %11 = getelementptr inbounds [32768 x i32], ptr @a, i64 0, i64 %indvars.iv.1
  %12 = load i32, ptr %11, align 16, !tbaa !5
  %13 = sext i32 %12 to i64
  %14 = getelementptr inbounds [4 x i32], ptr @tot, i64 0, i64 %13
  %15 = load i32, ptr %14, align 4, !tbaa !5
  %16 = add nsw i32 %15, 1
  store i32 %16, ptr %14, align 4, !tbaa !5
  %indvars.iv.next.1 = or disjoint i64 %indvars.iv.1, 1
  %17 = getelementptr inbounds [32768 x i32], ptr @a, i64 0, i64 %indvars.iv.next.1
  %18 = load i32, ptr %17, align 4, !tbaa !5
  %19 = sext i32 %18 to i64
  %20 = getelementptr inbounds [4 x i32], ptr @tot, i64 0, i64 %19
  %21 = load i32, ptr %20, align 4, !tbaa !5
  %22 = add nsw i32 %21, 1
  store i32 %22, ptr %20, align 4, !tbaa !5
  %indvars.iv.next.1.1 = or disjoint i64 %indvars.iv.1, 2
  %23 = getelementptr inbounds [32768 x i32], ptr @a, i64 0, i64 %indvars.iv.next.1.1
  %24 = load i32, ptr %23, align 8, !tbaa !5
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds [4 x i32], ptr @tot, i64 0, i64 %25
  %27 = load i32, ptr %26, align 4, !tbaa !5
  %28 = add nsw i32 %27, 1
  store i32 %28, ptr %26, align 4, !tbaa !5
  %indvars.iv.next.1.2 = or disjoint i64 %indvars.iv.1, 3
  %29 = getelementptr inbounds [32768 x i32], ptr @a, i64 0, i64 %indvars.iv.next.1.2
  %30 = load i32, ptr %29, align 4, !tbaa !5
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds [4 x i32], ptr @tot, i64 0, i64 %31
  %33 = load i32, ptr %32, align 4, !tbaa !5
  %34 = add nsw i32 %33, 1
  store i32 %34, ptr %32, align 4, !tbaa !5
  %indvars.iv.next.1.3 = add nuw nsw i64 %indvars.iv.1, 4
  %niter50.next.3 = add i64 %niter50, 4
  %niter50.ncmp.3 = icmp eq i64 %niter50.next.3, %unroll_iter49
  br i1 %niter50.ncmp.3, label %._crit_edge.1.loopexit.unr-lcssa, label %.lr.ph.1, !llvm.loop !9

._crit_edge.1.loopexit.unr-lcssa:                 ; preds = %.lr.ph.1, %.lr.ph.preheader.1
  %indvars.iv.1.unr = phi i64 [ 0, %.lr.ph.preheader.1 ], [ %indvars.iv.next.1.3, %.lr.ph.1 ]
  %lcmp.mod48.not = icmp eq i64 %xtraiter46, 0
  br i1 %lcmp.mod48.not, label %._crit_edge.1, label %.lr.ph.1.epil

.lr.ph.1.epil:                                    ; preds = %._crit_edge.1.loopexit.unr-lcssa, %.lr.ph.1.epil
  %indvars.iv.1.epil = phi i64 [ %indvars.iv.next.1.epil, %.lr.ph.1.epil ], [ %indvars.iv.1.unr, %._crit_edge.1.loopexit.unr-lcssa ]
  %epil.iter47 = phi i64 [ %epil.iter47.next, %.lr.ph.1.epil ], [ 0, %._crit_edge.1.loopexit.unr-lcssa ]
  %35 = getelementptr inbounds [32768 x i32], ptr @a, i64 0, i64 %indvars.iv.1.epil
  %36 = load i32, ptr %35, align 4, !tbaa !5
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds [4 x i32], ptr @tot, i64 0, i64 %37
  %39 = load i32, ptr %38, align 4, !tbaa !5
  %40 = add nsw i32 %39, 1
  store i32 %40, ptr %38, align 4, !tbaa !5
  %indvars.iv.next.1.epil = add nuw nsw i64 %indvars.iv.1.epil, 1
  %epil.iter47.next = add i64 %epil.iter47, 1
  %epil.iter47.cmp.not = icmp eq i64 %epil.iter47.next, %xtraiter46
  br i1 %epil.iter47.cmp.not, label %._crit_edge.1, label %.lr.ph.1.epil, !llvm.loop !11

._crit_edge.1:                                    ; preds = %._crit_edge.1.loopexit.unr-lcssa, %.lr.ph.1.epil, %7
  %41 = tail call noundef zeroext i1 @_Z5checkv()
  br i1 %41, label %112, label %42

42:                                               ; preds = %._crit_edge.1
  tail call void @_Z3dfsiii(i32 noundef 3, i32 noundef 1, i32 noundef 1)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) @tot, i8 0, i64 16, i1 false)
  %43 = load i32, ptr @n, align 4, !tbaa !5
  %.not.2 = icmp eq i32 %43, 31
  br i1 %.not.2, label %._crit_edge.2, label %.lr.ph.preheader.2

.lr.ph.preheader.2:                               ; preds = %42
  %44 = shl nuw nsw i32 1, %43
  %wide.trip.count.2 = zext nneg i32 %44 to i64
  %xtraiter51 = and i64 %wide.trip.count.2, 3
  %45 = icmp ult i32 %43, 2
  br i1 %45, label %._crit_edge.2.loopexit.unr-lcssa, label %.lr.ph.preheader.2.new

.lr.ph.preheader.2.new:                           ; preds = %.lr.ph.preheader.2
  %unroll_iter54 = and i64 %wide.trip.count.2, 2147483644
  br label %.lr.ph.2

.lr.ph.2:                                         ; preds = %.lr.ph.2, %.lr.ph.preheader.2.new
  %indvars.iv.2 = phi i64 [ 0, %.lr.ph.preheader.2.new ], [ %indvars.iv.next.2.3, %.lr.ph.2 ]
  %niter55 = phi i64 [ 0, %.lr.ph.preheader.2.new ], [ %niter55.next.3, %.lr.ph.2 ]
  %46 = getelementptr inbounds [32768 x i32], ptr @a, i64 0, i64 %indvars.iv.2
  %47 = load i32, ptr %46, align 16, !tbaa !5
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [4 x i32], ptr @tot, i64 0, i64 %48
  %50 = load i32, ptr %49, align 4, !tbaa !5
  %51 = add nsw i32 %50, 1
  store i32 %51, ptr %49, align 4, !tbaa !5
  %indvars.iv.next.2 = or disjoint i64 %indvars.iv.2, 1
  %52 = getelementptr inbounds [32768 x i32], ptr @a, i64 0, i64 %indvars.iv.next.2
  %53 = load i32, ptr %52, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [4 x i32], ptr @tot, i64 0, i64 %54
  %56 = load i32, ptr %55, align 4, !tbaa !5
  %57 = add nsw i32 %56, 1
  store i32 %57, ptr %55, align 4, !tbaa !5
  %indvars.iv.next.2.1 = or disjoint i64 %indvars.iv.2, 2
  %58 = getelementptr inbounds [32768 x i32], ptr @a, i64 0, i64 %indvars.iv.next.2.1
  %59 = load i32, ptr %58, align 8, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [4 x i32], ptr @tot, i64 0, i64 %60
  %62 = load i32, ptr %61, align 4, !tbaa !5
  %63 = add nsw i32 %62, 1
  store i32 %63, ptr %61, align 4, !tbaa !5
  %indvars.iv.next.2.2 = or disjoint i64 %indvars.iv.2, 3
  %64 = getelementptr inbounds [32768 x i32], ptr @a, i64 0, i64 %indvars.iv.next.2.2
  %65 = load i32, ptr %64, align 4, !tbaa !5
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [4 x i32], ptr @tot, i64 0, i64 %66
  %68 = load i32, ptr %67, align 4, !tbaa !5
  %69 = add nsw i32 %68, 1
  store i32 %69, ptr %67, align 4, !tbaa !5
  %indvars.iv.next.2.3 = add nuw nsw i64 %indvars.iv.2, 4
  %niter55.next.3 = add i64 %niter55, 4
  %niter55.ncmp.3 = icmp eq i64 %niter55.next.3, %unroll_iter54
  br i1 %niter55.ncmp.3, label %._crit_edge.2.loopexit.unr-lcssa, label %.lr.ph.2, !llvm.loop !9

._crit_edge.2.loopexit.unr-lcssa:                 ; preds = %.lr.ph.2, %.lr.ph.preheader.2
  %indvars.iv.2.unr = phi i64 [ 0, %.lr.ph.preheader.2 ], [ %indvars.iv.next.2.3, %.lr.ph.2 ]
  %lcmp.mod53.not = icmp eq i64 %xtraiter51, 0
  br i1 %lcmp.mod53.not, label %._crit_edge.2, label %.lr.ph.2.epil

.lr.ph.2.epil:                                    ; preds = %._crit_edge.2.loopexit.unr-lcssa, %.lr.ph.2.epil
  %indvars.iv.2.epil = phi i64 [ %indvars.iv.next.2.epil, %.lr.ph.2.epil ], [ %indvars.iv.2.unr, %._crit_edge.2.loopexit.unr-lcssa ]
  %epil.iter52 = phi i64 [ %epil.iter52.next, %.lr.ph.2.epil ], [ 0, %._crit_edge.2.loopexit.unr-lcssa ]
  %70 = getelementptr inbounds [32768 x i32], ptr @a, i64 0, i64 %indvars.iv.2.epil
  %71 = load i32, ptr %70, align 4, !tbaa !5
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [4 x i32], ptr @tot, i64 0, i64 %72
  %74 = load i32, ptr %73, align 4, !tbaa !5
  %75 = add nsw i32 %74, 1
  store i32 %75, ptr %73, align 4, !tbaa !5
  %indvars.iv.next.2.epil = add nuw nsw i64 %indvars.iv.2.epil, 1
  %epil.iter52.next = add i64 %epil.iter52, 1
  %epil.iter52.cmp.not = icmp eq i64 %epil.iter52.next, %xtraiter51
  br i1 %epil.iter52.cmp.not, label %._crit_edge.2, label %.lr.ph.2.epil, !llvm.loop !13

._crit_edge.2:                                    ; preds = %._crit_edge.2.loopexit.unr-lcssa, %.lr.ph.2.epil, %42
  %76 = tail call noundef zeroext i1 @_Z5checkv()
  br i1 %76, label %112, label %77

77:                                               ; preds = %._crit_edge.2
  %78 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4)
  br label %139

.lr.ph.preheader:                                 ; preds = %0
  %79 = shl nuw nsw i32 1, %6
  %wide.trip.count = zext nneg i32 %79 to i64
  %xtraiter = and i64 %wide.trip.count, 3
  %80 = icmp ult i32 %6, 2
  br i1 %80, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.preheader.new

.lr.ph.preheader.new:                             ; preds = %.lr.ph.preheader
  %unroll_iter = and i64 %wide.trip.count, 2147483644
  br label %.lr.ph

._crit_edge.loopexit.unr-lcssa:                   ; preds = %.lr.ph, %.lr.ph.preheader
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next.3, %.lr.ph ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.lr.ph.epil

.lr.ph.epil:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.lr.ph.epil
  %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %.lr.ph.epil ], [ %indvars.iv.unr, %._crit_edge.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph.epil ], [ 0, %._crit_edge.loopexit.unr-lcssa ]
  %81 = getelementptr inbounds [32768 x i32], ptr @a, i64 0, i64 %indvars.iv.epil
  %82 = load i32, ptr %81, align 4, !tbaa !5
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [4 x i32], ptr @tot, i64 0, i64 %83
  %85 = load i32, ptr %84, align 4, !tbaa !5
  %86 = add nsw i32 %85, 1
  store i32 %86, ptr %84, align 4, !tbaa !5
  %indvars.iv.next.epil = add nuw nsw i64 %indvars.iv.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge, label %.lr.ph.epil, !llvm.loop !14

._crit_edge:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.lr.ph.epil, %0
  %87 = tail call noundef zeroext i1 @_Z5checkv()
  br i1 %87, label %112, label %7

.lr.ph:                                           ; preds = %.lr.ph, %.lr.ph.preheader.new
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader.new ], [ %indvars.iv.next.3, %.lr.ph ]
  %niter = phi i64 [ 0, %.lr.ph.preheader.new ], [ %niter.next.3, %.lr.ph ]
  %88 = getelementptr inbounds [32768 x i32], ptr @a, i64 0, i64 %indvars.iv
  %89 = load i32, ptr %88, align 16, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [4 x i32], ptr @tot, i64 0, i64 %90
  %92 = load i32, ptr %91, align 4, !tbaa !5
  %93 = add nsw i32 %92, 1
  store i32 %93, ptr %91, align 4, !tbaa !5
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %94 = getelementptr inbounds [32768 x i32], ptr @a, i64 0, i64 %indvars.iv.next
  %95 = load i32, ptr %94, align 4, !tbaa !5
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [4 x i32], ptr @tot, i64 0, i64 %96
  %98 = load i32, ptr %97, align 4, !tbaa !5
  %99 = add nsw i32 %98, 1
  store i32 %99, ptr %97, align 4, !tbaa !5
  %indvars.iv.next.141 = or disjoint i64 %indvars.iv, 2
  %100 = getelementptr inbounds [32768 x i32], ptr @a, i64 0, i64 %indvars.iv.next.141
  %101 = load i32, ptr %100, align 8, !tbaa !5
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds [4 x i32], ptr @tot, i64 0, i64 %102
  %104 = load i32, ptr %103, align 4, !tbaa !5
  %105 = add nsw i32 %104, 1
  store i32 %105, ptr %103, align 4, !tbaa !5
  %indvars.iv.next.244 = or disjoint i64 %indvars.iv, 3
  %106 = getelementptr inbounds [32768 x i32], ptr @a, i64 0, i64 %indvars.iv.next.244
  %107 = load i32, ptr %106, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [4 x i32], ptr @tot, i64 0, i64 %108
  %110 = load i32, ptr %109, align 4, !tbaa !5
  %111 = add nsw i32 %110, 1
  store i32 %111, ptr %109, align 4, !tbaa !5
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph, !llvm.loop !9

112:                                              ; preds = %._crit_edge.2, %._crit_edge.1, %._crit_edge
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %1) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #6
  %113 = load i32, ptr @n, align 4, !tbaa !5
  %.not34 = icmp eq i32 %113, 31
  br i1 %.not34, label %._crit_edge33, label %.lr.ph32

._crit_edge33:                                    ; preds = %120, %112
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull align 8 dereferenceable(32) %1)
          to label %125 unwind label %128

.lr.ph32:                                         ; preds = %112, %120
  %indvars.iv37 = phi i64 [ %indvars.iv.next38, %120 ], [ 0, %112 ]
  %114 = getelementptr inbounds [32768 x i32], ptr @a, i64 0, i64 %indvars.iv37
  %115 = load i32, ptr %114, align 4, !tbaa !5
  %switch.tableidx = add i32 %115, -1
  %116 = icmp ult i32 %switch.tableidx, 3
  br i1 %116, label %switch.lookup, label %120

117:                                              ; preds = %switch.lookup
  %118 = landingpad { ptr, i32 }
          cleanup
  br label %136

switch.lookup:                                    ; preds = %.lr.ph32
  %switch.cast = trunc nuw i32 %switch.tableidx to i24
  %switch.shiftamt = shl nuw nsw i24 %switch.cast, 3
  %switch.downshift = lshr i24 5460560, %switch.shiftamt
  %switch.masked = trunc i24 %switch.downshift to i8
  %119 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %1, i8 noundef signext %switch.masked)
          to label %120 unwind label %117

120:                                              ; preds = %.lr.ph32, %switch.lookup
  %indvars.iv.next38 = add nuw nsw i64 %indvars.iv37, 1
  %121 = load i32, ptr @n, align 4, !tbaa !5
  %122 = shl nuw i32 1, %121
  %123 = sext i32 %122 to i64
  %124 = icmp slt i64 %indvars.iv.next38, %123
  br i1 %124, label %.lr.ph32, label %._crit_edge33, !llvm.loop !15

125:                                              ; preds = %._crit_edge33
  invoke void @_Z3srtNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %2, ptr noundef nonnull %3)
          to label %126 unwind label %130

126:                                              ; preds = %125
  %127 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull align 8 dereferenceable(32) %2)
          to label %137 unwind label %132

128:                                              ; preds = %._crit_edge33
  %129 = landingpad { ptr, i32 }
          cleanup
  br label %135

130:                                              ; preds = %125
  %131 = landingpad { ptr, i32 }
          cleanup
  br label %134

132:                                              ; preds = %126
  %133 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #6
  br label %134

134:                                              ; preds = %132, %130
  %.pn = phi { ptr, i32 } [ %133, %132 ], [ %131, %130 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #6
  br label %135

135:                                              ; preds = %134, %128
  %.pn.pn = phi { ptr, i32 } [ %.pn, %134 ], [ %129, %128 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #6
  br label %136

136:                                              ; preds = %135, %117
  %.pn23 = phi { ptr, i32 } [ %118, %117 ], [ %.pn.pn, %135 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %1) #6
  resume { ptr, i32 } %.pn23

137:                                              ; preds = %126
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #6
  %138 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.3)
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %1) #6
  br label %139

139:                                              ; preds = %137, %77
  ret void
}

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32), i8 noundef signext) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #0 align 2

; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3

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

attributes #0 = { mustprogress 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 #1 = { mustprogress 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { inlinehint mustprogress 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 #6 = { 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++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.unroll.disable"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !10}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass