; LLVM IR from libtcod/libtcod :: src/libtcod (console_printing)

; 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.__va_list_tag = type { i32, i32, ptr, ptr }

@TCOD_console_vsprint.msg = external hidden global [10 x ptr], align 16
@TCOD_console_vsprint.buflen = external hidden global [10 x i32], align 16
@TCOD_console_vsprint.current_buf = external hidden global i32, align 4

; Function Attrs: nounwind uwtable
define dso_local ptr @TCOD_console_vsprint(ptr noundef %0, ptr noundef %1) #0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i8, align 1
  %7 = alloca i32, align 4
  %8 = alloca [1 x %struct.__va_list_tag], align 16
  %9 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #5
  store i8 0, ptr %6, align 1, !tbaa !9
  %10 = load ptr, ptr @TCOD_console_vsprint.msg, align 16, !tbaa !5
  %11 = icmp ne ptr %10, null
  br i1 %11, label %28, label %12

12:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 0, ptr %7, align 4, !tbaa !11
  br label %13

13:                                               ; preds = %24, %12
  %14 = load i32, ptr %7, align 4, !tbaa !11
  %15 = icmp slt i32 %14, 10
  br i1 %15, label %16, label %27

16:                                               ; preds = %13
  %17 = load i32, ptr %7, align 4, !tbaa !11
  %18 = sext i32 %17 to i64
  %19 = getelementptr inbounds [10 x i32], ptr @TCOD_console_vsprint.buflen, i64 0, i64 %18
  store i32 512, ptr %19, align 4, !tbaa !11
  %20 = call noalias ptr @calloc(i64 noundef 512, i64 noundef 1) #6
  %21 = load i32, ptr %7, align 4, !tbaa !11
  %22 = sext i32 %21 to i64
  %23 = getelementptr inbounds [10 x ptr], ptr @TCOD_console_vsprint.msg, i64 0, i64 %22
  store ptr %20, ptr %23, align 8, !tbaa !5
  br label %24

24:                                               ; preds = %16
  %25 = load i32, ptr %7, align 4, !tbaa !11
  %26 = add nsw i32 %25, 1
  store i32 %26, ptr %7, align 4, !tbaa !11
  br label %13, !llvm.loop !13

27:                                               ; preds = %13
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %28

28:                                               ; preds = %27, %2
  br label %29

29:                                               ; preds = %94, %28
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #5
  %30 = getelementptr inbounds [1 x %struct.__va_list_tag], ptr %8, i64 0, i64 0
  %31 = load ptr, ptr %4, align 8, !tbaa !5
  call void @llvm.va_copy.p0(ptr %30, ptr %31)
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %32 = load i32, ptr @TCOD_console_vsprint.current_buf, align 4, !tbaa !11
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds [10 x ptr], ptr @TCOD_console_vsprint.msg, i64 0, i64 %33
  %35 = load ptr, ptr %34, align 8, !tbaa !5
  %36 = load i32, ptr @TCOD_console_vsprint.current_buf, align 4, !tbaa !11
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds [10 x i32], ptr @TCOD_console_vsprint.buflen, i64 0, i64 %37
  %39 = load i32, ptr %38, align 4, !tbaa !11
  %40 = sext i32 %39 to i64
  %41 = load ptr, ptr %3, align 8, !tbaa !5
  %42 = getelementptr inbounds [1 x %struct.__va_list_tag], ptr %8, i64 0, i64 0
  %43 = call i32 @vsnprintf(ptr noundef %35, i64 noundef %40, ptr noundef %41, ptr noundef %42) #5
  store i32 %43, ptr %9, align 4, !tbaa !11
  %44 = getelementptr inbounds [1 x %struct.__va_list_tag], ptr %8, i64 0, i64 0
  call void @llvm.va_end.p0(ptr %44)
  store i8 1, ptr %6, align 1, !tbaa !9
  %45 = load i32, ptr %9, align 4, !tbaa !11
  %46 = icmp slt i32 %45, 0
  br i1 %46, label %54, label %47

47:                                               ; preds = %29
  %48 = load i32, ptr %9, align 4, !tbaa !11
  %49 = load i32, ptr @TCOD_console_vsprint.current_buf, align 4, !tbaa !11
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [10 x i32], ptr @TCOD_console_vsprint.buflen, i64 0, i64 %50
  %52 = load i32, ptr %51, align 4, !tbaa !11
  %53 = icmp sge i32 %48, %52
  br i1 %53, label %54, label %93

54:                                               ; preds = %47, %29
  %55 = load i32, ptr %9, align 4, !tbaa !11
  %56 = icmp sgt i32 %55, 0
  br i1 %56, label %57, label %73

57:                                               ; preds = %54
  br label %58

58:                                               ; preds = %66, %57
  %59 = load i32, ptr @TCOD_console_vsprint.current_buf, align 4, !tbaa !11
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [10 x i32], ptr @TCOD_console_vsprint.buflen, i64 0, i64 %60
  %62 = load i32, ptr %61, align 4, !tbaa !11
  %63 = load i32, ptr %9, align 4, !tbaa !11
  %64 = add nsw i32 %63, 1
  %65 = icmp slt i32 %62, %64
  br i1 %65, label %66, label %72

66:                                               ; preds = %58
  %67 = load i32, ptr @TCOD_console_vsprint.current_buf, align 4, !tbaa !11
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [10 x i32], ptr @TCOD_console_vsprint.buflen, i64 0, i64 %68
  %70 = load i32, ptr %69, align 4, !tbaa !11
  %71 = mul nsw i32 %70, 2
  store i32 %71, ptr %69, align 4, !tbaa !11
  br label %58, !llvm.loop !15

72:                                               ; preds = %58
  br label %79

73:                                               ; preds = %54
  %74 = load i32, ptr @TCOD_console_vsprint.current_buf, align 4, !tbaa !11
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [10 x i32], ptr @TCOD_console_vsprint.buflen, i64 0, i64 %75
  %77 = load i32, ptr %76, align 4, !tbaa !11
  %78 = mul nsw i32 %77, 2
  store i32 %78, ptr %76, align 4, !tbaa !11
  br label %79

79:                                               ; preds = %73, %72
  %80 = load i32, ptr @TCOD_console_vsprint.current_buf, align 4, !tbaa !11
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [10 x ptr], ptr @TCOD_console_vsprint.msg, i64 0, i64 %81
  %83 = load ptr, ptr %82, align 8, !tbaa !5
  call void @free(ptr noundef %83) #5
  %84 = load i32, ptr @TCOD_console_vsprint.current_buf, align 4, !tbaa !11
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [10 x i32], ptr @TCOD_console_vsprint.buflen, i64 0, i64 %85
  %87 = load i32, ptr %86, align 4, !tbaa !11
  %88 = sext i32 %87 to i64
  %89 = call noalias ptr @calloc(i64 noundef %88, i64 noundef 1) #6
  %90 = load i32, ptr @TCOD_console_vsprint.current_buf, align 4, !tbaa !11
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [10 x ptr], ptr @TCOD_console_vsprint.msg, i64 0, i64 %91
  store ptr %89, ptr %92, align 8, !tbaa !5
  store i8 0, ptr %6, align 1, !tbaa !9
  br label %93

93:                                               ; preds = %79, %47
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #5
  br label %94

94:                                               ; preds = %93
  %95 = load i8, ptr %6, align 1, !tbaa !9, !range !16, !noundef !17
  %96 = trunc i8 %95 to i1
  %97 = xor i1 %96, true
  br i1 %97, label %29, label %98, !llvm.loop !18

98:                                               ; preds = %94
  %99 = load i32, ptr @TCOD_console_vsprint.current_buf, align 4, !tbaa !11
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds [10 x ptr], ptr @TCOD_console_vsprint.msg, i64 0, i64 %100
  %102 = load ptr, ptr %101, align 8, !tbaa !5
  store ptr %102, ptr %5, align 8, !tbaa !5
  %103 = load i32, ptr @TCOD_console_vsprint.current_buf, align 4, !tbaa !11
  %104 = add nsw i32 %103, 1
  %105 = srem i32 %104, 10
  store i32 %105, ptr @TCOD_console_vsprint.current_buf, align 4, !tbaa !11
  %106 = load ptr, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  ret ptr %106
}

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

; Function Attrs: nounwind allocsize(0,1)
declare noalias ptr @calloc(i64 noundef, i64 noundef) #2

; Function Attrs: 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 willreturn
declare void @llvm.va_copy.p0(ptr, ptr) #3

; Function Attrs: nounwind
declare i32 @vsnprintf(ptr noundef, i64 noundef, ptr noundef, ptr noundef) #4

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.va_end.p0(ptr) #3

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

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 allocsize(0,1) "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 = { nocallback nofree nosync nounwind willreturn }
attributes #4 = { 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 = { nounwind }
attributes #6 = { nounwind allocsize(0,1) }

!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 = !{!"_Bool", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = !{i8 0, i8 2}
!17 = !{}
!18 = distinct !{!18, !14}


; 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.__va_list_tag = type { i32, i32, ptr, ptr }

@TCOD_console_vsprint.msg = external hidden local_unnamed_addr global [10 x ptr], align 16
@TCOD_console_vsprint.buflen = external hidden local_unnamed_addr global [10 x i32], align 16
@TCOD_console_vsprint.current_buf = external hidden local_unnamed_addr global i32, align 4

; Function Attrs: nounwind uwtable
define dso_local ptr @TCOD_console_vsprint(ptr nocapture noundef readonly %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = alloca [1 x %struct.__va_list_tag], align 16
  %4 = load ptr, ptr @TCOD_console_vsprint.msg, align 16, !tbaa !5
  %.not = icmp eq ptr %4, null
  br i1 %.not, label %.preheader17.preheader, label %.loopexit.preheader

.preheader17.preheader:                           ; preds = %2
  %5 = tail call noalias dereferenceable_or_null(512) ptr @calloc(i64 noundef 512, i64 noundef 1) #6
  store ptr %5, ptr @TCOD_console_vsprint.msg, align 16, !tbaa !5
  %6 = tail call noalias dereferenceable_or_null(512) ptr @calloc(i64 noundef 512, i64 noundef 1) #6
  store ptr %6, ptr getelementptr inbounds (i8, ptr @TCOD_console_vsprint.msg, i64 8), align 8, !tbaa !5
  %7 = tail call noalias dereferenceable_or_null(512) ptr @calloc(i64 noundef 512, i64 noundef 1) #6
  store ptr %7, ptr getelementptr inbounds (i8, ptr @TCOD_console_vsprint.msg, i64 16), align 16, !tbaa !5
  store <4 x i32> <i32 512, i32 512, i32 512, i32 512>, ptr @TCOD_console_vsprint.buflen, align 16, !tbaa !9
  %8 = tail call noalias dereferenceable_or_null(512) ptr @calloc(i64 noundef 512, i64 noundef 1) #6
  store ptr %8, ptr getelementptr inbounds (i8, ptr @TCOD_console_vsprint.msg, i64 24), align 8, !tbaa !5
  %9 = tail call noalias dereferenceable_or_null(512) ptr @calloc(i64 noundef 512, i64 noundef 1) #6
  store ptr %9, ptr getelementptr inbounds (i8, ptr @TCOD_console_vsprint.msg, i64 32), align 16, !tbaa !5
  %10 = tail call noalias dereferenceable_or_null(512) ptr @calloc(i64 noundef 512, i64 noundef 1) #6
  store ptr %10, ptr getelementptr inbounds (i8, ptr @TCOD_console_vsprint.msg, i64 40), align 8, !tbaa !5
  %11 = tail call noalias dereferenceable_or_null(512) ptr @calloc(i64 noundef 512, i64 noundef 1) #6
  store ptr %11, ptr getelementptr inbounds (i8, ptr @TCOD_console_vsprint.msg, i64 48), align 16, !tbaa !5
  store <4 x i32> <i32 512, i32 512, i32 512, i32 512>, ptr getelementptr inbounds (i8, ptr @TCOD_console_vsprint.buflen, i64 16), align 16, !tbaa !9
  %12 = tail call noalias dereferenceable_or_null(512) ptr @calloc(i64 noundef 512, i64 noundef 1) #6
  store ptr %12, ptr getelementptr inbounds (i8, ptr @TCOD_console_vsprint.msg, i64 56), align 8, !tbaa !5
  store i32 512, ptr getelementptr inbounds (i8, ptr @TCOD_console_vsprint.buflen, i64 32), align 16, !tbaa !9
  %13 = tail call noalias dereferenceable_or_null(512) ptr @calloc(i64 noundef 512, i64 noundef 1) #6
  store ptr %13, ptr getelementptr inbounds (i8, ptr @TCOD_console_vsprint.msg, i64 64), align 16, !tbaa !5
  store i32 512, ptr getelementptr inbounds (i8, ptr @TCOD_console_vsprint.buflen, i64 36), align 4, !tbaa !9
  %14 = tail call noalias dereferenceable_or_null(512) ptr @calloc(i64 noundef 512, i64 noundef 1) #6
  store ptr %14, ptr getelementptr inbounds (i8, ptr @TCOD_console_vsprint.msg, i64 72), align 8, !tbaa !5
  br label %.loopexit.preheader

.loopexit.preheader:                              ; preds = %.preheader17.preheader, %2
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.preheader, %.critedge
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #7
  call void @llvm.va_copy.p0(ptr nonnull %3, ptr %1)
  %15 = load i32, ptr @TCOD_console_vsprint.current_buf, align 4, !tbaa !9
  %16 = sext i32 %15 to i64
  %17 = getelementptr inbounds [10 x ptr], ptr @TCOD_console_vsprint.msg, i64 0, i64 %16
  %18 = load ptr, ptr %17, align 8, !tbaa !5
  %19 = getelementptr inbounds [10 x i32], ptr @TCOD_console_vsprint.buflen, i64 0, i64 %16
  %20 = load i32, ptr %19, align 4, !tbaa !9
  %21 = sext i32 %20 to i64
  %22 = call i32 @vsnprintf(ptr noundef %18, i64 noundef %21, ptr noundef %0, ptr noundef nonnull %3) #7
  call void @llvm.va_end.p0(ptr nonnull %3)
  %23 = icmp slt i32 %22, 0
  %.pre = load i32, ptr @TCOD_console_vsprint.current_buf, align 4, !tbaa !9
  %.phi.trans.insert = sext i32 %.pre to i64
  %.phi.trans.insert25 = getelementptr inbounds [10 x i32], ptr @TCOD_console_vsprint.buflen, i64 0, i64 %.phi.trans.insert
  %.pre26 = load i32, ptr %.phi.trans.insert25, align 4, !tbaa !9
  br i1 %23, label %.thread, label %24

24:                                               ; preds = %.loopexit
  %.not14 = icmp slt i32 %22, %.pre26
  br i1 %.not14, label %39, label %25

25:                                               ; preds = %24
  %.not16 = icmp eq i32 %22, 0
  br i1 %.not16, label %.thread, label %.lr.ph

.lr.ph:                                           ; preds = %25, %.lr.ph
  %26 = phi i32 [ %27, %.lr.ph ], [ %.pre26, %25 ]
  %27 = shl nsw i32 %26, 1
  %.not15 = icmp sgt i32 %27, %22
  br i1 %.not15, label %..critedge.loopexit_crit_edge, label %.lr.ph, !llvm.loop !11

.thread:                                          ; preds = %.loopexit, %25
  %28 = getelementptr inbounds [10 x i32], ptr @TCOD_console_vsprint.buflen, i64 0, i64 %.phi.trans.insert
  %29 = shl nsw i32 %.pre26, 1
  store i32 %29, ptr %28, align 4, !tbaa !9
  br label %.critedge

..critedge.loopexit_crit_edge:                    ; preds = %.lr.ph
  store i32 %27, ptr %.phi.trans.insert25, align 4, !tbaa !9
  br label %.critedge

.critedge:                                        ; preds = %..critedge.loopexit_crit_edge, %.thread
  %30 = getelementptr inbounds [10 x ptr], ptr @TCOD_console_vsprint.msg, i64 0, i64 %.phi.trans.insert
  %31 = load ptr, ptr %30, align 8, !tbaa !5
  call void @free(ptr noundef %31) #7
  %32 = load i32, ptr @TCOD_console_vsprint.current_buf, align 4, !tbaa !9
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds [10 x i32], ptr @TCOD_console_vsprint.buflen, i64 0, i64 %33
  %35 = load i32, ptr %34, align 4, !tbaa !9
  %36 = sext i32 %35 to i64
  %37 = call noalias ptr @calloc(i64 noundef %36, i64 noundef 1) #6
  %38 = getelementptr inbounds [10 x ptr], ptr @TCOD_console_vsprint.msg, i64 0, i64 %33
  store ptr %37, ptr %38, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #7
  br label %.loopexit

39:                                               ; preds = %24
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #7
  %40 = getelementptr inbounds [10 x ptr], ptr @TCOD_console_vsprint.msg, i64 0, i64 %.phi.trans.insert
  %41 = load ptr, ptr %40, align 8, !tbaa !5
  %42 = add nsw i32 %.pre, 1
  %43 = srem i32 %42, 10
  store i32 %43, ptr @TCOD_console_vsprint.current_buf, align 4, !tbaa !9
  ret ptr %41
}

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

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @calloc(i64 noundef, i64 noundef) local_unnamed_addr #2

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.va_copy.p0(ptr, ptr) #3

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.va_end.p0(ptr) #3

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #5

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 = { mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nocallback nofree nosync nounwind willreturn }
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 nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind allocsize(0,1) }
attributes #7 = { 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 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}


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