; LLVM IR from kala13x/libxutils :: tools (xcrypt)

; 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.xcrypt_args_t = type { [4096 x i8], [2048 x i8], [2048 x i8], [2048 x i8], [4096 x i8], [4096 x i8], [4096 x i8], i64, i8, i8, i8, i8, i8 }
%struct.XByteBuffer = type { ptr, i64, i64, i16, i16, i32 }
%struct.XCryptCtx = type { ptr, ptr, i8, i64, ptr }

@.str.1 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [36 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local zeroext i8 @XCrypt_Callback(i32 noundef, ptr noundef, ptr noundef) #0

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

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

declare void @XLog_Display(i32 noundef, i8 noundef zeroext, ptr noundef, ...) #2

; Function Attrs: nounwind willreturn memory(none)
declare ptr @__errno_location() #3

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca %struct.xcrypt_args_t, align 8
  %7 = alloca i32, align 4
  %8 = alloca %struct.XByteBuffer, align 8
  %9 = alloca %struct.XCryptCtx, align 8
  %10 = alloca i64, align 8
  %11 = alloca ptr, align 8
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @XLog_Init(ptr noundef null, i16 noundef zeroext 203, i8 noundef zeroext 0)
  call void @XLog_FlagEnable(i32 noundef 4)
  call void @llvm.lifetime.start.p0(i64 22544, ptr %6) #5
  %12 = load i32, ptr %4, align 4, !tbaa !5
  %13 = load ptr, ptr %5, align 8, !tbaa !9
  %14 = call zeroext i8 @XCrypt_ParseArgs(ptr noundef %6, i32 noundef %12, ptr noundef %13)
  %15 = icmp ne i8 %14, 0
  br i1 %15, label %17, label %16

16:                                               ; preds = %2
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %95

17:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 32, ptr %8) #5
  %18 = call i32 @XByteBuffer_Init(ptr noundef %8, i64 noundef 0, i32 noundef 0)
  %19 = getelementptr inbounds %struct.xcrypt_args_t, ptr %6, i32 0, i32 3
  %20 = getelementptr inbounds [2048 x i8], ptr %19, i64 0, i64 0
  %21 = call zeroext i8 @xstrused(ptr noundef %20)
  %22 = zext i8 %21 to i32
  %23 = icmp ne i32 %22, 0
  br i1 %23, label %24, label %34

24:                                               ; preds = %17
  %25 = getelementptr inbounds %struct.xcrypt_args_t, ptr %6, i32 0, i32 3
  %26 = getelementptr inbounds [2048 x i8], ptr %25, i64 0, i64 0
  %27 = call i64 @XPath_LoadBuffer(ptr noundef %26, ptr noundef %8)
  %28 = icmp ne i64 %27, 0
  br i1 %28, label %34, label %29

29:                                               ; preds = %24
  %30 = getelementptr inbounds %struct.xcrypt_args_t, ptr %6, i32 0, i32 3
  %31 = getelementptr inbounds [2048 x i8], ptr %30, i64 0, i64 0
  %32 = call ptr @__errno_location() #6
  %33 = load i32, ptr %32, align 4, !tbaa !5
  call void (i32, i8, ptr, ...) @XLog_Display(i32 noundef 64, i8 noundef zeroext 1, ptr noundef @.str.1, ptr noundef %31, i32 noundef %33)
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %94

34:                                               ; preds = %24, %17
  %35 = getelementptr inbounds %struct.xcrypt_args_t, ptr %6, i32 0, i32 3
  %36 = getelementptr inbounds [2048 x i8], ptr %35, i64 0, i64 0
  %37 = call zeroext i8 @xstrused(ptr noundef %36)
  %38 = icmp ne i8 %37, 0
  br i1 %38, label %47, label %39

39:                                               ; preds = %34
  %40 = getelementptr inbounds %struct.xcrypt_args_t, ptr %6, i32 0, i32 4
  %41 = getelementptr inbounds [4096 x i8], ptr %40, i64 0, i64 0
  %42 = call i32 (ptr, ptr, ...) @XByteBuffer_AddFmt(ptr noundef %8, ptr noundef @.str.2, ptr noundef %41)
  %43 = icmp sle i32 %42, 0
  br i1 %43, label %44, label %47

44:                                               ; preds = %39
  %45 = call ptr @__errno_location() #6
  %46 = load i32, ptr %45, align 4, !tbaa !5
  call void (i32, i8, ptr, ...) @XLog_Display(i32 noundef 64, i8 noundef zeroext 1, ptr noundef @.str.3, i32 noundef %46)
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %94

47:                                               ; preds = %39, %34
  br label %48

48:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 40, ptr %9) #5
  %49 = getelementptr inbounds %struct.xcrypt_args_t, ptr %6, i32 0, i32 8
  %50 = load i8, ptr %49, align 8, !tbaa !11
  %51 = getelementptr inbounds %struct.xcrypt_args_t, ptr %6, i32 0, i32 1
  %52 = getelementptr inbounds [2048 x i8], ptr %51, i64 0, i64 0
  call void @XCrypt_Init(ptr noundef %9, i8 noundef zeroext %50, ptr noundef %52, ptr noundef @XCrypt_Callback, ptr noundef %6)
  %53 = getelementptr inbounds %struct.XCryptCtx, ptr %9, i32 0, i32 3
  store i64 16, ptr %53, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %54 = getelementptr inbounds %struct.XByteBuffer, ptr %8, i32 0, i32 2
  %55 = load i64, ptr %54, align 8, !tbaa !16
  store i64 %55, ptr %10, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %56 = getelementptr inbounds %struct.XByteBuffer, ptr %8, i32 0, i32 0
  %57 = load ptr, ptr %56, align 8, !tbaa !20
  %58 = call ptr @XCrypt_Multy(ptr noundef %9, ptr noundef %57, ptr noundef %10)
  store ptr %58, ptr %11, align 8, !tbaa !9
  %59 = load ptr, ptr %11, align 8, !tbaa !9
  %60 = icmp eq ptr %59, null
  br i1 %60, label %61, label %70

61:                                               ; preds = %48
  %62 = getelementptr inbounds %struct.xcrypt_args_t, ptr %6, i32 0, i32 8
  %63 = load i8, ptr %62, align 8, !tbaa !11
  %64 = zext i8 %63 to i32
  %65 = icmp ne i32 %64, 0
  %66 = zext i1 %65 to i64
  %67 = select i1 %65, ptr @.str.5, ptr @.str.6
  %68 = getelementptr inbounds %struct.xcrypt_args_t, ptr %6, i32 0, i32 1
  %69 = getelementptr inbounds [2048 x i8], ptr %68, i64 0, i64 0
  call void (i32, i8, ptr, ...) @XLog_Display(i32 noundef 64, i8 noundef zeroext 1, ptr noundef @.str.4, ptr noundef %67, ptr noundef %69)
  call void @XByteBuffer_Clear(ptr noundef %8)
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %93

70:                                               ; preds = %48
  %71 = getelementptr inbounds %struct.xcrypt_args_t, ptr %6, i32 0, i32 2
  %72 = getelementptr inbounds [2048 x i8], ptr %71, i64 0, i64 0
  %73 = call zeroext i8 @xstrused(ptr noundef %72)
  %74 = zext i8 %73 to i32
  %75 = icmp ne i32 %74, 0
  br i1 %75, label %76, label %89

76:                                               ; preds = %70
  %77 = getelementptr inbounds %struct.xcrypt_args_t, ptr %6, i32 0, i32 2
  %78 = getelementptr inbounds [2048 x i8], ptr %77, i64 0, i64 0
  %79 = load ptr, ptr %11, align 8, !tbaa !9
  %80 = load i64, ptr %10, align 8, !tbaa !19
  %81 = call i32 @XPath_Write(ptr noundef %78, ptr noundef %79, i64 noundef %80, ptr noundef @.str.7)
  %82 = icmp sle i32 %81, 0
  br i1 %82, label %83, label %89

83:                                               ; preds = %76
  %84 = getelementptr inbounds %struct.xcrypt_args_t, ptr %6, i32 0, i32 2
  %85 = getelementptr inbounds [2048 x i8], ptr %84, i64 0, i64 0
  %86 = call ptr @__errno_location() #6
  %87 = load i32, ptr %86, align 4, !tbaa !5
  call void (i32, i8, ptr, ...) @XLog_Display(i32 noundef 64, i8 noundef zeroext 1, ptr noundef @.str.8, ptr noundef %85, i32 noundef %87)
  call void @XByteBuffer_Clear(ptr noundef %8)
  %88 = load ptr, ptr %11, align 8, !tbaa !9
  call void @free(ptr noundef %88) #5
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %93

89:                                               ; preds = %76, %70
  %90 = load ptr, ptr %11, align 8, !tbaa !9
  %91 = load i64, ptr %10, align 8, !tbaa !19
  call void @XCrypt_Print(ptr noundef %6, ptr noundef %90, i64 noundef %91)
  call void @XByteBuffer_Clear(ptr noundef %8)
  %92 = load ptr, ptr %11, align 8, !tbaa !9
  call void @free(ptr noundef %92) #5
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %93

93:                                               ; preds = %89, %83, %61
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %9) #5
  br label %94

94:                                               ; preds = %93, %44, %29
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #5
  br label %95

95:                                               ; preds = %94, %16
  call void @llvm.lifetime.end.p0(i64 22544, ptr %6) #5
  %96 = load i32, ptr %3, align 4
  ret i32 %96
}

declare void @XLog_Init(ptr noundef, i16 noundef zeroext, i8 noundef zeroext) #2

declare void @XLog_FlagEnable(i32 noundef) #2

; Function Attrs: nounwind uwtable
declare hidden zeroext i8 @XCrypt_ParseArgs(ptr noundef, i32 noundef, ptr noundef) #0

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

declare zeroext i8 @xstrused(ptr noundef) #2

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

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

declare void @XCrypt_Init(ptr noundef, i8 noundef zeroext, ptr noundef, ptr noundef, ptr noundef) #2

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

declare void @XByteBuffer_Clear(ptr noundef) #2

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

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

; Function Attrs: nounwind uwtable
declare hidden void @XCrypt_Print(ptr noundef, ptr noundef, i64 noundef) #0

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(none) "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(none) }

!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 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !7, i64 22536}
!12 = !{!"", !7, i64 0, !7, i64 4096, !7, i64 6144, !7, i64 8192, !7, i64 10240, !7, i64 14336, !7, i64 18432, !13, i64 22528, !7, i64 22536, !7, i64 22537, !7, i64 22538, !7, i64 22539, !7, i64 22540}
!13 = !{!"long", !7, i64 0}
!14 = !{!15, !13, i64 24}
!15 = !{!"XCryptCtx", !10, i64 0, !10, i64 8, !7, i64 16, !13, i64 24, !10, i64 32}
!16 = !{!17, !13, i64 16}
!17 = !{!"XByteBuffer", !10, i64 0, !13, i64 8, !13, i64 16, !18, i64 24, !18, i64 26, !6, i64 28}
!18 = !{!"short", !7, i64 0}
!19 = !{!13, !13, i64 0}
!20 = !{!17, !10, i64 0}


; 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.xcrypt_args_t = type { [4096 x i8], [2048 x i8], [2048 x i8], [2048 x i8], [4096 x i8], [4096 x i8], [4096 x i8], i64, i8, i8, i8, i8, i8 }
%struct.XByteBuffer = type { ptr, i64, i64, i16, i16, i32 }
%struct.XCryptCtx = type { ptr, ptr, i8, i64, ptr }

@.str.1 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [36 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local zeroext i8 @XCrypt_Callback(i32 noundef, ptr noundef, ptr noundef) #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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

declare void @XLog_Display(i32 noundef, i8 noundef zeroext, ptr noundef, ...) local_unnamed_addr #2

; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none)
declare ptr @__errno_location() local_unnamed_addr #3

; Function Attrs: nounwind uwtable
define dso_local range(i32 -1, 1) i32 @main(i32 noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = alloca %struct.xcrypt_args_t, align 8
  %4 = alloca %struct.XByteBuffer, align 8
  %5 = alloca %struct.XCryptCtx, align 8
  %6 = alloca i64, align 8
  tail call void @XLog_Init(ptr noundef null, i16 noundef zeroext 203, i8 noundef zeroext 0) #5
  tail call void @XLog_FlagEnable(i32 noundef 4) #5
  call void @llvm.lifetime.start.p0(i64 22544, ptr nonnull %3) #5
  %7 = call zeroext i8 @XCrypt_ParseArgs(ptr noundef nonnull %3, i32 noundef %0, ptr noundef %1)
  %.not = icmp eq i8 %7, 0
  br i1 %.not, label %53, label %8

8:                                                ; preds = %2
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #5
  %9 = call i32 @XByteBuffer_Init(ptr noundef nonnull %4, i64 noundef 0, i32 noundef 0) #5
  %10 = getelementptr inbounds i8, ptr %3, i64 8192
  %11 = call zeroext i8 @xstrused(ptr noundef nonnull %10) #5
  %.not8 = icmp eq i8 %11, 0
  br i1 %.not8, label %17, label %12

12:                                               ; preds = %8
  %13 = call i64 @XPath_LoadBuffer(ptr noundef nonnull %10, ptr noundef nonnull %4) #5
  %.not9 = icmp eq i64 %13, 0
  br i1 %.not9, label %14, label %17

14:                                               ; preds = %12
  %15 = tail call ptr @__errno_location() #6
  %16 = load i32, ptr %15, align 4, !tbaa !5
  call void (i32, i8, ptr, ...) @XLog_Display(i32 noundef 64, i8 noundef zeroext 1, ptr noundef nonnull @.str.1, ptr noundef nonnull %10, i32 noundef %16) #5
  br label %52

17:                                               ; preds = %12, %8
  %18 = call zeroext i8 @xstrused(ptr noundef nonnull %10) #5
  %.not10 = icmp eq i8 %18, 0
  br i1 %.not10, label %19, label %26

19:                                               ; preds = %17
  %20 = getelementptr inbounds i8, ptr %3, i64 10240
  %21 = call i32 (ptr, ptr, ...) @XByteBuffer_AddFmt(ptr noundef nonnull %4, ptr noundef nonnull @.str.2, ptr noundef nonnull %20) #5
  %22 = icmp slt i32 %21, 1
  br i1 %22, label %23, label %26

23:                                               ; preds = %19
  %24 = tail call ptr @__errno_location() #6
  %25 = load i32, ptr %24, align 4, !tbaa !5
  call void (i32, i8, ptr, ...) @XLog_Display(i32 noundef 64, i8 noundef zeroext 1, ptr noundef nonnull @.str.3, i32 noundef %25) #5
  br label %52

26:                                               ; preds = %17, %19
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %5) #5
  %27 = getelementptr inbounds i8, ptr %3, i64 22536
  %28 = load i8, ptr %27, align 8, !tbaa !9
  %29 = getelementptr inbounds i8, ptr %3, i64 4096
  call void @XCrypt_Init(ptr noundef nonnull %5, i8 noundef zeroext %28, ptr noundef nonnull %29, ptr noundef nonnull @XCrypt_Callback, ptr noundef nonnull %3) #5
  %30 = getelementptr inbounds i8, ptr %5, i64 24
  store i64 16, ptr %30, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  %31 = getelementptr inbounds i8, ptr %4, i64 16
  %32 = load i64, ptr %31, align 8, !tbaa !15
  store i64 %32, ptr %6, align 8, !tbaa !18
  %33 = load ptr, ptr %4, align 8, !tbaa !19
  %34 = call ptr @XCrypt_Multy(ptr noundef nonnull %5, ptr noundef %33, ptr noundef nonnull %6) #5
  %35 = icmp eq ptr %34, null
  br i1 %35, label %36, label %39

36:                                               ; preds = %26
  %37 = load i8, ptr %27, align 8, !tbaa !9
  %.not12 = icmp eq i8 %37, 0
  %38 = select i1 %.not12, ptr @.str.6, ptr @.str.5
  call void (i32, i8, ptr, ...) @XLog_Display(i32 noundef 64, i8 noundef zeroext 1, ptr noundef nonnull @.str.4, ptr noundef nonnull %38, ptr noundef nonnull %29) #5
  call void @XByteBuffer_Clear(ptr noundef nonnull %4) #5
  br label %51

39:                                               ; preds = %26
  %40 = getelementptr inbounds i8, ptr %3, i64 6144
  %41 = call zeroext i8 @xstrused(ptr noundef nonnull %40) #5
  %.not11 = icmp eq i8 %41, 0
  br i1 %.not11, label %49, label %42

42:                                               ; preds = %39
  %43 = load i64, ptr %6, align 8, !tbaa !18
  %44 = call i32 @XPath_Write(ptr noundef nonnull %40, ptr noundef nonnull %34, i64 noundef %43, ptr noundef nonnull @.str.7) #5
  %45 = icmp slt i32 %44, 1
  br i1 %45, label %46, label %49

46:                                               ; preds = %42
  %47 = tail call ptr @__errno_location() #6
  %48 = load i32, ptr %47, align 4, !tbaa !5
  call void (i32, i8, ptr, ...) @XLog_Display(i32 noundef 64, i8 noundef zeroext 1, ptr noundef nonnull @.str.8, ptr noundef nonnull %40, i32 noundef %48) #5
  call void @XByteBuffer_Clear(ptr noundef nonnull %4) #5
  call void @free(ptr noundef nonnull %34) #5
  br label %51

49:                                               ; preds = %42, %39
  %50 = load i64, ptr %6, align 8, !tbaa !18
  call void @XCrypt_Print(ptr noundef nonnull %3, ptr noundef nonnull %34, i64 noundef %50)
  call void @XByteBuffer_Clear(ptr noundef nonnull %4) #5
  call void @free(ptr noundef nonnull %34) #5
  br label %51

51:                                               ; preds = %49, %46, %36
  %.0 = phi i32 [ -1, %36 ], [ -1, %46 ], [ 0, %49 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %5) #5
  br label %52

52:                                               ; preds = %51, %23, %14
  %.1 = phi i32 [ %.0, %51 ], [ -1, %23 ], [ -1, %14 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #5
  br label %53

53:                                               ; preds = %2, %52
  %.2 = phi i32 [ %.1, %52 ], [ -1, %2 ]
  call void @llvm.lifetime.end.p0(i64 22544, ptr nonnull %3) #5
  ret i32 %.2
}

declare void @XLog_Init(ptr noundef, i16 noundef zeroext, i8 noundef zeroext) local_unnamed_addr #2

declare void @XLog_FlagEnable(i32 noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare hidden zeroext i8 @XCrypt_ParseArgs(ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

declare i32 @XByteBuffer_Init(ptr noundef, i64 noundef, i32 noundef) local_unnamed_addr #2

declare zeroext i8 @xstrused(ptr noundef) local_unnamed_addr #2

declare i64 @XPath_LoadBuffer(ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @XByteBuffer_AddFmt(ptr noundef, ptr noundef, ...) local_unnamed_addr #2

declare void @XCrypt_Init(ptr noundef, i8 noundef zeroext, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare ptr @XCrypt_Multy(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare void @XByteBuffer_Clear(ptr noundef) local_unnamed_addr #2

declare i32 @XPath_Write(ptr noundef, ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

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

; Function Attrs: nounwind uwtable
declare hidden void @XCrypt_Print(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

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 = { mustprogress 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 = { mustprogress nofree nosync nounwind willreturn memory(none) "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 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 #5 = { nounwind }
attributes #6 = { nounwind willreturn memory(none) }

!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 = !{!10, !7, i64 22536}
!10 = !{!"", !7, i64 0, !7, i64 4096, !7, i64 6144, !7, i64 8192, !7, i64 10240, !7, i64 14336, !7, i64 18432, !11, i64 22528, !7, i64 22536, !7, i64 22537, !7, i64 22538, !7, i64 22539, !7, i64 22540}
!11 = !{!"long", !7, i64 0}
!12 = !{!13, !11, i64 24}
!13 = !{!"XCryptCtx", !14, i64 0, !14, i64 8, !7, i64 16, !11, i64 24, !14, i64 32}
!14 = !{!"any pointer", !7, i64 0}
!15 = !{!16, !11, i64 16}
!16 = !{!"XByteBuffer", !14, i64 0, !11, i64 8, !11, i64 16, !17, i64 24, !17, i64 26, !6, i64 28}
!17 = !{!"short", !7, i64 0}
!18 = !{!11, !11, i64 0}
!19 = !{!16, !14, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass