; LLVM IR from clibraries/array-algorithms :: test (tests)

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

@.str.1 = external hidden unnamed_addr constant [74 x i8], align 1
@__const.test_partition.numbers = external hidden unnamed_addr constant [6 x i32], align 16
@.str.64 = external hidden unnamed_addr constant [20 x i8], align 1
@__PRETTY_FUNCTION__.test_partition = external hidden unnamed_addr constant [26 x i8], align 1
@.str.65 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.66 = external hidden unnamed_addr constant [62 x i8], align 1
@.str.67 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.68 = external hidden unnamed_addr constant [21 x i8], align 1
@__const.test_partition.numbers.69 = external hidden unnamed_addr constant [6 x i32], align 16
@.str.70 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.71 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.72 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.73 = external hidden unnamed_addr constant [17 x i8], align 1

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

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

; Function Attrs: nounwind uwtable
declare hidden i32 @pred_is_even(ptr noundef, ptr noundef) #2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #3

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

declare i32 @printf(ptr noundef, ...) #4

; Function Attrs: nounwind uwtable
define dso_local void @test_partition() #2 {
  %1 = alloca [6 x i32], align 16
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca [6 x i32], align 16
  %5 = alloca [3 x i32], align 4
  %6 = alloca [3 x i32], align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 24, ptr %1) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %1, ptr align 16 @__const.test_partition.numbers, i64 24, i1 false)
  %10 = getelementptr inbounds [6 x i32], ptr %1, i64 0, i64 0
  %11 = getelementptr inbounds [6 x i32], ptr %1, i64 0, i64 0
  %12 = getelementptr inbounds i32, ptr %11, i64 6
  %13 = call ptr @intv_partition(ptr noundef %10, ptr noundef %12, ptr noundef @pred_is_even, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %14

14:                                               ; preds = %38, %0
  %15 = load i32, ptr %2, align 4, !tbaa !5
  %16 = icmp slt i32 %15, 3
  br i1 %16, label %18, label %17

17:                                               ; preds = %14
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  br label %41

18:                                               ; preds = %14
  %19 = load i32, ptr %2, align 4, !tbaa !5
  %20 = sext i32 %19 to i64
  %21 = getelementptr inbounds [6 x i32], ptr %1, i64 0, i64 %20
  %22 = load i32, ptr %21, align 4, !tbaa !5
  %23 = srem i32 %22, 2
  %24 = icmp eq i32 %23, 0
  br i1 %24, label %25, label %26

25:                                               ; preds = %18
  br label %27

26:                                               ; preds = %18
  call void @__assert_fail(ptr noundef @.str.64, ptr noundef @.str.1, i32 noundef 378, ptr noundef @__PRETTY_FUNCTION__.test_partition) #6
  unreachable

27:                                               ; preds = %25
  %28 = load i32, ptr %2, align 4, !tbaa !5
  %29 = add nsw i32 %28, 3
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds [6 x i32], ptr %1, i64 0, i64 %30
  %32 = load i32, ptr %31, align 4, !tbaa !5
  %33 = srem i32 %32, 2
  %34 = icmp eq i32 %33, 1
  br i1 %34, label %35, label %36

35:                                               ; preds = %27
  br label %37

36:                                               ; preds = %27
  call void @__assert_fail(ptr noundef @.str.65, ptr noundef @.str.1, i32 noundef 379, ptr noundef @__PRETTY_FUNCTION__.test_partition) #6
  unreachable

37:                                               ; preds = %35
  br label %38

38:                                               ; preds = %37
  %39 = load i32, ptr %2, align 4, !tbaa !5
  %40 = add nsw i32 %39, 1
  store i32 %40, ptr %2, align 4, !tbaa !5
  br label %14, !llvm.loop !9

41:                                               ; preds = %17
  %42 = getelementptr inbounds [6 x i32], ptr %1, i64 0, i64 0
  %43 = getelementptr inbounds [6 x i32], ptr %1, i64 0, i64 0
  %44 = getelementptr inbounds i32, ptr %43, i64 6
  %45 = call i32 @intv_is_partitioned(ptr noundef %42, ptr noundef %44, ptr noundef @pred_is_even, ptr noundef null)
  %46 = icmp ne i32 %45, 0
  br i1 %46, label %47, label %48

47:                                               ; preds = %41
  br label %49

48:                                               ; preds = %41
  call void @__assert_fail(ptr noundef @.str.66, ptr noundef @.str.1, i32 noundef 382, ptr noundef @__PRETTY_FUNCTION__.test_partition) #6
  unreachable

49:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  %50 = getelementptr inbounds [6 x i32], ptr %1, i64 0, i64 0
  %51 = getelementptr inbounds [6 x i32], ptr %1, i64 0, i64 0
  %52 = getelementptr inbounds i32, ptr %51, i64 6
  %53 = call ptr @intv_partition_point(ptr noundef %50, ptr noundef %52, ptr noundef @pred_is_even, ptr noundef null)
  store ptr %53, ptr %3, align 8, !tbaa !11
  %54 = load ptr, ptr %3, align 8, !tbaa !11
  %55 = getelementptr inbounds [6 x i32], ptr %1, i64 0, i64 0
  %56 = ptrtoint ptr %54 to i64
  %57 = ptrtoint ptr %55 to i64
  %58 = sub i64 %56, %57
  %59 = sdiv exact i64 %58, 4
  %60 = call i32 (ptr, ...) @printf(ptr noundef @.str.67, i64 noundef %59)
  %61 = load ptr, ptr %3, align 8, !tbaa !11
  %62 = getelementptr inbounds [6 x i32], ptr %1, i64 0, i64 0
  %63 = ptrtoint ptr %61 to i64
  %64 = ptrtoint ptr %62 to i64
  %65 = sub i64 %63, %64
  %66 = sdiv exact i64 %65, 4
  %67 = icmp eq i64 %66, 3
  br i1 %67, label %68, label %69

68:                                               ; preds = %49
  br label %70

69:                                               ; preds = %49
  call void @__assert_fail(ptr noundef @.str.68, ptr noundef @.str.1, i32 noundef 387, ptr noundef @__PRETTY_FUNCTION__.test_partition) #6
  unreachable

70:                                               ; preds = %68
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %1) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %4) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %4, ptr align 16 @__const.test_partition.numbers.69, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %71 = getelementptr inbounds [3 x i32], ptr %5, i64 0, i64 0
  store ptr %71, ptr %7, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %72 = getelementptr inbounds [3 x i32], ptr %6, i64 0, i64 0
  store ptr %72, ptr %8, align 8, !tbaa !11
  %73 = getelementptr inbounds [6 x i32], ptr %4, i64 0, i64 0
  %74 = getelementptr inbounds [6 x i32], ptr %4, i64 0, i64 0
  %75 = getelementptr inbounds i32, ptr %74, i64 6
  call void @intv_partition_copy(ptr noundef %73, ptr noundef %75, ptr noundef %8, ptr noundef %7, ptr noundef @pred_is_even, ptr noundef null)
  %76 = load ptr, ptr %7, align 8, !tbaa !11
  %77 = getelementptr inbounds [3 x i32], ptr %5, i64 0, i64 0
  %78 = ptrtoint ptr %76 to i64
  %79 = ptrtoint ptr %77 to i64
  %80 = sub i64 %78, %79
  %81 = sdiv exact i64 %80, 4
  %82 = icmp eq i64 %81, 3
  br i1 %82, label %83, label %84

83:                                               ; preds = %70
  br label %85

84:                                               ; preds = %70
  call void @__assert_fail(ptr noundef @.str.70, ptr noundef @.str.1, i32 noundef 400, ptr noundef @__PRETTY_FUNCTION__.test_partition) #6
  unreachable

85:                                               ; preds = %83
  %86 = load ptr, ptr %8, align 8, !tbaa !11
  %87 = getelementptr inbounds [3 x i32], ptr %6, i64 0, i64 0
  %88 = ptrtoint ptr %86 to i64
  %89 = ptrtoint ptr %87 to i64
  %90 = sub i64 %88, %89
  %91 = sdiv exact i64 %90, 4
  %92 = icmp eq i64 %91, 3
  br i1 %92, label %93, label %94

93:                                               ; preds = %85
  br label %95

94:                                               ; preds = %85
  call void @__assert_fail(ptr noundef @.str.71, ptr noundef @.str.1, i32 noundef 401, ptr noundef @__PRETTY_FUNCTION__.test_partition) #6
  unreachable

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

96:                                               ; preds = %119, %95
  %97 = load i32, ptr %9, align 4, !tbaa !5
  %98 = icmp slt i32 %97, 3
  br i1 %98, label %100, label %99

99:                                               ; preds = %96
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %122

100:                                              ; preds = %96
  %101 = load i32, ptr %9, align 4, !tbaa !5
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds [3 x i32], ptr %5, i64 0, i64 %102
  %104 = load i32, ptr %103, align 4, !tbaa !5
  %105 = srem i32 %104, 2
  %106 = icmp eq i32 %105, 1
  br i1 %106, label %107, label %108

107:                                              ; preds = %100
  br label %109

108:                                              ; preds = %100
  call void @__assert_fail(ptr noundef @.str.72, ptr noundef @.str.1, i32 noundef 404, ptr noundef @__PRETTY_FUNCTION__.test_partition) #6
  unreachable

109:                                              ; preds = %107
  %110 = load i32, ptr %9, align 4, !tbaa !5
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [3 x i32], ptr %6, i64 0, i64 %111
  %113 = load i32, ptr %112, align 4, !tbaa !5
  %114 = srem i32 %113, 2
  %115 = icmp eq i32 %114, 0
  br i1 %115, label %116, label %117

116:                                              ; preds = %109
  br label %118

117:                                              ; preds = %109
  call void @__assert_fail(ptr noundef @.str.73, ptr noundef @.str.1, i32 noundef 405, ptr noundef @__PRETTY_FUNCTION__.test_partition) #6
  unreachable

118:                                              ; preds = %116
  br label %119

119:                                              ; preds = %118
  %120 = load i32, ptr %9, align 4, !tbaa !5
  %121 = add nsw i32 %120, 1
  store i32 %121, ptr %9, align 4, !tbaa !5
  br label %96, !llvm.loop !13

122:                                              ; preds = %99
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #5
  ret void
}

declare ptr @intv_partition(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #4

declare i32 @intv_is_partitioned(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #4

declare ptr @intv_partition_point(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #4

declare void @intv_partition_copy(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #4

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = { noreturn nounwind "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 = { "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 }
attributes #6 = { noreturn 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/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = distinct !{!13, !10}


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

@.str.1 = external hidden unnamed_addr constant [74 x i8], align 1
@__const.test_partition.numbers = external hidden unnamed_addr constant [6 x i32], align 16
@.str.64 = external hidden unnamed_addr constant [20 x i8], align 1
@__PRETTY_FUNCTION__.test_partition = external hidden unnamed_addr constant [26 x i8], align 1
@.str.65 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.66 = external hidden unnamed_addr constant [62 x i8], align 1
@.str.67 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.68 = external hidden unnamed_addr constant [21 x i8], align 1
@__const.test_partition.numbers.69 = external hidden unnamed_addr constant [6 x i32], align 16
@.str.70 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.71 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.72 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.73 = external hidden unnamed_addr constant [17 x i8], align 1

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

; Function Attrs: nounwind uwtable
declare hidden i32 @pred_is_even(ptr noundef, ptr noundef) #2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #3

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

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
define dso_local void @test_partition() local_unnamed_addr #2 {
  %1 = alloca [6 x i32], align 16
  %2 = alloca [6 x i32], align 16
  %3 = alloca [3 x i32], align 4
  %4 = alloca [3 x i32], align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %1) #6
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(24) %1, ptr noundef nonnull align 16 dereferenceable(24) @__const.test_partition.numbers, i64 24, i1 false)
  %7 = getelementptr inbounds i8, ptr %1, i64 24
  %8 = call ptr @intv_partition(ptr noundef nonnull %1, ptr noundef nonnull %7, ptr noundef nonnull @pred_is_even, ptr noundef null) #6
  %9 = load i32, ptr %1, align 16, !tbaa !5
  %10 = and i32 %9, 1
  %11 = icmp eq i32 %10, 0
  br i1 %11, label %35, label %34

12:                                               ; preds = %35
  %13 = getelementptr inbounds i8, ptr %1, i64 4
  %14 = load i32, ptr %13, align 4, !tbaa !5
  %15 = and i32 %14, 1
  %16 = icmp eq i32 %15, 0
  br i1 %16, label %17, label %34

17:                                               ; preds = %12
  %18 = getelementptr inbounds i8, ptr %1, i64 16
  %19 = load i32, ptr %18, align 16, !tbaa !5
  %20 = and i32 %19, -2147483647
  %21 = icmp eq i32 %20, 1
  br i1 %21, label %22, label %40

22:                                               ; preds = %17
  %23 = getelementptr inbounds i8, ptr %1, i64 8
  %24 = load i32, ptr %23, align 8, !tbaa !5
  %25 = and i32 %24, 1
  %26 = icmp eq i32 %25, 0
  br i1 %26, label %27, label %34

27:                                               ; preds = %22
  %28 = getelementptr inbounds i8, ptr %1, i64 20
  %29 = load i32, ptr %28, align 4, !tbaa !5
  %30 = and i32 %29, -2147483647
  %31 = icmp eq i32 %30, 1
  br i1 %31, label %32, label %40

32:                                               ; preds = %27
  %33 = call i32 @intv_is_partitioned(ptr noundef nonnull %1, ptr noundef nonnull %7, ptr noundef nonnull @pred_is_even, ptr noundef null) #6
  %.not = icmp eq i32 %33, 0
  br i1 %.not, label %41, label %42

34:                                               ; preds = %22, %12, %0
  call void @__assert_fail(ptr noundef nonnull @.str.64, ptr noundef nonnull @.str.1, i32 noundef 378, ptr noundef nonnull @__PRETTY_FUNCTION__.test_partition) #7
  unreachable

35:                                               ; preds = %0
  %36 = getelementptr inbounds i8, ptr %1, i64 12
  %37 = load i32, ptr %36, align 4, !tbaa !5
  %38 = and i32 %37, -2147483647
  %39 = icmp eq i32 %38, 1
  br i1 %39, label %12, label %40

40:                                               ; preds = %27, %17, %35
  call void @__assert_fail(ptr noundef nonnull @.str.65, ptr noundef nonnull @.str.1, i32 noundef 379, ptr noundef nonnull @__PRETTY_FUNCTION__.test_partition) #7
  unreachable

41:                                               ; preds = %32
  call void @__assert_fail(ptr noundef nonnull @.str.66, ptr noundef nonnull @.str.1, i32 noundef 382, ptr noundef nonnull @__PRETTY_FUNCTION__.test_partition) #7
  unreachable

42:                                               ; preds = %32
  %43 = call ptr @intv_partition_point(ptr noundef nonnull %1, ptr noundef nonnull %7, ptr noundef nonnull @pred_is_even, ptr noundef null) #6
  %44 = ptrtoint ptr %43 to i64
  %45 = ptrtoint ptr %1 to i64
  %46 = sub i64 %44, %45
  %47 = ashr exact i64 %46, 2
  %48 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.67, i64 noundef %47)
  %49 = icmp eq i64 %46, 12
  br i1 %49, label %51, label %50

50:                                               ; preds = %42
  call void @__assert_fail(ptr noundef nonnull @.str.68, ptr noundef nonnull @.str.1, i32 noundef 387, ptr noundef nonnull @__PRETTY_FUNCTION__.test_partition) #7
  unreachable

51:                                               ; preds = %42
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #6
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(24) %2, ptr noundef nonnull align 16 dereferenceable(24) @__const.test_partition.numbers.69, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  store ptr %3, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  store ptr %4, ptr %6, align 8, !tbaa !9
  %52 = getelementptr inbounds i8, ptr %2, i64 24
  call void @intv_partition_copy(ptr noundef nonnull %2, ptr noundef nonnull %52, ptr noundef nonnull %6, ptr noundef nonnull %5, ptr noundef nonnull @pred_is_even, ptr noundef null) #6
  %53 = load ptr, ptr %5, align 8, !tbaa !9
  %54 = ptrtoint ptr %53 to i64
  %55 = ptrtoint ptr %3 to i64
  %56 = sub i64 %54, %55
  %57 = icmp eq i64 %56, 12
  br i1 %57, label %59, label %58

58:                                               ; preds = %51
  call void @__assert_fail(ptr noundef nonnull @.str.70, ptr noundef nonnull @.str.1, i32 noundef 400, ptr noundef nonnull @__PRETTY_FUNCTION__.test_partition) #7
  unreachable

59:                                               ; preds = %51
  %60 = load ptr, ptr %6, align 8, !tbaa !9
  %61 = ptrtoint ptr %60 to i64
  %62 = ptrtoint ptr %4 to i64
  %63 = sub i64 %61, %62
  %64 = icmp eq i64 %63, 12
  br i1 %64, label %.preheader.preheader, label %68

.preheader.preheader:                             ; preds = %59
  %65 = load i32, ptr %3, align 4, !tbaa !5
  %66 = and i32 %65, -2147483647
  %67 = icmp eq i32 %66, 1
  br i1 %67, label %89, label %88

68:                                               ; preds = %59
  call void @__assert_fail(ptr noundef nonnull @.str.71, ptr noundef nonnull @.str.1, i32 noundef 401, ptr noundef nonnull @__PRETTY_FUNCTION__.test_partition) #7
  unreachable

.preheader.1:                                     ; preds = %89
  %69 = getelementptr inbounds i8, ptr %3, i64 4
  %70 = load i32, ptr %69, align 4, !tbaa !5
  %71 = and i32 %70, -2147483647
  %72 = icmp eq i32 %71, 1
  br i1 %72, label %73, label %88

73:                                               ; preds = %.preheader.1
  %74 = getelementptr inbounds i8, ptr %4, i64 4
  %75 = load i32, ptr %74, align 4, !tbaa !5
  %76 = and i32 %75, 1
  %77 = icmp eq i32 %76, 0
  br i1 %77, label %.preheader.2, label %93

.preheader.2:                                     ; preds = %73
  %78 = getelementptr inbounds i8, ptr %3, i64 8
  %79 = load i32, ptr %78, align 4, !tbaa !5
  %80 = and i32 %79, -2147483647
  %81 = icmp eq i32 %80, 1
  br i1 %81, label %82, label %88

82:                                               ; preds = %.preheader.2
  %83 = getelementptr inbounds i8, ptr %4, i64 8
  %84 = load i32, ptr %83, align 4, !tbaa !5
  %85 = and i32 %84, 1
  %86 = icmp eq i32 %85, 0
  br i1 %86, label %87, label %93

87:                                               ; preds = %82
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #6
  ret void

88:                                               ; preds = %.preheader.2, %.preheader.1, %.preheader.preheader
  call void @__assert_fail(ptr noundef nonnull @.str.72, ptr noundef nonnull @.str.1, i32 noundef 404, ptr noundef nonnull @__PRETTY_FUNCTION__.test_partition) #7
  unreachable

89:                                               ; preds = %.preheader.preheader
  %90 = load i32, ptr %4, align 4, !tbaa !5
  %91 = and i32 %90, 1
  %92 = icmp eq i32 %91, 0
  br i1 %92, label %.preheader.1, label %93

93:                                               ; preds = %82, %73, %89
  call void @__assert_fail(ptr noundef nonnull @.str.73, ptr noundef nonnull @.str.1, i32 noundef 405, ptr noundef nonnull @__PRETTY_FUNCTION__.test_partition) #7
  unreachable
}

declare ptr @intv_partition(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #5

declare i32 @intv_is_partitioned(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #5

declare ptr @intv_partition_point(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #5

declare void @intv_partition_copy(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #5

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = { noreturn nounwind "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 = { nofree nounwind "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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }
attributes #7 = { noreturn 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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,LoopRotatePass,LoopSimplifyPass,SROAPass,SimplifyCFGPass