; LLVM IR from Water-Melon/Melon :: src (mln_rsa)

; 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.mln_string_t = type { ptr, i64, i32 }
%struct.mln_bignum_t = type { i32, i32, [257 x i64] }
%struct.mln_rsa_key_t = type { %struct.mln_bignum_t, %struct.mln_bignum_t, %struct.mln_bignum_t, %struct.mln_bignum_t, %struct.mln_bignum_t, %struct.mln_bignum_t, %struct.mln_bignum_t, i8 }

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

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

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

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

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

declare i32 @mln_bignum_os2ip(ptr noundef, ptr noundef, i64 noundef) #4

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @mln_rsa_rsaep_rsadp(ptr noundef, ptr noundef, ptr noundef) #5

declare i32 @mln_bignum_i2osp(ptr noundef, ptr noundef, i64 noundef) #4

declare ptr @mln_string_dup(ptr noundef) #4

; Function Attrs: nounwind uwtable
define dso_local ptr @mln_RSAESPKCS1V15_private_encrypt(ptr noundef nonnull %0, ptr noundef nonnull %1) #6 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca %struct.mln_string_t, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i32, align 4
  %16 = alloca %struct.mln_bignum_t, align 8
  %17 = alloca ptr, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  %18 = load ptr, ptr %4, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.mln_rsa_key_t, ptr %18, i32 0, i32 0
  %20 = getelementptr inbounds %struct.mln_bignum_t, ptr %19, i32 0, i32 1
  %21 = load i32, ptr %20, align 4, !tbaa !9
  %22 = shl i32 %21, 2
  %23 = zext i32 %22 to i64
  store i64 %23, ptr %6, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %24 = load ptr, ptr %5, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.mln_string_t, ptr %24, i32 0, i32 0
  %26 = load ptr, ptr %25, align 8, !tbaa !15
  store ptr %26, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  store ptr null, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  store i64 0, ptr %12, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %27 = load ptr, ptr %5, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.mln_string_t, ptr %27, i32 0, i32 1
  %29 = load i64, ptr %28, align 8, !tbaa !17
  store i64 %29, ptr %13, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %30 = load i64, ptr %6, align 8, !tbaa !13
  %31 = sub i64 %30, 11
  %32 = load ptr, ptr %5, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.mln_string_t, ptr %32, i32 0, i32 1
  %34 = load i64, ptr %33, align 8, !tbaa !17
  %35 = icmp ult i64 %31, %34
  br i1 %35, label %36, label %37

36:                                               ; preds = %2
  store ptr null, ptr %3, align 8
  store i32 1, ptr %15, align 4
  br label %132

37:                                               ; preds = %2
  %38 = load i64, ptr %13, align 8, !tbaa !13
  %39 = load i64, ptr %6, align 8, !tbaa !13
  %40 = sub i64 %39, 11
  %41 = udiv i64 %38, %40
  %42 = load i64, ptr %6, align 8, !tbaa !13
  %43 = mul i64 %41, %42
  %44 = load i64, ptr %13, align 8, !tbaa !13
  %45 = load i64, ptr %6, align 8, !tbaa !13
  %46 = sub i64 %45, 11
  %47 = urem i64 %44, %46
  %48 = add i64 %43, %47
  %49 = icmp ne i64 %48, 0
  br i1 %49, label %50, label %52

50:                                               ; preds = %37
  %51 = load i64, ptr %6, align 8, !tbaa !13
  br label %53

52:                                               ; preds = %37
  br label %53

53:                                               ; preds = %52, %50
  %54 = phi i64 [ %51, %50 ], [ 0, %52 ]
  store i64 %54, ptr %14, align 8, !tbaa !13
  %55 = load i64, ptr %14, align 8, !tbaa !13
  %56 = call noalias ptr @malloc(i64 noundef %55) #8
  store ptr %56, ptr %7, align 8, !tbaa !5
  store ptr %56, ptr %8, align 8, !tbaa !5
  %57 = icmp eq ptr %56, null
  br i1 %57, label %58, label %59

58:                                               ; preds = %53
  store ptr null, ptr %3, align 8
  store i32 1, ptr %15, align 4
  br label %132

59:                                               ; preds = %53
  br label %60

60:                                               ; preds = %110, %59
  %61 = load i64, ptr %13, align 8, !tbaa !13
  %62 = icmp ugt i64 %61, 0
  br i1 %62, label %63, label %111

63:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 2064, ptr %16) #7
  call void @llvm.memset.p0.i64(ptr align 8 %16, i8 0, i64 2064, i1 false)
  %64 = load i64, ptr %13, align 8, !tbaa !13
  %65 = load i64, ptr %6, align 8, !tbaa !13
  %66 = sub i64 %65, 11
  %67 = icmp ugt i64 %64, %66
  br i1 %67, label %68, label %71

68:                                               ; preds = %63
  %69 = load i64, ptr %6, align 8, !tbaa !13
  %70 = sub i64 %69, 11
  br label %73

71:                                               ; preds = %63
  %72 = load i64, ptr %13, align 8, !tbaa !13
  br label %73

73:                                               ; preds = %71, %68
  %74 = phi i64 [ %70, %68 ], [ %72, %71 ]
  store i64 %74, ptr %12, align 8, !tbaa !13
  %75 = load ptr, ptr %9, align 8, !tbaa !5
  %76 = load i64, ptr %12, align 8, !tbaa !13
  %77 = load ptr, ptr %8, align 8, !tbaa !5
  %78 = load i64, ptr %6, align 8, !tbaa !13
  call void @mln_rsa_pri_padding(ptr noundef %75, i64 noundef %76, ptr noundef %77, i64 noundef %78)
  %79 = load ptr, ptr %8, align 8, !tbaa !5
  %80 = load i64, ptr %6, align 8, !tbaa !13
  %81 = call i32 @mln_bignum_os2ip(ptr noundef %16, ptr noundef %79, i64 noundef %80)
  %82 = icmp slt i32 %81, 0
  br i1 %82, label %83, label %85

83:                                               ; preds = %73
  %84 = load ptr, ptr %7, align 8, !tbaa !5
  call void @free(ptr noundef %84) #7
  store ptr null, ptr %3, align 8
  store i32 1, ptr %15, align 4
  br label %108

85:                                               ; preds = %73
  %86 = load ptr, ptr %4, align 8, !tbaa !5
  %87 = call i32 @mln_rsa_rsaep_rsadp(ptr noundef %86, ptr noundef %16, ptr noundef %16)
  %88 = icmp slt i32 %87, 0
  br i1 %88, label %89, label %91

89:                                               ; preds = %85
  %90 = load ptr, ptr %7, align 8, !tbaa !5
  call void @free(ptr noundef %90) #7
  store ptr null, ptr %3, align 8
  store i32 1, ptr %15, align 4
  br label %108

91:                                               ; preds = %85
  %92 = load ptr, ptr %8, align 8, !tbaa !5
  %93 = load i64, ptr %6, align 8, !tbaa !13
  %94 = call i32 @mln_bignum_i2osp(ptr noundef %16, ptr noundef %92, i64 noundef %93)
  %95 = icmp slt i32 %94, 0
  br i1 %95, label %96, label %98

96:                                               ; preds = %91
  %97 = load ptr, ptr %7, align 8, !tbaa !5
  call void @free(ptr noundef %97) #7
  store ptr null, ptr %3, align 8
  store i32 1, ptr %15, align 4
  br label %108

98:                                               ; preds = %91
  %99 = load i64, ptr %6, align 8, !tbaa !13
  %100 = load ptr, ptr %8, align 8, !tbaa !5
  %101 = getelementptr inbounds i8, ptr %100, i64 %99
  store ptr %101, ptr %8, align 8, !tbaa !5
  %102 = load i64, ptr %12, align 8, !tbaa !13
  %103 = load i64, ptr %13, align 8, !tbaa !13
  %104 = sub i64 %103, %102
  store i64 %104, ptr %13, align 8, !tbaa !13
  %105 = load i64, ptr %12, align 8, !tbaa !13
  %106 = load ptr, ptr %9, align 8, !tbaa !5
  %107 = getelementptr inbounds i8, ptr %106, i64 %105
  store ptr %107, ptr %9, align 8, !tbaa !5
  store i32 0, ptr %15, align 4
  br label %108

108:                                              ; preds = %98, %96, %89, %83
  call void @llvm.lifetime.end.p0(i64 2064, ptr %16) #7
  %109 = load i32, ptr %15, align 4
  switch i32 %109, label %132 [
    i32 0, label %110
  ]

110:                                              ; preds = %108
  br label %60, !llvm.loop !18

111:                                              ; preds = %60
  %112 = load ptr, ptr %7, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.mln_string_t, ptr %11, i32 0, i32 0
  store ptr %112, ptr %113, align 8, !tbaa !15
  %114 = load i64, ptr %14, align 8, !tbaa !13
  %115 = getelementptr inbounds %struct.mln_string_t, ptr %11, i32 0, i32 1
  store i64 %114, ptr %115, align 8, !tbaa !17
  %116 = getelementptr inbounds %struct.mln_string_t, ptr %11, i32 0, i32 2
  %117 = load i32, ptr %116, align 8
  %118 = and i32 %117, -2
  %119 = or i32 %118, 1
  store i32 %119, ptr %116, align 8
  %120 = getelementptr inbounds %struct.mln_string_t, ptr %11, i32 0, i32 2
  %121 = load i32, ptr %120, align 8
  %122 = and i32 %121, -3
  %123 = or i32 %122, 0
  store i32 %123, ptr %120, align 8
  %124 = getelementptr inbounds %struct.mln_string_t, ptr %11, i32 0, i32 2
  %125 = load i32, ptr %124, align 8
  %126 = and i32 %125, 3
  %127 = or i32 %126, 4
  store i32 %127, ptr %124, align 8
  store ptr %11, ptr %17, align 8, !tbaa !5
  %128 = load ptr, ptr %17, align 8, !tbaa !5
  %129 = call ptr @mln_string_dup(ptr noundef %11)
  store ptr %129, ptr %10, align 8, !tbaa !5
  %130 = load ptr, ptr %7, align 8, !tbaa !5
  call void @free(ptr noundef %130) #7
  %131 = load ptr, ptr %10, align 8, !tbaa !5
  store ptr %131, ptr %3, align 8
  store i32 1, ptr %15, align 4
  br label %132

132:                                              ; preds = %111, %108, %58, %36
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  %133 = load ptr, ptr %3, align 8
  ret ptr %133
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @mln_rsa_pri_padding(ptr noundef, i64 noundef, ptr noundef, i64 noundef) #5

attributes #0 = { nounwind 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 #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = { 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 #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 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, !12, i64 4}
!10 = !{!"", !11, i64 0, !11, i64 2064, !11, i64 4128, !11, i64 6192, !11, i64 8256, !11, i64 10320, !11, i64 12384, !12, i64 14448}
!11 = !{!"", !12, i64 0, !12, i64 4, !7, i64 8}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{!16, !6, i64 0}
!16 = !{!"", !6, i64 0, !14, i64 8, !14, i64 16, !14, i64 16, !14, i64 16}
!17 = !{!16, !14, i64 8}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}


; 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.mln_string_t = type { ptr, i64, i32 }
%struct.mln_bignum_t = type { i32, i32, [257 x i64] }

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #2

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

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

declare i32 @mln_bignum_os2ip(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #4

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @mln_rsa_rsaep_rsadp(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #5

declare i32 @mln_bignum_i2osp(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #4

declare ptr @mln_string_dup(ptr noundef) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
define dso_local ptr @mln_RSAESPKCS1V15_private_encrypt(ptr noundef nonnull %0, ptr nocapture noundef nonnull readonly %1) local_unnamed_addr #6 {
  %3 = alloca %struct.mln_string_t, align 8
  %4 = alloca %struct.mln_bignum_t, align 8
  %5 = getelementptr inbounds i8, ptr %0, i64 4
  %6 = load i32, ptr %5, align 4, !tbaa !5
  %7 = shl i32 %6, 2
  %8 = zext i32 %7 to i64
  %9 = load ptr, ptr %1, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #8
  %10 = getelementptr inbounds i8, ptr %1, i64 8
  %11 = load i64, ptr %10, align 8, !tbaa !15
  %12 = add nsw i64 %8, -11
  %13 = icmp ult i64 %12, %11
  br i1 %13, label %38, label %14

14:                                               ; preds = %2
  %15 = udiv i64 %11, %12
  %16 = mul i64 %15, %8
  %17 = urem i64 %11, %12
  %18 = sub i64 0, %17
  %.not = icmp eq i64 %16, %18
  %19 = select i1 %.not, i64 0, i64 %8
  %20 = tail call noalias ptr @malloc(i64 noundef %19) #9
  %21 = icmp eq ptr %20, null
  br i1 %21, label %38, label %.preheader

.preheader:                                       ; preds = %14
  %.not5156 = icmp eq i64 %11, 0
  br i1 %.not5156, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader, %31
  %.04259 = phi ptr [ %32, %31 ], [ %20, %.preheader ]
  %.04458 = phi i64 [ %33, %31 ], [ %11, %.preheader ]
  %.04657 = phi ptr [ %34, %31 ], [ %9, %.preheader ]
  call void @llvm.lifetime.start.p0(i64 2064, ptr nonnull %4) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(2064) %4, i8 0, i64 2064, i1 false)
  %22 = call i64 @llvm.umin.i64(i64 %.04458, i64 %12)
  call void @mln_rsa_pri_padding(ptr noundef %.04657, i64 noundef %22, ptr noundef %.04259, i64 noundef %8)
  %23 = call i32 @mln_bignum_os2ip(ptr noundef nonnull %4, ptr noundef %.04259, i64 noundef %8) #8
  %24 = icmp slt i32 %23, 0
  br i1 %24, label %.thread, label %25

25:                                               ; preds = %.lr.ph
  %26 = call i32 @mln_rsa_rsaep_rsadp(ptr noundef nonnull %0, ptr noundef nonnull %4, ptr noundef nonnull %4)
  %27 = icmp slt i32 %26, 0
  br i1 %27, label %.thread, label %28

28:                                               ; preds = %25
  %29 = call i32 @mln_bignum_i2osp(ptr noundef nonnull %4, ptr noundef %.04259, i64 noundef %8) #8
  %30 = icmp slt i32 %29, 0
  br i1 %30, label %.thread, label %31

.thread:                                          ; preds = %28, %25, %.lr.ph
  call void @free(ptr noundef %20) #8
  call void @llvm.lifetime.end.p0(i64 2064, ptr nonnull %4) #8
  br label %38

31:                                               ; preds = %28
  %32 = getelementptr inbounds i8, ptr %.04259, i64 %8
  %33 = sub i64 %.04458, %22
  %34 = getelementptr inbounds i8, ptr %.04657, i64 %22
  call void @llvm.lifetime.end.p0(i64 2064, ptr nonnull %4) #8
  %.not51 = icmp eq i64 %33, 0
  br i1 %.not51, label %._crit_edge, label %.lr.ph, !llvm.loop !16

._crit_edge:                                      ; preds = %31, %.preheader
  store ptr %20, ptr %3, align 8, !tbaa !11
  %35 = getelementptr inbounds i8, ptr %3, i64 8
  store i64 %19, ptr %35, align 8, !tbaa !15
  %36 = getelementptr inbounds i8, ptr %3, i64 16
  store i32 5, ptr %36, align 8
  %37 = call ptr @mln_string_dup(ptr noundef nonnull %3) #8
  call void @free(ptr noundef %20) #8
  br label %38

38:                                               ; preds = %.thread, %14, %2, %._crit_edge
  %.2 = phi ptr [ %37, %._crit_edge ], [ null, %2 ], [ null, %14 ], [ null, %.thread ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #8
  ret ptr %.2
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @mln_rsa_pri_padding(ptr noundef, i64 noundef, ptr noundef, i64 noundef) local_unnamed_addr #5

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.umin.i64(i64, i64) #7

attributes #0 = { 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 #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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
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 = { 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 #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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { nounwind }
attributes #9 = { nounwind 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, !8, i64 4}
!6 = !{!"", !7, i64 0, !7, i64 2064, !7, i64 4128, !7, i64 6192, !7, i64 8256, !7, i64 10320, !7, i64 12384, !8, i64 14448}
!7 = !{!"", !8, i64 0, !8, i64 4, !9, i64 8}
!8 = !{!"int", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C/C++ TBAA"}
!11 = !{!12, !13, i64 0}
!12 = !{!"", !13, i64 0, !14, i64 8, !14, i64 16, !14, i64 16, !14, i64 16}
!13 = !{!"any pointer", !9, i64 0}
!14 = !{!"long", !9, i64 0}
!15 = !{!12, !14, i64 8}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass