; 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 nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

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

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

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

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

declare ptr @mln_string_dup(ptr noundef) #5

; Function Attrs: nounwind uwtable
define dso_local ptr @mln_RSAESPKCS1V15_private_decrypt(ptr noundef nonnull %0, ptr noundef nonnull %1) #7 {
  %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 ptr, align 8
  %12 = alloca %struct.mln_string_t, 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) #8
  %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) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #8
  %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 %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  store ptr null, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #8
  %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) #8
  store i64 0, ptr %14, align 8, !tbaa !13
  %30 = load ptr, ptr %5, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.mln_string_t, ptr %30, i32 0, i32 1
  %32 = load i64, ptr %31, align 8, !tbaa !17
  %33 = icmp ult i64 %32, 11
  br i1 %33, label %41, label %34

34:                                               ; preds = %2
  %35 = load ptr, ptr %5, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.mln_string_t, ptr %35, i32 0, i32 1
  %37 = load i64, ptr %36, align 8, !tbaa !17
  %38 = load i64, ptr %6, align 8, !tbaa !13
  %39 = urem i64 %37, %38
  %40 = icmp ne i64 %39, 0
  br i1 %40, label %41, label %42

41:                                               ; preds = %34, %2
  store ptr null, ptr %3, align 8
  store i32 1, ptr %15, align 4
  br label %141

42:                                               ; preds = %34
  %43 = load ptr, ptr %5, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.mln_string_t, ptr %43, i32 0, i32 1
  %45 = load i64, ptr %44, align 8, !tbaa !17
  %46 = call noalias ptr @malloc(i64 noundef %45) #9
  store ptr %46, ptr %7, align 8, !tbaa !5
  %47 = load ptr, ptr %7, align 8, !tbaa !5
  %48 = icmp eq ptr %47, null
  br i1 %48, label %49, label %50

49:                                               ; preds = %42
  store ptr null, ptr %3, align 8
  store i32 1, ptr %15, align 4
  br label %141

50:                                               ; preds = %42
  %51 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %51, ptr %8, align 8, !tbaa !5
  br label %52

52:                                               ; preds = %119, %50
  %53 = load i64, ptr %13, align 8, !tbaa !13
  %54 = icmp ugt i64 %53, 0
  br i1 %54, label %55, label %120

55:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 2064, ptr %16) #8
  call void @llvm.memset.p0.i64(ptr align 8 %16, i8 0, i64 2064, i1 false)
  %56 = load ptr, ptr %10, align 8, !tbaa !5
  %57 = load i64, ptr %6, align 8, !tbaa !13
  %58 = call i32 @mln_bignum_os2ip(ptr noundef %16, ptr noundef %56, i64 noundef %57)
  %59 = icmp slt i32 %58, 0
  br i1 %59, label %60, label %62

60:                                               ; preds = %55
  %61 = load ptr, ptr %7, align 8, !tbaa !5
  call void @free(ptr noundef %61) #8
  store ptr null, ptr %3, align 8
  store i32 1, ptr %15, align 4
  br label %117

62:                                               ; preds = %55
  %63 = load ptr, ptr %4, align 8, !tbaa !5
  %64 = call i32 @mln_rsa_rsaep_rsadp(ptr noundef %63, ptr noundef %16, ptr noundef %16)
  %65 = icmp slt i32 %64, 0
  br i1 %65, label %66, label %68

66:                                               ; preds = %62
  %67 = load ptr, ptr %7, align 8, !tbaa !5
  call void @free(ptr noundef %67) #8
  store ptr null, ptr %3, align 8
  store i32 1, ptr %15, align 4
  br label %117

68:                                               ; preds = %62
  %69 = load ptr, ptr %10, align 8, !tbaa !5
  %70 = load i64, ptr %6, align 8, !tbaa !13
  %71 = call i32 @mln_bignum_i2osp(ptr noundef %16, ptr noundef %69, i64 noundef %70)
  %72 = icmp slt i32 %71, 0
  br i1 %72, label %73, label %75

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

75:                                               ; preds = %68
  %76 = load ptr, ptr %10, align 8, !tbaa !5
  %77 = load i64, ptr %6, align 8, !tbaa !13
  %78 = call ptr @mln_rsa_anti_padding_public(ptr noundef %76, i64 noundef %77)
  store ptr %78, ptr %9, align 8, !tbaa !5
  %79 = load ptr, ptr %9, align 8, !tbaa !5
  %80 = icmp eq ptr %79, null
  br i1 %80, label %81, label %83

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

83:                                               ; preds = %75
  %84 = load ptr, ptr %8, align 8, !tbaa !5
  %85 = load ptr, ptr %9, align 8, !tbaa !5
  %86 = load i64, ptr %6, align 8, !tbaa !13
  %87 = load ptr, ptr %9, align 8, !tbaa !5
  %88 = load ptr, ptr %10, align 8, !tbaa !5
  %89 = ptrtoint ptr %87 to i64
  %90 = ptrtoint ptr %88 to i64
  %91 = sub i64 %89, %90
  %92 = sub i64 %86, %91
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %84, ptr align 1 %85, i64 %92, i1 false)
  %93 = load i64, ptr %6, align 8, !tbaa !13
  %94 = load ptr, ptr %9, align 8, !tbaa !5
  %95 = load ptr, ptr %10, align 8, !tbaa !5
  %96 = ptrtoint ptr %94 to i64
  %97 = ptrtoint ptr %95 to i64
  %98 = sub i64 %96, %97
  %99 = sub i64 %93, %98
  %100 = load i64, ptr %14, align 8, !tbaa !13
  %101 = add i64 %100, %99
  store i64 %101, ptr %14, align 8, !tbaa !13
  %102 = load i64, ptr %6, align 8, !tbaa !13
  %103 = load ptr, ptr %9, align 8, !tbaa !5
  %104 = load ptr, ptr %10, align 8, !tbaa !5
  %105 = ptrtoint ptr %103 to i64
  %106 = ptrtoint ptr %104 to i64
  %107 = sub i64 %105, %106
  %108 = sub i64 %102, %107
  %109 = load ptr, ptr %8, align 8, !tbaa !5
  %110 = getelementptr inbounds i8, ptr %109, i64 %108
  store ptr %110, ptr %8, align 8, !tbaa !5
  %111 = load i64, ptr %6, align 8, !tbaa !13
  %112 = load ptr, ptr %10, align 8, !tbaa !5
  %113 = getelementptr inbounds i8, ptr %112, i64 %111
  store ptr %113, ptr %10, align 8, !tbaa !5
  %114 = load i64, ptr %6, align 8, !tbaa !13
  %115 = load i64, ptr %13, align 8, !tbaa !13
  %116 = sub i64 %115, %114
  store i64 %116, ptr %13, align 8, !tbaa !13
  store i32 0, ptr %15, align 4
  br label %117

117:                                              ; preds = %83, %81, %73, %66, %60
  call void @llvm.lifetime.end.p0(i64 2064, ptr %16) #8
  %118 = load i32, ptr %15, align 4
  switch i32 %118, label %141 [
    i32 0, label %119
  ]

119:                                              ; preds = %117
  br label %52, !llvm.loop !18

120:                                              ; preds = %52
  %121 = load ptr, ptr %7, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.mln_string_t, ptr %12, i32 0, i32 0
  store ptr %121, ptr %122, align 8, !tbaa !15
  %123 = load i64, ptr %14, align 8, !tbaa !13
  %124 = getelementptr inbounds %struct.mln_string_t, ptr %12, i32 0, i32 1
  store i64 %123, ptr %124, align 8, !tbaa !17
  %125 = getelementptr inbounds %struct.mln_string_t, ptr %12, i32 0, i32 2
  %126 = load i32, ptr %125, align 8
  %127 = and i32 %126, -2
  %128 = or i32 %127, 1
  store i32 %128, ptr %125, align 8
  %129 = getelementptr inbounds %struct.mln_string_t, ptr %12, i32 0, i32 2
  %130 = load i32, ptr %129, align 8
  %131 = and i32 %130, -3
  %132 = or i32 %131, 0
  store i32 %132, ptr %129, align 8
  %133 = getelementptr inbounds %struct.mln_string_t, ptr %12, i32 0, i32 2
  %134 = load i32, ptr %133, align 8
  %135 = and i32 %134, 3
  %136 = or i32 %135, 4
  store i32 %136, ptr %133, align 8
  store ptr %12, ptr %17, align 8, !tbaa !5
  %137 = load ptr, ptr %17, align 8, !tbaa !5
  %138 = call ptr @mln_string_dup(ptr noundef %12)
  store ptr %138, ptr %11, align 8, !tbaa !5
  %139 = load ptr, ptr %7, align 8, !tbaa !5
  call void @free(ptr noundef %139) #8
  %140 = load ptr, ptr %11, align 8, !tbaa !5
  store ptr %140, ptr %3, align 8
  store i32 1, ptr %15, align 4
  br label %141

141:                                              ; preds = %120, %117, %49, %41
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  %142 = load ptr, ptr %3, align 8
  ret ptr %142
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @mln_rsa_anti_padding_public(ptr noundef, i64 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { "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 = { 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 #7 = { 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 #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, !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 nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

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

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

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

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

declare ptr @mln_string_dup(ptr noundef) local_unnamed_addr #5

; Function Attrs: nounwind uwtable
define dso_local ptr @mln_RSAESPKCS1V15_private_decrypt(ptr noundef nonnull %0, ptr nocapture noundef nonnull readonly %1) local_unnamed_addr #7 {
  %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 = icmp ult i64 %11, 11
  br i1 %12, label %41, label %13

13:                                               ; preds = %2
  %14 = urem i64 %11, %8
  %.not = icmp eq i64 %14, 0
  br i1 %.not, label %15, label %41

15:                                               ; preds = %13
  %16 = tail call noalias ptr @malloc(i64 noundef %11) #9
  %17 = icmp eq ptr %16, null
  br i1 %17, label %41, label %.preheader

.preheader:                                       ; preds = %15, %29
  %.04670 = phi i64 [ %33, %29 ], [ 0, %15 ]
  %.04869 = phi i64 [ %36, %29 ], [ %11, %15 ]
  %.05068 = phi ptr [ %35, %29 ], [ %9, %15 ]
  %.05267 = phi ptr [ %34, %29 ], [ %16, %15 ]
  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)
  %18 = call i32 @mln_bignum_os2ip(ptr noundef nonnull %4, ptr noundef %.05068, i64 noundef %8) #8
  %19 = icmp slt i32 %18, 0
  br i1 %19, label %.thread, label %20

20:                                               ; preds = %.preheader
  %21 = call i32 @mln_rsa_rsaep_rsadp(ptr noundef nonnull %0, ptr noundef nonnull %4, ptr noundef nonnull %4)
  %22 = icmp slt i32 %21, 0
  br i1 %22, label %.thread, label %23

23:                                               ; preds = %20
  %24 = call i32 @mln_bignum_i2osp(ptr noundef nonnull %4, ptr noundef %.05068, i64 noundef %8) #8
  %25 = icmp slt i32 %24, 0
  br i1 %25, label %.thread, label %26

26:                                               ; preds = %23
  %27 = call ptr @mln_rsa_anti_padding_public(ptr noundef %.05068, i64 noundef %8)
  %28 = icmp eq ptr %27, null
  br i1 %28, label %.thread, label %29

.thread:                                          ; preds = %26, %23, %20, %.preheader
  call void @free(ptr noundef %16) #8
  call void @llvm.lifetime.end.p0(i64 2064, ptr nonnull %4) #8
  br label %41

29:                                               ; preds = %26
  %30 = ptrtoint ptr %27 to i64
  %31 = ptrtoint ptr %.05068 to i64
  %.neg = sub i64 %31, %30
  %32 = add i64 %.neg, %8
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %.05267, ptr nonnull align 1 %27, i64 %32, i1 false)
  %33 = add i64 %32, %.04670
  %34 = getelementptr inbounds i8, ptr %.05267, i64 %32
  %35 = getelementptr inbounds i8, ptr %.05068, i64 %8
  %36 = sub i64 %.04869, %8
  call void @llvm.lifetime.end.p0(i64 2064, ptr nonnull %4) #8
  %.not57 = icmp eq i64 %36, 0
  br i1 %.not57, label %37, label %.preheader, !llvm.loop !16

37:                                               ; preds = %29
  store ptr %16, ptr %3, align 8, !tbaa !11
  %38 = getelementptr inbounds i8, ptr %3, i64 8
  store i64 %33, ptr %38, align 8, !tbaa !15
  %39 = getelementptr inbounds i8, ptr %3, i64 16
  store i32 5, ptr %39, align 8
  %40 = call ptr @mln_string_dup(ptr noundef nonnull %3) #8
  call void @free(ptr noundef %16) #8
  br label %41

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @mln_rsa_anti_padding_public(ptr noundef, i64 noundef) local_unnamed_addr #6

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: readwrite) }
attributes #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { "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 = { 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 #7 = { 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 #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,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass