; LLVM IR from brpapa/algorithms :: solutions/uva (10111)

; 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_istream" = type { ptr, i64, %"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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"struct.std::array" = type { [4 x %"struct.std::array.0"] }
%"struct.std::array.0" = type { [4 x i8] }
%"struct.std::pair" = type { i32, i32 }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [6 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) 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) #0

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z7minimaxiSt5arrayIS_IcLm4EELm4EE(i32 noundef, i64, i64) #3

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #4 {
  %1 = alloca i32, align 4
  %2 = alloca i8, align 1
  %3 = alloca %"struct.std::array", align 1
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca %"struct.std::pair", align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %"struct.std::array", align 1
  %13 = alloca %"struct.std::pair", align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca %"struct.std::pair", align 4
  %17 = alloca %"struct.std::pair", align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 1, ptr %2) #8
  br label %20

20:                                               ; preds = %128, %0
  %21 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 1 dereferenceable(1) %2)
  %22 = load ptr, ptr %21, align 8, !tbaa !5
  %23 = getelementptr i8, ptr %22, i64 -24
  %24 = load i64, ptr %23, align 8
  %25 = getelementptr inbounds i8, ptr %21, i64 %24
  %26 = call noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264) %25)
  br i1 %26, label %27, label %31

27:                                               ; preds = %20
  %28 = load i8, ptr %2, align 1, !tbaa !8
  %29 = sext i8 %28 to i32
  %30 = icmp ne i32 %29, 36
  br label %31

31:                                               ; preds = %27, %20
  %32 = phi i1 [ false, %20 ], [ %30, %27 ]
  br i1 %32, label %33, label %129

33:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 16, ptr %3) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #8
  store i32 0, ptr %4, align 4, !tbaa !10
  br label %34

34:                                               ; preds = %55, %33
  %35 = load i32, ptr %4, align 4, !tbaa !10
  %36 = icmp slt i32 %35, 4
  br i1 %36, label %38, label %37

37:                                               ; preds = %34
  store i32 4, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #8
  br label %58

38:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #8
  store i32 0, ptr %6, align 4, !tbaa !10
  br label %39

39:                                               ; preds = %51, %38
  %40 = load i32, ptr %6, align 4, !tbaa !10
  %41 = icmp slt i32 %40, 4
  br i1 %41, label %43, label %42

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

43:                                               ; preds = %39
  %44 = load i32, ptr %4, align 4, !tbaa !10
  %45 = sext i32 %44 to i64
  %46 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZNSt5arrayIS_IcLm4EELm4EEixEm(ptr noundef nonnull align 1 dereferenceable(16) %3, i64 noundef %45) #8
  %47 = load i32, ptr %6, align 4, !tbaa !10
  %48 = sext i32 %47 to i64
  %49 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt5arrayIcLm4EEixEm(ptr noundef nonnull align 1 dereferenceable(4) %46, i64 noundef %48) #8
  %50 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 1 dereferenceable(1) %49)
  br label %51

51:                                               ; preds = %43
  %52 = load i32, ptr %6, align 4, !tbaa !10
  %53 = add nsw i32 %52, 1
  store i32 %53, ptr %6, align 4, !tbaa !10
  br label %39, !llvm.loop !12

54:                                               ; preds = %42
  br label %55

55:                                               ; preds = %54
  %56 = load i32, ptr %4, align 4, !tbaa !10
  %57 = add nsw i32 %56, 1
  store i32 %57, ptr %4, align 4, !tbaa !10
  br label %34, !llvm.loop !14

58:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  store i32 -1, ptr %8, align 4, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  store i32 -1, ptr %9, align 4, !tbaa !10
  call void @_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 4 dereferenceable(8) %7, ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %9)
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #8
  store i32 0, ptr %10, align 4, !tbaa !10
  br label %59

59:                                               ; preds = %109, %58
  %60 = load i32, ptr %10, align 4, !tbaa !10
  %61 = icmp slt i32 %60, 4
  br i1 %61, label %63, label %62

62:                                               ; preds = %59
  store i32 10, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  br label %112

63:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  store i32 0, ptr %11, align 4, !tbaa !10
  br label %64

64:                                               ; preds = %105, %63
  %65 = load i32, ptr %11, align 4, !tbaa !10
  %66 = icmp slt i32 %65, 4
  br i1 %66, label %68, label %67

67:                                               ; preds = %64
  store i32 13, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  br label %108

68:                                               ; preds = %64
  %69 = load i32, ptr %10, align 4, !tbaa !10
  %70 = sext i32 %69 to i64
  %71 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZNSt5arrayIS_IcLm4EELm4EEixEm(ptr noundef nonnull align 1 dereferenceable(16) %3, i64 noundef %70) #8
  %72 = load i32, ptr %11, align 4, !tbaa !10
  %73 = sext i32 %72 to i64
  %74 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt5arrayIcLm4EEixEm(ptr noundef nonnull align 1 dereferenceable(4) %71, i64 noundef %73) #8
  %75 = load i8, ptr %74, align 1, !tbaa !8
  %76 = sext i8 %75 to i32
  %77 = icmp eq i32 %76, 46
  br i1 %77, label %78, label %104

78:                                               ; preds = %68
  %79 = load i32, ptr %10, align 4, !tbaa !10
  %80 = sext i32 %79 to i64
  %81 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZNSt5arrayIS_IcLm4EELm4EEixEm(ptr noundef nonnull align 1 dereferenceable(16) %3, i64 noundef %80) #8
  %82 = load i32, ptr %11, align 4, !tbaa !10
  %83 = sext i32 %82 to i64
  %84 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt5arrayIcLm4EEixEm(ptr noundef nonnull align 1 dereferenceable(4) %81, i64 noundef %83) #8
  store i8 120, ptr %84, align 1, !tbaa !8
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %12, ptr align 1 %3, i64 16, i1 false), !tbaa.struct !15
  %85 = getelementptr inbounds { i64, i64 }, ptr %12, i32 0, i32 0
  %86 = load i64, ptr %85, align 1
  %87 = getelementptr inbounds { i64, i64 }, ptr %12, i32 0, i32 1
  %88 = load i64, ptr %87, align 1
  %89 = call noundef i32 @_Z7minimaxiSt5arrayIS_IcLm4EELm4EE(i32 noundef 1, i64 %86, i64 %88)
  %90 = icmp eq i32 %89, -1
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  br i1 %90, label %91, label %93

91:                                               ; preds = %78
  store i32 -1, ptr %14, align 4, !tbaa !10
  store i32 -1, ptr %15, align 4, !tbaa !10
  call void @_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 4 dereferenceable(8) %13, ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef nonnull align 4 dereferenceable(4) %15)
  %92 = call noundef zeroext i1 @_ZSteqIiiEbRKSt4pairIT_T0_ES5_(ptr noundef nonnull align 4 dereferenceable(8) %7, ptr noundef nonnull align 4 dereferenceable(8) %13)
  br label %93

93:                                               ; preds = %91, %78
  %94 = phi i1 [ false, %78 ], [ %92, %91 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  br i1 %94, label %95, label %97

95:                                               ; preds = %93
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  call void @_ZNSt4pairIiiEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %16, ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %11)
  %96 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %7, ptr noundef nonnull align 4 dereferenceable(8) %16) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  br label %97

97:                                               ; preds = %95, %93
  %98 = load i32, ptr %10, align 4, !tbaa !10
  %99 = sext i32 %98 to i64
  %100 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZNSt5arrayIS_IcLm4EELm4EEixEm(ptr noundef nonnull align 1 dereferenceable(16) %3, i64 noundef %99) #8
  %101 = load i32, ptr %11, align 4, !tbaa !10
  %102 = sext i32 %101 to i64
  %103 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt5arrayIcLm4EEixEm(ptr noundef nonnull align 1 dereferenceable(4) %100, i64 noundef %102) #8
  store i8 46, ptr %103, align 1, !tbaa !8
  br label %104

104:                                              ; preds = %97, %68
  br label %105

105:                                              ; preds = %104
  %106 = load i32, ptr %11, align 4, !tbaa !10
  %107 = add nsw i32 %106, 1
  store i32 %107, ptr %11, align 4, !tbaa !10
  br label %64, !llvm.loop !16

108:                                              ; preds = %67
  br label %109

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

112:                                              ; preds = %62
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  store i32 -1, ptr %18, align 4, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #8
  store i32 -1, ptr %19, align 4, !tbaa !10
  call void @_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 4 dereferenceable(8) %17, ptr noundef nonnull align 4 dereferenceable(4) %18, ptr noundef nonnull align 4 dereferenceable(4) %19)
  %113 = call noundef zeroext i1 @_ZSteqIiiEbRKSt4pairIT_T0_ES5_(ptr noundef nonnull align 4 dereferenceable(8) %7, ptr noundef nonnull align 4 dereferenceable(8) %17)
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  br i1 %113, label %114, label %117

114:                                              ; preds = %112
  %115 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  %116 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %115, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %128

117:                                              ; preds = %112
  %118 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.2)
  %119 = getelementptr inbounds %"struct.std::pair", ptr %7, i32 0, i32 0
  %120 = load i32, ptr %119, align 4, !tbaa !18
  %121 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %118, i32 noundef %120)
  %122 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %121, ptr noundef @.str.3)
  %123 = getelementptr inbounds %"struct.std::pair", ptr %7, i32 0, i32 1
  %124 = load i32, ptr %123, align 4, !tbaa !20
  %125 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %122, i32 noundef %124)
  %126 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %125, ptr noundef @.str.4)
  %127 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %126, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %128

128:                                              ; preds = %117, %114
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %3) #8
  br label %20, !llvm.loop !21

129:                                              ; preds = %31
  store i32 0, ptr %1, align 4
  store i32 1, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %2) #8
  %130 = load i32, ptr %1, align 4
  ret i32 %130
}

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 1 dereferenceable(1)) #5

; Function Attrs: mustprogress uwtable
declare noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264)) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSteqIiiEbRKSt4pairIT_T0_ES5_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #6

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIiiEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #1 align 2

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

; 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) #7

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #3 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)) #7

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

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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { "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 = { inlinehint 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 #7 = { 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 #8 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"omnipotent char", !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"int", !9, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = !{i64 0, i64 16, !8}
!16 = distinct !{!16, !13}
!17 = distinct !{!17, !13}
!18 = !{!19, !11, i64 0}
!19 = !{!"_ZTSSt4pairIiiE", !11, i64 0, !11, i64 4}
!20 = !{!19, !11, i64 4}
!21 = distinct !{!21, !13}


; 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_istream" = type { ptr, i64, %"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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"struct.std::array" = type { [4 x %"struct.std::array.0"] }
%"struct.std::array.0" = type { [4 x i8] }
%"struct.std::pair" = type { i32, i32 }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [6 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) 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) #0

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z7minimaxiSt5arrayIS_IcLm4EELm4EE(i32 noundef, i64, i64) local_unnamed_addr #2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #3 {
  %1 = alloca i8, align 1
  %2 = alloca %"struct.std::array", align 8
  %3 = alloca %"struct.std::pair", align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca %"struct.std::pair", align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %"struct.std::pair", align 4
  %12 = alloca %"struct.std::pair", align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %1) #7
  %15 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 1 dereferenceable(1) %1)
  %16 = load ptr, ptr %15, align 8, !tbaa !5
  %17 = getelementptr i8, ptr %16, i64 -24
  %18 = load i64, ptr %17, align 8
  %19 = getelementptr inbounds i8, ptr %15, i64 %18
  %20 = call noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264) %19)
  %21 = load i8, ptr %1, align 1
  %22 = icmp ne i8 %21, 36
  %23 = select i1 %20, i1 %22, i1 false
  br i1 %23, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %0
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %2, i64 8
  %24 = getelementptr inbounds i8, ptr %3, i64 4
  br label %.preheader

