; LLVM IR from clausecker/24puzzle :: cmd (randompdb)

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

@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [14 x i8], align 1
@optind = external global i32, align 4
@stderr = external global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [69 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [23 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [5 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 %struct.timespec, align 8
  %7 = alloca i64, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %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 i32, align 4
  %17 = alloca [66 x i8], align 16
  %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 16, ptr %6) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  %19 = call i32 @tileset_add(i32 noundef 0, i32 noundef 0)
  store i32 %19, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 0, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.start.p0(i64 66, ptr %17) #7
  br label %20

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

26:                                               ; preds = %20
  %27 = load i32, ptr %16, align 4, !tbaa !5
  switch i32 %27, label %31 [
    i32 48, label %28
  ]

28:                                               ; preds = %26
  %29 = load i32, ptr %11, align 4, !tbaa !5
  %30 = call i32 @tileset_add(i32 noundef %29, i32 noundef 0)
  store i32 %30, ptr %11, align 4, !tbaa !5
  br label %35

31:                                               ; preds = %26
  %32 = load ptr, ptr %5, align 8, !tbaa !9
  %33 = getelementptr inbounds ptr, ptr %32, i64 0
  %34 = load ptr, ptr %33, align 8, !tbaa !9
  call void @usage(ptr noundef %34)
  br label %35

35:                                               ; preds = %31, %28
  br label %20, !llvm.loop !11

36:                                               ; preds = %20
  %37 = call i32 @clock_gettime(i32 noundef 0, ptr noundef %6) #7
  %38 = icmp ne i32 %37, 0
  br i1 %38, label %39, label %40

39:                                               ; preds = %36
  call void @perror(ptr noundef @.str.1)
  store i32 1, ptr %3, align 4
  store i32 1, ptr %18, align 4
  br label %133

40:                                               ; preds = %36
  %41 = getelementptr inbounds %struct.timespec, ptr %6, i32 0, i32 0
  %42 = load i64, ptr %41, align 8, !tbaa !13
  %43 = getelementptr inbounds %struct.timespec, ptr %6, i32 0, i32 1
  %44 = load i64, ptr %43, align 8, !tbaa !16
  %45 = add i64 %42, %44
  %46 = shl i64 %45, 32
  call void @set_seed(i64 noundef %46)
  %47 = load i32, ptr @optind, align 4, !tbaa !5
  %48 = sext i32 %47 to i64
  store i64 %48, ptr %7, align 8, !tbaa !17
  br label %49

49:                                               ; preds = %129, %40
  %50 = load i64, ptr %7, align 8, !tbaa !17
  %51 = load i32, ptr %4, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = icmp ult i64 %50, %52
  br i1 %53, label %54, label %132

54:                                               ; preds = %49
  %55 = load i32, ptr %10, align 4, !tbaa !5
  %56 = call i32 @tileset_complement(i32 noundef %55)
  %57 = call i32 @tileset_count(i32 noundef %56)
  store i32 %57, ptr %15, align 4, !tbaa !5
  %58 = load ptr, ptr %5, align 8, !tbaa !9
  %59 = load i64, ptr %7, align 8, !tbaa !17
  %60 = getelementptr inbounds ptr, ptr %58, i64 %59
  %61 = load ptr, ptr %60, align 8, !tbaa !9
  %62 = call i32 @atoi(ptr noundef %61) #8
  store i32 %62, ptr %14, align 4, !tbaa !5
  %63 = load i32, ptr %14, align 4, !tbaa !5
  %64 = icmp slt i32 %63, 1
  br i1 %64, label %69, label %65

65:                                               ; preds = %54
  %66 = load i32, ptr %14, align 4, !tbaa !5
  %67 = load i32, ptr %15, align 4, !tbaa !5
  %68 = icmp sgt i32 %66, %67
  br i1 %68, label %69, label %76

69:                                               ; preds = %65, %54
  %70 = load ptr, ptr @stderr, align 8, !tbaa !9
  %71 = load ptr, ptr %5, align 8, !tbaa !9
  %72 = load i64, ptr %7, align 8, !tbaa !17
  %73 = getelementptr inbounds ptr, ptr %71, i64 %72
  %74 = load ptr, ptr %73, align 8, !tbaa !9
  %75 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %70, ptr noundef @.str.2, ptr noundef %74) #7
  store i32 1, ptr %3, align 4
  store i32 1, ptr %18, align 4
  br label %133

76:                                               ; preds = %65
  %77 = load i32, ptr %14, align 4, !tbaa !5
  %78 = shl i32 1, %77
  %79 = sub nsw i32 %78, 1
  %80 = load i32, ptr %15, align 4, !tbaa !5
  %81 = load i32, ptr %14, align 4, !tbaa !5
  %82 = sub nsw i32 %80, %81
  %83 = shl i32 %79, %82
  store i32 %83, ptr %9, align 4, !tbaa !5
  %84 = load i32, ptr %9, align 4, !tbaa !5
  %85 = call i32 @tileset_rank(i32 noundef %84)
  %86 = add i32 %85, 1
  store i32 %86, ptr %12, align 4, !tbaa !5
  %87 = call i32 @random32()
  %88 = load i32, ptr %12, align 4, !tbaa !5
  %89 = urem i32 %87, %88
  store i32 %89, ptr %13, align 4, !tbaa !5
  %90 = load i32, ptr %14, align 4, !tbaa !5
  %91 = sext i32 %90 to i64
  call void @tileset_unrank_init(i64 noundef %91)
  %92 = load i32, ptr %10, align 4, !tbaa !5
  %93 = call i32 @tileset_complement(i32 noundef %92)
  %94 = load i32, ptr %14, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = load i32, ptr %13, align 4, !tbaa !5
  %97 = call i32 @tileset_unrank(i64 noundef %95, i32 noundef %96)
  %98 = call i32 @pdep(i32 noundef %93, i32 noundef %97)
  store i32 %98, ptr %8, align 4, !tbaa !5
  %99 = load i32, ptr %8, align 4, !tbaa !5
  %100 = call i32 @tileset_count(i32 noundef %99)
  %101 = load i32, ptr %14, align 4, !tbaa !5
  %102 = icmp eq i32 %100, %101
  br i1 %102, label %103, label %104

103:                                              ; preds = %76
  br label %105

104:                                              ; preds = %76
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.4, i32 noundef 91, ptr noundef @__PRETTY_FUNCTION__.main) #9
  unreachable

105:                                              ; preds = %103
  %106 = load i32, ptr %8, align 4, !tbaa !5
  %107 = load i32, ptr %10, align 4, !tbaa !5
  %108 = call i32 @tileset_intersect(i32 noundef %106, i32 noundef %107)
  %109 = icmp eq i32 %108, 0
  br i1 %109, label %110, label %111

110:                                              ; preds = %105
  br label %112

111:                                              ; preds = %105
  call void @__assert_fail(ptr noundef @.str.5, ptr noundef @.str.4, i32 noundef 92, ptr noundef @__PRETTY_FUNCTION__.main) #9
  unreachable

112:                                              ; preds = %110
  %113 = load i32, ptr %8, align 4, !tbaa !5
  %114 = load i32, ptr %10, align 4, !tbaa !5
  %115 = call i32 @tileset_union(i32 noundef %113, i32 noundef %114)
  store i32 %115, ptr %10, align 4, !tbaa !5
  %116 = getelementptr inbounds [66 x i8], ptr %17, i64 0, i64 0
  %117 = load i32, ptr %8, align 4, !tbaa !5
  %118 = load i32, ptr %11, align 4, !tbaa !5
  %119 = call i32 @tileset_union(i32 noundef %117, i32 noundef %118)
  call void @tileset_list_string(ptr noundef %116, i32 noundef %119)
  %120 = getelementptr inbounds [66 x i8], ptr %17, i64 0, i64 0
  %121 = load i64, ptr %7, align 8, !tbaa !17
  %122 = add i64 %121, 1
  %123 = load i32, ptr %4, align 4, !tbaa !5
  %124 = sext i32 %123 to i64
  %125 = icmp eq i64 %122, %124
  %126 = zext i1 %125 to i64
  %127 = select i1 %125, i32 10, i32 32
  %128 = call i32 (ptr, ...) @printf(ptr noundef @.str.6, ptr noundef %120, i32 noundef %127)
  br label %129

129:                                              ; preds = %112
  %130 = load i64, ptr %7, align 8, !tbaa !17
  %131 = add i64 %130, 1
  store i64 %131, ptr %7, align 8, !tbaa !17
  br label %49, !llvm.loop !18

132:                                              ; preds = %49
  store i32 0, ptr %18, align 4
  br label %133

133:                                              ; preds = %132, %69, %39
  call void @llvm.lifetime.end.p0(i64 66, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #7
  %134 = load i32, ptr %18, align 4
  switch i32 %134, label %137 [
    i32 0, label %135
    i32 1, label %135
  ]

135:                                              ; preds = %133, %133
  %136 = load i32, ptr %3, align 4
  ret i32 %136

137:                                              ; preds = %133
  unreachable
}

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @tileset_add(i32 noundef, i32 noundef) #2

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

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

; Function Attrs: nounwind
declare i32 @clock_gettime(i32 noundef, ptr noundef) #3

declare void @perror(ptr noundef) #4

declare void @set_seed(i64 noundef) #4

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @tileset_count(i32 noundef) #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @tileset_complement(i32 noundef) #2

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

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @tileset_rank(i32 noundef) #2

declare i32 @random32() #4

declare void @tileset_unrank_init(i64 noundef) #4

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @pdep(i32 noundef, i32 noundef) #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @tileset_unrank(i64 noundef, i32 noundef) #2

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @tileset_intersect(i32 noundef, i32 noundef) #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @tileset_union(i32 noundef, i32 noundef) #2

declare void @tileset_list_string(ptr noundef, i32 noundef) #4

declare i32 @printf(ptr noundef, ...) #4

; 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 = { inlinehint 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 = { 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 = { "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 = { 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 #6 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }
attributes #8 = { nounwind willreturn memory(read) }
attributes #9 = { noreturn 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 = !{!"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 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !15, i64 0}
!14 = !{!"timespec", !15, i64 0, !15, i64 8}
!15 = !{!"long", !7, i64 0}
!16 = !{!14, !15, i64 8}
!17 = !{!15, !15, i64 0}
!18 = distinct !{!18, !12}


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

@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [14 x i8], align 1
@optind = external local_unnamed_addr global i32, align 4
@stderr = external local_unnamed_addr global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [69 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [23 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [5 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.timespec, align 8
  %4 = alloca [66 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #8
  %5 = tail call i32 @tileset_add(i32 noundef 0, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 66, ptr nonnull %4) #8
  br label %.outer

.outer:                                           ; preds = %8, %2
  %.038.ph = phi i32 [ %9, %8 ], [ 0, %2 ]
  br label %6

6:                                                ; preds = %.outer, %10
  %7 = tail call i32 @__posix_getopt(i32 noundef %0, ptr noundef %1, ptr noundef nonnull @.str) #8
  switch i32 %7, label %10 [
    i32 -1, label %12
    i32 48, label %8
  ]

8:                                                ; preds = %6
  %9 = tail call i32 @tileset_add(i32 noundef %.038.ph, i32 noundef 0)
  br label %.outer, !llvm.loop !5

10:                                               ; preds = %6
  %11 = load ptr, ptr %1, align 8, !tbaa !7
  tail call void @usage(ptr noundef %11)
  br label %6, !llvm.loop !5

12:                                               ; preds = %6
  %13 = call i32 @clock_gettime(i32 noundef 0, ptr noundef nonnull %3) #8
  %.not43 = icmp eq i32 %13, 0
  br i1 %.not43, label %15, label %14

14:                                               ; preds = %12
  call void @perror(ptr noundef nonnull @.str.1) #9
  br label %.loopexit

15:                                               ; preds = %12
  %16 = load i64, ptr %3, align 8, !tbaa !11
  %17 = getelementptr inbounds i8, ptr %3, i64 8
  %18 = load i64, ptr %17, align 8, !tbaa !14
  %19 = add i64 %18, %16
  %20 = shl i64 %19, 32
  call void @set_seed(i64 noundef %20) #8
  %21 = load i32, ptr @optind, align 4, !tbaa !15
  %22 = sext i32 %0 to i64
  %23 = icmp ult i32 %21, %0
  br i1 %23, label %.lr.ph.preheader, label %.loopexit

.lr.ph.preheader:                                 ; preds = %15
  %24 = sext i32 %21 to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %54
  %.03647 = phi i64 [ %57, %54 ], [ %24, %.lr.ph.preheader ]
  %.03746 = phi i32 [ %55, %54 ], [ %5, %.lr.ph.preheader ]
  %25 = call i32 @tileset_complement(i32 noundef %.03746)
  %26 = call i32 @tileset_count(i32 noundef %25)
  %27 = getelementptr inbounds ptr, ptr %1, i64 %.03647
  %28 = load ptr, ptr %27, align 8, !tbaa !7
  %29 = call i32 @atoi(ptr nocapture noundef %28) #10
  %30 = icmp slt i32 %29, 1
  %31 = icmp sgt i32 %29, %26
  %or.cond = select i1 %30, i1 true, i1 %31
  br i1 %or.cond, label %32, label %35

32:                                               ; preds = %.lr.ph
  %33 = load ptr, ptr @stderr, align 8, !tbaa !7
  %34 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %33, ptr noundef nonnull @.str.2, ptr noundef nonnull %28) #11
  br label %.loopexit

35:                                               ; preds = %.lr.ph
  %notmask = shl nsw i32 -1, %29
  %36 = xor i32 %notmask, -1
  %37 = sub nsw i32 %26, %29
  %38 = shl i32 %36, %37
  %39 = call i32 @tileset_rank(i32 noundef %38)
  %40 = add i32 %39, 1
  %41 = call i32 @random32() #8
  %42 = urem i32 %41, %40
  %43 = zext nneg i32 %29 to i64
  call void @tileset_unrank_init(i64 noundef %43) #8
  %44 = call i32 @tileset_complement(i32 noundef %.03746)
  %45 = call i32 @tileset_unrank(i64 noundef %43, i32 noundef %42)
  %46 = call i32 @pdep(i32 noundef %44, i32 noundef %45)
  %47 = call i32 @tileset_count(i32 noundef %46)
  %48 = icmp eq i32 %47, %29
  br i1 %48, label %50, label %49

49:                                               ; preds = %35
  call void @__assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.4, i32 noundef 91, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #12
  unreachable

50:                                               ; preds = %35
  %51 = call i32 @tileset_intersect(i32 noundef %46, i32 noundef %.03746)
  %52 = icmp eq i32 %51, 0
  br i1 %52, label %54, label %53

53:                                               ; preds = %50
  call void @__assert_fail(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.4, i32 noundef 92, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #12
  unreachable

54:                                               ; preds = %50
  %55 = call i32 @tileset_union(i32 noundef %46, i32 noundef %.03746)
  %56 = call i32 @tileset_union(i32 noundef %46, i32 noundef %.038.ph)
  call void @tileset_list_string(ptr noundef nonnull %4, i32 noundef %56) #8
  %57 = add nuw i64 %.03647, 1
  %58 = icmp eq i64 %57, %22
  %59 = select i1 %58, i32 10, i32 32
  %60 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, ptr noundef nonnull %4, i32 noundef %59)
  %61 = icmp ult i64 %57, %22
  br i1 %61, label %.lr.ph, label %.loopexit, !llvm.loop !17

.loopexit:                                        ; preds = %54, %15, %32, %14
  %.0 = phi i32 [ 1, %14 ], [ 1, %32 ], [ 0, %15 ], [ 0, %54 ]
  call void @llvm.lifetime.end.p0(i64 66, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #8
  ret i32 %.0
}

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @tileset_add(i32 noundef, i32 noundef) local_unnamed_addr #2

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

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

; Function Attrs: nounwind
declare i32 @clock_gettime(i32 noundef, ptr noundef) local_unnamed_addr #3

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

declare void @set_seed(i64 noundef) local_unnamed_addr #5

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @tileset_count(i32 noundef) local_unnamed_addr #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @tileset_complement(i32 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 #6

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @tileset_rank(i32 noundef) local_unnamed_addr #2

declare i32 @random32() local_unnamed_addr #5

declare void @tileset_unrank_init(i64 noundef) local_unnamed_addr #5

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @pdep(i32 noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @tileset_unrank(i64 noundef, i32 noundef) local_unnamed_addr #2

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @tileset_intersect(i32 noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @tileset_union(i32 noundef, i32 noundef) local_unnamed_addr #2

declare void @tileset_list_string(ptr noundef, i32 noundef) local_unnamed_addr #5

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

; 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 = { inlinehint 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 = { 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 = { 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 = { "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 = { 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 #7 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { nounwind }
attributes #9 = { cold }
attributes #10 = { nounwind willreturn memory(read) }
attributes #11 = { cold nounwind }
attributes #12 = { noreturn 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 = 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, !13, i64 0}
!12 = !{!"timespec", !13, i64 0, !13, i64 8}
!13 = !{!"long", !9, i64 0}
!14 = !{!12, !13, i64 8}
!15 = !{!16, !16, i64 0}
!16 = !{!"int", !9, i64 0}
!17 = distinct !{!17, !6}


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