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

; 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.xapi_data_ = type { [128 x i8], [128 x i8], [2048 x i8], i16, %struct.XSocket, i32, i8, i8, i8, i8, i8, i8, %struct.XByteBuffer, %struct.XByteBuffer, ptr, i32, i32, ptr, ptr, ptr }
%struct.XSocket = type { i32, %union.xsock_addr_t, i32, i32, i16, i32, i32, i32, i32, ptr }
%union.xsock_addr_t = type { %struct.sockaddr_in, [96 x i8] }
%struct.sockaddr_in = type { i16, i16, %struct.in_addr, [8 x i8] }
%struct.in_addr = type { i32 }
%struct.XByteBuffer = type { ptr, i64, i64, i16, i16, i32 }
%struct.xapi_ = type { ptr, %struct.XEvents, i64, ptr, i8, i8, i8 }
%struct.XEvents = type { ptr, i32, ptr, ptr, i32, i32, i8, %struct.XHash }
%struct.XHash = type { ptr, ptr, i64, [32 x %struct.xlist] }
%struct.xlist = type { ptr, ptr, %struct.xlist_data, i8 }
%struct.xlist_data = type { ptr, ptr, ptr, i64 }
%struct.xmon_args_ = type { ptr, i8, i8, i8, i8, [4096 x i8], [4096 x i8], [256 x i8], [256 x i8], [2048 x i8], [2048 x i8], i64, i16, i16, i16, i8, i32 }
%struct.xhttp_ = type { ptr, i16, ptr, i32, %struct.XByteBuffer, i32, %struct.XMap, i16, i16, i64, i64, i64, i64, i64, i8, i8, i8, [256 x i8], [128 x i8], [2048 x i8] }
%struct.XMap = type { ptr, ptr, ptr, i64, i64, i32 }

@.str.102 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.121 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.135 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.167 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.168 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.169 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.170 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.171 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.172 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.173 = external hidden unnamed_addr constant [40 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

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

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

; Function Attrs: nounwind willreturn memory(read)
declare i32 @strncmp(ptr noundef, ptr noundef, i64 noundef) #2

declare void @XArray_Destroy(ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local i32 @XTOPApp_HandleRequest(ptr noundef %0, ptr noundef %1) #3 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = 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) #4
  %14 = load ptr, ptr %5, align 8, !tbaa !5
  %15 = getelementptr inbounds %struct.xapi_data_, ptr %14, i32 0, i32 17
  %16 = load ptr, ptr %15, align 8, !tbaa !9
  %17 = getelementptr inbounds %struct.xapi_, ptr %16, i32 0, i32 3
  %18 = load ptr, ptr %17, align 8, !tbaa !16
  store ptr %18, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  %19 = load ptr, ptr %5, align 8, !tbaa !5
  %20 = load ptr, ptr %6, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.xmon_args_, ptr %20, i32 0, i32 9
  %22 = getelementptr inbounds [2048 x i8], ptr %21, i64 0, i64 0
  %23 = load ptr, ptr %6, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.xmon_args_, ptr %23, i32 0, i32 10
  %25 = getelementptr inbounds [2048 x i8], ptr %24, i64 0, i64 0
  %26 = call i32 @XAPI_AuthorizeHTTP(ptr noundef %19, ptr noundef %22, ptr noundef %25)
  store i32 %26, ptr %7, align 4, !tbaa !20
  %27 = load i32, ptr %7, align 4, !tbaa !20
  %28 = icmp sle i32 %27, 0
  br i1 %28, label %29, label %31

29:                                               ; preds = %2
  %30 = load i32, ptr %7, align 4, !tbaa !20
  store i32 %30, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %133

31:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %32 = load ptr, ptr %5, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.xapi_data_, ptr %32, i32 0, i32 18
  %34 = load ptr, ptr %33, align 8, !tbaa !21
  store ptr %34, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %35 = load ptr, ptr %5, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.xapi_data_, ptr %35, i32 0, i32 19
  %37 = load ptr, ptr %36, align 8, !tbaa !22
  store ptr %37, ptr %10, align 8, !tbaa !5
  %38 = load ptr, ptr %9, align 8, !tbaa !5
  store i32 0, ptr %38, align 4, !tbaa !20
  %39 = load ptr, ptr %5, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.xapi_data_, ptr %39, i32 0, i32 4
  %41 = getelementptr inbounds %struct.XSocket, ptr %40, i32 0, i32 5
  %42 = load i32, ptr %41, align 8, !tbaa !23
  %43 = load ptr, ptr %10, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.xhttp_, ptr %43, i32 0, i32 3
  %45 = load i32, ptr %44, align 8, !tbaa !24
  %46 = call ptr @XHTTP_GetMethodStr(i32 noundef %45)
  %47 = load ptr, ptr %10, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.xhttp_, ptr %47, i32 0, i32 19
  %49 = getelementptr inbounds [2048 x i8], ptr %48, i64 0, i64 0
  call void (i32, i8, ptr, ...) @XLog_Display(i32 noundef 2, i8 noundef zeroext 1, ptr noundef @.str.167, i32 noundef %42, ptr noundef %46, ptr noundef %49)
  %50 = load ptr, ptr %10, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.xhttp_, ptr %50, i32 0, i32 3
  %52 = load i32, ptr %51, align 8, !tbaa !24
  %53 = icmp ne i32 %52, 2
  br i1 %53, label %54, label %61

54:                                               ; preds = %31
  %55 = load ptr, ptr %10, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.xhttp_, ptr %55, i32 0, i32 3
  %57 = load i32, ptr %56, align 8, !tbaa !24
  %58 = call ptr @XHTTP_GetMethodStr(i32 noundef %57)
  call void (i32, i8, ptr, ...) @XLog_Display(i32 noundef 8, i8 noundef zeroext 1, ptr noundef @.str.168, ptr noundef %58)
  %59 = load ptr, ptr %5, align 8, !tbaa !5
  %60 = call i32 @XAPI_RespondHTTP(ptr noundef %59, i32 noundef 405, i32 noundef 0)
  store i32 %60, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %132

61:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  %62 = load ptr, ptr %10, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.xhttp_, ptr %62, i32 0, i32 19
  %64 = getelementptr inbounds [2048 x i8], ptr %63, i64 0, i64 0
  %65 = call ptr @xstrsplit(ptr noundef %64, ptr noundef @.str.169)
  store ptr %65, ptr %11, align 8, !tbaa !5
  %66 = load ptr, ptr %11, align 8, !tbaa !5
  %67 = icmp eq ptr %66, null
  br i1 %67, label %68, label %74

68:                                               ; preds = %61
  %69 = load ptr, ptr %10, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.xhttp_, ptr %69, i32 0, i32 19
  %71 = getelementptr inbounds [2048 x i8], ptr %70, i64 0, i64 0
  call void (i32, i8, ptr, ...) @XLog_Display(i32 noundef 8, i8 noundef zeroext 1, ptr noundef @.str.170, ptr noundef %71)
  %72 = load ptr, ptr %5, align 8, !tbaa !5
  %73 = call i32 @XAPI_RespondHTTP(ptr noundef %72, i32 noundef 400, i32 noundef 0)
  store i32 %73, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %131

74:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %75 = load ptr, ptr %11, align 8, !tbaa !5
  %76 = call ptr @XArray_GetData(ptr noundef %75, i64 noundef 0)
  store ptr %76, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %77 = load ptr, ptr %11, align 8, !tbaa !5
  %78 = call ptr @XArray_GetData(ptr noundef %77, i64 noundef 1)
  store ptr %78, ptr %13, align 8, !tbaa !5
  %79 = load ptr, ptr %12, align 8, !tbaa !5
  %80 = icmp ne ptr %79, null
  br i1 %80, label %81, label %116

81:                                               ; preds = %74
  %82 = load ptr, ptr %13, align 8, !tbaa !5
  %83 = icmp ne ptr %82, null
  br i1 %83, label %84, label %116

84:                                               ; preds = %81
  %85 = load ptr, ptr %12, align 8, !tbaa !5
  %86 = call i32 @strncmp(ptr noundef %85, ptr noundef @.str.171, i64 noundef 3) #5
  %87 = icmp ne i32 %86, 0
  br i1 %87, label %116, label %88

88:                                               ; preds = %84
  %89 = load ptr, ptr %13, align 8, !tbaa !5
  %90 = call i32 @strncmp(ptr noundef %89, ptr noundef @.str.172, i64 noundef 3) #5
  %91 = icmp ne i32 %90, 0
  br i1 %91, label %94, label %92

92:                                               ; preds = %88
  %93 = load ptr, ptr %9, align 8, !tbaa !5
  store i32 4, ptr %93, align 4, !tbaa !20
  br label %115

94:                                               ; preds = %88
  %95 = load ptr, ptr %13, align 8, !tbaa !5
  %96 = call i32 @strncmp(ptr noundef %95, ptr noundef @.str.102, i64 noundef 3) #5
  %97 = icmp ne i32 %96, 0
  br i1 %97, label %100, label %98

98:                                               ; preds = %94
  %99 = load ptr, ptr %9, align 8, !tbaa !5
  store i32 3, ptr %99, align 4, !tbaa !20
  br label %114

100:                                              ; preds = %94
  %101 = load ptr, ptr %13, align 8, !tbaa !5
  %102 = call i32 @strncmp(ptr noundef %101, ptr noundef @.str.121, i64 noundef 6) #5
  %103 = icmp ne i32 %102, 0
  br i1 %103, label %106, label %104

104:                                              ; preds = %100
  %105 = load ptr, ptr %9, align 8, !tbaa !5
  store i32 2, ptr %105, align 4, !tbaa !20
  br label %113

106:                                              ; preds = %100
  %107 = load ptr, ptr %13, align 8, !tbaa !5
  %108 = call i32 @strncmp(ptr noundef %107, ptr noundef @.str.135, i64 noundef 7) #5
  %109 = icmp ne i32 %108, 0
  br i1 %109, label %112, label %110

110:                                              ; preds = %106
  %111 = load ptr, ptr %9, align 8, !tbaa !5
  store i32 1, ptr %111, align 4, !tbaa !20
  br label %112

112:                                              ; preds = %110, %106
  br label %113

113:                                              ; preds = %112, %104
  br label %114

114:                                              ; preds = %113, %98
  br label %115

115:                                              ; preds = %114, %92
  br label %116

116:                                              ; preds = %115, %84, %81, %74
  %117 = load ptr, ptr %11, align 8, !tbaa !5
  call void @XArray_Destroy(ptr noundef %117)
  %118 = load ptr, ptr %9, align 8, !tbaa !5
  %119 = load i32, ptr %118, align 4, !tbaa !20
  %120 = icmp eq i32 %119, 0
  br i1 %120, label %121, label %127

121:                                              ; preds = %116
  %122 = load ptr, ptr %10, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.xhttp_, ptr %122, i32 0, i32 19
  %124 = getelementptr inbounds [2048 x i8], ptr %123, i64 0, i64 0
  call void (i32, i8, ptr, ...) @XLog_Display(i32 noundef 8, i8 noundef zeroext 1, ptr noundef @.str.173, ptr noundef %124)
  %125 = load ptr, ptr %5, align 8, !tbaa !5
  %126 = call i32 @XAPI_RespondHTTP(ptr noundef %125, i32 noundef 404, i32 noundef 0)
  store i32 %126, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %130

127:                                              ; preds = %116
  %128 = load ptr, ptr %5, align 8, !tbaa !5
  %129 = call i32 @XAPI_EnableEvent(ptr noundef %128, i32 noundef 4)
  store i32 %129, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %130

130:                                              ; preds = %127, %121
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  br label %131

131:                                              ; preds = %130, %68
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  br label %132

132:                                              ; preds = %131, %54
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  br label %133

133:                                              ; preds = %132, %29
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  %134 = load i32, ptr %3, align 4
  ret i32 %134
}

declare i32 @XAPI_AuthorizeHTTP(ptr noundef, ptr noundef, ptr noundef) #1

declare ptr @XHTTP_GetMethodStr(i32 noundef) #1

declare i32 @XAPI_RespondHTTP(ptr noundef, i32 noundef, i32 noundef) #1

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

declare i32 @XAPI_EnableEvent(ptr noundef, i32 noundef) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #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 = { 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, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 2560}
!10 = !{!"xapi_data_", !7, i64 0, !7, i64 128, !7, i64 256, !11, i64 2304, !12, i64 2312, !13, i64 2464, !7, i64 2468, !7, i64 2469, !7, i64 2470, !7, i64 2471, !7, i64 2472, !7, i64 2473, !14, i64 2480, !14, i64 2512, !6, i64 2544, !13, i64 2552, !13, i64 2556, !6, i64 2560, !6, i64 2568, !6, i64 2576}
!11 = !{!"short", !7, i64 0}
!12 = !{!"XSocket", !13, i64 0, !7, i64 4, !13, i64 116, !13, i64 120, !11, i64 124, !13, i64 128, !13, i64 132, !13, i64 136, !13, i64 140, !6, i64 144}
!13 = !{!"int", !7, i64 0}
!14 = !{!"XByteBuffer", !6, i64 0, !15, i64 8, !15, i64 16, !11, i64 24, !11, i64 26, !13, i64 28}
!15 = !{!"long", !7, i64 0}
!16 = !{!17, !6, i64 1880}
!17 = !{!"xapi_", !6, i64 0, !18, i64 8, !15, i64 1872, !6, i64 1880, !7, i64 1888, !7, i64 1889, !7, i64 1890}
!18 = !{!"XEvents", !6, i64 0, !13, i64 8, !6, i64 16, !6, i64 24, !13, i64 32, !13, i64 36, !7, i64 40, !19, i64 48}
!19 = !{!"XHash", !6, i64 0, !6, i64 8, !15, i64 16, !7, i64 24}
!20 = !{!13, !13, i64 0}
!21 = !{!10, !6, i64 2568}
!22 = !{!10, !6, i64 2576}
!23 = !{!10, !13, i64 2440}
!24 = !{!25, !13, i64 24}
!25 = !{!"xhttp_", !6, i64 0, !11, i64 8, !6, i64 16, !13, i64 24, !14, i64 32, !13, i64 64, !26, i64 72, !11, i64 120, !11, i64 122, !15, i64 128, !15, i64 136, !15, i64 144, !15, i64 152, !15, i64 160, !7, i64 168, !7, i64 169, !7, i64 170, !7, i64 171, !7, i64 427, !7, i64 555}
!26 = !{!"XMap", !6, i64 0, !6, i64 8, !6, i64 16, !15, i64 24, !15, i64 32, !13, i64 40}


; 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.102 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.121 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.135 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.167 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.168 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.169 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.170 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.171 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.172 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.173 = external hidden unnamed_addr constant [40 x i8], align 1

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

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i32 @strncmp(ptr nocapture noundef, ptr nocapture noundef, i64 noundef) local_unnamed_addr #1

declare void @XArray_Destroy(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local i32 @XTOPApp_HandleRequest(ptr nocapture noundef readnone %0, ptr noundef %1) local_unnamed_addr #2 {
  %3 = getelementptr inbounds i8, ptr %1, i64 2560
  %4 = load ptr, ptr %3, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %4, i64 1880
  %6 = load ptr, ptr %5, align 8, !tbaa !15
  %7 = getelementptr inbounds i8, ptr %6, i64 8716
  %8 = getelementptr inbounds i8, ptr %6, i64 10764
  %9 = tail call i32 @XAPI_AuthorizeHTTP(ptr noundef %1, ptr noundef nonnull %7, ptr noundef nonnull %8) #3
  %10 = icmp slt i32 %9, 1
  br i1 %10, label %53, label %11

11:                                               ; preds = %2
  %12 = getelementptr inbounds i8, ptr %1, i64 2568
  %13 = load ptr, ptr %12, align 8, !tbaa !19
  %14 = getelementptr inbounds i8, ptr %1, i64 2576
  %15 = load ptr, ptr %14, align 8, !tbaa !20
  store i32 0, ptr %13, align 4, !tbaa !21
  %16 = getelementptr inbounds i8, ptr %1, i64 2440
  %17 = load i32, ptr %16, align 8, !tbaa !22
  %18 = getelementptr inbounds i8, ptr %15, i64 24
  %19 = load i32, ptr %18, align 8, !tbaa !23
  %20 = tail call ptr @XHTTP_GetMethodStr(i32 noundef %19) #3
  %21 = getelementptr inbounds i8, ptr %15, i64 555
  tail call void (i32, i8, ptr, ...) @XLog_Display(i32 noundef 2, i8 noundef zeroext 1, ptr noundef nonnull @.str.167, i32 noundef %17, ptr noundef %20, ptr noundef nonnull %21) #3
  %22 = load i32, ptr %18, align 8, !tbaa !23
  %.not = icmp eq i32 %22, 2
  br i1 %.not, label %26, label %23

23:                                               ; preds = %11
  %24 = tail call ptr @XHTTP_GetMethodStr(i32 noundef %22) #3
  tail call void (i32, i8, ptr, ...) @XLog_Display(i32 noundef 8, i8 noundef zeroext 1, ptr noundef nonnull @.str.168, ptr noundef %24) #3
  %25 = tail call i32 @XAPI_RespondHTTP(ptr noundef nonnull %1, i32 noundef 405, i32 noundef 0) #3
  br label %53

26:                                               ; preds = %11
  %27 = tail call ptr @xstrsplit(ptr noundef nonnull %21, ptr noundef nonnull @.str.169) #3
  %28 = icmp eq ptr %27, null
  br i1 %28, label %29, label %31

29:                                               ; preds = %26
  tail call void (i32, i8, ptr, ...) @XLog_Display(i32 noundef 8, i8 noundef zeroext 1, ptr noundef nonnull @.str.170, ptr noundef nonnull %21) #3
  %30 = tail call i32 @XAPI_RespondHTTP(ptr noundef nonnull %1, i32 noundef 400, i32 noundef 0) #3
  br label %53

31:                                               ; preds = %26
  %32 = tail call ptr @XArray_GetData(ptr noundef nonnull %27, i64 noundef 0) #3
  %33 = tail call ptr @XArray_GetData(ptr noundef nonnull %27, i64 noundef 1) #3
  %34 = icmp ne ptr %32, null
  %35 = icmp ne ptr %33, null
  %or.cond = select i1 %34, i1 %35, i1 false
  br i1 %or.cond, label %36, label %46

36:                                               ; preds = %31
  %37 = tail call i32 @strncmp(ptr noundef nonnull dereferenceable(1) %32, ptr noundef nonnull dereferenceable(1) @.str.171, i64 noundef 3) #4
  %.not43 = icmp eq i32 %37, 0
  br i1 %.not43, label %38, label %46

38:                                               ; preds = %36
  %39 = tail call i32 @strncmp(ptr noundef nonnull dereferenceable(1) %33, ptr noundef nonnull dereferenceable(1) @.str.172, i64 noundef 3) #4
  %.not44 = icmp eq i32 %39, 0
  br i1 %.not44, label %.sink.split, label %40

40:                                               ; preds = %38
  %41 = tail call i32 @strncmp(ptr noundef nonnull dereferenceable(1) %33, ptr noundef nonnull dereferenceable(1) @.str.102, i64 noundef 3) #4
  %.not45 = icmp eq i32 %41, 0
  br i1 %.not45, label %.sink.split, label %42

42:                                               ; preds = %40
  %43 = tail call i32 @strncmp(ptr noundef nonnull dereferenceable(1) %33, ptr noundef nonnull dereferenceable(1) @.str.121, i64 noundef 6) #4
  %.not46 = icmp eq i32 %43, 0
  br i1 %.not46, label %.sink.split, label %44

44:                                               ; preds = %42
  %45 = tail call i32 @strncmp(ptr noundef nonnull dereferenceable(1) %33, ptr noundef nonnull dereferenceable(1) @.str.135, i64 noundef 7) #4
  %.not47 = icmp eq i32 %45, 0
  br i1 %.not47, label %.sink.split, label %46

.sink.split:                                      ; preds = %44, %42, %40, %38
  %.sink = phi i32 [ 4, %38 ], [ 3, %40 ], [ 2, %42 ], [ 1, %44 ]
  store i32 %.sink, ptr %13, align 4, !tbaa !21
  br label %46

46:                                               ; preds = %.sink.split, %44, %36, %31
  tail call void @XArray_Destroy(ptr noundef nonnull %27) #3
  %47 = load i32, ptr %13, align 4, !tbaa !21
  %48 = icmp eq i32 %47, 0
  br i1 %48, label %49, label %51

49:                                               ; preds = %46
  tail call void (i32, i8, ptr, ...) @XLog_Display(i32 noundef 8, i8 noundef zeroext 1, ptr noundef nonnull @.str.173, ptr noundef nonnull %21) #3
  %50 = tail call i32 @XAPI_RespondHTTP(ptr noundef nonnull %1, i32 noundef 404, i32 noundef 0) #3
  br label %53

51:                                               ; preds = %46
  %52 = tail call i32 @XAPI_EnableEvent(ptr noundef nonnull %1, i32 noundef 4) #3
  br label %53

53:                                               ; preds = %23, %49, %51, %29, %2
  %.3 = phi i32 [ %9, %2 ], [ %25, %23 ], [ %30, %29 ], [ %50, %49 ], [ %52, %51 ]
  ret i32 %.3
}

declare i32 @XAPI_AuthorizeHTTP(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

declare ptr @XHTTP_GetMethodStr(i32 noundef) local_unnamed_addr #0

declare i32 @XAPI_RespondHTTP(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

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

declare i32 @XAPI_EnableEvent(ptr noundef, i32 noundef) local_unnamed_addr #0

attributes #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 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 #2 = { 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 #3 = { nounwind }
attributes #4 = { 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, !12, i64 2560}
!6 = !{!"xapi_data_", !7, i64 0, !7, i64 128, !7, i64 256, !9, i64 2304, !10, i64 2312, !11, i64 2464, !7, i64 2468, !7, i64 2469, !7, i64 2470, !7, i64 2471, !7, i64 2472, !7, i64 2473, !13, i64 2480, !13, i64 2512, !12, i64 2544, !11, i64 2552, !11, i64 2556, !12, i64 2560, !12, i64 2568, !12, i64 2576}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!"short", !7, i64 0}
!10 = !{!"XSocket", !11, i64 0, !7, i64 4, !11, i64 116, !11, i64 120, !9, i64 124, !11, i64 128, !11, i64 132, !11, i64 136, !11, i64 140, !12, i64 144}
!11 = !{!"int", !7, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!"XByteBuffer", !12, i64 0, !14, i64 8, !14, i64 16, !9, i64 24, !9, i64 26, !11, i64 28}
!14 = !{!"long", !7, i64 0}
!15 = !{!16, !12, i64 1880}
!16 = !{!"xapi_", !12, i64 0, !17, i64 8, !14, i64 1872, !12, i64 1880, !7, i64 1888, !7, i64 1889, !7, i64 1890}
!17 = !{!"XEvents", !12, i64 0, !11, i64 8, !12, i64 16, !12, i64 24, !11, i64 32, !11, i64 36, !7, i64 40, !18, i64 48}
!18 = !{!"XHash", !12, i64 0, !12, i64 8, !14, i64 16, !7, i64 24}
!19 = !{!6, !12, i64 2568}
!20 = !{!6, !12, i64 2576}
!21 = !{!11, !11, i64 0}
!22 = !{!6, !11, i64 2440}
!23 = !{!24, !11, i64 24}
!24 = !{!"xhttp_", !12, i64 0, !9, i64 8, !12, i64 16, !11, i64 24, !13, i64 32, !11, i64 64, !25, i64 72, !9, i64 120, !9, i64 122, !14, i64 128, !14, i64 136, !14, i64 144, !14, i64 152, !14, i64 160, !7, i64 168, !7, i64 169, !7, i64 170, !7, i64 171, !7, i64 427, !7, i64 555}
!25 = !{!"XMap", !12, i64 0, !12, i64 8, !12, i64 16, !14, i64 24, !14, i64 32, !11, i64 40}


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