.preheader:                                       ; preds = %.lr.ph, %123
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %2) #7
  %25 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZNSt5arrayIS_IcLm4EELm4EEixEm(ptr noundef nonnull align 1 dereferenceable(16) %2, i64 noundef 0) #7
  %26 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt5arrayIcLm4EEixEm(ptr noundef nonnull align 1 dereferenceable(4) %25, i64 noundef 0) #7
  %27 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 1 dereferenceable(1) %26)
  %28 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZNSt5arrayIS_IcLm4EELm4EEixEm(ptr noundef nonnull align 1 dereferenceable(16) %2, i64 noundef 0) #7
  %29 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt5arrayIcLm4EEixEm(ptr noundef nonnull align 1 dereferenceable(4) %28, i64 noundef 1) #7
  %30 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 1 dereferenceable(1) %29)
  %31 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZNSt5arrayIS_IcLm4EELm4EEixEm(ptr noundef nonnull align 1 dereferenceable(16) %2, i64 noundef 0) #7
  %32 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt5arrayIcLm4EEixEm(ptr noundef nonnull align 1 dereferenceable(4) %31, i64 noundef 2) #7
  %33 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 1 dereferenceable(1) %32)
  %34 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZNSt5arrayIS_IcLm4EELm4EEixEm(ptr noundef nonnull align 1 dereferenceable(16) %2, i64 noundef 0) #7
  %35 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt5arrayIcLm4EEixEm(ptr noundef nonnull align 1 dereferenceable(4) %34, i64 noundef 3) #7
  %36 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 1 dereferenceable(1) %35)
  %37 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZNSt5arrayIS_IcLm4EELm4EEixEm(ptr noundef nonnull align 1 dereferenceable(16) %2, i64 noundef 1) #7
  %38 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt5arrayIcLm4EEixEm(ptr noundef nonnull align 1 dereferenceable(4) %37, i64 noundef 0) #7
  %39 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 1 dereferenceable(1) %38)
  %40 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZNSt5arrayIS_IcLm4EELm4EEixEm(ptr noundef nonnull align 1 dereferenceable(16) %2, i64 noundef 1) #7
  %41 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt5arrayIcLm4EEixEm(ptr noundef nonnull align 1 dereferenceable(4) %40, i64 noundef 1) #7
  %42 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 1 dereferenceable(1) %41)
  %43 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZNSt5arrayIS_IcLm4EELm4EEixEm(ptr noundef nonnull align 1 dereferenceable(16) %2, i64 noundef 1) #7
  %44 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt5arrayIcLm4EEixEm(ptr noundef nonnull align 1 dereferenceable(4) %43, i64 noundef 2) #7
  %45 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 1 dereferenceable(1) %44)
  %46 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZNSt5arrayIS_IcLm4EELm4EEixEm(ptr noundef nonnull align 1 dereferenceable(16) %2, i64 noundef 1) #7
  %47 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt5arrayIcLm4EEixEm(ptr noundef nonnull align 1 dereferenceable(4) %46, i64 noundef 3) #7
  %48 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 1 dereferenceable(1) %47)
  %49 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZNSt5arrayIS_IcLm4EELm4EEixEm(ptr noundef nonnull align 1 dereferenceable(16) %2, i64 noundef 2) #7
  %50 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt5arrayIcLm4EEixEm(ptr noundef nonnull align 1 dereferenceable(4) %49, i64 noundef 0) #7
  %51 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 1 dereferenceable(1) %50)
  %52 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZNSt5arrayIS_IcLm4EELm4EEixEm(ptr noundef nonnull align 1 dereferenceable(16) %2, i64 noundef 2) #7
  %53 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt5arrayIcLm4EEixEm(ptr noundef nonnull align 1 dereferenceable(4) %52, i64 noundef 1) #7
  %54 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 1 dereferenceable(1) %53)
  %55 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZNSt5arrayIS_IcLm4EELm4EEixEm(ptr noundef nonnull align 1 dereferenceable(16) %2, i64 noundef 2) #7
  %56 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt5arrayIcLm4EEixEm(ptr noundef nonnull align 1 dereferenceable(4) %55, i64 noundef 2) #7
  %57 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 1 dereferenceable(1) %56)
  %58 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZNSt5arrayIS_IcLm4EELm4EEixEm(ptr noundef nonnull align 1 dereferenceable(16) %2, i64 noundef 2) #7
  %59 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt5arrayIcLm4EEixEm(ptr noundef nonnull align 1 dereferenceable(4) %58, i64 noundef 3) #7
  %60 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 1 dereferenceable(1) %59)
  %61 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZNSt5arrayIS_IcLm4EELm4EEixEm(ptr noundef nonnull align 1 dereferenceable(16) %2, i64 noundef 3) #7
  %62 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt5arrayIcLm4EEixEm(ptr noundef nonnull align 1 dereferenceable(4) %61, i64 noundef 0) #7
  %63 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 1 dereferenceable(1) %62)
  %64 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZNSt5arrayIS_IcLm4EELm4EEixEm(ptr noundef nonnull align 1 dereferenceable(16) %2, i64 noundef 3) #7
  %65 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt5arrayIcLm4EEixEm(ptr noundef nonnull align 1 dereferenceable(4) %64, i64 noundef 1) #7
  %66 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 1 dereferenceable(1) %65)
  %67 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZNSt5arrayIS_IcLm4EELm4EEixEm(ptr noundef nonnull align 1 dereferenceable(16) %2, i64 noundef 3) #7
  %68 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt5arrayIcLm4EEixEm(ptr noundef nonnull align 1 dereferenceable(4) %67, i64 noundef 2) #7
  %69 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 1 dereferenceable(1) %68)
  %70 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZNSt5arrayIS_IcLm4EELm4EEixEm(ptr noundef nonnull align 1 dereferenceable(16) %2, i64 noundef 3) #7
  %71 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt5arrayIcLm4EEixEm(ptr noundef nonnull align 1 dereferenceable(4) %70, i64 noundef 3) #7
  %72 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 1 dereferenceable(1) %71)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  store i32 -1, ptr %4, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #7
  store i32 -1, ptr %5, align 4, !tbaa !8
  call void @_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 4 dereferenceable(8) %3, ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %5)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #7
  store i32 0, ptr %6, align 4, !tbaa !8
  br label %75

73:                                               ; preds = %76
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #7
  store i32 -1, ptr %13, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #7
  store i32 -1, ptr %14, align 4, !tbaa !8
  call void @_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 4 dereferenceable(8) %12, ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 4 dereferenceable(4) %14)
  %74 = call noundef zeroext i1 @_ZSteqIiiEbRKSt4pairIT_T0_ES5_(ptr noundef nonnull align 4 dereferenceable(8) %3, ptr noundef nonnull align 4 dereferenceable(8) %12)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #7
  br i1 %74, label %113, label %115

75:                                               ; preds = %.preheader, %76
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #7
  store i32 0, ptr %7, align 4, !tbaa !8
  br label %80

76:                                               ; preds = %109
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #7
  %77 = load i32, ptr %6, align 4, !tbaa !8
  %78 = add nsw i32 %77, 1
  store i32 %78, ptr %6, align 4, !tbaa !8
  %79 = icmp slt i32 %77, 3
  br i1 %79, label %75, label %73, !llvm.loop !11

80:                                               ; preds = %75, %109
  %81 = load i32, ptr %6, align 4, !tbaa !8
  %82 = sext i32 %81 to i64
  %83 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZNSt5arrayIS_IcLm4EELm4EEixEm(ptr noundef nonnull align 1 dereferenceable(16) %2, i64 noundef %82) #7
  %84 = load i32, ptr %7, align 4, !tbaa !8
  %85 = sext i32 %84 to i64
  %86 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt5arrayIcLm4EEixEm(ptr noundef nonnull align 1 dereferenceable(4) %83, i64 noundef %85) #7
  %87 = load i8, ptr %86, align 1, !tbaa !13
  %88 = icmp eq i8 %87, 46
  br i1 %88, label %89, label %109

89:                                               ; preds = %80
  %90 = load i32, ptr %6, align 4, !tbaa !8
  %91 = sext i32 %90 to i64
  %92 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZNSt5arrayIS_IcLm4EELm4EEixEm(ptr noundef nonnull align 1 dereferenceable(16) %2, i64 noundef %91) #7
  %93 = load i32, ptr %7, align 4, !tbaa !8
  %94 = sext i32 %93 to i64
  %95 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt5arrayIcLm4EEixEm(ptr noundef nonnull align 1 dereferenceable(4) %92, i64 noundef %94) #7
  store i8 120, ptr %95, align 1, !tbaa !13
  %.sroa.0.0.copyload = load i64, ptr %2, align 8
  %.sroa.2.0.copyload = load i64, ptr %.sroa.2.0..sroa_idx, align 8, !tbaa !13
  %96 = call noundef i32 @_Z7minimaxiSt5arrayIS_IcLm4EELm4EE(i32 noundef 1, i64 %.sroa.0.0.copyload, i64 %.sroa.2.0.copyload)
  %97 = icmp eq i32 %96, -1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #7
  br i1 %97, label %98, label %.critedge

98:                                               ; preds = %89
  store i32 -1, ptr %9, align 4, !tbaa !8
  store i32 -1, ptr %10, align 4, !tbaa !8
  call void @_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 4 dereferenceable(8) %8, ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %10)
  %99 = call noundef zeroext i1 @_ZSteqIiiEbRKSt4pairIT_T0_ES5_(ptr noundef nonnull align 4 dereferenceable(8) %3, ptr noundef nonnull align 4 dereferenceable(8) %8)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  br i1 %99, label %100, label %102

100:                                              ; preds = %98
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #7
  call void @_ZNSt4pairIiiEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %11, ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %101 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %3, ptr noundef nonnull align 4 dereferenceable(8) %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #7
  br label %102

.critedge:                                        ; preds = %89
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  br label %102

102:                                              ; preds = %.critedge, %100, %98
  %103 = load i32, ptr %6, align 4, !tbaa !8
  %104 = sext i32 %103 to i64
  %105 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZNSt5arrayIS_IcLm4EELm4EEixEm(ptr noundef nonnull align 1 dereferenceable(16) %2, i64 noundef %104) #7
  %106 = load i32, ptr %7, align 4, !tbaa !8
  %107 = sext i32 %106 to i64
  %108 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt5arrayIcLm4EEixEm(ptr noundef nonnull align 1 dereferenceable(4) %105, i64 noundef %107) #7
  store i8 46, ptr %108, align 1, !tbaa !13
  br label %109

109:                                              ; preds = %80, %102
  %110 = load i32, ptr %7, align 4, !tbaa !8
  %111 = add nsw i32 %110, 1
  store i32 %111, ptr %7, align 4, !tbaa !8
  %112 = icmp slt i32 %110, 3
  br i1 %112, label %80, label %76, !llvm.loop !14

113:                                              ; preds = %73
  %114 = 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)
  br label %123

115:                                              ; preds = %73
  %116 = 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.2)
  %117 = load i32, ptr %3, align 4, !tbaa !15
  %118 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %116, i32 noundef %117)
  %119 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %118, ptr noundef nonnull @.str.3)
  %120 = load i32, ptr %24, align 4, !tbaa !17
  %121 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %119, i32 noundef %120)
  %122 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %121, ptr noundef nonnull @.str.4)
  br label %123

123:                                              ; preds = %115, %113
  %.sink = phi ptr [ %122, %115 ], [ %114, %113 ]
  %124 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %.sink, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #7
  %125 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 1 dereferenceable(1) %1)
  %126 = load ptr, ptr %125, align 8, !tbaa !5
  %127 = getelementptr i8, ptr %126, i64 -24
  %128 = load i64, ptr %127, align 8
  %129 = getelementptr inbounds i8, ptr %125, i64 %128
  %130 = call noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264) %129)
  %131 = load i8, ptr %1, align 1
  %132 = icmp ne i8 %131, 36
  %133 = select i1 %130, i1 %132, i1 false
  br i1 %133, label %.preheader, label %._crit_edge, !llvm.loop !18

._crit_edge:                                      ; preds = %123, %0
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %1) #7
  ret i32 0
}

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSteqIiiEbRKSt4pairIT_T0_ES5_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIiiEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #1 align 2

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

; 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 #6

; 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)) #6

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

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 = { mustprogress norecurse 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 = { inlinehint 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 #6 = { 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 #7 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!10, !10, i64 0}
!14 = distinct !{!14, !12}
!15 = !{!16, !9, i64 0}
!16 = !{!"_ZTSSt4pairIiiE", !9, i64 0, !9, i64 4}
!17 = !{!16, !9, i64 4}
!18 = distinct !{!18, !12}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass