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

; 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.relation = type { ptr, i64, i64 }

@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.44 = external hidden unnamed_addr constant [33 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

; Function Attrs: nounwind uwtable
define dso_local void @testLoadRelation() #0 {
  %1 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #5
  %2 = call ptr @loadRelation(ptr noundef @.str.36)
  store ptr %2, ptr %1, align 8, !tbaa !5
  br label %3

3:                                                ; preds = %0
  %4 = load ptr, ptr %1, align 8, !tbaa !5
  %5 = getelementptr inbounds %struct.relation, ptr %4, i32 0, i32 1
  %6 = load i64, ptr %5, align 8, !tbaa !9
  %7 = icmp eq i64 %6, 1561
  %8 = zext i1 %7 to i32
  %9 = call i32 (i32, ptr, i32, ptr, ...) @acutest_check_(i32 noundef %8, ptr noundef @.str.37, i32 noundef 12, ptr noundef @.str.5, ptr noundef @.str.38)
  %10 = icmp ne i32 %9, 0
  br i1 %10, label %12, label %11

11:                                               ; preds = %3
  call void @acutest_abort_() #6
  unreachable

12:                                               ; preds = %3
  br label %13

13:                                               ; preds = %12
  br label %14

14:                                               ; preds = %13
  br label %15

15:                                               ; preds = %14
  %16 = load ptr, ptr %1, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.relation, ptr %16, i32 0, i32 2
  %18 = load i64, ptr %17, align 8, !tbaa !12
  %19 = icmp eq i64 %18, 3
  %20 = zext i1 %19 to i32
  %21 = call i32 (i32, ptr, i32, ptr, ...) @acutest_check_(i32 noundef %20, ptr noundef @.str.37, i32 noundef 13, ptr noundef @.str.5, ptr noundef @.str.39)
  %22 = icmp ne i32 %21, 0
  br i1 %22, label %24, label %23

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

24:                                               ; preds = %15
  br label %25

25:                                               ; preds = %24
  br label %26

26:                                               ; preds = %25
  br label %27

27:                                               ; preds = %26
  %28 = load ptr, ptr %1, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.relation, ptr %28, i32 0, i32 0
  %30 = load ptr, ptr %29, align 8, !tbaa !13
  %31 = getelementptr inbounds ptr, ptr %30, i64 0
  %32 = load ptr, ptr %31, align 8, !tbaa !5
  %33 = getelementptr inbounds i64, ptr %32, i64 0
  %34 = load i64, ptr %33, align 8, !tbaa !14
  %35 = icmp eq i64 %34, 1
  %36 = zext i1 %35 to i32
  %37 = call i32 (i32, ptr, i32, ptr, ...) @acutest_check_(i32 noundef %36, ptr noundef @.str.37, i32 noundef 16, ptr noundef @.str.5, ptr noundef @.str.40)
  %38 = icmp ne i32 %37, 0
  br i1 %38, label %40, label %39

39:                                               ; preds = %27
  call void @acutest_abort_() #6
  unreachable

40:                                               ; preds = %27
  br label %41

41:                                               ; preds = %40
  br label %42

42:                                               ; preds = %41
  br label %43

43:                                               ; preds = %42
  %44 = load ptr, ptr %1, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.relation, ptr %44, i32 0, i32 0
  %46 = load ptr, ptr %45, align 8, !tbaa !13
  %47 = getelementptr inbounds ptr, ptr %46, i64 1
  %48 = load ptr, ptr %47, align 8, !tbaa !5
  %49 = getelementptr inbounds i64, ptr %48, i64 0
  %50 = load i64, ptr %49, align 8, !tbaa !14
  %51 = icmp eq i64 %50, 8463
  %52 = zext i1 %51 to i32
  %53 = call i32 (i32, ptr, i32, ptr, ...) @acutest_check_(i32 noundef %52, ptr noundef @.str.37, i32 noundef 17, ptr noundef @.str.5, ptr noundef @.str.41)
  %54 = icmp ne i32 %53, 0
  br i1 %54, label %56, label %55

55:                                               ; preds = %43
  call void @acutest_abort_() #6
  unreachable

56:                                               ; preds = %43
  br label %57

57:                                               ; preds = %56
  br label %58

58:                                               ; preds = %57
  br label %59

59:                                               ; preds = %58
  %60 = load ptr, ptr %1, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.relation, ptr %60, i32 0, i32 0
  %62 = load ptr, ptr %61, align 8, !tbaa !13
  %63 = getelementptr inbounds ptr, ptr %62, i64 2
  %64 = load ptr, ptr %63, align 8, !tbaa !5
  %65 = getelementptr inbounds i64, ptr %64, i64 0
  %66 = load i64, ptr %65, align 8, !tbaa !14
  %67 = icmp eq i64 %66, 582
  %68 = zext i1 %67 to i32
  %69 = call i32 (i32, ptr, i32, ptr, ...) @acutest_check_(i32 noundef %68, ptr noundef @.str.37, i32 noundef 18, ptr noundef @.str.5, ptr noundef @.str.42)
  %70 = icmp ne i32 %69, 0
  br i1 %70, label %72, label %71

71:                                               ; preds = %59
  call void @acutest_abort_() #6
  unreachable

72:                                               ; preds = %59
  br label %73

73:                                               ; preds = %72
  br label %74

74:                                               ; preds = %73
  br label %75

75:                                               ; preds = %74
  %76 = load ptr, ptr %1, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.relation, ptr %76, i32 0, i32 0
  %78 = load ptr, ptr %77, align 8, !tbaa !13
  %79 = getelementptr inbounds ptr, ptr %78, i64 2
  %80 = load ptr, ptr %79, align 8, !tbaa !5
  %81 = getelementptr inbounds i64, ptr %80, i64 1
  %82 = load i64, ptr %81, align 8, !tbaa !14
  %83 = icmp eq i64 %82, 6962
  %84 = zext i1 %83 to i32
  %85 = call i32 (i32, ptr, i32, ptr, ...) @acutest_check_(i32 noundef %84, ptr noundef @.str.37, i32 noundef 21, ptr noundef @.str.5, ptr noundef @.str.43)
  %86 = icmp ne i32 %85, 0
  br i1 %86, label %88, label %87

87:                                               ; preds = %75
  call void @acutest_abort_() #6
  unreachable

88:                                               ; preds = %75
  br label %89

89:                                               ; preds = %88
  br label %90

90:                                               ; preds = %89
  br label %91

91:                                               ; preds = %90
  %92 = load ptr, ptr %1, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.relation, ptr %92, i32 0, i32 0
  %94 = load ptr, ptr %93, align 8, !tbaa !13
  %95 = getelementptr inbounds ptr, ptr %94, i64 0
  %96 = load ptr, ptr %95, align 8, !tbaa !5
  %97 = getelementptr inbounds i64, ptr %96, i64 2
  %98 = load i64, ptr %97, align 8, !tbaa !14
  %99 = icmp eq i64 %98, 7
  %100 = zext i1 %99 to i32
  %101 = call i32 (i32, ptr, i32, ptr, ...) @acutest_check_(i32 noundef %100, ptr noundef @.str.37, i32 noundef 22, ptr noundef @.str.5, ptr noundef @.str.44)
  %102 = icmp ne i32 %101, 0
  br i1 %102, label %104, label %103

103:                                              ; preds = %91
  call void @acutest_abort_() #6
  unreachable

104:                                              ; preds = %91
  br label %105

105:                                              ; preds = %104
  br label %106

106:                                              ; preds = %105
  %107 = load ptr, ptr %1, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.relation, ptr %107, i32 0, i32 0
  %109 = load ptr, ptr %108, align 8, !tbaa !13
  call void @free(ptr noundef %109) #5
  %110 = load ptr, ptr %1, align 8, !tbaa !5
  call void @free(ptr noundef %110) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #5
  ret void
}

declare ptr @loadRelation(ptr noundef) #3

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

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 = { 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 }
attributes #6 = { 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 = !{!10, !11, i64 8}
!10 = !{!"relation", !6, i64 0, !11, i64 8, !11, i64 16}
!11 = !{!"long", !7, i64 0}
!12 = !{!10, !11, i64 16}
!13 = !{!10, !6, i64 0}
!14 = !{!11, !11, i64 0}


; 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.5 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.44 = external hidden unnamed_addr constant [33 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: noreturn nounwind uwtable
declare dso_local void @acutest_abort_() local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local void @testLoadRelation() local_unnamed_addr #0 {
  %1 = tail call ptr @loadRelation(ptr noundef nonnull @.str.36) #4
  %2 = getelementptr inbounds i8, ptr %1, i64 8
  %3 = load i64, ptr %2, align 8, !tbaa !5
  %4 = icmp eq i64 %3, 1561
  %5 = zext i1 %4 to i32
  %6 = tail call i32 (i32, ptr, i32, ptr, ...) @acutest_check_(i32 noundef %5, ptr noundef nonnull @.str.37, i32 noundef 12, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.38)
  %.not = icmp eq i32 %6, 0
  br i1 %.not, label %7, label %8

7:                                                ; preds = %0
  tail call void @acutest_abort_() #5
  unreachable

8:                                                ; preds = %0
  %9 = getelementptr inbounds i8, ptr %1, i64 16
  %10 = load i64, ptr %9, align 8, !tbaa !11
  %11 = icmp eq i64 %10, 3
  %12 = zext i1 %11 to i32
  %13 = tail call i32 (i32, ptr, i32, ptr, ...) @acutest_check_(i32 noundef %12, ptr noundef nonnull @.str.37, i32 noundef 13, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.39)
  %.not9 = icmp eq i32 %13, 0
  br i1 %.not9, label %14, label %15

14:                                               ; preds = %8
  tail call void @acutest_abort_() #5
  unreachable

15:                                               ; preds = %8
  %16 = load ptr, ptr %1, align 8, !tbaa !12
  %17 = load ptr, ptr %16, align 8, !tbaa !13
  %18 = load i64, ptr %17, align 8, !tbaa !14
  %19 = icmp eq i64 %18, 1
  %20 = zext i1 %19 to i32
  %21 = tail call i32 (i32, ptr, i32, ptr, ...) @acutest_check_(i32 noundef %20, ptr noundef nonnull @.str.37, i32 noundef 16, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.40)
  %.not10 = icmp eq i32 %21, 0
  br i1 %.not10, label %22, label %23

22:                                               ; preds = %15
  tail call void @acutest_abort_() #5
  unreachable

23:                                               ; preds = %15
  %24 = load ptr, ptr %1, align 8, !tbaa !12
  %25 = getelementptr inbounds i8, ptr %24, i64 8
  %26 = load ptr, ptr %25, align 8, !tbaa !13
  %27 = load i64, ptr %26, align 8, !tbaa !14
  %28 = icmp eq i64 %27, 8463
  %29 = zext i1 %28 to i32
  %30 = tail call i32 (i32, ptr, i32, ptr, ...) @acutest_check_(i32 noundef %29, ptr noundef nonnull @.str.37, i32 noundef 17, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.41)
  %.not11 = icmp eq i32 %30, 0
  br i1 %.not11, label %31, label %32

31:                                               ; preds = %23
  tail call void @acutest_abort_() #5
  unreachable

32:                                               ; preds = %23
  %33 = load ptr, ptr %1, align 8, !tbaa !12
  %34 = getelementptr inbounds i8, ptr %33, i64 16
  %35 = load ptr, ptr %34, align 8, !tbaa !13
  %36 = load i64, ptr %35, align 8, !tbaa !14
  %37 = icmp eq i64 %36, 582
  %38 = zext i1 %37 to i32
  %39 = tail call i32 (i32, ptr, i32, ptr, ...) @acutest_check_(i32 noundef %38, ptr noundef nonnull @.str.37, i32 noundef 18, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.42)
  %.not12 = icmp eq i32 %39, 0
  br i1 %.not12, label %40, label %41

40:                                               ; preds = %32
  tail call void @acutest_abort_() #5
  unreachable

41:                                               ; preds = %32
  %42 = load ptr, ptr %1, align 8, !tbaa !12
  %43 = getelementptr inbounds i8, ptr %42, i64 16
  %44 = load ptr, ptr %43, align 8, !tbaa !13
  %45 = getelementptr inbounds i8, ptr %44, i64 8
  %46 = load i64, ptr %45, align 8, !tbaa !14
  %47 = icmp eq i64 %46, 6962
  %48 = zext i1 %47 to i32
  %49 = tail call i32 (i32, ptr, i32, ptr, ...) @acutest_check_(i32 noundef %48, ptr noundef nonnull @.str.37, i32 noundef 21, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.43)
  %.not13 = icmp eq i32 %49, 0
  br i1 %.not13, label %50, label %51

50:                                               ; preds = %41
  tail call void @acutest_abort_() #5
  unreachable

51:                                               ; preds = %41
  %52 = load ptr, ptr %1, align 8, !tbaa !12
  %53 = load ptr, ptr %52, align 8, !tbaa !13
  %54 = getelementptr inbounds i8, ptr %53, i64 16
  %55 = load i64, ptr %54, align 8, !tbaa !14
  %56 = icmp eq i64 %55, 7
  %57 = zext i1 %56 to i32
  %58 = tail call i32 (i32, ptr, i32, ptr, ...) @acutest_check_(i32 noundef %57, ptr noundef nonnull @.str.37, i32 noundef 22, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.44)
  %.not14 = icmp eq i32 %58, 0
  br i1 %.not14, label %59, label %60

59:                                               ; preds = %51
  tail call void @acutest_abort_() #5
  unreachable

60:                                               ; preds = %51
  %61 = load ptr, ptr %1, align 8, !tbaa !12
  tail call void @free(ptr noundef %61) #4
  tail call void @free(ptr noundef nonnull %1) #4
  ret void
}

declare ptr @loadRelation(ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #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 = { 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 #2 = { "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 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 #4 = { nounwind }
attributes #5 = { 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, !10, i64 8}
!6 = !{!"relation", !7, i64 0, !10, i64 8, !10, i64 16}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"long", !8, i64 0}
!11 = !{!6, !10, i64 16}
!12 = !{!6, !7, i64 0}
!13 = !{!7, !7, i64 0}
!14 = !{!10, !10, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass