; LLVM IR from ohler55/agoo :: ext/agoo (server)

; 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._agooServer = type { i8, i8, i32, i8, i8, i8, i8, i64, %struct._agooQueue, ptr, ptr, ptr, %struct._agooQueue, ptr, i32, i32, %struct._agooAtom, ptr, ptr, %union.pthread_mutex_t, i32, ptr, ptr, %struct._agooAtom }
%struct._agooQueue = type { ptr, ptr, %struct._agooAtom, %struct._agooAtom, i8, i8, %struct._agooAtom, %struct._agooAtom, %struct._agooAtom, i32, i32 }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%struct._agooAtom = type { ptr, %union.pthread_mutex_t }
%struct._agooLogCat = type { ptr, [32 x i8], ptr, i32, i8 }
%struct._agooConLoop = type { ptr, %struct._agooQueue, i64, i32, ptr, ptr, %union.pthread_mutex_t }
%struct._agooHook = type { ptr, i32, ptr, i32, %union.anon.1, ptr, i8 }
%union.anon.1 = type { ptr }
%struct._agooBind = type { ptr, i32, i32, i16, %union.anon, ptr, ptr, ptr, ptr, ptr, i32 }
%union.anon = type { %struct.in6_addr }
%struct.in6_addr = type { %union.anon.0 }
%union.anon.0 = type { [4 x i32] }

@agoo_server = external dso_local global %struct._agooServer, align 8
@agoo_info_cat = external global %struct._agooLogCat, align 8
@.str.2 = external hidden unnamed_addr constant [30 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 double @dtime() #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @atomic_load(ptr noundef) #2

declare double @dsleep(double noundef) #1

declare void @agoo_log_cat(ptr noundef, ptr noundef, ...) #1

; Function Attrs: nounwind
declare i32 @getpid() #3

; Function Attrs: nounwind uwtable
define dso_local void @agoo_server_shutdown(ptr noundef %0, ptr noundef %1) #4 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca double, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %9 = load volatile i8, ptr @agoo_server, align 8, !tbaa !9, !range !16, !noundef !17
  %10 = trunc i8 %9 to i1
  br i1 %10, label %11, label %82

11:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %12 = load ptr, ptr %3, align 8, !tbaa !5
  %13 = call i32 @getpid() #5
  call void (ptr, ptr, ...) @agoo_log_cat(ptr noundef @agoo_info_cat, ptr noundef @.str.2, ptr noundef %12, i32 noundef %13)
  store volatile i8 0, ptr @agoo_server, align 8, !tbaa !9
  %14 = load volatile i8, ptr getelementptr inbounds (%struct._agooServer, ptr @agoo_server, i32 0, i32 1), align 1, !tbaa !18, !range !16, !noundef !17
  %15 = trunc i8 %14 to i1
  br i1 %15, label %16, label %62

16:                                               ; preds = %11
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %17 = call double @dtime()
  %18 = fadd double %17, 1.000000e+00
  store double %18, ptr %6, align 8, !tbaa !19
  store volatile i8 0, ptr getelementptr inbounds (%struct._agooServer, ptr @agoo_server, i32 0, i32 1), align 1, !tbaa !18
  %19 = load i64, ptr getelementptr inbounds (%struct._agooServer, ptr @agoo_server, i32 0, i32 7), align 8, !tbaa !21
  %20 = call i32 @pthread_detach(i64 noundef %19) #5
  %21 = load ptr, ptr getelementptr inbounds (%struct._agooServer, ptr @agoo_server, i32 0, i32 13), align 8, !tbaa !22
  store ptr %21, ptr %5, align 8, !tbaa !5
  br label %22

22:                                               ; preds = %30, %16
  %23 = load ptr, ptr %5, align 8, !tbaa !5
  %24 = icmp ne ptr null, %23
  br i1 %24, label %25, label %34

25:                                               ; preds = %22
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct._agooConLoop, ptr %26, i32 0, i32 2
  %28 = load i64, ptr %27, align 8, !tbaa !23
  %29 = call i32 @pthread_detach(i64 noundef %28) #5
  br label %30

30:                                               ; preds = %25
  %31 = load ptr, ptr %5, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct._agooConLoop, ptr %31, i32 0, i32 0
  %33 = load ptr, ptr %32, align 8, !tbaa !25
  store ptr %33, ptr %5, align 8, !tbaa !5
  br label %22, !llvm.loop !26

34:                                               ; preds = %22
  br label %35

35:                                               ; preds = %45, %34
  %36 = call ptr @atomic_load(ptr noundef getelementptr inbounds (%struct._agooServer, ptr @agoo_server, i32 0, i32 23))
  %37 = ptrtoint ptr %36 to i64
  %38 = icmp slt i64 0, %37
  br i1 %38, label %39, label %46

39:                                               ; preds = %35
  %40 = call double @dsleep(double noundef 1.000000e-01)
  %41 = load double, ptr %6, align 8, !tbaa !19
  %42 = call double @dtime()
  %43 = fcmp olt double %41, %42
  br i1 %43, label %44, label %45

44:                                               ; preds = %39
  br label %46

45:                                               ; preds = %39
  br label %35, !llvm.loop !28

46:                                               ; preds = %44, %35
  %47 = load ptr, ptr %4, align 8, !tbaa !5
  %48 = icmp ne ptr null, %47
  br i1 %48, label %49, label %51

49:                                               ; preds = %46
  %50 = load ptr, ptr %4, align 8, !tbaa !5
  call void (...) %50()
  br label %51

51:                                               ; preds = %49, %46
  br label %52

52:                                               ; preds = %55, %51
  %53 = load ptr, ptr getelementptr inbounds (%struct._agooServer, ptr @agoo_server, i32 0, i32 9), align 8, !tbaa !29
  %54 = icmp ne ptr null, %53
  br i1 %54, label %55, label %61

55:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %56 = load ptr, ptr getelementptr inbounds (%struct._agooServer, ptr @agoo_server, i32 0, i32 9), align 8, !tbaa !29
  store ptr %56, ptr %7, align 8, !tbaa !5
  %57 = load ptr, ptr %7, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct._agooHook, ptr %57, i32 0, i32 0
  %59 = load ptr, ptr %58, align 8, !tbaa !30
  store ptr %59, ptr getelementptr inbounds (%struct._agooServer, ptr @agoo_server, i32 0, i32 9), align 8, !tbaa !29
  %60 = load ptr, ptr %7, align 8, !tbaa !5
  call void @agoo_hook_destroy(ptr noundef %60)
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  br label %52, !llvm.loop !32

61:                                               ; preds = %52
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  br label %62

62:                                               ; preds = %61, %11
  br label %63

63:                                               ; preds = %66, %62
  %64 = load ptr, ptr getelementptr inbounds (%struct._agooServer, ptr @agoo_server, i32 0, i32 11), align 8, !tbaa !33
  %65 = icmp ne ptr null, %64
  br i1 %65, label %66, label %72

66:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %67 = load ptr, ptr getelementptr inbounds (%struct._agooServer, ptr @agoo_server, i32 0, i32 11), align 8, !tbaa !33
  store ptr %67, ptr %8, align 8, !tbaa !5
  %68 = load ptr, ptr %8, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct._agooBind, ptr %68, i32 0, i32 0
  %70 = load ptr, ptr %69, align 8, !tbaa !34
  store ptr %70, ptr getelementptr inbounds (%struct._agooServer, ptr @agoo_server, i32 0, i32 11), align 8, !tbaa !33
  %71 = load ptr, ptr %8, align 8, !tbaa !5
  call void @agoo_bind_destroy(ptr noundef %71)
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  br label %63, !llvm.loop !37

72:                                               ; preds = %63
  call void @agoo_queue_cleanup(ptr noundef getelementptr inbounds (%struct._agooServer, ptr @agoo_server, i32 0, i32 8))
  br label %73

73:                                               ; preds = %76, %72
  %74 = load ptr, ptr getelementptr inbounds (%struct._agooServer, ptr @agoo_server, i32 0, i32 13), align 8, !tbaa !22
  store ptr %74, ptr %5, align 8, !tbaa !5
  %75 = icmp ne ptr null, %74
  br i1 %75, label %76, label %81

76:                                               ; preds = %73
  %77 = load ptr, ptr %5, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct._agooConLoop, ptr %77, i32 0, i32 0
  %79 = load ptr, ptr %78, align 8, !tbaa !25
  store ptr %79, ptr getelementptr inbounds (%struct._agooServer, ptr @agoo_server, i32 0, i32 13), align 8, !tbaa !22
  %80 = load ptr, ptr %5, align 8, !tbaa !5
  call void @agoo_conloop_destroy(ptr noundef %80)
  br label %73, !llvm.loop !38

81:                                               ; preds = %73
  call void @agoo_queue_cleanup(ptr noundef getelementptr inbounds (%struct._agooServer, ptr @agoo_server, i32 0, i32 12))
  call void (...) @agoo_pages_cleanup()
  call void (...) @agoo_http_cleanup()
  call void (...) @agoo_domain_cleanup()
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  br label %82

82:                                               ; preds = %81, %2
  ret void
}

; Function Attrs: nounwind
declare i32 @pthread_detach(i64 noundef) #3

declare void @agoo_hook_destroy(ptr noundef) #1

declare void @agoo_bind_destroy(ptr noundef) #1

declare void @agoo_queue_cleanup(ptr noundef) #1

declare void @agoo_conloop_destroy(ptr noundef) #1

declare void @agoo_pages_cleanup(...) #1

declare void @agoo_http_cleanup(...) #1

declare void @agoo_domain_cleanup(...) #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 = { 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 #3 = { 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 #4 = { 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 #5 = { nounwind }

!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, !11, i64 0}
!10 = !{!"_agooServer", !11, i64 0, !11, i64 1, !12, i64 4, !11, i64 8, !11, i64 9, !11, i64 10, !11, i64 11, !13, i64 16, !14, i64 24, !6, i64 296, !6, i64 304, !6, i64 312, !14, i64 320, !6, i64 592, !12, i64 600, !12, i64 604, !15, i64 608, !6, i64 656, !6, i64 664, !7, i64 672, !12, i64 712, !6, i64 720, !6, i64 728, !15, i64 736}
!11 = !{!"_Bool", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!"long", !7, i64 0}
!14 = !{!"_agooQueue", !6, i64 0, !6, i64 8, !15, i64 16, !15, i64 64, !11, i64 112, !11, i64 113, !15, i64 120, !15, i64 168, !15, i64 216, !12, i64 264, !12, i64 268}
!15 = !{!"_agooAtom", !6, i64 0, !7, i64 8}
!16 = !{i8 0, i8 2}
!17 = !{}
!18 = !{!10, !11, i64 1}
!19 = !{!20, !20, i64 0}
!20 = !{!"double", !7, i64 0}
!21 = !{!10, !13, i64 16}
!22 = !{!10, !6, i64 592}
!23 = !{!24, !13, i64 280}
!24 = !{!"_agooConLoop", !6, i64 0, !14, i64 8, !13, i64 280, !12, i64 288, !6, i64 296, !6, i64 304, !7, i64 312}
!25 = !{!24, !6, i64 0}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = distinct !{!28, !27}
!29 = !{!10, !6, i64 296}
!30 = !{!31, !6, i64 0}
!31 = !{!"_agooHook", !6, i64 0, !12, i64 8, !6, i64 16, !12, i64 24, !7, i64 32, !6, i64 40, !11, i64 48}
!32 = distinct !{!32, !27}
!33 = !{!10, !6, i64 312}
!34 = !{!35, !6, i64 0}
!35 = !{!"_agooBind", !6, i64 0, !12, i64 8, !12, i64 12, !36, i64 16, !7, i64 20, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !12, i64 80}
!36 = !{!"short", !7, i64 0}
!37 = distinct !{!37, !27}
!38 = distinct !{!38, !27}


; 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._agooServer = type { i8, i8, i32, i8, i8, i8, i8, i64, %struct._agooQueue, ptr, ptr, ptr, %struct._agooQueue, ptr, i32, i32, %struct._agooAtom, ptr, ptr, %union.pthread_mutex_t, i32, ptr, ptr, %struct._agooAtom }
%struct._agooQueue = type { ptr, ptr, %struct._agooAtom, %struct._agooAtom, i8, i8, %struct._agooAtom, %struct._agooAtom, %struct._agooAtom, i32, i32 }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%struct._agooAtom = type { ptr, %union.pthread_mutex_t }
%struct._agooLogCat = type { ptr, [32 x i8], ptr, i32, i8 }

@agoo_server = external dso_local global %struct._agooServer, align 8
@agoo_info_cat = external global %struct._agooLogCat, align 8
@.str.2 = external hidden unnamed_addr constant [30 x i8], align 1

declare double @dtime() local_unnamed_addr #0

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @atomic_load(ptr noundef) local_unnamed_addr #1

declare double @dsleep(double noundef) local_unnamed_addr #0

declare void @agoo_log_cat(ptr noundef, ptr noundef, ...) local_unnamed_addr #0

; Function Attrs: nounwind
declare i32 @getpid() local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local void @agoo_server_shutdown(ptr noundef %0, ptr noundef readonly %1) local_unnamed_addr #3 {
  %3 = load volatile i8, ptr @agoo_server, align 8, !tbaa !5, !range !15, !noundef !16
  %4 = trunc nuw i8 %3 to i1
  br i1 %4, label %5, label %38

5:                                                ; preds = %2
  %6 = tail call i32 @getpid() #4
  tail call void (ptr, ptr, ...) @agoo_log_cat(ptr noundef nonnull @agoo_info_cat, ptr noundef nonnull @.str.2, ptr noundef %0, i32 noundef %6) #4
  store volatile i8 0, ptr @agoo_server, align 8, !tbaa !5
  %7 = load volatile i8, ptr getelementptr inbounds (i8, ptr @agoo_server, i64 1), align 1, !tbaa !17, !range !15, !noundef !16
  %8 = trunc nuw i8 %7 to i1
  br i1 %8, label %9, label %.loopexit

9:                                                ; preds = %5
  %10 = tail call double @dtime() #4
  %11 = fadd double %10, 1.000000e+00
  store volatile i8 0, ptr getelementptr inbounds (i8, ptr @agoo_server, i64 1), align 1, !tbaa !17
  %12 = load i64, ptr getelementptr inbounds (i8, ptr @agoo_server, i64 16), align 8, !tbaa !18
  %13 = tail call i32 @pthread_detach(i64 noundef %12) #4
  %.021 = load ptr, ptr getelementptr inbounds (i8, ptr @agoo_server, i64 592), align 8, !tbaa !19
  %.not22 = icmp eq ptr %.021, null
  br i1 %.not22, label %.preheader.preheader, label %.lr.ph

.lr.ph:                                           ; preds = %9, %.lr.ph
  %.023 = phi ptr [ %.0, %.lr.ph ], [ %.021, %9 ]
  %14 = getelementptr inbounds i8, ptr %.023, i64 280
  %15 = load i64, ptr %14, align 8, !tbaa !20
  %16 = tail call i32 @pthread_detach(i64 noundef %15) #4
  %.0 = load ptr, ptr %.023, align 8, !tbaa !19
  %.not = icmp eq ptr %.0, null
  br i1 %.not, label %.preheader.preheader, label %.lr.ph, !llvm.loop !22

.preheader.preheader:                             ; preds = %.lr.ph, %9
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %19
  %17 = tail call ptr @atomic_load(ptr noundef nonnull getelementptr inbounds (i8, ptr @agoo_server, i64 736))
  %18 = icmp sgt ptr %17, null
  br i1 %18, label %19, label %23

19:                                               ; preds = %.preheader
  %20 = tail call double @dsleep(double noundef 1.000000e-01) #4
  %21 = tail call double @dtime() #4
  %22 = fcmp olt double %11, %21
  br i1 %22, label %23, label %.preheader, !llvm.loop !24

23:                                               ; preds = %19, %.preheader
  %.not17 = icmp eq ptr %1, null
  br i1 %.not17, label %25, label %24

24:                                               ; preds = %23
  tail call void (...) %1() #4
  br label %25

25:                                               ; preds = %24, %23
  %26 = load ptr, ptr getelementptr inbounds (i8, ptr @agoo_server, i64 296), align 8, !tbaa !25
  %.not1824 = icmp eq ptr %26, null
  br i1 %.not1824, label %.loopexit, label %.lr.ph25

.lr.ph25:                                         ; preds = %25, %.lr.ph25
  %27 = phi ptr [ %29, %.lr.ph25 ], [ %26, %25 ]
  %28 = load ptr, ptr %27, align 8, !tbaa !26
  store ptr %28, ptr getelementptr inbounds (i8, ptr @agoo_server, i64 296), align 8, !tbaa !25
  tail call void @agoo_hook_destroy(ptr noundef nonnull %27) #4
  %29 = load ptr, ptr getelementptr inbounds (i8, ptr @agoo_server, i64 296), align 8, !tbaa !25
  %.not18 = icmp eq ptr %29, null
  br i1 %.not18, label %.loopexit, label %.lr.ph25, !llvm.loop !28

.loopexit:                                        ; preds = %.lr.ph25, %25, %5
  %30 = load ptr, ptr getelementptr inbounds (i8, ptr @agoo_server, i64 312), align 8, !tbaa !29
  %.not1926 = icmp eq ptr %30, null
  br i1 %.not1926, label %._crit_edge, label %.lr.ph27

.lr.ph27:                                         ; preds = %.loopexit, %.lr.ph27
  %31 = phi ptr [ %33, %.lr.ph27 ], [ %30, %.loopexit ]
  %32 = load ptr, ptr %31, align 8, !tbaa !30
  store ptr %32, ptr getelementptr inbounds (i8, ptr @agoo_server, i64 312), align 8, !tbaa !29
  tail call void @agoo_bind_destroy(ptr noundef nonnull %31) #4
  %33 = load ptr, ptr getelementptr inbounds (i8, ptr @agoo_server, i64 312), align 8, !tbaa !29
  %.not19 = icmp eq ptr %33, null
  br i1 %.not19, label %._crit_edge, label %.lr.ph27, !llvm.loop !33

._crit_edge:                                      ; preds = %.lr.ph27, %.loopexit
  tail call void @agoo_queue_cleanup(ptr noundef nonnull getelementptr inbounds (i8, ptr @agoo_server, i64 24)) #4
  %34 = load ptr, ptr getelementptr inbounds (i8, ptr @agoo_server, i64 592), align 8, !tbaa !34
  %.not2028 = icmp eq ptr %34, null
  br i1 %.not2028, label %._crit_edge31, label %.lr.ph30

.lr.ph30:                                         ; preds = %._crit_edge, %.lr.ph30
  %35 = phi ptr [ %37, %.lr.ph30 ], [ %34, %._crit_edge ]
  %36 = load ptr, ptr %35, align 8, !tbaa !35
  store ptr %36, ptr getelementptr inbounds (i8, ptr @agoo_server, i64 592), align 8, !tbaa !34
  tail call void @agoo_conloop_destroy(ptr noundef nonnull %35) #4
  %37 = load ptr, ptr getelementptr inbounds (i8, ptr @agoo_server, i64 592), align 8, !tbaa !34
  %.not20 = icmp eq ptr %37, null
  br i1 %.not20, label %._crit_edge31, label %.lr.ph30, !llvm.loop !36

._crit_edge31:                                    ; preds = %.lr.ph30, %._crit_edge
  tail call void @agoo_queue_cleanup(ptr noundef nonnull getelementptr inbounds (i8, ptr @agoo_server, i64 320)) #4
  tail call void (...) @agoo_pages_cleanup() #4
  tail call void (...) @agoo_http_cleanup() #4
  tail call void (...) @agoo_domain_cleanup() #4
  br label %38

38:                                               ; preds = %._crit_edge31, %2
  ret void
}

; Function Attrs: nounwind
declare i32 @pthread_detach(i64 noundef) local_unnamed_addr #2

declare void @agoo_hook_destroy(ptr noundef) local_unnamed_addr #0

declare void @agoo_bind_destroy(ptr noundef) local_unnamed_addr #0

declare void @agoo_queue_cleanup(ptr noundef) local_unnamed_addr #0

declare void @agoo_conloop_destroy(ptr noundef) local_unnamed_addr #0

declare void @agoo_pages_cleanup(...) local_unnamed_addr #0

declare void @agoo_http_cleanup(...) local_unnamed_addr #0

declare void @agoo_domain_cleanup(...) 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 = { 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 #2 = { 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 #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 }

!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, !7, i64 0}
!6 = !{!"_agooServer", !7, i64 0, !7, i64 1, !10, i64 4, !7, i64 8, !7, i64 9, !7, i64 10, !7, i64 11, !11, i64 16, !12, i64 24, !13, i64 296, !13, i64 304, !13, i64 312, !12, i64 320, !13, i64 592, !10, i64 600, !10, i64 604, !14, i64 608, !13, i64 656, !13, i64 664, !8, i64 672, !10, i64 712, !13, i64 720, !13, i64 728, !14, i64 736}
!7 = !{!"_Bool", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"long", !8, i64 0}
!12 = !{!"_agooQueue", !13, i64 0, !13, i64 8, !14, i64 16, !14, i64 64, !7, i64 112, !7, i64 113, !14, i64 120, !14, i64 168, !14, i64 216, !10, i64 264, !10, i64 268}
!13 = !{!"any pointer", !8, i64 0}
!14 = !{!"_agooAtom", !13, i64 0, !8, i64 8}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = !{!6, !7, i64 1}
!18 = !{!6, !11, i64 16}
!19 = !{!13, !13, i64 0}
!20 = !{!21, !11, i64 280}
!21 = !{!"_agooConLoop", !13, i64 0, !12, i64 8, !11, i64 280, !10, i64 288, !13, i64 296, !13, i64 304, !8, i64 312}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = distinct !{!24, !23}
!25 = !{!6, !13, i64 296}
!26 = !{!27, !13, i64 0}
!27 = !{!"_agooHook", !13, i64 0, !10, i64 8, !13, i64 16, !10, i64 24, !8, i64 32, !13, i64 40, !7, i64 48}
!28 = distinct !{!28, !23}
!29 = !{!6, !13, i64 312}
!30 = !{!31, !13, i64 0}
!31 = !{!"_agooBind", !13, i64 0, !10, i64 8, !10, i64 12, !32, i64 16, !8, i64 20, !13, i64 40, !13, i64 48, !13, i64 56, !13, i64 64, !13, i64 72, !10, i64 80}
!32 = !{!"short", !8, i64 0}
!33 = distinct !{!33, !23}
!34 = !{!6, !13, i64 592}
!35 = !{!21, !13, i64 0}
!36 = distinct !{!36, !23}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass