; LLVM IR from seppo0010/rlite :: tests (hyperloglog-test)

; 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.greatest_run_info = type { i32, i32, i32, i32, i32, i32, %struct.greatest_suite_info, ptr, i32, ptr, ptr, ptr, ptr, ptr, i32, i32, ptr, ptr, i64, i64, [1 x %struct.__jmp_buf_tag] }
%struct.greatest_suite_info = type { i32, i32, i32, i32, i64, i64, i64, i64 }
%struct.__jmp_buf_tag = type { [8 x i64], i32, %struct.__sigset_t }
%struct.__sigset_t = type { [16 x i64] }

@greatest_info = external global %struct.greatest_run_info, align 8
@.str.3 = external hidden unnamed_addr constant [74 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [12 x i8], align 1
@__const.test_hyperloglog_add_merge.argv = external hidden unnamed_addr constant [3 x ptr], align 16
@__const.test_hyperloglog_add_merge.argvlen = external hidden unnamed_addr constant [3 x i64], align 16
@__const.test_hyperloglog_add_merge.argv2 = external hidden unnamed_addr constant [3 x ptr], align 16
@__const.test_hyperloglog_add_merge.argvlen2 = external hidden unnamed_addr constant [3 x i64], align 16
@.str.10 = external hidden unnamed_addr constant [10 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

declare i32 @rl_str_pfadd(ptr noundef, i64 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

declare i32 @rl_str_pfcount(i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @test_hyperloglog_add_merge() #4 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca [3 x ptr], align 16
  %11 = alloca [3 x i64], align 16
  %12 = alloca [3 x ptr], align 16
  %13 = alloca [3 x i64], align 16
  %14 = alloca i32, align 4
  %15 = alloca [2 x ptr], align 16
  %16 = alloca [2 x i64], align 16
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  store ptr null, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  store ptr null, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  store i64 -1, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  store i64 -1, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %10, ptr align 16 @__const.test_hyperloglog_add_merge.argv, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %11, ptr align 16 @__const.test_hyperloglog_add_merge.argvlen, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %12, ptr align 16 @__const.test_hyperloglog_add_merge.argv2, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 24, ptr %13) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %13, ptr align 16 @__const.test_hyperloglog_add_merge.argvlen2, i64 24, i1 false)
  %17 = getelementptr inbounds [3 x ptr], ptr %10, i64 0, i64 0
  %18 = getelementptr inbounds [3 x i64], ptr %11, i64 0, i64 0
  %19 = call i32 @rl_str_pfadd(ptr noundef null, i64 noundef 0, i32 noundef 3, ptr noundef %17, ptr noundef %18, ptr noundef %3, ptr noundef %6)
  store i32 %19, ptr %2, align 4, !tbaa !11
  br label %20

20:                                               ; preds = %0
  %21 = load i32, ptr getelementptr inbounds (%struct.greatest_run_info, ptr @greatest_info, i32 0, i32 5), align 4, !tbaa !13
  %22 = add i32 %21, 1
  store i32 %22, ptr getelementptr inbounds (%struct.greatest_run_info, ptr @greatest_info, i32 0, i32 5), align 4, !tbaa !13
  %23 = load i32, ptr %2, align 4, !tbaa !11
  %24 = icmp ne i32 1, %23
  br i1 %24, label %25, label %29

25:                                               ; preds = %20
  br label %26

26:                                               ; preds = %25
  store ptr @.str.3, ptr getelementptr inbounds (%struct.greatest_run_info, ptr @greatest_info, i32 0, i32 7), align 8, !tbaa !16
  store i32 35, ptr getelementptr inbounds (%struct.greatest_run_info, ptr @greatest_info, i32 0, i32 8), align 8, !tbaa !17
  store ptr @.str.4, ptr getelementptr inbounds (%struct.greatest_run_info, ptr @greatest_info, i32 0, i32 9), align 8, !tbaa !18
  store i32 -1, ptr %1, align 4
  store i32 1, ptr %14, align 4
  br label %100

27:                                               ; No predecessors!
  br label %28

28:                                               ; preds = %27
  br label %29

29:                                               ; preds = %28, %20
  br label %30

30:                                               ; preds = %29
  br label %31

31:                                               ; preds = %30
  %32 = getelementptr inbounds [3 x ptr], ptr %12, i64 0, i64 0
  %33 = getelementptr inbounds [3 x i64], ptr %13, i64 0, i64 0
  %34 = call i32 @rl_str_pfadd(ptr noundef null, i64 noundef 0, i32 noundef 3, ptr noundef %32, ptr noundef %33, ptr noundef %4, ptr noundef %7)
  store i32 %34, ptr %2, align 4, !tbaa !11
  br label %35

35:                                               ; preds = %31
  %36 = load i32, ptr getelementptr inbounds (%struct.greatest_run_info, ptr @greatest_info, i32 0, i32 5), align 4, !tbaa !13
  %37 = add i32 %36, 1
  store i32 %37, ptr getelementptr inbounds (%struct.greatest_run_info, ptr @greatest_info, i32 0, i32 5), align 4, !tbaa !13
  %38 = load i32, ptr %2, align 4, !tbaa !11
  %39 = icmp ne i32 1, %38
  br i1 %39, label %40, label %44

40:                                               ; preds = %35
  br label %41

41:                                               ; preds = %40
  store ptr @.str.3, ptr getelementptr inbounds (%struct.greatest_run_info, ptr @greatest_info, i32 0, i32 7), align 8, !tbaa !16
  store i32 36, ptr getelementptr inbounds (%struct.greatest_run_info, ptr @greatest_info, i32 0, i32 8), align 8, !tbaa !17
  store ptr @.str.4, ptr getelementptr inbounds (%struct.greatest_run_info, ptr @greatest_info, i32 0, i32 9), align 8, !tbaa !18
  store i32 -1, ptr %1, align 4
  store i32 1, ptr %14, align 4
  br label %100

42:                                               ; No predecessors!
  br label %43

43:                                               ; preds = %42
  br label %44

44:                                               ; preds = %43, %35
  br label %45

45:                                               ; preds = %44
  br label %46

46:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #5
  %47 = load ptr, ptr %3, align 8, !tbaa !5
  store ptr %47, ptr %15, align 8, !tbaa !5
  %48 = getelementptr inbounds ptr, ptr %15, i64 1
  %49 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %49, ptr %48, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #5
  %50 = load i64, ptr %6, align 8, !tbaa !9
  store i64 %50, ptr %16, align 8, !tbaa !9
  %51 = getelementptr inbounds i64, ptr %16, i64 1
  %52 = load i64, ptr %7, align 8, !tbaa !9
  store i64 %52, ptr %51, align 8, !tbaa !9
  %53 = getelementptr inbounds [2 x ptr], ptr %15, i64 0, i64 0
  %54 = getelementptr inbounds [2 x i64], ptr %16, i64 0, i64 0
  %55 = call i32 @rl_str_pfmerge(i32 noundef 2, ptr noundef %53, ptr noundef %54, ptr noundef %5, ptr noundef %8)
  store i32 %55, ptr %2, align 4, !tbaa !11
  br label %56

56:                                               ; preds = %46
  %57 = load i32, ptr getelementptr inbounds (%struct.greatest_run_info, ptr @greatest_info, i32 0, i32 5), align 4, !tbaa !13
  %58 = add i32 %57, 1
  store i32 %58, ptr getelementptr inbounds (%struct.greatest_run_info, ptr @greatest_info, i32 0, i32 5), align 4, !tbaa !13
  %59 = load i32, ptr %2, align 4, !tbaa !11
  %60 = icmp ne i32 0, %59
  br i1 %60, label %61, label %65

61:                                               ; preds = %56
  br label %62

62:                                               ; preds = %61
  store ptr @.str.3, ptr getelementptr inbounds (%struct.greatest_run_info, ptr @greatest_info, i32 0, i32 7), align 8, !tbaa !16
  store i32 39, ptr getelementptr inbounds (%struct.greatest_run_info, ptr @greatest_info, i32 0, i32 8), align 8, !tbaa !17
  store ptr @.str.5, ptr getelementptr inbounds (%struct.greatest_run_info, ptr @greatest_info, i32 0, i32 9), align 8, !tbaa !18
  store i32 -1, ptr %1, align 4
  store i32 1, ptr %14, align 4
  br label %99

63:                                               ; No predecessors!
  br label %64

64:                                               ; preds = %63
  br label %65

65:                                               ; preds = %64, %56
  br label %66

66:                                               ; preds = %65
  br label %67

67:                                               ; preds = %66
  %68 = call i32 @rl_str_pfcount(i32 noundef 1, ptr noundef %5, ptr noundef %8, ptr noundef %9, ptr noundef null, ptr noundef null)
  store i32 %68, ptr %2, align 4, !tbaa !11
  br label %69

69:                                               ; preds = %67
  %70 = load i32, ptr getelementptr inbounds (%struct.greatest_run_info, ptr @greatest_info, i32 0, i32 5), align 4, !tbaa !13
  %71 = add i32 %70, 1
  store i32 %71, ptr getelementptr inbounds (%struct.greatest_run_info, ptr @greatest_info, i32 0, i32 5), align 4, !tbaa !13
  %72 = load i32, ptr %2, align 4, !tbaa !11
  %73 = icmp ne i32 0, %72
  br i1 %73, label %74, label %78

74:                                               ; preds = %69
  br label %75

75:                                               ; preds = %74
  store ptr @.str.3, ptr getelementptr inbounds (%struct.greatest_run_info, ptr @greatest_info, i32 0, i32 7), align 8, !tbaa !16
  store i32 40, ptr getelementptr inbounds (%struct.greatest_run_info, ptr @greatest_info, i32 0, i32 8), align 8, !tbaa !17
  store ptr @.str.5, ptr getelementptr inbounds (%struct.greatest_run_info, ptr @greatest_info, i32 0, i32 9), align 8, !tbaa !18
  store i32 -1, ptr %1, align 4
  store i32 1, ptr %14, align 4
  br label %99

76:                                               ; No predecessors!
  br label %77

77:                                               ; preds = %76
  br label %78

78:                                               ; preds = %77, %69
  br label %79

79:                                               ; preds = %78
  br label %80

80:                                               ; preds = %79
  br label %81

81:                                               ; preds = %80
  %82 = load i32, ptr getelementptr inbounds (%struct.greatest_run_info, ptr @greatest_info, i32 0, i32 5), align 4, !tbaa !13
  %83 = add i32 %82, 1
  store i32 %83, ptr getelementptr inbounds (%struct.greatest_run_info, ptr @greatest_info, i32 0, i32 5), align 4, !tbaa !13
  %84 = load i64, ptr %9, align 8, !tbaa !9
  %85 = icmp ne i64 %84, 6
  br i1 %85, label %86, label %90

86:                                               ; preds = %81
  br label %87

87:                                               ; preds = %86
  store ptr @.str.3, ptr getelementptr inbounds (%struct.greatest_run_info, ptr @greatest_info, i32 0, i32 7), align 8, !tbaa !16
  store i32 41, ptr getelementptr inbounds (%struct.greatest_run_info, ptr @greatest_info, i32 0, i32 8), align 8, !tbaa !17
  store ptr @.str.10, ptr getelementptr inbounds (%struct.greatest_run_info, ptr @greatest_info, i32 0, i32 9), align 8, !tbaa !18
  store i32 -1, ptr %1, align 4
  store i32 1, ptr %14, align 4
  br label %99

88:                                               ; No predecessors!
  br label %89

89:                                               ; preds = %88
  br label %90

90:                                               ; preds = %89, %81
  br label %91

91:                                               ; preds = %90
  br label %92

92:                                               ; preds = %91
  %93 = load ptr, ptr %3, align 8, !tbaa !5
  call void @free(ptr noundef %93) #5
  %94 = load ptr, ptr %4, align 8, !tbaa !5
  call void @free(ptr noundef %94) #5
  %95 = load ptr, ptr %5, align 8, !tbaa !5
  call void @free(ptr noundef %95) #5
  br label %96

96:                                               ; preds = %92
  store ptr null, ptr getelementptr inbounds (%struct.greatest_run_info, ptr @greatest_info, i32 0, i32 9), align 8, !tbaa !18
  store i32 0, ptr %1, align 4
  store i32 1, ptr %14, align 4
  br label %99

97:                                               ; No predecessors!
  br label %98

98:                                               ; preds = %97
  store i32 0, ptr %14, align 4
  br label %99

99:                                               ; preds = %98, %96, %87, %75, %62
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #5
  br label %100

100:                                              ; preds = %99, %41, %26
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  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 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  %101 = load i32, ptr %14, align 4
  switch i32 %101, label %104 [
    i32 0, label %102
    i32 1, label %102
  ]

102:                                              ; preds = %100, %100
  %103 = load i32, ptr %1, align 4
  ret i32 %103

104:                                              ; preds = %100
  unreachable
}

declare i32 @rl_str_pfmerge(i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !12, i64 20}
!14 = !{!"greatest_run_info", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !15, i64 24, !6, i64 72, !12, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !12, i64 128, !12, i64 132, !6, i64 136, !6, i64 144, !10, i64 152, !10, i64 160, !7, i64 168}
!15 = !{!"greatest_suite_info", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40}
!16 = !{!14, !6, i64 72}
!17 = !{!14, !12, i64 80}
!18 = !{!14, !6, i64 88}


; 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.greatest_run_info = type { i32, i32, i32, i32, i32, i32, %struct.greatest_suite_info, ptr, i32, ptr, ptr, ptr, ptr, ptr, i32, i32, ptr, ptr, i64, i64, [1 x %struct.__jmp_buf_tag] }
%struct.greatest_suite_info = type { i32, i32, i32, i32, i64, i64, i64, i64 }
%struct.__jmp_buf_tag = type { [8 x i64], i32, %struct.__sigset_t }
%struct.__sigset_t = type { [16 x i64] }

@greatest_info = external local_unnamed_addr global %struct.greatest_run_info, align 8
@.str.3 = external hidden unnamed_addr constant [74 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [12 x i8], align 1
@__const.test_hyperloglog_add_merge.argv = external hidden unnamed_addr constant [3 x ptr], align 16
@__const.test_hyperloglog_add_merge.argvlen = external hidden unnamed_addr constant [3 x i64], align 16
@__const.test_hyperloglog_add_merge.argv2 = external hidden unnamed_addr constant [3 x ptr], align 16
@__const.test_hyperloglog_add_merge.argvlen2 = external hidden unnamed_addr constant [3 x i64], align 16
@.str.10 = external hidden unnamed_addr constant [10 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

declare i32 @rl_str_pfadd(ptr noundef, i64 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @rl_str_pfcount(i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, 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

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

; Function Attrs: nounwind uwtable
define dso_local range(i32 -1, 1) i32 @test_hyperloglog_add_merge() local_unnamed_addr #4 {
  %1 = alloca ptr, align 8
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca [3 x ptr], align 16
  %9 = alloca [3 x i64], align 16
  %10 = alloca [3 x ptr], align 16
  %11 = alloca [3 x i64], align 16
  %12 = alloca [2 x ptr], align 16
  %13 = alloca [2 x i64], align 16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #5
  store ptr null, ptr %1, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #5
  store ptr null, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  store i64 -1, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  store i64 -1, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #5
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(24) %8, ptr noundef nonnull align 16 dereferenceable(24) @__const.test_hyperloglog_add_merge.argv, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #5
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(24) %9, ptr noundef nonnull align 16 dereferenceable(24) @__const.test_hyperloglog_add_merge.argvlen, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #5
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(24) %10, ptr noundef nonnull align 16 dereferenceable(24) @__const.test_hyperloglog_add_merge.argv2, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #5
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(24) %11, ptr noundef nonnull align 16 dereferenceable(24) @__const.test_hyperloglog_add_merge.argvlen2, i64 24, i1 false)
  %14 = call i32 @rl_str_pfadd(ptr noundef null, i64 noundef 0, i32 noundef 3, ptr noundef nonnull %8, ptr noundef nonnull %9, ptr noundef nonnull %1, ptr noundef nonnull %4) #5
  %15 = load i32, ptr getelementptr inbounds (i8, ptr @greatest_info, i64 20), align 4, !tbaa !11
  %16 = add i32 %15, 1
  store i32 %16, ptr getelementptr inbounds (i8, ptr @greatest_info, i64 20), align 4, !tbaa !11
  %.not = icmp eq i32 %14, 1
  br i1 %.not, label %18, label %17

17:                                               ; preds = %0
  store ptr @.str.3, ptr getelementptr inbounds (i8, ptr @greatest_info, i64 72), align 8, !tbaa !15
  store i32 35, ptr getelementptr inbounds (i8, ptr @greatest_info, i64 80), align 8, !tbaa !16
  store ptr @.str.4, ptr getelementptr inbounds (i8, ptr @greatest_info, i64 88), align 8, !tbaa !17
  br label %48

18:                                               ; preds = %0
  %19 = call i32 @rl_str_pfadd(ptr noundef null, i64 noundef 0, i32 noundef 3, ptr noundef nonnull %10, ptr noundef nonnull %11, ptr noundef nonnull %2, ptr noundef nonnull %5) #5
  %20 = load i32, ptr getelementptr inbounds (i8, ptr @greatest_info, i64 20), align 4, !tbaa !11
  %21 = add i32 %20, 1
  store i32 %21, ptr getelementptr inbounds (i8, ptr @greatest_info, i64 20), align 4, !tbaa !11
  %.not5 = icmp eq i32 %19, 1
  br i1 %.not5, label %23, label %22

22:                                               ; preds = %18
  store ptr @.str.3, ptr getelementptr inbounds (i8, ptr @greatest_info, i64 72), align 8, !tbaa !15
  store i32 36, ptr getelementptr inbounds (i8, ptr @greatest_info, i64 80), align 8, !tbaa !16
  store ptr @.str.4, ptr getelementptr inbounds (i8, ptr @greatest_info, i64 88), align 8, !tbaa !17
  br label %48

23:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #5
  %24 = load ptr, ptr %1, align 8, !tbaa !5
  store ptr %24, ptr %12, align 16, !tbaa !5
  %25 = getelementptr inbounds i8, ptr %12, i64 8
  %26 = load ptr, ptr %2, align 8, !tbaa !5
  store ptr %26, ptr %25, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #5
  %27 = load i64, ptr %4, align 8, !tbaa !9
  store i64 %27, ptr %13, align 16, !tbaa !9
  %28 = getelementptr inbounds i8, ptr %13, i64 8
  %29 = load i64, ptr %5, align 8, !tbaa !9
  store i64 %29, ptr %28, align 8, !tbaa !9
  %30 = call i32 @rl_str_pfmerge(i32 noundef 2, ptr noundef nonnull %12, ptr noundef nonnull %13, ptr noundef nonnull %3, ptr noundef nonnull %6) #5
  %31 = load i32, ptr getelementptr inbounds (i8, ptr @greatest_info, i64 20), align 4, !tbaa !11
  %32 = add i32 %31, 1
  store i32 %32, ptr getelementptr inbounds (i8, ptr @greatest_info, i64 20), align 4, !tbaa !11
  %.not6 = icmp eq i32 %30, 0
  br i1 %.not6, label %34, label %33

33:                                               ; preds = %23
  store ptr @.str.3, ptr getelementptr inbounds (i8, ptr @greatest_info, i64 72), align 8, !tbaa !15
  store i32 39, ptr getelementptr inbounds (i8, ptr @greatest_info, i64 80), align 8, !tbaa !16
  br label %47

34:                                               ; preds = %23
  %35 = call i32 @rl_str_pfcount(i32 noundef 1, ptr noundef nonnull %3, ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef null, ptr noundef null) #5
  %36 = load i32, ptr getelementptr inbounds (i8, ptr @greatest_info, i64 20), align 4, !tbaa !11
  %37 = add i32 %36, 1
  store i32 %37, ptr getelementptr inbounds (i8, ptr @greatest_info, i64 20), align 4, !tbaa !11
  %.not7 = icmp eq i32 %35, 0
  br i1 %.not7, label %39, label %38

38:                                               ; preds = %34
  store ptr @.str.3, ptr getelementptr inbounds (i8, ptr @greatest_info, i64 72), align 8, !tbaa !15
  store i32 40, ptr getelementptr inbounds (i8, ptr @greatest_info, i64 80), align 8, !tbaa !16
  br label %47

39:                                               ; preds = %34
  %40 = add i32 %36, 2
  store i32 %40, ptr getelementptr inbounds (i8, ptr @greatest_info, i64 20), align 4, !tbaa !11
  %41 = load i64, ptr %7, align 8, !tbaa !9
  %.not8 = icmp eq i64 %41, 6
  br i1 %.not8, label %43, label %42

42:                                               ; preds = %39
  store ptr @.str.3, ptr getelementptr inbounds (i8, ptr @greatest_info, i64 72), align 8, !tbaa !15
  store i32 41, ptr getelementptr inbounds (i8, ptr @greatest_info, i64 80), align 8, !tbaa !16
  br label %47

43:                                               ; preds = %39
  %44 = load ptr, ptr %1, align 8, !tbaa !5
  call void @free(ptr noundef %44) #5
  %45 = load ptr, ptr %2, align 8, !tbaa !5
  call void @free(ptr noundef %45) #5
  %46 = load ptr, ptr %3, align 8, !tbaa !5
  call void @free(ptr noundef %46) #5
  br label %47

47:                                               ; preds = %43, %42, %38, %33
  %.sink = phi ptr [ null, %43 ], [ @.str.10, %42 ], [ @.str.5, %38 ], [ @.str.5, %33 ]
  %.0 = phi i32 [ 0, %43 ], [ -1, %42 ], [ -1, %38 ], [ -1, %33 ]
  store ptr %.sink, ptr getelementptr inbounds (i8, ptr @greatest_info, i64 88), align 8, !tbaa !17
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #5
  br label %48

48:                                               ; preds = %47, %22, %17
  %.1 = phi i32 [ -1, %17 ], [ -1, %22 ], [ %.0, %47 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #5
  ret i32 %.1
}

declare i32 @rl_str_pfmerge(i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !13, i64 20}
!12 = !{!"greatest_run_info", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20, !14, i64 24, !6, i64 72, !13, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !13, i64 128, !13, i64 132, !6, i64 136, !6, i64 144, !10, i64 152, !10, i64 160, !7, i64 168}
!13 = !{!"int", !7, i64 0}
!14 = !{!"greatest_suite_info", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40}
!15 = !{!12, !6, i64 72}
!16 = !{!12, !13, i64 80}
!17 = !{!12, !6, i64 88}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass