; LLVM IR from kazunetakahashi/atcoder :: 201411_201509/1130_CR/main.ll (Z6shokani)

; 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::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Tuple_impl.base", %"struct.std::_Head_base.7" }
%"struct.std::_Tuple_impl.base" = type <{ %"struct.std::_Tuple_impl.2", %"struct.std::_Head_base.6" }>
%"struct.std::_Tuple_impl.2" = type { %"struct.std::_Head_base" }
%"struct.std::_Head_base" = type { %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::_Head_base.6" = type { i32 }
%"struct.std::_Head_base.7" = type { i32 }
%"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] }

@s_d = external dso_local global [5 x i32], align 16
@s_u = external dso_local global [5 x i32], align 16
@prev_score = external dso_local global [5 x i32], align 16
@M = external dso_local global [1010 x %"class.std::tuple"], align 16
@have = external dso_local global [25 x i32], align 16
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str.22 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [3 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 @__gxx_personality_v0(...)

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

; 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 nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJiiSt6vectorIiSaIiEEEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS7_(ptr noundef nonnull align 8 dereferenceable(32)) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZSt3getILm2EJiiSt6vectorIiSaIiEEEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS7_(ptr noundef nonnull align 8 dereferenceable(32)) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EJiiSt6vectorIiSaIiEEEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS7_(ptr noundef nonnull align 8 dereferenceable(32)) #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z13koushin_scorev() #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z11init_playerv() #2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #3

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #3

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z11torihiki_upi(i32 noundef) #2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z6shokani(i32 noundef %0) #2 personality ptr @__gxx_personality_v0 {
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  store i32 %0, ptr %2, align 4, !tbaa !5
  br label %9

9:                                                ; preds = %1
  call void @_Z11init_playerv()
  call void @_Z13koushin_scorev()
  %10 = load i32, ptr %2, align 4, !tbaa !5
  call void @_Z11torihiki_upi(i32 noundef %10)
  %11 = load i32, ptr %2, align 4, !tbaa !5
  %12 = sext i32 %11 to i64
  %13 = getelementptr inbounds [5 x i32], ptr @s_d, i64 0, i64 %12
  %14 = load i32, ptr %13, align 4, !tbaa !5
  %15 = sext i32 %14 to i64
  %16 = getelementptr inbounds %"class.std::tuple", ptr @M, i64 %15
  %17 = load i32, ptr %2, align 4, !tbaa !5
  %18 = sext i32 %17 to i64
  %19 = getelementptr inbounds [5 x i32], ptr @s_u, i64 0, i64 %18
  %20 = load i32, ptr %19, align 4, !tbaa !5
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds %"class.std::tuple", ptr @M, i64 %21
  call void @_ZSt4sortIPSt5tupleIJiiSt6vectorIiSaIiEEEEEvT_S6_(ptr noundef %16, ptr noundef %22)
  %23 = load i32, ptr %2, align 4, !tbaa !5
  %24 = sext i32 %23 to i64
  %25 = getelementptr inbounds [5 x i32], ptr @s_d, i64 0, i64 %24
  %26 = load i32, ptr %25, align 4, !tbaa !5
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds %"class.std::tuple", ptr @M, i64 %27
  %29 = load i32, ptr %2, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds [5 x i32], ptr @s_u, i64 0, i64 %30
  %32 = load i32, ptr %31, align 4, !tbaa !5
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds %"class.std::tuple", ptr @M, i64 %33
  call void @_ZSt7reverseIPSt5tupleIJiiSt6vectorIiSaIiEEEEEvT_S6_(ptr noundef %28, ptr noundef %34)
  br label %35

35:                                               ; preds = %133, %9
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  %36 = load i32, ptr %2, align 4, !tbaa !5
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds [5 x i32], ptr @s_d, i64 0, i64 %37
  %39 = load i32, ptr %38, align 4, !tbaa !5
  store i32 %39, ptr %3, align 4, !tbaa !5
  br label %40

40:                                               ; preds = %130, %35
  %41 = load i32, ptr %3, align 4, !tbaa !5
  %42 = load i32, ptr %2, align 4, !tbaa !5
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds [5 x i32], ptr @s_u, i64 0, i64 %43
  %45 = load i32, ptr %44, align 4, !tbaa !5
  %46 = icmp slt i32 %41, %45
  br i1 %46, label %48, label %47

47:                                               ; preds = %40
  store i32 5, ptr %4, align 4
  br label %133

48:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %49

49:                                               ; preds = %69, %48
  %50 = load i32, ptr %5, align 4, !tbaa !5
  %51 = icmp slt i32 %50, 25
  br i1 %51, label %53, label %52

52:                                               ; preds = %49
  store i32 8, ptr %4, align 4
  br label %72

53:                                               ; preds = %49
  %54 = load i32, ptr %3, align 4, !tbaa !5
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [1010 x %"class.std::tuple"], ptr @M, i64 0, i64 %55
  %57 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZSt3getILm2EJiiSt6vectorIiSaIiEEEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS7_(ptr noundef nonnull align 8 dereferenceable(32) %56) #5
  %58 = load i32, ptr %5, align 4, !tbaa !5
  %59 = sext i32 %58 to i64
  %60 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %57, i64 noundef %59) #5
  %61 = load i32, ptr %60, align 4, !tbaa !5
  %62 = load i32, ptr %5, align 4, !tbaa !5
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [25 x i32], ptr @have, i64 0, i64 %63
  %65 = load i32, ptr %64, align 4, !tbaa !5
  %66 = icmp sgt i32 %61, %65
  br i1 %66, label %67, label %68

67:                                               ; preds = %53
  store i32 11, ptr %4, align 4
  br label %72

68:                                               ; preds = %53
  br label %69

69:                                               ; preds = %68
  %70 = load i32, ptr %5, align 4, !tbaa !5
  %71 = add nsw i32 %70, 1
  store i32 %71, ptr %5, align 4, !tbaa !5
  br label %49, !llvm.loop !9

72:                                               ; preds = %67, %52
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  %73 = load i32, ptr %4, align 4
  switch i32 %73, label %133 [
    i32 8, label %74
    i32 11, label %129
  ]

74:                                               ; preds = %72
  %75 = load i32, ptr %2, align 4, !tbaa !5
  %76 = icmp sgt i32 %75, 0
  br i1 %76, label %77, label %92

77:                                               ; preds = %74
  %78 = load i32, ptr %2, align 4, !tbaa !5
  %79 = sub nsw i32 %78, 1
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [5 x i32], ptr @prev_score, i64 0, i64 %80
  %82 = load i32, ptr %81, align 4, !tbaa !5
  %83 = load i32, ptr %3, align 4, !tbaa !5
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [1010 x %"class.std::tuple"], ptr @M, i64 0, i64 %84
  %86 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EJiiSt6vectorIiSaIiEEEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS7_(ptr noundef nonnull align 8 dereferenceable(32) %85) #5
  %87 = load i32, ptr %86, align 4, !tbaa !5
  %88 = icmp sgt i32 %82, %87
  br i1 %88, label %89, label %92

89:                                               ; preds = %77
  %90 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.22)
  %91 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %90, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 1, ptr %4, align 4
  br label %133

92:                                               ; preds = %77, %74
  %93 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.23)
  %94 = load i32, ptr %3, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [1010 x %"class.std::tuple"], ptr @M, i64 0, i64 %95
  %97 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJiiSt6vectorIiSaIiEEEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS7_(ptr noundef nonnull align 8 dereferenceable(32) %96) #5
  %98 = load i32, ptr %97, align 4, !tbaa !5
  %99 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %93, i32 noundef %98)
  %100 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %99, ptr noundef @.str.24)
  %101 = load i32, ptr %3, align 4, !tbaa !5
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds [1010 x %"class.std::tuple"], ptr @M, i64 0, i64 %102
  %104 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EJiiSt6vectorIiSaIiEEEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS7_(ptr noundef nonnull align 8 dereferenceable(32) %103) #5
  %105 = load i32, ptr %104, align 4, !tbaa !5
  %106 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %100, i32 noundef %105)
  %107 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %106, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %108 = load i32, ptr %3, align 4, !tbaa !5
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds [1010 x %"class.std::tuple"], ptr @M, i64 0, i64 %109
  %111 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EJiiSt6vectorIiSaIiEEEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS7_(ptr noundef nonnull align 8 dereferenceable(32) %110) #5
  %112 = load i32, ptr %111, align 4, !tbaa !5
  %113 = load i32, ptr %2, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [5 x i32], ptr @prev_score, i64 0, i64 %114
  store i32 %112, ptr %115, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %6) #5
  %116 = load i32, ptr %3, align 4, !tbaa !5
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [1010 x %"class.std::tuple"], ptr @M, i64 0, i64 %117
  %119 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJiiSt6vectorIiSaIiEEEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS7_(ptr noundef nonnull align 8 dereferenceable(32) %118) #5
  %120 = load i32, ptr %119, align 4, !tbaa !5
  call void @_Z8shokan_aB5cxx11i(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %6, i32 noundef %120)
  %121 = invoke noundef zeroext i1 @_ZStneIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef @.str.25)
          to label %122 unwind label %124

122:                                              ; preds = %92
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #5
  br i1 %121, label %123, label %128

123:                                              ; preds = %122
  store i32 1, ptr %4, align 4
  br label %133

124:                                              ; preds = %92
  %125 = landingpad { ptr, i32 }
          cleanup
  %126 = extractvalue { ptr, i32 } %125, 0
  store ptr %126, ptr %7, align 8
  %127 = extractvalue { ptr, i32 } %125, 1
  store i32 %127, ptr %8, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  br label %137

128:                                              ; preds = %122
  store i32 4, ptr %4, align 4
  br label %133

129:                                              ; preds = %72
  br label %130

130:                                              ; preds = %129
  %131 = load i32, ptr %3, align 4, !tbaa !5
  %132 = add nsw i32 %131, 1
  store i32 %132, ptr %3, align 4, !tbaa !5
  br label %40, !llvm.loop !11

133:                                              ; preds = %128, %123, %89, %72, %47
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  %134 = load i32, ptr %4, align 4
  switch i32 %134, label %142 [
    i32 5, label %135
    i32 1, label %136
    i32 4, label %35
  ]

135:                                              ; preds = %133
  br label %136

136:                                              ; preds = %135, %133
  ret void

137:                                              ; preds = %124
  %138 = load ptr, ptr %7, align 8
  %139 = load i32, ptr %8, align 4
  %140 = insertvalue { ptr, i32 } poison, ptr %138, 0
  %141 = insertvalue { ptr, i32 } %140, i32 %139, 1
  resume { ptr, i32 } %141

142:                                              ; preds = %133
  unreachable
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIPSt5tupleIJiiSt6vectorIiSaIiEEEEEvT_S6_(ptr noundef, ptr noundef) #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt7reverseIPSt5tupleIJiiSt6vectorIiSaIiEEEEEvT_S6_(ptr noundef, ptr noundef) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZStneIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 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 = { 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 #4 = { "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 }

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


; 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::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Tuple_impl.base", %"struct.std::_Head_base.7" }
%"struct.std::_Tuple_impl.base" = type <{ %"struct.std::_Tuple_impl.2", %"struct.std::_Head_base.6" }>
%"struct.std::_Tuple_impl.2" = type { %"struct.std::_Head_base" }
%"struct.std::_Head_base" = type { %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::_Head_base.6" = type { i32 }
%"struct.std::_Head_base.7" = type { i32 }
%"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] }

@s_d = external dso_local local_unnamed_addr global [5 x i32], align 16
@s_u = external dso_local local_unnamed_addr global [5 x i32], align 16
@prev_score = external dso_local local_unnamed_addr global [5 x i32], align 16
@M = external dso_local global [1010 x %"class.std::tuple"], align 16
@have = external dso_local local_unnamed_addr global [25 x i32], align 16
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str.22 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [3 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

; 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 nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJiiSt6vectorIiSaIiEEEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS7_(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZSt3getILm2EJiiSt6vectorIiSaIiEEEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS7_(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EJiiSt6vectorIiSaIiEEEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS7_(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z13koushin_scorev() local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z11init_playerv() local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #3

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z11torihiki_upi(i32 noundef) local_unnamed_addr #2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z6shokani(i32 noundef %0) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.std::__cxx11::basic_string", align 8
  tail call void @_Z11init_playerv()
  tail call void @_Z13koushin_scorev()
  tail call void @_Z11torihiki_upi(i32 noundef %0)
  %3 = sext i32 %0 to i64
  %4 = getelementptr inbounds [5 x i32], ptr @s_d, i64 0, i64 %3
  %5 = load i32, ptr %4, align 4, !tbaa !5
  %6 = sext i32 %5 to i64
  %7 = getelementptr inbounds %"class.std::tuple", ptr @M, i64 %6
  %8 = getelementptr inbounds [5 x i32], ptr @s_u, i64 0, i64 %3
  %9 = load i32, ptr %8, align 4, !tbaa !5
  %10 = sext i32 %9 to i64
  %11 = getelementptr inbounds %"class.std::tuple", ptr @M, i64 %10
  tail call void @_ZSt4sortIPSt5tupleIJiiSt6vectorIiSaIiEEEEEvT_S6_(ptr noundef nonnull %7, ptr noundef nonnull %11)
  %12 = load i32, ptr %4, align 4, !tbaa !5
  %13 = sext i32 %12 to i64
  %14 = getelementptr inbounds %"class.std::tuple", ptr @M, i64 %13
  %15 = load i32, ptr %8, align 4, !tbaa !5
  %16 = sext i32 %15 to i64
  %17 = getelementptr inbounds %"class.std::tuple", ptr @M, i64 %16
  tail call void @_ZSt7reverseIPSt5tupleIJiiSt6vectorIiSaIiEEEEEvT_S6_(ptr noundef nonnull %14, ptr noundef nonnull %17)
  %18 = icmp sgt i32 %0, 0
  %19 = add nsw i32 %0, -1
  %20 = zext nneg i32 %19 to i64
  %21 = getelementptr inbounds [5 x i32], ptr @prev_score, i64 0, i64 %20
  %22 = getelementptr inbounds [5 x i32], ptr @prev_score, i64 0, i64 %3
  br label %23

23:                                               ; preds = %211, %1
  %24 = load i32, ptr %4, align 4, !tbaa !5
  %25 = load i32, ptr %8, align 4, !tbaa !5
  %26 = icmp slt i32 %24, %25
  br i1 %26, label %.preheader.preheader, label %.thread29

.preheader.preheader:                             ; preds = %23
  %27 = sext i32 %24 to i64
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %207
  %indvars.iv = phi i64 [ %27, %.preheader.preheader ], [ %indvars.iv.next, %207 ]
  %28 = getelementptr inbounds [1010 x %"class.std::tuple"], ptr @M, i64 0, i64 %indvars.iv
  %29 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZSt3getILm2EJiiSt6vectorIiSaIiEEEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS7_(ptr noundef nonnull align 8 dereferenceable(32) %28) #5
  %30 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %29, i64 noundef 0) #5
  %31 = load i32, ptr %30, align 4, !tbaa !5
  %32 = load i32, ptr @have, align 16, !tbaa !5
  %33 = icmp sgt i32 %31, %32
  br i1 %33, label %207, label %34

34:                                               ; preds = %.preheader
  %35 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZSt3getILm2EJiiSt6vectorIiSaIiEEEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS7_(ptr noundef nonnull align 8 dereferenceable(32) %28) #5
  %36 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %35, i64 noundef 1) #5
  %37 = load i32, ptr %36, align 4, !tbaa !5
  %38 = load i32, ptr getelementptr inbounds (i8, ptr @have, i64 4), align 4, !tbaa !5
  %39 = icmp sgt i32 %37, %38
  br i1 %39, label %207, label %40

40:                                               ; preds = %34
  %41 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZSt3getILm2EJiiSt6vectorIiSaIiEEEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS7_(ptr noundef nonnull align 8 dereferenceable(32) %28) #5
  %42 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %41, i64 noundef 2) #5
  %43 = load i32, ptr %42, align 4, !tbaa !5
  %44 = load i32, ptr getelementptr inbounds (i8, ptr @have, i64 8), align 8, !tbaa !5
  %45 = icmp sgt i32 %43, %44
  br i1 %45, label %207, label %46

46:                                               ; preds = %40
  %47 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZSt3getILm2EJiiSt6vectorIiSaIiEEEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS7_(ptr noundef nonnull align 8 dereferenceable(32) %28) #5
  %48 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %47, i64 noundef 3) #5
  %49 = load i32, ptr %48, align 4, !tbaa !5
  %50 = load i32, ptr getelementptr inbounds (i8, ptr @have, i64 12), align 4, !tbaa !5
  %51 = icmp sgt i32 %49, %50
  br i1 %51, label %207, label %52

52:                                               ; preds = %46
  %53 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZSt3getILm2EJiiSt6vectorIiSaIiEEEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS7_(ptr noundef nonnull align 8 dereferenceable(32) %28) #5
  %54 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %53, i64 noundef 4) #5
  %55 = load i32, ptr %54, align 4, !tbaa !5
  %56 = load i32, ptr getelementptr inbounds (i8, ptr @have, i64 16), align 16, !tbaa !5
  %57 = icmp sgt i32 %55, %56
  br i1 %57, label %207, label %58

58:                                               ; preds = %52
  %59 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZSt3getILm2EJiiSt6vectorIiSaIiEEEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS7_(ptr noundef nonnull align 8 dereferenceable(32) %28) #5
  %60 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %59, i64 noundef 5) #5
  %61 = load i32, ptr %60, align 4, !tbaa !5
  %62 = load i32, ptr getelementptr inbounds (i8, ptr @have, i64 20), align 4, !tbaa !5
  %63 = icmp sgt i32 %61, %62
  br i1 %63, label %207, label %64

64:                                               ; preds = %58
  %65 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZSt3getILm2EJiiSt6vectorIiSaIiEEEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS7_(ptr noundef nonnull align 8 dereferenceable(32) %28) #5
  %66 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %65, i64 noundef 6) #5
  %67 = load i32, ptr %66, align 4, !tbaa !5
  %68 = load i32, ptr getelementptr inbounds (i8, ptr @have, i64 24), align 8, !tbaa !5
  %69 = icmp sgt i32 %67, %68
  br i1 %69, label %207, label %70

70:                                               ; preds = %64
  %71 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZSt3getILm2EJiiSt6vectorIiSaIiEEEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS7_(ptr noundef nonnull align 8 dereferenceable(32) %28) #5
  %72 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %71, i64 noundef 7) #5
  %73 = load i32, ptr %72, align 4, !tbaa !5
  %74 = load i32, ptr getelementptr inbounds (i8, ptr @have, i64 28), align 4, !tbaa !5
  %75 = icmp sgt i32 %73, %74
  br i1 %75, label %207, label %76

76:                                               ; preds = %70
  %77 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZSt3getILm2EJiiSt6vectorIiSaIiEEEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS7_(ptr noundef nonnull align 8 dereferenceable(32) %28) #5
  %78 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %77, i64 noundef 8) #5
  %79 = load i32, ptr %78, align 4, !tbaa !5
  %80 = load i32, ptr getelementptr inbounds (i8, ptr @have, i64 32), align 16, !tbaa !5
  %81 = icmp sgt i32 %79, %80
  br i1 %81, label %207, label %82

82:                                               ; preds = %76
  %83 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZSt3getILm2EJiiSt6vectorIiSaIiEEEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS7_(ptr noundef nonnull align 8 dereferenceable(32) %28) #5
  %84 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %83, i64 noundef 9) #5
  %85 = load i32, ptr %84, align 4, !tbaa !5
  %86 = load i32, ptr getelementptr inbounds (i8, ptr @have, i64 36), align 4, !tbaa !5
  %87 = icmp sgt i32 %85, %86
  br i1 %87, label %207, label %88

88:                                               ; preds = %82
  %89 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZSt3getILm2EJiiSt6vectorIiSaIiEEEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS7_(ptr noundef nonnull align 8 dereferenceable(32) %28) #5
  %90 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %89, i64 noundef 10) #5
  %91 = load i32, ptr %90, align 4, !tbaa !5
  %92 = load i32, ptr getelementptr inbounds (i8, ptr @have, i64 40), align 8, !tbaa !5
  %93 = icmp sgt i32 %91, %92
  br i1 %93, label %207, label %94

94:                                               ; preds = %88
  %95 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZSt3getILm2EJiiSt6vectorIiSaIiEEEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS7_(ptr noundef nonnull align 8 dereferenceable(32) %28) #5
  %96 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %95, i64 noundef 11) #5
  %97 = load i32, ptr %96, align 4, !tbaa !5
  %98 = load i32, ptr getelementptr inbounds (i8, ptr @have, i64 44), align 4, !tbaa !5
  %99 = icmp sgt i32 %97, %98
  br i1 %99, label %207, label %100

100:                                              ; preds = %94
  %101 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZSt3getILm2EJiiSt6vectorIiSaIiEEEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS7_(ptr noundef nonnull align 8 dereferenceable(32) %28) #5
  %102 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %101, i64 noundef 12) #5
  %103 = load i32, ptr %102, align 4, !tbaa !5
  %104 = load i32, ptr getelementptr inbounds (i8, ptr @have, i64 48), align 16, !tbaa !5
  %105 = icmp sgt i32 %103, %104
  br i1 %105, label %207, label %106

106:                                              ; preds = %100
  %107 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZSt3getILm2EJiiSt6vectorIiSaIiEEEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS7_(ptr noundef nonnull align 8 dereferenceable(32) %28) #5
  %108 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %107, i64 noundef 13) #5
  %109 = load i32, ptr %108, align 4, !tbaa !5
  %110 = load i32, ptr getelementptr inbounds (i8, ptr @have, i64 52), align 4, !tbaa !5
  %111 = icmp sgt i32 %109, %110
  br i1 %111, label %207, label %112

112:                                              ; preds = %106
  %113 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZSt3getILm2EJiiSt6vectorIiSaIiEEEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS7_(ptr noundef nonnull align 8 dereferenceable(32) %28) #5
  %114 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %113, i64 noundef 14) #5
  %115 = load i32, ptr %114, align 4, !tbaa !5
  %116 = load i32, ptr getelementptr inbounds (i8, ptr @have, i64 56), align 8, !tbaa !5
  %117 = icmp sgt i32 %115, %116
  br i1 %117, label %207, label %118

118:                                              ; preds = %112
  %119 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZSt3getILm2EJiiSt6vectorIiSaIiEEEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS7_(ptr noundef nonnull align 8 dereferenceable(32) %28) #5
  %120 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %119, i64 noundef 15) #5
  %121 = load i32, ptr %120, align 4, !tbaa !5
  %122 = load i32, ptr getelementptr inbounds (i8, ptr @have, i64 60), align 4, !tbaa !5
  %123 = icmp sgt i32 %121, %122
  br i1 %123, label %207, label %124

124:                                              ; preds = %118
  %125 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZSt3getILm2EJiiSt6vectorIiSaIiEEEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS7_(ptr noundef nonnull align 8 dereferenceable(32) %28) #5
  %126 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %125, i64 noundef 16) #5
  %127 = load i32, ptr %126, align 4, !tbaa !5
  %128 = load i32, ptr getelementptr inbounds (i8, ptr @have, i64 64), align 16, !tbaa !5
  %129 = icmp sgt i32 %127, %128
  br i1 %129, label %207, label %130

130:                                              ; preds = %124
  %131 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZSt3getILm2EJiiSt6vectorIiSaIiEEEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS7_(ptr noundef nonnull align 8 dereferenceable(32) %28) #5
  %132 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %131, i64 noundef 17) #5
  %133 = load i32, ptr %132, align 4, !tbaa !5
  %134 = load i32, ptr getelementptr inbounds (i8, ptr @have, i64 68), align 4, !tbaa !5
  %135 = icmp sgt i32 %133, %134
  br i1 %135, label %207, label %136

136:                                              ; preds = %130
  %137 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZSt3getILm2EJiiSt6vectorIiSaIiEEEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS7_(ptr noundef nonnull align 8 dereferenceable(32) %28) #5
  %138 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %137, i64 noundef 18) #5
  %139 = load i32, ptr %138, align 4, !tbaa !5
  %140 = load i32, ptr getelementptr inbounds (i8, ptr @have, i64 72), align 8, !tbaa !5
  %141 = icmp sgt i32 %139, %140
  br i1 %141, label %207, label %142

142:                                              ; preds = %136
  %143 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZSt3getILm2EJiiSt6vectorIiSaIiEEEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS7_(ptr noundef nonnull align 8 dereferenceable(32) %28) #5
  %144 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %143, i64 noundef 19) #5
  %145 = load i32, ptr %144, align 4, !tbaa !5
  %146 = load i32, ptr getelementptr inbounds (i8, ptr @have, i64 76), align 4, !tbaa !5
  %147 = icmp sgt i32 %145, %146
  br i1 %147, label %207, label %148

148:                                              ; preds = %142
  %149 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZSt3getILm2EJiiSt6vectorIiSaIiEEEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS7_(ptr noundef nonnull align 8 dereferenceable(32) %28) #5
  %150 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %149, i64 noundef 20) #5
  %151 = load i32, ptr %150, align 4, !tbaa !5
  %152 = load i32, ptr getelementptr inbounds (i8, ptr @have, i64 80), align 16, !tbaa !5
  %153 = icmp sgt i32 %151, %152
  br i1 %153, label %207, label %154

154:                                              ; preds = %148
  %155 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZSt3getILm2EJiiSt6vectorIiSaIiEEEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS7_(ptr noundef nonnull align 8 dereferenceable(32) %28) #5
  %156 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %155, i64 noundef 21) #5
  %157 = load i32, ptr %156, align 4, !tbaa !5
  %158 = load i32, ptr getelementptr inbounds (i8, ptr @have, i64 84), align 4, !tbaa !5
  %159 = icmp sgt i32 %157, %158
  br i1 %159, label %207, label %160

160:                                              ; preds = %154
  %161 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZSt3getILm2EJiiSt6vectorIiSaIiEEEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS7_(ptr noundef nonnull align 8 dereferenceable(32) %28) #5
  %162 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %161, i64 noundef 22) #5
  %163 = load i32, ptr %162, align 4, !tbaa !5
  %164 = load i32, ptr getelementptr inbounds (i8, ptr @have, i64 88), align 8, !tbaa !5
  %165 = icmp sgt i32 %163, %164
  br i1 %165, label %207, label %166

166:                                              ; preds = %160
  %167 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZSt3getILm2EJiiSt6vectorIiSaIiEEEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS7_(ptr noundef nonnull align 8 dereferenceable(32) %28) #5
  %168 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %167, i64 noundef 23) #5
  %169 = load i32, ptr %168, align 4, !tbaa !5
  %170 = load i32, ptr getelementptr inbounds (i8, ptr @have, i64 92), align 4, !tbaa !5
  %171 = icmp sgt i32 %169, %170
  br i1 %171, label %207, label %172

172:                                              ; preds = %166
  %173 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZSt3getILm2EJiiSt6vectorIiSaIiEEEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS7_(ptr noundef nonnull align 8 dereferenceable(32) %28) #5
  %174 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %173, i64 noundef 24) #5
  %175 = load i32, ptr %174, align 4, !tbaa !5
  %176 = load i32, ptr getelementptr inbounds (i8, ptr @have, i64 96), align 16, !tbaa !5
  %177 = icmp sgt i32 %175, %176
  br i1 %177, label %207, label %178

178:                                              ; preds = %172
  br i1 %18, label %179, label %._crit_edge

._crit_edge:                                      ; preds = %178
  %sext = shl i64 %indvars.iv, 32
  %.pre = ashr exact i64 %sext, 32
  br label %189

179:                                              ; preds = %178
  %180 = load i32, ptr %21, align 4, !tbaa !5
  %sext43 = shl i64 %indvars.iv, 32
  %181 = ashr exact i64 %sext43, 32
  %182 = getelementptr inbounds [1010 x %"class.std::tuple"], ptr @M, i64 0, i64 %181
  %183 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EJiiSt6vectorIiSaIiEEEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS7_(ptr noundef nonnull align 8 dereferenceable(32) %182) #5
  %184 = load i32, ptr %183, align 4, !tbaa !5
  %185 = icmp sgt i32 %180, %184
  br i1 %185, label %186, label %189

186:                                              ; preds = %179
  %187 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str.22)
  %188 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %187, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %.thread29

189:                                              ; preds = %._crit_edge, %179
  %.pre-phi = phi i64 [ %.pre, %._crit_edge ], [ %181, %179 ]
  %190 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.23)
  %191 = getelementptr inbounds [1010 x %"class.std::tuple"], ptr @M, i64 0, i64 %.pre-phi
  %192 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJiiSt6vectorIiSaIiEEEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS7_(ptr noundef nonnull align 8 dereferenceable(32) %191) #5
  %193 = load i32, ptr %192, align 4, !tbaa !5
  %194 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %190, i32 noundef %193)
  %195 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %194, ptr noundef nonnull @.str.24)
  %196 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EJiiSt6vectorIiSaIiEEEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS7_(ptr noundef nonnull align 8 dereferenceable(32) %191) #5
  %197 = load i32, ptr %196, align 4, !tbaa !5
  %198 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %195, i32 noundef %197)
  %199 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %198, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %200 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EJiiSt6vectorIiSaIiEEEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS7_(ptr noundef nonnull align 8 dereferenceable(32) %191) #5
  %201 = load i32, ptr %200, align 4, !tbaa !5
  store i32 %201, ptr %22, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #5
  %202 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJiiSt6vectorIiSaIiEEEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS7_(ptr noundef nonnull align 8 dereferenceable(32) %191) #5
  %203 = load i32, ptr %202, align 4, !tbaa !5
  call void @_Z8shokan_aB5cxx11i(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %2, i32 noundef %203)
  %204 = invoke noundef zeroext i1 @_ZStneIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull @.str.25)
          to label %211 unwind label %205

205:                                              ; preds = %189
  %206 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #5
  resume { ptr, i32 } %206

207:                                              ; preds = %172, %166, %160, %154, %148, %142, %136, %130, %124, %118, %112, %106, %100, %94, %88, %82, %76, %70, %64, %58, %52, %46, %40, %34, %.preheader
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %208 = load i32, ptr %8, align 4, !tbaa !5
  %209 = sext i32 %208 to i64
  %210 = icmp slt i64 %indvars.iv.next, %209
  br i1 %210, label %.preheader, label %.thread29, !llvm.loop !9

211:                                              ; preds = %189
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #5
  br i1 %204, label %.thread29, label %23

.thread29:                                        ; preds = %211, %23, %207, %186
  ret void
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIPSt5tupleIJiiSt6vectorIiSaIiEEEEEvT_S6_(ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt7reverseIPSt5tupleIJiiSt6vectorIiSaIiEEEEEvT_S6_(ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZStneIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) local_unnamed_addr #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 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 = { 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 #4 = { "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 }

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


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