; LLVM IR from DionysiosB/CodeForces :: 0001-0099 (78A-Haiku)

; 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::__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] }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [4 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca %"class.std::__cxx11::basic_string", align 8
  %3 = alloca i8, align 1
  %4 = alloca i64, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i64, align 8
  %8 = alloca i8, align 1
  %9 = alloca i64, align 8
  %10 = alloca i8, align 1
  %11 = alloca i64, align 8
  %12 = alloca i8, align 1
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 32, ptr %2) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %3) #6
  store i8 1, ptr %3, align 1, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  store i64 0, ptr %4, align 8, !tbaa !9
  store i64 0, ptr %4, align 8, !tbaa !9
  %13 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) %2)
          to label %14 unwind label %20

14:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  store i64 0, ptr %7, align 8, !tbaa !9
  br label %15

15:                                               ; preds = %59, %14
  %16 = load i64, ptr %7, align 8, !tbaa !9
  %17 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %2) #6
  %18 = icmp ult i64 %16, %17
  br i1 %18, label %24, label %19

19:                                               ; preds = %15
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  br label %62

20:                                               ; preds = %172, %169, %116, %66, %0
  %21 = landingpad { ptr, i32 }
          cleanup
  %22 = extractvalue { ptr, i32 } %21, 0
  store ptr %22, ptr %5, align 8
  %23 = extractvalue { ptr, i32 } %21, 1
  store i32 %23, ptr %6, align 4
  br label %177

24:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #6
  %25 = load i64, ptr %7, align 8, !tbaa !9
  %26 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %25)
          to label %27 unwind label %54

27:                                               ; preds = %24
  %28 = load i8, ptr %26, align 1, !tbaa !11
  %29 = sext i8 %28 to i32
  %30 = call i32 @tolower(i32 noundef %29) #7
  %31 = trunc i32 %30 to i8
  store i8 %31, ptr %8, align 1, !tbaa !11
  %32 = load i8, ptr %8, align 1, !tbaa !11
  %33 = sext i8 %32 to i32
  %34 = icmp eq i32 %33, 97
  br i1 %34, label %51, label %35

35:                                               ; preds = %27
  %36 = load i8, ptr %8, align 1, !tbaa !11
  %37 = sext i8 %36 to i32
  %38 = icmp eq i32 %37, 101
  br i1 %38, label %51, label %39

39:                                               ; preds = %35
  %40 = load i8, ptr %8, align 1, !tbaa !11
  %41 = sext i8 %40 to i32
  %42 = icmp eq i32 %41, 117
  br i1 %42, label %51, label %43

43:                                               ; preds = %39
  %44 = load i8, ptr %8, align 1, !tbaa !11
  %45 = sext i8 %44 to i32
  %46 = icmp eq i32 %45, 105
  br i1 %46, label %51, label %47

47:                                               ; preds = %43
  %48 = load i8, ptr %8, align 1, !tbaa !11
  %49 = sext i8 %48 to i32
  %50 = icmp eq i32 %49, 111
  br i1 %50, label %51, label %58

51:                                               ; preds = %47, %43, %39, %35, %27
  %52 = load i64, ptr %4, align 8, !tbaa !9
  %53 = add i64 %52, 1
  store i64 %53, ptr %4, align 8, !tbaa !9
  br label %58

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

58:                                               ; preds = %51, %47
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #6
  br label %59

59:                                               ; preds = %58
  %60 = load i64, ptr %7, align 8, !tbaa !9
  %61 = add i64 %60, 1
  store i64 %61, ptr %7, align 8, !tbaa !9
  br label %15, !llvm.loop !12

62:                                               ; preds = %19
  %63 = load i64, ptr %4, align 8, !tbaa !9
  %64 = icmp ne i64 %63, 5
  br i1 %64, label %65, label %66

65:                                               ; preds = %62
  store i8 0, ptr %3, align 1, !tbaa !5
  br label %66

66:                                               ; preds = %65, %62
  store i64 0, ptr %4, align 8, !tbaa !9
  %67 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) %2)
          to label %68 unwind label %20

68:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  store i64 0, ptr %9, align 8, !tbaa !9
  br label %69

69:                                               ; preds = %109, %68
  %70 = load i64, ptr %9, align 8, !tbaa !9
  %71 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %2) #6
  %72 = icmp ult i64 %70, %71
  br i1 %72, label %74, label %73

73:                                               ; preds = %69
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br label %112

74:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #6
  %75 = load i64, ptr %9, align 8, !tbaa !9
  %76 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %75)
          to label %77 unwind label %104

77:                                               ; preds = %74
  %78 = load i8, ptr %76, align 1, !tbaa !11
  %79 = sext i8 %78 to i32
  %80 = call i32 @tolower(i32 noundef %79) #7
  %81 = trunc i32 %80 to i8
  store i8 %81, ptr %10, align 1, !tbaa !11
  %82 = load i8, ptr %10, align 1, !tbaa !11
  %83 = sext i8 %82 to i32
  %84 = icmp eq i32 %83, 97
  br i1 %84, label %101, label %85

85:                                               ; preds = %77
  %86 = load i8, ptr %10, align 1, !tbaa !11
  %87 = sext i8 %86 to i32
  %88 = icmp eq i32 %87, 101
  br i1 %88, label %101, label %89

89:                                               ; preds = %85
  %90 = load i8, ptr %10, align 1, !tbaa !11
  %91 = sext i8 %90 to i32
  %92 = icmp eq i32 %91, 117
  br i1 %92, label %101, label %93

93:                                               ; preds = %89
  %94 = load i8, ptr %10, align 1, !tbaa !11
  %95 = sext i8 %94 to i32
  %96 = icmp eq i32 %95, 105
  br i1 %96, label %101, label %97

97:                                               ; preds = %93
  %98 = load i8, ptr %10, align 1, !tbaa !11
  %99 = sext i8 %98 to i32
  %100 = icmp eq i32 %99, 111
  br i1 %100, label %101, label %108

101:                                              ; preds = %97, %93, %89, %85, %77
  %102 = load i64, ptr %4, align 8, !tbaa !9
  %103 = add i64 %102, 1
  store i64 %103, ptr %4, align 8, !tbaa !9
  br label %108

104:                                              ; preds = %74
  %105 = landingpad { ptr, i32 }
          cleanup
  %106 = extractvalue { ptr, i32 } %105, 0
  store ptr %106, ptr %5, align 8
  %107 = extractvalue { ptr, i32 } %105, 1
  store i32 %107, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br label %177

108:                                              ; preds = %101, %97
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #6
  br label %109

109:                                              ; preds = %108
  %110 = load i64, ptr %9, align 8, !tbaa !9
  %111 = add i64 %110, 1
  store i64 %111, ptr %9, align 8, !tbaa !9
  br label %69, !llvm.loop !14

112:                                              ; preds = %73
  %113 = load i64, ptr %4, align 8, !tbaa !9
  %114 = icmp ne i64 %113, 7
  br i1 %114, label %115, label %116

115:                                              ; preds = %112
  store i8 0, ptr %3, align 1, !tbaa !5
  br label %116

116:                                              ; preds = %115, %112
  store i64 0, ptr %4, align 8, !tbaa !9
  %117 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) %2)
          to label %118 unwind label %20

118:                                              ; preds = %116
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  store i64 0, ptr %11, align 8, !tbaa !9
  br label %119

119:                                              ; preds = %159, %118
  %120 = load i64, ptr %11, align 8, !tbaa !9
  %121 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %2) #6
  %122 = icmp ult i64 %120, %121
  br i1 %122, label %124, label %123

123:                                              ; preds = %119
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %162

124:                                              ; preds = %119
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #6
  %125 = load i64, ptr %11, align 8, !tbaa !9
  %126 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %125)
          to label %127 unwind label %154

127:                                              ; preds = %124
  %128 = load i8, ptr %126, align 1, !tbaa !11
  %129 = sext i8 %128 to i32
  %130 = call i32 @tolower(i32 noundef %129) #7
  %131 = trunc i32 %130 to i8
  store i8 %131, ptr %12, align 1, !tbaa !11
  %132 = load i8, ptr %12, align 1, !tbaa !11
  %133 = sext i8 %132 to i32
  %134 = icmp eq i32 %133, 97
  br i1 %134, label %151, label %135

135:                                              ; preds = %127
  %136 = load i8, ptr %12, align 1, !tbaa !11
  %137 = sext i8 %136 to i32
  %138 = icmp eq i32 %137, 101
  br i1 %138, label %151, label %139

139:                                              ; preds = %135
  %140 = load i8, ptr %12, align 1, !tbaa !11
  %141 = sext i8 %140 to i32
  %142 = icmp eq i32 %141, 117
  br i1 %142, label %151, label %143

143:                                              ; preds = %139
  %144 = load i8, ptr %12, align 1, !tbaa !11
  %145 = sext i8 %144 to i32
  %146 = icmp eq i32 %145, 105
  br i1 %146, label %151, label %147

147:                                              ; preds = %143
  %148 = load i8, ptr %12, align 1, !tbaa !11
  %149 = sext i8 %148 to i32
  %150 = icmp eq i32 %149, 111
  br i1 %150, label %151, label %158

151:                                              ; preds = %147, %143, %139, %135, %127
  %152 = load i64, ptr %4, align 8, !tbaa !9
  %153 = add i64 %152, 1
  store i64 %153, ptr %4, align 8, !tbaa !9
  br label %158

154:                                              ; preds = %124
  %155 = landingpad { ptr, i32 }
          cleanup
  %156 = extractvalue { ptr, i32 } %155, 0
  store ptr %156, ptr %5, align 8
  %157 = extractvalue { ptr, i32 } %155, 1
  store i32 %157, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %177

158:                                              ; preds = %151, %147
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #6
  br label %159

159:                                              ; preds = %158
  %160 = load i64, ptr %11, align 8, !tbaa !9
  %161 = add i64 %160, 1
  store i64 %161, ptr %11, align 8, !tbaa !9
  br label %119, !llvm.loop !15

162:                                              ; preds = %123
  %163 = load i64, ptr %4, align 8, !tbaa !9
  %164 = icmp ne i64 %163, 5
  br i1 %164, label %165, label %166

165:                                              ; preds = %162
  store i8 0, ptr %3, align 1, !tbaa !5
  br label %166

166:                                              ; preds = %165, %162
  %167 = load i8, ptr %3, align 1, !tbaa !5, !range !16, !noundef !17
  %168 = trunc i8 %167 to i1
  br i1 %168, label %169, label %172

169:                                              ; preds = %166
  %170 = invoke i32 @puts(ptr noundef @.str)
          to label %171 unwind label %20

171:                                              ; preds = %169
  br label %175

172:                                              ; preds = %166
  %173 = invoke i32 @puts(ptr noundef @.str.1)
          to label %174 unwind label %20

174:                                              ; preds = %172
  br label %175

175:                                              ; preds = %174, %171
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %2) #6
  %176 = load i32, ptr %1, align 4
  ret i32 %176

177:                                              ; preds = %154, %104, %54, %20
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %2) #6
  br label %178

178:                                              ; preds = %177
  %179 = load ptr, ptr %5, align 8
  %180 = load i32, ptr %6, align 4
  %181 = insertvalue { ptr, i32 } poison, ptr %179, 0
  %182 = insertvalue { ptr, i32 } %181, i32 %180, 1
  resume { ptr, i32 } %182
}

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32)) #2 align 2

; Function Attrs: nounwind willreturn memory(read)
declare i32 @tolower(i32 noundef) #4

; Function Attrs: mustprogress nounwind uwtable
declare noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) #2 align 2

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

declare i32 @puts(ptr noundef) #5

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

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

!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 = !{!"bool", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = distinct !{!15, !13}
!16 = !{i8 0, i8 2}
!17 = !{}


; 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::__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] }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [4 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::__cxx11::basic_string", align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %1) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #6
  %2 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) %1)
          to label %.preheader83 unwind label %7

.preheader83:                                     ; preds = %0
  %3 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #6
  %.not96 = icmp eq i64 %3, 0
  br i1 %.not96, label %._crit_edge, label %.lr.ph

._crit_edge.loopexit:                             ; preds = %.lr.ph
  %4 = icmp eq i64 %spec.select, 5
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader83
  %.070.lcssa = phi i1 [ false, %.preheader83 ], [ %4, %._crit_edge.loopexit ]
  %5 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) %1)
          to label %.preheader82 unwind label %7

.preheader82:                                     ; preds = %._crit_edge
  %6 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #6
  %.not97 = icmp eq i64 %6, 0
  br i1 %.not97, label %._crit_edge89, label %.lr.ph88

7:                                                ; preds = %._crit_edge89, %._crit_edge, %0
  %8 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %1) #6
  resume { ptr, i32 } %8

.lr.ph:                                           ; preds = %.preheader83, %.lr.ph
  %.07085 = phi i64 [ %spec.select, %.lr.ph ], [ 0, %.preheader83 ]
  %.07384 = phi i64 [ %18, %.lr.ph ], [ 0, %.preheader83 ]
  %9 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %.07384)
  %10 = load i8, ptr %9, align 1, !tbaa !5
  %11 = sext i8 %10 to i32
  %12 = call i32 @tolower(i32 noundef %11) #7
  %sext77 = shl i32 %12, 24
  %13 = and i32 %12, 251
  %or.cond = icmp eq i32 %13, 97
  %14 = icmp eq i32 %sext77, 1962934272
  %or.cond5 = or i1 %or.cond, %14
  %15 = icmp eq i32 %sext77, 1761607680
  %or.cond8 = or i1 %15, %or.cond5
  %16 = icmp eq i32 %sext77, 1862270976
  %or.cond11 = or i1 %16, %or.cond8
  %17 = zext i1 %or.cond11 to i64
  %spec.select = add i64 %.07085, %17
  %18 = add nuw i64 %.07384, 1
  %19 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #6
  %20 = icmp ult i64 %18, %19
  br i1 %20, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !8

._crit_edge89.loopexit:                           ; preds = %.lr.ph88
  %21 = icmp eq i64 %spec.select79, 7
  br label %._crit_edge89

._crit_edge89:                                    ; preds = %._crit_edge89.loopexit, %.preheader82
  %.272.lcssa = phi i1 [ false, %.preheader82 ], [ %21, %._crit_edge89.loopexit ]
  %22 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) %1)
          to label %.preheader unwind label %7

.preheader:                                       ; preds = %._crit_edge89
  %23 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #6
  %.not98 = icmp eq i64 %23, 0
  br i1 %.not98, label %._crit_edge94.thread, label %.lr.ph93

.lr.ph88:                                         ; preds = %.preheader82, %.lr.ph88
  %.06987 = phi i64 [ %33, %.lr.ph88 ], [ 0, %.preheader82 ]
  %.27286 = phi i64 [ %spec.select79, %.lr.ph88 ], [ 0, %.preheader82 ]
  %24 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %.06987)
  %25 = load i8, ptr %24, align 1, !tbaa !5
  %26 = sext i8 %25 to i32
  %27 = call i32 @tolower(i32 noundef %26) #7
  %sext76 = shl i32 %27, 24
  %28 = and i32 %27, 251
  %or.cond14 = icmp eq i32 %28, 97
  %29 = icmp eq i32 %sext76, 1962934272
  %or.cond17 = or i1 %or.cond14, %29
  %30 = icmp eq i32 %sext76, 1761607680
  %or.cond20 = or i1 %30, %or.cond17
  %31 = icmp eq i32 %sext76, 1862270976
  %or.cond23 = or i1 %31, %or.cond20
  %32 = zext i1 %or.cond23 to i64
  %spec.select79 = add i64 %.27286, %32
  %33 = add nuw i64 %.06987, 1
  %34 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #6
  %35 = icmp ult i64 %33, %34
  br i1 %35, label %.lr.ph88, label %._crit_edge89.loopexit, !llvm.loop !10

._crit_edge94:                                    ; preds = %.lr.ph93
  %36 = icmp eq i64 %spec.select81, 5
  %37 = select i1 %36, i1 %.272.lcssa, i1 false
  %38 = select i1 %37, i1 %.070.lcssa, i1 false
  br i1 %38, label %51, label %._crit_edge94.thread

.lr.ph93:                                         ; preds = %.preheader, %.lr.ph93
  %.092 = phi i64 [ %48, %.lr.ph93 ], [ 0, %.preheader ]
  %.491 = phi i64 [ %spec.select81, %.lr.ph93 ], [ 0, %.preheader ]
  %39 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %.092)
  %40 = load i8, ptr %39, align 1, !tbaa !5
  %41 = sext i8 %40 to i32
  %42 = call i32 @tolower(i32 noundef %41) #7
  %sext = shl i32 %42, 24
  %43 = and i32 %42, 251
  %or.cond26 = icmp eq i32 %43, 97
  %44 = icmp eq i32 %sext, 1962934272
  %or.cond29 = or i1 %or.cond26, %44
  %45 = icmp eq i32 %sext, 1761607680
  %or.cond32 = or i1 %45, %or.cond29
  %46 = icmp eq i32 %sext, 1862270976
  %or.cond35 = or i1 %46, %or.cond32
  %47 = zext i1 %or.cond35 to i64
  %spec.select81 = add i64 %.491, %47
  %48 = add nuw i64 %.092, 1
  %49 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #6
  %50 = icmp ult i64 %48, %49
  br i1 %50, label %.lr.ph93, label %._crit_edge94, !llvm.loop !11

._crit_edge94.thread:                             ; preds = %.preheader, %._crit_edge94
  br label %51

51:                                               ; preds = %._crit_edge94, %._crit_edge94.thread
  %.str.1.sink = phi ptr [ @.str.1, %._crit_edge94.thread ], [ @.str, %._crit_edge94 ]
  %52 = call i32 @puts(ptr noundef nonnull dereferenceable(1) %.str.1.sink)
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %1) #6
  ret i32 0
}

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nofree nounwind willreturn memory(read)
declare i32 @tolower(i32 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) local_unnamed_addr #2 align 2

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

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

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #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 = { mustprogress nofree nounwind willreturn memory(read) "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 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }
attributes #7 = { nounwind willreturn memory(read) }

!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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = distinct !{!8, !9}
!9 = !{!"llvm.loop.mustprogress"}
!10 = distinct !{!10, !9}
!11 = distinct !{!11, !9}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass