; LLVM IR from Tunghohin/Competitive_Coding :: Daimayuan/451.ll (Z3bfsi)

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

%struct.edge = type { i32, i32 }
%"class.std::queue" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl" }
%"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl" = type { %"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl_data" }
%"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }

@e = external dso_local global [400010 x %struct.edge], align 16
@head = external dso_local global [200010 x i32], align 16
@val = external dso_local global [200010 x i32], align 16
@xor_prefix = external dso_local global [200010 x i32], align 16
@depth = external dso_local global [200010 x i32], align 16
@f = external dso_local global [200010 x [31 x i32]], align 16

; Function Attrs: mustprogress uwtable
define dso_local void @_Z3bfsi(i32 noundef %0) #0 personality ptr @__gxx_personality_v0 {
  %2 = alloca i32, align 4
  %3 = alloca %"class.std::queue", align 8
  %4 = alloca ptr, align 8
  %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
  %10 = alloca i32, align 4
  store i32 %0, ptr %2, align 4, !tbaa !5
  call void @llvm.memset.p0.i64(ptr align 16 @depth, i8 63, i64 800040, i1 false)
  store i32 0, ptr @depth, align 16, !tbaa !5
  %11 = load i32, ptr %2, align 4, !tbaa !5
  %12 = sext i32 %11 to i64
  %13 = getelementptr inbounds [200010 x i32], ptr @depth, i64 0, i64 %12
  store i32 1, ptr %13, align 4, !tbaa !5
  %14 = load i32, ptr %2, align 4, !tbaa !5
  %15 = sext i32 %14 to i64
  %16 = getelementptr inbounds [200010 x i32], ptr @val, i64 0, i64 %15
  %17 = load i32, ptr %16, align 4, !tbaa !5
  %18 = load i32, ptr %2, align 4, !tbaa !5
  %19 = sext i32 %18 to i64
  %20 = getelementptr inbounds [200010 x i32], ptr @xor_prefix, i64 0, i64 %19
  store i32 %17, ptr %20, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 80, ptr %3) #5
  call void @_ZNSt5queueIiSt5dequeIiSaIiEEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
  invoke void @_ZNSt5queueIiSt5dequeIiSaIiEEE4pushERKi(ptr noundef nonnull align 8 dereferenceable(80) %3, ptr noundef nonnull align 4 dereferenceable(4) %2)
          to label %21 unwind label %39

21:                                               ; preds = %1
  br label %22

22:                                               ; preds = %131, %21
  %23 = invoke noundef zeroext i1 @_ZNKSt5queueIiSt5dequeIiSaIiEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
          to label %24 unwind label %39

24:                                               ; preds = %22
  %25 = xor i1 %23, true
  br i1 %25, label %26, label %133

26:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  %27 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5queueIiSt5dequeIiSaIiEEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
          to label %28 unwind label %43

28:                                               ; preds = %26
  %29 = load i32, ptr %27, align 4, !tbaa !5
  store i32 %29, ptr %6, align 4, !tbaa !5
  invoke void @_ZNSt5queueIiSt5dequeIiSaIiEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
          to label %30 unwind label %43

30:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  %31 = load i32, ptr %6, align 4, !tbaa !5
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [200010 x i32], ptr @head, i64 0, i64 %32
  %34 = load i32, ptr %33, align 4, !tbaa !5
  store i32 %34, ptr %7, align 4, !tbaa !5
  br label %35

35:                                               ; preds = %125, %30
  %36 = load i32, ptr %7, align 4, !tbaa !5
  %37 = icmp ne i32 %36, 0
  br i1 %37, label %47, label %38

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

39:                                               ; preds = %22, %1
  %40 = landingpad { ptr, i32 }
          cleanup
  %41 = extractvalue { ptr, i32 } %40, 0
  store ptr %41, ptr %4, align 8
  %42 = extractvalue { ptr, i32 } %40, 1
  store i32 %42, ptr %5, align 4
  br label %134

43:                                               ; preds = %28, %26
  %44 = landingpad { ptr, i32 }
          cleanup
  %45 = extractvalue { ptr, i32 } %44, 0
  store ptr %45, ptr %4, align 8
  %46 = extractvalue { ptr, i32 } %44, 1
  store i32 %46, ptr %5, align 4
  br label %132

47:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %48 = load i32, ptr %7, align 4, !tbaa !5
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [400010 x %struct.edge], ptr @e, i64 0, i64 %49
  %51 = getelementptr inbounds %struct.edge, ptr %50, i32 0, i32 0
  %52 = load i32, ptr %51, align 8, !tbaa !9
  store i32 %52, ptr %9, align 4, !tbaa !5
  %53 = load i32, ptr %9, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [200010 x i32], ptr @depth, i64 0, i64 %54
  %56 = load i32, ptr %55, align 4, !tbaa !5
  %57 = load i32, ptr %6, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [200010 x i32], ptr @depth, i64 0, i64 %58
  %60 = load i32, ptr %59, align 4, !tbaa !5
  %61 = add nsw i32 %60, 1
  %62 = icmp sgt i32 %56, %61
  br i1 %62, label %63, label %124

63:                                               ; preds = %47
  %64 = load i32, ptr %6, align 4, !tbaa !5
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [200010 x i32], ptr @depth, i64 0, i64 %65
  %67 = load i32, ptr %66, align 4, !tbaa !5
  %68 = add nsw i32 %67, 1
  %69 = load i32, ptr %9, align 4, !tbaa !5
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [200010 x i32], ptr @depth, i64 0, i64 %70
  store i32 %68, ptr %71, align 4, !tbaa !5
  invoke void @_ZNSt5queueIiSt5dequeIiSaIiEEE4pushERKi(ptr noundef nonnull align 8 dereferenceable(80) %3, ptr noundef nonnull align 4 dereferenceable(4) %9)
          to label %72 unwind label %82

72:                                               ; preds = %63
  %73 = load i32, ptr %6, align 4, !tbaa !5
  %74 = load i32, ptr %9, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [200010 x [31 x i32]], ptr @f, i64 0, i64 %75
  %77 = getelementptr inbounds [31 x i32], ptr %76, i64 0, i64 0
  store i32 %73, ptr %77, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 1, ptr %10, align 4, !tbaa !5
  br label %78

78:                                               ; preds = %108, %72
  %79 = load i32, ptr %10, align 4, !tbaa !5
  %80 = icmp slt i32 %79, 20
  br i1 %80, label %86, label %81

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

82:                                               ; preds = %63
  %83 = landingpad { ptr, i32 }
          cleanup
  %84 = extractvalue { ptr, i32 } %83, 0
  store ptr %84, ptr %4, align 8
  %85 = extractvalue { ptr, i32 } %83, 1
  store i32 %85, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %132

86:                                               ; preds = %78
  %87 = load i32, ptr %9, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [200010 x [31 x i32]], ptr @f, i64 0, i64 %88
  %90 = load i32, ptr %10, align 4, !tbaa !5
  %91 = sub nsw i32 %90, 1
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [31 x i32], ptr %89, i64 0, i64 %92
  %94 = load i32, ptr %93, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [200010 x [31 x i32]], ptr @f, i64 0, i64 %95
  %97 = load i32, ptr %10, align 4, !tbaa !5
  %98 = sub nsw i32 %97, 1
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [31 x i32], ptr %96, i64 0, i64 %99
  %101 = load i32, ptr %100, align 4, !tbaa !5
  %102 = load i32, ptr %9, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [200010 x [31 x i32]], ptr @f, i64 0, i64 %103
  %105 = load i32, ptr %10, align 4, !tbaa !5
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds [31 x i32], ptr %104, i64 0, i64 %106
  store i32 %101, ptr %107, align 4, !tbaa !5
  br label %108

108:                                              ; preds = %86
  %109 = load i32, ptr %10, align 4, !tbaa !5
  %110 = add nsw i32 %109, 1
  store i32 %110, ptr %10, align 4, !tbaa !5
  br label %78, !llvm.loop !11

111:                                              ; preds = %81
  %112 = load i32, ptr %6, align 4, !tbaa !5
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds [200010 x i32], ptr @xor_prefix, i64 0, i64 %113
  %115 = load i32, ptr %114, align 4, !tbaa !5
  %116 = load i32, ptr %9, align 4, !tbaa !5
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [200010 x i32], ptr @val, i64 0, i64 %117
  %119 = load i32, ptr %118, align 4, !tbaa !5
  %120 = xor i32 %115, %119
  %121 = load i32, ptr %9, align 4, !tbaa !5
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds [200010 x i32], ptr @xor_prefix, i64 0, i64 %122
  store i32 %120, ptr %123, align 4, !tbaa !5
  br label %124

124:                                              ; preds = %111, %47
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %125

125:                                              ; preds = %124
  %126 = load i32, ptr %7, align 4, !tbaa !5
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds [400010 x %struct.edge], ptr @e, i64 0, i64 %127
  %129 = getelementptr inbounds %struct.edge, ptr %128, i32 0, i32 1
  %130 = load i32, ptr %129, align 4, !tbaa !13
  store i32 %130, ptr %7, align 4, !tbaa !5
  br label %35, !llvm.loop !14

131:                                              ; preds = %38
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %22, !llvm.loop !15

132:                                              ; preds = %82, %43
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %134

133:                                              ; preds = %24
  call void @_ZNSt5queueIiSt5dequeIiSaIiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %3) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr %3) #5
  ret void

134:                                              ; preds = %132, %39
  call void @_ZNSt5queueIiSt5dequeIiSaIiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %3) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr %3) #5
  br label %135

135:                                              ; preds = %134
  %136 = load ptr, ptr %4, align 8
  %137 = load i32, ptr %5, align 4
  %138 = insertvalue { ptr, i32 } poison, ptr %136, 0
  %139 = insertvalue { ptr, i32 } %138, i32 %137, 1
  resume { ptr, i32 } %139
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt5queueIiSt5dequeIiSaIiEEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt5queueIiSt5dequeIiSaIiEEE4pushERKi(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 4 dereferenceable(4)) #0 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt5queueIiSt5dequeIiSaIiEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5queueIiSt5dequeIiSaIiEEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt5queueIiSt5dequeIiSaIiEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80)) #3 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt5queueIiSt5dequeIiSaIiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #4 align 2

attributes #0 = { 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 #1 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"_ZTS4edge", !6, i64 0, !6, i64 4}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!10, !6, i64 4}
!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"

%struct.edge = type { i32, i32 }
%"class.std::queue" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl" }
%"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl" = type { %"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl_data" }
%"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }

@e = external dso_local local_unnamed_addr global [400010 x %struct.edge], align 16
@head = external dso_local local_unnamed_addr global [200010 x i32], align 16
@val = external dso_local local_unnamed_addr global [200010 x i32], align 16
@xor_prefix = external dso_local local_unnamed_addr global [200010 x i32], align 16
@depth = external dso_local local_unnamed_addr global [200010 x i32], align 16
@f = external dso_local local_unnamed_addr global [200010 x [31 x i32]], align 16

; Function Attrs: mustprogress uwtable
define dso_local void @_Z3bfsi(i32 noundef %0) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %2 = alloca i32, align 4
  %3 = alloca %"class.std::queue", align 8
  %4 = alloca i32, align 4
  store i32 %0, ptr %2, align 4, !tbaa !5
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(800040) @depth, i8 63, i64 800040, i1 false)
  store i32 0, ptr @depth, align 16, !tbaa !5
  %5 = sext i32 %0 to i64
  %6 = getelementptr inbounds [200010 x i32], ptr @depth, i64 0, i64 %5
  store i32 1, ptr %6, align 4, !tbaa !5
  %7 = getelementptr inbounds [200010 x i32], ptr @val, i64 0, i64 %5
  %8 = load i32, ptr %7, align 4, !tbaa !5
  %9 = getelementptr inbounds [200010 x i32], ptr @xor_prefix, i64 0, i64 %5
  store i32 %8, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %3) #5
  call void @_ZNSt5queueIiSt5dequeIiSaIiEEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
  invoke void @_ZNSt5queueIiSt5dequeIiSaIiEEE4pushERKi(ptr noundef nonnull align 8 dereferenceable(80) %3, ptr noundef nonnull align 4 dereferenceable(4) %2)
          to label %.preheader unwind label %19

.preheader:                                       ; preds = %1
  %10 = call noundef zeroext i1 @_ZNKSt5queueIiSt5dequeIiSaIiEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
  br i1 %10, label %._crit_edge, label %.lr.ph23

.loopexit:                                        ; preds = %117, %.lr.ph23
  %11 = call noundef zeroext i1 @_ZNKSt5queueIiSt5dequeIiSaIiEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
  br i1 %11, label %._crit_edge, label %.lr.ph23, !llvm.loop !9

.lr.ph23:                                         ; preds = %.preheader, %.loopexit
  %12 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5queueIiSt5dequeIiSaIiEEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
  %13 = load i32, ptr %12, align 4, !tbaa !5
  call void @_ZNSt5queueIiSt5dequeIiSaIiEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
  %14 = sext i32 %13 to i64
  %15 = getelementptr inbounds [200010 x i32], ptr @head, i64 0, i64 %14
  %.01420 = load i32, ptr %15, align 4, !tbaa !5
  %.not21 = icmp eq i32 %.01420, 0
  br i1 %.not21, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph23
  %16 = getelementptr inbounds [200010 x i32], ptr @depth, i64 0, i64 %14
  %17 = getelementptr inbounds [200010 x i32], ptr @xor_prefix, i64 0, i64 %14
  %18 = getelementptr inbounds [200010 x [31 x i32]], ptr @f, i64 0, i64 %14, i64 0
  br label %21

19:                                               ; preds = %1
  %20 = landingpad { ptr, i32 }
          cleanup
  br label %119

21:                                               ; preds = %.lr.ph, %117
  %.01422 = phi i32 [ %.01420, %.lr.ph ], [ %.014, %117 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  %22 = sext i32 %.01422 to i64
  %23 = getelementptr inbounds [400010 x %struct.edge], ptr @e, i64 0, i64 %22
  %24 = load i32, ptr %23, align 8, !tbaa !11
  store i32 %24, ptr %4, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds [200010 x i32], ptr @depth, i64 0, i64 %25
  %27 = load i32, ptr %26, align 4, !tbaa !5
  %28 = load i32, ptr %16, align 4, !tbaa !5
  %29 = add nsw i32 %28, 1
  %30 = icmp sgt i32 %27, %29
  br i1 %30, label %31, label %117

31:                                               ; preds = %21
  store i32 %29, ptr %26, align 4, !tbaa !5
  invoke void @_ZNSt5queueIiSt5dequeIiSaIiEEE4pushERKi(ptr noundef nonnull align 8 dereferenceable(80) %3, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %32 unwind label %115

32:                                               ; preds = %31
  %33 = load i32, ptr %4, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [200010 x [31 x i32]], ptr @f, i64 0, i64 %34
  store i32 %13, ptr %35, align 4, !tbaa !5
  %36 = load i32, ptr %18, align 4, !tbaa !5
  %37 = getelementptr inbounds [200010 x [31 x i32]], ptr @f, i64 0, i64 %34, i64 1
  store i32 %36, ptr %37, align 4, !tbaa !5
  %38 = sext i32 %36 to i64
  %39 = getelementptr inbounds [200010 x [31 x i32]], ptr @f, i64 0, i64 %38, i64 1
  %40 = load i32, ptr %39, align 4, !tbaa !5
  %41 = getelementptr inbounds [200010 x [31 x i32]], ptr @f, i64 0, i64 %34, i64 2
  store i32 %40, ptr %41, align 4, !tbaa !5
  %42 = sext i32 %40 to i64
  %43 = getelementptr inbounds [200010 x [31 x i32]], ptr @f, i64 0, i64 %42, i64 2
  %44 = load i32, ptr %43, align 4, !tbaa !5
  %45 = getelementptr inbounds [200010 x [31 x i32]], ptr @f, i64 0, i64 %34, i64 3
  store i32 %44, ptr %45, align 4, !tbaa !5
  %46 = sext i32 %44 to i64
  %47 = getelementptr inbounds [200010 x [31 x i32]], ptr @f, i64 0, i64 %46, i64 3
  %48 = load i32, ptr %47, align 4, !tbaa !5
  %49 = getelementptr inbounds [200010 x [31 x i32]], ptr @f, i64 0, i64 %34, i64 4
  store i32 %48, ptr %49, align 4, !tbaa !5
  %50 = sext i32 %48 to i64
  %51 = getelementptr inbounds [200010 x [31 x i32]], ptr @f, i64 0, i64 %50, i64 4
  %52 = load i32, ptr %51, align 4, !tbaa !5
  %53 = getelementptr inbounds [200010 x [31 x i32]], ptr @f, i64 0, i64 %34, i64 5
  store i32 %52, ptr %53, align 4, !tbaa !5
  %54 = sext i32 %52 to i64
  %55 = getelementptr inbounds [200010 x [31 x i32]], ptr @f, i64 0, i64 %54, i64 5
  %56 = load i32, ptr %55, align 4, !tbaa !5
  %57 = getelementptr inbounds [200010 x [31 x i32]], ptr @f, i64 0, i64 %34, i64 6
  store i32 %56, ptr %57, align 4, !tbaa !5
  %58 = sext i32 %56 to i64
  %59 = getelementptr inbounds [200010 x [31 x i32]], ptr @f, i64 0, i64 %58, i64 6
  %60 = load i32, ptr %59, align 4, !tbaa !5
  %61 = getelementptr inbounds [200010 x [31 x i32]], ptr @f, i64 0, i64 %34, i64 7
  store i32 %60, ptr %61, align 4, !tbaa !5
  %62 = sext i32 %60 to i64
  %63 = getelementptr inbounds [200010 x [31 x i32]], ptr @f, i64 0, i64 %62, i64 7
  %64 = load i32, ptr %63, align 4, !tbaa !5
  %65 = getelementptr inbounds [200010 x [31 x i32]], ptr @f, i64 0, i64 %34, i64 8
  store i32 %64, ptr %65, align 4, !tbaa !5
  %66 = sext i32 %64 to i64
  %67 = getelementptr inbounds [200010 x [31 x i32]], ptr @f, i64 0, i64 %66, i64 8
  %68 = load i32, ptr %67, align 4, !tbaa !5
  %69 = getelementptr inbounds [200010 x [31 x i32]], ptr @f, i64 0, i64 %34, i64 9
  store i32 %68, ptr %69, align 4, !tbaa !5
  %70 = sext i32 %68 to i64
  %71 = getelementptr inbounds [200010 x [31 x i32]], ptr @f, i64 0, i64 %70, i64 9
  %72 = load i32, ptr %71, align 4, !tbaa !5
  %73 = getelementptr inbounds [200010 x [31 x i32]], ptr @f, i64 0, i64 %34, i64 10
  store i32 %72, ptr %73, align 4, !tbaa !5
  %74 = sext i32 %72 to i64
  %75 = getelementptr inbounds [200010 x [31 x i32]], ptr @f, i64 0, i64 %74, i64 10
  %76 = load i32, ptr %75, align 4, !tbaa !5
  %77 = getelementptr inbounds [200010 x [31 x i32]], ptr @f, i64 0, i64 %34, i64 11
  store i32 %76, ptr %77, align 4, !tbaa !5
  %78 = sext i32 %76 to i64
  %79 = getelementptr inbounds [200010 x [31 x i32]], ptr @f, i64 0, i64 %78, i64 11
  %80 = load i32, ptr %79, align 4, !tbaa !5
  %81 = getelementptr inbounds [200010 x [31 x i32]], ptr @f, i64 0, i64 %34, i64 12
  store i32 %80, ptr %81, align 4, !tbaa !5
  %82 = sext i32 %80 to i64
  %83 = getelementptr inbounds [200010 x [31 x i32]], ptr @f, i64 0, i64 %82, i64 12
  %84 = load i32, ptr %83, align 4, !tbaa !5
  %85 = getelementptr inbounds [200010 x [31 x i32]], ptr @f, i64 0, i64 %34, i64 13
  store i32 %84, ptr %85, align 4, !tbaa !5
  %86 = sext i32 %84 to i64
  %87 = getelementptr inbounds [200010 x [31 x i32]], ptr @f, i64 0, i64 %86, i64 13
  %88 = load i32, ptr %87, align 4, !tbaa !5
  %89 = getelementptr inbounds [200010 x [31 x i32]], ptr @f, i64 0, i64 %34, i64 14
  store i32 %88, ptr %89, align 4, !tbaa !5
  %90 = sext i32 %88 to i64
  %91 = getelementptr inbounds [200010 x [31 x i32]], ptr @f, i64 0, i64 %90, i64 14
  %92 = load i32, ptr %91, align 4, !tbaa !5
  %93 = getelementptr inbounds [200010 x [31 x i32]], ptr @f, i64 0, i64 %34, i64 15
  store i32 %92, ptr %93, align 4, !tbaa !5
  %94 = sext i32 %92 to i64
  %95 = getelementptr inbounds [200010 x [31 x i32]], ptr @f, i64 0, i64 %94, i64 15
  %96 = load i32, ptr %95, align 4, !tbaa !5
  %97 = getelementptr inbounds [200010 x [31 x i32]], ptr @f, i64 0, i64 %34, i64 16
  store i32 %96, ptr %97, align 4, !tbaa !5
  %98 = sext i32 %96 to i64
  %99 = getelementptr inbounds [200010 x [31 x i32]], ptr @f, i64 0, i64 %98, i64 16
  %100 = load i32, ptr %99, align 4, !tbaa !5
  %101 = getelementptr inbounds [200010 x [31 x i32]], ptr @f, i64 0, i64 %34, i64 17
  store i32 %100, ptr %101, align 4, !tbaa !5
  %102 = sext i32 %100 to i64
  %103 = getelementptr inbounds [200010 x [31 x i32]], ptr @f, i64 0, i64 %102, i64 17
  %104 = load i32, ptr %103, align 4, !tbaa !5
  %105 = getelementptr inbounds [200010 x [31 x i32]], ptr @f, i64 0, i64 %34, i64 18
  store i32 %104, ptr %105, align 4, !tbaa !5
  %106 = sext i32 %104 to i64
  %107 = getelementptr inbounds [200010 x [31 x i32]], ptr @f, i64 0, i64 %106, i64 18
  %108 = load i32, ptr %107, align 4, !tbaa !5
  %109 = getelementptr inbounds [200010 x [31 x i32]], ptr @f, i64 0, i64 %34, i64 19
  store i32 %108, ptr %109, align 4, !tbaa !5
  %110 = load i32, ptr %17, align 4, !tbaa !5
  %111 = getelementptr inbounds [200010 x i32], ptr @val, i64 0, i64 %34
  %112 = load i32, ptr %111, align 4, !tbaa !5
  %113 = xor i32 %112, %110
  %114 = getelementptr inbounds [200010 x i32], ptr @xor_prefix, i64 0, i64 %34
  store i32 %113, ptr %114, align 4, !tbaa !5
  br label %117

115:                                              ; preds = %31
  %116 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  br label %119

117:                                              ; preds = %32, %21
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  %118 = getelementptr inbounds i8, ptr %23, i64 4
  %.014 = load i32, ptr %118, align 4, !tbaa !5
  %.not = icmp eq i32 %.014, 0
  br i1 %.not, label %.loopexit, label %21, !llvm.loop !13

._crit_edge:                                      ; preds = %.loopexit, %.preheader
  call void @_ZNSt5queueIiSt5dequeIiSaIiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %3) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %3) #5
  ret void

119:                                              ; preds = %115, %19
  %.pn = phi { ptr, i32 } [ %116, %115 ], [ %20, %19 ]
  call void @_ZNSt5queueIiSt5dequeIiSaIiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %3) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %3) #5
  resume { ptr, i32 } %.pn
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt5queueIiSt5dequeIiSaIiEEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt5queueIiSt5dequeIiSaIiEEE4pushERKi(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt5queueIiSt5dequeIiSaIiEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5queueIiSt5dequeIiSaIiEEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt5queueIiSt5dequeIiSaIiEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #3 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt5queueIiSt5dequeIiSaIiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #4 align 2

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !6, i64 0}
!12 = !{!"_ZTS4edge", !6, i64 0, !6, i64 4}
!13 = distinct !{!13, !10}


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