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

; 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: nounwind uwtable
define dso_local i32 @ptob(ptr noundef %0, ptr noundef %1, i32 noundef %2, ptr noundef %3, i32 noundef %4) #0 {
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store i32 %2, ptr %9, align 4, !tbaa !9
  store ptr %3, ptr %10, align 8, !tbaa !5
  store i32 %4, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  store i32 0, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  store ptr null, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  store ptr null, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  store ptr null, ptr %19, align 8, !tbaa !5
  %21 = load i32, ptr %11, align 4, !tbaa !9
  %22 = icmp ugt i32 %21, 256
  br i1 %22, label %26, label %23

23:                                               ; preds = %5
  %24 = load i32, ptr %11, align 4, !tbaa !9
  %25 = icmp ult i32 %24, 2
  br i1 %25, label %26, label %27

26:                                               ; preds = %23, %5
  store i32 -1, ptr %6, align 4
  store i32 1, ptr %20, align 4
  br label %123

27:                                               ; preds = %23
  %28 = load i32, ptr %9, align 4, !tbaa !9
  %29 = icmp eq i32 %28, 0
  br i1 %29, label %30, label %31

30:                                               ; preds = %27
  store i32 1, ptr %6, align 4
  store i32 1, ptr %20, align 4
  br label %123

31:                                               ; preds = %27
  %32 = load ptr, ptr %7, align 8, !tbaa !5
  %33 = call ptr @pparmq(ptr noundef %32)
  %34 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %34, ptr %12, align 4, !tbaa !9
  store i32 1, ptr %13, align 4, !tbaa !9
  br label %35

35:                                               ; preds = %41, %31
  %36 = load i32, ptr %12, align 4, !tbaa !9
  %37 = load i32, ptr %11, align 4, !tbaa !9
  %38 = mul i32 %36, %37
  %39 = load i32, ptr %12, align 4, !tbaa !9
  %40 = icmp ugt i32 %38, %39
  br i1 %40, label %41, label %47

41:                                               ; preds = %35
  %42 = load i32, ptr %11, align 4, !tbaa !9
  %43 = load i32, ptr %12, align 4, !tbaa !9
  %44 = mul i32 %43, %42
  store i32 %44, ptr %12, align 4, !tbaa !9
  %45 = load i32, ptr %13, align 4, !tbaa !9
  %46 = add i32 %45, 1
  store i32 %46, ptr %13, align 4, !tbaa !9
  br label %35, !llvm.loop !11

47:                                               ; preds = %35
  %48 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %48, ptr %15, align 4, !tbaa !9
  %49 = load ptr, ptr %7, align 8, !tbaa !5
  %50 = call ptr @pabs(ptr noundef %49)
  %51 = call ptr @psetq(ptr noundef %18, ptr noundef %50)
  %52 = load i32, ptr %12, align 4, !tbaa !9
  %53 = call ptr @utop(i32 noundef %52)
  %54 = call ptr @psetq(ptr noundef %19, ptr noundef %53)
  %55 = load ptr, ptr %8, align 8, !tbaa !5
  %56 = load i32, ptr %9, align 4, !tbaa !9
  %57 = zext i32 %56 to i64
  %58 = getelementptr inbounds i8, ptr %55, i64 %57
  store ptr %58, ptr %14, align 8, !tbaa !5
  br label %59

59:                                               ; preds = %89, %47
  %60 = load ptr, ptr %18, align 8, !tbaa !5
  %61 = load ptr, ptr %19, align 8, !tbaa !5
  %62 = call ptr @pdivmod(ptr noundef %60, ptr noundef %61, ptr noundef %18, ptr noundef %17)
  %63 = load ptr, ptr %17, align 8, !tbaa !5
  %64 = call i32 @ptou(ptr noundef %63)
  store i32 %64, ptr %12, align 4, !tbaa !9
  %65 = load i32, ptr %15, align 4, !tbaa !9
  store i32 %65, ptr %13, align 4, !tbaa !9
  br label %66

66:                                               ; preds = %84, %59
  %67 = load ptr, ptr %10, align 8, !tbaa !5
  %68 = load i32, ptr %12, align 4, !tbaa !9
  %69 = load i32, ptr %11, align 4, !tbaa !9
  %70 = urem i32 %68, %69
  %71 = zext i32 %70 to i64
  %72 = getelementptr inbounds i8, ptr %67, i64 %71
  %73 = load i8, ptr %72, align 1, !tbaa !13
  %74 = load ptr, ptr %14, align 8, !tbaa !5
  %75 = getelementptr inbounds i8, ptr %74, i32 -1
  store ptr %75, ptr %14, align 8, !tbaa !5
  store i8 %73, ptr %75, align 1, !tbaa !13
  %76 = load i32, ptr %12, align 4, !tbaa !9
  %77 = load i32, ptr %11, align 4, !tbaa !9
  %78 = udiv i32 %76, %77
  store i32 %78, ptr %12, align 4, !tbaa !9
  %79 = load ptr, ptr %14, align 8, !tbaa !5
  %80 = load ptr, ptr %8, align 8, !tbaa !5
  %81 = icmp eq ptr %79, %80
  br i1 %81, label %82, label %83

82:                                               ; preds = %66
  br label %109

83:                                               ; preds = %66
  br label %84

84:                                               ; preds = %83
  %85 = load i32, ptr %13, align 4, !tbaa !9
  %86 = add i32 %85, -1
  store i32 %86, ptr %13, align 4, !tbaa !9
  %87 = icmp ugt i32 %86, 0
  br i1 %87, label %66, label %88, !llvm.loop !14

88:                                               ; preds = %84
  br label %89

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

93:                                               ; preds = %89
  %94 = load ptr, ptr %14, align 8, !tbaa !5
  %95 = load ptr, ptr %8, align 8, !tbaa !5
  %96 = icmp ugt ptr %94, %95
  br i1 %96, label %97, label %108

97:                                               ; preds = %93
  br label %98

98:                                               ; preds = %103, %97
  %99 = load ptr, ptr %10, align 8, !tbaa !5
  %100 = load i8, ptr %99, align 1, !tbaa !13
  %101 = load ptr, ptr %14, align 8, !tbaa !5
  %102 = getelementptr inbounds i8, ptr %101, i32 -1
  store ptr %102, ptr %14, align 8, !tbaa !5
  store i8 %100, ptr %102, align 1, !tbaa !13
  br label %103

103:                                              ; preds = %98
  %104 = load ptr, ptr %14, align 8, !tbaa !5
  %105 = load ptr, ptr %8, align 8, !tbaa !5
  %106 = icmp ugt ptr %104, %105
  br i1 %106, label %98, label %107, !llvm.loop !16

107:                                              ; preds = %103
  br label %108

108:                                              ; preds = %107, %93
  br label %109

109:                                              ; preds = %108, %82
  %110 = load ptr, ptr %18, align 8, !tbaa !5
  %111 = call i32 @pcmpz(ptr noundef %110)
  %112 = icmp ne i32 %111, 0
  br i1 %112, label %116, label %113

113:                                              ; preds = %109
  %114 = load i32, ptr %12, align 4, !tbaa !9
  %115 = icmp ne i32 %114, 0
  br i1 %115, label %116, label %117

116:                                              ; preds = %113, %109
  store i32 1, ptr %16, align 4, !tbaa !9
  br label %117

117:                                              ; preds = %116, %113
  %118 = load ptr, ptr %19, align 8, !tbaa !5
  call void @pdestroy(ptr noundef %118)
  %119 = load ptr, ptr %18, align 8, !tbaa !5
  call void @pdestroy(ptr noundef %119)
  %120 = load ptr, ptr %17, align 8, !tbaa !5
  call void @pdestroy(ptr noundef %120)
  %121 = load ptr, ptr %7, align 8, !tbaa !5
  call void @pdestroy(ptr noundef %121)
  %122 = load i32, ptr %16, align 4, !tbaa !9
  store i32 %122, ptr %6, align 4
  store i32 1, ptr %20, align 4
  br label %123

123:                                              ; preds = %117, %30, %26
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  %124 = load i32, ptr %6, align 4
  ret i32 %124
}

; 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: inlinehint nounwind uwtable
declare hidden ptr @psetq(ptr noundef, ptr noundef) #2

declare ptr @pabs(ptr noundef) #3

declare ptr @utop(i32 noundef) #3

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

declare i32 @ptou(ptr noundef) #3

declare i32 @pcmpz(ptr noundef) #3

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

; Function Attrs: nounwind uwtable
define dso_local range(i32 -1, 2) i32 @ptob(ptr noundef %0, ptr noundef writeonly %1, i32 noundef %2, ptr nocapture noundef readonly %3, i32 noundef %4) local_unnamed_addr #0 {
  %6 = ptrtoint ptr %1 to i64
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  store ptr null, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  store ptr null, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #5
  store ptr null, ptr %9, align 8, !tbaa !5
  %10 = add i32 %4, -257
  %or.cond = icmp ult i32 %10, -255
  br i1 %or.cond, label %70, label %11

11:                                               ; preds = %5
  %12 = icmp eq i32 %2, 0
  br i1 %12, label %70, label %13

13:                                               ; preds = %11
  %14 = tail call ptr @pparmq(ptr noundef %0)
  br label %15

15:                                               ; preds = %15, %13
  %indvar = phi i32 [ %indvar.next, %15 ], [ 0, %13 ]
  %.042 = phi i32 [ %16, %15 ], [ %4, %13 ]
  %.040 = phi i32 [ %18, %15 ], [ 1, %13 ]
  %16 = mul i32 %.042, %4
  %17 = icmp ugt i32 %16, %.042
  %18 = add i32 %.040, 1
  %indvar.next = add i32 %indvar, 1
  br i1 %17, label %15, label %19, !llvm.loop !9

19:                                               ; preds = %15
  %20 = tail call ptr @pabs(ptr noundef %0) #5
  %21 = call ptr @psetq(ptr noundef nonnull %8, ptr noundef %20)
  %22 = call ptr @utop(i32 noundef %.042) #5
  %23 = call ptr @psetq(ptr noundef nonnull %9, ptr noundef %22)
  %24 = zext i32 %2 to i64
  %25 = getelementptr inbounds i8, ptr %1, i64 %24
  br label %26

26:                                               ; preds = %42, %19
  %.039 = phi ptr [ %25, %19 ], [ %38, %42 ]
  %27 = load ptr, ptr %8, align 8, !tbaa !5
  %28 = load ptr, ptr %9, align 8, !tbaa !5
  %29 = call ptr @pdivmod(ptr noundef %27, ptr noundef %28, ptr noundef nonnull %8, ptr noundef nonnull %7) #5
  %30 = load ptr, ptr %7, align 8, !tbaa !5
  %31 = call i32 @ptou(ptr noundef %30) #5
  br label %32

32:                                               ; preds = %40, %26
  %.143 = phi i32 [ %31, %26 ], [ %34, %40 ]
  %.141 = phi i32 [ %.040, %26 ], [ %41, %40 ]
  %.1 = phi ptr [ %.039, %26 ], [ %38, %40 ]
  %33 = urem i32 %.143, %4
  %34 = udiv i32 %.143, %4
  %35 = zext nneg i32 %33 to i64
  %36 = getelementptr inbounds i8, ptr %3, i64 %35
  %37 = load i8, ptr %36, align 1, !tbaa !11
  %38 = getelementptr inbounds i8, ptr %.1, i64 -1
  store i8 %37, ptr %38, align 1, !tbaa !11
  %39 = icmp eq ptr %38, %1
  br i1 %39, label %.loopexit, label %40

40:                                               ; preds = %32
  %41 = add i32 %.141, -1
  %.not = icmp eq i32 %41, 0
  br i1 %.not, label %42, label %32, !llvm.loop !12

42:                                               ; preds = %40
  %43 = load ptr, ptr %8, align 8, !tbaa !5
  %44 = call i32 @pcmpz(ptr noundef %43) #5
  %.not50 = icmp eq i32 %44, 0
  br i1 %.not50, label %45, label %26, !llvm.loop !13

45:                                               ; preds = %42
  %46 = icmp ugt ptr %38, %1
  br i1 %46, label %iter.check, label %.loopexit

iter.check:                                       ; preds = %45
  %.039.lcssa6768 = ptrtoint ptr %.039 to i64
  %.pre = load i8, ptr %3, align 1, !tbaa !11
  %47 = add i64 %.039.lcssa6768, -2
  %48 = xor i64 %6, -1
  %49 = add i64 %48, %.039.lcssa6768
  %50 = zext i32 %indvar to i64
  %umin = call i64 @llvm.umin.i64(i64 %49, i64 %50)
  %51 = sub i64 %47, %umin
  %umin69 = call i64 @llvm.umin.i64(i64 %6, i64 %51)
  %52 = xor i64 %umin69, -1
  %53 = add i64 %52, %.039.lcssa6768
  %54 = sub i64 %53, %umin
  %min.iters.check = icmp ult i64 %54, 4
  br i1 %min.iters.check, label %.preheader.preheader, label %vector.main.loop.iter.check

vector.main.loop.iter.check:                      ; preds = %iter.check
  %min.iters.check70 = icmp ult i64 %54, 32
  br i1 %min.iters.check70, label %vec.epilog.ph, label %vector.ph

vector.ph:                                        ; preds = %vector.main.loop.iter.check
  %n.vec = and i64 %54, -32
  %broadcast.splatinsert = insertelement <16 x i8> poison, i8 %.pre, i64 0
  %broadcast.splat = shufflevector <16 x i8> %broadcast.splatinsert, <16 x i8> poison, <16 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %offset.idx = sub i64 0, %index
  %next.gep = getelementptr i8, ptr %38, i64 %offset.idx
  %55 = getelementptr inbounds i8, ptr %next.gep, i64 -16
  %56 = getelementptr inbounds i8, ptr %next.gep, i64 -32
  store <16 x i8> %broadcast.splat, ptr %55, align 1, !tbaa !11
  store <16 x i8> %broadcast.splat, ptr %56, align 1, !tbaa !11
  %index.next = add nuw i64 %index, 32
  %57 = icmp eq i64 %index.next, %n.vec
  br i1 %57, label %middle.block, label %vector.body, !llvm.loop !14

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %54, %n.vec
  br i1 %cmp.n, label %.loopexit, label %vec.epilog.iter.check

vec.epilog.iter.check:                            ; preds = %middle.block
  %58 = sub i64 0, %n.vec
  %ind.end75 = getelementptr i8, ptr %38, i64 %58
  %n.vec.remaining = and i64 %54, 28
  %min.epilog.iters.check = icmp eq i64 %n.vec.remaining, 0
  br i1 %min.epilog.iters.check, label %.preheader.preheader, label %vec.epilog.ph

vec.epilog.ph:                                    ; preds = %vector.main.loop.iter.check, %vec.epilog.iter.check
  %vec.epilog.resume.val = phi i64 [ %n.vec, %vec.epilog.iter.check ], [ 0, %vector.main.loop.iter.check ]
  %n.vec74 = and i64 %54, -4
  %59 = sub i64 0, %n.vec74
  %ind.end = getelementptr i8, ptr %38, i64 %59
  %broadcast.splatinsert79 = insertelement <4 x i8> poison, i8 %.pre, i64 0
  %broadcast.splat80 = shufflevector <4 x i8> %broadcast.splatinsert79, <4 x i8> poison, <4 x i32> zeroinitializer
  %invariant.gep = getelementptr i8, ptr %38, i64 -4
  br label %vec.epilog.vector.body

vec.epilog.vector.body:                           ; preds = %vec.epilog.vector.body, %vec.epilog.ph
  %index76 = phi i64 [ %vec.epilog.resume.val, %vec.epilog.ph ], [ %index.next82, %vec.epilog.vector.body ]
  %offset.idx77 = sub i64 0, %index76
  %gep = getelementptr i8, ptr %invariant.gep, i64 %offset.idx77
  store <4 x i8> %broadcast.splat80, ptr %gep, align 1, !tbaa !11
  %index.next82 = add nuw i64 %index76, 4
  %60 = icmp eq i64 %index.next82, %n.vec74
  br i1 %60, label %vec.epilog.middle.block, label %vec.epilog.vector.body, !llvm.loop !17

vec.epilog.middle.block:                          ; preds = %vec.epilog.vector.body
  %cmp.n83 = icmp eq i64 %54, %n.vec74
  br i1 %cmp.n83, label %.loopexit, label %.preheader.preheader

.preheader.preheader:                             ; preds = %vec.epilog.middle.block, %iter.check, %vec.epilog.iter.check
  %.2.ph = phi ptr [ %38, %iter.check ], [ %ind.end75, %vec.epilog.iter.check ], [ %ind.end, %vec.epilog.middle.block ]
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %.preheader
  %.2 = phi ptr [ %61, %.preheader ], [ %.2.ph, %.preheader.preheader ]
  %61 = getelementptr inbounds i8, ptr %.2, i64 -1
  store i8 %.pre, ptr %61, align 1, !tbaa !11
  %62 = icmp ugt ptr %61, %1
  br i1 %62, label %.preheader, label %.loopexit, !llvm.loop !18

.loopexit:                                        ; preds = %32, %.preheader, %middle.block, %vec.epilog.middle.block, %45
  %63 = load ptr, ptr %8, align 8, !tbaa !5
  %64 = call i32 @pcmpz(ptr noundef %63) #5
  %65 = icmp ne i32 %64, 0
  %66 = icmp uge i32 %.143, %4
  %or.cond3 = or i1 %66, %65
  %spec.select = zext i1 %or.cond3 to i32
  %67 = load ptr, ptr %9, align 8, !tbaa !5
  call void @pdestroy(ptr noundef %67)
  %68 = load ptr, ptr %8, align 8, !tbaa !5
  call void @pdestroy(ptr noundef %68)
  %69 = load ptr, ptr %7, align 8, !tbaa !5
  call void @pdestroy(ptr noundef %69)
  call void @pdestroy(ptr noundef %0)
  br label %70

70:                                               ; preds = %11, %5, %.loopexit
  %.038 = phi i32 [ %spec.select, %.loopexit ], [ -1, %5 ], [ 1, %11 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  ret i32 %.038
}

; 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: inlinehint nounwind uwtable
declare hidden ptr @psetq(ptr noundef, ptr noundef) local_unnamed_addr #2

declare ptr @pabs(ptr noundef) local_unnamed_addr #3

declare ptr @utop(i32 noundef) local_unnamed_addr #3

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

declare i32 @ptou(ptr noundef) local_unnamed_addr #3

declare i32 @pcmpz(ptr noundef) local_unnamed_addr #3

; 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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.umin.i64(i64, i64) #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 = { 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 = { "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 nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10, !15, !16}
!15 = !{!"llvm.loop.isvectorized", i32 1}
!16 = !{!"llvm.loop.unroll.runtime.disable"}
!17 = distinct !{!17, !10, !15, !16}
!18 = distinct !{!18, !10, !16, !15}


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