; LLVM IR from UtkarshPathrabe/Competitive-Coding :: SPOJ Solutions/400. To and Fro (main)

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

; Function Attrs: nounwind uwtable
define dso_local i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca [300 x i8], align 16
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  %11 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %2)
  br label %12

12:                                               ; preds = %116, %0
  %13 = load i32, ptr %2, align 4, !tbaa !5
  %14 = icmp ne i32 %13, 0
  br i1 %14, label %15, label %120

15:                                               ; preds = %12
  call void @llvm.lifetime.start.p0(i64 300, ptr %3) #5
  %16 = getelementptr inbounds [300 x i8], ptr %3, i64 0, i64 0
  %17 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %16)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  %18 = getelementptr inbounds [300 x i8], ptr %3, i64 0, i64 0
  %19 = call i64 @strlen(ptr noundef %18) #6
  %20 = load i32, ptr %2, align 4, !tbaa !5
  %21 = sext i32 %20 to i64
  %22 = udiv i64 %19, %21
  %23 = trunc i64 %22 to i32
  store i32 %23, ptr %4, align 4, !tbaa !5
  %24 = load i32, ptr %4, align 4, !tbaa !5
  %25 = zext i32 %24 to i64
  %26 = load i32, ptr %2, align 4, !tbaa !5
  %27 = zext i32 %26 to i64
  %28 = call ptr @llvm.stacksave.p0()
  store ptr %28, ptr %5, align 8
  %29 = mul nuw i64 %25, %27
  %30 = alloca i8, i64 %29, align 16
  store i64 %25, ptr %6, align 8
  store i64 %27, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 0, ptr %10, align 4, !tbaa !5
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %31

31:                                               ; preds = %85, %15
  %32 = load i32, ptr %8, align 4, !tbaa !5
  %33 = load i32, ptr %4, align 4, !tbaa !5
  %34 = icmp slt i32 %32, %33
  br i1 %34, label %35, label %88

35:                                               ; preds = %31
  %36 = load i32, ptr %8, align 4, !tbaa !5
  %37 = srem i32 %36, 2
  %38 = icmp ne i32 %37, 0
  br i1 %38, label %39, label %62

39:                                               ; preds = %35
  %40 = load i32, ptr %2, align 4, !tbaa !5
  %41 = sub nsw i32 %40, 1
  store i32 %41, ptr %9, align 4, !tbaa !5
  br label %42

42:                                               ; preds = %58, %39
  %43 = load i32, ptr %9, align 4, !tbaa !5
  %44 = icmp sge i32 %43, 0
  br i1 %44, label %45, label %61

45:                                               ; preds = %42
  %46 = load i32, ptr %10, align 4, !tbaa !5
  %47 = add nsw i32 %46, 1
  store i32 %47, ptr %10, align 4, !tbaa !5
  %48 = sext i32 %46 to i64
  %49 = getelementptr inbounds [300 x i8], ptr %3, i64 0, i64 %48
  %50 = load i8, ptr %49, align 1, !tbaa !9
  %51 = load i32, ptr %8, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = mul nsw i64 %52, %27
  %54 = getelementptr inbounds i8, ptr %30, i64 %53
  %55 = load i32, ptr %9, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds i8, ptr %54, i64 %56
  store i8 %50, ptr %57, align 1, !tbaa !9
  br label %58

58:                                               ; preds = %45
  %59 = load i32, ptr %9, align 4, !tbaa !5
  %60 = add nsw i32 %59, -1
  store i32 %60, ptr %9, align 4, !tbaa !5
  br label %42, !llvm.loop !10

61:                                               ; preds = %42
  br label %84

62:                                               ; preds = %35
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %63

63:                                               ; preds = %80, %62
  %64 = load i32, ptr %9, align 4, !tbaa !5
  %65 = load i32, ptr %2, align 4, !tbaa !5
  %66 = icmp slt i32 %64, %65
  br i1 %66, label %67, label %83

67:                                               ; preds = %63
  %68 = load i32, ptr %10, align 4, !tbaa !5
  %69 = add nsw i32 %68, 1
  store i32 %69, ptr %10, align 4, !tbaa !5
  %70 = sext i32 %68 to i64
  %71 = getelementptr inbounds [300 x i8], ptr %3, i64 0, i64 %70
  %72 = load i8, ptr %71, align 1, !tbaa !9
  %73 = load i32, ptr %8, align 4, !tbaa !5
  %74 = sext i32 %73 to i64
  %75 = mul nsw i64 %74, %27
  %76 = getelementptr inbounds i8, ptr %30, i64 %75
  %77 = load i32, ptr %9, align 4, !tbaa !5
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds i8, ptr %76, i64 %78
  store i8 %72, ptr %79, align 1, !tbaa !9
  br label %80

80:                                               ; preds = %67
  %81 = load i32, ptr %9, align 4, !tbaa !5
  %82 = add nsw i32 %81, 1
  store i32 %82, ptr %9, align 4, !tbaa !5
  br label %63, !llvm.loop !12

83:                                               ; preds = %63
  br label %84

84:                                               ; preds = %83, %61
  br label %85

85:                                               ; preds = %84
  %86 = load i32, ptr %8, align 4, !tbaa !5
  %87 = add nsw i32 %86, 1
  store i32 %87, ptr %8, align 4, !tbaa !5
  br label %31, !llvm.loop !13

88:                                               ; preds = %31
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %89

89:                                               ; preds = %113, %88
  %90 = load i32, ptr %8, align 4, !tbaa !5
  %91 = load i32, ptr %2, align 4, !tbaa !5
  %92 = icmp slt i32 %90, %91
  br i1 %92, label %93, label %116

93:                                               ; preds = %89
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %94

94:                                               ; preds = %109, %93
  %95 = load i32, ptr %9, align 4, !tbaa !5
  %96 = load i32, ptr %4, align 4, !tbaa !5
  %97 = icmp slt i32 %95, %96
  br i1 %97, label %98, label %112

98:                                               ; preds = %94
  %99 = load i32, ptr %9, align 4, !tbaa !5
  %100 = sext i32 %99 to i64
  %101 = mul nsw i64 %100, %27
  %102 = getelementptr inbounds i8, ptr %30, i64 %101
  %103 = load i32, ptr %8, align 4, !tbaa !5
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds i8, ptr %102, i64 %104
  %106 = load i8, ptr %105, align 1, !tbaa !9
  %107 = sext i8 %106 to i32
  %108 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %107)
  br label %109

109:                                              ; preds = %98
  %110 = load i32, ptr %9, align 4, !tbaa !5
  %111 = add nsw i32 %110, 1
  store i32 %111, ptr %9, align 4, !tbaa !5
  br label %94, !llvm.loop !14

112:                                              ; preds = %94
  br label %113

113:                                              ; preds = %112
  %114 = load i32, ptr %8, align 4, !tbaa !5
  %115 = add nsw i32 %114, 1
  store i32 %115, ptr %8, align 4, !tbaa !5
  br label %89, !llvm.loop !15

116:                                              ; preds = %89
  %117 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  %118 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %2)
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  %119 = load ptr, ptr %5, align 8
  call void @llvm.stackrestore.p0(ptr %119)
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 300, ptr %3) #5
  br label %12, !llvm.loop !16

120:                                              ; preds = %12
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  ret i32 0
}

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

declare i32 @__isoc99_scanf(ptr noundef, ...) #2

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

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #4

declare i32 @printf(ptr 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.stackrestore.p0(ptr) #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 = { "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 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 #4 = { nocallback nofree nosync nounwind willreturn }
attributes #5 = { nounwind }
attributes #6 = { nounwind willreturn memory(read) }

!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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}
!13 = distinct !{!13, !11}
!14 = distinct !{!14, !11}
!15 = distinct !{!15, !11}
!16 = distinct !{!16, !11}


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

; Function Attrs: nofree nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca [300 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  %3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1)
  %4 = load i32, ptr %1, align 4, !tbaa !5
  %.not60 = icmp eq i32 %4, 0
  br i1 %.not60, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %0, %._crit_edge58
  call void @llvm.lifetime.start.p0(i64 300, ptr nonnull %2) #6
  %5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %2)
  %6 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %2) #7
  %7 = load i32, ptr %1, align 4, !tbaa !5
  %8 = sext i32 %7 to i64
  %9 = udiv i64 %6, %8
  %10 = trunc i64 %9 to i32
  %11 = and i64 %9, 4294967295
  %12 = zext i32 %7 to i64
  %13 = call ptr @llvm.stacksave.p0()
  %14 = mul nuw i64 %11, %12
  %15 = alloca i8, i64 %14, align 16
  %16 = icmp sgt i32 %10, 0
  %.pre = load i32, ptr %1, align 4
  %.fr61 = freeze i32 %.pre
  %17 = icmp sgt i32 %.fr61, 0
  %or.cond = and i1 %16, %17
  br i1 %or.cond, label %.lr.ph41.split.us.preheader, label %._crit_edge58

.lr.ph41.split.us.preheader:                      ; preds = %.lr.ph
  %18 = zext nneg i32 %.fr61 to i64
  %19 = and i64 %9, 2147483647
  %min.iters.check = icmp ult i32 %.fr61, 32
  %n.vec = and i64 %18, 2147483616
  %ind.end = and i64 %18, 31
  %cmp.n = icmp eq i64 %n.vec, %18
  br label %.lr.ph41.split.us

.lr.ph41.split.us:                                ; preds = %.lr.ph41.split.us.preheader, %.loopexit.us
  %indvar81 = phi i64 [ 0, %.lr.ph41.split.us.preheader ], [ %indvar.next82, %.loopexit.us ]
  %.040.us = phi i32 [ 0, %.lr.ph41.split.us.preheader ], [ %.3.us, %.loopexit.us ]
  %20 = mul nuw nsw i64 %indvar81, %12
  %scevgep83 = getelementptr i8, ptr %15, i64 %20
  %21 = and i64 %indvar81, 1
  %.not28.us = icmp eq i64 %21, 0
  %22 = sext i32 %.040.us to i64
  br i1 %.not28.us, label %.lr.ph36.us, label %.lr.ph.us.preheader

.lr.ph.us.preheader:                              ; preds = %.lr.ph41.split.us
  br i1 %min.iters.check, label %.lr.ph.us.preheader112, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph.us.preheader
  %ind.end107 = add nsw i64 %n.vec, %22
  %invariant.gep = getelementptr i8, ptr %scevgep83, i64 %18
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %offset.idx109 = add i64 %index, %22
  %23 = xor i64 %index, -1
  %24 = getelementptr inbounds [300 x i8], ptr %2, i64 0, i64 %offset.idx109
  %25 = getelementptr inbounds i8, ptr %24, i64 16
  %wide.load = load <16 x i8>, ptr %24, align 1, !tbaa !9
  %wide.load110 = load <16 x i8>, ptr %25, align 1, !tbaa !9
  %gep = getelementptr i8, ptr %invariant.gep, i64 %23
  %26 = getelementptr inbounds i8, ptr %gep, i64 -15
  %27 = getelementptr inbounds i8, ptr %gep, i64 -31
  %reverse = shufflevector <16 x i8> %wide.load, <16 x i8> poison, <16 x i32> <i32 15, i32 14, i32 13, i32 12, i32 11, i32 10, i32 9, i32 8, i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 1, i32 0>
  store <16 x i8> %reverse, ptr %26, align 1, !tbaa !9
  %reverse111 = shufflevector <16 x i8> %wide.load110, <16 x i8> poison, <16 x i32> <i32 15, i32 14, i32 13, i32 12, i32 11, i32 10, i32 9, i32 8, i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 1, i32 0>
  store <16 x i8> %reverse111, ptr %27, align 1, !tbaa !9
  %index.next = add nuw i64 %index, 32
  %28 = icmp eq i64 %index.next, %n.vec
  br i1 %28, label %middle.block, label %vector.body, !llvm.loop !10

middle.block:                                     ; preds = %vector.body
  br i1 %cmp.n, label %.loopexit.us.loopexit62, label %.lr.ph.us.preheader112

.lr.ph.us.preheader112:                           ; preds = %middle.block, %.lr.ph.us.preheader
  %indvars.iv75.ph = phi i64 [ %18, %.lr.ph.us.preheader ], [ %ind.end, %middle.block ]
  %indvars.iv.ph = phi i64 [ %22, %.lr.ph.us.preheader ], [ %ind.end107, %middle.block ]
  br label %.lr.ph.us

.lr.ph.us:                                        ; preds = %.lr.ph.us.preheader112, %.lr.ph.us
  %indvars.iv75 = phi i64 [ %indvars.iv.next76, %.lr.ph.us ], [ %indvars.iv75.ph, %.lr.ph.us.preheader112 ]
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph.us ], [ %indvars.iv.ph, %.lr.ph.us.preheader112 ]
  %indvars.iv.next76 = add nsw i64 %indvars.iv75, -1
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %29 = getelementptr inbounds [300 x i8], ptr %2, i64 0, i64 %indvars.iv
  %30 = load i8, ptr %29, align 1, !tbaa !9
  %31 = getelementptr inbounds i8, ptr %scevgep83, i64 %indvars.iv.next76
  store i8 %30, ptr %31, align 1, !tbaa !9
  %32 = icmp sgt i64 %indvars.iv75, 1
  br i1 %32, label %.lr.ph.us, label %.loopexit.us.loopexit62, !llvm.loop !14

.loopexit.us.loopexit62:                          ; preds = %.lr.ph.us, %middle.block
  %indvars.iv.next.lcssa = phi i64 [ %ind.end107, %middle.block ], [ %indvars.iv.next, %.lr.ph.us ]
  %33 = trunc nsw i64 %indvars.iv.next.lcssa to i32
  br label %.loopexit.us

.loopexit.us:                                     ; preds = %.loopexit.us.loopexit62, %.lr.ph36.us
  %.3.us = phi i32 [ %35, %.lr.ph36.us ], [ %33, %.loopexit.us.loopexit62 ]
  %indvar.next82 = add nuw nsw i64 %indvar81, 1
  %34 = icmp ult i64 %indvar.next82, %19
  br i1 %34, label %.lr.ph41.split.us, label %.preheader31, !llvm.loop !15

.lr.ph36.us:                                      ; preds = %.lr.ph41.split.us
  %scevgep84 = getelementptr i8, ptr %2, i64 %22
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %scevgep83, ptr align 1 %scevgep84, i64 %18, i1 false), !tbaa !9
  %35 = add i32 %.fr61, %.040.us
  br label %.loopexit.us

.preheader31:                                     ; preds = %.loopexit.us
  br i1 %16, label %.preheader.us.preheader, label %._crit_edge58

.preheader.us.preheader:                          ; preds = %.preheader31
  %36 = and i64 %9, 2147483647
  br label %.preheader.us

.preheader.us:                                    ; preds = %.preheader.us.preheader, %._crit_edge.us
  %indvars.iv100 = phi i64 [ 0, %.preheader.us.preheader ], [ %indvars.iv.next101, %._crit_edge.us ]
  %invariant.gep.us = getelementptr inbounds i8, ptr %15, i64 %indvars.iv100
  br label %37

37:                                               ; preds = %.preheader.us, %37
  %indvars.iv96 = phi i64 [ 0, %.preheader.us ], [ %indvars.iv.next97, %37 ]
  %38 = mul nuw nsw i64 %indvars.iv96, %12
  %gep.us = getelementptr inbounds i8, ptr %invariant.gep.us, i64 %38
  %39 = load i8, ptr %gep.us, align 1, !tbaa !9
  %40 = sext i8 %39 to i32
  %41 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %40)
  %indvars.iv.next97 = add nuw nsw i64 %indvars.iv96, 1
  %42 = icmp ult i64 %indvars.iv.next97, %36
  br i1 %42, label %37, label %._crit_edge.us, !llvm.loop !16

._crit_edge.us:                                   ; preds = %37
  %indvars.iv.next101 = add nuw nsw i64 %indvars.iv100, 1
  %43 = load i32, ptr %1, align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  %45 = icmp slt i64 %indvars.iv.next101, %44
  br i1 %45, label %.preheader.us, label %._crit_edge58, !llvm.loop !17

._crit_edge58:                                    ; preds = %._crit_edge.us, %.preheader31, %.lr.ph
  %46 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3)
  %47 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1)
  call void @llvm.stackrestore.p0(ptr %13)
  call void @llvm.lifetime.end.p0(i64 300, ptr nonnull %2) #6
  %48 = load i32, ptr %1, align 4, !tbaa !5
  %.not = icmp eq i32 %48, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph, !llvm.loop !18

._crit_edge:                                      ; preds = %._crit_edge58, %0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  ret i32 0
}

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

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #4

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) 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.stackrestore.p0(ptr) #4

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

attributes #0 = { nofree 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 = { 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 #3 = { 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 #4 = { mustprogress nocallback nofree nosync nounwind willreturn }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { nounwind }
attributes #7 = { nounwind willreturn memory(read) }

!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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11, !12, !13}
!11 = !{!"llvm.loop.mustprogress"}
!12 = !{!"llvm.loop.isvectorized", i32 1}
!13 = !{!"llvm.loop.unroll.runtime.disable"}
!14 = distinct !{!14, !11, !13, !12}
!15 = distinct !{!15, !11}
!16 = distinct !{!16, !11}
!17 = distinct !{!17, !11}
!18 = distinct !{!18, !11}


; Effective O3 passes: ADCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopIdiomRecognizePass,LoopInstSimplifyPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,SCCPPass,SROAPass,SimplifyCFGPass