; LLVM IR from Tunghohin/Competitive_Coding :: Daimayuan (250)

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

@val = external dso_local global [30 x i32], align 16
@dp = external dso_local global [1048576 x i32], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %10 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %11 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %12 = getelementptr i8, ptr %11, i64 -24
  %13 = load i64, ptr %12, align 8
  %14 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %13
  %15 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %14, ptr noundef null)
  %16 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %17 = getelementptr i8, ptr %16, i64 -24
  %18 = load i64, ptr %17, align 8
  %19 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %18
  %20 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %19, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  %21 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 1, ptr %3, align 4, !tbaa !8
  br label %22

22:                                               ; preds = %32, %0
  %23 = load i32, ptr %3, align 4, !tbaa !8
  %24 = load i32, ptr %2, align 4, !tbaa !8
  %25 = icmp sle i32 %23, %24
  br i1 %25, label %27, label %26

26:                                               ; preds = %22
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  br label %35

27:                                               ; preds = %22
  %28 = load i32, ptr %3, align 4, !tbaa !8
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [30 x i32], ptr @val, i64 0, i64 %29
  %31 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %30)
  br label %32

32:                                               ; preds = %27
  %33 = load i32, ptr %3, align 4, !tbaa !8
  %34 = add nsw i32 %33, 1
  store i32 %34, ptr %3, align 4, !tbaa !8
  br label %22, !llvm.loop !11

35:                                               ; preds = %26
  call void @llvm.memset.p0.i64(ptr align 16 @dp, i8 63, i64 4194304, i1 false)
  store i32 0, ptr @dp, align 16, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  store i32 0, ptr %4, align 4, !tbaa !8
  br label %36

36:                                               ; preds = %145, %35
  %37 = load i32, ptr %4, align 4, !tbaa !8
  %38 = load i32, ptr %2, align 4, !tbaa !8
  %39 = shl i32 1, %38
  %40 = icmp slt i32 %37, %39
  br i1 %40, label %42, label %41

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

42:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 1, ptr %6, align 4, !tbaa !8
  br label %43

43:                                               ; preds = %140, %42
  %44 = load i32, ptr %6, align 4, !tbaa !8
  %45 = load i32, ptr %2, align 4, !tbaa !8
  %46 = icmp sle i32 %44, %45
  br i1 %46, label %48, label %47

47:                                               ; preds = %43
  store i32 8, ptr %5, align 4
  br label %143

48:                                               ; preds = %43
  %49 = load i32, ptr %4, align 4, !tbaa !8
  %50 = load i32, ptr %6, align 4, !tbaa !8
  %51 = sub nsw i32 %50, 1
  %52 = shl i32 1, %51
  %53 = and i32 %49, %52
  %54 = icmp ne i32 %53, 0
  br i1 %54, label %139, label %55

55:                                               ; preds = %48
  %56 = load i32, ptr %4, align 4, !tbaa !8
  %57 = load i32, ptr %6, align 4, !tbaa !8
  %58 = sub nsw i32 %57, 1
  %59 = shl i32 1, %58
  %60 = add nsw i32 %56, %59
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [1048576 x i32], ptr @dp, i64 0, i64 %61
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  %63 = load i32, ptr %4, align 4, !tbaa !8
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [1048576 x i32], ptr @dp, i64 0, i64 %64
  %66 = load i32, ptr %65, align 4, !tbaa !8
  %67 = load i32, ptr %6, align 4, !tbaa !8
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [30 x i32], ptr @val, i64 0, i64 %68
  %70 = load i32, ptr %69, align 4, !tbaa !8
  %71 = add nsw i32 %66, %70
  store i32 %71, ptr %7, align 4, !tbaa !8
  %72 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %62, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %73 = load i32, ptr %72, align 4, !tbaa !8
  %74 = load i32, ptr %4, align 4, !tbaa !8
  %75 = load i32, ptr %6, align 4, !tbaa !8
  %76 = sub nsw i32 %75, 1
  %77 = shl i32 1, %76
  %78 = add nsw i32 %74, %77
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds [1048576 x i32], ptr @dp, i64 0, i64 %79
  store i32 %73, ptr %80, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %81 = load i32, ptr %6, align 4, !tbaa !8
  %82 = add nsw i32 %81, 1
  store i32 %82, ptr %8, align 4, !tbaa !8
  br label %83

83:                                               ; preds = %135, %55
  %84 = load i32, ptr %8, align 4, !tbaa !8
  %85 = load i32, ptr %2, align 4, !tbaa !8
  %86 = icmp sle i32 %84, %85
  br i1 %86, label %88, label %87

87:                                               ; preds = %83
  store i32 11, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %138

88:                                               ; preds = %83
  %89 = load i32, ptr %4, align 4, !tbaa !8
  %90 = load i32, ptr %8, align 4, !tbaa !8
  %91 = sub nsw i32 %90, 1
  %92 = shl i32 1, %91
  %93 = and i32 %89, %92
  %94 = icmp ne i32 %93, 0
  br i1 %94, label %134, label %95

95:                                               ; preds = %88
  %96 = load i32, ptr %4, align 4, !tbaa !8
  %97 = load i32, ptr %6, align 4, !tbaa !8
  %98 = sub nsw i32 %97, 1
  %99 = shl i32 1, %98
  %100 = add nsw i32 %96, %99
  %101 = load i32, ptr %8, align 4, !tbaa !8
  %102 = sub nsw i32 %101, 1
  %103 = shl i32 1, %102
  %104 = add nsw i32 %100, %103
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [1048576 x i32], ptr @dp, i64 0, i64 %105
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %107 = load i32, ptr %4, align 4, !tbaa !8
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [1048576 x i32], ptr @dp, i64 0, i64 %108
  %110 = load i32, ptr %109, align 4, !tbaa !8
  %111 = load i32, ptr %6, align 4, !tbaa !8
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds [30 x i32], ptr @val, i64 0, i64 %112
  %114 = load i32, ptr %113, align 4, !tbaa !8
  %115 = load i32, ptr %8, align 4, !tbaa !8
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds [30 x i32], ptr @val, i64 0, i64 %116
  %118 = load i32, ptr %117, align 4, !tbaa !8
  %119 = xor i32 %114, %118
  %120 = add nsw i32 %110, %119
  store i32 %120, ptr %9, align 4, !tbaa !8
  %121 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %106, ptr noundef nonnull align 4 dereferenceable(4) %9)
  %122 = load i32, ptr %121, align 4, !tbaa !8
  %123 = load i32, ptr %4, align 4, !tbaa !8
  %124 = load i32, ptr %6, align 4, !tbaa !8
  %125 = sub nsw i32 %124, 1
  %126 = shl i32 1, %125
  %127 = add nsw i32 %123, %126
  %128 = load i32, ptr %8, align 4, !tbaa !8
  %129 = sub nsw i32 %128, 1
  %130 = shl i32 1, %129
  %131 = add nsw i32 %127, %130
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds [1048576 x i32], ptr @dp, i64 0, i64 %132
  store i32 %122, ptr %133, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %134

134:                                              ; preds = %95, %88
  br label %135

135:                                              ; preds = %134
  %136 = load i32, ptr %8, align 4, !tbaa !8
  %137 = add nsw i32 %136, 1
  store i32 %137, ptr %8, align 4, !tbaa !8
  br label %83, !llvm.loop !13

138:                                              ; preds = %87
  store i32 8, ptr %5, align 4
  br label %143

139:                                              ; preds = %48
  br label %140

140:                                              ; preds = %139
  %141 = load i32, ptr %6, align 4, !tbaa !8
  %142 = add nsw i32 %141, 1
  store i32 %142, ptr %6, align 4, !tbaa !8
  br label %43, !llvm.loop !14

143:                                              ; preds = %138, %47
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %144

144:                                              ; preds = %143
  br label %145

145:                                              ; preds = %144
  %146 = load i32, ptr %4, align 4, !tbaa !8
  %147 = add nsw i32 %146, 1
  store i32 %147, ptr %4, align 4, !tbaa !8
  br label %36, !llvm.loop !15

148:                                              ; preds = %41
  %149 = load i32, ptr %2, align 4, !tbaa !8
  %150 = shl i32 1, %149
  %151 = sub nsw i32 %150, 1
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds [1048576 x i32], ptr @dp, i64 0, i64 %152
  %154 = load i32, ptr %153, align 4, !tbaa !8
  %155 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %154)
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  %156 = load i32, ptr %1, align 4
  ret i32 %156
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) #1

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #5

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

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 = { "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 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = { 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 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}


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

@val = external dso_local global [30 x i32], align 16
@dp = external dso_local global [1048576 x i32], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %5 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %6 = getelementptr i8, ptr %5, i64 -24
  %7 = load i64, ptr %6, align 8
  %8 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %7
  %9 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %8, ptr noundef null)
  %10 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %11 = getelementptr i8, ptr %10, i64 -24
  %12 = load i64, ptr %11, align 8
  %13 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %12
  %14 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %13, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  %15 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %16 = load i32, ptr %1, align 4, !tbaa !8
  %.not41 = icmp slt i32 %16, 1
  br i1 %.not41, label %._crit_edge.thread, label %.lr.ph

._crit_edge.thread:                               ; preds = %0
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(4194304) @dp, i8 63, i64 4194304, i1 false)
  store i32 0, ptr @dp, align 16, !tbaa !8
  br label %.preheader.preheader

._crit_edge:                                      ; preds = %.lr.ph
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(4194304) @dp, i8 63, i64 4194304, i1 false)
  store i32 0, ptr @dp, align 16, !tbaa !8
  %.not = icmp eq i32 %19, 31
  br i1 %.not, label %._crit_edge54, label %.preheader.preheader

.preheader.preheader:                             ; preds = %._crit_edge.thread, %._crit_edge
  %.ph = phi i32 [ %19, %._crit_edge ], [ %16, %._crit_edge.thread ]
  br label %.preheader

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %0 ]
  %17 = getelementptr inbounds [30 x i32], ptr @val, i64 0, i64 %indvars.iv
  %18 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %17)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %19 = load i32, ptr %1, align 4, !tbaa !8
  %20 = sext i32 %19 to i64
  %.not.not = icmp slt i64 %indvars.iv, %20
  br i1 %.not.not, label %.lr.ph, label %._crit_edge, !llvm.loop !11

.preheader:                                       ; preds = %.preheader.preheader, %.loopexit
  %21 = phi i32 [ %65, %.loopexit ], [ %.ph, %.preheader.preheader ]
  %indvars.iv66 = phi i64 [ %indvars.iv.next67, %.loopexit ], [ 0, %.preheader.preheader ]
  %.not3443 = icmp slt i32 %21, 1
  br i1 %.not3443, label %.loopexit, label %.lr.ph45.preheader

.lr.ph45.preheader:                               ; preds = %.preheader
  %22 = trunc nuw nsw i64 %indvars.iv66 to i32
  br label %.lr.ph45

._crit_edge54.loopexit:                           ; preds = %.loopexit
  %23 = add nsw i32 %66, -1
  %24 = sext i32 %23 to i64
  br label %._crit_edge54

._crit_edge54:                                    ; preds = %._crit_edge54.loopexit, %._crit_edge
  %.lcssa40 = phi i64 [ 2147483647, %._crit_edge ], [ %24, %._crit_edge54.loopexit ]
  %25 = getelementptr inbounds [1048576 x i32], ptr @dp, i64 0, i64 %.lcssa40
  %26 = load i32, ptr %25, align 4, !tbaa !8
  %27 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %26)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  ret i32 0

.lr.ph45:                                         ; preds = %.lr.ph45.preheader, %63
  %indvars.iv60 = phi i64 [ 1, %.lr.ph45.preheader ], [ %indvars.iv.next61, %63 ]
  %.03044 = phi i32 [ 1, %.lr.ph45.preheader ], [ %64, %63 ]
  %28 = add nsw i32 %.03044, -1
  %29 = shl nuw i32 1, %28
  %30 = and i32 %29, %22
  %.not35 = icmp eq i32 %30, 0
  br i1 %.not35, label %31, label %63

31:                                               ; preds = %.lr.ph45
  %32 = add nuw nsw i32 %29, %22
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds [1048576 x i32], ptr @dp, i64 0, i64 %33
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  %35 = getelementptr inbounds [1048576 x i32], ptr @dp, i64 0, i64 %indvars.iv66
  %36 = load i32, ptr %35, align 4, !tbaa !8
  %37 = zext nneg i32 %.03044 to i64
  %38 = getelementptr inbounds [30 x i32], ptr @val, i64 0, i64 %37
  %39 = load i32, ptr %38, align 4, !tbaa !8
  %40 = add nsw i32 %39, %36
  store i32 %40, ptr %2, align 4, !tbaa !8
  %41 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %34, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %42 = load i32, ptr %41, align 4, !tbaa !8
  store i32 %42, ptr %34, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  %43 = load i32, ptr %1, align 4, !tbaa !8
  %.not36.not47 = icmp slt i32 %.03044, %43
  br i1 %.not36.not47, label %.lr.ph51, label %.loopexit

.lr.ph51:                                         ; preds = %31, %60
  %44 = phi i32 [ %61, %60 ], [ %43, %31 ]
  %indvars.iv63 = phi i64 [ %indvars.iv.next64, %60 ], [ %indvars.iv60, %31 ]
  %indvars.iv.next64 = add nuw nsw i64 %indvars.iv63, 1
  %45 = trunc nuw nsw i64 %indvars.iv63 to i32
  %46 = shl nuw i32 1, %45
  %47 = and i32 %46, %22
  %.not37 = icmp eq i32 %47, 0
  br i1 %.not37, label %48, label %60

48:                                               ; preds = %.lr.ph51
  %49 = add nsw i32 %46, %32
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [1048576 x i32], ptr @dp, i64 0, i64 %50
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  %52 = load i32, ptr %35, align 4, !tbaa !8
  %53 = load i32, ptr %38, align 4, !tbaa !8
  %54 = getelementptr inbounds [30 x i32], ptr @val, i64 0, i64 %indvars.iv.next64
  %55 = load i32, ptr %54, align 4, !tbaa !8
  %56 = xor i32 %55, %53
  %57 = add nsw i32 %56, %52
  store i32 %57, ptr %3, align 4, !tbaa !8
  %58 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %51, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %59 = load i32, ptr %58, align 4, !tbaa !8
  store i32 %59, ptr %51, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  %.pre = load i32, ptr %1, align 4, !tbaa !8
  br label %60

60:                                               ; preds = %.lr.ph51, %48
  %61 = phi i32 [ %44, %.lr.ph51 ], [ %.pre, %48 ]
  %62 = trunc nuw i64 %indvars.iv.next64 to i32
  %.not36.not = icmp sgt i32 %61, %62
  br i1 %.not36.not, label %.lr.ph51, label %.loopexit, !llvm.loop !13

63:                                               ; preds = %.lr.ph45
  %64 = add nuw i32 %.03044, 1
  %exitcond.not = icmp eq i32 %.03044, %21
  %indvars.iv.next61 = add nuw nsw i64 %indvars.iv60, 1
  br i1 %exitcond.not, label %.loopexit, label %.lr.ph45, !llvm.loop !14

.loopexit:                                        ; preds = %63, %60, %.preheader, %31
  %65 = phi i32 [ %21, %.preheader ], [ %43, %31 ], [ %61, %60 ], [ %21, %63 ]
  %indvars.iv.next67 = add nuw nsw i64 %indvars.iv66, 1
  %66 = shl nuw i32 1, %65
  %67 = sext i32 %66 to i64
  %68 = icmp slt i64 %indvars.iv.next67, %67
  br i1 %68, label %.preheader, label %._crit_edge54.loopexit, !llvm.loop !15
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) local_unnamed_addr #1

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

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

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

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

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

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

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

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 = { "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 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
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 = { 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 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}


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