; LLVM IR from kala13x/libxutils :: src/crypt (crypt)

; 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.XCryptCtx = type { ptr, ptr, i8, i64, ptr }
%struct.XArray_ = type { ptr, ptr, i32, ptr, i8, i8, i8, i64, i64 }

@.str.30 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [34 x i8], align 1

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @XCrypt_GetCipher(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local ptr @XCrypt_GetCipherStr(i32 noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @XCrypt_ErrorCallback(ptr noundef, ptr noundef, ...) #1

; Function Attrs: nounwind uwtable
declare dso_local ptr @XCrypt_Single(ptr noundef, i32 noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local ptr @XDecrypt_Single(ptr noundef, i32 noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local ptr @XCrypt_Multy(ptr noundef %0, ptr noundef %1, ptr noundef %2) #1 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %17 = load ptr, ptr %5, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.XCryptCtx, ptr %17, i32 0, i32 2
  %19 = load i8, ptr %18, align 8, !tbaa !9
  %20 = zext i8 %19 to i32
  %21 = icmp ne i32 %20, 0
  %22 = zext i1 %21 to i64
  %23 = select i1 %21, ptr @XDecrypt_Single, ptr @XCrypt_Single
  store ptr %23, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %24 = load ptr, ptr %5, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.XCryptCtx, ptr %24, i32 0, i32 4
  %26 = load ptr, ptr %25, align 8, !tbaa !12
  %27 = call ptr @xstrsplit(ptr noundef %26, ptr noundef @.str.30)
  store ptr %27, ptr %9, align 8, !tbaa !5
  %28 = load ptr, ptr %9, align 8, !tbaa !5
  %29 = icmp eq ptr %28, null
  br i1 %29, label %30, label %54

30:                                               ; preds = %3
  %31 = call ptr @XArray_NewPool(i64 noundef 0, i64 noundef 0, i8 noundef zeroext 0)
  store ptr %31, ptr %9, align 8, !tbaa !5
  %32 = load ptr, ptr %9, align 8, !tbaa !5
  %33 = icmp eq ptr %32, null
  br i1 %33, label %34, label %36

34:                                               ; preds = %30
  %35 = load ptr, ptr %5, align 8, !tbaa !5
  call void (ptr, ptr, ...) @XCrypt_ErrorCallback(ptr noundef %35, ptr noundef @.str.31)
  store ptr null, ptr %4, align 8
  store i32 1, ptr %10, align 4
  br label %115

36:                                               ; preds = %30
  %37 = load ptr, ptr %9, align 8, !tbaa !5
  %38 = load ptr, ptr %5, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.XCryptCtx, ptr %38, i32 0, i32 4
  %40 = load ptr, ptr %39, align 8, !tbaa !12
  %41 = load ptr, ptr %5, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.XCryptCtx, ptr %41, i32 0, i32 4
  %43 = load ptr, ptr %42, align 8, !tbaa !12
  %44 = call i64 @strlen(ptr noundef %43) #6
  %45 = call i32 @XArray_AddData(ptr noundef %37, ptr noundef %40, i64 noundef %44)
  %46 = load ptr, ptr %9, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.XArray_, ptr %46, i32 0, i32 8
  %48 = load i64, ptr %47, align 8, !tbaa !13
  %49 = icmp ne i64 %48, 0
  br i1 %49, label %53, label %50

50:                                               ; preds = %36
  %51 = load ptr, ptr %5, align 8, !tbaa !5
  call void (ptr, ptr, ...) @XCrypt_ErrorCallback(ptr noundef %51, ptr noundef @.str.32)
  %52 = load ptr, ptr %9, align 8, !tbaa !5
  call void @XArray_Destroy(ptr noundef %52)
  store ptr null, ptr %4, align 8
  store i32 1, ptr %10, align 4
  br label %115

53:                                               ; preds = %36
  br label %54

54:                                               ; preds = %53, %3
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %55 = load ptr, ptr %6, align 8, !tbaa !5
  %56 = load ptr, ptr %7, align 8, !tbaa !5
  %57 = load i64, ptr %56, align 8, !tbaa !16
  %58 = call ptr @XByteData_Dup(ptr noundef %55, i64 noundef %57)
  store ptr %58, ptr %11, align 8, !tbaa !5
  %59 = load ptr, ptr %11, align 8, !tbaa !5
  %60 = icmp eq ptr %59, null
  br i1 %60, label %61, label %64

61:                                               ; preds = %54
  %62 = load ptr, ptr %5, align 8, !tbaa !5
  call void (ptr, ptr, ...) @XCrypt_ErrorCallback(ptr noundef %62, ptr noundef @.str.33)
  %63 = load ptr, ptr %9, align 8, !tbaa !5
  call void @XArray_Destroy(ptr noundef %63)
  store ptr null, ptr %4, align 8
  store i32 1, ptr %10, align 4
  br label %114

64:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %65 = load ptr, ptr %9, align 8, !tbaa !5
  %66 = call i64 @XArray_Used(ptr noundef %65)
  store i64 %66, ptr %13, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  store ptr null, ptr %14, align 8, !tbaa !5
  store i64 0, ptr %12, align 8, !tbaa !16
  br label %67

67:                                               ; preds = %107, %64
  %68 = load i64, ptr %12, align 8, !tbaa !16
  %69 = load i64, ptr %13, align 8, !tbaa !16
  %70 = icmp ult i64 %68, %69
  br i1 %70, label %71, label %74

71:                                               ; preds = %67
  %72 = load ptr, ptr %11, align 8, !tbaa !5
  %73 = icmp ne ptr %72, null
  br label %74

74:                                               ; preds = %71, %67
  %75 = phi i1 [ false, %67 ], [ %73, %71 ]
  br i1 %75, label %76, label %110

76:                                               ; preds = %74
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %77 = load ptr, ptr %9, align 8, !tbaa !5
  %78 = load i64, ptr %12, align 8, !tbaa !16
  %79 = call ptr @XArray_GetData(ptr noundef %77, i64 noundef %78)
  store ptr %79, ptr %15, align 8, !tbaa !5
  %80 = load ptr, ptr %15, align 8, !tbaa !5
  %81 = icmp eq ptr %80, null
  br i1 %81, label %82, label %83

82:                                               ; preds = %76
  store i32 4, ptr %10, align 4
  br label %104

83:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  %84 = load ptr, ptr %15, align 8, !tbaa !5
  %85 = call i32 @XCrypt_GetCipher(ptr noundef %84)
  store i32 %85, ptr %16, align 4, !tbaa !17
  %86 = load i32, ptr %16, align 4, !tbaa !17
  %87 = icmp eq i32 %86, 18
  br i1 %87, label %88, label %94

88:                                               ; preds = %83
  %89 = load ptr, ptr %5, align 8, !tbaa !5
  %90 = load i32, ptr %16, align 4, !tbaa !17
  %91 = call ptr @XCrypt_GetCipherStr(i32 noundef %90)
  call void (ptr, ptr, ...) @XCrypt_ErrorCallback(ptr noundef %89, ptr noundef @.str.34, ptr noundef %91)
  %92 = load ptr, ptr %9, align 8, !tbaa !5
  call void @XArray_Destroy(ptr noundef %92)
  %93 = load ptr, ptr %11, align 8, !tbaa !5
  call void @free(ptr noundef %93) #5
  store ptr null, ptr %4, align 8
  store i32 1, ptr %10, align 4
  br label %103

94:                                               ; preds = %83
  %95 = load ptr, ptr %8, align 8, !tbaa !5
  %96 = load ptr, ptr %5, align 8, !tbaa !5
  %97 = load i32, ptr %16, align 4, !tbaa !17
  %98 = load ptr, ptr %11, align 8, !tbaa !5
  %99 = load ptr, ptr %7, align 8, !tbaa !5
  %100 = call ptr %95(ptr noundef %96, i32 noundef %97, ptr noundef %98, ptr noundef %99)
  store ptr %100, ptr %14, align 8, !tbaa !5
  %101 = load ptr, ptr %11, align 8, !tbaa !5
  call void @free(ptr noundef %101) #5
  %102 = load ptr, ptr %14, align 8, !tbaa !5
  store ptr %102, ptr %11, align 8, !tbaa !5
  store i32 0, ptr %10, align 4
  br label %103

103:                                              ; preds = %94, %88
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  br label %104

104:                                              ; preds = %103, %82
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  %105 = load i32, ptr %10, align 4
  switch i32 %105, label %113 [
    i32 0, label %106
    i32 4, label %107
  ]

106:                                              ; preds = %104
  br label %107

107:                                              ; preds = %106, %104
  %108 = load i64, ptr %12, align 8, !tbaa !16
  %109 = add i64 %108, 1
  store i64 %109, ptr %12, align 8, !tbaa !16
  br label %67, !llvm.loop !18

110:                                              ; preds = %74
  %111 = load ptr, ptr %9, align 8, !tbaa !5
  call void @XArray_Destroy(ptr noundef %111)
  %112 = load ptr, ptr %11, align 8, !tbaa !5
  store ptr %112, ptr %4, align 8
  store i32 1, ptr %10, align 4
  br label %113

113:                                              ; preds = %110, %104
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %114

114:                                              ; preds = %113, %61
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %115

115:                                              ; preds = %114, %50, %34
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  %116 = load ptr, ptr %4, align 8
  ret ptr %116
}

declare ptr @xstrsplit(ptr noundef, ptr noundef) #2

declare ptr @XArray_NewPool(i64 noundef, i64 noundef, i8 noundef zeroext) #2

declare i32 @XArray_AddData(ptr noundef, ptr noundef, i64 noundef) #2

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

declare void @XArray_Destroy(ptr noundef) #2

declare ptr @XByteData_Dup(ptr noundef, i64 noundef) #2

declare i64 @XArray_Used(ptr noundef) #2

declare ptr @XArray_GetData(ptr noundef, i64 noundef) #2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 #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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !7, i64 16}
!10 = !{!"XCryptCtx", !6, i64 0, !6, i64 8, !7, i64 16, !11, i64 24, !6, i64 32}
!11 = !{!"long", !7, i64 0}
!12 = !{!10, !6, i64 32}
!13 = !{!14, !11, i64 48}
!14 = !{!"XArray_", !6, i64 0, !6, i64 8, !15, i64 16, !6, i64 24, !7, i64 32, !7, i64 33, !7, i64 34, !11, i64 40, !11, i64 48}
!15 = !{!"int", !7, i64 0}
!16 = !{!11, !11, i64 0}
!17 = !{!15, !15, i64 0}
!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"

@.str.30 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [34 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local i32 @XCrypt_GetCipher(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local ptr @XCrypt_GetCipherStr(i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local void @XCrypt_ErrorCallback(ptr noundef, ptr noundef, ...) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local ptr @XCrypt_Single(ptr noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local ptr @XDecrypt_Single(ptr noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local ptr @XCrypt_Multy(ptr noundef %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #0 {
  %4 = getelementptr inbounds i8, ptr %0, i64 16
  %5 = load i8, ptr %4, align 8, !tbaa !5
  %.not = icmp eq i8 %5, 0
  %6 = select i1 %.not, ptr @XCrypt_Single, ptr @XDecrypt_Single
  %7 = getelementptr inbounds i8, ptr %0, i64 32
  %8 = load ptr, ptr %7, align 8, !tbaa !11
  %9 = tail call ptr @xstrsplit(ptr noundef %8, ptr noundef nonnull @.str.30) #4
  %10 = icmp eq ptr %9, null
  br i1 %10, label %11, label %22

11:                                               ; preds = %3
  %12 = tail call ptr @XArray_NewPool(i64 noundef 0, i64 noundef 0, i8 noundef zeroext 0) #4
  %13 = icmp eq ptr %12, null
  br i1 %13, label %14, label %15

14:                                               ; preds = %11
  tail call void (ptr, ptr, ...) @XCrypt_ErrorCallback(ptr noundef nonnull %0, ptr noundef nonnull @.str.31)
  br label %43

15:                                               ; preds = %11
  %16 = load ptr, ptr %7, align 8, !tbaa !11
  %17 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %16) #5
  %18 = tail call i32 @XArray_AddData(ptr noundef nonnull %12, ptr noundef %16, i64 noundef %17) #4
  %19 = getelementptr inbounds i8, ptr %12, i64 48
  %20 = load i64, ptr %19, align 8, !tbaa !12
  %.not53 = icmp eq i64 %20, 0
  br i1 %.not53, label %21, label %22

21:                                               ; preds = %15
  tail call void (ptr, ptr, ...) @XCrypt_ErrorCallback(ptr noundef nonnull %0, ptr noundef nonnull @.str.32)
  tail call void @XArray_Destroy(ptr noundef nonnull %12) #4
  br label %43

22:                                               ; preds = %15, %3
  %.040 = phi ptr [ %12, %15 ], [ %9, %3 ]
  %23 = load i64, ptr %2, align 8, !tbaa !15
  %24 = tail call ptr @XByteData_Dup(ptr noundef %1, i64 noundef %23) #4
  %25 = icmp eq ptr %24, null
  br i1 %25, label %26, label %27

26:                                               ; preds = %22
  tail call void (ptr, ptr, ...) @XCrypt_ErrorCallback(ptr noundef nonnull %0, ptr noundef nonnull @.str.33)
  tail call void @XArray_Destroy(ptr noundef nonnull %.040) #4
  br label %43

27:                                               ; preds = %22
  %28 = tail call i64 @XArray_Used(ptr noundef nonnull %.040) #4
  %.not60 = icmp eq i64 %28, 0
  br i1 %.not60, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %27, %38
  %.04359 = phi i64 [ %39, %38 ], [ 0, %27 ]
  %.04458 = phi ptr [ %.246.ph, %38 ], [ %24, %27 ]
  %29 = tail call ptr @XArray_GetData(ptr noundef nonnull %.040, i64 noundef %.04359) #4
  %30 = icmp eq ptr %29, null
  br i1 %30, label %38, label %31

31:                                               ; preds = %.lr.ph
  %32 = tail call i32 @XCrypt_GetCipher(ptr noundef nonnull %29)
  %33 = icmp eq i32 %32, 18
  br i1 %33, label %36, label %34

34:                                               ; preds = %31
  %35 = tail call ptr %6(ptr noundef %0, i32 noundef %32, ptr noundef nonnull %.04458, ptr noundef nonnull %2) #4, !callees !16
  tail call void @free(ptr noundef nonnull %.04458) #4
  br label %38

36:                                               ; preds = %31
  %37 = tail call ptr @XCrypt_GetCipherStr(i32 noundef 18)
  tail call void (ptr, ptr, ...) @XCrypt_ErrorCallback(ptr noundef %0, ptr noundef nonnull @.str.34, ptr noundef %37)
  tail call void @XArray_Destroy(ptr noundef nonnull %.040) #4
  tail call void @free(ptr noundef nonnull %.04458) #4
  br label %43

38:                                               ; preds = %.lr.ph, %34
  %.246.ph = phi ptr [ %35, %34 ], [ %.04458, %.lr.ph ]
  %39 = add nuw i64 %.04359, 1
  %40 = icmp ult i64 %39, %28
  %41 = icmp ne ptr %.246.ph, null
  %42 = select i1 %40, i1 %41, i1 false
  br i1 %42, label %.lr.ph, label %._crit_edge, !llvm.loop !17

._crit_edge:                                      ; preds = %38, %27
  %.044.lcssa = phi ptr [ %24, %27 ], [ %.246.ph, %38 ]
  tail call void @XArray_Destroy(ptr noundef nonnull %.040) #4
  br label %43

43:                                               ; preds = %36, %26, %._crit_edge, %21, %14
  %.5 = phi ptr [ null, %14 ], [ null, %21 ], [ null, %26 ], [ null, %36 ], [ %.044.lcssa, %._crit_edge ]
  ret ptr %.5
}

declare ptr @xstrsplit(ptr noundef, ptr noundef) local_unnamed_addr #1

declare ptr @XArray_NewPool(i64 noundef, i64 noundef, i8 noundef zeroext) local_unnamed_addr #1

declare i32 @XArray_AddData(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #1

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

declare void @XArray_Destroy(ptr noundef) local_unnamed_addr #1

declare ptr @XByteData_Dup(ptr noundef, i64 noundef) local_unnamed_addr #1

declare i64 @XArray_Used(ptr noundef) local_unnamed_addr #1

declare ptr @XArray_GetData(ptr noundef, i64 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #3

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 = { "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 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 #3 = { 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 #4 = { nounwind }
attributes #5 = { 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, !8, i64 16}
!6 = !{!"XCryptCtx", !7, i64 0, !7, i64 8, !8, i64 16, !10, i64 24, !7, i64 32}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"long", !8, i64 0}
!11 = !{!6, !7, i64 32}
!12 = !{!13, !10, i64 48}
!13 = !{!"XArray_", !7, i64 0, !7, i64 8, !14, i64 16, !7, i64 24, !8, i64 32, !8, i64 33, !8, i64 34, !10, i64 40, !10, i64 48}
!14 = !{!"int", !8, i64 0}
!15 = !{!10, !10, i64 0}
!16 = !{ptr @XCrypt_Single, ptr @XDecrypt_Single}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CalledValuePropagationPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass