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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@.str = external hidden unnamed_addr constant [18 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
@quiet = external hidden global i32, align 4
@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 [25 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [17 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 [256 x ptr], align 16
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca [256 x i64], align 16
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = 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 2048, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 8, 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 8, ptr %9) #6
  store i64 -1, ptr %9, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 2048, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 0, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store i32 0, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  store i32 255, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  store ptr null, ptr %16, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  store ptr null, ptr %17, align 8, !tbaa !9
  br label %19

19:                                               ; preds = %69, %2
  %20 = load i32, ptr %4, align 4, !tbaa !5
  %21 = load ptr, ptr %5, align 8, !tbaa !9
  %22 = call i32 @__posix_getopt(i32 noundef %20, ptr noundef %21, ptr noundef @.str) #6
  store i32 %22, ptr %12, align 4, !tbaa !5
  %23 = load i32, ptr %12, align 4, !tbaa !5
  %24 = icmp ne i32 %23, -1
  br i1 %24, label %25, label %70

25:                                               ; preds = %19
  %26 = load i32, ptr %12, align 4, !tbaa !5
  switch i32 %26, label %65 [
    i32 78, label %27
    i32 100, label %30
    i32 102, label %32
    i32 105, label %34
    i32 106, label %37
    i32 108, label %49
    i32 110, label %57
    i32 113, label %60
    i32 115, label %61
    i32 116, label %64
  ]

27:                                               ; preds = %25
  %28 = load ptr, ptr @optarg, align 8, !tbaa !9
  %29 = call i64 @strtoll(ptr noundef %28, ptr noundef null, i32 noundef 0) #6
  store i64 %29, ptr %9, align 8, !tbaa !11
  br label %69

30:                                               ; preds = %25
  %31 = load ptr, ptr @optarg, align 8, !tbaa !9
  store ptr %31, ptr %16, align 8, !tbaa !9
  br label %69

32:                                               ; preds = %25
  %33 = load ptr, ptr @optarg, align 8, !tbaa !9
  store ptr %33, ptr %17, align 8, !tbaa !9
  br label %69

34:                                               ; preds = %25
  %35 = load i32, ptr %13, align 4, !tbaa !5
  %36 = or i32 %35, 1
  store i32 %36, ptr %13, align 4, !tbaa !5
  br label %69

37:                                               ; preds = %25
  %38 = load ptr, ptr @optarg, align 8, !tbaa !9
  %39 = call i32 @atoi(ptr noundef %38) #7
  store i32 %39, ptr @pdb_jobs, align 4, !tbaa !5
  %40 = load i32, ptr @pdb_jobs, align 4, !tbaa !5
  %41 = icmp slt i32 %40, 1
  br i1 %41, label %45, label %42

42:                                               ; preds = %37
  %43 = load i32, ptr @pdb_jobs, align 4, !tbaa !5
  %44 = icmp sgt i32 %43, 256
  br i1 %44, label %45, label %48

45:                                               ; preds = %42, %37
  %46 = load ptr, ptr @stderr, align 8, !tbaa !9
  %47 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %46, ptr noundef @.str.1, i32 noundef 256) #6
  store i32 1, ptr %3, align 4
  store i32 1, ptr %18, align 4
  br label %170

48:                                               ; preds = %42
  br label %69

49:                                               ; preds = %25
  %50 = load ptr, ptr @optarg, align 8, !tbaa !9
  %51 = call i64 @strtol(ptr noundef %50, ptr noundef null, i32 noundef 0) #6
  %52 = trunc i64 %51 to i32
  store i32 %52, ptr %15, align 4, !tbaa !5
  %53 = load i32, ptr %15, align 4, !tbaa !5
  %54 = icmp sge i32 %53, 256
  br i1 %54, label %55, label %56

55:                                               ; preds = %49
  store i32 255, ptr %15, align 4, !tbaa !5
  br label %56

56:                                               ; preds = %55, %49
  br label %69

57:                                               ; preds = %25
  %58 = load ptr, ptr @optarg, align 8, !tbaa !9
  %59 = call i64 @strtoll(ptr noundef %58, ptr noundef null, i32 noundef 0) #6
  store i64 %59, ptr %8, align 8, !tbaa !11
  br label %69

60:                                               ; preds = %25
  store atomic i32 1, ptr @quiet seq_cst, align 4, !tbaa !13
  br label %69

61:                                               ; preds = %25
  %62 = load ptr, ptr @optarg, align 8, !tbaa !9
  %63 = call i64 @strtoll(ptr noundef %62, ptr noundef null, i32 noundef 0) #6
  call void @set_seed(i64 noundef %63)
  br label %69

64:                                               ; preds = %25
  store i32 1, ptr %14, align 4, !tbaa !5
  br label %69

65:                                               ; preds = %25
  %66 = load ptr, ptr %5, align 8, !tbaa !9
  %67 = getelementptr inbounds ptr, ptr %66, i64 0
  %68 = load ptr, ptr %67, align 8, !tbaa !9
  call void @usage(ptr noundef %68)
  br label %69

69:                                               ; preds = %65, %64, %61, %60, %57, %56, %48, %34, %32, %30, %27
  br label %19, !llvm.loop !14

70:                                               ; preds = %19
  %71 = load i32, ptr %4, align 4, !tbaa !5
  %72 = load i32, ptr @optind, align 4, !tbaa !5
  %73 = add nsw i32 %72, 1
  %74 = icmp ne i32 %71, %73
  br i1 %74, label %75, label %79

75:                                               ; preds = %70
  %76 = load ptr, ptr %5, align 8, !tbaa !9
  %77 = getelementptr inbounds ptr, ptr %76, i64 0
  %78 = load ptr, ptr %77, align 8, !tbaa !9
  call void @usage(ptr noundef %78)
  br label %79

79:                                               ; preds = %75, %70
  %80 = load ptr, ptr %5, align 8, !tbaa !9
  %81 = load i32, ptr @optind, align 4, !tbaa !5
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds ptr, ptr %80, i64 %82
  %84 = load ptr, ptr %83, align 8, !tbaa !9
  %85 = load ptr, ptr %16, align 8, !tbaa !9
  %86 = load i32, ptr %13, align 4, !tbaa !5
  %87 = load atomic i32, ptr @quiet seq_cst, align 4, !tbaa !13
  %88 = icmp ne i32 %87, 0
  br i1 %88, label %89, label %90

89:                                               ; preds = %79
  br label %92

90:                                               ; preds = %79
  %91 = load ptr, ptr @stderr, align 8, !tbaa !9
  br label %92

92:                                               ; preds = %90, %89
  %93 = phi ptr [ null, %89 ], [ %91, %90 ]
  %94 = call ptr @catalogue_load(ptr noundef %84, ptr noundef %85, i32 noundef %86, ptr noundef %93)
  store ptr %94, ptr %7, align 8, !tbaa !9
  %95 = load ptr, ptr %7, align 8, !tbaa !9
  %96 = icmp eq ptr %95, null
  br i1 %96, label %97, label %98

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

98:                                               ; preds = %92
  %99 = load ptr, ptr %5, align 8, !tbaa !9
  %100 = load i32, ptr @optind, align 4, !tbaa !5
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds ptr, ptr %99, i64 %101
  %103 = load ptr, ptr %102, align 8, !tbaa !9
  %104 = load ptr, ptr %16, align 8, !tbaa !9
  %105 = load i32, ptr %13, align 4, !tbaa !5
  %106 = load ptr, ptr @stderr, align 8, !tbaa !9
  %107 = call ptr @catalogue_load(ptr noundef %103, ptr noundef %104, i32 noundef %105, ptr noundef %106)
  store ptr %107, ptr %7, align 8, !tbaa !9
  %108 = load ptr, ptr %7, align 8, !tbaa !9
  %109 = icmp eq ptr %108, null
  br i1 %109, label %110, label %111

110:                                              ; preds = %98
  call void @perror(ptr noundef @.str.2)
  store i32 1, ptr %3, align 4
  store i32 1, ptr %18, align 4
  br label %170

111:                                              ; preds = %98
  %112 = getelementptr inbounds [256 x ptr], ptr %6, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %112, i8 0, i64 2048, i1 false)
  %113 = load ptr, ptr %17, align 8, !tbaa !9
  %114 = icmp ne ptr %113, null
  br i1 %114, label %115, label %119

115:                                              ; preds = %111
  %116 = getelementptr inbounds [256 x ptr], ptr %6, i64 0, i64 0
  %117 = load ptr, ptr %17, align 8, !tbaa !9
  %118 = load i32, ptr %15, align 4, !tbaa !5
  call void @open_sample_files(ptr noundef %116, ptr noundef %117, i32 noundef %118)
  br label %119

119:                                              ; preds = %115, %111
  %120 = getelementptr inbounds [256 x i64], ptr %10, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %120, i8 0, i64 2048, i1 false)
  %121 = call ptr @__sysv_signal(i32 noundef 1, ptr noundef @interrupt_handler) #6
  %122 = call ptr @__sysv_signal(i32 noundef 2, ptr noundef @interrupt_handler) #6
  %123 = call ptr @__sysv_signal(i32 noundef 3, ptr noundef @interrupt_handler) #6
  %124 = call ptr @__sysv_signal(i32 noundef 15, ptr noundef @interrupt_handler) #6
  %125 = load atomic i32, ptr @quiet seq_cst, align 4, !tbaa !13
  %126 = icmp ne i32 %125, 0
  br i1 %126, label %141, label %127

127:                                              ; preds = %119
  %128 = load ptr, ptr @stderr, align 8, !tbaa !9
  %129 = load i64, ptr %8, align 8, !tbaa !11
  %130 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %128, ptr noundef @.str.3, i64 noundef %129) #6
  %131 = load ptr, ptr %17, align 8, !tbaa !9
  %132 = icmp ne ptr %131, null
  br i1 %132, label %133, label %137

133:                                              ; preds = %127
  %134 = load ptr, ptr @stderr, align 8, !tbaa !9
  %135 = load ptr, ptr %17, align 8, !tbaa !9
  %136 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %134, ptr noundef @.str.4, ptr noundef %135) #6
  br label %140

137:                                              ; preds = %127
  %138 = load ptr, ptr @stderr, align 8, !tbaa !9
  %139 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %138, ptr noundef @.str.5) #6
  br label %140

140:                                              ; preds = %137, %133
  br label %141

141:                                              ; preds = %140, %119
  %142 = getelementptr inbounds [256 x i64], ptr %10, i64 0, i64 0
  %143 = getelementptr inbounds [256 x ptr], ptr %6, i64 0, i64 0
  %144 = load ptr, ptr %7, align 8, !tbaa !9
  %145 = load i32, ptr %15, align 4, !tbaa !5
  %146 = load i64, ptr %8, align 8, !tbaa !11
  %147 = load i64, ptr %9, align 8, !tbaa !11
  %148 = call i64 @generate_samples(ptr noundef %142, ptr noundef %143, ptr noundef %144, i32 noundef %145, i64 noundef %146, i64 noundef %147)
  store i64 %148, ptr %8, align 8, !tbaa !11
  %149 = load ptr, ptr %17, align 8, !tbaa !9
  %150 = icmp ne ptr %149, null
  br i1 %150, label %151, label %166

151:                                              ; preds = %141
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %152

152:                                              ; preds = %162, %151
  %153 = load i32, ptr %11, align 4, !tbaa !5
  %154 = load i32, ptr %15, align 4, !tbaa !5
  %155 = icmp sle i32 %153, %154
  br i1 %155, label %156, label %165

156:                                              ; preds = %152
  %157 = load i32, ptr %11, align 4, !tbaa !5
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds [256 x ptr], ptr %6, i64 0, i64 %158
  %160 = load ptr, ptr %159, align 8, !tbaa !9
  %161 = call i32 @fclose(ptr noundef %160)
  br label %162

162:                                              ; preds = %156
  %163 = load i32, ptr %11, align 4, !tbaa !5
  %164 = add nsw i32 %163, 1
  store i32 %164, ptr %11, align 4, !tbaa !5
  br label %152, !llvm.loop !16

165:                                              ; preds = %152
  br label %166

166:                                              ; preds = %165, %141
  %167 = load ptr, ptr %17, align 8, !tbaa !9
  %168 = getelementptr inbounds [256 x i64], ptr %10, i64 0, i64 0
  %169 = load i64, ptr %8, align 8, !tbaa !11
  call void @write_statistics(ptr noundef %167, ptr noundef %168, i64 noundef %169)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %18, align 4
  br label %170

170:                                              ; preds = %166, %110, %97, %45
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 2048, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 2048, ptr %6) #6
  %171 = load i32, ptr %3, align 4
  ret i32 %171
}

; 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: nounwind
declare i64 @strtoll(ptr noundef, ptr noundef, i32 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 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 @open_sample_files(ptr noundef, ptr noundef, i32 noundef) #0

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

; Function Attrs: nounwind uwtable
declare hidden void @interrupt_handler(i32 noundef) #0

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

declare i32 @fclose(ptr noundef) #4

; Function Attrs: nounwind uwtable
declare hidden void @write_statistics(ptr noundef, ptr 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 = !{!7, !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}


; 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 = external hidden unnamed_addr constant [18 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
@quiet = external hidden local_unnamed_addr global i32, align 4
@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 [25 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [17 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 [256 x ptr], align 16
  %4 = alloca [256 x i64], align 16
  call void @llvm.lifetime.start.p0(i64 2048, ptr nonnull %3) #9
  call void @llvm.lifetime.start.p0(i64 2048, ptr nonnull %4) #9
  br label %5

5:                                                ; preds = %.backedge, %2
  %.045 = phi i64 [ 1000, %2 ], [ %.045.be, %.backedge ]
  %.043 = phi i64 [ -1, %2 ], [ %.043.be, %.backedge ]
  %.039 = phi i32 [ 0, %2 ], [ %.039.be, %.backedge ]
  %.037 = phi i32 [ 255, %2 ], [ %.037.be, %.backedge ]
  %.035 = phi ptr [ null, %2 ], [ %.035.be, %.backedge ]
  %.0 = phi ptr [ null, %2 ], [ %.0.be, %.backedge ]
  %6 = tail call i32 @__posix_getopt(i32 noundef %0, ptr noundef %1, ptr noundef nonnull @.str) #9
  switch i32 %6, label %33 [
    i32 -1, label %35
    i32 78, label %7
    i32 100, label %10
    i32 102, label %12
    i32 105, label %.backedge
    i32 106, label %14
    i32 108, label %21
    i32 110, label %25
    i32 113, label %28
    i32 115, label %29
    i32 116, label %32
  ]

.backedge:                                        ; preds = %5, %14, %33, %32, %29, %28, %25, %21, %12, %10, %7
  %.045.be = phi i64 [ %.045, %33 ], [ %.045, %32 ], [ %.045, %29 ], [ %.045, %28 ], [ %27, %25 ], [ %.045, %21 ], [ %.045, %14 ], [ %.045, %12 ], [ %.045, %10 ], [ %.045, %7 ], [ %.045, %5 ]
  %.043.be = phi i64 [ %.043, %33 ], [ %.043, %32 ], [ %.043, %29 ], [ %.043, %28 ], [ %.043, %25 ], [ %.043, %21 ], [ %.043, %14 ], [ %.043, %12 ], [ %.043, %10 ], [ %9, %7 ], [ %.043, %5 ]
  %.039.be = phi i32 [ %.039, %33 ], [ %.039, %32 ], [ %.039, %29 ], [ %.039, %28 ], [ %.039, %25 ], [ %.039, %21 ], [ %.039, %14 ], [ %.039, %12 ], [ %.039, %10 ], [ %.039, %7 ], [ 1, %5 ]
  %.037.be = phi i32 [ %.037, %33 ], [ %.037, %32 ], [ %.037, %29 ], [ %.037, %28 ], [ %.037, %25 ], [ %spec.store.select, %21 ], [ %.037, %14 ], [ %.037, %12 ], [ %.037, %10 ], [ %.037, %7 ], [ %.037, %5 ]
  %.035.be = phi ptr [ %.035, %33 ], [ %.035, %32 ], [ %.035, %29 ], [ %.035, %28 ], [ %.035, %25 ], [ %.035, %21 ], [ %.035, %14 ], [ %.035, %12 ], [ %11, %10 ], [ %.035, %7 ], [ %.035, %5 ]
  %.0.be = phi ptr [ %.0, %33 ], [ %.0, %32 ], [ %.0, %29 ], [ %.0, %28 ], [ %.0, %25 ], [ %.0, %21 ], [ %.0, %14 ], [ %13, %12 ], [ %.0, %10 ], [ %.0, %7 ], [ %.0, %5 ]
  br label %5, !llvm.loop !5

7:                                                ; preds = %5
  %8 = load ptr, ptr @optarg, align 8, !tbaa !7
  %9 = tail call i64 @strtoll(ptr nocapture noundef %8, ptr noundef null, i32 noundef 0) #9
  br label %.backedge

10:                                               ; preds = %5
  %11 = load ptr, ptr @optarg, align 8, !tbaa !7
  br label %.backedge

12:                                               ; preds = %5
  %13 = load ptr, ptr @optarg, align 8, !tbaa !7
  br label %.backedge

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

18:                                               ; preds = %14
  %19 = load ptr, ptr @stderr, align 8, !tbaa !7
  %20 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %19, ptr noundef nonnull @.str.1, i32 noundef 256) #11
  br label %83

21:                                               ; preds = %5
  %22 = load ptr, ptr @optarg, align 8, !tbaa !7
  %23 = tail call i64 @strtol(ptr nocapture noundef %22, ptr noundef null, i32 noundef 0) #9
  %24 = trunc i64 %23 to i32
  %spec.store.select = tail call i32 @llvm.smin.i32(i32 %24, i32 255)
  br label %.backedge

25:                                               ; preds = %5
  %26 = load ptr, ptr @optarg, align 8, !tbaa !7
  %27 = tail call i64 @strtoll(ptr nocapture noundef %26, ptr noundef null, i32 noundef 0) #9
  br label %.backedge

28:                                               ; preds = %5
  store atomic i32 1, ptr @quiet seq_cst, align 4, !tbaa !13
  br label %.backedge

29:                                               ; preds = %5
  %30 = load ptr, ptr @optarg, align 8, !tbaa !7
  %31 = tail call i64 @strtoll(ptr nocapture noundef %30, ptr noundef null, i32 noundef 0) #9
  tail call void @set_seed(i64 noundef %31) #9
  br label %.backedge

32:                                               ; preds = %5
  br label %.backedge

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

35:                                               ; preds = %5
  %36 = load i32, ptr @optind, align 4, !tbaa !11
  %37 = add nsw i32 %36, 1
  %.not49 = icmp eq i32 %37, %0
  br i1 %.not49, label %40, label %38

38:                                               ; preds = %35
  %39 = load ptr, ptr %1, align 8, !tbaa !7
  tail call void @usage(ptr noundef %39)
  %.pre = load i32, ptr @optind, align 4, !tbaa !11
  br label %40

40:                                               ; preds = %38, %35
  %41 = phi i32 [ %.pre, %38 ], [ %36, %35 ]
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds ptr, ptr %1, i64 %42
  %44 = load ptr, ptr %43, align 8, !tbaa !7
  %45 = load atomic i32, ptr @quiet seq_cst, align 4, !tbaa !13
  %.not50 = icmp eq i32 %45, 0
  %46 = load ptr, ptr @stderr, align 8
  %47 = select i1 %.not50, ptr %46, ptr null
  %48 = tail call ptr @catalogue_load(ptr noundef %44, ptr noundef %.035, i32 noundef %.039, ptr noundef %47) #9
  %49 = icmp eq ptr %48, null
  br i1 %49, label %50, label %51

50:                                               ; preds = %40
  tail call void @perror(ptr noundef nonnull @.str.2) #12
  br label %83

51:                                               ; preds = %40
  %52 = load i32, ptr @optind, align 4, !tbaa !11
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds ptr, ptr %1, i64 %53
  %55 = load ptr, ptr %54, align 8, !tbaa !7
  %56 = load ptr, ptr @stderr, align 8, !tbaa !7
  %57 = tail call ptr @catalogue_load(ptr noundef %55, ptr noundef %.035, i32 noundef %.039, ptr noundef %56) #9
  %58 = icmp eq ptr %57, null
  br i1 %58, label %59, label %60

59:                                               ; preds = %51
  tail call void @perror(ptr noundef nonnull @.str.2) #12
  br label %83

60:                                               ; preds = %51
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(2048) %3, i8 0, i64 2048, i1 false)
  %.not51 = icmp eq ptr %.0, null
  br i1 %.not51, label %62, label %61

61:                                               ; preds = %60
  call void @open_sample_files(ptr noundef nonnull %3, ptr noundef nonnull %.0, i32 noundef %.037)
  br label %62

62:                                               ; preds = %61, %60
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(2048) %4, i8 0, i64 2048, i1 false)
  %63 = call ptr @__sysv_signal(i32 noundef 1, ptr noundef nonnull @interrupt_handler) #9
  %64 = call ptr @__sysv_signal(i32 noundef 2, ptr noundef nonnull @interrupt_handler) #9
  %65 = call ptr @__sysv_signal(i32 noundef 3, ptr noundef nonnull @interrupt_handler) #9
  %66 = call ptr @__sysv_signal(i32 noundef 15, ptr noundef nonnull @interrupt_handler) #9
  %67 = load atomic i32, ptr @quiet seq_cst, align 4, !tbaa !13
  %.not52 = icmp eq i32 %67, 0
  br i1 %.not52, label %68, label %76

68:                                               ; preds = %62
  %69 = load ptr, ptr @stderr, align 8, !tbaa !7
  %70 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %69, ptr noundef nonnull @.str.3, i64 noundef %.045) #11
  %71 = load ptr, ptr @stderr, align 8, !tbaa !7
  br i1 %.not51, label %.thread, label %72

72:                                               ; preds = %68
  %73 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %71, ptr noundef nonnull @.str.4, ptr noundef nonnull %.0) #11
  br label %76

.thread:                                          ; preds = %68
  %74 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %71, ptr noundef nonnull @.str.5) #11
  %75 = call i64 @generate_samples(ptr noundef nonnull %4, ptr noundef nonnull %3, ptr noundef nonnull %57, i32 noundef %.037, i64 noundef %.045, i64 noundef %.043)
  br label %.loopexit

76:                                               ; preds = %72, %62
  %77 = call i64 @generate_samples(ptr noundef nonnull %4, ptr noundef nonnull %3, ptr noundef nonnull %57, i32 noundef %.037, i64 noundef %.045, i64 noundef %.043)
  %.not5361 = icmp slt i32 %.037, 0
  %or.cond63 = select i1 %.not51, i1 true, i1 %.not5361
  br i1 %or.cond63, label %.loopexit, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %76
  %78 = add nuw nsw i32 %.037, 1
  %wide.trip.count = zext nneg i32 %78 to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %79 = getelementptr inbounds [256 x ptr], ptr %3, i64 0, i64 %indvars.iv
  %80 = load ptr, ptr %79, align 8, !tbaa !7
  %81 = call i32 @fclose(ptr noundef %80)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.loopexit, label %.lr.ph, !llvm.loop !14

.loopexit:                                        ; preds = %.lr.ph, %.thread, %76
  %82 = phi i64 [ %75, %.thread ], [ %77, %76 ], [ %77, %.lr.ph ]
  call void @write_statistics(ptr noundef %.0, ptr noundef nonnull %4, i64 noundef %82)
  br label %83

83:                                               ; preds = %.loopexit, %59, %50, %18
  %.041 = phi i32 [ 1, %18 ], [ 1, %50 ], [ 1, %59 ], [ 0, %.loopexit ]
  call void @llvm.lifetime.end.p0(i64 2048, ptr nonnull %4) #9
  call void @llvm.lifetime.end.p0(i64 2048, ptr nonnull %3) #9
  ret i32 %.041
}

; 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: mustprogress nofree nounwind willreturn
declare i64 @strtoll(ptr noundef readonly, ptr nocapture noundef, i32 noundef) local_unnamed_addr #3

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

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

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

declare void @set_seed(i64 noundef) local_unnamed_addr #6

; 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 #5

; 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 @open_sample_files(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

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

; Function Attrs: nounwind uwtable
declare hidden void @interrupt_handler(i32 noundef) #0

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

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

; Function Attrs: nounwind uwtable
declare hidden void @write_statistics(ptr noundef, ptr 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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smin.i32(i32, i32) #8

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 = { 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 #4 = { 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 #5 = { 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 #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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #9 = { nounwind }
attributes #10 = { nounwind willreturn memory(read) }
attributes #11 = { cold nounwind }
attributes #12 = { 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 = !{!9, !9, i64 0}
!14 = distinct !{!14, !6}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass