; LLVM IR from clausecker/24puzzle :: tileset (tileset_list_string)

; 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.1 = external hidden unnamed_addr constant [5 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: inlinehint nounwind uwtable
declare hidden i32 @tileset_empty(i32 noundef) #1

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @tileset_list_string(ptr noundef %0, i32 noundef %1) #3 {
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i64, align 8
  %6 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store i32 %1, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  %7 = load i32, ptr %4, align 4, !tbaa !9
  %8 = call i32 @tileset_empty(i32 noundef %7)
  %9 = icmp ne i32 %8, 0
  br i1 %9, label %10, label %13

10:                                               ; preds = %2
  %11 = load ptr, ptr %3, align 8, !tbaa !5
  %12 = getelementptr inbounds i8, ptr %11, i64 0
  store i8 0, ptr %12, align 1, !tbaa !11
  store i32 1, ptr %6, align 4
  br label %37

13:                                               ; preds = %2
  store i64 0, ptr %5, align 8, !tbaa !12
  br label %14

14:                                               ; preds = %31, %13
  %15 = load i64, ptr %5, align 8, !tbaa !12
  %16 = icmp ult i64 %15, 25
  br i1 %16, label %17, label %34

17:                                               ; preds = %14
  %18 = load i32, ptr %4, align 4, !tbaa !9
  %19 = load i64, ptr %5, align 8, !tbaa !12
  %20 = trunc i64 %19 to i32
  %21 = call i32 @tileset_has(i32 noundef %18, i32 noundef %20)
  %22 = icmp ne i32 %21, 0
  br i1 %22, label %23, label %30

23:                                               ; preds = %17
  %24 = load ptr, ptr %3, align 8, !tbaa !5
  %25 = load i64, ptr %5, align 8, !tbaa !12
  %26 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %24, ptr noundef @.str.1, i64 noundef %25) #4
  %27 = load ptr, ptr %3, align 8, !tbaa !5
  %28 = sext i32 %26 to i64
  %29 = getelementptr inbounds i8, ptr %27, i64 %28
  store ptr %29, ptr %3, align 8, !tbaa !5
  br label %30

30:                                               ; preds = %23, %17
  br label %31

31:                                               ; preds = %30
  %32 = load i64, ptr %5, align 8, !tbaa !12
  %33 = add i64 %32, 1
  store i64 %33, ptr %5, align 8, !tbaa !12
  br label %14, !llvm.loop !14

34:                                               ; preds = %14
  %35 = load ptr, ptr %3, align 8, !tbaa !5
  %36 = getelementptr inbounds i8, ptr %35, i64 -1
  store i8 0, ptr %36, align 1, !tbaa !11
  store i32 0, ptr %6, align 4
  br label %37

37:                                               ; preds = %34, %10
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  %38 = load i32, ptr %6, align 4
  switch i32 %38, label %40 [
    i32 0, label %39
    i32 1, label %39
  ]

39:                                               ; preds = %37, %37
  ret void

40:                                               ; preds = %37
  unreachable
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 #4 = { 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 = !{!"int", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"long", !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}


; 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.1 = external hidden unnamed_addr constant [5 x i8], align 1

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @sprintf(ptr noalias nocapture noundef writeonly, ptr nocapture noundef readonly, ...) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local void @tileset_list_string(ptr nocapture noundef writeonly %0, i32 noundef %1) local_unnamed_addr #2 {
  %3 = tail call i32 @tileset_empty(i32 noundef %1)
  %.not = icmp eq i32 %3, 0
  br i1 %.not, label %.preheader.preheader, label %131

.preheader.preheader:                             ; preds = %2
  %4 = tail call i32 @tileset_has(i32 noundef %1, i32 noundef 0)
  %.not10 = icmp eq i32 %4, 0
  br i1 %.not10, label %.preheader.1, label %5

5:                                                ; preds = %.preheader.preheader
  %6 = tail call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %0, ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef 0) #3
  %7 = sext i32 %6 to i64
  %8 = getelementptr inbounds i8, ptr %0, i64 %7
  br label %.preheader.1

.preheader.1:                                     ; preds = %.preheader.preheader, %5
  %.1 = phi ptr [ %8, %5 ], [ %0, %.preheader.preheader ]
  %9 = tail call i32 @tileset_has(i32 noundef %1, i32 noundef 1)
  %.not10.1 = icmp eq i32 %9, 0
  br i1 %.not10.1, label %.preheader.2, label %10

10:                                               ; preds = %.preheader.1
  %11 = tail call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %.1, ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef 1) #3
  %12 = sext i32 %11 to i64
  %13 = getelementptr inbounds i8, ptr %.1, i64 %12
  br label %.preheader.2

.preheader.2:                                     ; preds = %10, %.preheader.1
  %.1.1 = phi ptr [ %13, %10 ], [ %.1, %.preheader.1 ]
  %14 = tail call i32 @tileset_has(i32 noundef %1, i32 noundef 2)
  %.not10.2 = icmp eq i32 %14, 0
  br i1 %.not10.2, label %.preheader.3, label %15

15:                                               ; preds = %.preheader.2
  %16 = tail call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %.1.1, ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef 2) #3
  %17 = sext i32 %16 to i64
  %18 = getelementptr inbounds i8, ptr %.1.1, i64 %17
  br label %.preheader.3

.preheader.3:                                     ; preds = %15, %.preheader.2
  %.1.2 = phi ptr [ %18, %15 ], [ %.1.1, %.preheader.2 ]
  %19 = tail call i32 @tileset_has(i32 noundef %1, i32 noundef 3)
  %.not10.3 = icmp eq i32 %19, 0
  br i1 %.not10.3, label %.preheader.4, label %20

20:                                               ; preds = %.preheader.3
  %21 = tail call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %.1.2, ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef 3) #3
  %22 = sext i32 %21 to i64
  %23 = getelementptr inbounds i8, ptr %.1.2, i64 %22
  br label %.preheader.4

.preheader.4:                                     ; preds = %20, %.preheader.3
  %.1.3 = phi ptr [ %23, %20 ], [ %.1.2, %.preheader.3 ]
  %24 = tail call i32 @tileset_has(i32 noundef %1, i32 noundef 4)
  %.not10.4 = icmp eq i32 %24, 0
  br i1 %.not10.4, label %.preheader.5, label %25

25:                                               ; preds = %.preheader.4
  %26 = tail call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %.1.3, ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef 4) #3
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds i8, ptr %.1.3, i64 %27
  br label %.preheader.5

.preheader.5:                                     ; preds = %25, %.preheader.4
  %.1.4 = phi ptr [ %28, %25 ], [ %.1.3, %.preheader.4 ]
  %29 = tail call i32 @tileset_has(i32 noundef %1, i32 noundef 5)
  %.not10.5 = icmp eq i32 %29, 0
  br i1 %.not10.5, label %.preheader.6, label %30

30:                                               ; preds = %.preheader.5
  %31 = tail call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %.1.4, ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef 5) #3
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds i8, ptr %.1.4, i64 %32
  br label %.preheader.6

.preheader.6:                                     ; preds = %30, %.preheader.5
  %.1.5 = phi ptr [ %33, %30 ], [ %.1.4, %.preheader.5 ]
  %34 = tail call i32 @tileset_has(i32 noundef %1, i32 noundef 6)
  %.not10.6 = icmp eq i32 %34, 0
  br i1 %.not10.6, label %.preheader.7, label %35

35:                                               ; preds = %.preheader.6
  %36 = tail call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %.1.5, ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef 6) #3
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds i8, ptr %.1.5, i64 %37
  br label %.preheader.7

.preheader.7:                                     ; preds = %35, %.preheader.6
  %.1.6 = phi ptr [ %38, %35 ], [ %.1.5, %.preheader.6 ]
  %39 = tail call i32 @tileset_has(i32 noundef %1, i32 noundef 7)
  %.not10.7 = icmp eq i32 %39, 0
  br i1 %.not10.7, label %.preheader.8, label %40

40:                                               ; preds = %.preheader.7
  %41 = tail call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %.1.6, ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef 7) #3
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds i8, ptr %.1.6, i64 %42
  br label %.preheader.8

.preheader.8:                                     ; preds = %40, %.preheader.7
  %.1.7 = phi ptr [ %43, %40 ], [ %.1.6, %.preheader.7 ]
  %44 = tail call i32 @tileset_has(i32 noundef %1, i32 noundef 8)
  %.not10.8 = icmp eq i32 %44, 0
  br i1 %.not10.8, label %.preheader.9, label %45

45:                                               ; preds = %.preheader.8
  %46 = tail call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %.1.7, ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef 8) #3
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds i8, ptr %.1.7, i64 %47
  br label %.preheader.9

.preheader.9:                                     ; preds = %45, %.preheader.8
  %.1.8 = phi ptr [ %48, %45 ], [ %.1.7, %.preheader.8 ]
  %49 = tail call i32 @tileset_has(i32 noundef %1, i32 noundef 9)
  %.not10.9 = icmp eq i32 %49, 0
  br i1 %.not10.9, label %.preheader.10, label %50

50:                                               ; preds = %.preheader.9
  %51 = tail call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %.1.8, ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef 9) #3
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds i8, ptr %.1.8, i64 %52
  br label %.preheader.10

.preheader.10:                                    ; preds = %50, %.preheader.9
  %.1.9 = phi ptr [ %53, %50 ], [ %.1.8, %.preheader.9 ]
  %54 = tail call i32 @tileset_has(i32 noundef %1, i32 noundef 10)
  %.not10.10 = icmp eq i32 %54, 0
  br i1 %.not10.10, label %.preheader.11, label %55

55:                                               ; preds = %.preheader.10
  %56 = tail call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %.1.9, ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef 10) #3
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds i8, ptr %.1.9, i64 %57
  br label %.preheader.11

.preheader.11:                                    ; preds = %55, %.preheader.10
  %.1.10 = phi ptr [ %58, %55 ], [ %.1.9, %.preheader.10 ]
  %59 = tail call i32 @tileset_has(i32 noundef %1, i32 noundef 11)
  %.not10.11 = icmp eq i32 %59, 0
  br i1 %.not10.11, label %.preheader.12, label %60

60:                                               ; preds = %.preheader.11
  %61 = tail call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %.1.10, ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef 11) #3
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds i8, ptr %.1.10, i64 %62
  br label %.preheader.12

.preheader.12:                                    ; preds = %60, %.preheader.11
  %.1.11 = phi ptr [ %63, %60 ], [ %.1.10, %.preheader.11 ]
  %64 = tail call i32 @tileset_has(i32 noundef %1, i32 noundef 12)
  %.not10.12 = icmp eq i32 %64, 0
  br i1 %.not10.12, label %.preheader.13, label %65

65:                                               ; preds = %.preheader.12
  %66 = tail call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %.1.11, ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef 12) #3
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds i8, ptr %.1.11, i64 %67
  br label %.preheader.13

.preheader.13:                                    ; preds = %65, %.preheader.12
  %.1.12 = phi ptr [ %68, %65 ], [ %.1.11, %.preheader.12 ]
  %69 = tail call i32 @tileset_has(i32 noundef %1, i32 noundef 13)
  %.not10.13 = icmp eq i32 %69, 0
  br i1 %.not10.13, label %.preheader.14, label %70

70:                                               ; preds = %.preheader.13
  %71 = tail call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %.1.12, ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef 13) #3
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds i8, ptr %.1.12, i64 %72
  br label %.preheader.14

.preheader.14:                                    ; preds = %70, %.preheader.13
  %.1.13 = phi ptr [ %73, %70 ], [ %.1.12, %.preheader.13 ]
  %74 = tail call i32 @tileset_has(i32 noundef %1, i32 noundef 14)
  %.not10.14 = icmp eq i32 %74, 0
  br i1 %.not10.14, label %.preheader.15, label %75

75:                                               ; preds = %.preheader.14
  %76 = tail call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %.1.13, ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef 14) #3
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds i8, ptr %.1.13, i64 %77
  br label %.preheader.15

.preheader.15:                                    ; preds = %75, %.preheader.14
  %.1.14 = phi ptr [ %78, %75 ], [ %.1.13, %.preheader.14 ]
  %79 = tail call i32 @tileset_has(i32 noundef %1, i32 noundef 15)
  %.not10.15 = icmp eq i32 %79, 0
  br i1 %.not10.15, label %.preheader.16, label %80

80:                                               ; preds = %.preheader.15
  %81 = tail call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %.1.14, ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef 15) #3
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds i8, ptr %.1.14, i64 %82
  br label %.preheader.16

.preheader.16:                                    ; preds = %80, %.preheader.15
  %.1.15 = phi ptr [ %83, %80 ], [ %.1.14, %.preheader.15 ]
  %84 = tail call i32 @tileset_has(i32 noundef %1, i32 noundef 16)
  %.not10.16 = icmp eq i32 %84, 0
  br i1 %.not10.16, label %.preheader.17, label %85

85:                                               ; preds = %.preheader.16
  %86 = tail call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %.1.15, ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef 16) #3
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds i8, ptr %.1.15, i64 %87
  br label %.preheader.17

.preheader.17:                                    ; preds = %85, %.preheader.16
  %.1.16 = phi ptr [ %88, %85 ], [ %.1.15, %.preheader.16 ]
  %89 = tail call i32 @tileset_has(i32 noundef %1, i32 noundef 17)
  %.not10.17 = icmp eq i32 %89, 0
  br i1 %.not10.17, label %.preheader.18, label %90

90:                                               ; preds = %.preheader.17
  %91 = tail call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %.1.16, ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef 17) #3
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds i8, ptr %.1.16, i64 %92
  br label %.preheader.18

.preheader.18:                                    ; preds = %90, %.preheader.17
  %.1.17 = phi ptr [ %93, %90 ], [ %.1.16, %.preheader.17 ]
  %94 = tail call i32 @tileset_has(i32 noundef %1, i32 noundef 18)
  %.not10.18 = icmp eq i32 %94, 0
  br i1 %.not10.18, label %.preheader.19, label %95

95:                                               ; preds = %.preheader.18
  %96 = tail call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %.1.17, ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef 18) #3
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds i8, ptr %.1.17, i64 %97
  br label %.preheader.19

.preheader.19:                                    ; preds = %95, %.preheader.18
  %.1.18 = phi ptr [ %98, %95 ], [ %.1.17, %.preheader.18 ]
  %99 = tail call i32 @tileset_has(i32 noundef %1, i32 noundef 19)
  %.not10.19 = icmp eq i32 %99, 0
  br i1 %.not10.19, label %.preheader.20, label %100

100:                                              ; preds = %.preheader.19
  %101 = tail call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %.1.18, ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef 19) #3
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds i8, ptr %.1.18, i64 %102
  br label %.preheader.20

.preheader.20:                                    ; preds = %100, %.preheader.19
  %.1.19 = phi ptr [ %103, %100 ], [ %.1.18, %.preheader.19 ]
  %104 = tail call i32 @tileset_has(i32 noundef %1, i32 noundef 20)
  %.not10.20 = icmp eq i32 %104, 0
  br i1 %.not10.20, label %.preheader.21, label %105

105:                                              ; preds = %.preheader.20
  %106 = tail call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %.1.19, ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef 20) #3
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds i8, ptr %.1.19, i64 %107
  br label %.preheader.21

.preheader.21:                                    ; preds = %105, %.preheader.20
  %.1.20 = phi ptr [ %108, %105 ], [ %.1.19, %.preheader.20 ]
  %109 = tail call i32 @tileset_has(i32 noundef %1, i32 noundef 21)
  %.not10.21 = icmp eq i32 %109, 0
  br i1 %.not10.21, label %.preheader.22, label %110

110:                                              ; preds = %.preheader.21
  %111 = tail call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %.1.20, ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef 21) #3
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds i8, ptr %.1.20, i64 %112
  br label %.preheader.22

.preheader.22:                                    ; preds = %110, %.preheader.21
  %.1.21 = phi ptr [ %113, %110 ], [ %.1.20, %.preheader.21 ]
  %114 = tail call i32 @tileset_has(i32 noundef %1, i32 noundef 22)
  %.not10.22 = icmp eq i32 %114, 0
  br i1 %.not10.22, label %.preheader.23, label %115

115:                                              ; preds = %.preheader.22
  %116 = tail call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %.1.21, ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef 22) #3
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds i8, ptr %.1.21, i64 %117
  br label %.preheader.23

.preheader.23:                                    ; preds = %115, %.preheader.22
  %.1.22 = phi ptr [ %118, %115 ], [ %.1.21, %.preheader.22 ]
  %119 = tail call i32 @tileset_has(i32 noundef %1, i32 noundef 23)
  %.not10.23 = icmp eq i32 %119, 0
  br i1 %.not10.23, label %.preheader.24, label %120

120:                                              ; preds = %.preheader.23
  %121 = tail call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %.1.22, ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef 23) #3
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds i8, ptr %.1.22, i64 %122
  br label %.preheader.24

.preheader.24:                                    ; preds = %120, %.preheader.23
  %.1.23 = phi ptr [ %123, %120 ], [ %.1.22, %.preheader.23 ]
  %124 = tail call i32 @tileset_has(i32 noundef %1, i32 noundef 24)
  %.not10.24 = icmp eq i32 %124, 0
  br i1 %.not10.24, label %129, label %125

125:                                              ; preds = %.preheader.24
  %126 = tail call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %.1.23, ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef 24) #3
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds i8, ptr %.1.23, i64 %127
  br label %129

129:                                              ; preds = %125, %.preheader.24
  %.1.24 = phi ptr [ %128, %125 ], [ %.1.23, %.preheader.24 ]
  %130 = getelementptr inbounds i8, ptr %.1.24, i64 -1
  br label %131

131:                                              ; preds = %2, %129
  %.sink = phi ptr [ %130, %129 ], [ %0, %2 ]
  store i8 0, ptr %.sink, align 1, !tbaa !5
  ret void
}

attributes #0 = { 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 #1 = { 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 #2 = { 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 }

!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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass