; LLVM IR from nem0/lumixengine_net :: external/enet (peer)

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

%union._ENetProtocol = type { %struct._ENetProtocolConnect }
%struct._ENetProtocolConnect = type { %struct._ENetProtocolCommandHeader, i16, i8, i8, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
%struct._ENetProtocolCommandHeader = type { i8, i8, i16 }
%struct._ENetList = type { %struct._ENetListNode }
%struct._ENetListNode = type { ptr, ptr }
%struct._ENetPeer = type { %struct._ENetListNode, ptr, i16, i16, i32, i8, i8, %struct._ENetAddress, ptr, i32, ptr, i64, 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, i32, i32, i16, %struct._ENetList, %struct._ENetList, %struct._ENetList, %struct._ENetList, %struct._ENetList, %struct._ENetList, i32, i16, i16, [32 x i32], i32, i64 }
%struct._ENetAddress = type { i32, i16 }
%struct._ENetChannel = type { i16, i16, i16, [16 x i16], i16, i16, %struct._ENetList, %struct._ENetList }
%struct._ENetPacket = type { i64, i32, ptr, i64, ptr, ptr }
%struct._ENetHost = type <{ i32, %struct._ENetAddress, i32, i32, i32, i32, i32, i32, [4 x i8], ptr, i64, i64, i32, [4 x i8], %struct._ENetList, i32, [4 x i8], i64, i16, [32 x %union._ENetProtocol], [6 x i8], i64, [65 x %struct.ENetBuffer], i64, ptr, %struct._ENetCompressor, [2 x [4096 x i8]], %struct._ENetAddress, ptr, i64, i32, i32, i32, i32, ptr, i64, i64, i64, i64, i64 }>
%struct.ENetBuffer = type { ptr, i64 }
%struct._ENetCompressor = type { ptr, ptr, ptr, ptr }
%struct._ENetOutgoingCommand = type { %struct._ENetListNode, i16, i16, i32, i32, i32, i32, i16, i16, %union._ENetProtocol, ptr }
%struct._ENetProtocolSendFragment = type { %struct._ENetProtocolCommandHeader, i16, i16, i32, i32, i32, i32 }
%struct._ENetProtocolSendUnsequenced = type { %struct._ENetProtocolCommandHeader, i16, i16 }
%struct._ENetProtocolSendReliable = type { %struct._ENetProtocolCommandHeader, i16 }
%struct._ENetProtocolSendUnreliable = type { %struct._ENetProtocolCommandHeader, i16, i16 }

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @__bswap_32(i32 noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local ptr @enet_peer_queue_outgoing_command(ptr noundef, ptr noundef, ptr noundef, i32 noundef, i16 noundef zeroext) #2

; 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 i32 @enet_peer_send(ptr noundef %0, i8 noundef zeroext %1, ptr noundef %2) #2 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i8, align 1
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca %union._ENetProtocol, align 1
  %10 = alloca i64, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i8, align 1
  %16 = alloca i16, align 2
  %17 = alloca %struct._ENetList, align 8
  %18 = alloca ptr, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i8 %1, ptr %6, align 1, !tbaa !9
  store ptr %2, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %19 = load ptr, ptr %5, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct._ENetPeer, ptr %19, i32 0, i32 10
  %21 = load ptr, ptr %20, align 8, !tbaa !10
  %22 = load i8, ptr %6, align 1, !tbaa !9
  %23 = zext i8 %22 to i64
  %24 = getelementptr inbounds %struct._ENetChannel, ptr %21, i64 %23
  store ptr %24, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 48, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %25 = load ptr, ptr %5, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct._ENetPeer, ptr %25, i32 0, i32 9
  %27 = load i32, ptr %26, align 8, !tbaa !18
  %28 = icmp ne i32 %27, 5
  br i1 %28, label %46, label %29

29:                                               ; preds = %3
  %30 = load i8, ptr %6, align 1, !tbaa !9
  %31 = zext i8 %30 to i64
  %32 = load ptr, ptr %5, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct._ENetPeer, ptr %32, i32 0, i32 11
  %34 = load i64, ptr %33, align 8, !tbaa !19
  %35 = icmp uge i64 %31, %34
  br i1 %35, label %46, label %36

36:                                               ; preds = %29
  %37 = load ptr, ptr %7, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct._ENetPacket, ptr %37, i32 0, i32 3
  %39 = load i64, ptr %38, align 8, !tbaa !20
  %40 = load ptr, ptr %5, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct._ENetPeer, ptr %40, i32 0, i32 1
  %42 = load ptr, ptr %41, align 8, !tbaa !22
  %43 = getelementptr inbounds %struct._ENetHost, ptr %42, i32 0, i32 38
  %44 = load i64, ptr %43, align 8, !tbaa !23
  %45 = icmp ugt i64 %39, %44
  br i1 %45, label %46, label %47

46:                                               ; preds = %36, %29, %3
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %11, align 4
  br label %295

47:                                               ; preds = %36
  %48 = load ptr, ptr %5, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct._ENetPeer, ptr %48, i32 0, i32 44
  %50 = load i32, ptr %49, align 8, !tbaa !26
  %51 = zext i32 %50 to i64
  %52 = sub i64 %51, 4
  %53 = sub i64 %52, 24
  store i64 %53, ptr %10, align 8, !tbaa !27
  %54 = load ptr, ptr %5, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct._ENetPeer, ptr %54, i32 0, i32 1
  %56 = load ptr, ptr %55, align 8, !tbaa !22
  %57 = getelementptr inbounds %struct._ENetHost, ptr %56, i32 0, i32 24
  %58 = load ptr, ptr %57, align 8, !tbaa !28
  %59 = icmp ne ptr %58, null
  br i1 %59, label %60, label %63

60:                                               ; preds = %47
  %61 = load i64, ptr %10, align 8, !tbaa !27
  %62 = sub i64 %61, 4
  store i64 %62, ptr %10, align 8, !tbaa !27
  br label %63

63:                                               ; preds = %60, %47
  %64 = load ptr, ptr %7, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct._ENetPacket, ptr %64, i32 0, i32 3
  %66 = load i64, ptr %65, align 8, !tbaa !20
  %67 = load i64, ptr %10, align 8, !tbaa !27
  %68 = icmp ugt i64 %66, %67
  br i1 %68, label %69, label %239

69:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  %70 = load ptr, ptr %7, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct._ENetPacket, ptr %70, i32 0, i32 3
  %72 = load i64, ptr %71, align 8, !tbaa !20
  %73 = load i64, ptr %10, align 8, !tbaa !27
  %74 = add i64 %72, %73
  %75 = sub i64 %74, 1
  %76 = load i64, ptr %10, align 8, !tbaa !27
  %77 = udiv i64 %75, %76
  %78 = trunc i64 %77 to i32
  store i32 %78, ptr %12, align 4, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 2, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  %79 = load i32, ptr %12, align 4, !tbaa !29
  %80 = icmp ugt i32 %79, 1048576
  br i1 %80, label %81, label %82

81:                                               ; preds = %69
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %11, align 4
  br label %238

82:                                               ; preds = %69
  %83 = load ptr, ptr %7, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct._ENetPacket, ptr %83, i32 0, i32 1
  %85 = load i32, ptr %84, align 8, !tbaa !30
  %86 = and i32 %85, 9
  %87 = icmp eq i32 %86, 8
  br i1 %87, label %88, label %102

88:                                               ; preds = %82
  %89 = load ptr, ptr %8, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct._ENetChannel, ptr %89, i32 0, i32 1
  %91 = load i16, ptr %90, align 2, !tbaa !31
  %92 = zext i16 %91 to i32
  %93 = icmp slt i32 %92, 65535
  br i1 %93, label %94, label %102

94:                                               ; preds = %88
  store i8 12, ptr %15, align 1, !tbaa !9
  %95 = load ptr, ptr %8, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct._ENetChannel, ptr %95, i32 0, i32 1
  %97 = load i16, ptr %96, align 2, !tbaa !31
  %98 = zext i16 %97 to i32
  %99 = add nsw i32 %98, 1
  %100 = trunc i32 %99 to i16
  %101 = call zeroext i16 @__bswap_16(i16 noundef zeroext %100)
  store i16 %101, ptr %16, align 2, !tbaa !33
  br label %110

102:                                              ; preds = %88, %82
  store i8 -120, ptr %15, align 1, !tbaa !9
  %103 = load ptr, ptr %8, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct._ENetChannel, ptr %103, i32 0, i32 0
  %105 = load i16, ptr %104, align 8, !tbaa !34
  %106 = zext i16 %105 to i32
  %107 = add nsw i32 %106, 1
  %108 = trunc i32 %107 to i16
  %109 = call zeroext i16 @__bswap_16(i16 noundef zeroext %108)
  store i16 %109, ptr %16, align 2, !tbaa !33
  br label %110

110:                                              ; preds = %102, %94
  call void @enet_list_clear(ptr noundef %17)
  store i32 0, ptr %13, align 4, !tbaa !29
  store i32 0, ptr %14, align 4, !tbaa !29
  br label %111

111:                                              ; preds = %208, %110
  %112 = load i32, ptr %14, align 4, !tbaa !29
  %113 = zext i32 %112 to i64
  %114 = load ptr, ptr %7, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct._ENetPacket, ptr %114, i32 0, i32 3
  %116 = load i64, ptr %115, align 8, !tbaa !20
  %117 = icmp ult i64 %113, %116
  br i1 %117, label %118, label %216

118:                                              ; preds = %111
  %119 = load ptr, ptr %7, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct._ENetPacket, ptr %119, i32 0, i32 3
  %121 = load i64, ptr %120, align 8, !tbaa !20
  %122 = load i32, ptr %14, align 4, !tbaa !29
  %123 = zext i32 %122 to i64
  %124 = sub i64 %121, %123
  %125 = load i64, ptr %10, align 8, !tbaa !27
  %126 = icmp ult i64 %124, %125
  br i1 %126, label %127, label %134

127:                                              ; preds = %118
  %128 = load ptr, ptr %7, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct._ENetPacket, ptr %128, i32 0, i32 3
  %130 = load i64, ptr %129, align 8, !tbaa !20
  %131 = load i32, ptr %14, align 4, !tbaa !29
  %132 = zext i32 %131 to i64
  %133 = sub i64 %130, %132
  store i64 %133, ptr %10, align 8, !tbaa !27
  br label %134

134:                                              ; preds = %127, %118
  %135 = call ptr @enet_malloc(i64 noundef 96)
  store ptr %135, ptr %18, align 8, !tbaa !5
  %136 = load ptr, ptr %18, align 8, !tbaa !5
  %137 = icmp eq ptr %136, null
  br i1 %137, label %138, label %153

138:                                              ; preds = %134
  br label %139

139:                                              ; preds = %146, %138
  %140 = getelementptr inbounds %struct._ENetList, ptr %17, i32 0, i32 0
  %141 = getelementptr inbounds %struct._ENetListNode, ptr %140, i32 0, i32 0
  %142 = load ptr, ptr %141, align 8, !tbaa !35
  %143 = getelementptr inbounds %struct._ENetList, ptr %17, i32 0, i32 0
  %144 = icmp eq ptr %142, %143
  %145 = xor i1 %144, true
  br i1 %145, label %146, label %152

146:                                              ; preds = %139
  %147 = getelementptr inbounds %struct._ENetList, ptr %17, i32 0, i32 0
  %148 = getelementptr inbounds %struct._ENetListNode, ptr %147, i32 0, i32 0
  %149 = load ptr, ptr %148, align 8, !tbaa !35
  %150 = call ptr @enet_list_remove(ptr noundef %149)
  store ptr %150, ptr %18, align 8, !tbaa !5
  %151 = load ptr, ptr %18, align 8, !tbaa !5
  call void @enet_free(ptr noundef %151)
  br label %139, !llvm.loop !36

152:                                              ; preds = %139
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %11, align 4
  br label %238

153:                                              ; preds = %134
  %154 = load i32, ptr %14, align 4, !tbaa !29
  %155 = load ptr, ptr %18, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct._ENetOutgoingCommand, ptr %155, i32 0, i32 6
  store i32 %154, ptr %156, align 8, !tbaa !38
  %157 = load i64, ptr %10, align 8, !tbaa !27
  %158 = trunc i64 %157 to i16
  %159 = load ptr, ptr %18, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct._ENetOutgoingCommand, ptr %159, i32 0, i32 7
  store i16 %158, ptr %160, align 4, !tbaa !40
  %161 = load ptr, ptr %7, align 8, !tbaa !5
  %162 = load ptr, ptr %18, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct._ENetOutgoingCommand, ptr %162, i32 0, i32 10
  store ptr %161, ptr %163, align 8, !tbaa !41
  %164 = load i8, ptr %15, align 1, !tbaa !9
  %165 = load ptr, ptr %18, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct._ENetOutgoingCommand, ptr %165, i32 0, i32 9
  %167 = getelementptr inbounds %struct._ENetProtocolCommandHeader, ptr %166, i32 0, i32 0
  store i8 %164, ptr %167, align 8, !tbaa !9
  %168 = load i8, ptr %6, align 1, !tbaa !9
  %169 = load ptr, ptr %18, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct._ENetOutgoingCommand, ptr %169, i32 0, i32 9
  %171 = getelementptr inbounds %struct._ENetProtocolCommandHeader, ptr %170, i32 0, i32 1
  store i8 %168, ptr %171, align 1, !tbaa !9
  %172 = load i16, ptr %16, align 2, !tbaa !33
  %173 = load ptr, ptr %18, align 8, !tbaa !5
  %174 = getelementptr inbounds %struct._ENetOutgoingCommand, ptr %173, i32 0, i32 9
  %175 = getelementptr inbounds %struct._ENetProtocolSendFragment, ptr %174, i32 0, i32 1
  store i16 %172, ptr %175, align 4, !tbaa !9
  %176 = load i64, ptr %10, align 8, !tbaa !27
  %177 = trunc i64 %176 to i16
  %178 = call zeroext i16 @__bswap_16(i16 noundef zeroext %177)
  %179 = load ptr, ptr %18, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct._ENetOutgoingCommand, ptr %179, i32 0, i32 9
  %181 = getelementptr inbounds %struct._ENetProtocolSendFragment, ptr %180, i32 0, i32 2
  store i16 %178, ptr %181, align 2, !tbaa !9
  %182 = load i32, ptr %12, align 4, !tbaa !29
  %183 = call i32 @__bswap_32(i32 noundef %182)
  %184 = load ptr, ptr %18, align 8, !tbaa !5
  %185 = getelementptr inbounds %struct._ENetOutgoingCommand, ptr %184, i32 0, i32 9
  %186 = getelementptr inbounds %struct._ENetProtocolSendFragment, ptr %185, i32 0, i32 3
  store i32 %183, ptr %186, align 8, !tbaa !9
  %187 = load i32, ptr %13, align 4, !tbaa !29
  %188 = call i32 @__bswap_32(i32 noundef %187)
  %189 = load ptr, ptr %18, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct._ENetOutgoingCommand, ptr %189, i32 0, i32 9
  %191 = getelementptr inbounds %struct._ENetProtocolSendFragment, ptr %190, i32 0, i32 4
  store i32 %188, ptr %191, align 4, !tbaa !9
  %192 = load ptr, ptr %7, align 8, !tbaa !5
  %193 = getelementptr inbounds %struct._ENetPacket, ptr %192, i32 0, i32 3
  %194 = load i64, ptr %193, align 8, !tbaa !20
  %195 = trunc i64 %194 to i32
  %196 = call i32 @__bswap_32(i32 noundef %195)
  %197 = load ptr, ptr %18, align 8, !tbaa !5
  %198 = getelementptr inbounds %struct._ENetOutgoingCommand, ptr %197, i32 0, i32 9
  %199 = getelementptr inbounds %struct._ENetProtocolSendFragment, ptr %198, i32 0, i32 5
  store i32 %196, ptr %199, align 8, !tbaa !9
  %200 = load i32, ptr %14, align 4, !tbaa !29
  %201 = call i32 @__bswap_32(i32 noundef %200)
  %202 = load ptr, ptr %18, align 8, !tbaa !5
  %203 = getelementptr inbounds %struct._ENetOutgoingCommand, ptr %202, i32 0, i32 9
  %204 = getelementptr inbounds %struct._ENetProtocolSendFragment, ptr %203, i32 0, i32 6
  store i32 %201, ptr %204, align 4, !tbaa !9
  %205 = getelementptr inbounds %struct._ENetList, ptr %17, i32 0, i32 0
  %206 = load ptr, ptr %18, align 8, !tbaa !5
  %207 = call ptr @enet_list_insert(ptr noundef %205, ptr noundef %206)
  br label %208

208:                                              ; preds = %153
  %209 = load i32, ptr %13, align 4, !tbaa !29
  %210 = add i32 %209, 1
  store i32 %210, ptr %13, align 4, !tbaa !29
  %211 = load i64, ptr %10, align 8, !tbaa !27
  %212 = load i32, ptr %14, align 4, !tbaa !29
  %213 = zext i32 %212 to i64
  %214 = add i64 %213, %211
  %215 = trunc i64 %214 to i32
  store i32 %215, ptr %14, align 4, !tbaa !29
  br label %111, !llvm.loop !42

216:                                              ; preds = %111
  %217 = load i32, ptr %13, align 4, !tbaa !29
  %218 = zext i32 %217 to i64
  %219 = load ptr, ptr %7, align 8, !tbaa !5
  %220 = getelementptr inbounds %struct._ENetPacket, ptr %219, i32 0, i32 0
  %221 = load i64, ptr %220, align 8, !tbaa !43
  %222 = add i64 %221, %218
  store i64 %222, ptr %220, align 8, !tbaa !43
  br label %223

223:                                              ; preds = %230, %216
  %224 = getelementptr inbounds %struct._ENetList, ptr %17, i32 0, i32 0
  %225 = getelementptr inbounds %struct._ENetListNode, ptr %224, i32 0, i32 0
  %226 = load ptr, ptr %225, align 8, !tbaa !35
  %227 = getelementptr inbounds %struct._ENetList, ptr %17, i32 0, i32 0
  %228 = icmp eq ptr %226, %227
  %229 = xor i1 %228, true
  br i1 %229, label %230, label %237

230:                                              ; preds = %223
  %231 = getelementptr inbounds %struct._ENetList, ptr %17, i32 0, i32 0
  %232 = getelementptr inbounds %struct._ENetListNode, ptr %231, i32 0, i32 0
  %233 = load ptr, ptr %232, align 8, !tbaa !35
  %234 = call ptr @enet_list_remove(ptr noundef %233)
  store ptr %234, ptr %18, align 8, !tbaa !5
  %235 = load ptr, ptr %5, align 8, !tbaa !5
  %236 = load ptr, ptr %18, align 8, !tbaa !5
  call void @enet_peer_setup_outgoing_command(ptr noundef %235, ptr noundef %236)
  br label %223, !llvm.loop !44

237:                                              ; preds = %223
  store i32 0, ptr %4, align 4
  store i32 1, ptr %11, align 4
  br label %238

238:                                              ; preds = %237, %152, %81
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 2, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  br label %295

239:                                              ; preds = %63
  %240 = load i8, ptr %6, align 1, !tbaa !9
  %241 = getelementptr inbounds %struct._ENetProtocolCommandHeader, ptr %9, i32 0, i32 1
  store i8 %240, ptr %241, align 1, !tbaa !9
  %242 = load ptr, ptr %7, align 8, !tbaa !5
  %243 = getelementptr inbounds %struct._ENetPacket, ptr %242, i32 0, i32 1
  %244 = load i32, ptr %243, align 8, !tbaa !30
  %245 = and i32 %244, 3
  %246 = icmp eq i32 %245, 2
  br i1 %246, label %247, label %255

247:                                              ; preds = %239
  %248 = getelementptr inbounds %struct._ENetProtocolCommandHeader, ptr %9, i32 0, i32 0
  store i8 73, ptr %248, align 1, !tbaa !9
  %249 = load ptr, ptr %7, align 8, !tbaa !5
  %250 = getelementptr inbounds %struct._ENetPacket, ptr %249, i32 0, i32 3
  %251 = load i64, ptr %250, align 8, !tbaa !20
  %252 = trunc i64 %251 to i16
  %253 = call zeroext i16 @__bswap_16(i16 noundef zeroext %252)
  %254 = getelementptr inbounds %struct._ENetProtocolSendUnsequenced, ptr %9, i32 0, i32 2
  store i16 %253, ptr %254, align 1, !tbaa !9
  br label %284

255:                                              ; preds = %239
  %256 = load ptr, ptr %7, align 8, !tbaa !5
  %257 = getelementptr inbounds %struct._ENetPacket, ptr %256, i32 0, i32 1
  %258 = load i32, ptr %257, align 8, !tbaa !30
  %259 = and i32 %258, 1
  %260 = icmp ne i32 %259, 0
  br i1 %260, label %267, label %261

261:                                              ; preds = %255
  %262 = load ptr, ptr %8, align 8, !tbaa !5
  %263 = getelementptr inbounds %struct._ENetChannel, ptr %262, i32 0, i32 1
  %264 = load i16, ptr %263, align 2, !tbaa !31
  %265 = zext i16 %264 to i32
  %266 = icmp sge i32 %265, 65535
  br i1 %266, label %267, label %275

267:                                              ; preds = %261, %255
  %268 = getelementptr inbounds %struct._ENetProtocolCommandHeader, ptr %9, i32 0, i32 0
  store i8 -122, ptr %268, align 1, !tbaa !9
  %269 = load ptr, ptr %7, align 8, !tbaa !5
  %270 = getelementptr inbounds %struct._ENetPacket, ptr %269, i32 0, i32 3
  %271 = load i64, ptr %270, align 8, !tbaa !20
  %272 = trunc i64 %271 to i16
  %273 = call zeroext i16 @__bswap_16(i16 noundef zeroext %272)
  %274 = getelementptr inbounds %struct._ENetProtocolSendReliable, ptr %9, i32 0, i32 1
  store i16 %273, ptr %274, align 1, !tbaa !9
  br label %283

275:                                              ; preds = %261
  %276 = getelementptr inbounds %struct._ENetProtocolCommandHeader, ptr %9, i32 0, i32 0
  store i8 7, ptr %276, align 1, !tbaa !9
  %277 = load ptr, ptr %7, align 8, !tbaa !5
  %278 = getelementptr inbounds %struct._ENetPacket, ptr %277, i32 0, i32 3
  %279 = load i64, ptr %278, align 8, !tbaa !20
  %280 = trunc i64 %279 to i16
  %281 = call zeroext i16 @__bswap_16(i16 noundef zeroext %280)
  %282 = getelementptr inbounds %struct._ENetProtocolSendUnreliable, ptr %9, i32 0, i32 2
  store i16 %281, ptr %282, align 1, !tbaa !9
  br label %283

283:                                              ; preds = %275, %267
  br label %284

284:                                              ; preds = %283, %247
  %285 = load ptr, ptr %5, align 8, !tbaa !5
  %286 = load ptr, ptr %7, align 8, !tbaa !5
  %287 = load ptr, ptr %7, align 8, !tbaa !5
  %288 = getelementptr inbounds %struct._ENetPacket, ptr %287, i32 0, i32 3
  %289 = load i64, ptr %288, align 8, !tbaa !20
  %290 = trunc i64 %289 to i16
  %291 = call ptr @enet_peer_queue_outgoing_command(ptr noundef %285, ptr noundef %9, ptr noundef %286, i32 noundef 0, i16 noundef zeroext %290)
  %292 = icmp eq ptr %291, null
  br i1 %292, label %293, label %294

293:                                              ; preds = %284
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %11, align 4
  br label %295

294:                                              ; preds = %284
  store i32 0, ptr %4, align 4
  store i32 1, ptr %11, align 4
  br label %295

295:                                              ; preds = %294, %293, %238, %46
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 48, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  %296 = load i32, ptr %4, align 4
  ret i32 %296
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden zeroext i16 @__bswap_16(i16 noundef zeroext) #1

declare void @enet_list_clear(ptr noundef) #3

declare ptr @enet_malloc(i64 noundef) #3

declare ptr @enet_list_remove(ptr noundef) #3

declare void @enet_free(ptr noundef) #3

declare ptr @enet_list_insert(ptr noundef, ptr noundef) #3

; Function Attrs: nounwind uwtable
declare dso_local void @enet_peer_setup_outgoing_command(ptr noundef, ptr noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 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 = { "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, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = !{!11, !6, i64 64}
!11 = !{!"_ENetPeer", !12, i64 0, !6, i64 16, !13, i64 24, !13, i64 26, !14, i64 28, !7, i64 32, !7, i64 33, !15, i64 36, !6, i64 48, !14, i64 56, !6, i64 64, !16, i64 72, !14, i64 80, !14, i64 84, !14, i64 88, !14, i64 92, !14, i64 96, !14, i64 100, !14, i64 104, !14, i64 108, !14, i64 112, !14, i64 116, !14, i64 120, !14, i64 124, !14, i64 128, !14, i64 132, !14, i64 136, !14, i64 140, !14, i64 144, !14, i64 148, !14, i64 152, !14, i64 156, !14, i64 160, !14, i64 164, !14, i64 168, !14, i64 172, !14, i64 176, !14, i64 180, !14, i64 184, !14, i64 188, !14, i64 192, !14, i64 196, !14, i64 200, !14, i64 204, !14, i64 208, !14, i64 212, !14, i64 216, !13, i64 220, !17, i64 224, !17, i64 240, !17, i64 256, !17, i64 272, !17, i64 288, !17, i64 304, !14, i64 320, !13, i64 324, !13, i64 326, !7, i64 328, !14, i64 456, !16, i64 464}
!12 = !{!"_ENetListNode", !6, i64 0, !6, i64 8}
!13 = !{!"short", !7, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!"_ENetAddress", !14, i64 0, !13, i64 4}
!16 = !{!"long", !7, i64 0}
!17 = !{!"_ENetList", !12, i64 0}
!18 = !{!11, !14, i64 56}
!19 = !{!11, !16, i64 72}
!20 = !{!21, !16, i64 24}
!21 = !{!"_ENetPacket", !16, i64 0, !14, i64 8, !6, i64 16, !16, i64 24, !6, i64 32, !6, i64 40}
!22 = !{!11, !6, i64 16}
!23 = !{!24, !16, i64 11008}
!24 = !{!"_ENetHost", !14, i64 0, !15, i64 4, !14, i64 12, !14, i64 16, !14, i64 20, !14, i64 24, !14, i64 28, !14, i64 32, !6, i64 40, !16, i64 48, !16, i64 56, !14, i64 64, !17, i64 72, !14, i64 88, !16, i64 96, !13, i64 104, !7, i64 106, !16, i64 1648, !7, i64 1656, !16, i64 2696, !6, i64 2704, !25, i64 2712, !7, i64 2744, !15, i64 10936, !6, i64 10944, !16, i64 10952, !14, i64 10960, !14, i64 10964, !14, i64 10968, !14, i64 10972, !6, i64 10976, !16, i64 10984, !16, i64 10992, !16, i64 11000, !16, i64 11008, !16, i64 11016}
!25 = !{!"_ENetCompressor", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!26 = !{!11, !14, i64 208}
!27 = !{!16, !16, i64 0}
!28 = !{!24, !6, i64 2704}
!29 = !{!14, !14, i64 0}
!30 = !{!21, !14, i64 8}
!31 = !{!32, !13, i64 2}
!32 = !{!"_ENetChannel", !13, i64 0, !13, i64 2, !13, i64 4, !7, i64 6, !13, i64 38, !13, i64 40, !17, i64 48, !17, i64 64}
!33 = !{!13, !13, i64 0}
!34 = !{!32, !13, i64 0}
!35 = !{!17, !6, i64 0}
!36 = distinct !{!36, !37}
!37 = !{!"llvm.loop.mustprogress"}
!38 = !{!39, !14, i64 32}
!39 = !{!"_ENetOutgoingCommand", !12, i64 0, !13, i64 16, !13, i64 18, !14, i64 20, !14, i64 24, !14, i64 28, !14, i64 32, !13, i64 36, !13, i64 38, !7, i64 40, !6, i64 88}
!40 = !{!39, !13, i64 36}
!41 = !{!39, !6, i64 88}
!42 = distinct !{!42, !37}
!43 = !{!21, !16, i64 0}
!44 = distinct !{!44, !37}


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

%union._ENetProtocol = type { %struct._ENetProtocolConnect }
%struct._ENetProtocolConnect = type { %struct._ENetProtocolCommandHeader, i16, i8, i8, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
%struct._ENetProtocolCommandHeader = type { i8, i8, i16 }
%struct._ENetList = type { %struct._ENetListNode }
%struct._ENetListNode = type { ptr, ptr }
%struct._ENetChannel = type { i16, i16, i16, [16 x i16], i16, i16, %struct._ENetList, %struct._ENetList }

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @enet_peer_queue_outgoing_command(ptr noundef, ptr noundef, ptr noundef, i32 noundef, i16 noundef zeroext) local_unnamed_addr #2

; Function Attrs: mustprogress 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 range(i32 -1, 1) i32 @enet_peer_send(ptr noundef %0, i8 noundef zeroext %1, ptr noundef %2) local_unnamed_addr #2 {
  %4 = alloca %union._ENetProtocol, align 1
  %5 = alloca %struct._ENetList, align 8
  %6 = getelementptr inbounds i8, ptr %0, i64 64
  %7 = load ptr, ptr %6, align 8, !tbaa !5
  %8 = zext i8 %1 to i64
  %9 = getelementptr inbounds %struct._ENetChannel, ptr %7, i64 %8
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %4) #5
  %10 = getelementptr inbounds i8, ptr %0, i64 56
  %11 = load i32, ptr %10, align 8, !tbaa !16
  %.not = icmp eq i32 %11, 5
  %.sink104.sroa.gep = getelementptr inbounds i8, ptr %4, i64 4
  %.sink104.sroa.gep108 = getelementptr inbounds i8, ptr %4, i64 6
  %.sink104.sroa.gep109 = getelementptr inbounds i8, ptr %4, i64 6
  br i1 %.not, label %12, label %115

12:                                               ; preds = %3
  %13 = getelementptr inbounds i8, ptr %0, i64 72
  %14 = load i64, ptr %13, align 8, !tbaa !17
  %.not82 = icmp ugt i64 %14, %8
  br i1 %.not82, label %15, label %115

15:                                               ; preds = %12
  %16 = getelementptr inbounds i8, ptr %2, i64 24
  %17 = load i64, ptr %16, align 8, !tbaa !18
  %18 = getelementptr inbounds i8, ptr %0, i64 16
  %19 = load ptr, ptr %18, align 8, !tbaa !20
  %20 = getelementptr inbounds i8, ptr %19, i64 11008
  %21 = load i64, ptr %20, align 8, !tbaa !21
  %22 = icmp ugt i64 %17, %21
  br i1 %22, label %115, label %23

23:                                               ; preds = %15
  %24 = getelementptr inbounds i8, ptr %0, i64 208
  %25 = load i32, ptr %24, align 8, !tbaa !24
  %26 = zext i32 %25 to i64
  %27 = getelementptr inbounds i8, ptr %19, i64 2704
  %28 = load ptr, ptr %27, align 8, !tbaa !25
  %.not83 = icmp eq ptr %28, null
  %spec.select.v = select i1 %.not83, i64 -28, i64 -32
  %spec.select = add nsw i64 %spec.select.v, %26
  %29 = icmp ugt i64 %17, %spec.select
  br i1 %29, label %30, label %93

30:                                               ; preds = %23
  %31 = add i64 %17, -1
  %32 = add i64 %31, %spec.select
  %33 = udiv i64 %32, %spec.select
  %34 = trunc i64 %33 to i32
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #5
  %35 = icmp ugt i32 %34, 1048576
  br i1 %35, label %.loopexit, label %36

36:                                               ; preds = %30
  %37 = getelementptr inbounds i8, ptr %2, i64 8
  %38 = load i32, ptr %37, align 8, !tbaa !26
  %39 = and i32 %38, 9
  %40 = icmp eq i32 %39, 8
  br i1 %40, label %41, label %44

41:                                               ; preds = %36
  %42 = getelementptr inbounds i8, ptr %9, i64 2
  %43 = load i16, ptr %42, align 2, !tbaa !27
  %.not85 = icmp eq i16 %43, -1
  br i1 %.not85, label %44, label %46

44:                                               ; preds = %41, %36
  %45 = load i16, ptr %9, align 8, !tbaa !29
  br label %46

46:                                               ; preds = %41, %44
  %.sink102 = phi i16 [ %45, %44 ], [ %43, %41 ]
  %.069 = phi i8 [ -120, %44 ], [ 12, %41 ]
  %47 = add i16 %.sink102, 1
  %48 = tail call zeroext i16 @__bswap_16(i16 noundef zeroext %47)
  call void @enet_list_clear(ptr noundef nonnull %5) #5
  %49 = load i64, ptr %16, align 8, !tbaa !18
  %.not99 = icmp eq i64 %49, 0
  br i1 %.not99, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %46, %58
  %50 = phi i64 [ %84, %58 ], [ %49, %46 ]
  %51 = phi i64 [ %83, %58 ], [ 0, %46 ]
  %.07093 = phi i32 [ %82, %58 ], [ 0, %46 ]
  %.07192 = phi i32 [ %80, %58 ], [ 0, %46 ]
  %.17491 = phi i64 [ %spec.select88, %58 ], [ %spec.select, %46 ]
  %52 = call ptr @enet_malloc(i64 noundef 96) #5
  %53 = icmp eq ptr %52, null
  br i1 %53, label %.preheader, label %58

.preheader:                                       ; preds = %.lr.ph
  %54 = load ptr, ptr %5, align 8, !tbaa !30
  %.not8797 = icmp eq ptr %54, %5
  br i1 %.not8797, label %.loopexit, label %.lr.ph98

.lr.ph98:                                         ; preds = %.preheader, %.lr.ph98
  %55 = phi ptr [ %57, %.lr.ph98 ], [ %54, %.preheader ]
  %56 = call ptr @enet_list_remove(ptr noundef %55) #5
  call void @enet_free(ptr noundef %56) #5
  %57 = load ptr, ptr %5, align 8, !tbaa !30
  %.not87 = icmp eq ptr %57, %5
  br i1 %.not87, label %.loopexit, label %.lr.ph98, !llvm.loop !31

58:                                               ; preds = %.lr.ph
  %59 = sub i64 %50, %51
  %spec.select88 = call i64 @llvm.umin.i64(i64 %59, i64 %.17491)
  %60 = getelementptr inbounds i8, ptr %52, i64 32
  store i32 %.07093, ptr %60, align 8, !tbaa !33
  %61 = trunc i64 %spec.select88 to i16
  %62 = getelementptr inbounds i8, ptr %52, i64 36
  store i16 %61, ptr %62, align 4, !tbaa !35
  %63 = getelementptr inbounds i8, ptr %52, i64 88
  store ptr %2, ptr %63, align 8, !tbaa !36
  %64 = getelementptr inbounds i8, ptr %52, i64 40
  store i8 %.069, ptr %64, align 8, !tbaa !37
  %65 = getelementptr inbounds i8, ptr %52, i64 41
  store i8 %1, ptr %65, align 1, !tbaa !37
  %66 = getelementptr inbounds i8, ptr %52, i64 44
  store i16 %48, ptr %66, align 4, !tbaa !37
  %67 = call zeroext i16 @__bswap_16(i16 noundef zeroext %61)
  %68 = getelementptr inbounds i8, ptr %52, i64 46
  store i16 %67, ptr %68, align 2, !tbaa !37
  %69 = call i32 @__bswap_32(i32 noundef %34)
  %70 = getelementptr inbounds i8, ptr %52, i64 48
  store i32 %69, ptr %70, align 8, !tbaa !37
  %71 = call i32 @__bswap_32(i32 noundef %.07192)
  %72 = getelementptr inbounds i8, ptr %52, i64 52
  store i32 %71, ptr %72, align 4, !tbaa !37
  %73 = load i64, ptr %16, align 8, !tbaa !18
  %74 = trunc i64 %73 to i32
  %75 = call i32 @__bswap_32(i32 noundef %74)
  %76 = getelementptr inbounds i8, ptr %52, i64 56
  store i32 %75, ptr %76, align 8, !tbaa !37
  %77 = call i32 @__bswap_32(i32 noundef %.07093)
  %78 = getelementptr inbounds i8, ptr %52, i64 60
  store i32 %77, ptr %78, align 4, !tbaa !37
  %79 = call ptr @enet_list_insert(ptr noundef nonnull %5, ptr noundef nonnull %52) #5
  %80 = add i32 %.07192, 1
  %81 = trunc i64 %spec.select88 to i32
  %82 = add i32 %.07093, %81
  %83 = zext i32 %82 to i64
  %84 = load i64, ptr %16, align 8, !tbaa !18
  %85 = icmp ugt i64 %84, %83
  br i1 %85, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !38

._crit_edge.loopexit:                             ; preds = %58
  %86 = zext i32 %80 to i64
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %46
  %.071.lcssa = phi i64 [ 0, %46 ], [ %86, %._crit_edge.loopexit ]
  %87 = load i64, ptr %2, align 8, !tbaa !39
  %88 = add i64 %87, %.071.lcssa
  store i64 %88, ptr %2, align 8, !tbaa !39
  %89 = load ptr, ptr %5, align 8, !tbaa !30
  %.not8694 = icmp eq ptr %89, %5
  br i1 %.not8694, label %.loopexit, label %.lr.ph96

.lr.ph96:                                         ; preds = %._crit_edge, %.lr.ph96
  %90 = phi ptr [ %92, %.lr.ph96 ], [ %89, %._crit_edge ]
  %91 = call ptr @enet_list_remove(ptr noundef %90) #5
  call void @enet_peer_setup_outgoing_command(ptr noundef %0, ptr noundef %91)
  %92 = load ptr, ptr %5, align 8, !tbaa !30
  %.not86 = icmp eq ptr %92, %5
  br i1 %.not86, label %.loopexit, label %.lr.ph96, !llvm.loop !40

.loopexit:                                        ; preds = %.lr.ph98, %.lr.ph96, %._crit_edge, %.preheader, %30
  %.072 = phi i32 [ -1, %30 ], [ -1, %.preheader ], [ 0, %._crit_edge ], [ 0, %.lr.ph96 ], [ -1, %.lr.ph98 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #5
  br label %115

93:                                               ; preds = %23
  %94 = getelementptr inbounds i8, ptr %4, i64 1
  store i8 %1, ptr %94, align 1, !tbaa !37
  %95 = getelementptr inbounds i8, ptr %2, i64 8
  %96 = load i32, ptr %95, align 8, !tbaa !26
  %97 = and i32 %96, 3
  %98 = icmp eq i32 %97, 2
  br i1 %98, label %99, label %100

99:                                               ; preds = %93
  store i8 73, ptr %4, align 1, !tbaa !37
  br label %108

100:                                              ; preds = %93
  %101 = and i32 %96, 1
  %.not84 = icmp eq i32 %101, 0
  br i1 %.not84, label %102, label %106

102:                                              ; preds = %100
  %103 = getelementptr inbounds i8, ptr %9, i64 2
  %104 = load i16, ptr %103, align 2, !tbaa !27
  %105 = icmp eq i16 %104, -1
  br i1 %105, label %106, label %107

106:                                              ; preds = %102, %100
  store i8 -122, ptr %4, align 1, !tbaa !37
  br label %108

107:                                              ; preds = %102
  store i8 7, ptr %4, align 1, !tbaa !37
  br label %108

108:                                              ; preds = %106, %107, %99
  %.sink104.sroa.phi = phi ptr [ %.sink104.sroa.gep, %106 ], [ %.sink104.sroa.gep108, %107 ], [ %.sink104.sroa.gep109, %99 ]
  %109 = trunc i64 %17 to i16
  %110 = tail call zeroext i16 @__bswap_16(i16 noundef zeroext %109)
  store i16 %110, ptr %.sink104.sroa.phi, align 1, !tbaa !37
  %111 = load i64, ptr %16, align 8, !tbaa !18
  %112 = trunc i64 %111 to i16
  %113 = call ptr @enet_peer_queue_outgoing_command(ptr noundef nonnull %0, ptr noundef nonnull %4, ptr noundef nonnull %2, i32 noundef 0, i16 noundef zeroext %112)
  %114 = icmp eq ptr %113, null
  %. = sext i1 %114 to i32
  br label %115

115:                                              ; preds = %108, %3, %12, %15, %.loopexit
  %.1 = phi i32 [ %.072, %.loopexit ], [ -1, %15 ], [ -1, %12 ], [ -1, %3 ], [ %., %108 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #5
  ret i32 %.1
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden zeroext i16 @__bswap_16(i16 noundef zeroext) local_unnamed_addr #1

declare void @enet_list_clear(ptr noundef) local_unnamed_addr #3

declare ptr @enet_malloc(i64 noundef) local_unnamed_addr #3

declare ptr @enet_list_remove(ptr noundef) local_unnamed_addr #3

declare void @enet_free(ptr noundef) local_unnamed_addr #3

declare ptr @enet_list_insert(ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare dso_local void @enet_peer_setup_outgoing_command(ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.umin.i64(i64, i64) #4

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 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 = { "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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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, !8, i64 64}
!6 = !{!"_ENetPeer", !7, i64 0, !8, i64 16, !11, i64 24, !11, i64 26, !12, i64 28, !9, i64 32, !9, i64 33, !13, i64 36, !8, i64 48, !12, i64 56, !8, i64 64, !14, i64 72, !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, !12, i64 132, !12, i64 136, !12, i64 140, !12, i64 144, !12, i64 148, !12, i64 152, !12, i64 156, !12, i64 160, !12, i64 164, !12, i64 168, !12, i64 172, !12, i64 176, !12, i64 180, !12, i64 184, !12, i64 188, !12, i64 192, !12, i64 196, !12, i64 200, !12, i64 204, !12, i64 208, !12, i64 212, !12, i64 216, !11, i64 220, !15, i64 224, !15, i64 240, !15, i64 256, !15, i64 272, !15, i64 288, !15, i64 304, !12, i64 320, !11, i64 324, !11, i64 326, !9, i64 328, !12, i64 456, !14, i64 464}
!7 = !{!"_ENetListNode", !8, i64 0, !8, i64 8}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C/C++ TBAA"}
!11 = !{!"short", !9, i64 0}
!12 = !{!"int", !9, i64 0}
!13 = !{!"_ENetAddress", !12, i64 0, !11, i64 4}
!14 = !{!"long", !9, i64 0}
!15 = !{!"_ENetList", !7, i64 0}
!16 = !{!6, !12, i64 56}
!17 = !{!6, !14, i64 72}
!18 = !{!19, !14, i64 24}
!19 = !{!"_ENetPacket", !14, i64 0, !12, i64 8, !8, i64 16, !14, i64 24, !8, i64 32, !8, i64 40}
!20 = !{!6, !8, i64 16}
!21 = !{!22, !14, i64 11008}
!22 = !{!"_ENetHost", !12, i64 0, !13, i64 4, !12, i64 12, !12, i64 16, !12, i64 20, !12, i64 24, !12, i64 28, !12, i64 32, !8, i64 40, !14, i64 48, !14, i64 56, !12, i64 64, !15, i64 72, !12, i64 88, !14, i64 96, !11, i64 104, !9, i64 106, !14, i64 1648, !9, i64 1656, !14, i64 2696, !8, i64 2704, !23, i64 2712, !9, i64 2744, !13, i64 10936, !8, i64 10944, !14, i64 10952, !12, i64 10960, !12, i64 10964, !12, i64 10968, !12, i64 10972, !8, i64 10976, !14, i64 10984, !14, i64 10992, !14, i64 11000, !14, i64 11008, !14, i64 11016}
!23 = !{!"_ENetCompressor", !8, i64 0, !8, i64 8, !8, i64 16, !8, i64 24}
!24 = !{!6, !12, i64 208}
!25 = !{!22, !8, i64 2704}
!26 = !{!19, !12, i64 8}
!27 = !{!28, !11, i64 2}
!28 = !{!"_ENetChannel", !11, i64 0, !11, i64 2, !11, i64 4, !9, i64 6, !11, i64 38, !11, i64 40, !15, i64 48, !15, i64 64}
!29 = !{!28, !11, i64 0}
!30 = !{!15, !8, i64 0}
!31 = distinct !{!31, !32}
!32 = !{!"llvm.loop.mustprogress"}
!33 = !{!34, !12, i64 32}
!34 = !{!"_ENetOutgoingCommand", !7, i64 0, !11, i64 16, !11, i64 18, !12, i64 20, !12, i64 24, !12, i64 28, !12, i64 32, !11, i64 36, !11, i64 38, !9, i64 40, !8, i64 88}
!35 = !{!34, !11, i64 36}
!36 = !{!34, !8, i64 88}
!37 = !{!9, !9, i64 0}
!38 = distinct !{!38, !32}
!39 = !{!19, !14, i64 0}
!40 = distinct !{!40, !32}


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