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

; 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
define dso_local ptr @ikcp_create(i32 noundef %0, ptr noundef %1) #1 {
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #2
  %8 = call ptr @ikcp_malloc(i64 noundef 272)
  store ptr %8, ptr %6, align 8, !tbaa !9
  %9 = load ptr, ptr %6, align 8, !tbaa !9
  %10 = icmp eq ptr %9, null
  br i1 %10, label %11, label %12

11:                                               ; preds = %2
  store ptr null, ptr %3, align 8
  store i32 1, ptr %7, align 4
  br label %164

12:                                               ; preds = %2
  %13 = load i32, ptr %4, align 4, !tbaa !5
  %14 = load ptr, ptr %6, align 8, !tbaa !9
  %15 = getelementptr inbounds %struct.IKCPCB, ptr %14, i32 0, i32 0
  store i32 %13, ptr %15, align 8, !tbaa !11
  %16 = load ptr, ptr %5, align 8, !tbaa !9
  %17 = load ptr, ptr %6, align 8, !tbaa !9
  %18 = getelementptr inbounds %struct.IKCPCB, ptr %17, i32 0, i32 40
  store ptr %16, ptr %18, align 8, !tbaa !14
  %19 = load ptr, ptr %6, align 8, !tbaa !9
  %20 = getelementptr inbounds %struct.IKCPCB, ptr %19, i32 0, i32 4
  store i32 0, ptr %20, align 8, !tbaa !15
  %21 = load ptr, ptr %6, align 8, !tbaa !9
  %22 = getelementptr inbounds %struct.IKCPCB, ptr %21, i32 0, i32 5
  store i32 0, ptr %22, align 4, !tbaa !16
  %23 = load ptr, ptr %6, align 8, !tbaa !9
  %24 = getelementptr inbounds %struct.IKCPCB, ptr %23, i32 0, i32 6
  store i32 0, ptr %24, align 8, !tbaa !17
  %25 = load ptr, ptr %6, align 8, !tbaa !9
  %26 = getelementptr inbounds %struct.IKCPCB, ptr %25, i32 0, i32 7
  store i32 0, ptr %26, align 4, !tbaa !18
  %27 = load ptr, ptr %6, align 8, !tbaa !9
  %28 = getelementptr inbounds %struct.IKCPCB, ptr %27, i32 0, i32 8
  store i32 0, ptr %28, align 8, !tbaa !19
  %29 = load ptr, ptr %6, align 8, !tbaa !9
  %30 = getelementptr inbounds %struct.IKCPCB, ptr %29, i32 0, i32 29
  store i32 0, ptr %30, align 4, !tbaa !20
  %31 = load ptr, ptr %6, align 8, !tbaa !9
  %32 = getelementptr inbounds %struct.IKCPCB, ptr %31, i32 0, i32 30
  store i32 0, ptr %32, align 8, !tbaa !21
  %33 = load ptr, ptr %6, align 8, !tbaa !9
  %34 = getelementptr inbounds %struct.IKCPCB, ptr %33, i32 0, i32 14
  store i32 32, ptr %34, align 8, !tbaa !22
  %35 = load ptr, ptr %6, align 8, !tbaa !9
  %36 = getelementptr inbounds %struct.IKCPCB, ptr %35, i32 0, i32 15
  store i32 128, ptr %36, align 4, !tbaa !23
  %37 = load ptr, ptr %6, align 8, !tbaa !9
  %38 = getelementptr inbounds %struct.IKCPCB, ptr %37, i32 0, i32 16
  store i32 128, ptr %38, align 8, !tbaa !24
  %39 = load ptr, ptr %6, align 8, !tbaa !9
  %40 = getelementptr inbounds %struct.IKCPCB, ptr %39, i32 0, i32 17
  store i32 0, ptr %40, align 4, !tbaa !25
  %41 = load ptr, ptr %6, align 8, !tbaa !9
  %42 = getelementptr inbounds %struct.IKCPCB, ptr %41, i32 0, i32 32
  store i32 0, ptr %42, align 8, !tbaa !26
  %43 = load ptr, ptr %6, align 8, !tbaa !9
  %44 = getelementptr inbounds %struct.IKCPCB, ptr %43, i32 0, i32 18
  store i32 0, ptr %44, align 8, !tbaa !27
  %45 = load ptr, ptr %6, align 8, !tbaa !9
  %46 = getelementptr inbounds %struct.IKCPCB, ptr %45, i32 0, i32 1
  store i32 1400, ptr %46, align 4, !tbaa !28
  %47 = load ptr, ptr %6, align 8, !tbaa !9
  %48 = getelementptr inbounds %struct.IKCPCB, ptr %47, i32 0, i32 1
  %49 = load i32, ptr %48, align 4, !tbaa !28
  %50 = sub i32 %49, 24
  %51 = load ptr, ptr %6, align 8, !tbaa !9
  %52 = getelementptr inbounds %struct.IKCPCB, ptr %51, i32 0, i32 2
  store i32 %50, ptr %52, align 8, !tbaa !29
  %53 = load ptr, ptr %6, align 8, !tbaa !9
  %54 = getelementptr inbounds %struct.IKCPCB, ptr %53, i32 0, i32 45
  store i32 0, ptr %54, align 4, !tbaa !30
  %55 = load ptr, ptr %6, align 8, !tbaa !9
  %56 = getelementptr inbounds %struct.IKCPCB, ptr %55, i32 0, i32 1
  %57 = load i32, ptr %56, align 4, !tbaa !28
  %58 = add i32 %57, 24
  %59 = mul i32 %58, 3
  %60 = zext i32 %59 to i64
  %61 = call ptr @ikcp_malloc(i64 noundef %60)
  %62 = load ptr, ptr %6, align 8, !tbaa !9
  %63 = getelementptr inbounds %struct.IKCPCB, ptr %62, i32 0, i32 41
  store ptr %61, ptr %63, align 8, !tbaa !31
  %64 = load ptr, ptr %6, align 8, !tbaa !9
  %65 = getelementptr inbounds %struct.IKCPCB, ptr %64, i32 0, i32 41
  %66 = load ptr, ptr %65, align 8, !tbaa !31
  %67 = icmp eq ptr %66, null
  br i1 %67, label %68, label %70

68:                                               ; preds = %12
  %69 = load ptr, ptr %6, align 8, !tbaa !9
  call void @ikcp_free(ptr noundef %69)
  store ptr null, ptr %3, align 8
  store i32 1, ptr %7, align 4
  br label %164

70:                                               ; preds = %12
  %71 = load ptr, ptr %6, align 8, !tbaa !9
  %72 = getelementptr inbounds %struct.IKCPCB, ptr %71, i32 0, i32 33
  %73 = load ptr, ptr %6, align 8, !tbaa !9
  %74 = getelementptr inbounds %struct.IKCPCB, ptr %73, i32 0, i32 33
  %75 = getelementptr inbounds %struct.IQUEUEHEAD, ptr %74, i32 0, i32 0
  store ptr %72, ptr %75, align 8, !tbaa !32
  %76 = load ptr, ptr %6, align 8, !tbaa !9
  %77 = getelementptr inbounds %struct.IKCPCB, ptr %76, i32 0, i32 33
  %78 = load ptr, ptr %6, align 8, !tbaa !9
  %79 = getelementptr inbounds %struct.IKCPCB, ptr %78, i32 0, i32 33
  %80 = getelementptr inbounds %struct.IQUEUEHEAD, ptr %79, i32 0, i32 1
  store ptr %77, ptr %80, align 8, !tbaa !33
  %81 = load ptr, ptr %6, align 8, !tbaa !9
  %82 = getelementptr inbounds %struct.IKCPCB, ptr %81, i32 0, i32 34
  %83 = load ptr, ptr %6, align 8, !tbaa !9
  %84 = getelementptr inbounds %struct.IKCPCB, ptr %83, i32 0, i32 34
  %85 = getelementptr inbounds %struct.IQUEUEHEAD, ptr %84, i32 0, i32 0
  store ptr %82, ptr %85, align 8, !tbaa !34
  %86 = load ptr, ptr %6, align 8, !tbaa !9
  %87 = getelementptr inbounds %struct.IKCPCB, ptr %86, i32 0, i32 34
  %88 = load ptr, ptr %6, align 8, !tbaa !9
  %89 = getelementptr inbounds %struct.IKCPCB, ptr %88, i32 0, i32 34
  %90 = getelementptr inbounds %struct.IQUEUEHEAD, ptr %89, i32 0, i32 1
  store ptr %87, ptr %90, align 8, !tbaa !35
  %91 = load ptr, ptr %6, align 8, !tbaa !9
  %92 = getelementptr inbounds %struct.IKCPCB, ptr %91, i32 0, i32 35
  %93 = load ptr, ptr %6, align 8, !tbaa !9
  %94 = getelementptr inbounds %struct.IKCPCB, ptr %93, i32 0, i32 35
  %95 = getelementptr inbounds %struct.IQUEUEHEAD, ptr %94, i32 0, i32 0
  store ptr %92, ptr %95, align 8, !tbaa !36
  %96 = load ptr, ptr %6, align 8, !tbaa !9
  %97 = getelementptr inbounds %struct.IKCPCB, ptr %96, i32 0, i32 35
  %98 = load ptr, ptr %6, align 8, !tbaa !9
  %99 = getelementptr inbounds %struct.IKCPCB, ptr %98, i32 0, i32 35
  %100 = getelementptr inbounds %struct.IQUEUEHEAD, ptr %99, i32 0, i32 1
  store ptr %97, ptr %100, align 8, !tbaa !37
  %101 = load ptr, ptr %6, align 8, !tbaa !9
  %102 = getelementptr inbounds %struct.IKCPCB, ptr %101, i32 0, i32 36
  %103 = load ptr, ptr %6, align 8, !tbaa !9
  %104 = getelementptr inbounds %struct.IKCPCB, ptr %103, i32 0, i32 36
  %105 = getelementptr inbounds %struct.IQUEUEHEAD, ptr %104, i32 0, i32 0
  store ptr %102, ptr %105, align 8, !tbaa !38
  %106 = load ptr, ptr %6, align 8, !tbaa !9
  %107 = getelementptr inbounds %struct.IKCPCB, ptr %106, i32 0, i32 36
  %108 = load ptr, ptr %6, align 8, !tbaa !9
  %109 = getelementptr inbounds %struct.IKCPCB, ptr %108, i32 0, i32 36
  %110 = getelementptr inbounds %struct.IQUEUEHEAD, ptr %109, i32 0, i32 1
  store ptr %107, ptr %110, align 8, !tbaa !39
  %111 = load ptr, ptr %6, align 8, !tbaa !9
  %112 = getelementptr inbounds %struct.IKCPCB, ptr %111, i32 0, i32 23
  store i32 0, ptr %112, align 4, !tbaa !40
  %113 = load ptr, ptr %6, align 8, !tbaa !9
  %114 = getelementptr inbounds %struct.IKCPCB, ptr %113, i32 0, i32 24
  store i32 0, ptr %114, align 8, !tbaa !41
  %115 = load ptr, ptr %6, align 8, !tbaa !9
  %116 = getelementptr inbounds %struct.IKCPCB, ptr %115, i32 0, i32 25
  store i32 0, ptr %116, align 4, !tbaa !42
  %117 = load ptr, ptr %6, align 8, !tbaa !9
  %118 = getelementptr inbounds %struct.IKCPCB, ptr %117, i32 0, i32 26
  store i32 0, ptr %118, align 8, !tbaa !43
  %119 = load ptr, ptr %6, align 8, !tbaa !9
  %120 = getelementptr inbounds %struct.IKCPCB, ptr %119, i32 0, i32 3
  store i32 0, ptr %120, align 4, !tbaa !44
  %121 = load ptr, ptr %6, align 8, !tbaa !9
  %122 = getelementptr inbounds %struct.IKCPCB, ptr %121, i32 0, i32 37
  store ptr null, ptr %122, align 8, !tbaa !45
  %123 = load ptr, ptr %6, align 8, !tbaa !9
  %124 = getelementptr inbounds %struct.IKCPCB, ptr %123, i32 0, i32 39
  store i32 0, ptr %124, align 4, !tbaa !46
  %125 = load ptr, ptr %6, align 8, !tbaa !9
  %126 = getelementptr inbounds %struct.IKCPCB, ptr %125, i32 0, i32 38
  store i32 0, ptr %126, align 8, !tbaa !47
  %127 = load ptr, ptr %6, align 8, !tbaa !9
  %128 = getelementptr inbounds %struct.IKCPCB, ptr %127, i32 0, i32 11
  store i32 0, ptr %128, align 4, !tbaa !48
  %129 = load ptr, ptr %6, align 8, !tbaa !9
  %130 = getelementptr inbounds %struct.IKCPCB, ptr %129, i32 0, i32 10
  store i32 0, ptr %130, align 8, !tbaa !49
  %131 = load ptr, ptr %6, align 8, !tbaa !9
  %132 = getelementptr inbounds %struct.IKCPCB, ptr %131, i32 0, i32 12
  store i32 200, ptr %132, align 8, !tbaa !50
  %133 = load ptr, ptr %6, align 8, !tbaa !9
  %134 = getelementptr inbounds %struct.IKCPCB, ptr %133, i32 0, i32 13
  store i32 100, ptr %134, align 4, !tbaa !51
  %135 = load ptr, ptr %6, align 8, !tbaa !9
  %136 = getelementptr inbounds %struct.IKCPCB, ptr %135, i32 0, i32 19
  store i32 0, ptr %136, align 4, !tbaa !52
  %137 = load ptr, ptr %6, align 8, !tbaa !9
  %138 = getelementptr inbounds %struct.IKCPCB, ptr %137, i32 0, i32 20
  store i32 100, ptr %138, align 8, !tbaa !53
  %139 = load ptr, ptr %6, align 8, !tbaa !9
  %140 = getelementptr inbounds %struct.IKCPCB, ptr %139, i32 0, i32 21
  store i32 100, ptr %140, align 4, !tbaa !54
  %141 = load ptr, ptr %6, align 8, !tbaa !9
  %142 = getelementptr inbounds %struct.IKCPCB, ptr %141, i32 0, i32 27
  store i32 0, ptr %142, align 4, !tbaa !55
  %143 = load ptr, ptr %6, align 8, !tbaa !9
  %144 = getelementptr inbounds %struct.IKCPCB, ptr %143, i32 0, i32 28
  store i32 0, ptr %144, align 8, !tbaa !56
  %145 = load ptr, ptr %6, align 8, !tbaa !9
  %146 = getelementptr inbounds %struct.IKCPCB, ptr %145, i32 0, i32 46
  store i32 0, ptr %146, align 8, !tbaa !57
  %147 = load ptr, ptr %6, align 8, !tbaa !9
  %148 = getelementptr inbounds %struct.IKCPCB, ptr %147, i32 0, i32 9
  store i32 2, ptr %148, align 4, !tbaa !58
  %149 = load ptr, ptr %6, align 8, !tbaa !9
  %150 = getelementptr inbounds %struct.IKCPCB, ptr %149, i32 0, i32 42
  store i32 0, ptr %150, align 8, !tbaa !59
  %151 = load ptr, ptr %6, align 8, !tbaa !9
  %152 = getelementptr inbounds %struct.IKCPCB, ptr %151, i32 0, i32 43
  store i32 5, ptr %152, align 4, !tbaa !60
  %153 = load ptr, ptr %6, align 8, !tbaa !9
  %154 = getelementptr inbounds %struct.IKCPCB, ptr %153, i32 0, i32 44
  store i32 0, ptr %154, align 8, !tbaa !61
  %155 = load ptr, ptr %6, align 8, !tbaa !9
  %156 = getelementptr inbounds %struct.IKCPCB, ptr %155, i32 0, i32 22
  store i32 0, ptr %156, align 8, !tbaa !62
  %157 = load ptr, ptr %6, align 8, !tbaa !9
  %158 = getelementptr inbounds %struct.IKCPCB, ptr %157, i32 0, i32 31
  store i32 20, ptr %158, align 4, !tbaa !63
  %159 = load ptr, ptr %6, align 8, !tbaa !9
  %160 = getelementptr inbounds %struct.IKCPCB, ptr %159, i32 0, i32 47
  store ptr null, ptr %160, align 8, !tbaa !64
  %161 = load ptr, ptr %6, align 8, !tbaa !9
  %162 = getelementptr inbounds %struct.IKCPCB, ptr %161, i32 0, i32 48
  store ptr null, ptr %162, align 8, !tbaa !65
  %163 = load ptr, ptr %6, align 8, !tbaa !9
  store ptr %163, ptr %3, align 8
  store i32 1, ptr %7, align 4
  br label %164

164:                                              ; preds = %70, %68, %11
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #2
  %165 = load ptr, ptr %3, align 8
  ret ptr %165
}

; Function Attrs: nounwind uwtable
declare hidden ptr @ikcp_malloc(i64 noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @ikcp_free(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 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"IKCPCB", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !6, i64 24, !6, i64 28, !6, i64 32, !6, i64 36, !6, i64 40, !6, i64 44, !6, i64 48, !6, i64 52, !6, i64 56, !6, i64 60, !6, i64 64, !6, i64 68, !6, i64 72, !6, i64 76, !6, i64 80, !6, i64 84, !6, i64 88, !6, i64 92, !6, i64 96, !6, i64 100, !6, i64 104, !6, i64 108, !6, i64 112, !6, i64 116, !6, i64 120, !6, i64 124, !6, i64 128, !13, i64 136, !13, i64 152, !13, i64 168, !13, i64 184, !10, i64 200, !6, i64 208, !6, i64 212, !10, i64 216, !10, i64 224, !6, i64 232, !6, i64 236, !6, i64 240, !6, i64 244, !6, i64 248, !10, i64 256, !10, i64 264}
!13 = !{!"IQUEUEHEAD", !10, i64 0, !10, i64 8}
!14 = !{!12, !10, i64 216}
!15 = !{!12, !6, i64 16}
!16 = !{!12, !6, i64 20}
!17 = !{!12, !6, i64 24}
!18 = !{!12, !6, i64 28}
!19 = !{!12, !6, i64 32}
!20 = !{!12, !6, i64 116}
!21 = !{!12, !6, i64 120}
!22 = !{!12, !6, i64 56}
!23 = !{!12, !6, i64 60}
!24 = !{!12, !6, i64 64}
!25 = !{!12, !6, i64 68}
!26 = !{!12, !6, i64 128}
!27 = !{!12, !6, i64 72}
!28 = !{!12, !6, i64 4}
!29 = !{!12, !6, i64 8}
!30 = !{!12, !6, i64 244}
!31 = !{!12, !10, i64 224}
!32 = !{!12, !10, i64 136}
!33 = !{!12, !10, i64 144}
!34 = !{!12, !10, i64 152}
!35 = !{!12, !10, i64 160}
!36 = !{!12, !10, i64 168}
!37 = !{!12, !10, i64 176}
!38 = !{!12, !10, i64 184}
!39 = !{!12, !10, i64 192}
!40 = !{!12, !6, i64 92}
!41 = !{!12, !6, i64 96}
!42 = !{!12, !6, i64 100}
!43 = !{!12, !6, i64 104}
!44 = !{!12, !6, i64 12}
!45 = !{!12, !10, i64 200}
!46 = !{!12, !6, i64 212}
!47 = !{!12, !6, i64 208}
!48 = !{!12, !6, i64 44}
!49 = !{!12, !6, i64 40}
!50 = !{!12, !6, i64 48}
!51 = !{!12, !6, i64 52}
!52 = !{!12, !6, i64 76}
!53 = !{!12, !6, i64 80}
!54 = !{!12, !6, i64 84}
!55 = !{!12, !6, i64 108}
!56 = !{!12, !6, i64 112}
!57 = !{!12, !6, i64 248}
!58 = !{!12, !6, i64 36}
!59 = !{!12, !6, i64 232}
!60 = !{!12, !6, i64 236}
!61 = !{!12, !6, i64 240}
!62 = !{!12, !6, i64 88}
!63 = !{!12, !6, i64 124}
!64 = !{!12, !10, i64 256}
!65 = !{!12, !10, i64 264}


; 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
define dso_local ptr @ikcp_create(i32 noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = tail call ptr @ikcp_malloc(i64 noundef 272)
  %4 = icmp eq ptr %3, null
  br i1 %4, label %43, label %5

5:                                                ; preds = %2
  store i32 %0, ptr %3, align 8, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %3, i64 216
  store ptr %1, ptr %6, align 8, !tbaa !12
  %7 = getelementptr inbounds i8, ptr %3, i64 16
  %8 = getelementptr inbounds i8, ptr %3, i64 116
  store i32 0, ptr %8, align 4, !tbaa !13
  %9 = getelementptr inbounds i8, ptr %3, i64 120
  store i32 0, ptr %9, align 8, !tbaa !14
  %10 = getelementptr inbounds i8, ptr %3, i64 56
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(20) %7, i8 0, i64 20, i1 false)
  store <4 x i32> <i32 32, i32 128, i32 128, i32 0>, ptr %10, align 8, !tbaa !15
  %11 = getelementptr inbounds i8, ptr %3, i64 128
  store i32 0, ptr %11, align 8, !tbaa !16
  %12 = getelementptr inbounds i8, ptr %3, i64 72
  store i32 0, ptr %12, align 8, !tbaa !17
  %13 = getelementptr inbounds i8, ptr %3, i64 4
  store i32 1400, ptr %13, align 4, !tbaa !18
  %14 = getelementptr inbounds i8, ptr %3, i64 8
  store i32 1376, ptr %14, align 8, !tbaa !19
  %15 = getelementptr inbounds i8, ptr %3, i64 244
  store i32 0, ptr %15, align 4, !tbaa !20
  %16 = tail call ptr @ikcp_malloc(i64 noundef 4272)
  %17 = getelementptr inbounds i8, ptr %3, i64 224
  store ptr %16, ptr %17, align 8, !tbaa !21
  %18 = icmp eq ptr %16, null
  br i1 %18, label %19, label %20

19:                                               ; preds = %5
  tail call void @ikcp_free(ptr noundef nonnull %3)
  br label %43

20:                                               ; preds = %5
  %21 = getelementptr inbounds i8, ptr %3, i64 136
  store ptr %21, ptr %21, align 8, !tbaa !22
  %22 = getelementptr inbounds i8, ptr %3, i64 144
  store ptr %21, ptr %22, align 8, !tbaa !23
  %23 = getelementptr inbounds i8, ptr %3, i64 152
  store ptr %23, ptr %23, align 8, !tbaa !24
  %24 = getelementptr inbounds i8, ptr %3, i64 160
  store ptr %23, ptr %24, align 8, !tbaa !25
  %25 = getelementptr inbounds i8, ptr %3, i64 168
  store ptr %25, ptr %25, align 8, !tbaa !26
  %26 = getelementptr inbounds i8, ptr %3, i64 176
  store ptr %25, ptr %26, align 8, !tbaa !27
  %27 = getelementptr inbounds i8, ptr %3, i64 184
  store ptr %27, ptr %27, align 8, !tbaa !28
  %28 = getelementptr inbounds i8, ptr %3, i64 192
  store ptr %27, ptr %28, align 8, !tbaa !29
  %29 = getelementptr inbounds i8, ptr %3, i64 92
  %30 = getelementptr inbounds i8, ptr %3, i64 12
  store i32 0, ptr %30, align 4, !tbaa !30
  %31 = getelementptr inbounds i8, ptr %3, i64 200
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %29, i8 0, i64 16, i1 false)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %31, i8 0, i64 16, i1 false)
  %32 = getelementptr inbounds i8, ptr %3, i64 52
  store i32 100, ptr %32, align 4, !tbaa !31
  %33 = getelementptr inbounds i8, ptr %3, i64 76
  %34 = getelementptr inbounds i8, ptr %3, i64 108
  store i32 0, ptr %34, align 4, !tbaa !32
  %35 = getelementptr inbounds i8, ptr %3, i64 112
  store i32 0, ptr %35, align 8, !tbaa !33
  %36 = getelementptr inbounds i8, ptr %3, i64 248
  store i32 0, ptr %36, align 8, !tbaa !34
  %37 = getelementptr inbounds i8, ptr %3, i64 36
  store <4 x i32> <i32 2, i32 0, i32 0, i32 200>, ptr %37, align 4, !tbaa !15
  %38 = getelementptr inbounds i8, ptr %3, i64 232
  store i32 0, ptr %38, align 8, !tbaa !35
  %39 = getelementptr inbounds i8, ptr %3, i64 236
  store i32 5, ptr %39, align 4, !tbaa !36
  %40 = getelementptr inbounds i8, ptr %3, i64 240
  store i32 0, ptr %40, align 8, !tbaa !37
  store <4 x i32> <i32 0, i32 100, i32 100, i32 0>, ptr %33, align 4, !tbaa !15
  %41 = getelementptr inbounds i8, ptr %3, i64 124
  store i32 20, ptr %41, align 4, !tbaa !38
  %42 = getelementptr inbounds i8, ptr %3, i64 256
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %42, i8 0, i64 16, i1 false)
  br label %43

43:                                               ; preds = %2, %20, %19
  %.0 = phi ptr [ null, %19 ], [ %3, %20 ], [ null, %2 ]
  ret ptr %.0
}

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

; Function Attrs: nounwind uwtable
declare hidden void @ikcp_free(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) #1

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree 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, !7, i64 0}
!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 216}
!13 = !{!6, !7, i64 116}
!14 = !{!6, !7, i64 120}
!15 = !{!7, !7, i64 0}
!16 = !{!6, !7, i64 128}
!17 = !{!6, !7, i64 72}
!18 = !{!6, !7, i64 4}
!19 = !{!6, !7, i64 8}
!20 = !{!6, !7, i64 244}
!21 = !{!6, !11, i64 224}
!22 = !{!6, !11, i64 136}
!23 = !{!6, !11, i64 144}
!24 = !{!6, !11, i64 152}
!25 = !{!6, !11, i64 160}
!26 = !{!6, !11, i64 168}
!27 = !{!6, !11, i64 176}
!28 = !{!6, !11, i64 184}
!29 = !{!6, !11, i64 192}
!30 = !{!6, !7, i64 12}
!31 = !{!6, !7, i64 52}
!32 = !{!6, !7, i64 108}
!33 = !{!6, !7, i64 112}
!34 = !{!6, !7, i64 248}
!35 = !{!6, !7, i64 232}
!36 = !{!6, !7, i64 236}
!37 = !{!6, !7, i64 240}
!38 = !{!6, !7, i64 124}


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