; LLVM IR from brpapa/algorithms :: solutions/spoj/LINEUP.ll (Z2dpii)

; 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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@s = external dso_local global [11 x [2048 x i32]], align 16
@memo = external dso_local global %"class.std::vector", align 8

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z2dpii(i32 noundef %0, i32 noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !5
  %10 = load i32, ptr %4, align 4, !tbaa !5
  %11 = icmp eq i32 %10, 11
  br i1 %11, label %12, label %13

12:                                               ; preds = %2
  store i32 0, ptr %3, align 4
  br label %79

13:                                               ; preds = %2
  %14 = load i32, ptr %5, align 4, !tbaa !5
  %15 = icmp eq i32 %14, 2047
  br i1 %15, label %16, label %17

16:                                               ; preds = %13
  store i32 0, ptr %3, align 4
  br label %79

17:                                               ; preds = %13
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %18 = load i32, ptr %4, align 4, !tbaa !5
  %19 = sext i32 %18 to i64
  %20 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @memo, i64 noundef %19) #4
  %21 = load i32, ptr %5, align 4, !tbaa !5
  %22 = sext i32 %21 to i64
  %23 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %22) #4
  store ptr %23, ptr %6, align 8, !tbaa !9
  %24 = load ptr, ptr %6, align 8, !tbaa !9
  %25 = load i32, ptr %24, align 4, !tbaa !5
  %26 = icmp ne i32 %25, -1
  br i1 %26, label %27, label %30

27:                                               ; preds = %17
  %28 = load ptr, ptr %6, align 8, !tbaa !9
  %29 = load i32, ptr %28, align 4, !tbaa !5
  store i32 %29, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %78

30:                                               ; preds = %17
  %31 = load ptr, ptr %6, align 8, !tbaa !9
  store i32 -1073741824, ptr %31, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %32

32:                                               ; preds = %72, %30
  %33 = load i32, ptr %8, align 4, !tbaa !5
  %34 = icmp slt i32 %33, 11
  br i1 %34, label %36, label %35

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

36:                                               ; preds = %32
  %37 = load i32, ptr %5, align 4, !tbaa !5
  %38 = load i32, ptr %8, align 4, !tbaa !5
  %39 = shl i32 1, %38
  %40 = and i32 %37, %39
  %41 = icmp ne i32 %40, 0
  br i1 %41, label %71, label %42

42:                                               ; preds = %36
  %43 = load i32, ptr %4, align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [11 x [2048 x i32]], ptr @s, i64 0, i64 %44
  %46 = load i32, ptr %8, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [2048 x i32], ptr %45, i64 0, i64 %47
  %49 = load i32, ptr %48, align 4, !tbaa !5
  %50 = icmp sgt i32 %49, 0
  br i1 %50, label %51, label %71

51:                                               ; preds = %42
  %52 = load ptr, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  %53 = load i32, ptr %4, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [11 x [2048 x i32]], ptr @s, i64 0, i64 %54
  %56 = load i32, ptr %8, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [2048 x i32], ptr %55, i64 0, i64 %57
  %59 = load i32, ptr %58, align 4, !tbaa !5
  %60 = load i32, ptr %4, align 4, !tbaa !5
  %61 = add nsw i32 %60, 1
  %62 = load i32, ptr %5, align 4, !tbaa !5
  %63 = load i32, ptr %8, align 4, !tbaa !5
  %64 = shl i32 1, %63
  %65 = or i32 %62, %64
  %66 = call noundef i32 @_Z2dpii(i32 noundef %61, i32 noundef %65)
  %67 = add nsw i32 %59, %66
  store i32 %67, ptr %9, align 4, !tbaa !5
  %68 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %52, ptr noundef nonnull align 4 dereferenceable(4) %9)
  %69 = load i32, ptr %68, align 4, !tbaa !5
  %70 = load ptr, ptr %6, align 8, !tbaa !9
  store i32 %69, ptr %70, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %71

71:                                               ; preds = %51, %42, %36
  br label %72

72:                                               ; preds = %71
  %73 = load i32, ptr %8, align 4, !tbaa !5
  %74 = add nsw i32 %73, 1
  store i32 %74, ptr %8, align 4, !tbaa !5
  br label %32, !llvm.loop !11

75:                                               ; preds = %35
  %76 = load ptr, ptr %6, align 8, !tbaa !9
  %77 = load i32, ptr %76, align 4, !tbaa !5
  store i32 %77, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %78

78:                                               ; preds = %75, %27
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  br label %79

79:                                               ; preds = %78, %16, %12
  %80 = load i32, ptr %3, align 4
  ret i32 %80
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #2 align 2

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

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

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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress 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 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}


; 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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@s = external dso_local local_unnamed_addr global [11 x [2048 x i32]], align 16
@memo = external dso_local global %"class.std::vector", align 8

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef i32 @_Z2dpii(i32 noundef %0, i32 noundef %1) local_unnamed_addr #0 {
  %3 = alloca i32, align 4
  %4 = icmp eq i32 %0, 11
  %5 = icmp eq i32 %1, 2047
  %or.cond = or i1 %4, %5
  br i1 %or.cond, label %147, label %6

6:                                                ; preds = %2
  %7 = sext i32 %0 to i64
  %8 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @memo, i64 noundef %7) #3
  %9 = sext i32 %1 to i64
  %10 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %9) #3
  %11 = load i32, ptr %10, align 4, !tbaa !5
  %.not = icmp eq i32 %11, -1
  br i1 %.not, label %12, label %147

12:                                               ; preds = %6
  store i32 -1073741824, ptr %10, align 4, !tbaa !5
  %13 = add nsw i32 %0, 1
  %14 = and i32 %1, 1
  %.not25 = icmp eq i32 %14, 0
  br i1 %.not25, label %15, label %25

15:                                               ; preds = %12
  %16 = getelementptr inbounds [11 x [2048 x i32]], ptr @s, i64 0, i64 %7, i64 0
  %17 = load i32, ptr %16, align 16, !tbaa !5
  %18 = icmp sgt i32 %17, 0
  br i1 %18, label %19, label %25

19:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #3
  %20 = or disjoint i32 %1, 1
  %21 = tail call noundef i32 @_Z2dpii(i32 noundef %13, i32 noundef %20)
  %22 = add nsw i32 %21, %17
  store i32 %22, ptr %3, align 4, !tbaa !5
  %23 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %24 = load i32, ptr %23, align 4, !tbaa !5
  store i32 %24, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #3
  br label %25

25:                                               ; preds = %12, %15, %19
  %26 = and i32 %1, 2
  %.not25.1 = icmp eq i32 %26, 0
  br i1 %.not25.1, label %27, label %37

27:                                               ; preds = %25
  %28 = getelementptr inbounds [11 x [2048 x i32]], ptr @s, i64 0, i64 %7, i64 1
  %29 = load i32, ptr %28, align 4, !tbaa !5
  %30 = icmp sgt i32 %29, 0
  br i1 %30, label %31, label %37

31:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #3
  %32 = or disjoint i32 %1, 2
  %33 = call noundef i32 @_Z2dpii(i32 noundef %13, i32 noundef %32)
  %34 = add nsw i32 %33, %29
  store i32 %34, ptr %3, align 4, !tbaa !5
  %35 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %36 = load i32, ptr %35, align 4, !tbaa !5
  store i32 %36, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #3
  br label %37

37:                                               ; preds = %31, %27, %25
  %38 = and i32 %1, 4
  %.not25.2 = icmp eq i32 %38, 0
  br i1 %.not25.2, label %39, label %49

39:                                               ; preds = %37
  %40 = getelementptr inbounds [11 x [2048 x i32]], ptr @s, i64 0, i64 %7, i64 2
  %41 = load i32, ptr %40, align 8, !tbaa !5
  %42 = icmp sgt i32 %41, 0
  br i1 %42, label %43, label %49

43:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #3
  %44 = or disjoint i32 %1, 4
  %45 = call noundef i32 @_Z2dpii(i32 noundef %13, i32 noundef %44)
  %46 = add nsw i32 %45, %41
  store i32 %46, ptr %3, align 4, !tbaa !5
  %47 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %48 = load i32, ptr %47, align 4, !tbaa !5
  store i32 %48, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #3
  br label %49

49:                                               ; preds = %43, %39, %37
  %50 = and i32 %1, 8
  %.not25.3 = icmp eq i32 %50, 0
  br i1 %.not25.3, label %51, label %61

51:                                               ; preds = %49
  %52 = getelementptr inbounds [11 x [2048 x i32]], ptr @s, i64 0, i64 %7, i64 3
  %53 = load i32, ptr %52, align 4, !tbaa !5
  %54 = icmp sgt i32 %53, 0
  br i1 %54, label %55, label %61

55:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #3
  %56 = or disjoint i32 %1, 8
  %57 = call noundef i32 @_Z2dpii(i32 noundef %13, i32 noundef %56)
  %58 = add nsw i32 %57, %53
  store i32 %58, ptr %3, align 4, !tbaa !5
  %59 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %60 = load i32, ptr %59, align 4, !tbaa !5
  store i32 %60, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #3
  br label %61

61:                                               ; preds = %55, %51, %49
  %62 = and i32 %1, 16
  %.not25.4 = icmp eq i32 %62, 0
  br i1 %.not25.4, label %63, label %73

63:                                               ; preds = %61
  %64 = getelementptr inbounds [11 x [2048 x i32]], ptr @s, i64 0, i64 %7, i64 4
  %65 = load i32, ptr %64, align 16, !tbaa !5
  %66 = icmp sgt i32 %65, 0
  br i1 %66, label %67, label %73

67:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #3
  %68 = or disjoint i32 %1, 16
  %69 = call noundef i32 @_Z2dpii(i32 noundef %13, i32 noundef %68)
  %70 = add nsw i32 %69, %65
  store i32 %70, ptr %3, align 4, !tbaa !5
  %71 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %72 = load i32, ptr %71, align 4, !tbaa !5
  store i32 %72, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #3
  br label %73

73:                                               ; preds = %67, %63, %61
  %74 = and i32 %1, 32
  %.not25.5 = icmp eq i32 %74, 0
  br i1 %.not25.5, label %75, label %85

75:                                               ; preds = %73
  %76 = getelementptr inbounds [11 x [2048 x i32]], ptr @s, i64 0, i64 %7, i64 5
  %77 = load i32, ptr %76, align 4, !tbaa !5
  %78 = icmp sgt i32 %77, 0
  br i1 %78, label %79, label %85

79:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #3
  %80 = or disjoint i32 %1, 32
  %81 = call noundef i32 @_Z2dpii(i32 noundef %13, i32 noundef %80)
  %82 = add nsw i32 %81, %77
  store i32 %82, ptr %3, align 4, !tbaa !5
  %83 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %84 = load i32, ptr %83, align 4, !tbaa !5
  store i32 %84, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #3
  br label %85

85:                                               ; preds = %79, %75, %73
  %86 = and i32 %1, 64
  %.not25.6 = icmp eq i32 %86, 0
  br i1 %.not25.6, label %87, label %97

87:                                               ; preds = %85
  %88 = getelementptr inbounds [11 x [2048 x i32]], ptr @s, i64 0, i64 %7, i64 6
  %89 = load i32, ptr %88, align 8, !tbaa !5
  %90 = icmp sgt i32 %89, 0
  br i1 %90, label %91, label %97

91:                                               ; preds = %87
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #3
  %92 = or disjoint i32 %1, 64
  %93 = call noundef i32 @_Z2dpii(i32 noundef %13, i32 noundef %92)
  %94 = add nsw i32 %93, %89
  store i32 %94, ptr %3, align 4, !tbaa !5
  %95 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %96 = load i32, ptr %95, align 4, !tbaa !5
  store i32 %96, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #3
  br label %97

97:                                               ; preds = %91, %87, %85
  %98 = and i32 %1, 128
  %.not25.7 = icmp eq i32 %98, 0
  br i1 %.not25.7, label %99, label %109

99:                                               ; preds = %97
  %100 = getelementptr inbounds [11 x [2048 x i32]], ptr @s, i64 0, i64 %7, i64 7
  %101 = load i32, ptr %100, align 4, !tbaa !5
  %102 = icmp sgt i32 %101, 0
  br i1 %102, label %103, label %109

103:                                              ; preds = %99
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #3
  %104 = or disjoint i32 %1, 128
  %105 = call noundef i32 @_Z2dpii(i32 noundef %13, i32 noundef %104)
  %106 = add nsw i32 %105, %101
  store i32 %106, ptr %3, align 4, !tbaa !5
  %107 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %108 = load i32, ptr %107, align 4, !tbaa !5
  store i32 %108, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #3
  br label %109

109:                                              ; preds = %103, %99, %97
  %110 = and i32 %1, 256
  %.not25.8 = icmp eq i32 %110, 0
  br i1 %.not25.8, label %111, label %121

111:                                              ; preds = %109
  %112 = getelementptr inbounds [11 x [2048 x i32]], ptr @s, i64 0, i64 %7, i64 8
  %113 = load i32, ptr %112, align 16, !tbaa !5
  %114 = icmp sgt i32 %113, 0
  br i1 %114, label %115, label %121

115:                                              ; preds = %111
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #3
  %116 = or disjoint i32 %1, 256
  %117 = call noundef i32 @_Z2dpii(i32 noundef %13, i32 noundef %116)
  %118 = add nsw i32 %117, %113
  store i32 %118, ptr %3, align 4, !tbaa !5
  %119 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %120 = load i32, ptr %119, align 4, !tbaa !5
  store i32 %120, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #3
  br label %121

121:                                              ; preds = %115, %111, %109
  %122 = and i32 %1, 512
  %.not25.9 = icmp eq i32 %122, 0
  br i1 %.not25.9, label %123, label %133

123:                                              ; preds = %121
  %124 = getelementptr inbounds [11 x [2048 x i32]], ptr @s, i64 0, i64 %7, i64 9
  %125 = load i32, ptr %124, align 4, !tbaa !5
  %126 = icmp sgt i32 %125, 0
  br i1 %126, label %127, label %133

127:                                              ; preds = %123
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #3
  %128 = or disjoint i32 %1, 512
  %129 = call noundef i32 @_Z2dpii(i32 noundef %13, i32 noundef %128)
  %130 = add nsw i32 %129, %125
  store i32 %130, ptr %3, align 4, !tbaa !5
  %131 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %132 = load i32, ptr %131, align 4, !tbaa !5
  store i32 %132, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #3
  br label %133

133:                                              ; preds = %127, %123, %121
  %134 = and i32 %1, 1024
  %.not25.10 = icmp eq i32 %134, 0
  br i1 %.not25.10, label %135, label %145

135:                                              ; preds = %133
  %136 = getelementptr inbounds [11 x [2048 x i32]], ptr @s, i64 0, i64 %7, i64 10
  %137 = load i32, ptr %136, align 8, !tbaa !5
  %138 = icmp sgt i32 %137, 0
  br i1 %138, label %139, label %145

139:                                              ; preds = %135
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #3
  %140 = or disjoint i32 %1, 1024
  %141 = call noundef i32 @_Z2dpii(i32 noundef %13, i32 noundef %140)
  %142 = add nsw i32 %141, %137
  store i32 %142, ptr %3, align 4, !tbaa !5
  %143 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %144 = load i32, ptr %143, align 4, !tbaa !5
  store i32 %144, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #3
  br label %145

145:                                              ; preds = %139, %135, %133
  %146 = load i32, ptr %10, align 4, !tbaa !5
  br label %147

147:                                              ; preds = %145, %6, %2
  %.1 = phi i32 [ 0, %2 ], [ %146, %145 ], [ %11, %6 ]
  ret i32 %.1
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #0 align 2

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

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

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


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,LICMPass,LoopRotatePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass