; LLVM IR from themisvaltinos/Partitioned-Hash-Join :: tests (test_partition)

; 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.join_relation = type { ptr, i32 }
%struct.tuple = type { i32, i32 }

@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [93 x i8], align 1
@l2size = external dso_local global i32, align 4
@.str.50 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.51 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.52 = external hidden unnamed_addr constant [13 x i8], align 1
@__PRETTY_FUNCTION__.testPartition = external hidden unnamed_addr constant [25 x i8], align 1
@.str.53 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.54 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.55 = external hidden unnamed_addr constant [65 x i8], align 1
@.str.56 = external hidden unnamed_addr constant [73 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local i32 @acutest_check_(i32 noundef, ptr noundef, i32 noundef, ptr noundef, ...) #0

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

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

; Function Attrs: noreturn nounwind uwtable
declare dso_local void @acutest_abort_() #2

declare i32 @fclose(ptr noundef) #3

; Function Attrs: nounwind uwtable
declare dso_local void @_parseTestCase(ptr noundef, ptr noundef, ptr noundef) #0

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

; Function Attrs: nounwind uwtable
declare dso_local zeroext i1 @_consumedComment(ptr noundef) #0

; Function Attrs: nounwind
declare i32 @feof(ptr noundef) #5

; Function Attrs: nounwind uwtable
define dso_local void @testPartition() #0 {
  %1 = alloca ptr, align 8
  %2 = alloca ptr, align 8
  %3 = alloca %struct.join_relation, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i8, align 1
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #7
  %8 = call noalias ptr @fopen(ptr noundef @.str.50, ptr noundef @.str.51)
  store ptr %8, ptr %1, align 8, !tbaa !5
  %9 = load ptr, ptr %1, align 8, !tbaa !5
  %10 = icmp ne ptr %9, null
  br i1 %10, label %11, label %12

11:                                               ; preds = %0
  br label %13

12:                                               ; preds = %0
  call void @__assert_fail(ptr noundef @.str.52, ptr noundef @.str.38, i32 noundef 58, ptr noundef @__PRETTY_FUNCTION__.testPartition) #8
  unreachable

13:                                               ; preds = %11
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #7
  store ptr null, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %3) #7
  call void @llvm.memset.p0.i64(ptr align 8 %3, i8 0, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  %14 = call ptr @initializeScheduler(i64 noundef 4)
  store ptr %14, ptr %4, align 8, !tbaa !5
  br label %15

15:                                               ; preds = %124, %27, %13
  %16 = load ptr, ptr %1, align 8, !tbaa !5
  %17 = call i32 @feof(ptr noundef %16) #7
  %18 = icmp ne i32 %17, 0
  %19 = xor i1 %18, true
  br i1 %19, label %20, label %129

20:                                               ; preds = %15
  %21 = load ptr, ptr %1, align 8, !tbaa !5
  %22 = call zeroext i1 @_consumedComment(ptr noundef %21)
  br i1 %22, label %27, label %23

23:                                               ; preds = %20
  %24 = load ptr, ptr %1, align 8, !tbaa !5
  %25 = call i32 @feof(ptr noundef %24) #7
  %26 = icmp ne i32 %25, 0
  br i1 %26, label %27, label %28

27:                                               ; preds = %23, %20
  br label %15, !llvm.loop !9

28:                                               ; preds = %23
  %29 = load ptr, ptr %1, align 8, !tbaa !5
  call void @_parseTestCase(ptr noundef %29, ptr noundef %3, ptr noundef %2)
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  %30 = load ptr, ptr %4, align 8, !tbaa !5
  %31 = call ptr @partition(ptr noundef %3, i1 noundef zeroext true, i1 noundef zeroext false, ptr noundef %5, ptr noundef %30)
  store ptr %31, ptr %6, align 8, !tbaa !5
  br label %32

32:                                               ; preds = %28
  %33 = load ptr, ptr %6, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.join_relation, ptr %33, i32 0, i32 1
  %35 = load i32, ptr %34, align 8, !tbaa !11
  %36 = getelementptr inbounds %struct.join_relation, ptr %3, i32 0, i32 1
  %37 = load i32, ptr %36, align 8, !tbaa !11
  %38 = icmp eq i32 %35, %37
  %39 = zext i1 %38 to i32
  %40 = call i32 (i32, ptr, i32, ptr, ...) @acutest_check_(i32 noundef %39, ptr noundef @.str.38, i32 noundef 76, ptr noundef @.str.5, ptr noundef @.str.53)
  %41 = icmp ne i32 %40, 0
  br i1 %41, label %43, label %42

42:                                               ; preds = %32
  call void @acutest_abort_() #9
  unreachable

43:                                               ; preds = %32
  br label %44

44:                                               ; preds = %43
  br label %45

45:                                               ; preds = %44
  br label %46

46:                                               ; preds = %45
  %47 = load i32, ptr @l2size, align 4, !tbaa !14
  %48 = icmp eq i32 %47, 0
  br i1 %48, label %49, label %54

49:                                               ; preds = %46
  %50 = load i8, ptr %5, align 1, !tbaa !15
  %51 = zext i8 %50 to i32
  %52 = icmp eq i32 %51, 2
  %53 = zext i1 %52 to i32
  br label %59

54:                                               ; preds = %46
  %55 = load i8, ptr %5, align 1, !tbaa !15
  %56 = zext i8 %55 to i32
  %57 = icmp eq i32 %56, 1
  %58 = zext i1 %57 to i32
  br label %59

59:                                               ; preds = %54, %49
  %60 = phi i32 [ %53, %49 ], [ %58, %54 ]
  %61 = call i32 (i32, ptr, i32, ptr, ...) @acutest_check_(i32 noundef %60, ptr noundef @.str.38, i32 noundef 77, ptr noundef @.str.5, ptr noundef @.str.54)
  %62 = icmp ne i32 %61, 0
  br i1 %62, label %64, label %63

63:                                               ; preds = %59
  call void @acutest_abort_() #9
  unreachable

64:                                               ; preds = %59
  br label %65

65:                                               ; preds = %64
  br label %66

66:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  store i32 0, ptr %7, align 4, !tbaa !14
  br label %67

67:                                               ; preds = %121, %66
  %68 = load i32, ptr %7, align 4, !tbaa !14
  %69 = load ptr, ptr %6, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.join_relation, ptr %69, i32 0, i32 1
  %71 = load i32, ptr %70, align 8, !tbaa !11
  %72 = icmp ult i32 %68, %71
  br i1 %72, label %74, label %73

73:                                               ; preds = %67
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %124

74:                                               ; preds = %67
  br label %75

75:                                               ; preds = %74
  %76 = load ptr, ptr %6, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.join_relation, ptr %76, i32 0, i32 0
  %78 = load ptr, ptr %77, align 8, !tbaa !16
  %79 = load i32, ptr %7, align 4, !tbaa !14
  %80 = zext i32 %79 to i64
  %81 = getelementptr inbounds %struct.tuple, ptr %78, i64 %80
  %82 = getelementptr inbounds %struct.tuple, ptr %81, i32 0, i32 0
  %83 = load i32, ptr %82, align 4, !tbaa !17
  %84 = load ptr, ptr %2, align 8, !tbaa !5
  %85 = load i32, ptr %7, align 4, !tbaa !14
  %86 = zext i32 %85 to i64
  %87 = getelementptr inbounds %struct.tuple, ptr %84, i64 %86
  %88 = getelementptr inbounds %struct.tuple, ptr %87, i32 0, i32 0
  %89 = load i32, ptr %88, align 4, !tbaa !17
  %90 = icmp eq i32 %83, %89
  %91 = zext i1 %90 to i32
  %92 = call i32 (i32, ptr, i32, ptr, ...) @acutest_check_(i32 noundef %91, ptr noundef @.str.38, i32 noundef 80, ptr noundef @.str.5, ptr noundef @.str.55)
  %93 = icmp ne i32 %92, 0
  br i1 %93, label %95, label %94

94:                                               ; preds = %75
  call void @acutest_abort_() #9
  unreachable

95:                                               ; preds = %75
  br label %96

96:                                               ; preds = %95
  br label %97

97:                                               ; preds = %96
  br label %98

98:                                               ; preds = %97
  %99 = load ptr, ptr %6, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.join_relation, ptr %99, i32 0, i32 0
  %101 = load ptr, ptr %100, align 8, !tbaa !16
  %102 = load i32, ptr %7, align 4, !tbaa !14
  %103 = zext i32 %102 to i64
  %104 = getelementptr inbounds %struct.tuple, ptr %101, i64 %103
  %105 = getelementptr inbounds %struct.tuple, ptr %104, i32 0, i32 1
  %106 = load i32, ptr %105, align 4, !tbaa !19
  %107 = load ptr, ptr %2, align 8, !tbaa !5
  %108 = load i32, ptr %7, align 4, !tbaa !14
  %109 = zext i32 %108 to i64
  %110 = getelementptr inbounds %struct.tuple, ptr %107, i64 %109
  %111 = getelementptr inbounds %struct.tuple, ptr %110, i32 0, i32 1
  %112 = load i32, ptr %111, align 4, !tbaa !19
  %113 = icmp eq i32 %106, %112
  %114 = zext i1 %113 to i32
  %115 = call i32 (i32, ptr, i32, ptr, ...) @acutest_check_(i32 noundef %114, ptr noundef @.str.38, i32 noundef 81, ptr noundef @.str.5, ptr noundef @.str.56)
  %116 = icmp ne i32 %115, 0
  br i1 %116, label %118, label %117

117:                                              ; preds = %98
  call void @acutest_abort_() #9
  unreachable

118:                                              ; preds = %98
  br label %119

119:                                              ; preds = %118
  br label %120

120:                                              ; preds = %119
  br label %121

121:                                              ; preds = %120
  %122 = load i32, ptr %7, align 4, !tbaa !14
  %123 = add i32 %122, 1
  store i32 %123, ptr %7, align 4, !tbaa !14
  br label %67, !llvm.loop !20

124:                                              ; preds = %73
  %125 = load ptr, ptr %6, align 8, !tbaa !5
  call void @destroyJoinRelation(ptr noundef %125)
  %126 = load ptr, ptr %2, align 8, !tbaa !5
  call void @free(ptr noundef %126) #7
  %127 = getelementptr inbounds %struct.join_relation, ptr %3, i32 0, i32 0
  %128 = load ptr, ptr %127, align 8, !tbaa !16
  call void @free(ptr noundef %128) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #7
  br label %15, !llvm.loop !9

129:                                              ; preds = %15
  %130 = load ptr, ptr %4, align 8, !tbaa !5
  call void @destroyScheduler(ptr noundef %130)
  %131 = load ptr, ptr %1, align 8, !tbaa !5
  %132 = call i32 @fclose(ptr noundef %131)
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #7
  ret void
}

declare noalias ptr @fopen(ptr noundef, ptr noundef) #3

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

declare ptr @initializeScheduler(i64 noundef) #3

declare ptr @partition(ptr noundef, i1 noundef zeroext, i1 noundef zeroext, ptr noundef, ptr noundef) #3

declare void @destroyJoinRelation(ptr noundef) #3

; Function Attrs: nounwind
declare void @free(ptr noundef) #5

declare void @destroyScheduler(ptr noundef) #3

attributes #0 = { 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { noreturn 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 = { "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 = { 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 #5 = { 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 #6 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { nounwind }
attributes #8 = { noreturn nounwind }
attributes #9 = { noreturn }

!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/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !13, i64 8}
!12 = !{!"join_relation", !6, i64 0, !13, i64 8}
!13 = !{!"int", !7, i64 0}
!14 = !{!13, !13, i64 0}
!15 = !{!7, !7, i64 0}
!16 = !{!12, !6, i64 0}
!17 = !{!18, !13, i64 0}
!18 = !{!"tuple", !13, i64 0, !13, i64 4}
!19 = !{!18, !13, i64 4}
!20 = distinct !{!20, !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"

%struct.join_relation = type { ptr, i32 }
%struct.tuple = type { i32, i32 }

@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [93 x i8], align 1
@l2size = external dso_local local_unnamed_addr global i32, align 4
@.str.50 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.51 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.52 = external hidden unnamed_addr constant [13 x i8], align 1
@__PRETTY_FUNCTION__.testPartition = external hidden unnamed_addr constant [25 x i8], align 1
@.str.53 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.54 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.55 = external hidden unnamed_addr constant [65 x i8], align 1
@.str.56 = external hidden unnamed_addr constant [73 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local i32 @acutest_check_(i32 noundef, ptr noundef, i32 noundef, ptr noundef, ...) local_unnamed_addr #0

; 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: noreturn nounwind uwtable
declare dso_local void @acutest_abort_() local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noundef i32 @fclose(ptr nocapture noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare dso_local void @_parseTestCase(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

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

; Function Attrs: nounwind uwtable
declare dso_local zeroext i1 @_consumedComment(ptr noundef) local_unnamed_addr #0

; Function Attrs: nofree nounwind
declare noundef i32 @feof(ptr nocapture noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
define dso_local void @testPartition() local_unnamed_addr #0 {
  %1 = alloca ptr, align 8
  %2 = alloca %struct.join_relation, align 8
  %3 = alloca i8, align 1
  %4 = tail call noalias ptr @fopen(ptr noundef nonnull @.str.50, ptr noundef nonnull @.str.51)
  %.not = icmp eq ptr %4, null
  br i1 %.not, label %5, label %6

5:                                                ; preds = %0
  tail call void @__assert_fail(ptr noundef nonnull @.str.52, ptr noundef nonnull @.str.38, i32 noundef 58, ptr noundef nonnull @__PRETTY_FUNCTION__.testPartition) #8
  unreachable

6:                                                ; preds = %0
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #9
  store ptr null, ptr %1, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %2) #9
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %2, i8 0, i64 16, i1 false)
  %7 = tail call ptr @initializeScheduler(i64 noundef 4) #9
  %8 = tail call i32 @feof(ptr noundef nonnull %4) #9
  %.not1926 = icmp eq i32 %8, 0
  br i1 %.not1926, label %.lr.ph28, label %._crit_edge29

.lr.ph28:                                         ; preds = %6
  %9 = getelementptr inbounds i8, ptr %2, i64 8
  br label %10

10:                                               ; preds = %.lr.ph28, %.backedge
  %11 = call zeroext i1 @_consumedComment(ptr noundef nonnull %4)
  br i1 %11, label %.backedge, label %12

12:                                               ; preds = %10
  %13 = call i32 @feof(ptr noundef nonnull %4) #9
  %.not20 = icmp eq i32 %13, 0
  br i1 %.not20, label %15, label %.backedge

.backedge:                                        ; preds = %10, %12, %._crit_edge
  %14 = call i32 @feof(ptr noundef nonnull %4) #9
  %.not19 = icmp eq i32 %14, 0
  br i1 %.not19, label %10, label %._crit_edge29, !llvm.loop !9

15:                                               ; preds = %12
  call void @_parseTestCase(ptr noundef nonnull %4, ptr noundef nonnull %2, ptr noundef nonnull %1)
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #9
  %16 = call ptr @partition(ptr noundef nonnull %2, i1 noundef zeroext true, i1 noundef zeroext false, ptr noundef nonnull %3, ptr noundef %7) #9
  %17 = getelementptr inbounds i8, ptr %16, i64 8
  %18 = load i32, ptr %17, align 8, !tbaa !11
  %19 = load i32, ptr %9, align 8, !tbaa !11
  %20 = icmp eq i32 %18, %19
  %21 = zext i1 %20 to i32
  %22 = call i32 (i32, ptr, i32, ptr, ...) @acutest_check_(i32 noundef %21, ptr noundef nonnull @.str.38, i32 noundef 76, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.53)
  %.not21 = icmp eq i32 %22, 0
  br i1 %.not21, label %23, label %24

23:                                               ; preds = %15
  call void @acutest_abort_() #10
  unreachable

24:                                               ; preds = %15
  %25 = load i32, ptr @l2size, align 4, !tbaa !14
  %26 = icmp eq i32 %25, 0
  %27 = load i8, ptr %3, align 1
  %.in.v = select i1 %26, i8 2, i8 1
  %.in = icmp eq i8 %27, %.in.v
  %28 = zext i1 %.in to i32
  %29 = call i32 (i32, ptr, i32, ptr, ...) @acutest_check_(i32 noundef %28, ptr noundef nonnull @.str.38, i32 noundef 77, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.54)
  %.not22 = icmp eq i32 %29, 0
  br i1 %.not22, label %31, label %.preheader

.preheader:                                       ; preds = %24
  %30 = load i32, ptr %17, align 8, !tbaa !11
  %.not30 = icmp eq i32 %30, 0
  br i1 %.not30, label %._crit_edge, label %.lr.ph

31:                                               ; preds = %24
  call void @acutest_abort_() #10
  unreachable

32:                                               ; preds = %48
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %33 = load i32, ptr %17, align 8, !tbaa !11
  %34 = zext i32 %33 to i64
  %35 = icmp ult i64 %indvars.iv.next, %34
  br i1 %35, label %.lr.ph, label %._crit_edge, !llvm.loop !15

._crit_edge:                                      ; preds = %32, %.preheader
  call void @destroyJoinRelation(ptr noundef nonnull %16) #9
  %36 = load ptr, ptr %1, align 8, !tbaa !5
  call void @free(ptr noundef %36) #9
  %37 = load ptr, ptr %2, align 8, !tbaa !16
  call void @free(ptr noundef %37) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #9
  br label %.backedge

.lr.ph:                                           ; preds = %.preheader, %32
  %indvars.iv = phi i64 [ %indvars.iv.next, %32 ], [ 0, %.preheader ]
  %38 = load ptr, ptr %16, align 8, !tbaa !16
  %39 = getelementptr inbounds %struct.tuple, ptr %38, i64 %indvars.iv
  %40 = load i32, ptr %39, align 4, !tbaa !17
  %41 = load ptr, ptr %1, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.tuple, ptr %41, i64 %indvars.iv
  %43 = load i32, ptr %42, align 4, !tbaa !17
  %44 = icmp eq i32 %40, %43
  %45 = zext i1 %44 to i32
  %46 = call i32 (i32, ptr, i32, ptr, ...) @acutest_check_(i32 noundef %45, ptr noundef nonnull @.str.38, i32 noundef 80, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.55)
  %.not23 = icmp eq i32 %46, 0
  br i1 %.not23, label %47, label %48

47:                                               ; preds = %.lr.ph
  call void @acutest_abort_() #10
  unreachable

48:                                               ; preds = %.lr.ph
  %49 = load ptr, ptr %16, align 8, !tbaa !16
  %50 = getelementptr inbounds %struct.tuple, ptr %49, i64 %indvars.iv, i32 1
  %51 = load i32, ptr %50, align 4, !tbaa !19
  %52 = load ptr, ptr %1, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.tuple, ptr %52, i64 %indvars.iv, i32 1
  %54 = load i32, ptr %53, align 4, !tbaa !19
  %55 = icmp eq i32 %51, %54
  %56 = zext i1 %55 to i32
  %57 = call i32 (i32, ptr, i32, ptr, ...) @acutest_check_(i32 noundef %56, ptr noundef nonnull @.str.38, i32 noundef 81, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.56)
  %.not24 = icmp eq i32 %57, 0
  br i1 %.not24, label %58, label %32

58:                                               ; preds = %48
  call void @acutest_abort_() #10
  unreachable

._crit_edge29:                                    ; preds = %.backedge, %6
  call void @destroyScheduler(ptr noundef %7) #9
  %59 = call i32 @fclose(ptr noundef nonnull %4)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #9
  ret void
}

; Function Attrs: nofree nounwind
declare noalias noundef ptr @fopen(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #3

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

declare ptr @initializeScheduler(i64 noundef) local_unnamed_addr #6

declare ptr @partition(ptr noundef, i1 noundef zeroext, i1 noundef zeroext, ptr noundef, ptr noundef) local_unnamed_addr #6

declare void @destroyJoinRelation(ptr noundef) local_unnamed_addr #6

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #7

declare void @destroyScheduler(ptr noundef) local_unnamed_addr #6

attributes #0 = { 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 = { noreturn 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 = { 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 #4 = { 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 #5 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { "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 #7 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 #8 = { noreturn nounwind }
attributes #9 = { nounwind }
attributes #10 = { noreturn }

!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/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !13, i64 8}
!12 = !{!"join_relation", !6, i64 0, !13, i64 8}
!13 = !{!"int", !7, i64 0}
!14 = !{!13, !13, i64 0}
!15 = distinct !{!15, !10}
!16 = !{!12, !6, i64 0}
!17 = !{!18, !13, i64 0}
!18 = !{!"tuple", !13, i64 0, !13, i64 4}
!19 = !{!18, !13, i64 4}


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