; LLVM IR from daanx/mimalloc-bench :: bench/cfrac (ptoa)

; 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.precisionType = type { i16, i16, i16, i8, [1 x i16] }

; Function Attrs: nounwind uwtable
define dso_local ptr @ptoa(ptr noundef %0) #0 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 0, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  %14 = load ptr, ptr %3, align 8, !tbaa !5
  %15 = call ptr @pparmq(ptr noundef %14)
  store ptr null, ptr %9, align 8, !tbaa !5
  store ptr null, ptr %10, align 8, !tbaa !5
  store ptr null, ptr %11, align 8, !tbaa !5
  %16 = load ptr, ptr %3, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.precisionType, ptr %16, i32 0, i32 2
  %18 = load i16, ptr %17, align 2, !tbaa !11
  %19 = zext i16 %18 to i32
  store i32 %19, ptr %8, align 4, !tbaa !9
  %20 = load i32, ptr %8, align 4, !tbaa !9
  %21 = icmp ugt i32 %20, 4090445
  br i1 %21, label %22, label %26

22:                                               ; preds = %1
  %23 = load i32, ptr %8, align 4, !tbaa !9
  %24 = udiv i32 %23, 109
  %25 = mul i32 %24, 525
  store i32 %25, ptr %8, align 4, !tbaa !9
  br label %30

26:                                               ; preds = %1
  %27 = load i32, ptr %8, align 4, !tbaa !9
  %28 = mul i32 %27, 525
  %29 = udiv i32 %28, 109
  store i32 %29, ptr %8, align 4, !tbaa !9
  br label %30

30:                                               ; preds = %26, %22
  %31 = load i32, ptr %8, align 4, !tbaa !9
  %32 = add i32 %31, 11
  store i32 %32, ptr %8, align 4, !tbaa !9
  %33 = load i32, ptr %8, align 4, !tbaa !9
  %34 = zext i32 %33 to i64
  %35 = call ptr @malloc(i64 noundef %34) #7
  store ptr %35, ptr %6, align 8, !tbaa !5
  %36 = load ptr, ptr %6, align 8, !tbaa !5
  %37 = icmp eq ptr %36, null
  br i1 %37, label %38, label %40

38:                                               ; preds = %30
  %39 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %39, ptr %2, align 8
  store i32 1, ptr %13, align 4
  br label %135

40:                                               ; preds = %30
  %41 = load ptr, ptr %3, align 8, !tbaa !5
  %42 = call ptr @pabs(ptr noundef %41)
  %43 = call ptr @psetq(ptr noundef %10, ptr noundef %42)
  %44 = call ptr @utop(i32 noundef 1000000000)
  %45 = call ptr @psetq(ptr noundef %11, ptr noundef %44)
  %46 = load ptr, ptr %6, align 8, !tbaa !5
  %47 = load i32, ptr %8, align 4, !tbaa !9
  %48 = zext i32 %47 to i64
  %49 = getelementptr inbounds i8, ptr %46, i64 %48
  store ptr %49, ptr %5, align 8, !tbaa !5
  %50 = load ptr, ptr %5, align 8, !tbaa !5
  %51 = getelementptr inbounds i8, ptr %50, i32 -1
  store ptr %51, ptr %5, align 8, !tbaa !5
  store i8 0, ptr %51, align 1, !tbaa !14
  %52 = load ptr, ptr %3, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.precisionType, ptr %52, i32 0, i32 3
  %54 = load i8, ptr %53, align 2, !tbaa !15
  %55 = zext i8 %54 to i32
  store i32 %55, ptr %7, align 4, !tbaa !9
  br label %56

56:                                               ; preds = %87, %40
  %57 = load ptr, ptr %10, align 8, !tbaa !5
  %58 = load ptr, ptr %11, align 8, !tbaa !5
  %59 = call ptr @pdivmod(ptr noundef %57, ptr noundef %58, ptr noundef %10, ptr noundef %9)
  %60 = load ptr, ptr %9, align 8, !tbaa !5
  %61 = call i32 @ptou(ptr noundef %60)
  store i32 %61, ptr %4, align 4, !tbaa !9
  store i32 9, ptr %12, align 4, !tbaa !9
  br label %62

62:                                               ; preds = %82, %56
  %63 = load i32, ptr %4, align 4, !tbaa !9
  %64 = urem i32 %63, 10
  %65 = icmp ult i32 %64, 10
  br i1 %65, label %66, label %70

66:                                               ; preds = %62
  %67 = load i32, ptr %4, align 4, !tbaa !9
  %68 = urem i32 %67, 10
  %69 = add i32 %68, 48
  br label %75

70:                                               ; preds = %62
  %71 = load i32, ptr %4, align 4, !tbaa !9
  %72 = urem i32 %71, 10
  %73 = add i32 %72, 97
  %74 = sub i32 %73, 10
  br label %75

75:                                               ; preds = %70, %66
  %76 = phi i32 [ %69, %66 ], [ %74, %70 ]
  %77 = trunc i32 %76 to i8
  %78 = load ptr, ptr %5, align 8, !tbaa !5
  %79 = getelementptr inbounds i8, ptr %78, i32 -1
  store ptr %79, ptr %5, align 8, !tbaa !5
  store i8 %77, ptr %79, align 1, !tbaa !14
  %80 = load i32, ptr %4, align 4, !tbaa !9
  %81 = udiv i32 %80, 10
  store i32 %81, ptr %4, align 4, !tbaa !9
  br label %82

82:                                               ; preds = %75
  %83 = load i32, ptr %12, align 4, !tbaa !9
  %84 = add nsw i32 %83, -1
  store i32 %84, ptr %12, align 4, !tbaa !9
  %85 = icmp sgt i32 %84, 0
  br i1 %85, label %62, label %86, !llvm.loop !16

86:                                               ; preds = %82
  br label %87

87:                                               ; preds = %86
  %88 = load ptr, ptr %10, align 8, !tbaa !5
  %89 = call i32 @pcmpz(ptr noundef %88)
  %90 = icmp ne i32 %89, 0
  br i1 %90, label %56, label %91, !llvm.loop !18

91:                                               ; preds = %87
  br label %92

92:                                               ; preds = %97, %91
  %93 = load ptr, ptr %5, align 8, !tbaa !5
  %94 = load i8, ptr %93, align 1, !tbaa !14
  %95 = sext i8 %94 to i32
  %96 = icmp eq i32 %95, 48
  br i1 %96, label %97, label %100

97:                                               ; preds = %92
  %98 = load ptr, ptr %5, align 8, !tbaa !5
  %99 = getelementptr inbounds i8, ptr %98, i32 1
  store ptr %99, ptr %5, align 8, !tbaa !5
  br label %92, !llvm.loop !19

100:                                              ; preds = %92
  %101 = load ptr, ptr %5, align 8, !tbaa !5
  %102 = load i8, ptr %101, align 1, !tbaa !14
  %103 = sext i8 %102 to i32
  %104 = icmp eq i32 %103, 0
  br i1 %104, label %105, label %108

105:                                              ; preds = %100
  %106 = load ptr, ptr %5, align 8, !tbaa !5
  %107 = getelementptr inbounds i8, ptr %106, i32 -1
  store ptr %107, ptr %5, align 8, !tbaa !5
  br label %108

108:                                              ; preds = %105, %100
  %109 = load i32, ptr %7, align 4, !tbaa !9
  %110 = icmp ne i32 %109, 0
  br i1 %110, label %111, label %114

111:                                              ; preds = %108
  %112 = load ptr, ptr %5, align 8, !tbaa !5
  %113 = getelementptr inbounds i8, ptr %112, i32 -1
  store ptr %113, ptr %5, align 8, !tbaa !5
  store i8 45, ptr %113, align 1, !tbaa !14
  br label %114

114:                                              ; preds = %111, %108
  %115 = load ptr, ptr %5, align 8, !tbaa !5
  %116 = load ptr, ptr %6, align 8, !tbaa !5
  %117 = icmp ugt ptr %115, %116
  br i1 %117, label %118, label %129

118:                                              ; preds = %114
  %119 = load ptr, ptr %6, align 8, !tbaa !5
  %120 = load ptr, ptr %5, align 8, !tbaa !5
  %121 = load i32, ptr %8, align 4, !tbaa !9
  %122 = zext i32 %121 to i64
  %123 = load ptr, ptr %5, align 8, !tbaa !5
  %124 = load ptr, ptr %6, align 8, !tbaa !5
  %125 = ptrtoint ptr %123 to i64
  %126 = ptrtoint ptr %124 to i64
  %127 = sub i64 %125, %126
  %128 = sub nsw i64 %122, %127
  call void @llvm.memmove.p0.p0.i64(ptr align 1 %119, ptr align 1 %120, i64 %128, i1 false)
  br label %129

129:                                              ; preds = %118, %114
  %130 = load ptr, ptr %11, align 8, !tbaa !5
  call void @pdestroy(ptr noundef %130)
  %131 = load ptr, ptr %10, align 8, !tbaa !5
  call void @pdestroy(ptr noundef %131)
  %132 = load ptr, ptr %9, align 8, !tbaa !5
  call void @pdestroy(ptr noundef %132)
  %133 = load ptr, ptr %3, align 8, !tbaa !5
  call void @pdestroy(ptr noundef %133)
  %134 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %134, ptr %2, align 8
  store i32 1, ptr %13, align 4
  br label %135

135:                                              ; preds = %129, %38
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  %136 = load ptr, ptr %2, align 8
  ret ptr %136
}

; 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 ptr @pparmq(ptr noundef) #2

; Function Attrs: allocsize(0)
declare ptr @malloc(i64 noundef) #3

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

declare ptr @pabs(ptr noundef) #4

declare ptr @utop(i32 noundef) #4

declare ptr @pdivmod(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #4

declare i32 @ptou(ptr noundef) #4

declare i32 @pcmpz(ptr noundef) #4

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memmove.p0.p0.i64(ptr nocapture writeonly, ptr nocapture readonly, i64, i1 immarg) #5

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @pdestroy(ptr noundef) #2

; 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 = { allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { nounwind }
attributes #7 = { allocsize(0) }

!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 = !{!12, !13, i64 4}
!12 = !{!"", !13, i64 0, !13, i64 2, !13, i64 4, !7, i64 6, !7, i64 8}
!13 = !{!"short", !7, i64 0}
!14 = !{!7, !7, i64 0}
!15 = !{!12, !7, i64 6}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}
!19 = distinct !{!19, !17}


; 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: nounwind uwtable
define dso_local noundef ptr @ptoa(ptr noundef %0) local_unnamed_addr #0 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  %5 = tail call ptr @pparmq(ptr noundef %0)
  store ptr null, ptr %2, align 8, !tbaa !5
  store ptr null, ptr %3, align 8, !tbaa !5
  store ptr null, ptr %4, align 8, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %0, i64 4
  %7 = load i16, ptr %6, align 2, !tbaa !9
  %8 = zext i16 %7 to i32
  %9 = mul nuw nsw i32 %8, 525
  %10 = udiv i32 %9, 109
  %11 = add nuw nsw i32 %10, 11
  %12 = zext nneg i32 %11 to i64
  %13 = tail call ptr @malloc(i64 noundef %12) #7
  %14 = icmp eq ptr %13, null
  br i1 %14, label %86, label %15

15:                                               ; preds = %1
  %16 = tail call ptr @pabs(ptr noundef nonnull %0) #6
  %17 = call ptr @psetq(ptr noundef nonnull %3, ptr noundef %16)
  %18 = call ptr @utop(i32 noundef 1000000000) #6
  %19 = call ptr @psetq(ptr noundef nonnull %4, ptr noundef %18)
  %20 = getelementptr inbounds i8, ptr %13, i64 %12
  %21 = getelementptr inbounds i8, ptr %20, i64 -1
  store i8 0, ptr %21, align 1, !tbaa !12
  %22 = getelementptr inbounds i8, ptr %0, i64 6
  %23 = load i8, ptr %22, align 2, !tbaa !13
  br label %24

24:                                               ; preds = %24, %15
  %25 = phi ptr [ %20, %15 ], [ %61, %24 ]
  %26 = load ptr, ptr %3, align 8, !tbaa !5
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  %28 = call ptr @pdivmod(ptr noundef %26, ptr noundef %27, ptr noundef nonnull %3, ptr noundef nonnull %2) #6
  %29 = load ptr, ptr %2, align 8, !tbaa !5
  %30 = call i32 @ptou(ptr noundef %29) #6
  %31 = udiv i32 %30, 10
  %32 = udiv i32 %30, 100
  %33 = udiv i32 %30, 1000
  %34 = getelementptr inbounds i8, ptr %25, i64 -5
  %35 = insertelement <4 x i32> poison, i32 %33, i64 0
  %36 = insertelement <4 x i32> %35, i32 %32, i64 1
  %37 = insertelement <4 x i32> %36, i32 %31, i64 2
  %38 = insertelement <4 x i32> %37, i32 %30, i64 3
  %39 = urem <4 x i32> %38, <i32 10, i32 10, i32 10, i32 10>
  %40 = trunc nuw nsw <4 x i32> %39 to <4 x i8>
  %41 = or disjoint <4 x i8> %40, <i8 48, i8 48, i8 48, i8 48>
  store <4 x i8> %41, ptr %34, align 1, !tbaa !12
  %42 = udiv i32 %30, 10000
  %43 = urem i32 %42, 10
  %44 = trunc nuw nsw i32 %43 to i8
  %45 = or disjoint i8 %44, 48
  %46 = getelementptr inbounds i8, ptr %25, i64 -6
  store i8 %45, ptr %46, align 1, !tbaa !12
  %47 = udiv i32 %30, 100000
  %.lhs.trunc = trunc nuw i32 %47 to i16
  %48 = urem i16 %.lhs.trunc, 10
  %49 = trunc nuw nsw i16 %48 to i8
  %50 = or disjoint i8 %49, 48
  %51 = getelementptr inbounds i8, ptr %25, i64 -7
  store i8 %50, ptr %51, align 1, !tbaa !12
  %52 = udiv i32 %30, 1000000
  %.lhs.trunc46 = trunc nuw nsw i32 %52 to i16
  %53 = urem i16 %.lhs.trunc46, 10
  %54 = trunc nuw nsw i16 %53 to i8
  %55 = or disjoint i8 %54, 48
  %56 = getelementptr inbounds i8, ptr %25, i64 -8
  store i8 %55, ptr %56, align 1, !tbaa !12
  %57 = udiv i32 %30, 10000000
  %.lhs.trunc48 = trunc nuw nsw i32 %57 to i16
  %58 = urem i16 %.lhs.trunc48, 10
  %59 = trunc nuw nsw i16 %58 to i8
  %60 = or disjoint i8 %59, 48
  %61 = getelementptr inbounds i8, ptr %25, i64 -9
  store i8 %60, ptr %61, align 1, !tbaa !12
  %62 = udiv i32 %30, 100000000
  %.lhs.trunc50 = trunc nuw nsw i32 %62 to i8
  %63 = urem i8 %.lhs.trunc50, 10
  %64 = or disjoint i8 %63, 48
  %65 = getelementptr inbounds i8, ptr %25, i64 -10
  store i8 %64, ptr %65, align 1, !tbaa !12
  %66 = load ptr, ptr %3, align 8, !tbaa !5
  %67 = call i32 @pcmpz(ptr noundef %66) #6
  %.not = icmp eq i32 %67, 0
  br i1 %.not, label %.preheader.preheader, label %24, !llvm.loop !14

.preheader.preheader:                             ; preds = %24
  %68 = getelementptr inbounds i8, ptr %25, i64 -10
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %70
  %.2 = phi ptr [ %71, %70 ], [ %68, %.preheader.preheader ]
  %69 = load i8, ptr %.2, align 1, !tbaa !12
  switch i8 %69, label %.loopexit [
    i8 48, label %70
    i8 0, label %72
  ]

70:                                               ; preds = %.preheader
  %71 = getelementptr inbounds i8, ptr %.2, i64 1
  br label %.preheader, !llvm.loop !16

72:                                               ; preds = %.preheader
  %73 = getelementptr inbounds i8, ptr %.2, i64 -1
  br label %.loopexit

.loopexit:                                        ; preds = %.preheader, %72
  %.3 = phi ptr [ %73, %72 ], [ %.2, %.preheader ]
  %.not42 = icmp eq i8 %23, 0
  br i1 %.not42, label %76, label %74

74:                                               ; preds = %.loopexit
  %75 = getelementptr inbounds i8, ptr %.3, i64 -1
  store i8 45, ptr %75, align 1, !tbaa !12
  br label %76

76:                                               ; preds = %74, %.loopexit
  %.4 = phi ptr [ %75, %74 ], [ %.3, %.loopexit ]
  %77 = icmp ugt ptr %.4, %13
  br i1 %77, label %78, label %82

78:                                               ; preds = %76
  %79 = ptrtoint ptr %.4 to i64
  %80 = ptrtoint ptr %13 to i64
  %.neg = add i64 %12, %80
  %81 = sub i64 %.neg, %79
  call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %13, ptr nonnull align 1 %.4, i64 %81, i1 false)
  br label %82

82:                                               ; preds = %78, %76
  %83 = load ptr, ptr %4, align 8, !tbaa !5
  call void @pdestroy(ptr noundef %83)
  %84 = load ptr, ptr %3, align 8, !tbaa !5
  call void @pdestroy(ptr noundef %84)
  %85 = load ptr, ptr %2, align 8, !tbaa !5
  call void @pdestroy(ptr noundef %85)
  call void @pdestroy(ptr noundef %0)
  br label %86

86:                                               ; preds = %1, %82
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  ret ptr %13
}

; 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 ptr @pparmq(ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #3

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

declare ptr @pabs(ptr noundef) local_unnamed_addr #4

declare ptr @utop(i32 noundef) local_unnamed_addr #4

declare ptr @pdivmod(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

declare i32 @ptou(ptr noundef) local_unnamed_addr #4

declare i32 @pcmpz(ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memmove.p0.p0.i64(ptr nocapture writeonly, ptr nocapture readonly, i64, i1 immarg) #5

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

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 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) 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 #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 nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { nounwind }
attributes #7 = { allocsize(0) }

!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, !11, i64 4}
!10 = !{!"", !11, i64 0, !11, i64 2, !11, i64 4, !7, i64 6, !7, i64 8}
!11 = !{!"short", !7, i64 0}
!12 = !{!7, !7, i64 0}
!13 = !{!10, !7, i64 6}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}


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