; LLVM IR from upupming/algorithm :: acwing/日常刷题/快速幂/3226. 矩阵-bitset.ll (Z3mulPSt6bitsetILm1010EES1_S1_)

; 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::bitset" = type { %"struct.std::_Base_bitset" }
%"struct.std::_Base_bitset" = type { [16 x i64] }
%"class.std::bitset<1010>::reference" = type { ptr, i64 }

@m = external dso_local global i32, align 4
@b_T = external dso_local global [1010 x %"class.std::bitset"], align 16
@temp = external dso_local global [1010 x %"class.std::bitset"], align 16

; 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 @_ZNSt6bitsetILm1010EEixEm(ptr dead_on_unwind noalias writable sret(%"class.std::bitset<1010>::reference") align 8, ptr noundef nonnull align 8 dereferenceable(128), i64 noundef) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt6bitsetILm1010EE9referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16)) #1 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6bitsetILm1010EE9referenceD2Ev(ptr noundef nonnull align 8 dereferenceable(16)) 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: mustprogress uwtable
define dso_local void @_Z3mulPSt6bitsetILm1010EES1_S1_(ptr noundef %0, ptr noundef %1, ptr noundef %2) #2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca %"class.std::bitset", align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %"class.std::bitset<1010>::reference", align 8
  %13 = alloca %"class.std::bitset<1010>::reference", align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca %"class.std::bitset", align 8
  %19 = alloca %"class.std::bitset<1010>::reference", align 8
  %20 = alloca %"class.std::bitset<1010>::reference", align 8
  %21 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %22

22:                                               ; preds = %31, %3
  %23 = load i32, ptr %7, align 4, !tbaa !9
  %24 = load i32, ptr @m, align 4, !tbaa !9
  %25 = icmp slt i32 %23, %24
  br i1 %25, label %27, label %26

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

27:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 128, ptr %8) #5
  call void @_ZNSt6bitsetILm1010EEC2Ey(ptr noundef nonnull align 8 dereferenceable(128) %8, i64 noundef 0) #5
  %28 = load i32, ptr %7, align 4, !tbaa !9
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [1010 x %"class.std::bitset"], ptr @temp, i64 0, i64 %29
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %30, ptr align 8 %8, i64 128, i1 false)
  call void @llvm.lifetime.end.p0(i64 128, ptr %8) #5
  br label %31

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

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

35:                                               ; preds = %68, %34
  %36 = load i32, ptr %9, align 4, !tbaa !9
  %37 = load i32, ptr @m, align 4, !tbaa !9
  %38 = icmp slt i32 %36, %37
  br i1 %38, label %40, label %39

39:                                               ; preds = %35
  store i32 5, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %71

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

41:                                               ; preds = %60, %40
  %42 = load i32, ptr %11, align 4, !tbaa !9
  %43 = load i32, ptr @m, align 4, !tbaa !9
  %44 = icmp slt i32 %42, %43
  br i1 %44, label %46, label %45

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

46:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #5
  %47 = load ptr, ptr %5, align 8, !tbaa !5
  %48 = load i32, ptr %9, align 4, !tbaa !9
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds %"class.std::bitset", ptr %47, i64 %49
  %51 = load i32, ptr %11, align 4, !tbaa !9
  %52 = sext i32 %51 to i64
  call void @_ZNSt6bitsetILm1010EEixEm(ptr dead_on_unwind writable sret(%"class.std::bitset<1010>::reference") align 8 %12, ptr noundef nonnull align 8 dereferenceable(128) %50, i64 noundef %52)
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #5
  %53 = load i32, ptr %11, align 4, !tbaa !9
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [1010 x %"class.std::bitset"], ptr @b_T, i64 0, i64 %54
  %56 = load i32, ptr %9, align 4, !tbaa !9
  %57 = sext i32 %56 to i64
  invoke void @_ZNSt6bitsetILm1010EEixEm(ptr dead_on_unwind writable sret(%"class.std::bitset<1010>::reference") align 8 %13, ptr noundef nonnull align 8 dereferenceable(128) %55, i64 noundef %57)
          to label %58 unwind label %63

58:                                               ; preds = %46
  %59 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6bitsetILm1010EE9referenceaSERKS1_(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 8 dereferenceable(16) %12) #5
  call void @_ZNSt6bitsetILm1010EE9referenceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %13) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #5
  call void @_ZNSt6bitsetILm1010EE9referenceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #5
  br label %60

60:                                               ; preds = %58
  %61 = load i32, ptr %11, align 4, !tbaa !9
  %62 = add nsw i32 %61, 1
  store i32 %62, ptr %11, align 4, !tbaa !9
  br label %41, !llvm.loop !13

63:                                               ; preds = %46
  %64 = landingpad { ptr, i32 }
          cleanup
  %65 = extractvalue { ptr, i32 } %64, 0
  store ptr %65, ptr %14, align 8
  %66 = extractvalue { ptr, i32 } %64, 1
  store i32 %66, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #5
  call void @_ZNSt6bitsetILm1010EE9referenceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %138

67:                                               ; preds = %45
  br label %68

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

71:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  store i32 0, ptr %16, align 4, !tbaa !9
  br label %72

72:                                               ; preds = %117, %71
  %73 = load i32, ptr %16, align 4, !tbaa !9
  %74 = load i32, ptr @m, align 4, !tbaa !9
  %75 = icmp slt i32 %73, %74
  br i1 %75, label %77, label %76

76:                                               ; preds = %72
  store i32 11, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  br label %120

77:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  store i32 0, ptr %17, align 4, !tbaa !9
  br label %78

78:                                               ; preds = %109, %77
  %79 = load i32, ptr %17, align 4, !tbaa !9
  %80 = load i32, ptr @m, align 4, !tbaa !9
  %81 = icmp slt i32 %79, %80
  br i1 %81, label %83, label %82

82:                                               ; preds = %78
  store i32 14, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  br label %116

83:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 128, ptr %18) #5
  %84 = load ptr, ptr %4, align 8, !tbaa !5
  %85 = load i32, ptr %16, align 4, !tbaa !9
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds %"class.std::bitset", ptr %84, i64 %86
  %88 = load i32, ptr %17, align 4, !tbaa !9
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds [1010 x %"class.std::bitset"], ptr @b_T, i64 0, i64 %89
  call void @_ZStanILm1010EESt6bitsetIXT_EERKS1_S3_(ptr dead_on_unwind writable sret(%"class.std::bitset") align 8 %18, ptr noundef nonnull align 8 dereferenceable(128) %87, ptr noundef nonnull align 8 dereferenceable(128) %90) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #5
  %91 = load i32, ptr %16, align 4, !tbaa !9
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [1010 x %"class.std::bitset"], ptr @temp, i64 0, i64 %92
  %94 = load i32, ptr %17, align 4, !tbaa !9
  %95 = sext i32 %94 to i64
  call void @_ZNSt6bitsetILm1010EEixEm(ptr dead_on_unwind writable sret(%"class.std::bitset<1010>::reference") align 8 %19, ptr noundef nonnull align 8 dereferenceable(128) %93, i64 noundef %95)
  %96 = call noundef zeroext i1 @_ZNKSt6bitsetILm1010EE9referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %19) #5
  %97 = zext i1 %96 to i64
  %98 = call noundef i64 @_ZNKSt6bitsetILm1010EE5countEv(ptr noundef nonnull align 8 dereferenceable(128) %18) #5
  %99 = and i64 %98, 1
  %100 = xor i64 %97, %99
  %101 = icmp ne i64 %100, 0
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #5
  %102 = load i32, ptr %16, align 4, !tbaa !9
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [1010 x %"class.std::bitset"], ptr @temp, i64 0, i64 %103
  %105 = load i32, ptr %17, align 4, !tbaa !9
  %106 = sext i32 %105 to i64
  invoke void @_ZNSt6bitsetILm1010EEixEm(ptr dead_on_unwind writable sret(%"class.std::bitset<1010>::reference") align 8 %20, ptr noundef nonnull align 8 dereferenceable(128) %104, i64 noundef %106)
          to label %107 unwind label %112

107:                                              ; preds = %83
  %108 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6bitsetILm1010EE9referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %20, i1 noundef zeroext %101) #5
  call void @_ZNSt6bitsetILm1010EE9referenceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %20) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #5
  call void @_ZNSt6bitsetILm1010EE9referenceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %19) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 128, ptr %18) #5
  br label %109

109:                                              ; preds = %107
  %110 = load i32, ptr %17, align 4, !tbaa !9
  %111 = add nsw i32 %110, 1
  store i32 %111, ptr %17, align 4, !tbaa !9
  br label %78, !llvm.loop !15

112:                                              ; preds = %83
  %113 = landingpad { ptr, i32 }
          cleanup
  %114 = extractvalue { ptr, i32 } %113, 0
  store ptr %114, ptr %14, align 8
  %115 = extractvalue { ptr, i32 } %113, 1
  store i32 %115, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #5
  call void @_ZNSt6bitsetILm1010EE9referenceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %19) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 128, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  br label %138

116:                                              ; preds = %82
  br label %117

117:                                              ; preds = %116
  %118 = load i32, ptr %16, align 4, !tbaa !9
  %119 = add nsw i32 %118, 1
  store i32 %119, ptr %16, align 4, !tbaa !9
  br label %72, !llvm.loop !16

120:                                              ; preds = %76
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  store i32 0, ptr %21, align 4, !tbaa !9
  br label %121

121:                                              ; preds = %134, %120
  %122 = load i32, ptr %21, align 4, !tbaa !9
  %123 = load i32, ptr @m, align 4, !tbaa !9
  %124 = icmp slt i32 %122, %123
  br i1 %124, label %126, label %125

125:                                              ; preds = %121
  store i32 17, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  br label %137

126:                                              ; preds = %121
  %127 = load i32, ptr %21, align 4, !tbaa !9
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds [1010 x %"class.std::bitset"], ptr @temp, i64 0, i64 %128
  %130 = load ptr, ptr %6, align 8, !tbaa !5
  %131 = load i32, ptr %21, align 4, !tbaa !9
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds %"class.std::bitset", ptr %130, i64 %132
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %133, ptr align 16 %129, i64 128, i1 false)
  br label %134

134:                                              ; preds = %126
  %135 = load i32, ptr %21, align 4, !tbaa !9
  %136 = add nsw i32 %135, 1
  store i32 %136, ptr %21, align 4, !tbaa !9
  br label %121, !llvm.loop !17

137:                                              ; preds = %125
  ret void

138:                                              ; preds = %112, %63
  %139 = load ptr, ptr %14, align 8
  %140 = load i32, ptr %15, align 4
  %141 = insertvalue { ptr, i32 } poison, ptr %139, 0
  %142 = insertvalue { ptr, i32 } %141, i32 %140, 1
  resume { ptr, i32 } %142
}

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZStanILm1010EESt6bitsetIXT_EERKS1_S3_(ptr dead_on_unwind noalias writable sret(%"class.std::bitset") align 8, ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 8 dereferenceable(128)) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6bitsetILm1010EE5countEv(ptr noundef nonnull align 8 dereferenceable(128)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6bitsetILm1010EE9referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16), i1 noundef zeroext) #1 align 2

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !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::bitset" = type { %"struct.std::_Base_bitset" }
%"struct.std::_Base_bitset" = type { [16 x i64] }
%"class.std::bitset<1010>::reference" = type { ptr, i64 }

@m = external dso_local local_unnamed_addr global i32, align 4
@b_T = external dso_local global [1010 x %"class.std::bitset"], align 16
@temp = external dso_local global [1010 x %"class.std::bitset"], align 16

; 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 @_ZNSt6bitsetILm1010EEixEm(ptr dead_on_unwind noalias writable sret(%"class.std::bitset<1010>::reference") align 8, ptr noundef nonnull align 8 dereferenceable(128), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt6bitsetILm1010EE9referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6bitsetILm1010EE9referenceD2Ev(ptr noundef nonnull align 8 dereferenceable(16)) 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
define dso_local void @_Z3mulPSt6bitsetILm1010EES1_S1_(ptr noundef %0, ptr noundef %1, ptr nocapture noundef writeonly %2) local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.std::bitset", align 8
  %5 = alloca %"class.std::bitset<1010>::reference", align 8
  %6 = alloca %"class.std::bitset<1010>::reference", align 8
  %7 = alloca %"class.std::bitset", align 8
  %8 = alloca %"class.std::bitset<1010>::reference", align 8
  %9 = alloca %"class.std::bitset<1010>::reference", align 8
  %10 = load i32, ptr @m, align 4, !tbaa !5
  %11 = icmp sgt i32 %10, 0
  br i1 %11, label %.lr.ph, label %._crit_edge46

.preheader35:                                     ; preds = %.lr.ph
  %12 = icmp sgt i32 %14, 0
  br i1 %12, label %.preheader34, label %._crit_edge46

.lr.ph:                                           ; preds = %3, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %3 ]
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %4) #4
  call void @_ZNSt6bitsetILm1010EEC2Ey(ptr noundef nonnull align 8 dereferenceable(128) %4, i64 noundef 0) #4
  %13 = getelementptr inbounds [1010 x %"class.std::bitset"], ptr @temp, i64 0, i64 %indvars.iv
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(128) %13, ptr noundef nonnull align 8 dereferenceable(128) %4, i64 128, i1 false)
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %4) #4
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %14 = load i32, ptr @m, align 4, !tbaa !5
  %15 = sext i32 %14 to i64
  %16 = icmp slt i64 %indvars.iv.next, %15
  br i1 %16, label %.lr.ph, label %.preheader35, !llvm.loop !9

.preheader34:                                     ; preds = %.preheader35, %._crit_edge
  %17 = phi i32 [ %21, %._crit_edge ], [ %14, %.preheader35 ]
  %indvars.iv53 = phi i64 [ %indvars.iv.next54, %._crit_edge ], [ 0, %.preheader35 ]
  %18 = icmp sgt i32 %17, 0
  br i1 %18, label %.lr.ph38, label %.preheader34.._crit_edge_crit_edge

.preheader34.._crit_edge_crit_edge:               ; preds = %.preheader34
  %.pre = sext i32 %17 to i64
  br label %._crit_edge

.lr.ph38:                                         ; preds = %.preheader34
  %19 = getelementptr inbounds %"class.std::bitset", ptr %1, i64 %indvars.iv53
  br label %23

.preheader33:                                     ; preds = %._crit_edge
  %20 = icmp sgt i32 %21, 0
  br i1 %20, label %.preheader32, label %._crit_edge46

._crit_edge:                                      ; preds = %23, %.preheader34.._crit_edge_crit_edge
  %.pre-phi = phi i64 [ %.pre, %.preheader34.._crit_edge_crit_edge ], [ %27, %23 ]
  %21 = phi i32 [ %17, %.preheader34.._crit_edge_crit_edge ], [ %26, %23 ]
  %indvars.iv.next54 = add nuw nsw i64 %indvars.iv53, 1
  %22 = icmp slt i64 %indvars.iv.next54, %.pre-phi
  br i1 %22, label %.preheader34, label %.preheader33, !llvm.loop !11

23:                                               ; preds = %.lr.ph38, %23
  %indvars.iv50 = phi i64 [ 0, %.lr.ph38 ], [ %indvars.iv.next51, %23 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #4
  call void @_ZNSt6bitsetILm1010EEixEm(ptr dead_on_unwind nonnull writable sret(%"class.std::bitset<1010>::reference") align 8 %5, ptr noundef nonnull align 8 dereferenceable(128) %19, i64 noundef %indvars.iv50)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #4
  %24 = getelementptr inbounds [1010 x %"class.std::bitset"], ptr @b_T, i64 0, i64 %indvars.iv50
  call void @_ZNSt6bitsetILm1010EEixEm(ptr dead_on_unwind nonnull writable sret(%"class.std::bitset<1010>::reference") align 8 %6, ptr noundef nonnull align 8 dereferenceable(128) %24, i64 noundef %indvars.iv53)
  %25 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6bitsetILm1010EE9referenceaSERKS1_(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(16) %5) #4
  call void @_ZNSt6bitsetILm1010EE9referenceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #4
  call void @_ZNSt6bitsetILm1010EE9referenceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #4
  %indvars.iv.next51 = add nuw nsw i64 %indvars.iv50, 1
  %26 = load i32, ptr @m, align 4, !tbaa !5
  %27 = sext i32 %26 to i64
  %28 = icmp slt i64 %indvars.iv.next51, %27
  br i1 %28, label %23, label %._crit_edge, !llvm.loop !13

.preheader32:                                     ; preds = %.preheader33, %._crit_edge42
  %29 = phi i32 [ %34, %._crit_edge42 ], [ %21, %.preheader33 ]
  %indvars.iv59 = phi i64 [ %indvars.iv.next60, %._crit_edge42 ], [ 0, %.preheader33 ]
  %30 = icmp sgt i32 %29, 0
  br i1 %30, label %.lr.ph41, label %.preheader32.._crit_edge42_crit_edge

.preheader32.._crit_edge42_crit_edge:             ; preds = %.preheader32
  %.pre65 = sext i32 %29 to i64
  br label %._crit_edge42

.lr.ph41:                                         ; preds = %.preheader32
  %31 = getelementptr inbounds %"class.std::bitset", ptr %0, i64 %indvars.iv59
  %32 = getelementptr inbounds [1010 x %"class.std::bitset"], ptr @temp, i64 0, i64 %indvars.iv59
  br label %36

.preheader:                                       ; preds = %._crit_edge42
  %33 = icmp sgt i32 %34, 0
  br i1 %33, label %.lr.ph45, label %._crit_edge46

._crit_edge42:                                    ; preds = %36, %.preheader32.._crit_edge42_crit_edge
  %.pre-phi66 = phi i64 [ %.pre65, %.preheader32.._crit_edge42_crit_edge ], [ %44, %36 ]
  %34 = phi i32 [ %29, %.preheader32.._crit_edge42_crit_edge ], [ %43, %36 ]
  %indvars.iv.next60 = add nuw nsw i64 %indvars.iv59, 1
  %35 = icmp slt i64 %indvars.iv.next60, %.pre-phi66
  br i1 %35, label %.preheader32, label %.preheader, !llvm.loop !14

36:                                               ; preds = %.lr.ph41, %36
  %indvars.iv56 = phi i64 [ 0, %.lr.ph41 ], [ %indvars.iv.next57, %36 ]
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %7) #4
  %37 = getelementptr inbounds [1010 x %"class.std::bitset"], ptr @b_T, i64 0, i64 %indvars.iv56
  call void @_ZStanILm1010EESt6bitsetIXT_EERKS1_S3_(ptr dead_on_unwind nonnull writable sret(%"class.std::bitset") align 8 %7, ptr noundef nonnull align 8 dereferenceable(128) %31, ptr noundef nonnull align 8 dereferenceable(128) %37) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #4
  call void @_ZNSt6bitsetILm1010EEixEm(ptr dead_on_unwind nonnull writable sret(%"class.std::bitset<1010>::reference") align 8 %8, ptr noundef nonnull align 8 dereferenceable(128) %32, i64 noundef %indvars.iv56)
  %38 = call noundef zeroext i1 @_ZNKSt6bitsetILm1010EE9referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %8) #4
  %39 = call noundef i64 @_ZNKSt6bitsetILm1010EE5countEv(ptr noundef nonnull align 8 dereferenceable(128) %7) #4
  %40 = trunc i64 %39 to i1
  %41 = xor i1 %38, %40
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #4
  call void @_ZNSt6bitsetILm1010EEixEm(ptr dead_on_unwind nonnull writable sret(%"class.std::bitset<1010>::reference") align 8 %9, ptr noundef nonnull align 8 dereferenceable(128) %32, i64 noundef %indvars.iv56)
  %42 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6bitsetILm1010EE9referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %9, i1 noundef zeroext %41) #4
  call void @_ZNSt6bitsetILm1010EE9referenceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #4
  call void @_ZNSt6bitsetILm1010EE9referenceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %7) #4
  %indvars.iv.next57 = add nuw nsw i64 %indvars.iv56, 1
  %43 = load i32, ptr @m, align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  %45 = icmp slt i64 %indvars.iv.next57, %44
  br i1 %45, label %36, label %._crit_edge42, !llvm.loop !15

._crit_edge46:                                    ; preds = %.lr.ph45, %3, %.preheader35, %.preheader33, %.preheader
  ret void

.lr.ph45:                                         ; preds = %.preheader, %.lr.ph45
  %indvars.iv62 = phi i64 [ %indvars.iv.next63, %.lr.ph45 ], [ 0, %.preheader ]
  %46 = getelementptr inbounds [1010 x %"class.std::bitset"], ptr @temp, i64 0, i64 %indvars.iv62
  %47 = getelementptr inbounds %"class.std::bitset", ptr %2, i64 %indvars.iv62
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(128) %47, ptr noundef nonnull align 16 dereferenceable(128) %46, i64 128, i1 false)
  %indvars.iv.next63 = add nuw nsw i64 %indvars.iv62, 1
  %48 = load i32, ptr @m, align 4, !tbaa !5
  %49 = sext i32 %48 to i64
  %50 = icmp slt i64 %indvars.iv.next63, %49
  br i1 %50, label %.lr.ph45, label %._crit_edge46, !llvm.loop !16
}

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

; Function Attrs: mustprogress 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 8 dereferenceable(16) ptr @_ZNSt6bitsetILm1010EE9referenceaSERKS1_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZStanILm1010EESt6bitsetIXT_EERKS1_S3_(ptr dead_on_unwind noalias writable sret(%"class.std::bitset") align 8, ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 8 dereferenceable(128)) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6bitsetILm1010EE5countEv(ptr noundef nonnull align 8 dereferenceable(128)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6bitsetILm1010EE9referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16), i1 noundef zeroext) local_unnamed_addr #1 align 2

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10, !12}
!12 = !{!"llvm.loop.unswitch.partial.disable"}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10, !12}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SCCPPass,SROAPass,SimpleLoopUnswitchPass,SimplifyCFGPass