; LLVM IR from wichue/nethello :: depend/kcp (ikcp)

; 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.IKCPCB = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, %struct.IQUEUEHEAD, %struct.IQUEUEHEAD, %struct.IQUEUEHEAD, %struct.IQUEUEHEAD, ptr, i32, i32, ptr, ptr, i32, i32, i32, i32, i32, ptr, ptr }
%struct.IQUEUEHEAD = type { ptr, ptr }
%struct.IKCPSEG = type { %struct.IQUEUEHEAD, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [1 x i8] }

@.str = external hidden unnamed_addr constant [4 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [67 x i8], align 1
@__PRETTY_FUNCTION__.ikcp_release = external hidden unnamed_addr constant [28 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 hidden void @ikcp_free(ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local void @ikcp_release(ptr noundef %0) #1 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %4 = load ptr, ptr %2, align 8, !tbaa !5
  %5 = icmp ne ptr %4, null
  br i1 %5, label %6, label %7

6:                                                ; preds = %1
  br label %8

7:                                                ; preds = %1
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 303, ptr noundef @__PRETTY_FUNCTION__.ikcp_release) #3
  unreachable

8:                                                ; preds = %6
  %9 = load ptr, ptr %2, align 8, !tbaa !5
  %10 = icmp ne ptr %9, null
  br i1 %10, label %11, label %213

11:                                               ; preds = %8
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #4
  br label %12

12:                                               ; preds = %21, %11
  %13 = load ptr, ptr %2, align 8, !tbaa !5
  %14 = getelementptr inbounds %struct.IKCPCB, ptr %13, i32 0, i32 35
  %15 = load ptr, ptr %2, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct.IKCPCB, ptr %15, i32 0, i32 35
  %17 = getelementptr inbounds %struct.IQUEUEHEAD, ptr %16, i32 0, i32 0
  %18 = load ptr, ptr %17, align 8, !tbaa !9
  %19 = icmp eq ptr %14, %18
  %20 = xor i1 %19, true
  br i1 %20, label %21, label %53

21:                                               ; preds = %12
  %22 = load ptr, ptr %2, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.IKCPCB, ptr %22, i32 0, i32 35
  %24 = getelementptr inbounds %struct.IQUEUEHEAD, ptr %23, i32 0, i32 0
  %25 = load ptr, ptr %24, align 8, !tbaa !9
  %26 = getelementptr inbounds i8, ptr %25, i64 0
  store ptr %26, ptr %3, align 8, !tbaa !5
  %27 = load ptr, ptr %3, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.IKCPSEG, ptr %27, i32 0, i32 0
  %29 = getelementptr inbounds %struct.IQUEUEHEAD, ptr %28, i32 0, i32 1
  %30 = load ptr, ptr %29, align 8, !tbaa !13
  %31 = load ptr, ptr %3, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.IKCPSEG, ptr %31, i32 0, i32 0
  %33 = getelementptr inbounds %struct.IQUEUEHEAD, ptr %32, i32 0, i32 0
  %34 = load ptr, ptr %33, align 8, !tbaa !15
  %35 = getelementptr inbounds %struct.IQUEUEHEAD, ptr %34, i32 0, i32 1
  store ptr %30, ptr %35, align 8, !tbaa !16
  %36 = load ptr, ptr %3, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.IKCPSEG, ptr %36, i32 0, i32 0
  %38 = getelementptr inbounds %struct.IQUEUEHEAD, ptr %37, i32 0, i32 0
  %39 = load ptr, ptr %38, align 8, !tbaa !15
  %40 = load ptr, ptr %3, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.IKCPSEG, ptr %40, i32 0, i32 0
  %42 = getelementptr inbounds %struct.IQUEUEHEAD, ptr %41, i32 0, i32 1
  %43 = load ptr, ptr %42, align 8, !tbaa !13
  %44 = getelementptr inbounds %struct.IQUEUEHEAD, ptr %43, i32 0, i32 0
  store ptr %39, ptr %44, align 8, !tbaa !17
  %45 = load ptr, ptr %3, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.IKCPSEG, ptr %45, i32 0, i32 0
  %47 = getelementptr inbounds %struct.IQUEUEHEAD, ptr %46, i32 0, i32 0
  store ptr null, ptr %47, align 8, !tbaa !15
  %48 = load ptr, ptr %3, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.IKCPSEG, ptr %48, i32 0, i32 0
  %50 = getelementptr inbounds %struct.IQUEUEHEAD, ptr %49, i32 0, i32 1
  store ptr null, ptr %50, align 8, !tbaa !13
  %51 = load ptr, ptr %2, align 8, !tbaa !5
  %52 = load ptr, ptr %3, align 8, !tbaa !5
  call void @ikcp_segment_delete(ptr noundef %51, ptr noundef %52)
  br label %12, !llvm.loop !18

53:                                               ; preds = %12
  br label %54

54:                                               ; preds = %63, %53
  %55 = load ptr, ptr %2, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.IKCPCB, ptr %55, i32 0, i32 36
  %57 = load ptr, ptr %2, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.IKCPCB, ptr %57, i32 0, i32 36
  %59 = getelementptr inbounds %struct.IQUEUEHEAD, ptr %58, i32 0, i32 0
  %60 = load ptr, ptr %59, align 8, !tbaa !20
  %61 = icmp eq ptr %56, %60
  %62 = xor i1 %61, true
  br i1 %62, label %63, label %95

63:                                               ; preds = %54
  %64 = load ptr, ptr %2, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.IKCPCB, ptr %64, i32 0, i32 36
  %66 = getelementptr inbounds %struct.IQUEUEHEAD, ptr %65, i32 0, i32 0
  %67 = load ptr, ptr %66, align 8, !tbaa !20
  %68 = getelementptr inbounds i8, ptr %67, i64 0
  store ptr %68, ptr %3, align 8, !tbaa !5
  %69 = load ptr, ptr %3, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.IKCPSEG, ptr %69, i32 0, i32 0
  %71 = getelementptr inbounds %struct.IQUEUEHEAD, ptr %70, i32 0, i32 1
  %72 = load ptr, ptr %71, align 8, !tbaa !13
  %73 = load ptr, ptr %3, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.IKCPSEG, ptr %73, i32 0, i32 0
  %75 = getelementptr inbounds %struct.IQUEUEHEAD, ptr %74, i32 0, i32 0
  %76 = load ptr, ptr %75, align 8, !tbaa !15
  %77 = getelementptr inbounds %struct.IQUEUEHEAD, ptr %76, i32 0, i32 1
  store ptr %72, ptr %77, align 8, !tbaa !16
  %78 = load ptr, ptr %3, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.IKCPSEG, ptr %78, i32 0, i32 0
  %80 = getelementptr inbounds %struct.IQUEUEHEAD, ptr %79, i32 0, i32 0
  %81 = load ptr, ptr %80, align 8, !tbaa !15
  %82 = load ptr, ptr %3, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.IKCPSEG, ptr %82, i32 0, i32 0
  %84 = getelementptr inbounds %struct.IQUEUEHEAD, ptr %83, i32 0, i32 1
  %85 = load ptr, ptr %84, align 8, !tbaa !13
  %86 = getelementptr inbounds %struct.IQUEUEHEAD, ptr %85, i32 0, i32 0
  store ptr %81, ptr %86, align 8, !tbaa !17
  %87 = load ptr, ptr %3, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.IKCPSEG, ptr %87, i32 0, i32 0
  %89 = getelementptr inbounds %struct.IQUEUEHEAD, ptr %88, i32 0, i32 0
  store ptr null, ptr %89, align 8, !tbaa !15
  %90 = load ptr, ptr %3, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.IKCPSEG, ptr %90, i32 0, i32 0
  %92 = getelementptr inbounds %struct.IQUEUEHEAD, ptr %91, i32 0, i32 1
  store ptr null, ptr %92, align 8, !tbaa !13
  %93 = load ptr, ptr %2, align 8, !tbaa !5
  %94 = load ptr, ptr %3, align 8, !tbaa !5
  call void @ikcp_segment_delete(ptr noundef %93, ptr noundef %94)
  br label %54, !llvm.loop !21

95:                                               ; preds = %54
  br label %96

96:                                               ; preds = %105, %95
  %97 = load ptr, ptr %2, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.IKCPCB, ptr %97, i32 0, i32 33
  %99 = load ptr, ptr %2, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.IKCPCB, ptr %99, i32 0, i32 33
  %101 = getelementptr inbounds %struct.IQUEUEHEAD, ptr %100, i32 0, i32 0
  %102 = load ptr, ptr %101, align 8, !tbaa !22
  %103 = icmp eq ptr %98, %102
  %104 = xor i1 %103, true
  br i1 %104, label %105, label %137

105:                                              ; preds = %96
  %106 = load ptr, ptr %2, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.IKCPCB, ptr %106, i32 0, i32 33
  %108 = getelementptr inbounds %struct.IQUEUEHEAD, ptr %107, i32 0, i32 0
  %109 = load ptr, ptr %108, align 8, !tbaa !22
  %110 = getelementptr inbounds i8, ptr %109, i64 0
  store ptr %110, ptr %3, align 8, !tbaa !5
  %111 = load ptr, ptr %3, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.IKCPSEG, ptr %111, i32 0, i32 0
  %113 = getelementptr inbounds %struct.IQUEUEHEAD, ptr %112, i32 0, i32 1
  %114 = load ptr, ptr %113, align 8, !tbaa !13
  %115 = load ptr, ptr %3, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.IKCPSEG, ptr %115, i32 0, i32 0
  %117 = getelementptr inbounds %struct.IQUEUEHEAD, ptr %116, i32 0, i32 0
  %118 = load ptr, ptr %117, align 8, !tbaa !15
  %119 = getelementptr inbounds %struct.IQUEUEHEAD, ptr %118, i32 0, i32 1
  store ptr %114, ptr %119, align 8, !tbaa !16
  %120 = load ptr, ptr %3, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.IKCPSEG, ptr %120, i32 0, i32 0
  %122 = getelementptr inbounds %struct.IQUEUEHEAD, ptr %121, i32 0, i32 0
  %123 = load ptr, ptr %122, align 8, !tbaa !15
  %124 = load ptr, ptr %3, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.IKCPSEG, ptr %124, i32 0, i32 0
  %126 = getelementptr inbounds %struct.IQUEUEHEAD, ptr %125, i32 0, i32 1
  %127 = load ptr, ptr %126, align 8, !tbaa !13
  %128 = getelementptr inbounds %struct.IQUEUEHEAD, ptr %127, i32 0, i32 0
  store ptr %123, ptr %128, align 8, !tbaa !17
  %129 = load ptr, ptr %3, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.IKCPSEG, ptr %129, i32 0, i32 0
  %131 = getelementptr inbounds %struct.IQUEUEHEAD, ptr %130, i32 0, i32 0
  store ptr null, ptr %131, align 8, !tbaa !15
  %132 = load ptr, ptr %3, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.IKCPSEG, ptr %132, i32 0, i32 0
  %134 = getelementptr inbounds %struct.IQUEUEHEAD, ptr %133, i32 0, i32 1
  store ptr null, ptr %134, align 8, !tbaa !13
  %135 = load ptr, ptr %2, align 8, !tbaa !5
  %136 = load ptr, ptr %3, align 8, !tbaa !5
  call void @ikcp_segment_delete(ptr noundef %135, ptr noundef %136)
  br label %96, !llvm.loop !23

137:                                              ; preds = %96
  br label %138

138:                                              ; preds = %147, %137
  %139 = load ptr, ptr %2, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.IKCPCB, ptr %139, i32 0, i32 34
  %141 = load ptr, ptr %2, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.IKCPCB, ptr %141, i32 0, i32 34
  %143 = getelementptr inbounds %struct.IQUEUEHEAD, ptr %142, i32 0, i32 0
  %144 = load ptr, ptr %143, align 8, !tbaa !24
  %145 = icmp eq ptr %140, %144
  %146 = xor i1 %145, true
  br i1 %146, label %147, label %179

147:                                              ; preds = %138
  %148 = load ptr, ptr %2, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.IKCPCB, ptr %148, i32 0, i32 34
  %150 = getelementptr inbounds %struct.IQUEUEHEAD, ptr %149, i32 0, i32 0
  %151 = load ptr, ptr %150, align 8, !tbaa !24
  %152 = getelementptr inbounds i8, ptr %151, i64 0
  store ptr %152, ptr %3, align 8, !tbaa !5
  %153 = load ptr, ptr %3, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.IKCPSEG, ptr %153, i32 0, i32 0
  %155 = getelementptr inbounds %struct.IQUEUEHEAD, ptr %154, i32 0, i32 1
  %156 = load ptr, ptr %155, align 8, !tbaa !13
  %157 = load ptr, ptr %3, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.IKCPSEG, ptr %157, i32 0, i32 0
  %159 = getelementptr inbounds %struct.IQUEUEHEAD, ptr %158, i32 0, i32 0
  %160 = load ptr, ptr %159, align 8, !tbaa !15
  %161 = getelementptr inbounds %struct.IQUEUEHEAD, ptr %160, i32 0, i32 1
  store ptr %156, ptr %161, align 8, !tbaa !16
  %162 = load ptr, ptr %3, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct.IKCPSEG, ptr %162, i32 0, i32 0
  %164 = getelementptr inbounds %struct.IQUEUEHEAD, ptr %163, i32 0, i32 0
  %165 = load ptr, ptr %164, align 8, !tbaa !15
  %166 = load ptr, ptr %3, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct.IKCPSEG, ptr %166, i32 0, i32 0
  %168 = getelementptr inbounds %struct.IQUEUEHEAD, ptr %167, i32 0, i32 1
  %169 = load ptr, ptr %168, align 8, !tbaa !13
  %170 = getelementptr inbounds %struct.IQUEUEHEAD, ptr %169, i32 0, i32 0
  store ptr %165, ptr %170, align 8, !tbaa !17
  %171 = load ptr, ptr %3, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.IKCPSEG, ptr %171, i32 0, i32 0
  %173 = getelementptr inbounds %struct.IQUEUEHEAD, ptr %172, i32 0, i32 0
  store ptr null, ptr %173, align 8, !tbaa !15
  %174 = load ptr, ptr %3, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.IKCPSEG, ptr %174, i32 0, i32 0
  %176 = getelementptr inbounds %struct.IQUEUEHEAD, ptr %175, i32 0, i32 1
  store ptr null, ptr %176, align 8, !tbaa !13
  %177 = load ptr, ptr %2, align 8, !tbaa !5
  %178 = load ptr, ptr %3, align 8, !tbaa !5
  call void @ikcp_segment_delete(ptr noundef %177, ptr noundef %178)
  br label %138, !llvm.loop !25

179:                                              ; preds = %138
  %180 = load ptr, ptr %2, align 8, !tbaa !5
  %181 = getelementptr inbounds %struct.IKCPCB, ptr %180, i32 0, i32 41
  %182 = load ptr, ptr %181, align 8, !tbaa !26
  %183 = icmp ne ptr %182, null
  br i1 %183, label %184, label %188

184:                                              ; preds = %179
  %185 = load ptr, ptr %2, align 8, !tbaa !5
  %186 = getelementptr inbounds %struct.IKCPCB, ptr %185, i32 0, i32 41
  %187 = load ptr, ptr %186, align 8, !tbaa !26
  call void @ikcp_free(ptr noundef %187)
  br label %188

188:                                              ; preds = %184, %179
  %189 = load ptr, ptr %2, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.IKCPCB, ptr %189, i32 0, i32 37
  %191 = load ptr, ptr %190, align 8, !tbaa !27
  %192 = icmp ne ptr %191, null
  br i1 %192, label %193, label %197

193:                                              ; preds = %188
  %194 = load ptr, ptr %2, align 8, !tbaa !5
  %195 = getelementptr inbounds %struct.IKCPCB, ptr %194, i32 0, i32 37
  %196 = load ptr, ptr %195, align 8, !tbaa !27
  call void @ikcp_free(ptr noundef %196)
  br label %197

197:                                              ; preds = %193, %188
  %198 = load ptr, ptr %2, align 8, !tbaa !5
  %199 = getelementptr inbounds %struct.IKCPCB, ptr %198, i32 0, i32 23
  store i32 0, ptr %199, align 4, !tbaa !28
  %200 = load ptr, ptr %2, align 8, !tbaa !5
  %201 = getelementptr inbounds %struct.IKCPCB, ptr %200, i32 0, i32 24
  store i32 0, ptr %201, align 8, !tbaa !29
  %202 = load ptr, ptr %2, align 8, !tbaa !5
  %203 = getelementptr inbounds %struct.IKCPCB, ptr %202, i32 0, i32 25
  store i32 0, ptr %203, align 4, !tbaa !30
  %204 = load ptr, ptr %2, align 8, !tbaa !5
  %205 = getelementptr inbounds %struct.IKCPCB, ptr %204, i32 0, i32 26
  store i32 0, ptr %205, align 8, !tbaa !31
  %206 = load ptr, ptr %2, align 8, !tbaa !5
  %207 = getelementptr inbounds %struct.IKCPCB, ptr %206, i32 0, i32 38
  store i32 0, ptr %207, align 8, !tbaa !32
  %208 = load ptr, ptr %2, align 8, !tbaa !5
  %209 = getelementptr inbounds %struct.IKCPCB, ptr %208, i32 0, i32 41
  store ptr null, ptr %209, align 8, !tbaa !26
  %210 = load ptr, ptr %2, align 8, !tbaa !5
  %211 = getelementptr inbounds %struct.IKCPCB, ptr %210, i32 0, i32 37
  store ptr null, ptr %211, align 8, !tbaa !27
  %212 = load ptr, ptr %2, align 8, !tbaa !5
  call void @ikcp_free(ptr noundef %212)
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #4
  br label %213

213:                                              ; preds = %197, %8
  ret void
}

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @ikcp_segment_delete(ptr noundef, ptr noundef) #1

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 = { noreturn 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 = { noreturn nounwind }
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, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 168}
!10 = !{!"IKCPCB", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !11, i64 40, !11, i64 44, !11, i64 48, !11, i64 52, !11, i64 56, !11, i64 60, !11, i64 64, !11, i64 68, !11, i64 72, !11, i64 76, !11, i64 80, !11, i64 84, !11, i64 88, !11, i64 92, !11, i64 96, !11, i64 100, !11, i64 104, !11, i64 108, !11, i64 112, !11, i64 116, !11, i64 120, !11, i64 124, !11, i64 128, !12, i64 136, !12, i64 152, !12, i64 168, !12, i64 184, !6, i64 200, !11, i64 208, !11, i64 212, !6, i64 216, !6, i64 224, !11, i64 232, !11, i64 236, !11, i64 240, !11, i64 244, !11, i64 248, !6, i64 256, !6, i64 264}
!11 = !{!"int", !7, i64 0}
!12 = !{!"IQUEUEHEAD", !6, i64 0, !6, i64 8}
!13 = !{!14, !6, i64 8}
!14 = !{!"IKCPSEG", !12, i64 0, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !11, i64 40, !11, i64 44, !11, i64 48, !11, i64 52, !11, i64 56, !11, i64 60, !7, i64 64}
!15 = !{!14, !6, i64 0}
!16 = !{!12, !6, i64 8}
!17 = !{!12, !6, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{!10, !6, i64 184}
!21 = distinct !{!21, !19}
!22 = !{!10, !6, i64 136}
!23 = distinct !{!23, !19}
!24 = !{!10, !6, i64 152}
!25 = distinct !{!25, !19}
!26 = !{!10, !6, i64 224}
!27 = !{!10, !6, i64 200}
!28 = !{!10, !11, i64 92}
!29 = !{!10, !11, i64 96}
!30 = !{!10, !11, i64 100}
!31 = !{!10, !11, i64 104}
!32 = !{!10, !11, i64 208}


; 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 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [67 x i8], align 1
@__PRETTY_FUNCTION__.ikcp_release = external hidden unnamed_addr constant [28 x i8], align 1

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

; Function Attrs: nounwind uwtable
define dso_local void @ikcp_release(ptr noundef %0) local_unnamed_addr #0 {
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %4, label %.preheader68

.preheader68:                                     ; preds = %1
  %2 = getelementptr inbounds i8, ptr %0, i64 168
  %3 = load ptr, ptr %2, align 8, !tbaa !5
  %.not6069 = icmp eq ptr %2, %3
  br i1 %.not6069, label %.preheader67, label %.lr.ph

4:                                                ; preds = %1
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 303, ptr noundef nonnull @__PRETTY_FUNCTION__.ikcp_release) #3
  unreachable

.preheader67:                                     ; preds = %.lr.ph, %.preheader68
  %5 = getelementptr inbounds i8, ptr %0, i64 184
  %6 = load ptr, ptr %5, align 8, !tbaa !12
  %.not6170 = icmp eq ptr %5, %6
  br i1 %.not6170, label %.preheader66, label %.lr.ph71

.lr.ph:                                           ; preds = %.preheader68, %.lr.ph
  %7 = phi ptr [ %12, %.lr.ph ], [ %3, %.preheader68 ]
  %8 = getelementptr inbounds i8, ptr %7, i64 8
  %9 = load ptr, ptr %8, align 8, !tbaa !13
  %10 = load ptr, ptr %7, align 8, !tbaa !15
  %11 = getelementptr inbounds i8, ptr %10, i64 8
  store ptr %9, ptr %11, align 8, !tbaa !16
  store ptr %10, ptr %9, align 8, !tbaa !17
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %7, i8 0, i64 16, i1 false)
  tail call void @ikcp_segment_delete(ptr noundef nonnull %0, ptr noundef nonnull %7)
  %12 = load ptr, ptr %2, align 8, !tbaa !5
  %.not60 = icmp eq ptr %2, %12
  br i1 %.not60, label %.preheader67, label %.lr.ph, !llvm.loop !18

.preheader66:                                     ; preds = %.lr.ph71, %.preheader67
  %13 = getelementptr inbounds i8, ptr %0, i64 136
  %14 = load ptr, ptr %13, align 8, !tbaa !20
  %.not6272 = icmp eq ptr %13, %14
  br i1 %.not6272, label %.preheader, label %.lr.ph73

.lr.ph71:                                         ; preds = %.preheader67, %.lr.ph71
  %15 = phi ptr [ %20, %.lr.ph71 ], [ %6, %.preheader67 ]
  %16 = getelementptr inbounds i8, ptr %15, i64 8
  %17 = load ptr, ptr %16, align 8, !tbaa !13
  %18 = load ptr, ptr %15, align 8, !tbaa !15
  %19 = getelementptr inbounds i8, ptr %18, i64 8
  store ptr %17, ptr %19, align 8, !tbaa !16
  store ptr %18, ptr %17, align 8, !tbaa !17
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %15, i8 0, i64 16, i1 false)
  tail call void @ikcp_segment_delete(ptr noundef nonnull %0, ptr noundef nonnull %15)
  %20 = load ptr, ptr %5, align 8, !tbaa !12
  %.not61 = icmp eq ptr %5, %20
  br i1 %.not61, label %.preheader66, label %.lr.ph71, !llvm.loop !21

.preheader:                                       ; preds = %.lr.ph73, %.preheader66
  %21 = getelementptr inbounds i8, ptr %0, i64 152
  %22 = load ptr, ptr %21, align 8, !tbaa !22
  %.not6374 = icmp eq ptr %21, %22
  br i1 %.not6374, label %._crit_edge, label %.lr.ph75

.lr.ph73:                                         ; preds = %.preheader66, %.lr.ph73
  %23 = phi ptr [ %28, %.lr.ph73 ], [ %14, %.preheader66 ]
  %24 = getelementptr inbounds i8, ptr %23, i64 8
  %25 = load ptr, ptr %24, align 8, !tbaa !13
  %26 = load ptr, ptr %23, align 8, !tbaa !15
  %27 = getelementptr inbounds i8, ptr %26, i64 8
  store ptr %25, ptr %27, align 8, !tbaa !16
  store ptr %26, ptr %25, align 8, !tbaa !17
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %23, i8 0, i64 16, i1 false)
  tail call void @ikcp_segment_delete(ptr noundef nonnull %0, ptr noundef nonnull %23)
  %28 = load ptr, ptr %13, align 8, !tbaa !20
  %.not62 = icmp eq ptr %13, %28
  br i1 %.not62, label %.preheader, label %.lr.ph73, !llvm.loop !23

.lr.ph75:                                         ; preds = %.preheader, %.lr.ph75
  %29 = phi ptr [ %34, %.lr.ph75 ], [ %22, %.preheader ]
  %30 = getelementptr inbounds i8, ptr %29, i64 8
  %31 = load ptr, ptr %30, align 8, !tbaa !13
  %32 = load ptr, ptr %29, align 8, !tbaa !15
  %33 = getelementptr inbounds i8, ptr %32, i64 8
  store ptr %31, ptr %33, align 8, !tbaa !16
  store ptr %32, ptr %31, align 8, !tbaa !17
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %29, i8 0, i64 16, i1 false)
  tail call void @ikcp_segment_delete(ptr noundef nonnull %0, ptr noundef nonnull %29)
  %34 = load ptr, ptr %21, align 8, !tbaa !22
  %.not63 = icmp eq ptr %21, %34
  br i1 %.not63, label %._crit_edge, label %.lr.ph75, !llvm.loop !24

._crit_edge:                                      ; preds = %.lr.ph75, %.preheader
  %35 = getelementptr inbounds i8, ptr %0, i64 224
  %36 = load ptr, ptr %35, align 8, !tbaa !25
  %.not64 = icmp eq ptr %36, null
  br i1 %.not64, label %38, label %37

37:                                               ; preds = %._crit_edge
  tail call void @ikcp_free(ptr noundef nonnull %36)
  br label %38

38:                                               ; preds = %37, %._crit_edge
  %39 = getelementptr inbounds i8, ptr %0, i64 200
  %40 = load ptr, ptr %39, align 8, !tbaa !26
  %.not65 = icmp eq ptr %40, null
  br i1 %.not65, label %42, label %41

41:                                               ; preds = %38
  tail call void @ikcp_free(ptr noundef nonnull %40)
  br label %42

42:                                               ; preds = %41, %38
  %43 = getelementptr inbounds i8, ptr %0, i64 92
  %44 = getelementptr inbounds i8, ptr %0, i64 208
  store i32 0, ptr %44, align 8, !tbaa !27
  store ptr null, ptr %35, align 8, !tbaa !25
  store ptr null, ptr %39, align 8, !tbaa !26
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %43, i8 0, i64 16, i1 false)
  tail call void @ikcp_free(ptr noundef nonnull %0)
  ret void
}

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

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 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { noreturn 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, !11, i64 168}
!6 = !{!"IKCPCB", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !7, i64 32, !7, i64 36, !7, i64 40, !7, i64 44, !7, i64 48, !7, i64 52, !7, i64 56, !7, i64 60, !7, i64 64, !7, i64 68, !7, i64 72, !7, i64 76, !7, i64 80, !7, i64 84, !7, i64 88, !7, i64 92, !7, i64 96, !7, i64 100, !7, i64 104, !7, i64 108, !7, i64 112, !7, i64 116, !7, i64 120, !7, i64 124, !7, i64 128, !10, i64 136, !10, i64 152, !10, i64 168, !10, i64 184, !11, i64 200, !7, i64 208, !7, i64 212, !11, i64 216, !11, i64 224, !7, i64 232, !7, i64 236, !7, i64 240, !7, i64 244, !7, i64 248, !11, i64 256, !11, i64 264}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"IQUEUEHEAD", !11, i64 0, !11, i64 8}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!6, !11, i64 184}
!13 = !{!14, !11, i64 8}
!14 = !{!"IKCPSEG", !10, i64 0, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !7, i64 32, !7, i64 36, !7, i64 40, !7, i64 44, !7, i64 48, !7, i64 52, !7, i64 56, !7, i64 60, !8, i64 64}
!15 = !{!14, !11, i64 0}
!16 = !{!10, !11, i64 8}
!17 = !{!10, !11, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{!6, !11, i64 136}
!21 = distinct !{!21, !19}
!22 = !{!6, !11, i64 152}
!23 = distinct !{!23, !19}
!24 = distinct !{!24, !19}
!25 = !{!6, !11, i64 224}
!26 = !{!6, !11, i64 200}
!27 = !{!6, !7, i64 208}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MemCpyOptPass,SROAPass,SimplifyCFGPass,TailCallElimPass