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

; 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_segment_delete(ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local void @ikcp_parse_data(ptr noundef %0, ptr noundef %1) #1 {
  %3 = alloca ptr, align 8
  %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 i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  %12 = load ptr, ptr %4, align 8, !tbaa !5
  %13 = getelementptr inbounds %struct.IKCPSEG, ptr %12, i32 0, i32 6
  %14 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %14, ptr %7, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  store i32 0, ptr %8, align 4, !tbaa !13
  %15 = load i32, ptr %7, align 4, !tbaa !13
  %16 = load ptr, ptr %3, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.IKCPCB, ptr %16, i32 0, i32 6
  %18 = load i32, ptr %17, align 8, !tbaa !14
  %19 = load ptr, ptr %3, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.IKCPCB, ptr %19, i32 0, i32 15
  %21 = load i32, ptr %20, align 4, !tbaa !16
  %22 = add i32 %18, %21
  %23 = call i64 @_itimediff(i32 noundef %15, i32 noundef %22)
  %24 = icmp sge i64 %23, 0
  br i1 %24, label %32, label %25

25:                                               ; preds = %2
  %26 = load i32, ptr %7, align 4, !tbaa !13
  %27 = load ptr, ptr %3, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.IKCPCB, ptr %27, i32 0, i32 6
  %29 = load i32, ptr %28, align 8, !tbaa !14
  %30 = call i64 @_itimediff(i32 noundef %26, i32 noundef %29)
  %31 = icmp slt i64 %30, 0
  br i1 %31, label %32, label %35

32:                                               ; preds = %25, %2
  %33 = load ptr, ptr %3, align 8, !tbaa !5
  %34 = load ptr, ptr %4, align 8, !tbaa !5
  call void @ikcp_segment_delete(ptr noundef %33, ptr noundef %34)
  store i32 1, ptr %9, align 4
  br label %210

35:                                               ; preds = %25
  %36 = load ptr, ptr %3, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.IKCPCB, ptr %36, i32 0, i32 36
  %38 = getelementptr inbounds %struct.IQUEUEHEAD, ptr %37, i32 0, i32 1
  %39 = load ptr, ptr %38, align 8, !tbaa !17
  store ptr %39, ptr %5, align 8, !tbaa !5
  br label %40

40:                                               ; preds = %69, %35
  %41 = load ptr, ptr %5, align 8, !tbaa !5
  %42 = load ptr, ptr %3, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.IKCPCB, ptr %42, i32 0, i32 36
  %44 = icmp ne ptr %41, %43
  br i1 %44, label %45, label %71

45:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  %46 = load ptr, ptr %5, align 8, !tbaa !5
  %47 = getelementptr inbounds i8, ptr %46, i64 0
  store ptr %47, ptr %10, align 8, !tbaa !5
  %48 = load ptr, ptr %5, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.IQUEUEHEAD, ptr %48, i32 0, i32 1
  %50 = load ptr, ptr %49, align 8, !tbaa !18
  store ptr %50, ptr %6, align 8, !tbaa !5
  %51 = load ptr, ptr %10, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.IKCPSEG, ptr %51, i32 0, i32 6
  %53 = load i32, ptr %52, align 4, !tbaa !9
  %54 = load i32, ptr %7, align 4, !tbaa !13
  %55 = icmp eq i32 %53, %54
  br i1 %55, label %56, label %57

56:                                               ; preds = %45
  store i32 1, ptr %8, align 4, !tbaa !13
  store i32 2, ptr %9, align 4
  br label %66

57:                                               ; preds = %45
  %58 = load i32, ptr %7, align 4, !tbaa !13
  %59 = load ptr, ptr %10, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.IKCPSEG, ptr %59, i32 0, i32 6
  %61 = load i32, ptr %60, align 4, !tbaa !9
  %62 = call i64 @_itimediff(i32 noundef %58, i32 noundef %61)
  %63 = icmp sgt i64 %62, 0
  br i1 %63, label %64, label %65

64:                                               ; preds = %57
  store i32 2, ptr %9, align 4
  br label %66

65:                                               ; preds = %57
  store i32 0, ptr %9, align 4
  br label %66

66:                                               ; preds = %65, %64, %56
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  %67 = load i32, ptr %9, align 4
  switch i32 %67, label %213 [
    i32 0, label %68
    i32 2, label %71
  ]

68:                                               ; preds = %66
  br label %69

69:                                               ; preds = %68
  %70 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %70, ptr %5, align 8, !tbaa !5
  br label %40, !llvm.loop !19

71:                                               ; preds = %66, %40
  %72 = load i32, ptr %8, align 4, !tbaa !13
  %73 = icmp eq i32 %72, 0
  br i1 %73, label %74, label %109

74:                                               ; preds = %71
  %75 = load ptr, ptr %4, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.IKCPSEG, ptr %75, i32 0, i32 0
  %77 = load ptr, ptr %4, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.IKCPSEG, ptr %77, i32 0, i32 0
  %79 = getelementptr inbounds %struct.IQUEUEHEAD, ptr %78, i32 0, i32 0
  store ptr %76, ptr %79, align 8, !tbaa !21
  %80 = load ptr, ptr %4, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.IKCPSEG, ptr %80, i32 0, i32 0
  %82 = load ptr, ptr %4, 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
  store ptr %81, ptr %84, align 8, !tbaa !22
  %85 = load ptr, ptr %5, align 8, !tbaa !5
  %86 = load ptr, ptr %4, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.IKCPSEG, ptr %86, i32 0, i32 0
  %88 = getelementptr inbounds %struct.IQUEUEHEAD, ptr %87, i32 0, i32 1
  store ptr %85, ptr %88, align 8, !tbaa !22
  %89 = load ptr, ptr %5, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.IQUEUEHEAD, ptr %89, i32 0, i32 0
  %91 = load ptr, ptr %90, align 8, !tbaa !23
  %92 = load ptr, ptr %4, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.IKCPSEG, ptr %92, i32 0, i32 0
  %94 = getelementptr inbounds %struct.IQUEUEHEAD, ptr %93, i32 0, i32 0
  store ptr %91, ptr %94, align 8, !tbaa !21
  %95 = load ptr, ptr %4, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.IKCPSEG, ptr %95, i32 0, i32 0
  %97 = load ptr, ptr %5, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.IQUEUEHEAD, ptr %97, i32 0, i32 0
  %99 = load ptr, ptr %98, align 8, !tbaa !23
  %100 = getelementptr inbounds %struct.IQUEUEHEAD, ptr %99, i32 0, i32 1
  store ptr %96, ptr %100, align 8, !tbaa !18
  %101 = load ptr, ptr %4, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.IKCPSEG, ptr %101, i32 0, i32 0
  %103 = load ptr, ptr %5, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.IQUEUEHEAD, ptr %103, i32 0, i32 0
  store ptr %102, ptr %104, align 8, !tbaa !23
  %105 = load ptr, ptr %3, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.IKCPCB, ptr %105, i32 0, i32 23
  %107 = load i32, ptr %106, align 4, !tbaa !24
  %108 = add i32 %107, 1
  store i32 %108, ptr %106, align 4, !tbaa !24
  br label %112

109:                                              ; preds = %71
  %110 = load ptr, ptr %3, align 8, !tbaa !5
  %111 = load ptr, ptr %4, align 8, !tbaa !5
  call void @ikcp_segment_delete(ptr noundef %110, ptr noundef %111)
  br label %112

112:                                              ; preds = %109, %74
  br label %113

113:                                              ; preds = %208, %112
  %114 = load ptr, ptr %3, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.IKCPCB, ptr %114, i32 0, i32 36
  %116 = load ptr, ptr %3, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.IKCPCB, ptr %116, i32 0, i32 36
  %118 = getelementptr inbounds %struct.IQUEUEHEAD, ptr %117, i32 0, i32 0
  %119 = load ptr, ptr %118, align 8, !tbaa !25
  %120 = icmp eq ptr %115, %119
  %121 = xor i1 %120, true
  br i1 %121, label %122, label %209

122:                                              ; preds = %113
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  %123 = load ptr, ptr %3, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.IKCPCB, ptr %123, i32 0, i32 36
  %125 = getelementptr inbounds %struct.IQUEUEHEAD, ptr %124, i32 0, i32 0
  %126 = load ptr, ptr %125, align 8, !tbaa !25
  %127 = getelementptr inbounds i8, ptr %126, i64 0
  store ptr %127, ptr %11, align 8, !tbaa !5
  %128 = load ptr, ptr %11, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.IKCPSEG, ptr %128, i32 0, i32 6
  %130 = load i32, ptr %129, align 4, !tbaa !9
  %131 = load ptr, ptr %3, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.IKCPCB, ptr %131, i32 0, i32 6
  %133 = load i32, ptr %132, align 8, !tbaa !14
  %134 = icmp eq i32 %130, %133
  br i1 %134, label %135, label %204

135:                                              ; preds = %122
  %136 = load ptr, ptr %3, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.IKCPCB, ptr %136, i32 0, i32 25
  %138 = load i32, ptr %137, align 4, !tbaa !26
  %139 = load ptr, ptr %3, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.IKCPCB, ptr %139, i32 0, i32 15
  %141 = load i32, ptr %140, align 4, !tbaa !16
  %142 = icmp ult i32 %138, %141
  br i1 %142, label %143, label %204

143:                                              ; preds = %135
  %144 = load ptr, ptr %11, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.IKCPSEG, ptr %144, i32 0, i32 0
  %146 = getelementptr inbounds %struct.IQUEUEHEAD, ptr %145, i32 0, i32 1
  %147 = load ptr, ptr %146, align 8, !tbaa !22
  %148 = load ptr, ptr %11, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.IKCPSEG, ptr %148, i32 0, i32 0
  %150 = getelementptr inbounds %struct.IQUEUEHEAD, ptr %149, i32 0, i32 0
  %151 = load ptr, ptr %150, align 8, !tbaa !21
  %152 = getelementptr inbounds %struct.IQUEUEHEAD, ptr %151, i32 0, i32 1
  store ptr %147, ptr %152, align 8, !tbaa !18
  %153 = load ptr, ptr %11, 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 0
  %156 = load ptr, ptr %155, align 8, !tbaa !21
  %157 = load ptr, ptr %11, 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 1
  %160 = load ptr, ptr %159, align 8, !tbaa !22
  %161 = getelementptr inbounds %struct.IQUEUEHEAD, ptr %160, i32 0, i32 0
  store ptr %156, ptr %161, align 8, !tbaa !23
  %162 = load ptr, ptr %11, 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
  store ptr null, ptr %164, align 8, !tbaa !21
  %165 = load ptr, ptr %11, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct.IKCPSEG, ptr %165, i32 0, i32 0
  %167 = getelementptr inbounds %struct.IQUEUEHEAD, ptr %166, i32 0, i32 1
  store ptr null, ptr %167, align 8, !tbaa !22
  %168 = load ptr, ptr %3, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.IKCPCB, ptr %168, i32 0, i32 23
  %170 = load i32, ptr %169, align 4, !tbaa !24
  %171 = add i32 %170, -1
  store i32 %171, ptr %169, align 4, !tbaa !24
  %172 = load ptr, ptr %3, align 8, !tbaa !5
  %173 = getelementptr inbounds %struct.IKCPCB, ptr %172, i32 0, i32 34
  %174 = getelementptr inbounds %struct.IQUEUEHEAD, ptr %173, i32 0, i32 1
  %175 = load ptr, ptr %174, align 8, !tbaa !27
  %176 = load ptr, ptr %11, align 8, !tbaa !5
  %177 = getelementptr inbounds %struct.IKCPSEG, ptr %176, i32 0, i32 0
  %178 = getelementptr inbounds %struct.IQUEUEHEAD, ptr %177, i32 0, i32 1
  store ptr %175, ptr %178, align 8, !tbaa !22
  %179 = load ptr, ptr %3, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct.IKCPCB, ptr %179, i32 0, i32 34
  %181 = load ptr, ptr %11, align 8, !tbaa !5
  %182 = getelementptr inbounds %struct.IKCPSEG, ptr %181, i32 0, i32 0
  %183 = getelementptr inbounds %struct.IQUEUEHEAD, ptr %182, i32 0, i32 0
  store ptr %180, ptr %183, align 8, !tbaa !21
  %184 = load ptr, ptr %11, align 8, !tbaa !5
  %185 = getelementptr inbounds %struct.IKCPSEG, ptr %184, i32 0, i32 0
  %186 = load ptr, ptr %3, align 8, !tbaa !5
  %187 = getelementptr inbounds %struct.IKCPCB, ptr %186, i32 0, i32 34
  %188 = getelementptr inbounds %struct.IQUEUEHEAD, ptr %187, i32 0, i32 1
  %189 = load ptr, ptr %188, align 8, !tbaa !27
  %190 = getelementptr inbounds %struct.IQUEUEHEAD, ptr %189, i32 0, i32 0
  store ptr %185, ptr %190, align 8, !tbaa !23
  %191 = load ptr, ptr %11, align 8, !tbaa !5
  %192 = getelementptr inbounds %struct.IKCPSEG, ptr %191, i32 0, i32 0
  %193 = load ptr, ptr %3, align 8, !tbaa !5
  %194 = getelementptr inbounds %struct.IKCPCB, ptr %193, i32 0, i32 34
  %195 = getelementptr inbounds %struct.IQUEUEHEAD, ptr %194, i32 0, i32 1
  store ptr %192, ptr %195, align 8, !tbaa !27
  %196 = load ptr, ptr %3, align 8, !tbaa !5
  %197 = getelementptr inbounds %struct.IKCPCB, ptr %196, i32 0, i32 25
  %198 = load i32, ptr %197, align 4, !tbaa !26
  %199 = add i32 %198, 1
  store i32 %199, ptr %197, align 4, !tbaa !26
  %200 = load ptr, ptr %3, align 8, !tbaa !5
  %201 = getelementptr inbounds %struct.IKCPCB, ptr %200, i32 0, i32 6
  %202 = load i32, ptr %201, align 8, !tbaa !14
  %203 = add i32 %202, 1
  store i32 %203, ptr %201, align 8, !tbaa !14
  br label %205

204:                                              ; preds = %135, %122
  store i32 6, ptr %9, align 4
  br label %206

205:                                              ; preds = %143
  store i32 0, ptr %9, align 4
  br label %206

206:                                              ; preds = %205, %204
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  %207 = load i32, ptr %9, align 4
  switch i32 %207, label %213 [
    i32 0, label %208
    i32 6, label %209
  ]

208:                                              ; preds = %206
  br label %113, !llvm.loop !28

209:                                              ; preds = %206, %113
  store i32 0, ptr %9, align 4
  br label %210

210:                                              ; preds = %209, %32
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #3
  %211 = load i32, ptr %9, align 4
  switch i32 %211, label %213 [
    i32 0, label %212
    i32 1, label %212
  ]

212:                                              ; preds = %210, %210
  ret void

213:                                              ; preds = %210, %206, %66
  unreachable
}

; Function Attrs: alwaysinline nounwind uwtable
declare hidden i64 @_itimediff(i32 noundef, i32 noundef) #2

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 = { alwaysinline 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 }

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


; 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"

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

; Function Attrs: nounwind uwtable
define dso_local void @ikcp_parse_data(ptr noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = getelementptr inbounds i8, ptr %1, i64 36
  %4 = load i32, ptr %3, align 4, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %0, i64 24
  %6 = load i32, ptr %5, align 8, !tbaa !12
  %7 = getelementptr inbounds i8, ptr %0, i64 60
  %8 = load i32, ptr %7, align 4, !tbaa !14
  %9 = add i32 %8, %6
  %10 = tail call i64 @_itimediff(i32 noundef %4, i32 noundef %9)
  %11 = icmp sgt i64 %10, -1
  br i1 %11, label %16, label %12

12:                                               ; preds = %2
  %13 = load i32, ptr %5, align 8, !tbaa !12
  %14 = tail call i64 @_itimediff(i32 noundef %4, i32 noundef %13)
  %15 = icmp slt i64 %14, 0
  br i1 %15, label %16, label %17

16:                                               ; preds = %12, %2
  tail call void @ikcp_segment_delete(ptr noundef nonnull %0, ptr noundef nonnull %1)
  br label %.thread71

17:                                               ; preds = %12
  %18 = getelementptr inbounds i8, ptr %0, i64 184
  %19 = getelementptr inbounds i8, ptr %0, i64 192
  %20 = load ptr, ptr %19, align 8, !tbaa !15
  br label %21

21:                                               ; preds = %26, %17
  %.0 = phi ptr [ %20, %17 ], [ %28, %26 ]
  %.not = icmp eq ptr %.0, %18
  br i1 %.not, label %.thread, label %22

22:                                               ; preds = %21
  %23 = getelementptr inbounds i8, ptr %.0, i64 36
  %24 = load i32, ptr %23, align 4, !tbaa !5
  %25 = icmp eq i32 %24, %4
  br i1 %25, label %.thread.thread, label %26

26:                                               ; preds = %22
  %27 = getelementptr inbounds i8, ptr %.0, i64 8
  %28 = load ptr, ptr %27, align 8, !tbaa !16
  %29 = tail call i64 @_itimediff(i32 noundef %4, i32 noundef %24)
  %30 = icmp sgt i64 %29, 0
  br i1 %30, label %.thread, label %21, !llvm.loop !17

.thread:                                          ; preds = %21, %26
  store ptr %1, ptr %1, align 8, !tbaa !19
  %31 = getelementptr inbounds i8, ptr %1, i64 8
  store ptr %.0, ptr %31, align 8, !tbaa !20
  %32 = load ptr, ptr %.0, align 8, !tbaa !21
  store ptr %32, ptr %1, align 8, !tbaa !19
  %33 = getelementptr inbounds i8, ptr %32, i64 8
  store ptr %1, ptr %33, align 8, !tbaa !16
  store ptr %1, ptr %.0, align 8, !tbaa !21
  %34 = getelementptr inbounds i8, ptr %0, i64 92
  %35 = load i32, ptr %34, align 4, !tbaa !22
  %36 = add i32 %35, 1
  store i32 %36, ptr %34, align 4, !tbaa !22
  br label %37

.thread.thread:                                   ; preds = %22
  tail call void @ikcp_segment_delete(ptr noundef %0, ptr noundef %1)
  br label %37

37:                                               ; preds = %.thread.thread, %.thread
  %38 = getelementptr inbounds i8, ptr %0, i64 100
  %39 = load ptr, ptr %18, align 8, !tbaa !23
  %.not6476 = icmp eq ptr %18, %39
  br i1 %.not6476, label %.thread71, label %.lr.ph

.lr.ph:                                           ; preds = %37
  %40 = getelementptr inbounds i8, ptr %0, i64 92
  %41 = getelementptr inbounds i8, ptr %0, i64 152
  %42 = getelementptr inbounds i8, ptr %0, i64 160
  %.promoted = load i32, ptr %5, align 8, !tbaa !12
  br label %43

43:                                               ; preds = %.lr.ph, %53
  %44 = phi i32 [ %.promoted, %.lr.ph ], [ %62, %53 ]
  %45 = phi ptr [ %39, %.lr.ph ], [ %63, %53 ]
  %46 = getelementptr inbounds i8, ptr %45, i64 36
  %47 = load i32, ptr %46, align 4, !tbaa !5
  %48 = icmp eq i32 %47, %44
  br i1 %48, label %49, label %.thread71

49:                                               ; preds = %43
  %50 = load i32, ptr %38, align 4, !tbaa !24
  %51 = load i32, ptr %7, align 4, !tbaa !14
  %52 = icmp ult i32 %50, %51
  br i1 %52, label %53, label %.thread71

53:                                               ; preds = %49
  %54 = getelementptr inbounds i8, ptr %45, i64 8
  %55 = load ptr, ptr %54, align 8, !tbaa !20
  %56 = load ptr, ptr %45, align 8, !tbaa !19
  %57 = getelementptr inbounds i8, ptr %56, i64 8
  store ptr %55, ptr %57, align 8, !tbaa !16
  store ptr %56, ptr %55, align 8, !tbaa !21
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %45, i8 0, i64 16, i1 false)
  %58 = load i32, ptr %40, align 4, !tbaa !22
  %59 = add i32 %58, -1
  store i32 %59, ptr %40, align 4, !tbaa !22
  %60 = load ptr, ptr %42, align 8, !tbaa !25
  store ptr %60, ptr %54, align 8, !tbaa !20
  store ptr %41, ptr %45, align 8, !tbaa !19
  store ptr %45, ptr %60, align 8, !tbaa !21
  store ptr %45, ptr %42, align 8, !tbaa !25
  %61 = add nuw i32 %50, 1
  store i32 %61, ptr %38, align 4, !tbaa !24
  %62 = add i32 %44, 1
  store i32 %62, ptr %5, align 8, !tbaa !12
  %63 = load ptr, ptr %18, align 8, !tbaa !23
  %.not64 = icmp eq ptr %18, %63
  br i1 %.not64, label %.thread71, label %43

.thread71:                                        ; preds = %53, %49, %43, %37, %16
  ret void
}

; Function Attrs: alwaysinline nounwind uwtable
declare hidden i64 @_itimediff(i32 noundef, i32 noundef) local_unnamed_addr #1

; 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 = { alwaysinline 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 = { nocallback nofree nounwind willreturn memory(argmem: write) }

!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 36}
!6 = !{!"IKCPSEG", !7, 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, !9, i64 64}
!7 = !{!"IQUEUEHEAD", !8, i64 0, !8, i64 8}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C/C++ TBAA"}
!11 = !{!"int", !9, i64 0}
!12 = !{!13, !11, i64 24}
!13 = !{!"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, !7, i64 136, !7, i64 152, !7, i64 168, !7, i64 184, !8, i64 200, !11, i64 208, !11, i64 212, !8, i64 216, !8, i64 224, !11, i64 232, !11, i64 236, !11, i64 240, !11, i64 244, !11, i64 248, !8, i64 256, !8, i64 264}
!14 = !{!13, !11, i64 60}
!15 = !{!13, !8, i64 192}
!16 = !{!7, !8, i64 8}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!6, !8, i64 0}
!20 = !{!6, !8, i64 8}
!21 = !{!7, !8, i64 0}
!22 = !{!13, !11, i64 92}
!23 = !{!13, !8, i64 184}
!24 = !{!13, !11, i64 100}
!25 = !{!13, !8, i64 160}


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