; LLVM IR from VAR-solutions/Algorithms :: Bit Manipulation/xor of subsets/cpp/XOR_of_subsets_equal_to_k.ll (Z9subsetXORPiii)

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z9subsetXORPiii(ptr noundef %0, i32 noundef %1, i32 noundef %2) #0 {
  %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 ptr, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  store i32 %2, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  %17 = load ptr, ptr %4, align 8, !tbaa !5
  %18 = load ptr, ptr %4, align 8, !tbaa !5
  %19 = load i32, ptr %5, align 4, !tbaa !9
  %20 = sext i32 %19 to i64
  %21 = getelementptr inbounds i32, ptr %18, i64 %20
  %22 = call noundef ptr @_ZSt11max_elementIPiET_S1_S1_(ptr noundef %17, ptr noundef %21)
  %23 = load i32, ptr %22, align 4, !tbaa !9
  store i32 %23, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %24 = load i32, ptr %7, align 4, !tbaa !9
  %25 = call noundef double @_ZSt4log2IiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef %24)
  %26 = fptosi double %25 to i32
  %27 = add nsw i32 %26, 1
  %28 = shl i32 1, %27
  %29 = sub nsw i32 %28, 1
  store i32 %29, ptr %8, align 4, !tbaa !9
  %30 = load i32, ptr %5, align 4, !tbaa !9
  %31 = add nsw i32 %30, 1
  %32 = zext i32 %31 to i64
  %33 = load i32, ptr %8, align 4, !tbaa !9
  %34 = add nsw i32 %33, 1
  %35 = zext i32 %34 to i64
  %36 = call ptr @llvm.stacksave.p0()
  store ptr %36, ptr %9, align 8
  %37 = mul nuw i64 %32, %35
  %38 = alloca i32, i64 %37, align 16
  store i64 %32, ptr %10, align 8
  store i64 %35, ptr %11, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %39

39:                                               ; preds = %62, %3
  %40 = load i32, ptr %12, align 4, !tbaa !9
  %41 = load i32, ptr %5, align 4, !tbaa !9
  %42 = icmp sle i32 %40, %41
  br i1 %42, label %44, label %43

43:                                               ; preds = %39
  store i32 2, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %65

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

45:                                               ; preds = %58, %44
  %46 = load i32, ptr %14, align 4, !tbaa !9
  %47 = load i32, ptr %8, align 4, !tbaa !9
  %48 = icmp sle i32 %46, %47
  br i1 %48, label %50, label %49

49:                                               ; preds = %45
  store i32 5, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  br label %61

50:                                               ; preds = %45
  %51 = load i32, ptr %12, align 4, !tbaa !9
  %52 = sext i32 %51 to i64
  %53 = mul nsw i64 %52, %35
  %54 = getelementptr inbounds i32, ptr %38, i64 %53
  %55 = load i32, ptr %14, align 4, !tbaa !9
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds i32, ptr %54, i64 %56
  store i32 0, ptr %57, align 4, !tbaa !9
  br label %58

58:                                               ; preds = %50
  %59 = load i32, ptr %14, align 4, !tbaa !9
  %60 = add nsw i32 %59, 1
  store i32 %60, ptr %14, align 4, !tbaa !9
  br label %45, !llvm.loop !11

61:                                               ; preds = %49
  br label %62

62:                                               ; preds = %61
  %63 = load i32, ptr %12, align 4, !tbaa !9
  %64 = add nsw i32 %63, 1
  store i32 %64, ptr %12, align 4, !tbaa !9
  br label %39, !llvm.loop !13

65:                                               ; preds = %43
  %66 = mul nsw i64 0, %35
  %67 = getelementptr inbounds i32, ptr %38, i64 %66
  %68 = getelementptr inbounds i32, ptr %67, i64 0
  store i32 1, ptr %68, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  store i32 1, ptr %15, align 4, !tbaa !9
  br label %69

69:                                               ; preds = %117, %65
  %70 = load i32, ptr %15, align 4, !tbaa !9
  %71 = load i32, ptr %5, align 4, !tbaa !9
  %72 = icmp sle i32 %70, %71
  br i1 %72, label %74, label %73

73:                                               ; preds = %69
  store i32 8, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %120

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

75:                                               ; preds = %113, %74
  %76 = load i32, ptr %16, align 4, !tbaa !9
  %77 = load i32, ptr %8, align 4, !tbaa !9
  %78 = icmp sle i32 %76, %77
  br i1 %78, label %80, label %79

79:                                               ; preds = %75
  store i32 11, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  br label %116

80:                                               ; preds = %75
  %81 = load i32, ptr %15, align 4, !tbaa !9
  %82 = sub nsw i32 %81, 1
  %83 = sext i32 %82 to i64
  %84 = mul nsw i64 %83, %35
  %85 = getelementptr inbounds i32, ptr %38, i64 %84
  %86 = load i32, ptr %16, align 4, !tbaa !9
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds i32, ptr %85, i64 %87
  %89 = load i32, ptr %88, align 4, !tbaa !9
  %90 = load i32, ptr %15, align 4, !tbaa !9
  %91 = sext i32 %90 to i64
  %92 = mul nsw i64 %91, %35
  %93 = getelementptr inbounds i32, ptr %38, i64 %92
  %94 = load i32, ptr %16, align 4, !tbaa !9
  %95 = load ptr, ptr %4, align 8, !tbaa !5
  %96 = load i32, ptr %15, align 4, !tbaa !9
  %97 = sub nsw i32 %96, 1
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds i32, ptr %95, i64 %98
  %100 = load i32, ptr %99, align 4, !tbaa !9
  %101 = xor i32 %94, %100
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds i32, ptr %93, i64 %102
  %104 = load i32, ptr %103, align 4, !tbaa !9
  %105 = add nsw i32 %89, %104
  %106 = load i32, ptr %15, align 4, !tbaa !9
  %107 = sext i32 %106 to i64
  %108 = mul nsw i64 %107, %35
  %109 = getelementptr inbounds i32, ptr %38, i64 %108
  %110 = load i32, ptr %16, align 4, !tbaa !9
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds i32, ptr %109, i64 %111
  store i32 %105, ptr %112, align 4, !tbaa !9
  br label %113

113:                                              ; preds = %80
  %114 = load i32, ptr %16, align 4, !tbaa !9
  %115 = add nsw i32 %114, 1
  store i32 %115, ptr %16, align 4, !tbaa !9
  br label %75, !llvm.loop !14

116:                                              ; preds = %79
  br label %117

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

120:                                              ; preds = %73
  %121 = load i32, ptr %5, align 4, !tbaa !9
  %122 = sext i32 %121 to i64
  %123 = mul nsw i64 %122, %35
  %124 = getelementptr inbounds i32, ptr %38, i64 %123
  %125 = load i32, ptr %6, align 4, !tbaa !9
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds i32, ptr %124, i64 %126
  %128 = load i32, ptr %127, align 4, !tbaa !9
  store i32 1, ptr %13, align 4
  %129 = load ptr, ptr %9, align 8
  call void @llvm.stackrestore.p0(ptr %129)
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  ret i32 %128
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt11max_elementIPiET_S1_S1_(ptr noundef, ptr noundef) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt4log2IiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef) #3

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #4

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

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #4

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


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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z9subsetXORPiii(ptr noundef %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #0 {
  %4 = sext i32 %1 to i64
  %5 = getelementptr inbounds i32, ptr %0, i64 %4
  %6 = tail call noundef ptr @_ZSt11max_elementIPiET_S1_S1_(ptr noundef %0, ptr noundef %5)
  %7 = load i32, ptr %6, align 4, !tbaa !5
  %8 = tail call noundef double @_ZSt4log2IiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef %7)
  %9 = fptosi double %8 to i32
  %10 = add nsw i32 %9, 1
  %11 = shl nuw i32 1, %10
  %12 = add i32 %1, 1
  %13 = zext i32 %12 to i64
  %14 = zext nneg i32 %10 to i64
  %15 = shl nuw i64 %13, %14
  %16 = alloca i32, i64 %15, align 16
  %.not40 = icmp slt i32 %1, 0
  br i1 %.not40, label %._crit_edge42.thread, label %.preheader37.lr.ph

._crit_edge42.thread:                             ; preds = %3
  store i32 1, ptr %16, align 16, !tbaa !5
  br label %._crit_edge47

.preheader37.lr.ph:                               ; preds = %3
  %.not36.not38.not = icmp eq i32 %10, 31
  br i1 %.not36.not38.not, label %._crit_edge42.thread65, label %.preheader37.us.preheader

.preheader37.us.preheader:                        ; preds = %.preheader37.lr.ph
  %smax = tail call i32 @llvm.smax.i32(i32 %11, i32 1)
  %17 = zext nneg i32 %smax to i64
  %18 = shl nuw nsw i64 %17, 2
  %xtraiter = and i64 %13, 7
  %19 = icmp ult i32 %12, 8
  br i1 %19, label %._crit_edge42.unr-lcssa, label %.preheader37.us.preheader.new

.preheader37.us.preheader.new:                    ; preds = %.preheader37.us.preheader
  %unroll_iter = and i64 %13, 4294967288
  br label %.preheader37.us

.preheader37.us:                                  ; preds = %.preheader37.us, %.preheader37.us.preheader.new
  %indvars.iv = phi i64 [ 0, %.preheader37.us.preheader.new ], [ %indvars.iv.next.7, %.preheader37.us ]
  %niter = phi i64 [ 0, %.preheader37.us.preheader.new ], [ %niter.next.7, %.preheader37.us ]
  %20 = shl i64 %indvars.iv, %14
  %21 = getelementptr inbounds i32, ptr %16, i64 %20
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1) %21, i8 0, i64 %18, i1 false), !tbaa !5
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %22 = shl i64 %indvars.iv.next, %14
  %23 = getelementptr inbounds i32, ptr %16, i64 %22
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(1) %23, i8 0, i64 %18, i1 false), !tbaa !5
  %indvars.iv.next.1 = or disjoint i64 %indvars.iv, 2
  %24 = shl i64 %indvars.iv.next.1, %14
  %25 = getelementptr inbounds i32, ptr %16, i64 %24
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %25, i8 0, i64 %18, i1 false), !tbaa !5
  %indvars.iv.next.2 = or disjoint i64 %indvars.iv, 3
  %26 = shl i64 %indvars.iv.next.2, %14
  %27 = getelementptr inbounds i32, ptr %16, i64 %26
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(1) %27, i8 0, i64 %18, i1 false), !tbaa !5
  %indvars.iv.next.3 = or disjoint i64 %indvars.iv, 4
  %28 = shl i64 %indvars.iv.next.3, %14
  %29 = getelementptr inbounds i32, ptr %16, i64 %28
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1) %29, i8 0, i64 %18, i1 false), !tbaa !5
  %indvars.iv.next.4 = or disjoint i64 %indvars.iv, 5
  %30 = shl i64 %indvars.iv.next.4, %14
  %31 = getelementptr inbounds i32, ptr %16, i64 %30
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(1) %31, i8 0, i64 %18, i1 false), !tbaa !5
  %indvars.iv.next.5 = or disjoint i64 %indvars.iv, 6
  %32 = shl i64 %indvars.iv.next.5, %14
  %33 = getelementptr inbounds i32, ptr %16, i64 %32
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %33, i8 0, i64 %18, i1 false), !tbaa !5
  %indvars.iv.next.6 = or disjoint i64 %indvars.iv, 7
  %34 = shl i64 %indvars.iv.next.6, %14
  %35 = getelementptr inbounds i32, ptr %16, i64 %34
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(1) %35, i8 0, i64 %18, i1 false), !tbaa !5
  %indvars.iv.next.7 = add nuw nsw i64 %indvars.iv, 8
  %niter.next.7 = add i64 %niter, 8
  %niter.ncmp.7 = icmp eq i64 %niter.next.7, %unroll_iter
  br i1 %niter.ncmp.7, label %._crit_edge42.unr-lcssa, label %.preheader37.us, !llvm.loop !9

._crit_edge42.unr-lcssa:                          ; preds = %.preheader37.us, %.preheader37.us.preheader
  %indvars.iv.unr = phi i64 [ 0, %.preheader37.us.preheader ], [ %indvars.iv.next.7, %.preheader37.us ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge42, label %.preheader37.us.epil

.preheader37.us.epil:                             ; preds = %._crit_edge42.unr-lcssa, %.preheader37.us.epil
  %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %.preheader37.us.epil ], [ %indvars.iv.unr, %._crit_edge42.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.preheader37.us.epil ], [ 0, %._crit_edge42.unr-lcssa ]
  %36 = shl i64 %indvars.iv.epil, %14
  %37 = getelementptr inbounds i32, ptr %16, i64 %36
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(1) %37, i8 0, i64 %18, i1 false), !tbaa !5
  %indvars.iv.next.epil = add nuw nsw i64 %indvars.iv.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge42, label %.preheader37.us.epil, !llvm.loop !11

._crit_edge42:                                    ; preds = %.preheader37.us.epil, %._crit_edge42.unr-lcssa
  store i32 1, ptr %16, align 16, !tbaa !5
  %.not3445 = icmp eq i32 %1, 0
  br i1 %.not3445, label %._crit_edge47, label %.preheader.us.preheader

._crit_edge42.thread65:                           ; preds = %.preheader37.lr.ph
  store i32 1, ptr %16, align 16, !tbaa !5
  br label %._crit_edge47

.preheader.us.preheader:                          ; preds = %._crit_edge42
  %smax56 = tail call i32 @llvm.smax.i32(i32 %11, i32 1)
  %wide.trip.count57 = zext nneg i32 %smax56 to i64
  %xtraiter68 = and i64 %wide.trip.count57, 1
  %38 = icmp slt i32 %11, 2
  %unroll_iter71 = and i64 %wide.trip.count57, 2147483646
  %lcmp.mod70.not = icmp eq i64 %xtraiter68, 0
  br label %.preheader.us

.preheader.us:                                    ; preds = %.preheader.us.preheader, %._crit_edge.us48
  %indvars.iv59 = phi i64 [ 1, %.preheader.us.preheader ], [ %indvars.iv.next60, %._crit_edge.us48 ]
  %39 = add nsw i64 %indvars.iv59, -1
  %40 = shl i64 %39, %14
  %41 = getelementptr inbounds i32, ptr %16, i64 %40
  %42 = shl i64 %indvars.iv59, %14
  %43 = getelementptr inbounds i32, ptr %16, i64 %42
  %44 = getelementptr inbounds i32, ptr %0, i64 %39
  %45 = load i32, ptr %44, align 4, !tbaa !5
  br i1 %38, label %._crit_edge.us48.unr-lcssa, label %.preheader.us.new

.preheader.us.new:                                ; preds = %.preheader.us, %.preheader.us.new
  %indvars.iv53 = phi i64 [ %indvars.iv.next54.1, %.preheader.us.new ], [ 0, %.preheader.us ]
  %niter72 = phi i64 [ %niter72.next.1, %.preheader.us.new ], [ 0, %.preheader.us ]
  %46 = getelementptr inbounds i32, ptr %41, i64 %indvars.iv53
  %47 = load i32, ptr %46, align 4, !tbaa !5
  %48 = trunc nuw nsw i64 %indvars.iv53 to i32
  %49 = xor i32 %45, %48
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds i32, ptr %43, i64 %50
  %52 = load i32, ptr %51, align 4, !tbaa !5
  %53 = add nsw i32 %52, %47
  %54 = getelementptr inbounds i32, ptr %43, i64 %indvars.iv53
  store i32 %53, ptr %54, align 4, !tbaa !5
  %indvars.iv.next54 = or disjoint i64 %indvars.iv53, 1
  %55 = getelementptr inbounds i32, ptr %41, i64 %indvars.iv.next54
  %56 = load i32, ptr %55, align 4, !tbaa !5
  %57 = trunc nuw nsw i64 %indvars.iv.next54 to i32
  %58 = xor i32 %45, %57
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds i32, ptr %43, i64 %59
  %61 = load i32, ptr %60, align 4, !tbaa !5
  %62 = add nsw i32 %61, %56
  %63 = getelementptr inbounds i32, ptr %43, i64 %indvars.iv.next54
  store i32 %62, ptr %63, align 4, !tbaa !5
  %indvars.iv.next54.1 = add nuw nsw i64 %indvars.iv53, 2
  %niter72.next.1 = add i64 %niter72, 2
  %niter72.ncmp.1 = icmp eq i64 %niter72.next.1, %unroll_iter71
  br i1 %niter72.ncmp.1, label %._crit_edge.us48.unr-lcssa, label %.preheader.us.new, !llvm.loop !13

._crit_edge.us48.unr-lcssa:                       ; preds = %.preheader.us.new, %.preheader.us
  %indvars.iv53.unr = phi i64 [ 0, %.preheader.us ], [ %indvars.iv.next54.1, %.preheader.us.new ]
  br i1 %lcmp.mod70.not, label %._crit_edge.us48, label %._crit_edge.us48.epilog-lcssa

._crit_edge.us48.epilog-lcssa:                    ; preds = %._crit_edge.us48.unr-lcssa
  %64 = getelementptr inbounds i32, ptr %41, i64 %indvars.iv53.unr
  %65 = load i32, ptr %64, align 4, !tbaa !5
  %66 = trunc nuw nsw i64 %indvars.iv53.unr to i32
  %67 = xor i32 %45, %66
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds i32, ptr %43, i64 %68
  %70 = load i32, ptr %69, align 4, !tbaa !5
  %71 = add nsw i32 %70, %65
  %72 = getelementptr inbounds i32, ptr %43, i64 %indvars.iv53.unr
  store i32 %71, ptr %72, align 4, !tbaa !5
  br label %._crit_edge.us48

._crit_edge.us48:                                 ; preds = %._crit_edge.us48.unr-lcssa, %._crit_edge.us48.epilog-lcssa
  %indvars.iv.next60 = add nuw nsw i64 %indvars.iv59, 1
  %exitcond63.not = icmp eq i64 %indvars.iv.next60, %13
  br i1 %exitcond63.not, label %._crit_edge47, label %.preheader.us, !llvm.loop !14

._crit_edge47:                                    ; preds = %._crit_edge.us48, %._crit_edge42.thread65, %._crit_edge42.thread, %._crit_edge42
  %73 = shl i64 %4, %14
  %74 = getelementptr inbounds i32, ptr %16, i64 %73
  %75 = sext i32 %2 to i64
  %76 = getelementptr inbounds i32, ptr %74, i64 %75
  %77 = load i32, ptr %76, align 4, !tbaa !5
  ret i32 %77
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt11max_elementIPiET_S1_S1_(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt4log2IiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef) local_unnamed_addr #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #3

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

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

!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, !12}
!12 = !{!"llvm.loop.unroll.disable"}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}


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