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

; 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"

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

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

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

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #2

; Function Attrs: nounwind
declare ptr @strncat(ptr noundef, ptr noundef, i64 noundef) #1

declare ptr @TCOD_strdup(ptr noundef) #3

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

; Function Attrs: nounwind willreturn memory(none)
declare ptr @__ctype_tolower_loc() #5

; Function Attrs: nounwind willreturn memory(read)
declare ptr @strstr(ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local zeroext i1 @namegen_word_prune_syllables(ptr noundef %0) #6 {
  %2 = alloca i1, align 1
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca [8 x i8], align 1
  %7 = alloca i32, align 4
  %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
  store ptr %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  %13 = load ptr, ptr %3, align 8, !tbaa !5
  %14 = call ptr @TCOD_strdup(ptr noundef %13)
  store ptr %14, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  %15 = load ptr, ptr %4, align 8, !tbaa !5
  %16 = call i64 @strlen(ptr noundef %15) #8
  %17 = trunc i64 %16 to i32
  store i32 %17, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %18

18:                                               ; preds = %42, %1
  %19 = load i32, ptr %7, align 4, !tbaa !9
  %20 = load i32, ptr %5, align 4, !tbaa !9
  %21 = icmp slt i32 %19, %20
  br i1 %21, label %23, label %22

22:                                               ; preds = %18
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %45

23:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  %24 = call ptr @__ctype_tolower_loc() #9
  %25 = load ptr, ptr %24, align 8, !tbaa !5
  %26 = load ptr, ptr %4, align 8, !tbaa !5
  %27 = load i32, ptr %7, align 4, !tbaa !9
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds i8, ptr %26, i64 %28
  %30 = load i8, ptr %29, align 1, !tbaa !11
  %31 = sext i8 %30 to i32
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds i32, ptr %25, i64 %32
  %34 = load i32, ptr %33, align 4, !tbaa !9
  store i32 %34, ptr %8, align 4, !tbaa !9
  %35 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %35, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  %36 = load i32, ptr %9, align 4, !tbaa !9
  %37 = trunc i32 %36 to i8
  %38 = load ptr, ptr %4, align 8, !tbaa !5
  %39 = load i32, ptr %7, align 4, !tbaa !9
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds i8, ptr %38, i64 %40
  store i8 %37, ptr %41, align 1, !tbaa !11
  br label %42

42:                                               ; preds = %23
  %43 = load i32, ptr %7, align 4, !tbaa !9
  %44 = add nsw i32 %43, 1
  store i32 %44, ptr %7, align 4, !tbaa !9
  br label %18, !llvm.loop !12

45:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %46

46:                                               ; preds = %73, %45
  %47 = load i32, ptr %10, align 4, !tbaa !9
  %48 = load i32, ptr %5, align 4, !tbaa !9
  %49 = sub nsw i32 %48, 4
  %50 = icmp slt i32 %47, %49
  br i1 %50, label %52, label %51

51:                                               ; preds = %46
  store i32 5, ptr %11, align 4
  br label %76

52:                                               ; preds = %46
  %53 = getelementptr inbounds [8 x i8], ptr %6, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 1 %53, i8 0, i64 8, i1 false)
  %54 = getelementptr inbounds [8 x i8], ptr %6, i64 0, i64 0
  %55 = load ptr, ptr %4, align 8, !tbaa !5
  %56 = load i32, ptr %10, align 4, !tbaa !9
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds i8, ptr %55, i64 %57
  %59 = call ptr @strncpy(ptr noundef %54, ptr noundef %58, i64 noundef 2) #7
  %60 = getelementptr inbounds [8 x i8], ptr %6, i64 0, i64 0
  %61 = load ptr, ptr %4, align 8, !tbaa !5
  %62 = load i32, ptr %10, align 4, !tbaa !9
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds i8, ptr %61, i64 %63
  %65 = call ptr @strncat(ptr noundef %60, ptr noundef %64, i64 noundef 2) #7
  %66 = load ptr, ptr %4, align 8, !tbaa !5
  %67 = getelementptr inbounds [8 x i8], ptr %6, i64 0, i64 0
  %68 = call ptr @strstr(ptr noundef %66, ptr noundef %67) #8
  %69 = icmp ne ptr %68, null
  br i1 %69, label %70, label %72

70:                                               ; preds = %52
  %71 = load ptr, ptr %4, align 8, !tbaa !5
  call void @free(ptr noundef %71) #7
  store i1 true, ptr %2, align 1
  store i32 1, ptr %11, align 4
  br label %76

72:                                               ; preds = %52
  br label %73

73:                                               ; preds = %72
  %74 = load i32, ptr %10, align 4, !tbaa !9
  %75 = add nsw i32 %74, 1
  store i32 %75, ptr %10, align 4, !tbaa !9
  br label %46, !llvm.loop !14

76:                                               ; preds = %70, %51
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  %77 = load i32, ptr %11, align 4
  switch i32 %77, label %111 [
    i32 5, label %78
  ]

78:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %79

79:                                               ; preds = %104, %78
  %80 = load i32, ptr %12, align 4, !tbaa !9
  %81 = load i32, ptr %5, align 4, !tbaa !9
  %82 = sub nsw i32 %81, 6
  %83 = icmp slt i32 %80, %82
  br i1 %83, label %85, label %84

84:                                               ; preds = %79
  store i32 8, ptr %11, align 4
  br label %107

85:                                               ; preds = %79
  %86 = getelementptr inbounds [8 x i8], ptr %6, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 1 %86, i8 0, i64 8, i1 false)
  %87 = getelementptr inbounds [8 x i8], ptr %6, i64 0, i64 0
  %88 = load ptr, ptr %4, align 8, !tbaa !5
  %89 = load i32, ptr %12, align 4, !tbaa !9
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds i8, ptr %88, i64 %90
  %92 = call ptr @strncpy(ptr noundef %87, ptr noundef %91, i64 noundef 3) #7
  %93 = load ptr, ptr %4, align 8, !tbaa !5
  %94 = load i32, ptr %12, align 4, !tbaa !9
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds i8, ptr %93, i64 %95
  %97 = getelementptr inbounds i8, ptr %96, i64 3
  %98 = getelementptr inbounds [8 x i8], ptr %6, i64 0, i64 0
  %99 = call ptr @strstr(ptr noundef %97, ptr noundef %98) #8
  %100 = icmp ne ptr %99, null
  br i1 %100, label %101, label %103

101:                                              ; preds = %85
  %102 = load ptr, ptr %4, align 8, !tbaa !5
  call void @free(ptr noundef %102) #7
  store i1 true, ptr %2, align 1
  store i32 1, ptr %11, align 4
  br label %107

103:                                              ; preds = %85
  br label %104

104:                                              ; preds = %103
  %105 = load i32, ptr %12, align 4, !tbaa !9
  %106 = add nsw i32 %105, 1
  store i32 %106, ptr %12, align 4, !tbaa !9
  br label %79, !llvm.loop !15

107:                                              ; preds = %101, %84
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  %108 = load i32, ptr %11, align 4
  switch i32 %108, label %111 [
    i32 8, label %109
  ]

109:                                              ; preds = %107
  %110 = load ptr, ptr %4, align 8, !tbaa !5
  call void @free(ptr noundef %110) #7
  store i1 false, ptr %2, align 1
  store i32 1, ptr %11, align 4
  br label %111

111:                                              ; preds = %109, %107, %76
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  %112 = load i1, ptr %2, align 1
  ret i1 %112
}

; Function Attrs: nounwind
declare ptr @strncpy(ptr noundef, ptr noundef, i64 noundef) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 willreturn memory(read) "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 = { "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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { nounwind willreturn memory(none) "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 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 = { nounwind }
attributes #8 = { nounwind willreturn memory(read) }
attributes #9 = { nounwind willreturn memory(none) }

!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 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = distinct !{!15, !13}


; 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"

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

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

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: readwrite)
declare ptr @strncat(ptr noalias noundef returned, ptr noalias nocapture noundef readonly, i64 noundef) local_unnamed_addr #3

declare ptr @TCOD_strdup(ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none)
declare ptr @__ctype_tolower_loc() local_unnamed_addr #5

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare ptr @strstr(ptr noundef, ptr nocapture noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local noundef zeroext i1 @namegen_word_prune_syllables(ptr noundef %0) local_unnamed_addr #6 {
  %2 = alloca [8 x i8], align 8
  %3 = tail call ptr @TCOD_strdup(ptr noundef %0) #7
  %4 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %3) #8
  %5 = trunc i64 %4 to i32
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  %6 = icmp sgt i32 %5, 0
  br i1 %6, label %.lr.ph, label %.critedge42

.lr.ph:                                           ; preds = %1
  %7 = tail call ptr @__ctype_tolower_loc() #9
  %wide.trip.count = and i64 %4, 2147483647
  %8 = add nsw i64 %wide.trip.count, -1
  %xtraiter = and i64 %4, 3
  %9 = icmp ult i64 %8, 3
  br i1 %9, label %.preheader.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter = sub nsw i64 %wide.trip.count, %xtraiter
  br label %18

.preheader.unr-lcssa:                             ; preds = %18, %.lr.ph
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next.3, %18 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader, label %.epil.preheader

.epil.preheader:                                  ; preds = %.preheader.unr-lcssa, %.epil.preheader
  %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %.epil.preheader ], [ %indvars.iv.unr, %.preheader.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %.preheader.unr-lcssa ]
  %10 = load ptr, ptr %7, align 8, !tbaa !5
  %11 = getelementptr inbounds i8, ptr %3, i64 %indvars.iv.epil
  %12 = load i8, ptr %11, align 1, !tbaa !9
  %13 = sext i8 %12 to i64
  %14 = getelementptr inbounds i32, ptr %10, i64 %13
  %15 = load i32, ptr %14, align 4, !tbaa !10
  %16 = trunc i32 %15 to i8
  store i8 %16, ptr %11, align 1, !tbaa !9
  %indvars.iv.next.epil = add nuw nsw i64 %indvars.iv.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.preheader, label %.epil.preheader, !llvm.loop !12

.preheader:                                       ; preds = %.epil.preheader, %.preheader.unr-lcssa
  %.not3844 = icmp sgt i32 %5, 4
  br i1 %.not3844, label %.lr.ph46.preheader, label %.critedge42

.lr.ph46.preheader:                               ; preds = %.preheader
  %17 = add i64 %4, 4294967292
  %wide.trip.count54 = and i64 %17, 4294967295
  br label %.lr.ph46

18:                                               ; preds = %18, %.lr.ph.new
  %indvars.iv = phi i64 [ 0, %.lr.ph.new ], [ %indvars.iv.next.3, %18 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.3, %18 ]
  %19 = load ptr, ptr %7, align 8, !tbaa !5
  %20 = getelementptr inbounds i8, ptr %3, i64 %indvars.iv
  %21 = load i8, ptr %20, align 1, !tbaa !9
  %22 = sext i8 %21 to i64
  %23 = getelementptr inbounds i32, ptr %19, i64 %22
  %24 = load i32, ptr %23, align 4, !tbaa !10
  %25 = trunc i32 %24 to i8
  store i8 %25, ptr %20, align 1, !tbaa !9
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %26 = load ptr, ptr %7, align 8, !tbaa !5
  %27 = getelementptr inbounds i8, ptr %3, i64 %indvars.iv.next
  %28 = load i8, ptr %27, align 1, !tbaa !9
  %29 = sext i8 %28 to i64
  %30 = getelementptr inbounds i32, ptr %26, i64 %29
  %31 = load i32, ptr %30, align 4, !tbaa !10
  %32 = trunc i32 %31 to i8
  store i8 %32, ptr %27, align 1, !tbaa !9
  %indvars.iv.next.1 = or disjoint i64 %indvars.iv, 2
  %33 = load ptr, ptr %7, align 8, !tbaa !5
  %34 = getelementptr inbounds i8, ptr %3, i64 %indvars.iv.next.1
  %35 = load i8, ptr %34, align 1, !tbaa !9
  %36 = sext i8 %35 to i64
  %37 = getelementptr inbounds i32, ptr %33, i64 %36
  %38 = load i32, ptr %37, align 4, !tbaa !10
  %39 = trunc i32 %38 to i8
  store i8 %39, ptr %34, align 1, !tbaa !9
  %indvars.iv.next.2 = or disjoint i64 %indvars.iv, 3
  %40 = load ptr, ptr %7, align 8, !tbaa !5
  %41 = getelementptr inbounds i8, ptr %3, i64 %indvars.iv.next.2
  %42 = load i8, ptr %41, align 1, !tbaa !9
  %43 = sext i8 %42 to i64
  %44 = getelementptr inbounds i32, ptr %40, i64 %43
  %45 = load i32, ptr %44, align 4, !tbaa !10
  %46 = trunc i32 %45 to i8
  store i8 %46, ptr %41, align 1, !tbaa !9
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %.preheader.unr-lcssa, label %18, !llvm.loop !14

47:                                               ; preds = %.lr.ph46
  %indvars.iv.next52 = add nuw nsw i64 %indvars.iv51, 1
  %exitcond55.not = icmp eq i64 %indvars.iv.next52, %wide.trip.count54
  br i1 %exitcond55.not, label %.critedge.preheader, label %.lr.ph46, !llvm.loop !16

.critedge.preheader:                              ; preds = %47
  %.not4047 = icmp sgt i32 %5, 6
  br i1 %.not4047, label %.lr.ph49.preheader, label %.critedge42

.lr.ph49.preheader:                               ; preds = %.critedge.preheader
  %48 = add i64 %4, 4294967290
  %wide.trip.count59 = and i64 %48, 4294967295
  br label %.lr.ph49

.lr.ph46:                                         ; preds = %.lr.ph46.preheader, %47
  %indvars.iv51 = phi i64 [ 0, %.lr.ph46.preheader ], [ %indvars.iv.next52, %47 ]
  store i64 0, ptr %2, align 8
  %49 = getelementptr inbounds i8, ptr %3, i64 %indvars.iv51
  %50 = call ptr @strncpy(ptr noundef nonnull dereferenceable(1) %2, ptr noundef nonnull dereferenceable(1) %49, i64 noundef 2) #7
  %51 = call ptr @strncat(ptr noundef nonnull dereferenceable(1) %2, ptr noundef nonnull dereferenceable(1) %49, i64 noundef 2) #7
  %52 = call ptr @strstr(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) %2) #8
  %.not = icmp eq ptr %52, null
  br i1 %.not, label %47, label %.critedge42

.lr.ph49:                                         ; preds = %.lr.ph49, %.lr.ph49.preheader
  %indvars.iv56 = phi i64 [ 0, %.lr.ph49.preheader ], [ %indvars.iv.next57, %.lr.ph49 ]
  store i64 0, ptr %2, align 8
  %53 = getelementptr inbounds i8, ptr %3, i64 %indvars.iv56
  %54 = call ptr @strncpy(ptr noundef nonnull dereferenceable(1) %2, ptr noundef nonnull dereferenceable(1) %53, i64 noundef 3) #7
  %55 = getelementptr inbounds i8, ptr %53, i64 3
  %56 = call ptr @strstr(ptr noundef nonnull dereferenceable(1) %55, ptr noundef nonnull dereferenceable(1) %2) #8
  %.not39 = icmp ne ptr %56, null
  %indvars.iv.next57 = add nuw nsw i64 %indvars.iv56, 1
  %exitcond60.not = icmp eq i64 %indvars.iv.next57, %wide.trip.count59
  %or.cond = select i1 %.not39, i1 true, i1 %exitcond60.not
  br i1 %or.cond, label %.critedge42, label %.lr.ph49, !llvm.loop !17

.critedge42:                                      ; preds = %.lr.ph46, %.lr.ph49, %.critedge.preheader, %.preheader, %1
  %.2 = phi i1 [ false, %1 ], [ false, %.preheader ], [ false, %.critedge.preheader ], [ %.not39, %.lr.ph49 ], [ true, %.lr.ph46 ]
  call void @free(ptr noundef %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  ret i1 %.2
}

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: readwrite)
declare ptr @strncpy(ptr noalias noundef returned writeonly, ptr noalias nocapture noundef readonly, i64 noundef) local_unnamed_addr #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { mustprogress nofree nounwind willreturn memory(argmem: read) "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 memory(argmem: readwrite) "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 = { mustprogress nofree nosync nounwind willreturn memory(none) "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 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 = { nounwind }
attributes #8 = { nounwind willreturn memory(read) }
attributes #9 = { nounwind willreturn memory(none) }

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


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