; LLVM IR from clausecker/24puzzle :: test (qualitytest)

; 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.qualitytest_config = type { [256 x i64], i64, [64 x i64], [64 x i64], i64, ptr, i32 }
%struct.pdb_catalogue = type { [64 x %struct.heuristic], [64 x i32], [64 x i64], i64, i64 }
%struct.heuristic = type { ptr, ptr, ptr, ptr, i32, i32, i32 }

@.str = external hidden unnamed_addr constant [11 x i8], align 1
@optarg = external global ptr, align 8
@pdb_jobs = external global i32, align 4
@stderr = external global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [44 x i8], align 1
@optind = external global i32, align 4
@.str.2 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [1 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %struct.qualitytest_config, align 8
  %8 = alloca i64, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 3104, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  store i64 1000, ptr %8, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 0, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  store ptr null, ptr %12, align 8, !tbaa !9
  br label %14

14:                                               ; preds = %50, %2
  %15 = load i32, ptr %4, align 4, !tbaa !5
  %16 = load ptr, ptr %5, align 8, !tbaa !9
  %17 = call i32 @__posix_getopt(i32 noundef %15, ptr noundef %16, ptr noundef @.str) #6
  store i32 %17, ptr %9, align 4, !tbaa !5
  %18 = load i32, ptr %9, align 4, !tbaa !5
  %19 = icmp ne i32 %18, -1
  br i1 %19, label %20, label %51

20:                                               ; preds = %14
  %21 = load i32, ptr %9, align 4, !tbaa !5
  switch i32 %21, label %46 [
    i32 100, label %22
    i32 105, label %24
    i32 106, label %27
    i32 110, label %39
    i32 115, label %42
    i32 116, label %45
  ]

22:                                               ; preds = %20
  %23 = load ptr, ptr @optarg, align 8, !tbaa !9
  store ptr %23, ptr %12, align 8, !tbaa !9
  br label %50

24:                                               ; preds = %20
  %25 = load i32, ptr %11, align 4, !tbaa !5
  %26 = or i32 %25, 1
  store i32 %26, ptr %11, align 4, !tbaa !5
  br label %50

27:                                               ; preds = %20
  %28 = load ptr, ptr @optarg, align 8, !tbaa !9
  %29 = call i32 @atoi(ptr noundef %28) #7
  store i32 %29, ptr @pdb_jobs, align 4, !tbaa !5
  %30 = load i32, ptr @pdb_jobs, align 4, !tbaa !5
  %31 = icmp slt i32 %30, 1
  br i1 %31, label %35, label %32

32:                                               ; preds = %27
  %33 = load i32, ptr @pdb_jobs, align 4, !tbaa !5
  %34 = icmp sgt i32 %33, 256
  br i1 %34, label %35, label %38

35:                                               ; preds = %32, %27
  %36 = load ptr, ptr @stderr, align 8, !tbaa !9
  %37 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %36, ptr noundef @.str.1, i32 noundef 256) #6
  store i32 1, ptr %3, align 4
  store i32 1, ptr %13, align 4
  br label %97

38:                                               ; preds = %32
  br label %50

39:                                               ; preds = %20
  %40 = load ptr, ptr @optarg, align 8, !tbaa !9
  %41 = call i64 @strtol(ptr noundef %40, ptr noundef null, i32 noundef 0) #6
  store i64 %41, ptr %8, align 8, !tbaa !11
  br label %50

42:                                               ; preds = %20
  %43 = load ptr, ptr @optarg, align 8, !tbaa !9
  %44 = call i64 @strtoll(ptr noundef %43, ptr noundef null, i32 noundef 0) #6
  call void @set_seed(i64 noundef %44)
  br label %50

45:                                               ; preds = %20
  store i32 1, ptr %10, align 4, !tbaa !5
  br label %50

46:                                               ; preds = %20
  %47 = load ptr, ptr %5, align 8, !tbaa !9
  %48 = getelementptr inbounds ptr, ptr %47, i64 0
  %49 = load ptr, ptr %48, align 8, !tbaa !9
  call void @usage(ptr noundef %49)
  br label %50

50:                                               ; preds = %46, %45, %42, %39, %38, %24, %22
  br label %14, !llvm.loop !13

51:                                               ; preds = %14
  %52 = load i32, ptr %4, align 4, !tbaa !5
  %53 = load i32, ptr @optind, align 4, !tbaa !5
  %54 = add nsw i32 %53, 1
  %55 = icmp ne i32 %52, %54
  br i1 %55, label %56, label %60

56:                                               ; preds = %51
  %57 = load ptr, ptr %5, align 8, !tbaa !9
  %58 = getelementptr inbounds ptr, ptr %57, i64 0
  %59 = load ptr, ptr %58, align 8, !tbaa !9
  call void @usage(ptr noundef %59)
  br label %60

60:                                               ; preds = %56, %51
  %61 = load ptr, ptr %5, align 8, !tbaa !9
  %62 = load i32, ptr @optind, align 4, !tbaa !5
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds ptr, ptr %61, i64 %63
  %65 = load ptr, ptr %64, align 8, !tbaa !9
  %66 = load ptr, ptr %12, align 8, !tbaa !9
  %67 = load i32, ptr %11, align 4, !tbaa !5
  %68 = load ptr, ptr @stderr, align 8, !tbaa !9
  %69 = call ptr @catalogue_load(ptr noundef %65, ptr noundef %66, i32 noundef %67, ptr noundef %68)
  store ptr %69, ptr %6, align 8, !tbaa !9
  %70 = load ptr, ptr %6, align 8, !tbaa !9
  %71 = icmp eq ptr %70, null
  br i1 %71, label %72, label %73

72:                                               ; preds = %60
  call void @perror(ptr noundef @.str.2)
  store i32 1, ptr %3, align 4
  store i32 1, ptr %13, align 4
  br label %97

73:                                               ; preds = %60
  %74 = load ptr, ptr @stderr, align 8, !tbaa !9
  %75 = load i64, ptr %8, align 8, !tbaa !11
  %76 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %74, ptr noundef @.str.3, i64 noundef %75) #6
  call void @llvm.memset.p0.i64(ptr align 8 %7, i8 0, i64 3104, i1 false)
  %77 = load i64, ptr %8, align 8, !tbaa !11
  %78 = getelementptr inbounds %struct.qualitytest_config, ptr %7, i32 0, i32 4
  store i64 %77, ptr %78, align 8, !tbaa !15
  %79 = load ptr, ptr %6, align 8, !tbaa !9
  %80 = getelementptr inbounds %struct.qualitytest_config, ptr %7, i32 0, i32 5
  store ptr %79, ptr %80, align 8, !tbaa !17
  %81 = load i32, ptr %10, align 4, !tbaa !5
  %82 = getelementptr inbounds %struct.qualitytest_config, ptr %7, i32 0, i32 6
  store i32 %81, ptr %82, align 8, !tbaa !18
  call void @random_puzzle_histograms(ptr noundef %7)
  %83 = getelementptr inbounds %struct.qualitytest_config, ptr %7, i32 0, i32 0
  %84 = getelementptr inbounds [256 x i64], ptr %83, i64 0, i64 0
  %85 = getelementptr inbounds %struct.qualitytest_config, ptr %7, i32 0, i32 4
  %86 = load i64, ptr %85, align 8, !tbaa !15
  call void @print_statistics(ptr noundef %84, i64 noundef %86)
  %87 = call i32 @puts(ptr noundef @.str.4)
  %88 = getelementptr inbounds %struct.qualitytest_config, ptr %7, i32 0, i32 2
  %89 = getelementptr inbounds [64 x i64], ptr %88, i64 0, i64 0
  %90 = getelementptr inbounds %struct.qualitytest_config, ptr %7, i32 0, i32 3
  %91 = getelementptr inbounds [64 x i64], ptr %90, i64 0, i64 0
  %92 = getelementptr inbounds %struct.qualitytest_config, ptr %7, i32 0, i32 4
  %93 = load i64, ptr %92, align 8, !tbaa !15
  %94 = load ptr, ptr %6, align 8, !tbaa !9
  %95 = getelementptr inbounds %struct.pdb_catalogue, ptr %94, i32 0, i32 4
  %96 = load i64, ptr %95, align 8, !tbaa !19
  call void @print_heuristics_quality(ptr noundef %89, ptr noundef %91, i64 noundef %93, i64 noundef %96)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %13, align 4
  br label %97

97:                                               ; preds = %73, %72, %35
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 3104, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  %98 = load i32, ptr %3, align 4
  ret i32 %98
}

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

; Function Attrs: nounwind
declare i32 @__posix_getopt(i32 noundef, ptr noundef, ptr noundef) #2

; Function Attrs: inlinehint nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr noundef nonnull) #3

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #2

; Function Attrs: nounwind
declare i64 @strtol(ptr noundef, ptr noundef, i32 noundef) #2

declare void @set_seed(i64 noundef) #4

; Function Attrs: nounwind
declare i64 @strtoll(ptr noundef, ptr noundef, i32 noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @usage(ptr noundef) #0

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

declare void @perror(ptr noundef) #4

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

; Function Attrs: nounwind uwtable
declare hidden void @random_puzzle_histograms(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @print_statistics(ptr noundef, i64 noundef) #0

declare i32 @puts(ptr noundef) #4

; Function Attrs: nounwind uwtable
declare hidden void @print_heuristics_quality(ptr noundef, ptr noundef, i64 noundef, i64 noundef) #0

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

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 = { 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 #3 = { inlinehint nounwind willreturn memory(read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { nounwind }
attributes #7 = { nounwind willreturn memory(read) }

!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}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!16, !12, i64 3080}
!16 = !{!"qualitytest_config", !7, i64 0, !7, i64 2048, !7, i64 2056, !7, i64 2568, !12, i64 3080, !10, i64 3088, !6, i64 3096}
!17 = !{!16, !10, i64 3088}
!18 = !{!16, !6, i64 3096}
!19 = !{!20, !12, i64 3848}
!20 = !{!"pdb_catalogue", !7, i64 0, !7, i64 3072, !7, i64 3328, !12, i64 3840, !12, i64 3848}


; 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.qualitytest_config = type { [256 x i64], i64, [64 x i64], [64 x i64], i64, ptr, i32 }

@.str = external hidden unnamed_addr constant [11 x i8], align 1
@optarg = external local_unnamed_addr global ptr, align 8
@pdb_jobs = external local_unnamed_addr global i32, align 4
@stderr = external local_unnamed_addr global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [44 x i8], align 1
@optind = external local_unnamed_addr global i32, align 4
@.str.2 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [1 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @main(i32 noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = alloca %struct.qualitytest_config, align 8
  call void @llvm.lifetime.start.p0(i64 3104, ptr nonnull %3) #8
  br label %.outer

.outer:                                           ; preds = %15, %2
  %.023.ph = phi i64 [ %17, %15 ], [ 1000, %2 ]
  %.020.ph = phi i32 [ %.020.ph45, %15 ], [ 0, %2 ]
  %.018.ph = phi i32 [ %.018.ph49, %15 ], [ 0, %2 ]
  %.0.ph = phi ptr [ %.0.ph52, %15 ], [ null, %2 ]
  br label %.outer44

.outer44:                                         ; preds = %.outer, %21
  %.020.ph45 = phi i32 [ %.020.ph, %.outer ], [ 1, %21 ]
  %.018.ph46 = phi i32 [ %.018.ph, %.outer ], [ %.018.ph49, %21 ]
  %.0.ph47 = phi ptr [ %.0.ph, %.outer ], [ %.0.ph52, %21 ]
  br label %.outer48

.outer48:                                         ; preds = %4, %.outer44
  %.018.ph49 = phi i32 [ %.018.ph46, %.outer44 ], [ 1, %4 ]
  %.0.ph50 = phi ptr [ %.0.ph47, %.outer44 ], [ %.0.ph52, %4 ]
  br label %.outer51

.outer51:                                         ; preds = %.outer48, %6
  %.0.ph52 = phi ptr [ %.0.ph50, %.outer48 ], [ %7, %6 ]
  br label %4

4:                                                ; preds = %.backedge, %.outer51
  %5 = tail call i32 @__posix_getopt(i32 noundef %0, ptr noundef %1, ptr noundef nonnull @.str) #8
  switch i32 %5, label %22 [
    i32 -1, label %24
    i32 100, label %6
    i32 105, label %.outer48
    i32 106, label %8
    i32 110, label %15
    i32 115, label %18
    i32 116, label %21
  ], !llvm.loop !5

6:                                                ; preds = %4
  %7 = load ptr, ptr @optarg, align 8, !tbaa !7
  br label %.outer51, !llvm.loop !5

8:                                                ; preds = %4
  %9 = load ptr, ptr @optarg, align 8, !tbaa !7
  %10 = tail call i32 @atoi(ptr nocapture noundef %9) #9
  store i32 %10, ptr @pdb_jobs, align 4, !tbaa !11
  %11 = add i32 %10, -257
  %or.cond = icmp ult i32 %11, -256
  br i1 %or.cond, label %12, label %.backedge

.backedge:                                        ; preds = %8, %22, %18
  br label %4, !llvm.loop !5

12:                                               ; preds = %8
  %13 = load ptr, ptr @stderr, align 8, !tbaa !7
  %14 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %13, ptr noundef nonnull @.str.1, i32 noundef 256) #10
  br label %51

15:                                               ; preds = %4
  %16 = load ptr, ptr @optarg, align 8, !tbaa !7
  %17 = tail call i64 @strtol(ptr nocapture noundef %16, ptr noundef null, i32 noundef 0) #8
  br label %.outer, !llvm.loop !5

18:                                               ; preds = %4
  %19 = load ptr, ptr @optarg, align 8, !tbaa !7
  %20 = tail call i64 @strtoll(ptr nocapture noundef %19, ptr noundef null, i32 noundef 0) #8
  tail call void @set_seed(i64 noundef %20) #8
  br label %.backedge

21:                                               ; preds = %4
  br label %.outer44, !llvm.loop !5

22:                                               ; preds = %4
  %23 = load ptr, ptr %1, align 8, !tbaa !7
  tail call void @usage(ptr noundef %23)
  br label %.backedge

24:                                               ; preds = %4
  %25 = load i32, ptr @optind, align 4, !tbaa !11
  %26 = add nsw i32 %25, 1
  %.not27 = icmp eq i32 %26, %0
  br i1 %.not27, label %29, label %27

27:                                               ; preds = %24
  %28 = load ptr, ptr %1, align 8, !tbaa !7
  tail call void @usage(ptr noundef %28)
  %.pre = load i32, ptr @optind, align 4, !tbaa !11
  br label %29

29:                                               ; preds = %27, %24
  %30 = phi i32 [ %.pre, %27 ], [ %25, %24 ]
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds ptr, ptr %1, i64 %31
  %33 = load ptr, ptr %32, align 8, !tbaa !7
  %34 = load ptr, ptr @stderr, align 8, !tbaa !7
  %35 = tail call ptr @catalogue_load(ptr noundef %33, ptr noundef %.0.ph52, i32 noundef %.018.ph49, ptr noundef %34) #8
  %36 = icmp eq ptr %35, null
  br i1 %36, label %37, label %38

37:                                               ; preds = %29
  tail call void @perror(ptr noundef nonnull @.str.2) #11
  br label %51

38:                                               ; preds = %29
  %39 = load ptr, ptr @stderr, align 8, !tbaa !7
  %40 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %39, ptr noundef nonnull @.str.3, i64 noundef %.023.ph) #10
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(3104) %3, i8 0, i64 3104, i1 false)
  %41 = getelementptr inbounds i8, ptr %3, i64 3080
  store i64 %.023.ph, ptr %41, align 8, !tbaa !13
  %42 = getelementptr inbounds i8, ptr %3, i64 3088
  store ptr %35, ptr %42, align 8, !tbaa !16
  %43 = getelementptr inbounds i8, ptr %3, i64 3096
  store i32 %.020.ph45, ptr %43, align 8, !tbaa !17
  call void @random_puzzle_histograms(ptr noundef nonnull %3)
  %44 = load i64, ptr %41, align 8, !tbaa !13
  call void @print_statistics(ptr noundef nonnull %3, i64 noundef %44)
  %45 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.4)
  %46 = getelementptr inbounds i8, ptr %3, i64 2056
  %47 = getelementptr inbounds i8, ptr %3, i64 2568
  %48 = load i64, ptr %41, align 8, !tbaa !13
  %49 = getelementptr inbounds i8, ptr %35, i64 3848
  %50 = load i64, ptr %49, align 8, !tbaa !18
  call void @print_heuristics_quality(ptr noundef nonnull %46, ptr noundef nonnull %47, i64 noundef %48, i64 noundef %50)
  br label %51

51:                                               ; preds = %38, %37, %12
  %.022 = phi i32 [ 1, %12 ], [ 1, %37 ], [ 0, %38 ]
  call void @llvm.lifetime.end.p0(i64 3104, ptr nonnull %3) #8
  ret i32 %.022
}

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

; Function Attrs: nounwind
declare i32 @__posix_getopt(i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr nocapture noundef nonnull) local_unnamed_addr #3

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

; Function Attrs: mustprogress nofree nounwind willreturn
declare i64 @strtol(ptr noundef readonly, ptr nocapture noundef, i32 noundef) local_unnamed_addr #5

declare void @set_seed(i64 noundef) local_unnamed_addr #6

; Function Attrs: mustprogress nofree nounwind willreturn
declare i64 @strtoll(ptr noundef readonly, ptr nocapture noundef, i32 noundef) local_unnamed_addr #5

; Function Attrs: nounwind uwtable
declare hidden void @usage(ptr noundef) local_unnamed_addr #0

declare ptr @catalogue_load(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #6

; Function Attrs: nofree nounwind
declare void @perror(ptr nocapture noundef readonly) local_unnamed_addr #4

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

; Function Attrs: nounwind uwtable
declare hidden void @random_puzzle_histograms(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden void @print_statistics(ptr noundef, i64 noundef) local_unnamed_addr #0

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

; Function Attrs: nounwind uwtable
declare hidden void @print_heuristics_quality(ptr noundef, ptr noundef, i64 noundef, i64 noundef) local_unnamed_addr #0

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

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 = { 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 #3 = { inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = { mustprogress nofree nounwind willreturn "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 = { "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 nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #8 = { nounwind }
attributes #9 = { nounwind willreturn memory(read) }
attributes #10 = { cold nounwind }
attributes #11 = { cold }

!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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = !{!8, !8, i64 0}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C/C++ TBAA"}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !9, i64 0}
!13 = !{!14, !15, i64 3080}
!14 = !{!"qualitytest_config", !9, i64 0, !9, i64 2048, !9, i64 2056, !9, i64 2568, !15, i64 3080, !8, i64 3088, !12, i64 3096}
!15 = !{!"long", !9, i64 0}
!16 = !{!14, !8, i64 3088}
!17 = !{!14, !12, i64 3096}
!18 = !{!19, !15, i64 3848}
!19 = !{!"pdb_catalogue", !9, i64 0, !9, i64 3072, !9, i64 3328, !15, i64 3840, !15, i64 3848}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,LCSSAPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass