; 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: nounwind uwtable
define dso_local ptr @mln_RSAESPKCS1V15_public_encrypt(ptr noundef nonnull %0, ptr noundef nonnull %1) #3 {
  %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 %134

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
  %57 = load ptr, ptr %7, align 8, !tbaa !5
  %58 = icmp eq ptr %57, null
  br i1 %58, label %59, label %60

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

60:                                               ; preds = %53
  %61 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %61, ptr %8, align 8, !tbaa !5
  br label %62

62:                                               ; preds = %112, %60
  %63 = load i64, ptr %13, align 8, !tbaa !13
  %64 = icmp ugt i64 %63, 0
  br i1 %64, label %65, label %113

65:                                               ; preds = %62
  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)
  %66 = load i64, ptr %13, align 8, !tbaa !13
  %67 = load i64, ptr %6, align 8, !tbaa !13
  %68 = sub i64 %67, 11
  %69 = icmp ugt i64 %66, %68
  br i1 %69, label %70, label %73

70:                                               ; preds = %65
  %71 = load i64, ptr %6, align 8, !tbaa !13
  %72 = sub i64 %71, 11
  br label %75

73:                                               ; preds = %65
  %74 = load i64, ptr %13, align 8, !tbaa !13
  br label %75

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

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

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

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

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

98:                                               ; preds = %93
  %99 = load ptr, ptr %7, align 8, !tbaa !5
  call void @free(ptr noundef %99) #7
  store ptr null, ptr %3, align 8
  store i32 1, ptr %15, align 4
  br label %110

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

110:                                              ; preds = %100, %98, %91, %85
  call void @llvm.lifetime.end.p0(i64 2064, ptr %16) #7
  %111 = load i32, ptr %15, align 4
  switch i32 %111, label %134 [
    i32 0, label %112
  ]

112:                                              ; preds = %110
  br label %62, !llvm.loop !18

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

134:                                              ; preds = %113, %110, %59, %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
  %135 = load ptr, ptr %3, align 8
  ret ptr %135
}

; 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: inlinehint nounwind uwtable
declare hidden void @mln_rsa_pub_padding(ptr noundef, i64 noundef, ptr noundef, i64 noundef) #5

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

; 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) #6

declare ptr @mln_string_dup(ptr noundef) #6

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 = { 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 #4 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = { "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: nounwind uwtable
define dso_local ptr @mln_RSAESPKCS1V15_public_encrypt(ptr noundef nonnull %0, ptr nocapture noundef nonnull readonly %1) local_unnamed_addr #3 {
  %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
  %.not5358 = icmp eq i64 %11, 0
  br i1 %.not5358, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader, %31
  %.04461 = phi ptr [ %34, %31 ], [ %20, %.preheader ]
  %.04660 = phi i64 [ %32, %31 ], [ %11, %.preheader ]
  %.04859 = phi ptr [ %33, %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 %.04660, i64 %12)
  call void @mln_rsa_pub_padding(ptr noundef %.04859, i64 noundef %22, ptr noundef %.04461, i64 noundef %8)
  %23 = call i32 @mln_bignum_os2ip(ptr noundef nonnull %4, ptr noundef %.04461, 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 %.04461, 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 = sub i64 %.04660, %22
  %33 = getelementptr inbounds i8, ptr %.04859, i64 %22
  %34 = getelementptr inbounds i8, ptr %.04461, i64 %8
  call void @llvm.lifetime.end.p0(i64 2064, ptr nonnull %4) #8
  %.not53 = icmp eq i64 %32, 0
  br i1 %.not53, 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: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

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

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

; 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 #6

declare ptr @mln_string_dup(ptr noundef) local_unnamed_addr #6

; 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 = { 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 #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
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 = { "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