blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 2 247 | content_id stringlengths 40 40 | detected_licenses listlengths 0 57 | license_type stringclasses 2 values | repo_name stringlengths 4 111 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringlengths 4 58 | visit_date timestamp[ns]date 2015-07-25 18:16:41 2023-09-06 10:45:08 | revision_date timestamp[ns]date 1970-01-14 14:03:36 2023-09-06 06:22:19 | committer_date timestamp[ns]date 1970-01-14 14:03:36 2023-09-06 06:22:19 | github_id int64 3.89k 689M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 25 values | gha_event_created_at timestamp[ns]date 2012-06-07 00:51:45 2023-09-14 21:58:52 ⌀ | gha_created_at timestamp[ns]date 2008-03-27 23:40:48 2023-08-24 19:49:39 ⌀ | gha_language stringclasses 159 values | src_encoding stringclasses 34 values | language stringclasses 1 value | is_vendor bool 1 class | is_generated bool 2 classes | length_bytes int64 7 10.5M | extension stringclasses 111 values | filename stringlengths 1 195 | text stringlengths 7 10.5M |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e29e281e82c8b73a70e866e70df5575688adbf9f | b1df6b7fd6ec08a011ffcd6d07a7d42915c61e15 | /project/source/game/system/UnitData.h | 35a7c420875096feaaa3381a424d3a7285f49654 | [
"MIT"
] | permissive | Shdorsh/carpg | dbca0277d3182ce4852e21826e05f423a5d7dd6f | 376130a1ed410116fc8a607601b327eae7dca383 | refs/heads/devel | 2022-06-17T04:01:27.682849 | 2018-12-01T21:23:58 | 2018-12-01T21:23:58 | 159,889,860 | 0 | 0 | MIT | 2022-06-02T07:12:48 | 2018-11-30T23:32:57 | C++ | WINDOWS-1250 | C++ | false | false | 8,760 | h | UnitData.h | #pragma once
//-----------------------------------------------------------------------------
#include "Material.h"
#include "UnitStats.h"
#include "Blood.h"
#include "StatProfile.h"
#include "ArmorUnitType.h"
#include "Resource.h"
#include "DamageTypes.h"
#include "ItemScript.h"
#include "FrameInfo.h"
#include "Class.h"
#include "ItemSlot.h"
//-----------------------------------------------------------------------------
// Lista zaklęć postaci
struct SpellList
{
string id;
int level[3];
cstring name[3];
Spell* spell[3];
bool have_non_combat;
SpellList() : spell(), name(), level(), have_non_combat(false) {}
static vector<SpellList*> lists;
static SpellList* TryGet(Cstring id);
};
//-----------------------------------------------------------------------------
enum class UNIT_TYPE
{
ANIMAL,
HUMANOID,
HUMAN
};
//-----------------------------------------------------------------------------
// Unit groups
enum UNIT_GROUP
{
G_PLAYER,
G_TEAM,
G_CITIZENS,
G_GOBLINS,
G_ORCS,
G_UNDEAD,
G_MAGES,
G_ANIMALS,
G_CRAZIES,
G_BANDITS
};
//-----------------------------------------------------------------------------
// Unit flags
enum UNIT_FLAGS
{
F_HUMAN = 1 << 0, // use items, have armor/hair/beard
F_HUMANOID = 1 << 1, // use items
F_COWARD = 1 << 2, // escapes when allies die or have small hp amount
F_DONT_ESCAPE = 1 << 3, // never escapes
F_ARCHER = 1 << 4, // preferuje walkę bronią dystansową
F_LEADER = 1 << 5, // inni go chronią ?
F_PIERCE_RES25 = 1 << 6, // odporność na kłute 25%
F_SLASH_RES25 = 1 << 7, // odporność na cięte 25%
F_BLUNT_RES25 = 1 << 8, // odporność na obuchowe 25%
F_PIERCE_WEAK25 = 1 << 9, // podatność na kłute 25%
F_SLASH_WEAK25 = 1 << 10, // podatność na cięte 25%
F_BLUNT_WEAK25 = 1 << 11, // podatność na obuchowe 25%
F_UNDEAD = 1 << 12, // można ożywić
F_SLOW = 1 << 13, // nie biega
F_POISON_ATTACK = 1 << 14, // atak zatruwa
F_IMMORTAL = 1 << 15, // nie można zabić tej postaci
F_TOMASHU = 1 << 16, // przy generowaniu postaci jest ściśle określony kolor i włosy
F_CRAZY = 1 << 17, // możliwe kolorowe włosy
F_DONT_OPEN = 1 << 18, // nie potrafi otwierać drzwi
F_SLIGHT = 1 << 19, // nie uruchamia pułapek
F_SECRET = 1 << 20, // nie można zespawnować
F_DONT_SUFFER = 1 << 21, // odporność na ból
F_MAGE = 1 << 22, // próbuje stać jak najdalej od przeciwnika
F_POISON_RES = 1 << 23, // odporność na trucizny
F_GRAY_HAIR = 1 << 24, // dla nieumarłych i nekromantów
F_NO_POWER_ATTACK = 1 << 25, // nie posiada potężnego ataku
F_AI_CLERK = 1 << 26, // jak stoi ale ma animację przeglądania dokumentów, chodzi niedaleko
F_AI_GUARD = 1 << 27, // stoi w miejscu i się rozgląda
F_AI_STAY = 1 << 28, // stoi w miejscu i używa obiektów, chodzi niedaleko
F_AI_WANDERS = 1 << 29, // używa obiektów, łazi po całym mieście
F_AI_DRUNKMAN = 1 << 30, // pije piwo o ile jest w budynku
F_HERO = 1 << 31 // można go dołączyć do drużyny, ma HeroData
};
//-----------------------------------------------------------------------------
// More unit flags
enum UNIT_FLAGS2
{
F2_AI_TRAIN = 1 << 0, // trenuje walkę na manekinie/celu strzelniczym
F2_SPECIFIC_NAME = 1 << 1, // nie generuje imienia
// unused (1 << 2)
F2_CONTEST = 1 << 3, // dołącza do zawodów w piciu
F2_CONTEST_50 = 1 << 4, // 50% że dołączy do zawodów w piciu
// unused (1 << 5)
// unused (1 << 6)
// unused (1 << 7)
// unused (1 << 8)
F2_OLD = 1 << 9, // siwe włosy
F2_MELEE = 1 << 10, // walczy wręcz nawet jak ma łuk a wróg jest daleko
F2_MELEE_50 = 1 << 11, // walczy wręcz 50%
F2_BOSS = 1 << 12, // muzyka bossa
F2_BLOODLESS = 1 << 13, // nie można rzucić wyssania hp
F2_LIMITED_ROT = 1 << 14, // stoi w miarę prosto - karczmarz za ladą
// unused (1 << 15)
F2_STUN_RESISTANCE = 1 << 16, // 50% resistance to stuns
F2_SIT_ON_THRONE = 1 << 17, // siada na tronie
F2_ORC_SOUNDS = 1 << 18, // dźwięk gadania
F2_GOBLIN_SOUNDS = 1 << 19, // dźwięk gadania
F2_XAR = 1 << 20, // dźwięk gadania, stoi przed ołtarzem i się modli
F2_GOLEM_SOUNDS = 1 << 21, // dźwięk gadania
F2_TOURNAMENT = 1 << 22, // bierze udział w zawodach
F2_YELL = 1 << 23, // okrzyk bojowy nawet gdy ktoś inny pierwszy zauważy wroga
F2_BACKSTAB = 1 << 24, // podwójna premia za cios w plecy
F2_IGNORE_BLOCK = 1 << 25, // blokowanie mniej daje przeciwko jego atakom
F2_BACKSTAB_RES = 1 << 26, // 50% odporności na ataki w plecy
F2_MAGIC_RES50 = 1 << 27, // 50% odporności na magię
F2_MAGIC_RES25 = 1 << 28, // 25% odporności na magię
F2_MARK = 1 << 29, // rysuje trupa na minimapie
F2_GUARDED = 1 << 30, // jednostki wygenerowane w tym samym pokoju chronią go (działa tylko w podziemiach na Event::unit_to_spawn)
F2_NOT_GOBLIN = 1 << 31, // nie ma tekstów goblina
};
//-----------------------------------------------------------------------------
// Even more unit flags...
enum UNIT_FLAGS3
{
F3_CONTEST_25 = 1 << 0, // 25% szansy że weźmie udział w zawodach w piciu
F3_DRUNK_MAGE = 1 << 1, // bierze udział w zawodach w piciu o ile jest pijakiem, bierze udział w walce na arenie o ile nie jest, pije w karczmie i po dołączeniu
F3_DRUNKMAN_AFTER_CONTEST = 1 << 2, // jak pijak ale po zawodach
F3_DONT_EAT = 1 << 3, // nie je bo nie może albo jest w pracy
F3_ORC_FOOD = 1 << 4, // je orkowe jedzenie a nie normalne
F3_MINER = 1 << 5, // 50% szansy że zajmie się wydobywaniem
F3_TALK_AT_COMPETITION = 1 << 6, // nie gada o pierdołach na zawodach
F3_PARENT_DATA = 1 << 7, // unit data is inherited
};
//-----------------------------------------------------------------------------
// Id dźwięku
enum SOUND_ID
{
SOUND_SEE_ENEMY,
SOUND_PAIN,
SOUND_DEATH,
SOUND_ATTACK,
SOUND_TALK,
SOUND_MAX
};
//-----------------------------------------------------------------------------
// Dźwięki postaci
struct SoundPack
{
string id;
vector<SoundPtr> sounds[SOUND_MAX];
bool inited;
SoundPack() : inited(false) {}
bool Have(SOUND_ID sound_id) const { return !sounds[sound_id].empty(); }
SoundPtr Random(SOUND_ID sound_id) const
{
auto& e = sounds[sound_id];
if(e.empty())
return nullptr;
else
return e[Rand() % e.size()];
}
static vector<SoundPack*> packs;
static SoundPack* TryGet(Cstring id);
};
//-----------------------------------------------------------------------------
struct IdlePack
{
string id;
vector<string> anims;
static vector<IdlePack*> packs;
static IdlePack* TryGet(Cstring id);
};
//-----------------------------------------------------------------------------
struct TexPack
{
string id;
vector<TexId> textures;
bool inited;
TexPack() : inited(false) {}
static vector<TexPack*> packs;
static TexPack* TryGet(Cstring id);
};
//-----------------------------------------------------------------------------
struct TraderInfo
{
Stock* stock;
int buy_flags, buy_consumable_flags;
vector<const Item*> includes;
TraderInfo() : stock(nullptr), buy_flags(0), buy_consumable_flags(0) {}
bool CanBuySell(const Item* item);
};
//-----------------------------------------------------------------------------
// Dane postaci
struct UnitData
{
string id, mesh_id, name;
MeshPtr mesh;
MATERIAL_TYPE mat;
Int2 level;
StatProfile* stat_profile;
int hp_bonus, stamina_bonus, def_bonus, dmg_type, flags, flags2, flags3;
SpellList* spells;
Int2 gold, gold2;
GameDialog* dialog;
UNIT_GROUP group;
float walk_speed, run_speed, rot_speed, width, attack_range;
BLOOD blood;
SoundPack* sounds;
FrameInfo* frames;
TexPack* tex;
IdlePack* idles;
ArmorUnitType armor_type;
ItemScript* item_script;
UNIT_TYPE type;
ResourceState state;
Class clas;
TraderInfo* trader;
UnitData() : mesh(nullptr), mat(MAT_BODY), level(0), stat_profile(nullptr), hp_bonus(100), stamina_bonus(0), def_bonus(0), dmg_type(DMG_BLUNT), flags(0),
flags2(0), flags3(0), spells(nullptr), gold(0), gold2(0), dialog(nullptr), group(G_CITIZENS), walk_speed(1.5f), run_speed(5.f), rot_speed(3.f),
width(0.3f), attack_range(1.f), blood(BLOOD_RED), sounds(nullptr), frames(nullptr), tex(nullptr), armor_type(ArmorUnitType::NONE),
item_script(nullptr), idles(nullptr), type(UNIT_TYPE::HUMAN), state(ResourceState::NotLoaded), clas(Class::INVALID), trader(nullptr)
{
}
~UnitData()
{
delete trader;
}
float GetRadius() const
{
return width;
}
StatProfile& GetStatProfile() const
{
return *stat_profile;
}
const TexId* GetTextureOverride() const
{
if(!tex)
return nullptr;
else
return tex->textures.data();
}
void CopyFrom(UnitData& ud);
static SetContainer<UnitData> units;
static std::map<string, UnitData*> aliases;
static UnitData* TryGet(Cstring id);
static UnitData* Get(Cstring id);
static void Validate(uint& err);
};
|
5c1e9711ce2e5ec2e217222aa8f0194ed947f1e4 | 77d9bbd06859fc3243e77f615254a9d76d97a962 | /src/TaskObject.cpp | eefde452ebe6821a390c39942e352a04e18874f4 | [] | no_license | meshellchoo/Task-Manager | 0f5ac24877b9081312ebd1310238b346ee87c43b | 194032b6fb57bcfc85ba159b4364784ede18f828 | refs/heads/master | 2023-04-14T20:59:34.932577 | 2021-04-10T02:13:04 | 2021-04-10T02:13:04 | 332,090,072 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,036 | cpp | TaskObject.cpp | #ifndef __TASKOBJECT_CPP__
#define __TASKOBJECT_CPP__
//#include "/home/csmajs/jooi001/cs100-task-manager/header/TaskObject.hpp"
#include "/home/csmajs/mchu017/cs100-task-manager/header/TaskObject.hpp"
//#include "/home/csmajs/htran164/cs100-task-manager/header/TaskObject.hpp"
void TaskObject::setTaskName(std::string taskName)
{this->taskName = taskName;}
void TaskObject::setTaskType(std::string taskType)
{this->taskType = taskType;}
void TaskObject::setTaskDescription(std::string description)
{this->description = description;}
void TaskObject::setTaskDueDate(Date dueDate)
{this->dueDate = dueDate;}
void TaskObject::setTaskPriority(int priority)
{this->priority = priority;}
std::string TaskObject::getTaskName()const
{return taskName;}
std::string TaskObject::getTaskType()const{
return taskType;}
std::string TaskObject::getTaskDescription()const
{return description;}
int TaskObject::getTaskPriority()const
{return priority;}
Date TaskObject::getTaskDueDate()const
{return dueDate;}
#endif //__TASKOBJECT_CPP__
|
04066f25da3879983e2dd316b67ba897a58133e3 | a5ca102bb14e2cc137ec27a7f5d3d486c5191a83 | /Shader-Programs/transformations.cpp | beaa71d1b43632ebecb46d6383cac33c13093b80 | [] | no_license | phahs/course-projects | 4e3b231bd69766b3ca174eca988b70a39234bbff | fcba3ab0650639f47672eed5f7fae49501dd8dd6 | refs/heads/master | 2021-01-10T21:50:01.910366 | 2020-04-29T21:05:37 | 2020-04-29T21:05:37 | 35,395,879 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 13,677 | cpp | transformations.cpp | //
// Philip Hahs
// phil.hahs@gmail.com
// CS 484
//
// Procedural module that implements transformations used in
// the homework assignment.
//
// $Id: transformations.cpp 4964 2014-04-25 04:43:20Z mshafae $
//
// STUDENTS _MUST_ ADD THEIR CODE INTO THIS FILE
//
#include "transformations.h"
#include "stdio.h"
// Just in case you have a weird cmath header file...
#ifndef M_PI
#define M_PI 3.14159265358979323846264338327950288
#endif
#ifndef PI_OVER_ONE_EIGHTY
#define PI_OVER_ONE_EIGHTY 0.01745329251994329547437168059786927188
#endif
#ifndef ONE_EIGHTY_OVER_PI
#define ONE_EIGHTY_OVER_PI 57.29577951308232286464772187173366546631
#endif
// Don't forget:
// OpenGL's unit for angles is degrees.
// C math library's unit for angles is radians.
#ifndef DEG2RAD
#define DEG2RAD( theta ) ((theta) * (PI_OVER_ONE_EIGHTY))
#endif
#ifndef RAD2DEG
#define RAD2DEG( theta ) ((theta) * (ONE_EIGHTY_OVER_PI))
#endif
// Quick-n-dirty absolute value macro
#ifndef ABS
#define ABS( x ) ((x) < (0) ? (-x) : (x))
#endif
// Don't use pow( ) to square a value.
#ifndef SQR
#define SQR( x ) ((x) * (x))
#endif
#ifndef __SOLUTION__
void rotateCameraLeft(float degrees, float *eyePosition, float *centerPosition, float *upVector){
// Please implement this function.
GLdouble gaze[3] = { centerPosition[0] - eyePosition[0], centerPosition[1] - eyePosition[1], centerPosition[2] - eyePosition[2] };
GLdouble normGaze[3];
double gazeLength;
GLdouble normUp[3];
double upLength;
GLdouble right[3];
GLdouble normRight[3];
double rightLength;
GLfloat rotate[16];
GLfloat rotEye[3];
GLfloat rotUp[3];
gazeLength = sqrt(SQR(gaze[0]) + SQR(gaze[1]) + SQR(gaze[2]));
for (int i = 0; i < 3; i++)
{
normGaze[i] = gaze[i] / gazeLength;
}
upLength = sqrt(SQR(upVector[0]) + SQR(upVector[1]) + SQR(upVector[2]));
for (int i = 0; i < 3; i++)
{
normUp[i] = upVector[i] / upLength;
}
right[0] = normGaze[1] * normUp[2] - normGaze[2] * normUp[1];
right[1] = normGaze[2] * normUp[0] - normGaze[0] * normUp[2];
right[2] = normGaze[0] * normUp[1] - normGaze[1] * normUp[0];
rightLength = sqrt(SQR(right[0]) + SQR(right[1]) + SQR(right[2]));
for (int i = 0; i < 3; i++)
{
normRight[i] = right[i] / rightLength;
}
myRotatef(rotate, degrees, normUp[0], normUp[1], normUp[2]);
rotEye[0] = rotate[0] * eyePosition[0] + rotate[4] * eyePosition[1] + rotate[8] * eyePosition[2];
rotEye[1] = rotate[1] * eyePosition[0] + rotate[5] * eyePosition[1] + rotate[9] * eyePosition[2];
rotEye[2] = rotate[2] * eyePosition[0] + rotate[6] * eyePosition[1] + rotate[10] * eyePosition[2];
rotUp[0] = rotate[0] * normUp[0] + rotate[4] * normUp[1] + rotate[8] * normUp[2];
rotUp[1] = rotate[1] * normUp[0] + rotate[5] * normUp[1] + rotate[9] * normUp[2];
rotUp[2] = rotate[2] * normUp[0] + rotate[6] * normUp[1] + rotate[10] * normUp[2];
eyePosition[0] = rotEye[0];
eyePosition[1] = rotEye[1];
eyePosition[2] = rotEye[2];
upVector[0] = rotUp[0];
upVector[1] = rotUp[1];
upVector[2] = rotUp[2];
}
void rotateCameraUp(float degrees, float *eyePosition, float *centerPosition, float *upVector){
// Please implement this function.
GLdouble gaze[3] = { centerPosition[0] - eyePosition[0], centerPosition[1] - eyePosition[1], centerPosition[2] - eyePosition[2] };
GLdouble normGaze[3];
double gazeLength;
GLdouble normUp[3];
double upLength;
GLdouble right[3];
GLdouble normRight[3];
double rightLength;
GLfloat rotate[16];
GLfloat rotEye[3];
GLfloat rotUp[3];
gazeLength = sqrt(SQR(gaze[0]) + SQR(gaze[1]) + SQR(gaze[2]));
for (int i = 0; i < 3; i++)
{
normGaze[i] = gaze[i] / gazeLength;
}
upLength = sqrt(SQR(upVector[0]) + SQR(upVector[1]) + SQR(upVector[2]));
for (int i = 0; i < 3; i++)
{
normUp[i] = upVector[i] / upLength;
}
right[0] = normGaze[1] * normUp[2] - normGaze[2] * normUp[1];
right[1] = normGaze[2] * normUp[0] - normGaze[0] * normUp[2];
right[2] = normGaze[0] * normUp[1] - normGaze[1] * normUp[0];
rightLength = sqrt(SQR(right[0]) + SQR(right[1]) + SQR(right[2]));
for (int i = 0; i < 3; i++)
{
normRight[i] = right[i] / rightLength;
}
myRotatef(rotate, degrees, normRight[0], normRight[1], normRight[2]);
rotEye[0] = rotate[0] * eyePosition[0] + rotate[4] * eyePosition[1] + rotate[8] * eyePosition[2];
rotEye[1] = rotate[1] * eyePosition[0] + rotate[5] * eyePosition[1] + rotate[9] * eyePosition[2];
rotEye[2] = rotate[2] * eyePosition[0] + rotate[6] * eyePosition[1] + rotate[10] * eyePosition[2];
rotUp[0] = rotate[0] * normUp[0] + rotate[4] * normUp[1] + rotate[8] * normUp[2];
rotUp[1] = rotate[1] * normUp[0] + rotate[5] * normUp[1] + rotate[9] * normUp[2];
rotUp[2] = rotate[2] * normUp[0] + rotate[6] * normUp[1] + rotate[10] * normUp[2];
eyePosition[0] = rotEye[0];
eyePosition[1] = rotEye[1];
eyePosition[2] = rotEye[2];
upVector[0] = rotUp[0];
upVector[1] = rotUp[1];
upVector[2] = rotUp[2];
}
#else
#include "transformations_solution.cpp"
#endif
void myTranslatef(GLfloat *matrix, GLfloat x, GLfloat y, GLfloat z){
// Please implement this function.
matrix[0] = 1; matrix[4] = 0; matrix[8] = 0; matrix[12] = x;
matrix[1] = 0; matrix[5] = 1; matrix[9] = 0; matrix[13] = y;
matrix[2] = 0; matrix[6] = 0; matrix[10] = 1; matrix[14] = z;
matrix[3] = 0; matrix[7] = 0; matrix[11] = 0; matrix[15] = 1;
}
void myScalef(GLfloat *matrix, GLfloat x, GLfloat y, GLfloat z){
// Please implement this function.
matrix[0] = x; matrix[4] = 0; matrix[8] = 0; matrix[12] = 0;
matrix[1] = 0; matrix[5] = y; matrix[9] = 0; matrix[13] = 0;
matrix[2] = 0; matrix[6] = 0; matrix[10] = z; matrix[14] = 0;
matrix[3] = 0; matrix[7] = 0; matrix[11] = 0; matrix[15] = 1;
}
void myRotatef(GLfloat *matrix,
GLfloat angle, GLfloat x, GLfloat y, GLfloat z){
// Remember the Rodrigues' rotation formula?
// R = I + S * sin(theta) + Ssquared * (1 - cos(theta))
GLfloat identity[16];
GLfloat skewMatrix[16];
GLfloat skewMatrixSqr[16];
GLfloat skewXsin[16];
GLfloat skewSqrXcos[16];
GLfloat radAngle = DEG2RAD(angle);
identity[0] = 1; identity[4] = 0; identity[8] = 0; identity[12] = 0;
identity[1] = 0; identity[5] = 1; identity[9] = 0; identity[13] = 0;
identity[2] = 0; identity[6] = 0; identity[10] = 1; identity[14] = 0;
identity[3] = 0; identity[7] = 0; identity[11] = 0; identity[15] = 1;
skewMatrix[0] = 0; skewMatrix[4] = z; skewMatrix[8] = -y; skewMatrix[12] = 0;
skewMatrix[1] = -z; skewMatrix[5] = 0; skewMatrix[9] = x; skewMatrix[13] = 0;
skewMatrix[2] = y; skewMatrix[6] = -x; skewMatrix[10] = 0; skewMatrix[14] = 0;
skewMatrix[3] = 0; skewMatrix[7] = 0; skewMatrix[11] = 0; skewMatrix[15] = 0;
matrixMult(skewMatrixSqr, skewMatrix, skewMatrix);
for (int i = 0; i < 16; i++)
{
skewXsin[i] = skewMatrix[i] * sin(radAngle);
skewSqrXcos[i] = skewMatrixSqr[i] * (1 - cos(radAngle));
}
for (int i = 0; i < 16; i++)
{
matrix[i] = identity[i] + skewXsin[i] + skewSqrXcos[i];
}
}
void myLookAt(GLfloat *matrix,
GLdouble eyeX, GLdouble eyeY, GLdouble eyeZ,
GLdouble centerX, GLdouble centerY, GLdouble centerZ,
GLdouble upX, GLdouble upY, GLdouble upZ){
// Please implement this function.
GLdouble gaze[3] = { centerX - eyeX, centerY - eyeY, centerZ - eyeZ };
GLdouble up[3] = { upX, upY, upZ };
GLdouble normGaze[3];
double gazeLength;
GLdouble normUp[3];
double upLength;
GLdouble right[3];
GLdouble normRight[3];
double rightLength;
GLfloat translate[16];
GLfloat modelView[16];
gazeLength = sqrt(SQR(gaze[0]) + SQR(gaze[1]) + SQR(gaze[2]));
for (int i = 0; i < 3; i++)
{
normGaze[i] = gaze[i] / gazeLength;
}
upLength = sqrt(SQR(up[0]) + SQR(up[1]) + SQR(up[2]));
for (int i = 0; i < 3; i++)
{
normUp[i] = up[i] / upLength;
}
right[0] = normGaze[1] * normUp[2] - normGaze[2] * normUp[1];
right[1] = normGaze[2] * normUp[0] - normGaze[0] * normUp[2];
right[2] = normGaze[0] * normUp[1] - normGaze[1] * normUp[0];
rightLength = sqrt(SQR(right[0]) + SQR(right[1]) + SQR(right[2]));
for (int i = 0; i < 3; i++)
{
normRight[i] = right[i] / rightLength;
}
modelView[0] = normRight[0]; modelView[4] = normRight[1]; modelView[8] = normRight[2]; modelView[12] = 0;
modelView[1] = normUp[0]; modelView[5] = normUp[1]; modelView[9] = normUp[2]; modelView[13] = 0;
modelView[2] = -normGaze[0]; modelView[6] = -normGaze[1]; modelView[10] = -normGaze[2]; modelView[14] = 0;
modelView[3] = 0; modelView[7] = 0; modelView[11] = 0; modelView[15] = 1;
myTranslatef(translate, -eyeX, -eyeY, -eyeZ);
matrixMult(matrix, modelView, translate);
}
void myFrustum(GLfloat *matrix,
GLdouble left, GLdouble right, GLdouble bottom,
GLdouble top, GLdouble zNear, GLdouble zFar){
// Please implement this function.
/* // This code is just a placeholder to demonstrate how this procedure
// returns the LookAt matrix by reference.
// YOU MUST REMOVE THE CODE BELOW AND WRITE YOUR OWN ROUTINE.
int mode;
glGetIntegerv(GL_MATRIX_MODE, &mode);
glPushMatrix();
glLoadIdentity();
glFrustum(left, right, bottom, top, zNear, zFar);
glGetFloatv(mode == GL_MODELVIEW ?
GL_MODELVIEW_MATRIX : GL_PROJECTION_MATRIX,
matrix);
glPopMatrix();
*/
GLdouble x = ((2 * zNear) / (right - left));
GLdouble y = ((2 * zNear) / (top - bottom));
GLdouble z = ((zFar + zNear) / (zFar - zNear));
GLdouble A = ((right + left) / (right - left));
GLdouble B = ((top + bottom) / (top - bottom));
GLdouble C = -((2 * zNear * zFar) / (zFar - zNear));
matrix[0] = x; matrix[4] = 0; matrix[8] = A; matrix[12] = 0;
matrix[1] = 0; matrix[5] = y; matrix[9] = B; matrix[13] = 0;
matrix[2] = 0; matrix[6] = 0; matrix[10] = C; matrix[14] = C;
matrix[3] = 0; matrix[7] = 0; matrix[11] = -1; matrix[15] = 0;
}
void myPerspective(GLfloat *matrix,
GLdouble fovy, GLdouble aspect,
GLdouble zNear, GLdouble zFar){
// Please implement this function.
/*
int mode;
glGetIntegerv(GL_MATRIX_MODE, &mode);
glMatrixMode(GL_MODELVIEW);
glPushMatrix();
glLoadIdentity();
gluPerspective(fovy, aspect, zNear, zFar);
glGetFloatv(mode == GL_MODELVIEW ?
GL_MODELVIEW_MATRIX : GL_PROJECTION_MATRIX,
matrix);
glPopMatrix();
glMatrixMode(mode);
*/
// /*
double f = 1 / tan(DEG2RAD(fovy / 2));
matrix[0] = f / aspect; matrix[4] = 0; matrix[8] = 0; matrix[12] = 0;
matrix[1] = 0; matrix[5] = f; matrix[9] = 0; matrix[13] = 0;
matrix[2] = 0; matrix[6] = 0; matrix[10] = (zFar + zNear) / (zNear - zFar); matrix[14] = (2 * (zFar * zNear)) / (zNear - zFar);
matrix[3] = 0; matrix[7] = 0; matrix[11] = -1; matrix[15] = 0;
// */
}
void myOrtho(GLfloat *matrix,
GLdouble left, GLdouble right, GLdouble bottom,
GLdouble top, GLdouble zNear, GLdouble zFar){
// Please implement this function.
int mode;
glGetIntegerv(GL_MATRIX_MODE, &mode);
glPushMatrix();
glLoadIdentity();
glOrtho(left, right, bottom, top, zNear, zFar);
glGetFloatv(mode == GL_MODELVIEW ?
GL_MODELVIEW_MATRIX : GL_PROJECTION_MATRIX,
matrix);
glPopMatrix();
/*
matrix[0] = 2 / (right - left); matrix[4] = 0; matrix[8] = 0; matrix[12] = -((right + left) / (right - left));
matrix[1] = 0; matrix[5] = 2 / (top - bottom); matrix[9] = 0; matrix[13] = -((top + bottom) / (top - bottom));
matrix[2] = 0; matrix[6] = 0; matrix[10] = -2 / (zFar - zNear); matrix[14] = -((zFar + zNear) / (zFar - zNear));
matrix[3] = 0; matrix[7] = 0; matrix[11] = 0; matrix[15] = 1;
*/
}
void matrixMult(GLfloat * result, GLfloat * a, GLfloat * b)
{
/*
float b00 = b[0]; float b01 = b[4]; float b02 = b[8]; float b03 = b[12];
float b10 = b[1]; float b11 = b[5]; float b12 = b[9]; float b13 = b[13];
float b20 = b[2]; float b21 = b[6]; float b22 = b[10]; float b23 = b[14];
float b30 = b[3]; float b31 = b[7]; float b32 = b[11]; float b33 = b[15];
for (int i = 0; i < 4; i++)
{
result[0 + i] = a[i] * b00 + a[i + 4] * b10 + a[i + 8] * b20 + a[i + 12] * b30;
result[4 + i] = a[i] * b01 + a[i + 4] * b11 + a[i + 8] * b21 + a[i + 12] * b31;
result[8 + i] = a[i] * b02 + a[i + 4] * b12 + a[i + 8] * b22 + a[i + 12] * b32;
result[12 + i] = a[i] * b03 + a[i + 4] * b13 + a[i + 8] * b23 + a[i + 12] * b33;
}
*/
// /*
// column one
result[0] = a[0] * b[0] + a[4] * b[1] + a[8] * b[2] + a[12] * b[3];
result[1] = a[1] * b[0] + a[5] * b[1] + a[9] * b[2] + a[13] * b[3];
result[2] = a[2] * b[0] + a[6] * b[1] + a[10] * b[2] + a[14] * b[3];
result[3] = a[3] * b[0] + a[7] * b[1] + a[11] * b[2] + a[15] * b[3];
//column two
result[4] = a[0] * b[4] + a[4] * b[5] + a[8] * b[6] + a[12] * b[7];
result[5] = a[1] * b[4] + a[5] * b[5] + a[9] * b[6] + a[13] * b[7];
result[6] = a[2] * b[4] + a[6] * b[5] + a[10] * b[6] + a[14] * b[7];
result[7] = a[3] * b[4] + a[7] * b[5] + a[11] * b[6] + a[15] * b[7];
// column three
result[8] = a[0] * b[8] + a[4] * b[9] + a[8] * b[10] + a[12] * b[11];
result[9] = a[1] * b[8] + a[5] * b[9] + a[9] * b[10] + a[13] * b[11];
result[10] = a[2] * b[8] + a[6] * b[9] + a[10] * b[10] + a[14] * b[11];
result[11] = a[3] * b[8] + a[7] * b[9] + a[11] * b[10] + a[15] * b[11];
// column four
result[12] = a[0] * b[12] + a[4] * b[13] + a[8] * b[14] + a[12] * b[15];
result[13] = a[1] * b[12] + a[5] * b[13] + a[9] * b[14] + a[13] * b[15];
result[14] = a[2] * b[12] + a[6] * b[13] + a[10] * b[14] + a[14] * b[15];
result[15] = a[3] * b[12] + a[7] * b[13] + a[11] * b[14] + a[15] * b[15];
// */
/* printf("First Matrix\n");
printMat(a);
printf("Second Matrix\n");
printMat(b);
printf("Resulting Matrix\n");
printMat(result);
*/
}
void printMat(GLfloat *m)
{
for (int i = 0; i < 4; i++)
{
printf("%.4f, %.4f, %.4f, %.4f\n", m[i], m[i + 4], m[i + 8], m[i + 12]);
}
}
void printVec(GLfloat *v)
{
for (int i = 0; i < 3; i++)
{
printf("%.4f, %.4f, %.4f\n", v[i], v[i + 1], v[i + 2]);
}
} |
92bbe2b23491e601d2a2e00b49e7fd9368c35695 | 2a016f97e5bb82ce83a0d77bf625361fe9b2968c | /pr8/4.cpp | 4427aa6bc4cc8a1d443a2d12db07edd77bf4feb0 | [] | no_license | JuliManhupli/Fundamental-of-Programming-II | 1ba169590c7b112ad4578b3b34b05aea025ac59e | a1b6cebacdc5e30c3bd3eb222232c00458f8cc1f | refs/heads/main | 2023-08-22T07:21:18.784383 | 2021-10-25T10:53:38 | 2021-10-25T10:53:38 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 399 | cpp | 4.cpp | #include<iostream>
using namespace std;
int main() {
ios::fmtflags prev = cout.flags();
cout.unsetf(ios::dec);
cout.setf(ios::showbase | ios::hex);
cout << 100 << endl;
cout.flags(prev);
cout << 100 << endl;
return 0;
}
/*showbase - при выводе указывать числовую базу
hex - значения выводятся в шестнадцатеричной форме*/ |
85a6ea09b43aa6f33f59ae5074a5bde932c56469 | 52103f13257ccf0cdd79eac297056c2144c88450 | /week2/AnalogDim/AnalogDim.ino | d0407af77f8ed3cbd0bb8f276a34aabbfc41bb94 | [] | no_license | parmcoder/iot-T3-2020 | e28798cbe8792d6d02fd8be28b2c8d9ec32385d9 | 51aca42955b1fedb601641135f9d5390645aa691 | refs/heads/main | 2023-07-23T09:36:06.717873 | 2021-09-04T22:46:29 | 2021-09-04T22:46:29 | 364,955,200 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 206 | ino | AnalogDim.ino | int led = 3;
int brightness = 0;
int fadeAmount = 5;
void setup() {
pinMode(led, OUTPUT);
Serial.begin(9600);
}
void loop(){
int pot_in = analogRead(A0);
analogWrite(led, pot_in/4);
delay(20);
}
|
af439941f2abbd151a7b50728313b1b04450a0a7 | 2f8bb946a984ce647c56aabe669de0f68286ad33 | /d1/ex04/ex04.cpp | 7e6a6bf6062bb349c498cb8ceff26be10e699c4f | [] | no_license | Smi1e-man/Bootcamp_C_plus_plus | 14580607a3c9602af7dbe22fd6a3c225f4bdf10e | f381fd5adab7e99a051912fd4e0c6bf18a33661d | refs/heads/master | 2020-05-19T00:52:42.409127 | 2019-05-03T11:49:55 | 2019-05-03T11:49:55 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,106 | cpp | ex04.cpp | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ex04.cpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: seshevch <seshevch@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/04/02 16:17:10 by seshevch #+# #+# */
/* Updated: 2019/04/02 16:28:34 by seshevch ### ########.fr */
/* */
/* ************************************************************************** */
#include "iostream"
int main()
{
std::string data = "HI THIS IS BRAIN";
std::string* point = &data;
std::string& link = data;
std::cout<< data<< " | "<< *point<< " | "<< link<< std::endl;
return (0);
} |
bd56072cd3bfe955676edbdf5875cb13a419a221 | 0c7e20a002108d636517b2f0cde6de9019fdf8c4 | /Sources/Elastos/LibCore/inc/elastos/security/cert/CertPathBuilderSpi.h | 8d33c569ccbe28d0386cd8448536f1f219dcb888 | [
"Apache-2.0"
] | permissive | kernal88/Elastos5 | 022774d8c42aea597e6f8ee14e80e8e31758f950 | 871044110de52fcccfbd6fd0d9c24feefeb6dea0 | refs/heads/master | 2021-01-12T15:23:52.242654 | 2016-10-24T08:20:15 | 2016-10-24T08:20:15 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 447 | h | CertPathBuilderSpi.h |
#ifndef __ELASTOS_SECURITY_CERT_CERTPATHBUILDERSPI_H__
#define __ELASTOS_SECURITY_CERT_CERTPATHBUILDERSPI_H__
#include "Elastos.CoreLibrary.Security.h"
#include "core/Object.h"
namespace Elastos {
namespace Security {
namespace Cert {
class CertPathBuilderSpi
: public Object
, public ICertPathBuilderSpi
{
public:
CAR_INTERFACE_DECL()
CertPathBuilderSpi();
};
}
}
}
#endif // __ELASTOS_SECURITY_CERT_CERTPATHBUILDERSPI_H__
|
a261717fcd56a85779c42b4282e72a5fab535663 | 9cf05b3cd95d829e6d10d8a18cb292d04dc369c9 | /include/communication.h | 93d1fa92ebbf1c0af5ebc588ae28a212f013f6be | [
"BSD-3-Clause"
] | permissive | hommeabeil/perception3d | 21bba6b0f8915bb536443787d018379f21896458 | face90e2cc1722c9d049056426adfa1b578622b8 | refs/heads/master | 2021-01-18T05:03:20.978493 | 2014-08-15T19:05:42 | 2014-08-15T19:05:42 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,386 | h | communication.h | #ifndef COMMUNICATION_H
#define COMMUNICATION_H
#include <ros/ros.h>
#include <std_msgs/String.h>
#include <objectExtractor.h>
#include <stdlib.h>
#include <fileAPI.h>
#include <jaco_custom.h>
#include <Eigen/Eigen>
#include <Eigen/Geometry>
#include <eigen_conversions/eigen_msg.h>
#include <tf/transform_datatypes.h>
#include <tf_conversions/tf_eigen.h>
class Communication
{
public:
Communication(ObjectExtractor *p_obj_e, FileAPI *p_api, JacoCustom *p_jaco);
void callback_android_listener(const std_msgs::String& p_input);
void coordinate_processing(std_msgs::String p_coordinate);
void grasp_processing(std_msgs::String p_grasp);
void train_processing(std_msgs::String p_train);
void spin_once();
bool get_coordinate_received() const;
bool get_grasp_received() const;
bool get_train_received() const;
void train();
void repeat();
void testTFandSurfaceTransforms();
tf::Transform tfFromEigen(Eigen::Matrix4f trans);
private:
ObjectExtractor* m_object_ex_ptr;
FileAPI* m_api_ptr;
JacoCustom* m_jaco_ptr;
float m_coordinate_user_sended[2];
int m_position_vector_cvfh;
bool m_coordinate_received;
bool m_grasp_received;
bool m_train_received;
tf::Transform m_relative_pose;
void publishRelativePoseTF(tf::Transform relative_pose);
bool m_publish_relative_pose;
};
#endif
|
9210c231774afa03446b0be74299a623b4c5f16e | 94db0bd95a58fabfd47517ed7d7d819a542693cd | /client/ClientRes/IOSAPI/Classes/Native/Bulk_Lidgren.Network_0.cpp | 2024546c53140a763015a88286260cb389368a7a | [] | no_license | Avatarchik/card | 9fc6efa058085bd25f2b8831267816aa12b24350 | d18dbc9c7da5cf32c963458ac13731ecfbf252fa | refs/heads/master | 2020-06-07T07:01:00.444233 | 2017-12-11T10:52:17 | 2017-12-11T10:52:17 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 806,315 | cpp | Bulk_Lidgren.Network_0.cpp | #include "il2cpp-config.h"
#ifndef _MSC_VER
# include <alloca.h>
#else
# include <malloc.h>
#endif
#include <cstring>
#include <string.h>
#include <stdio.h>
#include <cmath>
#include <limits>
#include <assert.h>
// Lidgren.Network.MWCRandom
struct MWCRandom_t315011312;
// Lidgren.Network.NetBitVector
struct NetBitVector_t1774780753;
// System.String
struct String_t;
// System.Byte[]
struct ByteU5BU5D_t3397334013;
// Lidgren.Network.NetBuffer
struct NetBuffer_t3608062491;
// System.Net.IPEndPoint
struct IPEndPoint_t2615413766;
// Lidgren.Network.NetClient
struct NetClient_t1212131464;
// Lidgren.Network.NetConnection
struct NetConnection_t3331492029;
// Lidgren.Network.NetPeerConfiguration
struct NetPeerConfiguration_t136603591;
// Lidgren.Network.NetOutgoingMessage
struct NetOutgoingMessage_t2016542980;
// Lidgren.Network.NetPeer
struct NetPeer_t1779390221;
// Lidgren.Network.NetSenderChannelBase
struct NetSenderChannelBase_t3096690204;
// Lidgren.Network.NetIncomingMessage
struct NetIncomingMessage_t2014089816;
// Lidgren.Network.NetReceiverChannelBase
struct NetReceiverChannelBase_t908288882;
// Lidgren.Network.NetConnectionStatistics
struct NetConnectionStatistics_t1235765202;
// Lidgren.Network.NetException
struct NetException_t2452891498;
// System.Threading.AutoResetEvent
struct AutoResetEvent_t15112628;
// System.Collections.Generic.IList`1<Lidgren.Network.NetConnection>
struct IList_1_t3872432630;
// System.Net.Sockets.Socket
struct Socket_t3821512045;
// Lidgren.Network.NetPeer/DelayedPacket
struct DelayedPacket_t1298207473;
// System.Net.IPAddress
struct IPAddress_t1399971723;
// Lidgren.Network.NetPeerStatistics
struct NetPeerStatistics_t101027066;
// Lidgren.Network.NetRandom
struct NetRandom_t509742058;
// Lidgren.Network.NetReliableOrderedReceiver
struct NetReliableOrderedReceiver_t2554037675;
// Lidgren.Network.NetReliableSenderChannel
struct NetReliableSenderChannel_t2899775811;
// Lidgren.Network.NetReliableSequencedReceiver
struct NetReliableSequencedReceiver_t2385271929;
// Lidgren.Network.NetReliableUnorderedReceiver
struct NetReliableUnorderedReceiver_t3992686328;
// Lidgren.Network.NetUnreliableSenderChannel
struct NetUnreliableSenderChannel_t1909769502;
// Lidgren.Network.NetUnreliableSequencedReceiver
struct NetUnreliableSequencedReceiver_t2497601560;
// Lidgren.Network.NetUnreliableUnorderedReceiver
struct NetUnreliableUnorderedReceiver_t3541921227;
// Lidgren.Network.NetUPnP
struct NetUPnP_t2794379482;
// System.Net.NetworkInformation.NetworkInterface
struct NetworkInterface_t63927633;
// Lidgren.Network.ReceivedFragmentGroup
struct ReceivedFragmentGroup_t4108580702;
#include "class-internals.h"
#include "codegen/il2cpp-codegen.h"
#include "mscorlib_System_Array3829468939.h"
#include "Lidgren_Network_U3CModuleU3E3783534214.h"
#include "Lidgren_Network_U3CModuleU3E3783534214MethodDeclarations.h"
#include "Lidgren_Network_Lidgren_Network_MessageResendReason402253882.h"
#include "Lidgren_Network_Lidgren_Network_MessageResendReason402253882MethodDeclarations.h"
#include "Lidgren_Network_Lidgren_Network_MWCRandom315011312.h"
#include "Lidgren_Network_Lidgren_Network_MWCRandom315011312MethodDeclarations.h"
#include "mscorlib_System_Void1841601450.h"
#include "Lidgren_Network_Lidgren_Network_NetRandom509742058MethodDeclarations.h"
#include "Lidgren_Network_Lidgren_Network_NetRandomSeed726093591MethodDeclarations.h"
#include "mscorlib_System_UInt642909196914.h"
#include "mscorlib_System_UInt322149682021.h"
#include "Lidgren_Network_Lidgren_Network_NetBitVector1774780753.h"
#include "Lidgren_Network_Lidgren_Network_NetBitVector1774780753MethodDeclarations.h"
#include "mscorlib_System_Int322071877448.h"
#include "mscorlib_System_Object2689449295MethodDeclarations.h"
#include "mscorlib_ArrayTypes.h"
#include "mscorlib_System_Boolean3825574718.h"
#include "Lidgren_Network_Lidgren_Network_NetException2452891498MethodDeclarations.h"
#include "mscorlib_System_Array3829468939MethodDeclarations.h"
#include "mscorlib_System_String2029220233.h"
#include "mscorlib_System_Text_StringBuilder1221177846MethodDeclarations.h"
#include "mscorlib_System_Text_StringBuilder1221177846.h"
#include "mscorlib_System_Char3454481338.h"
#include "mscorlib_System_Object2689449295.h"
#include "Lidgren_Network_Lidgren_Network_NetBitWriter1792140809.h"
#include "Lidgren_Network_Lidgren_Network_NetBitWriter1792140809MethodDeclarations.h"
#include "mscorlib_System_Byte3683104436.h"
#include "mscorlib_System_Buffer3497320070MethodDeclarations.h"
#include "mscorlib_System_UInt16986882611.h"
#include "System_System_Diagnostics_Debug2273457373MethodDeclarations.h"
#include "Lidgren_Network_Lidgren_Network_NetBuffer3608062491.h"
#include "Lidgren_Network_Lidgren_Network_NetBuffer3608062491MethodDeclarations.h"
#include "mscorlib_System_Collections_Generic_Dictionary_2_ge972936938MethodDeclarations.h"
#include "mscorlib_System_Type1303803226MethodDeclarations.h"
#include "mscorlib_System_String2029220233MethodDeclarations.h"
#include "mscorlib_System_Reflection_MethodInfo3330546337.h"
#include "mscorlib_System_Reflection_ParameterInfo2249040075.h"
#include "mscorlib_System_Collections_Generic_Dictionary_2_ge972936938.h"
#include "mscorlib_System_Type1303803226.h"
#include "mscorlib_System_RuntimeTypeHandle2330101084.h"
#include "mscorlib_System_Reflection_BindingFlags1082350898.h"
#include "mscorlib_System_Reflection_MethodBase904190842MethodDeclarations.h"
#include "mscorlib_System_Reflection_MethodBase904190842.h"
#include "mscorlib_System_Reflection_MemberInfo4043097260MethodDeclarations.h"
#include "mscorlib_System_Reflection_MemberInfo4043097260.h"
#include "mscorlib_System_StringComparison2376310518.h"
#include "mscorlib_System_Reflection_MethodInfo3330546337MethodDeclarations.h"
#include "mscorlib_System_Reflection_ParameterInfo2249040075MethodDeclarations.h"
#include "mscorlib_System_Int64909078037.h"
#include "mscorlib_System_Single2076509932.h"
#include "mscorlib_System_BitConverter3195628829MethodDeclarations.h"
#include "mscorlib_System_Text_Encoding663144255MethodDeclarations.h"
#include "Lidgren_Network_Lidgren_Network_NetException2452891498.h"
#include "mscorlib_System_Text_Encoding663144255.h"
#include "System_System_Net_IPEndPoint2615413766.h"
#include "Lidgren_Network_Lidgren_Network_NetUtility3562260209MethodDeclarations.h"
#include "System_System_Net_IPEndPoint2615413766MethodDeclarations.h"
#include "System_System_Net_IPAddress1399971723.h"
#include "mscorlib_System_ArgumentNullException628810857MethodDeclarations.h"
#include "mscorlib_System_ArgumentNullException628810857.h"
#include "Lidgren_Network_Lidgren_Network_SingleUIntUnion3787661257.h"
#include "Lidgren_Network_Lidgren_Network_NetClient1212131464.h"
#include "Lidgren_Network_Lidgren_Network_NetClient1212131464MethodDeclarations.h"
#include "Lidgren_Network_Lidgren_Network_NetConnection3331492029.h"
#include "mscorlib_System_Collections_Generic_List_1_gen2700613161MethodDeclarations.h"
#include "Lidgren_Network_Lidgren_Network_NetPeer1779390221.h"
#include "mscorlib_System_Collections_Generic_List_1_gen2700613161.h"
#include "Lidgren_Network_Lidgren_Network_NetPeerConfiguratio136603591.h"
#include "Lidgren_Network_Lidgren_Network_NetPeer1779390221MethodDeclarations.h"
#include "Lidgren_Network_Lidgren_Network_NetPeerConfiguratio136603591MethodDeclarations.h"
#include "Lidgren_Network_Lidgren_Network_NetOutgoingMessage2016542980.h"
#include "mscorlib_System_Threading_Monitor3228523394MethodDeclarations.h"
#include "mscorlib_System_Collections_Generic_Dictionary_2_g3898409514MethodDeclarations.h"
#include "mscorlib_System_Collections_Generic_Dictionary_2_g3898409514.h"
#include "Lidgren_Network_Lidgren_Network_NetSendResult408708396.h"
#include "Lidgren_Network_Lidgren_Network_NetDeliveryMethod3645638710.h"
#include "Lidgren_Network_Lidgren_Network_NetConnection3331492029MethodDeclarations.h"
#include "Lidgren_Network_Lidgren_Network_NetConnectionStatus952199027.h"
#include "mscorlib_System_Double4078015681.h"
#include "Lidgren_Network_Lidgren_Network_NetQueue_1_gen1156019562MethodDeclarations.h"
#include "Lidgren_Network_Lidgren_Network_NetConnectionStati1235765202MethodDeclarations.h"
#include "Lidgren.Network_ArrayTypes.h"
#include "Lidgren_Network_Lidgren_Network_NetSenderChannelBa3096690204.h"
#include "Lidgren_Network_Lidgren_Network_NetReceiverChannelB908288882.h"
#include "Lidgren_Network_Lidgren_Network_NetQueue_1_gen1156019562.h"
#include "Lidgren_Network_Lidgren_Network_NetConnectionStati1235765202.h"
#include "Lidgren_Network_Lidgren_Network_NetTime3056501352MethodDeclarations.h"
#include "Lidgren_Network_Lidgren_Network_NetIncomingMessage2014089816.h"
#include "Lidgren_Network_Lidgren_Network_NetIncomingMessage4279120760.h"
#include "Lidgren_Network_Lidgren_Network_NetTuple_2_gen3234296172.h"
#include "Lidgren_Network_Lidgren_Network_NetMessageType191235414.h"
#include "Lidgren_Network_Lidgren_Network_NetSenderChannelBa3096690204MethodDeclarations.h"
#include "Lidgren_Network_Lidgren_Network_NetOutgoingMessage2016542980MethodDeclarations.h"
#include "mscorlib_System_Threading_Interlocked1625106012MethodDeclarations.h"
#include "Lidgren_Network_Lidgren_Network_NetUnreliableSende1909769502MethodDeclarations.h"
#include "Lidgren_Network_Lidgren_Network_NetReliableSenderC2899775811MethodDeclarations.h"
#include "Lidgren_Network_Lidgren_Network_NetUnreliableSende1909769502.h"
#include "Lidgren_Network_Lidgren_Network_NetReliableSenderC2899775811.h"
#include "Lidgren_Network_Lidgren_Network_NetTuple_2_gen3234296172MethodDeclarations.h"
#include "Lidgren_Network_Lidgren_Network_NetReceiverChannelB908288882MethodDeclarations.h"
#include "Lidgren_Network_Lidgren_Network_NetUnreliableUnord3541921227MethodDeclarations.h"
#include "Lidgren_Network_Lidgren_Network_NetReliableOrdered2554037675MethodDeclarations.h"
#include "Lidgren_Network_Lidgren_Network_NetUnreliableSeque2497601560MethodDeclarations.h"
#include "Lidgren_Network_Lidgren_Network_NetReliableUnorder3992686328MethodDeclarations.h"
#include "Lidgren_Network_Lidgren_Network_NetReliableSequenc2385271929MethodDeclarations.h"
#include "Lidgren_Network_Lidgren_Network_NetUnreliableUnord3541921227.h"
#include "Lidgren_Network_Lidgren_Network_NetReliableOrdered2554037675.h"
#include "Lidgren_Network_Lidgren_Network_NetUnreliableSeque2497601560.h"
#include "Lidgren_Network_Lidgren_Network_NetReliableUnorder3992686328.h"
#include "Lidgren_Network_Lidgren_Network_NetReliableSequenc2385271929.h"
#include "Lidgren_Network_Lidgren_Network_NetQueue_1_gen1703294902MethodDeclarations.h"
#include "Lidgren_Network_Lidgren_Network_NetQueue_1_gen1703294902.h"
#include "Lidgren_Network_Lidgren_Network_NetTuple_2_gen3781571512.h"
#include "Lidgren_Network_Lidgren_Network_NetTuple_2_gen3781571512MethodDeclarations.h"
#include "mscorlib_System_Exception1927440687.h"
#include "mscorlib_System_Exception1927440687MethodDeclarations.h"
#include "Lidgren_Network_Lidgren_Network_NetConnection_Expa3530790055.h"
#include "Lidgren_Network_Lidgren_Network_NetConnection_Expa3530790055MethodDeclarations.h"
#include "Lidgren_Network_Lidgren_Network_NetStoredReliableM1576378473.h"
#include "Lidgren_Network_Lidgren_Network_NetConnectionStatus952199027MethodDeclarations.h"
#include "Lidgren_Network_Lidgren_Network_NetDeliveryMethod3645638710MethodDeclarations.h"
#include "Lidgren_Network_Lidgren_Network_NetFragmentationHe3305818822.h"
#include "Lidgren_Network_Lidgren_Network_NetFragmentationHe3305818822MethodDeclarations.h"
#include "Lidgren_Network_Lidgren_Network_NetIncomingMessage2014089816MethodDeclarations.h"
#include "Lidgren_Network_Lidgren_Network_NetIncomingMessage4279120760MethodDeclarations.h"
#include "Lidgren_Network_Lidgren_Network_NetMessageType191235414MethodDeclarations.h"
#include "mscorlib_System_Threading_AutoResetEvent15112628.h"
#include "mscorlib_System_Threading_AutoResetEvent15112628MethodDeclarations.h"
#include "mscorlib_System_Collections_Generic_List_1_gen667328605MethodDeclarations.h"
#include "Lidgren_Network_Lidgren_Network_NetPeerStatistics101027066MethodDeclarations.h"
#include "Lidgren_Network_Lidgren_Network_NetQueue_1_gen4230780502MethodDeclarations.h"
#include "mscorlib_System_Collections_Generic_Dictionary_2_g2557578811MethodDeclarations.h"
#include "mscorlib_System_Collections_Generic_List_1_gen667328605.h"
#include "Lidgren_Network_Lidgren_Network_NetPeerStatistics101027066.h"
#include "Lidgren_Network_Lidgren_Network_NetQueue_1_gen4230780502.h"
#include "System_System_Net_IPAddress1399971723MethodDeclarations.h"
#include "System_System_Net_EndPoint4156119363.h"
#include "Lidgren_Network_Lidgren_Network_NetPeerStatus37952291.h"
#include "mscorlib_System_Collections_Generic_Dictionary_2_g2557578811.h"
#include "mscorlib_System_Threading_ThreadStart3437517264MethodDeclarations.h"
#include "mscorlib_System_Threading_Thread241561612MethodDeclarations.h"
#include "Lidgren_Network_Lidgren_Network_NetUPnP2794379482MethodDeclarations.h"
#include "mscorlib_System_Int322071877448MethodDeclarations.h"
#include "mscorlib_System_Threading_ThreadStart3437517264.h"
#include "mscorlib_System_IntPtr2504060609.h"
#include "mscorlib_System_Threading_Thread241561612.h"
#include "Lidgren_Network_Lidgren_Network_NetUPnP2794379482.h"
#include "mscorlib_System_Collections_Generic_Dictionary_2_g3116406337MethodDeclarations.h"
#include "Lidgren_Network_Lidgren_Network_ReceivedFragmentGr4108580702MethodDeclarations.h"
#include "mscorlib_System_Collections_Generic_Dictionary_2_g3116406337.h"
#include "Lidgren_Network_Lidgren_Network_ReceivedFragmentGr4108580702.h"
#include "System_System_Net_Sockets_Socket3821512045.h"
#include "mscorlib_System_Threading_EventWaitHandle2091316307MethodDeclarations.h"
#include "mscorlib_System_Collections_Generic_List_1_gen1255402771MethodDeclarations.h"
#include "Lidgren_Network_Lidgren_Network_NetTuple_2_gen1886281639.h"
#include "mscorlib_System_Collections_Generic_List_1_Enumerat790132445.h"
#include "mscorlib_System_Collections_Generic_List_1_gen1255402771.h"
#include "mscorlib_System_Collections_Generic_List_1_Enumerat790132445MethodDeclarations.h"
#include "mscorlib_System_Threading_SynchronizationContext3857790437.h"
#include "mscorlib_System_Threading_SendOrPostCallback296893742.h"
#include "mscorlib_System_Threading_SynchronizationContext3857790437MethodDeclarations.h"
#include "System_System_Net_Sockets_Socket3821512045MethodDeclarations.h"
#include "mscorlib_System_Convert2607082565MethodDeclarations.h"
#include "System_System_Net_Sockets_AddressFamily303362630.h"
#include "System_System_Net_Sockets_SocketType1143498533.h"
#include "System_System_Net_Sockets_ProtocolType2178963134.h"
#include "System_System_Net_Sockets_SocketOptionLevel1505247880.h"
#include "System_System_Net_Sockets_SocketOptionName1089121285.h"
#include "mscorlib_System_Collections_Generic_Dictionary_2_V2601469357MethodDeclarations.h"
#include "mscorlib_System_Collections_Generic_List_1_Enumera2235342835.h"
#include "mscorlib_System_Collections_Generic_Dictionary_2_V1289974982.h"
#include "mscorlib_System_Collections_Generic_List_1_Enumera2235342835MethodDeclarations.h"
#include "mscorlib_System_Collections_Generic_Dictionary_2_V2601469357.h"
#include "mscorlib_System_Collections_Generic_Dictionary_2_V1289974982MethodDeclarations.h"
#include "System_System_Net_Sockets_SocketShutdown3247039417.h"
#include "System_System_Net_Sockets_SocketException1618573604MethodDeclarations.h"
#include "mscorlib_System_Collections_Generic_KeyValuePair_21655754736.h"
#include "System_System_Net_Sockets_SocketException1618573604.h"
#include "mscorlib_System_Collections_Generic_Dictionary_2_En923466920.h"
#include "System_System_Net_Sockets_SocketError307542793.h"
#include "mscorlib_System_Collections_Generic_Dictionary_2_En923466920MethodDeclarations.h"
#include "mscorlib_System_Collections_Generic_KeyValuePair_21655754736MethodDeclarations.h"
#include "System_System_Net_Sockets_SelectMode3413969319.h"
#include "System_System_Net_Sockets_SocketFlags2353657790.h"
#include "Lidgren_Network_Lidgren_Network_NetPeer_DelayedPac1298207473MethodDeclarations.h"
#include "Lidgren_Network_Lidgren_Network_NetPeer_DelayedPac1298207473.h"
#include "mscorlib_System_Random1044426839MethodDeclarations.h"
#include "mscorlib_System_Random1044426839.h"
#include "mscorlib_System_Collections_Generic_List_1_Enumerat202058279.h"
#include "mscorlib_System_Collections_Generic_List_1_Enumerat202058279MethodDeclarations.h"
#include "mscorlib_System_Collections_Generic_List_1_gen2766455145MethodDeclarations.h"
#include "Lidgren_Network_Lidgren_Network_NetQueue_1_gen4233233666MethodDeclarations.h"
#include "mscorlib_System_Collections_Generic_List_1_gen2766455145.h"
#include "Lidgren_Network_Lidgren_Network_NetQueue_1_gen4233233666.h"
#include "Lidgren_Network_Lidgren_Network_NetRandom509742058.h"
#include "mscorlib_System_ArgumentOutOfRangeException279959794MethodDeclarations.h"
#include "mscorlib_System_ArgumentOutOfRangeException279959794.h"
#include "Lidgren_Network_Lidgren_Network_NetUnreliableSizeB2550812882.h"
#include "Lidgren_Network_Lidgren_Network_NetPeerStatus37952291MethodDeclarations.h"
#include "mscorlib_System_NotImplementedException2785117854MethodDeclarations.h"
#include "mscorlib_System_NotImplementedException2785117854.h"
#include "Lidgren_Network_Lidgren_Network_NetRandomSeed726093591.h"
#include "mscorlib_System_Guid2533601593MethodDeclarations.h"
#include "mscorlib_System_Guid2533601593.h"
#include "Lidgren_Network_Lidgren_Network_NetStoredReliableM1576378473MethodDeclarations.h"
#include "Lidgren_Network_Lidgren_Network_NetSendResult408708396MethodDeclarations.h"
#include "Lidgren_Network_Lidgren_Network_NetTime3056501352.h"
#include "mscorlib_System_TimeSpan3430258949MethodDeclarations.h"
#include "mscorlib_System_TimeSpan3430258949.h"
#include "mscorlib_System_Double4078015681MethodDeclarations.h"
#include "System_System_Diagnostics_Stopwatch1380178105MethodDeclarations.h"
#include "System_System_Diagnostics_Stopwatch1380178105.h"
#include "Lidgren_Network_Lidgren_Network_NetUnreliableSizeB2550812882MethodDeclarations.h"
#include "mscorlib_System_Threading_ManualResetEvent926074657MethodDeclarations.h"
#include "mscorlib_System_Threading_ManualResetEvent926074657.h"
#include "Lidgren_Network_Lidgren_Network_UPnPStatus3639336697.h"
#include "System_Xml_System_Xml_XmlDocument3649534162MethodDeclarations.h"
#include "System_System_Net_WebRequest1365124353MethodDeclarations.h"
#include "System_Xml_System_Xml_XmlNamespaceManager486731501MethodDeclarations.h"
#include "System_Xml_System_Xml_XmlNode616554813MethodDeclarations.h"
#include "System_Xml_System_Xml_XmlDocument3649534162.h"
#include "System_System_Net_WebResponse1895226051.h"
#include "System_Xml_System_Xml_XmlNamespaceManager486731501.h"
#include "System_Xml_System_Xml_XmlNode616554813.h"
#include "System_System_Net_WebRequest1365124353.h"
#include "System_System_Net_WebResponse1895226051MethodDeclarations.h"
#include "mscorlib_System_IO_Stream3255436806.h"
#include "System_Xml_System_Xml_XmlNameTable1345805268.h"
#include "Lidgren_Network_Lidgren_Network_NetUtility3562260209.h"
#include "mscorlib_System_ArgumentException3259014390MethodDeclarations.h"
#include "System_System_Net_Dns1335526197MethodDeclarations.h"
#include "System_ArrayTypes.h"
#include "mscorlib_System_ArgumentException3259014390.h"
#include "mscorlib_System_Environment3662374671MethodDeclarations.h"
#include "System_System_Net_NetworkInformation_NetworkInterfac63927633.h"
#include "System_System_Net_NetworkInformation_IPGlobalProper430107897MethodDeclarations.h"
#include "System_System_Net_NetworkInformation_NetworkInterfac63927633MethodDeclarations.h"
#include "System_System_Net_NetworkInformation_IPGlobalProper430107897.h"
#include "System_System_Net_NetworkInformation_IPInterfacePr3986609851.h"
#include "System_System_Net_NetworkInformation_UnicastIPAddr2919786644.h"
#include "System_System_Net_NetworkInformation_NetworkInterf4226883065.h"
#include "System_System_Net_NetworkInformation_NetworkInterf2376191102.h"
#include "System_System_Net_NetworkInformation_OperationalSt2833345236.h"
#include "System_System_Net_NetworkInformation_IPInterfacePr3986609851MethodDeclarations.h"
#include "System_System_Net_NetworkInformation_UnicastIPAddre347163204.h"
#include "System_System_Net_NetworkInformation_UnicastIPAddre347163204MethodDeclarations.h"
#include "System_System_Net_NetworkInformation_IPAddressInfor732454853MethodDeclarations.h"
#include "System_System_Net_NetworkInformation_IPAddressInfor732454853.h"
#include "System_System_Net_NetworkInformation_PhysicalAddre1613893277MethodDeclarations.h"
#include "System_System_Net_NetworkInformation_PhysicalAddre1613893277.h"
#include "System_System_Net_NetworkInformation_UnicastIPAddr2919786644MethodDeclarations.h"
#include "mscorlib_System_Security_Cryptography_HashAlgorith2624936259MethodDeclarations.h"
#include "mscorlib_System_Security_Cryptography_SHA256582564463.h"
#include "mscorlib_System_Security_Cryptography_SHA256582564463MethodDeclarations.h"
#include "Lidgren_Network_Lidgren_Network_SingleUIntUnion3787661257MethodDeclarations.h"
#include "Lidgren_Network_Lidgren_Network_UPnPStatus3639336697MethodDeclarations.h"
// System.Void System.Array::Resize<System.Byte>(!!0[]&,System.Int32)
extern "C" void Array_Resize_TisByte_t3683104436_m3136363656_gshared (Il2CppObject * __this /* static, unused */, ByteU5BU5D_t3397334013** p0, int32_t p1, const MethodInfo* method);
#define Array_Resize_TisByte_t3683104436_m3136363656(__this /* static, unused */, p0, p1, method) (( void (*) (Il2CppObject * /* static, unused */, ByteU5BU5D_t3397334013**, int32_t, const MethodInfo*))Array_Resize_TisByte_t3683104436_m3136363656_gshared)(__this /* static, unused */, p0, p1, method)
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void Lidgren.Network.MWCRandom::.ctor()
extern Il2CppClass* NetRandom_t509742058_il2cpp_TypeInfo_var;
extern Il2CppClass* NetRandomSeed_t726093591_il2cpp_TypeInfo_var;
extern const uint32_t MWCRandom__ctor_m14555459_MetadataUsageId;
extern "C" void MWCRandom__ctor_m14555459 (MWCRandom_t315011312 * __this, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (MWCRandom__ctor_m14555459_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
{
IL2CPP_RUNTIME_CLASS_INIT(NetRandom_t509742058_il2cpp_TypeInfo_var);
NetRandom__ctor_m1930519285(__this, /*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(NetRandomSeed_t726093591_il2cpp_TypeInfo_var);
uint64_t L_0 = NetRandomSeed_GetUInt64_m1791162272(NULL /*static, unused*/, /*hidden argument*/NULL);
MWCRandom_Initialize_m3443045912(__this, L_0, /*hidden argument*/NULL);
return;
}
}
// System.Void Lidgren.Network.MWCRandom::Initialize(System.UInt32)
extern "C" void MWCRandom_Initialize_m3019558407 (MWCRandom_t315011312 * __this, uint32_t ___seed0, const MethodInfo* method)
{
{
uint32_t L_0 = ___seed0;
__this->set_m_w_5(L_0);
uint32_t L_1 = ___seed0;
__this->set_m_z_6(((int32_t)((int32_t)L_1*(int32_t)((int32_t)16777619))));
return;
}
}
// System.Void Lidgren.Network.MWCRandom::Initialize(System.UInt64)
extern "C" void MWCRandom_Initialize_m3443045912 (MWCRandom_t315011312 * __this, uint64_t ___seed0, const MethodInfo* method)
{
{
uint64_t L_0 = ___seed0;
__this->set_m_w_5((((int32_t)((uint32_t)L_0))));
uint64_t L_1 = ___seed0;
__this->set_m_z_6((((int32_t)((uint32_t)((int64_t)((uint64_t)L_1>>((int32_t)32)))))));
return;
}
}
// System.UInt32 Lidgren.Network.MWCRandom::NextUInt32()
extern "C" uint32_t MWCRandom_NextUInt32_m737568528 (MWCRandom_t315011312 * __this, const MethodInfo* method)
{
uint32_t V_0 = 0;
{
uint32_t L_0 = __this->get_m_z_6();
uint32_t L_1 = __this->get_m_z_6();
__this->set_m_z_6(((int32_t)((int32_t)((int32_t)((int32_t)((int32_t)36969)*(int32_t)((int32_t)((int32_t)L_0&(int32_t)((int32_t)65535)))))+(int32_t)((int32_t)((uint32_t)L_1>>((int32_t)16))))));
uint32_t L_2 = __this->get_m_w_5();
uint32_t L_3 = __this->get_m_w_5();
__this->set_m_w_5(((int32_t)((int32_t)((int32_t)((int32_t)((int32_t)18000)*(int32_t)((int32_t)((int32_t)L_2&(int32_t)((int32_t)65535)))))+(int32_t)((int32_t)((uint32_t)L_3>>((int32_t)16))))));
uint32_t L_4 = __this->get_m_z_6();
uint32_t L_5 = __this->get_m_w_5();
V_0 = ((int32_t)((int32_t)((int32_t)((int32_t)L_4<<(int32_t)((int32_t)16)))+(int32_t)L_5));
goto IL_0058;
}
IL_0058:
{
uint32_t L_6 = V_0;
return L_6;
}
}
// System.Void Lidgren.Network.MWCRandom::.cctor()
extern Il2CppClass* MWCRandom_t315011312_il2cpp_TypeInfo_var;
extern const uint32_t MWCRandom__cctor_m540302958_MetadataUsageId;
extern "C" void MWCRandom__cctor_m540302958 (Il2CppObject * __this /* static, unused */, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (MWCRandom__cctor_m540302958_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
{
MWCRandom_t315011312 * L_0 = (MWCRandom_t315011312 *)il2cpp_codegen_object_new(MWCRandom_t315011312_il2cpp_TypeInfo_var);
MWCRandom__ctor_m14555459(L_0, /*hidden argument*/NULL);
((MWCRandom_t315011312_StaticFields*)MWCRandom_t315011312_il2cpp_TypeInfo_var->static_fields)->set_Instance_4(L_0);
return;
}
}
// System.Void Lidgren.Network.NetBitVector::.ctor(System.Int32)
extern Il2CppClass* Int32U5BU5D_t3030399641_il2cpp_TypeInfo_var;
extern const uint32_t NetBitVector__ctor_m1517128273_MetadataUsageId;
extern "C" void NetBitVector__ctor_m1517128273 (NetBitVector_t1774780753 * __this, int32_t ___bitsCapacity0, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetBitVector__ctor_m1517128273_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
{
Object__ctor_m2551263788(__this, /*hidden argument*/NULL);
int32_t L_0 = ___bitsCapacity0;
__this->set_m_capacity_0(L_0);
int32_t L_1 = ___bitsCapacity0;
__this->set_m_data_1(((Int32U5BU5D_t3030399641*)SZArrayNew(Int32U5BU5D_t3030399641_il2cpp_TypeInfo_var, (uint32_t)((int32_t)((int32_t)((int32_t)((int32_t)L_1+(int32_t)((int32_t)31)))/(int32_t)((int32_t)32))))));
return;
}
}
// System.Boolean Lidgren.Network.NetBitVector::IsEmpty()
extern "C" bool NetBitVector_IsEmpty_m1960092019 (NetBitVector_t1774780753 * __this, const MethodInfo* method)
{
bool V_0 = false;
{
int32_t L_0 = __this->get_m_numBitsSet_2();
V_0 = (bool)((((int32_t)L_0) == ((int32_t)0))? 1 : 0);
goto IL_000d;
}
IL_000d:
{
bool L_1 = V_0;
return L_1;
}
}
// System.Int32 Lidgren.Network.NetBitVector::Count()
extern "C" int32_t NetBitVector_Count_m179947577 (NetBitVector_t1774780753 * __this, const MethodInfo* method)
{
int32_t V_0 = 0;
{
int32_t L_0 = __this->get_m_numBitsSet_2();
V_0 = L_0;
goto IL_000a;
}
IL_000a:
{
int32_t L_1 = V_0;
return L_1;
}
}
// System.Boolean Lidgren.Network.NetBitVector::Get(System.Int32)
extern "C" bool NetBitVector_Get_m2410185427 (NetBitVector_t1774780753 * __this, int32_t ___bitIndex0, const MethodInfo* method)
{
bool V_0 = false;
int32_t G_B3_0 = 0;
{
int32_t L_0 = ___bitIndex0;
if ((((int32_t)L_0) < ((int32_t)0)))
{
goto IL_0010;
}
}
{
int32_t L_1 = ___bitIndex0;
int32_t L_2 = __this->get_m_capacity_0();
G_B3_0 = ((((int32_t)L_1) < ((int32_t)L_2))? 1 : 0);
goto IL_0011;
}
IL_0010:
{
G_B3_0 = 0;
}
IL_0011:
{
NetException_Assert_m1426298558(NULL /*static, unused*/, (bool)G_B3_0, /*hidden argument*/NULL);
Int32U5BU5D_t3030399641* L_3 = __this->get_m_data_1();
int32_t L_4 = ___bitIndex0;
NullCheck(L_3);
IL2CPP_ARRAY_BOUNDS_CHECK(L_3, ((int32_t)((int32_t)L_4/(int32_t)((int32_t)32))));
int32_t L_5 = ((int32_t)((int32_t)L_4/(int32_t)((int32_t)32)));
int32_t L_6 = (L_3)->GetAt(static_cast<il2cpp_array_size_t>(L_5));
int32_t L_7 = ___bitIndex0;
V_0 = (bool)((((int32_t)((((int32_t)((int32_t)((int32_t)L_6&(int32_t)((int32_t)((int32_t)1<<(int32_t)((int32_t)((int32_t)((int32_t)((int32_t)L_7%(int32_t)((int32_t)32)))&(int32_t)((int32_t)31)))))))) == ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0);
goto IL_0036;
}
IL_0036:
{
bool L_8 = V_0;
return L_8;
}
}
// System.Void Lidgren.Network.NetBitVector::Set(System.Int32,System.Boolean)
extern "C" void NetBitVector_Set_m2669921130 (NetBitVector_t1774780753 * __this, int32_t ___bitIndex0, bool ___value1, const MethodInfo* method)
{
int32_t V_0 = 0;
bool V_1 = false;
int32_t G_B3_0 = 0;
{
int32_t L_0 = ___bitIndex0;
if ((((int32_t)L_0) < ((int32_t)0)))
{
goto IL_0010;
}
}
{
int32_t L_1 = ___bitIndex0;
int32_t L_2 = __this->get_m_capacity_0();
G_B3_0 = ((((int32_t)L_1) < ((int32_t)L_2))? 1 : 0);
goto IL_0011;
}
IL_0010:
{
G_B3_0 = 0;
}
IL_0011:
{
NetException_Assert_m1426298558(NULL /*static, unused*/, (bool)G_B3_0, /*hidden argument*/NULL);
int32_t L_3 = ___bitIndex0;
V_0 = ((int32_t)((int32_t)L_3/(int32_t)((int32_t)32)));
bool L_4 = ___value1;
V_1 = (bool)((((int32_t)L_4) == ((int32_t)0))? 1 : 0);
bool L_5 = V_1;
if (L_5)
{
goto IL_0074;
}
}
{
Int32U5BU5D_t3030399641* L_6 = __this->get_m_data_1();
int32_t L_7 = V_0;
NullCheck(L_6);
IL2CPP_ARRAY_BOUNDS_CHECK(L_6, L_7);
int32_t L_8 = L_7;
int32_t L_9 = (L_6)->GetAt(static_cast<il2cpp_array_size_t>(L_8));
int32_t L_10 = ___bitIndex0;
V_1 = (bool)((((int32_t)((((int32_t)((int32_t)((int32_t)L_9&(int32_t)((int32_t)((int32_t)1<<(int32_t)((int32_t)((int32_t)((int32_t)((int32_t)L_10%(int32_t)((int32_t)32)))&(int32_t)((int32_t)31)))))))) == ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_11 = V_1;
if (L_11)
{
goto IL_0050;
}
}
{
int32_t L_12 = __this->get_m_numBitsSet_2();
__this->set_m_numBitsSet_2(((int32_t)((int32_t)L_12+(int32_t)1)));
}
IL_0050:
{
Int32U5BU5D_t3030399641* L_13 = __this->get_m_data_1();
int32_t L_14 = V_0;
NullCheck(L_13);
IL2CPP_ARRAY_BOUNDS_CHECK(L_13, L_14);
int32_t* L_15 = ((L_13)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_14)));
int32_t L_16 = ___bitIndex0;
(*(int32_t*)L_15) = ((int32_t)((int32_t)(*(int32_t*)L_15)|(int32_t)((int32_t)((int32_t)1<<(int32_t)((int32_t)((int32_t)((int32_t)((int32_t)L_16%(int32_t)((int32_t)32)))&(int32_t)((int32_t)31)))))));
goto IL_00bf;
}
IL_0074:
{
Int32U5BU5D_t3030399641* L_17 = __this->get_m_data_1();
int32_t L_18 = V_0;
NullCheck(L_17);
IL2CPP_ARRAY_BOUNDS_CHECK(L_17, L_18);
int32_t L_19 = L_18;
int32_t L_20 = (L_17)->GetAt(static_cast<il2cpp_array_size_t>(L_19));
int32_t L_21 = ___bitIndex0;
V_1 = (bool)((((int32_t)((int32_t)((int32_t)L_20&(int32_t)((int32_t)((int32_t)1<<(int32_t)((int32_t)((int32_t)((int32_t)((int32_t)L_21%(int32_t)((int32_t)32)))&(int32_t)((int32_t)31)))))))) == ((int32_t)0))? 1 : 0);
bool L_22 = V_1;
if (L_22)
{
goto IL_009c;
}
}
{
int32_t L_23 = __this->get_m_numBitsSet_2();
__this->set_m_numBitsSet_2(((int32_t)((int32_t)L_23-(int32_t)1)));
}
IL_009c:
{
Int32U5BU5D_t3030399641* L_24 = __this->get_m_data_1();
int32_t L_25 = V_0;
NullCheck(L_24);
IL2CPP_ARRAY_BOUNDS_CHECK(L_24, L_25);
int32_t* L_26 = ((L_24)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_25)));
int32_t L_27 = ___bitIndex0;
(*(int32_t*)L_26) = ((int32_t)((int32_t)(*(int32_t*)L_26)&(int32_t)((~((int32_t)((int32_t)1<<(int32_t)((int32_t)((int32_t)((int32_t)((int32_t)L_27%(int32_t)((int32_t)32)))&(int32_t)((int32_t)31)))))))));
}
IL_00bf:
{
return;
}
}
// System.Boolean Lidgren.Network.NetBitVector::get_Bit(System.Int32)
extern "C" bool NetBitVector_get_Bit_m3575907859 (NetBitVector_t1774780753 * __this, int32_t ___index0, const MethodInfo* method)
{
bool V_0 = false;
{
int32_t L_0 = ___index0;
bool L_1 = NetBitVector_Get_m2410185427(__this, L_0, /*hidden argument*/NULL);
V_0 = L_1;
goto IL_000b;
}
IL_000b:
{
bool L_2 = V_0;
return L_2;
}
}
// System.Void Lidgren.Network.NetBitVector::set_Bit(System.Int32,System.Boolean)
extern "C" void NetBitVector_set_Bit_m3149930918 (NetBitVector_t1774780753 * __this, int32_t ___index0, bool ___value1, const MethodInfo* method)
{
{
int32_t L_0 = ___index0;
bool L_1 = ___value1;
NetBitVector_Set_m2669921130(__this, L_0, L_1, /*hidden argument*/NULL);
return;
}
}
// System.Void Lidgren.Network.NetBitVector::Clear()
extern "C" void NetBitVector_Clear_m3351354433 (NetBitVector_t1774780753 * __this, const MethodInfo* method)
{
{
Int32U5BU5D_t3030399641* L_0 = __this->get_m_data_1();
Int32U5BU5D_t3030399641* L_1 = __this->get_m_data_1();
NullCheck(L_1);
Array_Clear_m782967417(NULL /*static, unused*/, (Il2CppArray *)(Il2CppArray *)L_0, 0, (((int32_t)((int32_t)(((Il2CppArray *)L_1)->max_length)))), /*hidden argument*/NULL);
__this->set_m_numBitsSet_2(0);
bool L_2 = NetBitVector_IsEmpty_m1960092019(__this, /*hidden argument*/NULL);
NetException_Assert_m1426298558(NULL /*static, unused*/, L_2, /*hidden argument*/NULL);
return;
}
}
// System.String Lidgren.Network.NetBitVector::ToString()
extern Il2CppClass* StringBuilder_t1221177846_il2cpp_TypeInfo_var;
extern const uint32_t NetBitVector_ToString_m1952006343_MetadataUsageId;
extern "C" String_t* NetBitVector_ToString_m1952006343 (NetBitVector_t1774780753 * __this, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetBitVector_ToString_m1952006343_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
StringBuilder_t1221177846 * V_0 = NULL;
int32_t V_1 = 0;
String_t* V_2 = NULL;
bool V_3 = false;
StringBuilder_t1221177846 * G_B3_0 = NULL;
StringBuilder_t1221177846 * G_B2_0 = NULL;
int32_t G_B4_0 = 0;
StringBuilder_t1221177846 * G_B4_1 = NULL;
{
int32_t L_0 = __this->get_m_capacity_0();
StringBuilder_t1221177846 * L_1 = (StringBuilder_t1221177846 *)il2cpp_codegen_object_new(StringBuilder_t1221177846_il2cpp_TypeInfo_var);
StringBuilder__ctor_m536337337(L_1, ((int32_t)((int32_t)L_0+(int32_t)2)), /*hidden argument*/NULL);
V_0 = L_1;
StringBuilder_t1221177846 * L_2 = V_0;
NullCheck(L_2);
StringBuilder_Append_m3618697540(L_2, ((int32_t)91), /*hidden argument*/NULL);
V_1 = 0;
goto IL_0040;
}
IL_001c:
{
StringBuilder_t1221177846 * L_3 = V_0;
int32_t L_4 = __this->get_m_capacity_0();
int32_t L_5 = V_1;
bool L_6 = NetBitVector_Get_m2410185427(__this, ((int32_t)((int32_t)((int32_t)((int32_t)L_4-(int32_t)L_5))-(int32_t)1)), /*hidden argument*/NULL);
G_B2_0 = L_3;
if (L_6)
{
G_B3_0 = L_3;
goto IL_0033;
}
}
{
G_B4_0 = ((int32_t)48);
G_B4_1 = G_B2_0;
goto IL_0035;
}
IL_0033:
{
G_B4_0 = ((int32_t)49);
G_B4_1 = G_B3_0;
}
IL_0035:
{
NullCheck(G_B4_1);
StringBuilder_Append_m3618697540(G_B4_1, G_B4_0, /*hidden argument*/NULL);
int32_t L_7 = V_1;
V_1 = ((int32_t)((int32_t)L_7+(int32_t)1));
}
IL_0040:
{
int32_t L_8 = V_1;
int32_t L_9 = __this->get_m_capacity_0();
V_3 = (bool)((((int32_t)L_8) < ((int32_t)L_9))? 1 : 0);
bool L_10 = V_3;
if (L_10)
{
goto IL_001c;
}
}
{
StringBuilder_t1221177846 * L_11 = V_0;
NullCheck(L_11);
StringBuilder_Append_m3618697540(L_11, ((int32_t)93), /*hidden argument*/NULL);
StringBuilder_t1221177846 * L_12 = V_0;
NullCheck(L_12);
String_t* L_13 = VirtFuncInvoker0< String_t* >::Invoke(3 /* System.String System.Object::ToString() */, L_12);
V_2 = L_13;
goto IL_005f;
}
IL_005f:
{
String_t* L_14 = V_2;
return L_14;
}
}
// System.Byte Lidgren.Network.NetBitWriter::ReadByte(System.Byte[],System.Int32,System.Int32)
extern Il2CppCodeGenString* _stringLiteral697365265;
extern const uint32_t NetBitWriter_ReadByte_m1673854543_MetadataUsageId;
extern "C" uint8_t NetBitWriter_ReadByte_m1673854543 (Il2CppObject * __this /* static, unused */, ByteU5BU5D_t3397334013* ___fromBuffer0, int32_t ___numberOfBits1, int32_t ___readBitOffset2, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetBitWriter_ReadByte_m1673854543_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
int32_t V_0 = 0;
int32_t V_1 = 0;
uint8_t V_2 = 0x0;
int32_t V_3 = 0;
uint8_t V_4 = 0x0;
uint8_t V_5 = 0x0;
bool V_6 = false;
int32_t G_B3_0 = 0;
int32_t G_B6_0 = 0;
{
int32_t L_0 = ___numberOfBits1;
if ((((int32_t)L_0) <= ((int32_t)0)))
{
goto IL_000c;
}
}
{
int32_t L_1 = ___numberOfBits1;
G_B3_0 = ((((int32_t)L_1) < ((int32_t)((int32_t)9)))? 1 : 0);
goto IL_000d;
}
IL_000c:
{
G_B3_0 = 0;
}
IL_000d:
{
NetException_Assert_m1067120882(NULL /*static, unused*/, (bool)G_B3_0, _stringLiteral697365265, /*hidden argument*/NULL);
int32_t L_2 = ___readBitOffset2;
V_0 = ((int32_t)((int32_t)L_2>>(int32_t)3));
int32_t L_3 = ___readBitOffset2;
int32_t L_4 = V_0;
V_1 = ((int32_t)((int32_t)L_3-(int32_t)((int32_t)((int32_t)L_4*(int32_t)8))));
int32_t L_5 = V_1;
if (L_5)
{
goto IL_002f;
}
}
{
int32_t L_6 = ___numberOfBits1;
G_B6_0 = ((((int32_t)((((int32_t)L_6) == ((int32_t)8))? 1 : 0)) == ((int32_t)0))? 1 : 0);
goto IL_0030;
}
IL_002f:
{
G_B6_0 = 1;
}
IL_0030:
{
V_6 = (bool)G_B6_0;
bool L_7 = V_6;
if (L_7)
{
goto IL_003e;
}
}
{
ByteU5BU5D_t3397334013* L_8 = ___fromBuffer0;
int32_t L_9 = V_0;
NullCheck(L_8);
IL2CPP_ARRAY_BOUNDS_CHECK(L_8, L_9);
int32_t L_10 = L_9;
uint8_t L_11 = (L_8)->GetAt(static_cast<il2cpp_array_size_t>(L_10));
V_5 = L_11;
goto IL_009a;
}
IL_003e:
{
ByteU5BU5D_t3397334013* L_12 = ___fromBuffer0;
int32_t L_13 = V_0;
NullCheck(L_12);
IL2CPP_ARRAY_BOUNDS_CHECK(L_12, L_13);
int32_t L_14 = L_13;
uint8_t L_15 = (L_12)->GetAt(static_cast<il2cpp_array_size_t>(L_14));
int32_t L_16 = V_1;
V_2 = (((int32_t)((uint8_t)((int32_t)((int32_t)L_15>>(int32_t)((int32_t)((int32_t)L_16&(int32_t)((int32_t)31))))))));
int32_t L_17 = ___numberOfBits1;
int32_t L_18 = V_1;
V_3 = ((int32_t)((int32_t)L_17-(int32_t)((int32_t)((int32_t)8-(int32_t)L_18))));
int32_t L_19 = V_3;
V_6 = (bool)((((int32_t)((((int32_t)L_19) < ((int32_t)1))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_20 = V_6;
if (L_20)
{
goto IL_006f;
}
}
{
uint8_t L_21 = V_2;
int32_t L_22 = ___numberOfBits1;
V_5 = (((int32_t)((uint8_t)((int32_t)((int32_t)L_21&(int32_t)((int32_t)((int32_t)((int32_t)255)>>(int32_t)((int32_t)((int32_t)((int32_t)((int32_t)8-(int32_t)L_22))&(int32_t)((int32_t)31))))))))));
goto IL_009a;
}
IL_006f:
{
ByteU5BU5D_t3397334013* L_23 = ___fromBuffer0;
int32_t L_24 = V_0;
NullCheck(L_23);
IL2CPP_ARRAY_BOUNDS_CHECK(L_23, ((int32_t)((int32_t)L_24+(int32_t)1)));
int32_t L_25 = ((int32_t)((int32_t)L_24+(int32_t)1));
uint8_t L_26 = (L_23)->GetAt(static_cast<il2cpp_array_size_t>(L_25));
V_4 = L_26;
uint8_t L_27 = V_4;
int32_t L_28 = V_3;
V_4 = (((int32_t)((uint8_t)((int32_t)((int32_t)L_27&(int32_t)(((int32_t)((uint8_t)((int32_t)((int32_t)((int32_t)255)>>(int32_t)((int32_t)((int32_t)((int32_t)((int32_t)8-(int32_t)L_28))&(int32_t)((int32_t)31)))))))))))));
uint8_t L_29 = V_2;
uint8_t L_30 = V_4;
int32_t L_31 = ___numberOfBits1;
int32_t L_32 = V_3;
V_5 = (((int32_t)((uint8_t)((int32_t)((int32_t)L_29|(int32_t)(((int32_t)((uint8_t)((int32_t)((int32_t)L_30<<(int32_t)((int32_t)((int32_t)((int32_t)((int32_t)L_31-(int32_t)L_32))&(int32_t)((int32_t)31)))))))))))));
goto IL_009a;
}
IL_009a:
{
uint8_t L_33 = V_5;
return L_33;
}
}
// System.Void Lidgren.Network.NetBitWriter::ReadBytes(System.Byte[],System.Int32,System.Int32,System.Byte[],System.Int32)
extern "C" void NetBitWriter_ReadBytes_m2825983754 (Il2CppObject * __this /* static, unused */, ByteU5BU5D_t3397334013* ___fromBuffer0, int32_t ___numberOfBytes1, int32_t ___readBitOffset2, ByteU5BU5D_t3397334013* ___destination3, int32_t ___destinationByteOffset4, const MethodInfo* method)
{
int32_t V_0 = 0;
int32_t V_1 = 0;
int32_t V_2 = 0;
int32_t V_3 = 0;
int32_t V_4 = 0;
int32_t V_5 = 0;
int32_t V_6 = 0;
bool V_7 = false;
{
int32_t L_0 = ___readBitOffset2;
V_0 = ((int32_t)((int32_t)L_0>>(int32_t)3));
int32_t L_1 = ___readBitOffset2;
int32_t L_2 = V_0;
V_1 = ((int32_t)((int32_t)L_1-(int32_t)((int32_t)((int32_t)L_2*(int32_t)8))));
int32_t L_3 = V_1;
V_7 = (bool)((((int32_t)((((int32_t)L_3) == ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_4 = V_7;
if (L_4)
{
goto IL_0027;
}
}
{
ByteU5BU5D_t3397334013* L_5 = ___fromBuffer0;
int32_t L_6 = V_0;
ByteU5BU5D_t3397334013* L_7 = ___destination3;
int32_t L_8 = ___destinationByteOffset4;
int32_t L_9 = ___numberOfBytes1;
Buffer_BlockCopy_m1586717258(NULL /*static, unused*/, (Il2CppArray *)(Il2CppArray *)L_5, L_6, (Il2CppArray *)(Il2CppArray *)L_7, L_8, L_9, /*hidden argument*/NULL);
goto IL_0079;
}
IL_0027:
{
int32_t L_10 = V_1;
V_2 = ((int32_t)((int32_t)8-(int32_t)L_10));
int32_t L_11 = V_2;
V_3 = ((int32_t)((int32_t)((int32_t)255)>>(int32_t)((int32_t)((int32_t)L_11&(int32_t)((int32_t)31)))));
V_4 = 0;
goto IL_006c;
}
IL_003b:
{
ByteU5BU5D_t3397334013* L_12 = ___fromBuffer0;
int32_t L_13 = V_0;
NullCheck(L_12);
IL2CPP_ARRAY_BOUNDS_CHECK(L_12, L_13);
int32_t L_14 = L_13;
uint8_t L_15 = (L_12)->GetAt(static_cast<il2cpp_array_size_t>(L_14));
int32_t L_16 = V_1;
V_5 = ((int32_t)((int32_t)L_15>>(int32_t)((int32_t)((int32_t)L_16&(int32_t)((int32_t)31)))));
int32_t L_17 = V_0;
V_0 = ((int32_t)((int32_t)L_17+(int32_t)1));
ByteU5BU5D_t3397334013* L_18 = ___fromBuffer0;
int32_t L_19 = V_0;
NullCheck(L_18);
IL2CPP_ARRAY_BOUNDS_CHECK(L_18, L_19);
int32_t L_20 = L_19;
uint8_t L_21 = (L_18)->GetAt(static_cast<il2cpp_array_size_t>(L_20));
int32_t L_22 = V_3;
V_6 = ((int32_t)((int32_t)L_21&(int32_t)L_22));
ByteU5BU5D_t3397334013* L_23 = ___destination3;
int32_t L_24 = ___destinationByteOffset4;
int32_t L_25 = L_24;
___destinationByteOffset4 = ((int32_t)((int32_t)L_25+(int32_t)1));
int32_t L_26 = V_5;
int32_t L_27 = V_6;
int32_t L_28 = V_2;
NullCheck(L_23);
IL2CPP_ARRAY_BOUNDS_CHECK(L_23, L_25);
(L_23)->SetAt(static_cast<il2cpp_array_size_t>(L_25), (uint8_t)(((int32_t)((uint8_t)((int32_t)((int32_t)L_26|(int32_t)((int32_t)((int32_t)L_27<<(int32_t)((int32_t)((int32_t)L_28&(int32_t)((int32_t)31)))))))))));
int32_t L_29 = V_4;
V_4 = ((int32_t)((int32_t)L_29+(int32_t)1));
}
IL_006c:
{
int32_t L_30 = V_4;
int32_t L_31 = ___numberOfBytes1;
V_7 = (bool)((((int32_t)L_30) < ((int32_t)L_31))? 1 : 0);
bool L_32 = V_7;
if (L_32)
{
goto IL_003b;
}
}
{
goto IL_0079;
}
IL_0079:
{
return;
}
}
// System.Void Lidgren.Network.NetBitWriter::WriteByte(System.Byte,System.Int32,System.Byte[],System.Int32)
extern Il2CppCodeGenString* _stringLiteral2455830070;
extern const uint32_t NetBitWriter_WriteByte_m1348088823_MetadataUsageId;
extern "C" void NetBitWriter_WriteByte_m1348088823 (Il2CppObject * __this /* static, unused */, uint8_t ___source0, int32_t ___numberOfBits1, ByteU5BU5D_t3397334013* ___destination2, int32_t ___destBitOffset3, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetBitWriter_WriteByte_m1348088823_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
int32_t V_0 = 0;
int32_t V_1 = 0;
int32_t V_2 = 0;
int32_t V_3 = 0;
int32_t V_4 = 0;
bool V_5 = false;
int32_t G_B5_0 = 0;
{
int32_t L_0 = ___numberOfBits1;
V_5 = (bool)((((int32_t)((((int32_t)L_0) == ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_1 = V_5;
if (L_1)
{
goto IL_0013;
}
}
{
goto IL_00bd;
}
IL_0013:
{
int32_t L_2 = ___numberOfBits1;
if ((((int32_t)L_2) < ((int32_t)0)))
{
goto IL_0020;
}
}
{
int32_t L_3 = ___numberOfBits1;
G_B5_0 = ((((int32_t)((((int32_t)L_3) > ((int32_t)8))? 1 : 0)) == ((int32_t)0))? 1 : 0);
goto IL_0021;
}
IL_0020:
{
G_B5_0 = 0;
}
IL_0021:
{
NetException_Assert_m1067120882(NULL /*static, unused*/, (bool)G_B5_0, _stringLiteral2455830070, /*hidden argument*/NULL);
uint8_t L_4 = ___source0;
int32_t L_5 = ___numberOfBits1;
___source0 = (((int32_t)((uint8_t)((int32_t)((int32_t)L_4&(int32_t)((int32_t)((int32_t)((int32_t)255)>>(int32_t)((int32_t)((int32_t)((int32_t)((int32_t)8-(int32_t)L_5))&(int32_t)((int32_t)31))))))))));
int32_t L_6 = ___destBitOffset3;
V_0 = ((int32_t)((int32_t)L_6>>(int32_t)3));
int32_t L_7 = ___destBitOffset3;
V_1 = ((int32_t)((int32_t)L_7&(int32_t)7));
int32_t L_8 = V_1;
V_2 = ((int32_t)((int32_t)8-(int32_t)L_8));
int32_t L_9 = V_2;
int32_t L_10 = ___numberOfBits1;
V_3 = ((int32_t)((int32_t)L_9-(int32_t)L_10));
int32_t L_11 = V_3;
V_5 = (bool)((((int32_t)L_11) < ((int32_t)0))? 1 : 0);
bool L_12 = V_5;
if (L_12)
{
goto IL_0085;
}
}
{
int32_t L_13 = V_2;
int32_t L_14 = V_3;
V_4 = ((int32_t)((int32_t)((int32_t)((int32_t)((int32_t)255)>>(int32_t)((int32_t)((int32_t)L_13&(int32_t)((int32_t)31)))))|(int32_t)((int32_t)((int32_t)((int32_t)255)<<(int32_t)((int32_t)((int32_t)((int32_t)((int32_t)8-(int32_t)L_14))&(int32_t)((int32_t)31)))))));
ByteU5BU5D_t3397334013* L_15 = ___destination2;
int32_t L_16 = V_0;
ByteU5BU5D_t3397334013* L_17 = ___destination2;
int32_t L_18 = V_0;
NullCheck(L_17);
IL2CPP_ARRAY_BOUNDS_CHECK(L_17, L_18);
int32_t L_19 = L_18;
uint8_t L_20 = (L_17)->GetAt(static_cast<il2cpp_array_size_t>(L_19));
int32_t L_21 = V_4;
uint8_t L_22 = ___source0;
int32_t L_23 = V_1;
NullCheck(L_15);
IL2CPP_ARRAY_BOUNDS_CHECK(L_15, L_16);
(L_15)->SetAt(static_cast<il2cpp_array_size_t>(L_16), (uint8_t)(((int32_t)((uint8_t)((int32_t)((int32_t)((int32_t)((int32_t)L_20&(int32_t)L_21))|(int32_t)((int32_t)((int32_t)L_22<<(int32_t)((int32_t)((int32_t)L_23&(int32_t)((int32_t)31)))))))))));
goto IL_00bd;
}
IL_0085:
{
ByteU5BU5D_t3397334013* L_24 = ___destination2;
int32_t L_25 = V_0;
ByteU5BU5D_t3397334013* L_26 = ___destination2;
int32_t L_27 = V_0;
NullCheck(L_26);
IL2CPP_ARRAY_BOUNDS_CHECK(L_26, L_27);
int32_t L_28 = L_27;
uint8_t L_29 = (L_26)->GetAt(static_cast<il2cpp_array_size_t>(L_28));
int32_t L_30 = V_2;
uint8_t L_31 = ___source0;
int32_t L_32 = V_1;
NullCheck(L_24);
IL2CPP_ARRAY_BOUNDS_CHECK(L_24, L_25);
(L_24)->SetAt(static_cast<il2cpp_array_size_t>(L_25), (uint8_t)(((int32_t)((uint8_t)((int32_t)((int32_t)((int32_t)((int32_t)L_29&(int32_t)((int32_t)((int32_t)((int32_t)255)>>(int32_t)((int32_t)((int32_t)L_30&(int32_t)((int32_t)31)))))))|(int32_t)((int32_t)((int32_t)L_31<<(int32_t)((int32_t)((int32_t)L_32&(int32_t)((int32_t)31)))))))))));
int32_t L_33 = V_0;
V_0 = ((int32_t)((int32_t)L_33+(int32_t)1));
ByteU5BU5D_t3397334013* L_34 = ___destination2;
int32_t L_35 = V_0;
ByteU5BU5D_t3397334013* L_36 = ___destination2;
int32_t L_37 = V_0;
NullCheck(L_36);
IL2CPP_ARRAY_BOUNDS_CHECK(L_36, L_37);
int32_t L_38 = L_37;
uint8_t L_39 = (L_36)->GetAt(static_cast<il2cpp_array_size_t>(L_38));
int32_t L_40 = ___numberOfBits1;
int32_t L_41 = V_2;
uint8_t L_42 = ___source0;
int32_t L_43 = V_2;
NullCheck(L_34);
IL2CPP_ARRAY_BOUNDS_CHECK(L_34, L_35);
(L_34)->SetAt(static_cast<il2cpp_array_size_t>(L_35), (uint8_t)(((int32_t)((uint8_t)((int32_t)((int32_t)((int32_t)((int32_t)L_39&(int32_t)((int32_t)((int32_t)((int32_t)255)<<(int32_t)((int32_t)((int32_t)((int32_t)((int32_t)L_40-(int32_t)L_41))&(int32_t)((int32_t)31)))))))|(int32_t)((int32_t)((int32_t)L_42>>(int32_t)((int32_t)((int32_t)L_43&(int32_t)((int32_t)31)))))))))));
}
IL_00bd:
{
return;
}
}
// System.Void Lidgren.Network.NetBitWriter::WriteBytes(System.Byte[],System.Int32,System.Int32,System.Byte[],System.Int32)
extern "C" void NetBitWriter_WriteBytes_m3262891483 (Il2CppObject * __this /* static, unused */, ByteU5BU5D_t3397334013* ___source0, int32_t ___sourceByteOffset1, int32_t ___numberOfBytes2, ByteU5BU5D_t3397334013* ___destination3, int32_t ___destBitOffset4, const MethodInfo* method)
{
int32_t V_0 = 0;
int32_t V_1 = 0;
int32_t V_2 = 0;
int32_t V_3 = 0;
uint8_t V_4 = 0x0;
bool V_5 = false;
{
int32_t L_0 = ___destBitOffset4;
V_0 = ((int32_t)((int32_t)L_0>>(int32_t)3));
int32_t L_1 = ___destBitOffset4;
V_1 = ((int32_t)((int32_t)L_1%(int32_t)8));
int32_t L_2 = V_1;
V_5 = (bool)((((int32_t)((((int32_t)L_2) == ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_3 = V_5;
if (L_3)
{
goto IL_0029;
}
}
{
ByteU5BU5D_t3397334013* L_4 = ___source0;
int32_t L_5 = ___sourceByteOffset1;
ByteU5BU5D_t3397334013* L_6 = ___destination3;
int32_t L_7 = V_0;
int32_t L_8 = ___numberOfBytes2;
Buffer_BlockCopy_m1586717258(NULL /*static, unused*/, (Il2CppArray *)(Il2CppArray *)L_4, L_5, (Il2CppArray *)(Il2CppArray *)L_6, L_7, L_8, /*hidden argument*/NULL);
goto IL_00ca;
}
IL_0029:
{
int32_t L_9 = V_1;
V_2 = ((int32_t)((int32_t)8-(int32_t)L_9));
V_3 = 0;
goto IL_00bb;
}
IL_0034:
{
ByteU5BU5D_t3397334013* L_10 = ___source0;
int32_t L_11 = ___sourceByteOffset1;
int32_t L_12 = V_3;
NullCheck(L_10);
IL2CPP_ARRAY_BOUNDS_CHECK(L_10, ((int32_t)((int32_t)L_11+(int32_t)L_12)));
int32_t L_13 = ((int32_t)((int32_t)L_11+(int32_t)L_12));
uint8_t L_14 = (L_10)->GetAt(static_cast<il2cpp_array_size_t>(L_13));
V_4 = L_14;
ByteU5BU5D_t3397334013* L_15 = ___destination3;
int32_t L_16 = V_0;
NullCheck(L_15);
IL2CPP_ARRAY_BOUNDS_CHECK(L_15, L_16);
uint8_t* L_17 = ((L_15)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_16)));
int32_t L_18 = V_2;
(*(uint8_t*)L_17) = (((int32_t)((uint8_t)((int32_t)((int32_t)(*(uint8_t*)L_17)&(int32_t)(((int32_t)((uint8_t)((int32_t)((int32_t)((int32_t)255)>>(int32_t)((int32_t)((int32_t)L_18&(int32_t)((int32_t)31)))))))))))));
ByteU5BU5D_t3397334013* L_19 = ___destination3;
int32_t L_20 = V_0;
NullCheck(L_19);
IL2CPP_ARRAY_BOUNDS_CHECK(L_19, L_20);
uint8_t* L_21 = ((L_19)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_20)));
uint8_t L_22 = V_4;
int32_t L_23 = V_1;
(*(uint8_t*)L_21) = (((int32_t)((uint8_t)((int32_t)((int32_t)(*(uint8_t*)L_21)|(int32_t)(((int32_t)((uint8_t)((int32_t)((int32_t)L_22<<(int32_t)((int32_t)((int32_t)L_23&(int32_t)((int32_t)31)))))))))))));
int32_t L_24 = V_0;
V_0 = ((int32_t)((int32_t)L_24+(int32_t)1));
ByteU5BU5D_t3397334013* L_25 = ___destination3;
int32_t L_26 = V_0;
NullCheck(L_25);
IL2CPP_ARRAY_BOUNDS_CHECK(L_25, L_26);
uint8_t* L_27 = ((L_25)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_26)));
int32_t L_28 = V_1;
(*(uint8_t*)L_27) = (((int32_t)((uint8_t)((int32_t)((int32_t)(*(uint8_t*)L_27)&(int32_t)(((int32_t)((uint8_t)((int32_t)((int32_t)((int32_t)255)<<(int32_t)((int32_t)((int32_t)L_28&(int32_t)((int32_t)31)))))))))))));
ByteU5BU5D_t3397334013* L_29 = ___destination3;
int32_t L_30 = V_0;
NullCheck(L_29);
IL2CPP_ARRAY_BOUNDS_CHECK(L_29, L_30);
uint8_t* L_31 = ((L_29)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_30)));
uint8_t L_32 = V_4;
int32_t L_33 = V_2;
(*(uint8_t*)L_31) = (((int32_t)((uint8_t)((int32_t)((int32_t)(*(uint8_t*)L_31)|(int32_t)(((int32_t)((uint8_t)((int32_t)((int32_t)L_32>>(int32_t)((int32_t)((int32_t)L_33&(int32_t)((int32_t)31)))))))))))));
int32_t L_34 = V_3;
V_3 = ((int32_t)((int32_t)L_34+(int32_t)1));
}
IL_00bb:
{
int32_t L_35 = V_3;
int32_t L_36 = ___numberOfBytes2;
V_5 = (bool)((((int32_t)L_35) < ((int32_t)L_36))? 1 : 0);
bool L_37 = V_5;
if (L_37)
{
goto IL_0034;
}
}
{
goto IL_00ca;
}
IL_00ca:
{
return;
}
}
// System.UInt16 Lidgren.Network.NetBitWriter::ReadUInt16(System.Byte[],System.Int32,System.Int32)
extern Il2CppCodeGenString* _stringLiteral2134848543;
extern const uint32_t NetBitWriter_ReadUInt16_m634713443_MetadataUsageId;
extern "C" uint16_t NetBitWriter_ReadUInt16_m634713443 (Il2CppObject * __this /* static, unused */, ByteU5BU5D_t3397334013* ___fromBuffer0, int32_t ___numberOfBits1, int32_t ___readBitOffset2, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetBitWriter_ReadUInt16_m634713443_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
uint16_t V_0 = 0;
uint16_t V_1 = 0;
bool V_2 = false;
int32_t G_B3_0 = 0;
{
int32_t L_0 = ___numberOfBits1;
if ((((int32_t)L_0) <= ((int32_t)0)))
{
goto IL_000f;
}
}
{
int32_t L_1 = ___numberOfBits1;
G_B3_0 = ((((int32_t)((((int32_t)L_1) > ((int32_t)((int32_t)16)))? 1 : 0)) == ((int32_t)0))? 1 : 0);
goto IL_0010;
}
IL_000f:
{
G_B3_0 = 0;
}
IL_0010:
{
Debug_Assert_m1466756561(NULL /*static, unused*/, (bool)G_B3_0, _stringLiteral2134848543, /*hidden argument*/NULL);
int32_t L_2 = ___numberOfBits1;
V_2 = (bool)((((int32_t)L_2) > ((int32_t)8))? 1 : 0);
bool L_3 = V_2;
if (L_3)
{
goto IL_0032;
}
}
{
ByteU5BU5D_t3397334013* L_4 = ___fromBuffer0;
int32_t L_5 = ___numberOfBits1;
int32_t L_6 = ___readBitOffset2;
uint8_t L_7 = NetBitWriter_ReadByte_m1673854543(NULL /*static, unused*/, L_4, L_5, L_6, /*hidden argument*/NULL);
V_0 = L_7;
uint16_t L_8 = V_0;
V_1 = L_8;
goto IL_0062;
}
IL_0032:
{
ByteU5BU5D_t3397334013* L_9 = ___fromBuffer0;
int32_t L_10 = ___readBitOffset2;
uint8_t L_11 = NetBitWriter_ReadByte_m1673854543(NULL /*static, unused*/, L_9, 8, L_10, /*hidden argument*/NULL);
V_0 = L_11;
int32_t L_12 = ___numberOfBits1;
___numberOfBits1 = ((int32_t)((int32_t)L_12-(int32_t)8));
int32_t L_13 = ___readBitOffset2;
___readBitOffset2 = ((int32_t)((int32_t)L_13+(int32_t)8));
int32_t L_14 = ___numberOfBits1;
V_2 = (bool)((((int32_t)L_14) > ((int32_t)8))? 1 : 0);
bool L_15 = V_2;
if (L_15)
{
goto IL_005e;
}
}
{
uint16_t L_16 = V_0;
ByteU5BU5D_t3397334013* L_17 = ___fromBuffer0;
int32_t L_18 = ___numberOfBits1;
int32_t L_19 = ___readBitOffset2;
uint8_t L_20 = NetBitWriter_ReadByte_m1673854543(NULL /*static, unused*/, L_17, L_18, L_19, /*hidden argument*/NULL);
V_0 = (((int32_t)((uint16_t)((int32_t)((int32_t)L_16|(int32_t)(((int32_t)((uint16_t)((int32_t)((int32_t)L_20<<(int32_t)8))))))))));
}
IL_005e:
{
uint16_t L_21 = V_0;
V_1 = L_21;
goto IL_0062;
}
IL_0062:
{
uint16_t L_22 = V_1;
return L_22;
}
}
// System.UInt32 Lidgren.Network.NetBitWriter::ReadUInt32(System.Byte[],System.Int32,System.Int32)
extern Il2CppCodeGenString* _stringLiteral4184075247;
extern const uint32_t NetBitWriter_ReadUInt32_m1364064019_MetadataUsageId;
extern "C" uint32_t NetBitWriter_ReadUInt32_m1364064019 (Il2CppObject * __this /* static, unused */, ByteU5BU5D_t3397334013* ___fromBuffer0, int32_t ___numberOfBits1, int32_t ___readBitOffset2, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetBitWriter_ReadUInt32_m1364064019_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
uint32_t V_0 = 0;
uint32_t V_1 = 0;
uint32_t V_2 = 0;
bool V_3 = false;
int32_t G_B3_0 = 0;
{
int32_t L_0 = ___numberOfBits1;
if ((((int32_t)L_0) <= ((int32_t)0)))
{
goto IL_000f;
}
}
{
int32_t L_1 = ___numberOfBits1;
G_B3_0 = ((((int32_t)((((int32_t)L_1) > ((int32_t)((int32_t)32)))? 1 : 0)) == ((int32_t)0))? 1 : 0);
goto IL_0010;
}
IL_000f:
{
G_B3_0 = 0;
}
IL_0010:
{
NetException_Assert_m1067120882(NULL /*static, unused*/, (bool)G_B3_0, _stringLiteral4184075247, /*hidden argument*/NULL);
int32_t L_2 = ___numberOfBits1;
V_3 = (bool)((((int32_t)L_2) > ((int32_t)8))? 1 : 0);
bool L_3 = V_3;
if (L_3)
{
goto IL_0035;
}
}
{
ByteU5BU5D_t3397334013* L_4 = ___fromBuffer0;
int32_t L_5 = ___numberOfBits1;
int32_t L_6 = ___readBitOffset2;
uint8_t L_7 = NetBitWriter_ReadByte_m1673854543(NULL /*static, unused*/, L_4, L_5, L_6, /*hidden argument*/NULL);
V_0 = L_7;
uint32_t L_8 = V_0;
V_2 = L_8;
goto IL_00c2;
}
IL_0035:
{
ByteU5BU5D_t3397334013* L_9 = ___fromBuffer0;
int32_t L_10 = ___readBitOffset2;
uint8_t L_11 = NetBitWriter_ReadByte_m1673854543(NULL /*static, unused*/, L_9, 8, L_10, /*hidden argument*/NULL);
V_0 = L_11;
int32_t L_12 = ___numberOfBits1;
___numberOfBits1 = ((int32_t)((int32_t)L_12-(int32_t)8));
int32_t L_13 = ___readBitOffset2;
___readBitOffset2 = ((int32_t)((int32_t)L_13+(int32_t)8));
int32_t L_14 = ___numberOfBits1;
V_3 = (bool)((((int32_t)L_14) > ((int32_t)8))? 1 : 0);
bool L_15 = V_3;
if (L_15)
{
goto IL_0062;
}
}
{
uint32_t L_16 = V_0;
ByteU5BU5D_t3397334013* L_17 = ___fromBuffer0;
int32_t L_18 = ___numberOfBits1;
int32_t L_19 = ___readBitOffset2;
uint8_t L_20 = NetBitWriter_ReadByte_m1673854543(NULL /*static, unused*/, L_17, L_18, L_19, /*hidden argument*/NULL);
V_0 = ((int32_t)((int32_t)L_16|(int32_t)((int32_t)((int32_t)L_20<<(int32_t)8))));
uint32_t L_21 = V_0;
V_2 = L_21;
goto IL_00c2;
}
IL_0062:
{
uint32_t L_22 = V_0;
ByteU5BU5D_t3397334013* L_23 = ___fromBuffer0;
int32_t L_24 = ___readBitOffset2;
uint8_t L_25 = NetBitWriter_ReadByte_m1673854543(NULL /*static, unused*/, L_23, 8, L_24, /*hidden argument*/NULL);
V_0 = ((int32_t)((int32_t)L_22|(int32_t)((int32_t)((int32_t)L_25<<(int32_t)8))));
int32_t L_26 = ___numberOfBits1;
___numberOfBits1 = ((int32_t)((int32_t)L_26-(int32_t)8));
int32_t L_27 = ___readBitOffset2;
___readBitOffset2 = ((int32_t)((int32_t)L_27+(int32_t)8));
int32_t L_28 = ___numberOfBits1;
V_3 = (bool)((((int32_t)L_28) > ((int32_t)8))? 1 : 0);
bool L_29 = V_3;
if (L_29)
{
goto IL_0098;
}
}
{
ByteU5BU5D_t3397334013* L_30 = ___fromBuffer0;
int32_t L_31 = ___numberOfBits1;
int32_t L_32 = ___readBitOffset2;
uint8_t L_33 = NetBitWriter_ReadByte_m1673854543(NULL /*static, unused*/, L_30, L_31, L_32, /*hidden argument*/NULL);
V_1 = L_33;
uint32_t L_34 = V_1;
V_1 = ((int32_t)((int32_t)L_34<<(int32_t)((int32_t)16)));
uint32_t L_35 = V_0;
uint32_t L_36 = V_1;
V_0 = ((int32_t)((int32_t)L_35|(int32_t)L_36));
uint32_t L_37 = V_0;
V_2 = L_37;
goto IL_00c2;
}
IL_0098:
{
uint32_t L_38 = V_0;
ByteU5BU5D_t3397334013* L_39 = ___fromBuffer0;
int32_t L_40 = ___readBitOffset2;
uint8_t L_41 = NetBitWriter_ReadByte_m1673854543(NULL /*static, unused*/, L_39, 8, L_40, /*hidden argument*/NULL);
V_0 = ((int32_t)((int32_t)L_38|(int32_t)((int32_t)((int32_t)L_41<<(int32_t)((int32_t)16)))));
int32_t L_42 = ___numberOfBits1;
___numberOfBits1 = ((int32_t)((int32_t)L_42-(int32_t)8));
int32_t L_43 = ___readBitOffset2;
___readBitOffset2 = ((int32_t)((int32_t)L_43+(int32_t)8));
uint32_t L_44 = V_0;
ByteU5BU5D_t3397334013* L_45 = ___fromBuffer0;
int32_t L_46 = ___numberOfBits1;
int32_t L_47 = ___readBitOffset2;
uint8_t L_48 = NetBitWriter_ReadByte_m1673854543(NULL /*static, unused*/, L_45, L_46, L_47, /*hidden argument*/NULL);
V_0 = ((int32_t)((int32_t)L_44|(int32_t)((int32_t)((int32_t)L_48<<(int32_t)((int32_t)24)))));
uint32_t L_49 = V_0;
V_2 = L_49;
goto IL_00c2;
}
IL_00c2:
{
uint32_t L_50 = V_2;
return L_50;
}
}
// System.Int32 Lidgren.Network.NetBitWriter::WriteUInt32(System.UInt32,System.Int32,System.Byte[],System.Int32)
extern "C" int32_t NetBitWriter_WriteUInt32_m1361372613 (Il2CppObject * __this /* static, unused */, uint32_t ___source0, int32_t ___numberOfBits1, ByteU5BU5D_t3397334013* ___destination2, int32_t ___destinationBitOffset3, const MethodInfo* method)
{
int32_t V_0 = 0;
int32_t V_1 = 0;
bool V_2 = false;
{
int32_t L_0 = ___destinationBitOffset3;
int32_t L_1 = ___numberOfBits1;
V_0 = ((int32_t)((int32_t)L_0+(int32_t)L_1));
int32_t L_2 = ___numberOfBits1;
V_2 = (bool)((((int32_t)L_2) > ((int32_t)8))? 1 : 0);
bool L_3 = V_2;
if (L_3)
{
goto IL_0020;
}
}
{
uint32_t L_4 = ___source0;
int32_t L_5 = ___numberOfBits1;
ByteU5BU5D_t3397334013* L_6 = ___destination2;
int32_t L_7 = ___destinationBitOffset3;
NetBitWriter_WriteByte_m1348088823(NULL /*static, unused*/, (((int32_t)((uint8_t)L_4))), L_5, L_6, L_7, /*hidden argument*/NULL);
int32_t L_8 = V_0;
V_1 = L_8;
goto IL_00ab;
}
IL_0020:
{
uint32_t L_9 = ___source0;
ByteU5BU5D_t3397334013* L_10 = ___destination2;
int32_t L_11 = ___destinationBitOffset3;
NetBitWriter_WriteByte_m1348088823(NULL /*static, unused*/, (((int32_t)((uint8_t)L_9))), 8, L_10, L_11, /*hidden argument*/NULL);
int32_t L_12 = ___destinationBitOffset3;
___destinationBitOffset3 = ((int32_t)((int32_t)L_12+(int32_t)8));
int32_t L_13 = ___numberOfBits1;
___numberOfBits1 = ((int32_t)((int32_t)L_13-(int32_t)8));
int32_t L_14 = ___numberOfBits1;
V_2 = (bool)((((int32_t)L_14) > ((int32_t)8))? 1 : 0);
bool L_15 = V_2;
if (L_15)
{
goto IL_004f;
}
}
{
uint32_t L_16 = ___source0;
int32_t L_17 = ___numberOfBits1;
ByteU5BU5D_t3397334013* L_18 = ___destination2;
int32_t L_19 = ___destinationBitOffset3;
NetBitWriter_WriteByte_m1348088823(NULL /*static, unused*/, (((int32_t)((uint8_t)((int32_t)((uint32_t)L_16>>8))))), L_17, L_18, L_19, /*hidden argument*/NULL);
int32_t L_20 = V_0;
V_1 = L_20;
goto IL_00ab;
}
IL_004f:
{
uint32_t L_21 = ___source0;
ByteU5BU5D_t3397334013* L_22 = ___destination2;
int32_t L_23 = ___destinationBitOffset3;
NetBitWriter_WriteByte_m1348088823(NULL /*static, unused*/, (((int32_t)((uint8_t)((int32_t)((uint32_t)L_21>>8))))), 8, L_22, L_23, /*hidden argument*/NULL);
int32_t L_24 = ___destinationBitOffset3;
___destinationBitOffset3 = ((int32_t)((int32_t)L_24+(int32_t)8));
int32_t L_25 = ___numberOfBits1;
___numberOfBits1 = ((int32_t)((int32_t)L_25-(int32_t)8));
int32_t L_26 = ___numberOfBits1;
V_2 = (bool)((((int32_t)L_26) > ((int32_t)8))? 1 : 0);
bool L_27 = V_2;
if (L_27)
{
goto IL_0081;
}
}
{
uint32_t L_28 = ___source0;
int32_t L_29 = ___numberOfBits1;
ByteU5BU5D_t3397334013* L_30 = ___destination2;
int32_t L_31 = ___destinationBitOffset3;
NetBitWriter_WriteByte_m1348088823(NULL /*static, unused*/, (((int32_t)((uint8_t)((int32_t)((uint32_t)L_28>>((int32_t)16)))))), L_29, L_30, L_31, /*hidden argument*/NULL);
int32_t L_32 = V_0;
V_1 = L_32;
goto IL_00ab;
}
IL_0081:
{
uint32_t L_33 = ___source0;
ByteU5BU5D_t3397334013* L_34 = ___destination2;
int32_t L_35 = ___destinationBitOffset3;
NetBitWriter_WriteByte_m1348088823(NULL /*static, unused*/, (((int32_t)((uint8_t)((int32_t)((uint32_t)L_33>>((int32_t)16)))))), 8, L_34, L_35, /*hidden argument*/NULL);
int32_t L_36 = ___destinationBitOffset3;
___destinationBitOffset3 = ((int32_t)((int32_t)L_36+(int32_t)8));
int32_t L_37 = ___numberOfBits1;
___numberOfBits1 = ((int32_t)((int32_t)L_37-(int32_t)8));
uint32_t L_38 = ___source0;
int32_t L_39 = ___numberOfBits1;
ByteU5BU5D_t3397334013* L_40 = ___destination2;
int32_t L_41 = ___destinationBitOffset3;
NetBitWriter_WriteByte_m1348088823(NULL /*static, unused*/, (((int32_t)((uint8_t)((int32_t)((uint32_t)L_38>>((int32_t)24)))))), L_39, L_40, L_41, /*hidden argument*/NULL);
int32_t L_42 = V_0;
V_1 = L_42;
goto IL_00ab;
}
IL_00ab:
{
int32_t L_43 = V_1;
return L_43;
}
}
// System.Int32 Lidgren.Network.NetBitWriter::WriteUInt64(System.UInt64,System.Int32,System.Byte[],System.Int32)
extern "C" int32_t NetBitWriter_WriteUInt64_m3878476069 (Il2CppObject * __this /* static, unused */, uint64_t ___source0, int32_t ___numberOfBits1, ByteU5BU5D_t3397334013* ___destination2, int32_t ___destinationBitOffset3, const MethodInfo* method)
{
int32_t V_0 = 0;
int32_t V_1 = 0;
bool V_2 = false;
{
int32_t L_0 = ___destinationBitOffset3;
int32_t L_1 = ___numberOfBits1;
V_0 = ((int32_t)((int32_t)L_0+(int32_t)L_1));
int32_t L_2 = ___numberOfBits1;
V_2 = (bool)((((int32_t)L_2) > ((int32_t)8))? 1 : 0);
bool L_3 = V_2;
if (L_3)
{
goto IL_0020;
}
}
{
uint64_t L_4 = ___source0;
int32_t L_5 = ___numberOfBits1;
ByteU5BU5D_t3397334013* L_6 = ___destination2;
int32_t L_7 = ___destinationBitOffset3;
NetBitWriter_WriteByte_m1348088823(NULL /*static, unused*/, (((int32_t)((uint8_t)L_4))), L_5, L_6, L_7, /*hidden argument*/NULL);
int32_t L_8 = V_0;
V_1 = L_8;
goto IL_01ab;
}
IL_0020:
{
uint64_t L_9 = ___source0;
ByteU5BU5D_t3397334013* L_10 = ___destination2;
int32_t L_11 = ___destinationBitOffset3;
NetBitWriter_WriteByte_m1348088823(NULL /*static, unused*/, (((int32_t)((uint8_t)L_9))), 8, L_10, L_11, /*hidden argument*/NULL);
int32_t L_12 = ___destinationBitOffset3;
___destinationBitOffset3 = ((int32_t)((int32_t)L_12+(int32_t)8));
int32_t L_13 = ___numberOfBits1;
___numberOfBits1 = ((int32_t)((int32_t)L_13-(int32_t)8));
int32_t L_14 = ___numberOfBits1;
V_2 = (bool)((((int32_t)L_14) > ((int32_t)8))? 1 : 0);
bool L_15 = V_2;
if (L_15)
{
goto IL_0052;
}
}
{
uint64_t L_16 = ___source0;
int32_t L_17 = ___numberOfBits1;
ByteU5BU5D_t3397334013* L_18 = ___destination2;
int32_t L_19 = ___destinationBitOffset3;
NetBitWriter_WriteByte_m1348088823(NULL /*static, unused*/, (((int32_t)((uint8_t)((int64_t)((uint64_t)L_16>>8))))), L_17, L_18, L_19, /*hidden argument*/NULL);
int32_t L_20 = V_0;
V_1 = L_20;
goto IL_01ab;
}
IL_0052:
{
uint64_t L_21 = ___source0;
ByteU5BU5D_t3397334013* L_22 = ___destination2;
int32_t L_23 = ___destinationBitOffset3;
NetBitWriter_WriteByte_m1348088823(NULL /*static, unused*/, (((int32_t)((uint8_t)((int64_t)((uint64_t)L_21>>8))))), 8, L_22, L_23, /*hidden argument*/NULL);
int32_t L_24 = ___destinationBitOffset3;
___destinationBitOffset3 = ((int32_t)((int32_t)L_24+(int32_t)8));
int32_t L_25 = ___numberOfBits1;
___numberOfBits1 = ((int32_t)((int32_t)L_25-(int32_t)8));
int32_t L_26 = ___numberOfBits1;
V_2 = (bool)((((int32_t)L_26) > ((int32_t)8))? 1 : 0);
bool L_27 = V_2;
if (L_27)
{
goto IL_0087;
}
}
{
uint64_t L_28 = ___source0;
int32_t L_29 = ___numberOfBits1;
ByteU5BU5D_t3397334013* L_30 = ___destination2;
int32_t L_31 = ___destinationBitOffset3;
NetBitWriter_WriteByte_m1348088823(NULL /*static, unused*/, (((int32_t)((uint8_t)((int64_t)((uint64_t)L_28>>((int32_t)16)))))), L_29, L_30, L_31, /*hidden argument*/NULL);
int32_t L_32 = V_0;
V_1 = L_32;
goto IL_01ab;
}
IL_0087:
{
uint64_t L_33 = ___source0;
ByteU5BU5D_t3397334013* L_34 = ___destination2;
int32_t L_35 = ___destinationBitOffset3;
NetBitWriter_WriteByte_m1348088823(NULL /*static, unused*/, (((int32_t)((uint8_t)((int64_t)((uint64_t)L_33>>((int32_t)16)))))), 8, L_34, L_35, /*hidden argument*/NULL);
int32_t L_36 = ___destinationBitOffset3;
___destinationBitOffset3 = ((int32_t)((int32_t)L_36+(int32_t)8));
int32_t L_37 = ___numberOfBits1;
___numberOfBits1 = ((int32_t)((int32_t)L_37-(int32_t)8));
int32_t L_38 = ___numberOfBits1;
V_2 = (bool)((((int32_t)L_38) > ((int32_t)8))? 1 : 0);
bool L_39 = V_2;
if (L_39)
{
goto IL_00bd;
}
}
{
uint64_t L_40 = ___source0;
int32_t L_41 = ___numberOfBits1;
ByteU5BU5D_t3397334013* L_42 = ___destination2;
int32_t L_43 = ___destinationBitOffset3;
NetBitWriter_WriteByte_m1348088823(NULL /*static, unused*/, (((int32_t)((uint8_t)((int64_t)((uint64_t)L_40>>((int32_t)24)))))), L_41, L_42, L_43, /*hidden argument*/NULL);
int32_t L_44 = V_0;
V_1 = L_44;
goto IL_01ab;
}
IL_00bd:
{
uint64_t L_45 = ___source0;
ByteU5BU5D_t3397334013* L_46 = ___destination2;
int32_t L_47 = ___destinationBitOffset3;
NetBitWriter_WriteByte_m1348088823(NULL /*static, unused*/, (((int32_t)((uint8_t)((int64_t)((uint64_t)L_45>>((int32_t)24)))))), 8, L_46, L_47, /*hidden argument*/NULL);
int32_t L_48 = ___destinationBitOffset3;
___destinationBitOffset3 = ((int32_t)((int32_t)L_48+(int32_t)8));
int32_t L_49 = ___numberOfBits1;
___numberOfBits1 = ((int32_t)((int32_t)L_49-(int32_t)8));
int32_t L_50 = ___numberOfBits1;
V_2 = (bool)((((int32_t)L_50) > ((int32_t)8))? 1 : 0);
bool L_51 = V_2;
if (L_51)
{
goto IL_00f3;
}
}
{
uint64_t L_52 = ___source0;
int32_t L_53 = ___numberOfBits1;
ByteU5BU5D_t3397334013* L_54 = ___destination2;
int32_t L_55 = ___destinationBitOffset3;
NetBitWriter_WriteByte_m1348088823(NULL /*static, unused*/, (((int32_t)((uint8_t)((int64_t)((uint64_t)L_52>>((int32_t)32)))))), L_53, L_54, L_55, /*hidden argument*/NULL);
int32_t L_56 = V_0;
V_1 = L_56;
goto IL_01ab;
}
IL_00f3:
{
uint64_t L_57 = ___source0;
ByteU5BU5D_t3397334013* L_58 = ___destination2;
int32_t L_59 = ___destinationBitOffset3;
NetBitWriter_WriteByte_m1348088823(NULL /*static, unused*/, (((int32_t)((uint8_t)((int64_t)((uint64_t)L_57>>((int32_t)32)))))), 8, L_58, L_59, /*hidden argument*/NULL);
int32_t L_60 = ___destinationBitOffset3;
___destinationBitOffset3 = ((int32_t)((int32_t)L_60+(int32_t)8));
int32_t L_61 = ___numberOfBits1;
___numberOfBits1 = ((int32_t)((int32_t)L_61-(int32_t)8));
int32_t L_62 = ___numberOfBits1;
V_2 = (bool)((((int32_t)L_62) > ((int32_t)8))? 1 : 0);
bool L_63 = V_2;
if (L_63)
{
goto IL_0129;
}
}
{
uint64_t L_64 = ___source0;
int32_t L_65 = ___numberOfBits1;
ByteU5BU5D_t3397334013* L_66 = ___destination2;
int32_t L_67 = ___destinationBitOffset3;
NetBitWriter_WriteByte_m1348088823(NULL /*static, unused*/, (((int32_t)((uint8_t)((int64_t)((uint64_t)L_64>>((int32_t)40)))))), L_65, L_66, L_67, /*hidden argument*/NULL);
int32_t L_68 = V_0;
V_1 = L_68;
goto IL_01ab;
}
IL_0129:
{
uint64_t L_69 = ___source0;
ByteU5BU5D_t3397334013* L_70 = ___destination2;
int32_t L_71 = ___destinationBitOffset3;
NetBitWriter_WriteByte_m1348088823(NULL /*static, unused*/, (((int32_t)((uint8_t)((int64_t)((uint64_t)L_69>>((int32_t)40)))))), 8, L_70, L_71, /*hidden argument*/NULL);
int32_t L_72 = ___destinationBitOffset3;
___destinationBitOffset3 = ((int32_t)((int32_t)L_72+(int32_t)8));
int32_t L_73 = ___numberOfBits1;
___numberOfBits1 = ((int32_t)((int32_t)L_73-(int32_t)8));
int32_t L_74 = ___numberOfBits1;
V_2 = (bool)((((int32_t)L_74) > ((int32_t)8))? 1 : 0);
bool L_75 = V_2;
if (L_75)
{
goto IL_015c;
}
}
{
uint64_t L_76 = ___source0;
int32_t L_77 = ___numberOfBits1;
ByteU5BU5D_t3397334013* L_78 = ___destination2;
int32_t L_79 = ___destinationBitOffset3;
NetBitWriter_WriteByte_m1348088823(NULL /*static, unused*/, (((int32_t)((uint8_t)((int64_t)((uint64_t)L_76>>((int32_t)48)))))), L_77, L_78, L_79, /*hidden argument*/NULL);
int32_t L_80 = V_0;
V_1 = L_80;
goto IL_01ab;
}
IL_015c:
{
uint64_t L_81 = ___source0;
ByteU5BU5D_t3397334013* L_82 = ___destination2;
int32_t L_83 = ___destinationBitOffset3;
NetBitWriter_WriteByte_m1348088823(NULL /*static, unused*/, (((int32_t)((uint8_t)((int64_t)((uint64_t)L_81>>((int32_t)48)))))), 8, L_82, L_83, /*hidden argument*/NULL);
int32_t L_84 = ___destinationBitOffset3;
___destinationBitOffset3 = ((int32_t)((int32_t)L_84+(int32_t)8));
int32_t L_85 = ___numberOfBits1;
___numberOfBits1 = ((int32_t)((int32_t)L_85-(int32_t)8));
int32_t L_86 = ___numberOfBits1;
V_2 = (bool)((((int32_t)L_86) > ((int32_t)8))? 1 : 0);
bool L_87 = V_2;
if (L_87)
{
goto IL_018f;
}
}
{
uint64_t L_88 = ___source0;
int32_t L_89 = ___numberOfBits1;
ByteU5BU5D_t3397334013* L_90 = ___destination2;
int32_t L_91 = ___destinationBitOffset3;
NetBitWriter_WriteByte_m1348088823(NULL /*static, unused*/, (((int32_t)((uint8_t)((int64_t)((uint64_t)L_88>>((int32_t)56)))))), L_89, L_90, L_91, /*hidden argument*/NULL);
int32_t L_92 = V_0;
V_1 = L_92;
goto IL_01ab;
}
IL_018f:
{
uint64_t L_93 = ___source0;
ByteU5BU5D_t3397334013* L_94 = ___destination2;
int32_t L_95 = ___destinationBitOffset3;
NetBitWriter_WriteByte_m1348088823(NULL /*static, unused*/, (((int32_t)((uint8_t)((int64_t)((uint64_t)L_93>>((int32_t)56)))))), 8, L_94, L_95, /*hidden argument*/NULL);
int32_t L_96 = ___destinationBitOffset3;
___destinationBitOffset3 = ((int32_t)((int32_t)L_96+(int32_t)8));
int32_t L_97 = ___numberOfBits1;
___numberOfBits1 = ((int32_t)((int32_t)L_97-(int32_t)8));
int32_t L_98 = V_0;
V_1 = L_98;
goto IL_01ab;
}
IL_01ab:
{
int32_t L_99 = V_1;
return L_99;
}
}
// System.Byte[] Lidgren.Network.NetBuffer::get_Data()
extern "C" ByteU5BU5D_t3397334013* NetBuffer_get_Data_m1302059707 (NetBuffer_t3608062491 * __this, const MethodInfo* method)
{
ByteU5BU5D_t3397334013* V_0 = NULL;
{
ByteU5BU5D_t3397334013* L_0 = __this->get_m_data_2();
V_0 = L_0;
goto IL_000a;
}
IL_000a:
{
ByteU5BU5D_t3397334013* L_1 = V_0;
return L_1;
}
}
// System.Int32 Lidgren.Network.NetBuffer::get_LengthBytes()
extern "C" int32_t NetBuffer_get_LengthBytes_m2765088638 (NetBuffer_t3608062491 * __this, const MethodInfo* method)
{
int32_t V_0 = 0;
{
int32_t L_0 = __this->get_m_bitLength_3();
V_0 = ((int32_t)((int32_t)((int32_t)((int32_t)L_0+(int32_t)7))>>(int32_t)3));
goto IL_000e;
}
IL_000e:
{
int32_t L_1 = V_0;
return L_1;
}
}
// System.Int32 Lidgren.Network.NetBuffer::get_LengthBits()
extern "C" int32_t NetBuffer_get_LengthBits_m2426148225 (NetBuffer_t3608062491 * __this, const MethodInfo* method)
{
int32_t V_0 = 0;
{
int32_t L_0 = __this->get_m_bitLength_3();
V_0 = L_0;
goto IL_000a;
}
IL_000a:
{
int32_t L_1 = V_0;
return L_1;
}
}
// System.Void Lidgren.Network.NetBuffer::set_LengthBits(System.Int32)
extern "C" void NetBuffer_set_LengthBits_m2102256812 (NetBuffer_t3608062491 * __this, int32_t ___value0, const MethodInfo* method)
{
{
int32_t L_0 = ___value0;
__this->set_m_bitLength_3(L_0);
int32_t L_1 = __this->get_m_bitLength_3();
NetBuffer_InternalEnsureBufferSize_m2673967747(__this, L_1, /*hidden argument*/NULL);
return;
}
}
// System.Int32 Lidgren.Network.NetBuffer::get_PositionInBytes()
extern "C" int32_t NetBuffer_get_PositionInBytes_m2104121730 (NetBuffer_t3608062491 * __this, const MethodInfo* method)
{
int32_t V_0 = 0;
{
int32_t L_0 = __this->get_m_readPosition_4();
V_0 = ((int32_t)((int32_t)L_0/(int32_t)8));
goto IL_000c;
}
IL_000c:
{
int32_t L_1 = V_0;
return L_1;
}
}
// System.Void Lidgren.Network.NetBuffer::.cctor()
extern const Il2CppType* NetIncomingMessage_t2014089816_0_0_0_var;
extern const Il2CppType* NetOutgoingMessage_t2016542980_0_0_0_var;
extern Il2CppClass* Dictionary_2_t972936938_il2cpp_TypeInfo_var;
extern Il2CppClass* NetBuffer_t3608062491_il2cpp_TypeInfo_var;
extern Il2CppClass* Type_t_il2cpp_TypeInfo_var;
extern Il2CppClass* String_t_il2cpp_TypeInfo_var;
extern const MethodInfo* Dictionary_2__ctor_m456053151_MethodInfo_var;
extern const MethodInfo* Dictionary_2_set_Item_m114247304_MethodInfo_var;
extern Il2CppCodeGenString* _stringLiteral4136223338;
extern Il2CppCodeGenString* _stringLiteral1494441421;
extern const uint32_t NetBuffer__cctor_m1227205649_MetadataUsageId;
extern "C" void NetBuffer__cctor_m1227205649 (Il2CppObject * __this /* static, unused */, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetBuffer__cctor_m1227205649_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
MethodInfoU5BU5D_t152480188* V_0 = NULL;
MethodInfo_t * V_1 = NULL;
ParameterInfoU5BU5D_t2275869610* V_2 = NULL;
MethodInfoU5BU5D_t152480188* V_3 = NULL;
int32_t V_4 = 0;
bool V_5 = false;
int32_t G_B5_0 = 0;
{
Dictionary_2_t972936938 * L_0 = (Dictionary_2_t972936938 *)il2cpp_codegen_object_new(Dictionary_2_t972936938_il2cpp_TypeInfo_var);
Dictionary_2__ctor_m456053151(L_0, /*hidden argument*/Dictionary_2__ctor_m456053151_MethodInfo_var);
((NetBuffer_t3608062491_StaticFields*)NetBuffer_t3608062491_il2cpp_TypeInfo_var->static_fields)->set_s_readMethods_0(L_0);
IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var);
Type_t * L_1 = Type_GetTypeFromHandle_m432505302(NULL /*static, unused*/, LoadTypeToken(NetIncomingMessage_t2014089816_0_0_0_var), /*hidden argument*/NULL);
NullCheck(L_1);
MethodInfoU5BU5D_t152480188* L_2 = VirtFuncInvoker1< MethodInfoU5BU5D_t152480188*, int32_t >::Invoke(62 /* System.Reflection.MethodInfo[] System.Type::GetMethods(System.Reflection.BindingFlags) */, L_1, ((int32_t)20));
V_0 = L_2;
MethodInfoU5BU5D_t152480188* L_3 = V_0;
V_3 = L_3;
V_4 = 0;
goto IL_008c;
}
IL_0025:
{
MethodInfoU5BU5D_t152480188* L_4 = V_3;
int32_t L_5 = V_4;
NullCheck(L_4);
IL2CPP_ARRAY_BOUNDS_CHECK(L_4, L_5);
int32_t L_6 = L_5;
MethodInfo_t * L_7 = (L_4)->GetAt(static_cast<il2cpp_array_size_t>(L_6));
V_1 = L_7;
MethodInfo_t * L_8 = V_1;
NullCheck(L_8);
ParameterInfoU5BU5D_t2275869610* L_9 = VirtFuncInvoker0< ParameterInfoU5BU5D_t2275869610* >::Invoke(14 /* System.Reflection.ParameterInfo[] System.Reflection.MethodBase::GetParameters() */, L_8);
NullCheck(L_9);
if ((((int32_t)((int32_t)(((Il2CppArray *)L_9)->max_length)))))
{
goto IL_0069;
}
}
{
MethodInfo_t * L_10 = V_1;
NullCheck(L_10);
String_t* L_11 = VirtFuncInvoker0< String_t* >::Invoke(8 /* System.String System.Reflection.MemberInfo::get_Name() */, L_10);
NullCheck(L_11);
bool L_12 = String_StartsWith_m46695182(L_11, _stringLiteral4136223338, 2, /*hidden argument*/NULL);
if (!L_12)
{
goto IL_0069;
}
}
{
MethodInfo_t * L_13 = V_1;
NullCheck(L_13);
String_t* L_14 = VirtFuncInvoker0< String_t* >::Invoke(8 /* System.String System.Reflection.MemberInfo::get_Name() */, L_13);
NullCheck(L_14);
String_t* L_15 = String_Substring_m2032624251(L_14, 4, /*hidden argument*/NULL);
MethodInfo_t * L_16 = V_1;
NullCheck(L_16);
Type_t * L_17 = VirtFuncInvoker0< Type_t * >::Invoke(33 /* System.Type System.Reflection.MethodInfo::get_ReturnType() */, L_16);
NullCheck(L_17);
String_t* L_18 = VirtFuncInvoker0< String_t* >::Invoke(8 /* System.String System.Reflection.MemberInfo::get_Name() */, L_17);
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
bool L_19 = String_op_Equality_m1790663636(NULL /*static, unused*/, L_15, L_18, /*hidden argument*/NULL);
G_B5_0 = ((((int32_t)L_19) == ((int32_t)0))? 1 : 0);
goto IL_006a;
}
IL_0069:
{
G_B5_0 = 1;
}
IL_006a:
{
V_5 = (bool)G_B5_0;
bool L_20 = V_5;
if (L_20)
{
goto IL_0085;
}
}
{
Dictionary_2_t972936938 * L_21 = ((NetBuffer_t3608062491_StaticFields*)NetBuffer_t3608062491_il2cpp_TypeInfo_var->static_fields)->get_s_readMethods_0();
MethodInfo_t * L_22 = V_1;
NullCheck(L_22);
Type_t * L_23 = VirtFuncInvoker0< Type_t * >::Invoke(33 /* System.Type System.Reflection.MethodInfo::get_ReturnType() */, L_22);
MethodInfo_t * L_24 = V_1;
NullCheck(L_21);
Dictionary_2_set_Item_m114247304(L_21, L_23, L_24, /*hidden argument*/Dictionary_2_set_Item_m114247304_MethodInfo_var);
}
IL_0085:
{
int32_t L_25 = V_4;
V_4 = ((int32_t)((int32_t)L_25+(int32_t)1));
}
IL_008c:
{
int32_t L_26 = V_4;
MethodInfoU5BU5D_t152480188* L_27 = V_3;
NullCheck(L_27);
V_5 = (bool)((((int32_t)L_26) < ((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_27)->max_length))))))? 1 : 0);
bool L_28 = V_5;
if (L_28)
{
goto IL_0025;
}
}
{
Dictionary_2_t972936938 * L_29 = (Dictionary_2_t972936938 *)il2cpp_codegen_object_new(Dictionary_2_t972936938_il2cpp_TypeInfo_var);
Dictionary_2__ctor_m456053151(L_29, /*hidden argument*/Dictionary_2__ctor_m456053151_MethodInfo_var);
((NetBuffer_t3608062491_StaticFields*)NetBuffer_t3608062491_il2cpp_TypeInfo_var->static_fields)->set_s_writeMethods_1(L_29);
IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var);
Type_t * L_30 = Type_GetTypeFromHandle_m432505302(NULL /*static, unused*/, LoadTypeToken(NetOutgoingMessage_t2016542980_0_0_0_var), /*hidden argument*/NULL);
NullCheck(L_30);
MethodInfoU5BU5D_t152480188* L_31 = VirtFuncInvoker1< MethodInfoU5BU5D_t152480188*, int32_t >::Invoke(62 /* System.Reflection.MethodInfo[] System.Type::GetMethods(System.Reflection.BindingFlags) */, L_30, ((int32_t)20));
V_0 = L_31;
MethodInfoU5BU5D_t152480188* L_32 = V_0;
V_3 = L_32;
V_4 = 0;
goto IL_0110;
}
IL_00bd:
{
MethodInfoU5BU5D_t152480188* L_33 = V_3;
int32_t L_34 = V_4;
NullCheck(L_33);
IL2CPP_ARRAY_BOUNDS_CHECK(L_33, L_34);
int32_t L_35 = L_34;
MethodInfo_t * L_36 = (L_33)->GetAt(static_cast<il2cpp_array_size_t>(L_35));
V_1 = L_36;
MethodInfo_t * L_37 = V_1;
NullCheck(L_37);
String_t* L_38 = VirtFuncInvoker0< String_t* >::Invoke(8 /* System.String System.Reflection.MemberInfo::get_Name() */, L_37);
NullCheck(L_38);
bool L_39 = String_Equals_m1185277978(L_38, _stringLiteral1494441421, 2, /*hidden argument*/NULL);
V_5 = (bool)((((int32_t)L_39) == ((int32_t)0))? 1 : 0);
bool L_40 = V_5;
if (L_40)
{
goto IL_0109;
}
}
{
MethodInfo_t * L_41 = V_1;
NullCheck(L_41);
ParameterInfoU5BU5D_t2275869610* L_42 = VirtFuncInvoker0< ParameterInfoU5BU5D_t2275869610* >::Invoke(14 /* System.Reflection.ParameterInfo[] System.Reflection.MethodBase::GetParameters() */, L_41);
V_2 = L_42;
ParameterInfoU5BU5D_t2275869610* L_43 = V_2;
NullCheck(L_43);
V_5 = (bool)((((int32_t)((((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_43)->max_length))))) == ((int32_t)1))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_44 = V_5;
if (L_44)
{
goto IL_0108;
}
}
{
Dictionary_2_t972936938 * L_45 = ((NetBuffer_t3608062491_StaticFields*)NetBuffer_t3608062491_il2cpp_TypeInfo_var->static_fields)->get_s_writeMethods_1();
ParameterInfoU5BU5D_t2275869610* L_46 = V_2;
NullCheck(L_46);
IL2CPP_ARRAY_BOUNDS_CHECK(L_46, 0);
int32_t L_47 = 0;
ParameterInfo_t2249040075 * L_48 = (L_46)->GetAt(static_cast<il2cpp_array_size_t>(L_47));
NullCheck(L_48);
Type_t * L_49 = VirtFuncInvoker0< Type_t * >::Invoke(6 /* System.Type System.Reflection.ParameterInfo::get_ParameterType() */, L_48);
MethodInfo_t * L_50 = V_1;
NullCheck(L_45);
Dictionary_2_set_Item_m114247304(L_45, L_49, L_50, /*hidden argument*/Dictionary_2_set_Item_m114247304_MethodInfo_var);
}
IL_0108:
{
}
IL_0109:
{
int32_t L_51 = V_4;
V_4 = ((int32_t)((int32_t)L_51+(int32_t)1));
}
IL_0110:
{
int32_t L_52 = V_4;
MethodInfoU5BU5D_t152480188* L_53 = V_3;
NullCheck(L_53);
V_5 = (bool)((((int32_t)L_52) < ((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_53)->max_length))))))? 1 : 0);
bool L_54 = V_5;
if (L_54)
{
goto IL_00bd;
}
}
{
return;
}
}
// System.Byte Lidgren.Network.NetBuffer::PeekByte()
extern Il2CppCodeGenString* _stringLiteral611203703;
extern const uint32_t NetBuffer_PeekByte_m934254441_MetadataUsageId;
extern "C" uint8_t NetBuffer_PeekByte_m934254441 (NetBuffer_t3608062491 * __this, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetBuffer_PeekByte_m934254441_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
uint8_t V_0 = 0x0;
uint8_t V_1 = 0x0;
{
int32_t L_0 = __this->get_m_bitLength_3();
int32_t L_1 = __this->get_m_readPosition_4();
NetException_Assert_m1067120882(NULL /*static, unused*/, (bool)((((int32_t)((((int32_t)((int32_t)((int32_t)L_0-(int32_t)L_1))) < ((int32_t)8))? 1 : 0)) == ((int32_t)0))? 1 : 0), _stringLiteral611203703, /*hidden argument*/NULL);
ByteU5BU5D_t3397334013* L_2 = __this->get_m_data_2();
int32_t L_3 = __this->get_m_readPosition_4();
uint8_t L_4 = NetBitWriter_ReadByte_m1673854543(NULL /*static, unused*/, L_2, 8, L_3, /*hidden argument*/NULL);
V_0 = L_4;
uint8_t L_5 = V_0;
V_1 = L_5;
goto IL_0036;
}
IL_0036:
{
uint8_t L_6 = V_1;
return L_6;
}
}
// System.Byte Lidgren.Network.NetBuffer::ReadByte()
extern Il2CppCodeGenString* _stringLiteral611203703;
extern const uint32_t NetBuffer_ReadByte_m3348400846_MetadataUsageId;
extern "C" uint8_t NetBuffer_ReadByte_m3348400846 (NetBuffer_t3608062491 * __this, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetBuffer_ReadByte_m3348400846_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
uint8_t V_0 = 0x0;
uint8_t V_1 = 0x0;
{
int32_t L_0 = __this->get_m_bitLength_3();
int32_t L_1 = __this->get_m_readPosition_4();
NetException_Assert_m1067120882(NULL /*static, unused*/, (bool)((((int32_t)((((int32_t)((int32_t)((int32_t)L_0-(int32_t)L_1))) < ((int32_t)8))? 1 : 0)) == ((int32_t)0))? 1 : 0), _stringLiteral611203703, /*hidden argument*/NULL);
ByteU5BU5D_t3397334013* L_2 = __this->get_m_data_2();
int32_t L_3 = __this->get_m_readPosition_4();
uint8_t L_4 = NetBitWriter_ReadByte_m1673854543(NULL /*static, unused*/, L_2, 8, L_3, /*hidden argument*/NULL);
V_0 = L_4;
int32_t L_5 = __this->get_m_readPosition_4();
__this->set_m_readPosition_4(((int32_t)((int32_t)L_5+(int32_t)8)));
uint8_t L_6 = V_0;
V_1 = L_6;
goto IL_0044;
}
IL_0044:
{
uint8_t L_7 = V_1;
return L_7;
}
}
// System.Byte[] Lidgren.Network.NetBuffer::ReadBytes(System.Int32)
extern Il2CppClass* ByteU5BU5D_t3397334013_il2cpp_TypeInfo_var;
extern Il2CppCodeGenString* _stringLiteral611203703;
extern const uint32_t NetBuffer_ReadBytes_m4004009464_MetadataUsageId;
extern "C" ByteU5BU5D_t3397334013* NetBuffer_ReadBytes_m4004009464 (NetBuffer_t3608062491 * __this, int32_t ___numberOfBytes0, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetBuffer_ReadBytes_m4004009464_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
ByteU5BU5D_t3397334013* V_0 = NULL;
ByteU5BU5D_t3397334013* V_1 = NULL;
{
int32_t L_0 = __this->get_m_bitLength_3();
int32_t L_1 = __this->get_m_readPosition_4();
int32_t L_2 = ___numberOfBytes0;
NetException_Assert_m1067120882(NULL /*static, unused*/, (bool)((((int32_t)((((int32_t)((int32_t)((int32_t)((int32_t)((int32_t)L_0-(int32_t)L_1))+(int32_t)7))) < ((int32_t)((int32_t)((int32_t)L_2*(int32_t)8))))? 1 : 0)) == ((int32_t)0))? 1 : 0), _stringLiteral611203703, /*hidden argument*/NULL);
int32_t L_3 = ___numberOfBytes0;
V_0 = ((ByteU5BU5D_t3397334013*)SZArrayNew(ByteU5BU5D_t3397334013_il2cpp_TypeInfo_var, (uint32_t)L_3));
ByteU5BU5D_t3397334013* L_4 = __this->get_m_data_2();
int32_t L_5 = ___numberOfBytes0;
int32_t L_6 = __this->get_m_readPosition_4();
ByteU5BU5D_t3397334013* L_7 = V_0;
NetBitWriter_ReadBytes_m2825983754(NULL /*static, unused*/, L_4, L_5, L_6, L_7, 0, /*hidden argument*/NULL);
int32_t L_8 = __this->get_m_readPosition_4();
int32_t L_9 = ___numberOfBytes0;
__this->set_m_readPosition_4(((int32_t)((int32_t)L_8+(int32_t)((int32_t)((int32_t)8*(int32_t)L_9)))));
ByteU5BU5D_t3397334013* L_10 = V_0;
V_1 = L_10;
goto IL_0053;
}
IL_0053:
{
ByteU5BU5D_t3397334013* L_11 = V_1;
return L_11;
}
}
// System.UInt16 Lidgren.Network.NetBuffer::ReadUInt16()
extern Il2CppCodeGenString* _stringLiteral611203703;
extern const uint32_t NetBuffer_ReadUInt16_m907876270_MetadataUsageId;
extern "C" uint16_t NetBuffer_ReadUInt16_m907876270 (NetBuffer_t3608062491 * __this, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetBuffer_ReadUInt16_m907876270_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
uint32_t V_0 = 0;
uint16_t V_1 = 0;
{
int32_t L_0 = __this->get_m_bitLength_3();
int32_t L_1 = __this->get_m_readPosition_4();
NetException_Assert_m1067120882(NULL /*static, unused*/, (bool)((((int32_t)((((int32_t)((int32_t)((int32_t)L_0-(int32_t)L_1))) < ((int32_t)((int32_t)16)))? 1 : 0)) == ((int32_t)0))? 1 : 0), _stringLiteral611203703, /*hidden argument*/NULL);
ByteU5BU5D_t3397334013* L_2 = __this->get_m_data_2();
int32_t L_3 = __this->get_m_readPosition_4();
uint16_t L_4 = NetBitWriter_ReadUInt16_m634713443(NULL /*static, unused*/, L_2, ((int32_t)16), L_3, /*hidden argument*/NULL);
V_0 = L_4;
int32_t L_5 = __this->get_m_readPosition_4();
__this->set_m_readPosition_4(((int32_t)((int32_t)L_5+(int32_t)((int32_t)16))));
uint32_t L_6 = V_0;
V_1 = (((int32_t)((uint16_t)L_6)));
goto IL_0048;
}
IL_0048:
{
uint16_t L_7 = V_1;
return L_7;
}
}
// System.Int32 Lidgren.Network.NetBuffer::ReadInt32()
extern Il2CppCodeGenString* _stringLiteral611203703;
extern const uint32_t NetBuffer_ReadInt32_m2479521906_MetadataUsageId;
extern "C" int32_t NetBuffer_ReadInt32_m2479521906 (NetBuffer_t3608062491 * __this, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetBuffer_ReadInt32_m2479521906_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
uint32_t V_0 = 0;
int32_t V_1 = 0;
{
int32_t L_0 = __this->get_m_bitLength_3();
int32_t L_1 = __this->get_m_readPosition_4();
NetException_Assert_m1067120882(NULL /*static, unused*/, (bool)((((int32_t)((((int32_t)((int32_t)((int32_t)L_0-(int32_t)L_1))) < ((int32_t)((int32_t)32)))? 1 : 0)) == ((int32_t)0))? 1 : 0), _stringLiteral611203703, /*hidden argument*/NULL);
ByteU5BU5D_t3397334013* L_2 = __this->get_m_data_2();
int32_t L_3 = __this->get_m_readPosition_4();
uint32_t L_4 = NetBitWriter_ReadUInt32_m1364064019(NULL /*static, unused*/, L_2, ((int32_t)32), L_3, /*hidden argument*/NULL);
V_0 = L_4;
int32_t L_5 = __this->get_m_readPosition_4();
__this->set_m_readPosition_4(((int32_t)((int32_t)L_5+(int32_t)((int32_t)32))));
uint32_t L_6 = V_0;
V_1 = L_6;
goto IL_0047;
}
IL_0047:
{
int32_t L_7 = V_1;
return L_7;
}
}
// System.UInt64 Lidgren.Network.NetBuffer::ReadUInt64()
extern Il2CppCodeGenString* _stringLiteral611203703;
extern const uint32_t NetBuffer_ReadUInt64_m475056270_MetadataUsageId;
extern "C" uint64_t NetBuffer_ReadUInt64_m475056270 (NetBuffer_t3608062491 * __this, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetBuffer_ReadUInt64_m475056270_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
uint64_t V_0 = 0;
uint64_t V_1 = 0;
uint64_t V_2 = 0;
uint64_t V_3 = 0;
{
int32_t L_0 = __this->get_m_bitLength_3();
int32_t L_1 = __this->get_m_readPosition_4();
NetException_Assert_m1067120882(NULL /*static, unused*/, (bool)((((int32_t)((((int32_t)((int32_t)((int32_t)L_0-(int32_t)L_1))) < ((int32_t)((int32_t)64)))? 1 : 0)) == ((int32_t)0))? 1 : 0), _stringLiteral611203703, /*hidden argument*/NULL);
ByteU5BU5D_t3397334013* L_2 = __this->get_m_data_2();
int32_t L_3 = __this->get_m_readPosition_4();
uint32_t L_4 = NetBitWriter_ReadUInt32_m1364064019(NULL /*static, unused*/, L_2, ((int32_t)32), L_3, /*hidden argument*/NULL);
V_0 = (((int64_t)((uint64_t)L_4)));
int32_t L_5 = __this->get_m_readPosition_4();
__this->set_m_readPosition_4(((int32_t)((int32_t)L_5+(int32_t)((int32_t)32))));
ByteU5BU5D_t3397334013* L_6 = __this->get_m_data_2();
int32_t L_7 = __this->get_m_readPosition_4();
uint32_t L_8 = NetBitWriter_ReadUInt32_m1364064019(NULL /*static, unused*/, L_6, ((int32_t)32), L_7, /*hidden argument*/NULL);
V_1 = (((int64_t)((uint64_t)L_8)));
uint64_t L_9 = V_0;
uint64_t L_10 = V_1;
V_2 = ((int64_t)((int64_t)L_9+(int64_t)((int64_t)((int64_t)L_10<<(int32_t)((int32_t)32)))));
int32_t L_11 = __this->get_m_readPosition_4();
__this->set_m_readPosition_4(((int32_t)((int32_t)L_11+(int32_t)((int32_t)32))));
uint64_t L_12 = V_2;
V_3 = L_12;
goto IL_0073;
}
IL_0073:
{
uint64_t L_13 = V_3;
return L_13;
}
}
// System.Int64 Lidgren.Network.NetBuffer::ReadInt64()
extern Il2CppCodeGenString* _stringLiteral611203703;
extern const uint32_t NetBuffer_ReadInt64_m2415498424_MetadataUsageId;
extern "C" int64_t NetBuffer_ReadInt64_m2415498424 (NetBuffer_t3608062491 * __this, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetBuffer_ReadInt64_m2415498424_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
uint64_t V_0 = 0;
int64_t V_1 = 0;
int64_t V_2 = 0;
{
int32_t L_0 = __this->get_m_bitLength_3();
int32_t L_1 = __this->get_m_readPosition_4();
NetException_Assert_m1067120882(NULL /*static, unused*/, (bool)((((int32_t)((((int32_t)((int32_t)((int32_t)L_0-(int32_t)L_1))) < ((int32_t)((int32_t)64)))? 1 : 0)) == ((int32_t)0))? 1 : 0), _stringLiteral611203703, /*hidden argument*/NULL);
uint64_t L_2 = NetBuffer_ReadUInt64_m475056270(__this, /*hidden argument*/NULL);
V_0 = L_2;
uint64_t L_3 = V_0;
V_1 = L_3;
int64_t L_4 = V_1;
V_2 = L_4;
goto IL_002e;
}
IL_002e:
{
int64_t L_5 = V_2;
return L_5;
}
}
// System.Single Lidgren.Network.NetBuffer::ReadSingle()
extern Il2CppClass* BitConverter_t3195628829_il2cpp_TypeInfo_var;
extern Il2CppCodeGenString* _stringLiteral611203703;
extern const uint32_t NetBuffer_ReadSingle_m2767420110_MetadataUsageId;
extern "C" float NetBuffer_ReadSingle_m2767420110 (NetBuffer_t3608062491 * __this, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetBuffer_ReadSingle_m2767420110_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
float V_0 = 0.0f;
ByteU5BU5D_t3397334013* V_1 = NULL;
float V_2 = 0.0f;
bool V_3 = false;
{
int32_t L_0 = __this->get_m_bitLength_3();
int32_t L_1 = __this->get_m_readPosition_4();
NetException_Assert_m1067120882(NULL /*static, unused*/, (bool)((((int32_t)((((int32_t)((int32_t)((int32_t)L_0-(int32_t)L_1))) < ((int32_t)((int32_t)32)))? 1 : 0)) == ((int32_t)0))? 1 : 0), _stringLiteral611203703, /*hidden argument*/NULL);
int32_t L_2 = __this->get_m_readPosition_4();
V_3 = (bool)((((int32_t)((((int32_t)((int32_t)((int32_t)L_2&(int32_t)7))) == ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_3 = V_3;
if (L_3)
{
goto IL_005a;
}
}
{
ByteU5BU5D_t3397334013* L_4 = __this->get_m_data_2();
int32_t L_5 = __this->get_m_readPosition_4();
IL2CPP_RUNTIME_CLASS_INIT(BitConverter_t3195628829_il2cpp_TypeInfo_var);
float L_6 = BitConverter_ToSingle_m159411893(NULL /*static, unused*/, L_4, ((int32_t)((int32_t)L_5>>(int32_t)3)), /*hidden argument*/NULL);
V_0 = L_6;
int32_t L_7 = __this->get_m_readPosition_4();
__this->set_m_readPosition_4(((int32_t)((int32_t)L_7+(int32_t)((int32_t)32))));
float L_8 = V_0;
V_2 = L_8;
goto IL_006c;
}
IL_005a:
{
ByteU5BU5D_t3397334013* L_9 = NetBuffer_ReadBytes_m4004009464(__this, 4, /*hidden argument*/NULL);
V_1 = L_9;
ByteU5BU5D_t3397334013* L_10 = V_1;
IL2CPP_RUNTIME_CLASS_INIT(BitConverter_t3195628829_il2cpp_TypeInfo_var);
float L_11 = BitConverter_ToSingle_m159411893(NULL /*static, unused*/, L_10, 0, /*hidden argument*/NULL);
V_2 = L_11;
goto IL_006c;
}
IL_006c:
{
float L_12 = V_2;
return L_12;
}
}
// System.UInt32 Lidgren.Network.NetBuffer::ReadVariableUInt32()
extern "C" uint32_t NetBuffer_ReadVariableUInt32_m100620994 (NetBuffer_t3608062491 * __this, const MethodInfo* method)
{
int32_t V_0 = 0;
int32_t V_1 = 0;
uint8_t V_2 = 0x0;
uint32_t V_3 = 0;
bool V_4 = false;
{
V_0 = 0;
V_1 = 0;
goto IL_0037;
}
IL_0007:
{
uint8_t L_0 = NetBuffer_ReadByte_m3348400846(__this, /*hidden argument*/NULL);
V_2 = L_0;
int32_t L_1 = V_0;
uint8_t L_2 = V_2;
int32_t L_3 = V_1;
V_0 = ((int32_t)((int32_t)L_1|(int32_t)((int32_t)((int32_t)((int32_t)((int32_t)L_2&(int32_t)((int32_t)127)))<<(int32_t)((int32_t)((int32_t)L_3&(int32_t)((int32_t)31)))))));
int32_t L_4 = V_1;
V_1 = ((int32_t)((int32_t)L_4+(int32_t)7));
uint8_t L_5 = V_2;
V_4 = (bool)((((int32_t)((((int32_t)((int32_t)((int32_t)L_5&(int32_t)((int32_t)128)))) == ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_6 = V_4;
if (L_6)
{
goto IL_0036;
}
}
{
int32_t L_7 = V_0;
V_3 = L_7;
goto IL_0054;
}
IL_0036:
{
}
IL_0037:
{
int32_t L_8 = __this->get_m_bitLength_3();
int32_t L_9 = __this->get_m_readPosition_4();
V_4 = (bool)((((int32_t)((((int32_t)((int32_t)((int32_t)L_8-(int32_t)L_9))) < ((int32_t)8))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_10 = V_4;
if (L_10)
{
goto IL_0007;
}
}
{
int32_t L_11 = V_0;
V_3 = L_11;
goto IL_0054;
}
IL_0054:
{
uint32_t L_12 = V_3;
return L_12;
}
}
// System.String Lidgren.Network.NetBuffer::ReadString()
extern Il2CppClass* String_t_il2cpp_TypeInfo_var;
extern Il2CppClass* NetException_t2452891498_il2cpp_TypeInfo_var;
extern Il2CppClass* Encoding_t663144255_il2cpp_TypeInfo_var;
extern Il2CppCodeGenString* _stringLiteral611203703;
extern const uint32_t NetBuffer_ReadString_m1223210798_MetadataUsageId;
extern "C" String_t* NetBuffer_ReadString_m1223210798 (NetBuffer_t3608062491 * __this, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetBuffer_ReadString_m1223210798_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
int32_t V_0 = 0;
String_t* V_1 = NULL;
ByteU5BU5D_t3397334013* V_2 = NULL;
String_t* V_3 = NULL;
bool V_4 = false;
{
uint32_t L_0 = NetBuffer_ReadVariableUInt32_m100620994(__this, /*hidden argument*/NULL);
V_0 = L_0;
int32_t L_1 = V_0;
V_4 = (bool)((((int32_t)L_1) > ((int32_t)0))? 1 : 0);
bool L_2 = V_4;
if (L_2)
{
goto IL_001d;
}
}
{
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_3 = ((String_t_StaticFields*)String_t_il2cpp_TypeInfo_var->static_fields)->get_Empty_2();
V_3 = L_3;
goto IL_00a4;
}
IL_001d:
{
int32_t L_4 = __this->get_m_bitLength_3();
int32_t L_5 = __this->get_m_readPosition_4();
int32_t L_6 = V_0;
V_4 = (bool)((((int32_t)((!(((uint64_t)(((int64_t)((int64_t)((int32_t)((int32_t)L_4-(int32_t)L_5)))))) >= ((uint64_t)((int64_t)((int64_t)(((int64_t)((int64_t)L_6)))*(int64_t)(((int64_t)((int64_t)8))))))))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_7 = V_4;
if (L_7)
{
goto IL_0047;
}
}
{
NetException_t2452891498 * L_8 = (NetException_t2452891498 *)il2cpp_codegen_object_new(NetException_t2452891498_il2cpp_TypeInfo_var);
NetException__ctor_m2724322251(L_8, _stringLiteral611203703, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_8);
}
IL_0047:
{
int32_t L_9 = __this->get_m_readPosition_4();
V_4 = (bool)((((int32_t)((((int32_t)((int32_t)((int32_t)L_9&(int32_t)7))) == ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_10 = V_4;
if (L_10)
{
goto IL_008a;
}
}
{
IL2CPP_RUNTIME_CLASS_INIT(Encoding_t663144255_il2cpp_TypeInfo_var);
Encoding_t663144255 * L_11 = Encoding_get_UTF8_m1752852937(NULL /*static, unused*/, /*hidden argument*/NULL);
ByteU5BU5D_t3397334013* L_12 = __this->get_m_data_2();
int32_t L_13 = __this->get_m_readPosition_4();
int32_t L_14 = V_0;
NullCheck(L_11);
String_t* L_15 = VirtFuncInvoker3< String_t*, ByteU5BU5D_t3397334013*, int32_t, int32_t >::Invoke(21 /* System.String System.Text.Encoding::GetString(System.Byte[],System.Int32,System.Int32) */, L_11, L_12, ((int32_t)((int32_t)L_13>>(int32_t)3)), L_14);
V_1 = L_15;
int32_t L_16 = __this->get_m_readPosition_4();
int32_t L_17 = V_0;
__this->set_m_readPosition_4(((int32_t)((int32_t)L_16+(int32_t)((int32_t)((int32_t)8*(int32_t)L_17)))));
String_t* L_18 = V_1;
V_3 = L_18;
goto IL_00a4;
}
IL_008a:
{
int32_t L_19 = V_0;
ByteU5BU5D_t3397334013* L_20 = NetBuffer_ReadBytes_m4004009464(__this, L_19, /*hidden argument*/NULL);
V_2 = L_20;
IL2CPP_RUNTIME_CLASS_INIT(Encoding_t663144255_il2cpp_TypeInfo_var);
Encoding_t663144255 * L_21 = Encoding_get_UTF8_m1752852937(NULL /*static, unused*/, /*hidden argument*/NULL);
ByteU5BU5D_t3397334013* L_22 = V_2;
ByteU5BU5D_t3397334013* L_23 = V_2;
NullCheck(L_23);
NullCheck(L_21);
String_t* L_24 = VirtFuncInvoker3< String_t*, ByteU5BU5D_t3397334013*, int32_t, int32_t >::Invoke(21 /* System.String System.Text.Encoding::GetString(System.Byte[],System.Int32,System.Int32) */, L_21, L_22, 0, (((int32_t)((int32_t)(((Il2CppArray *)L_23)->max_length)))));
V_3 = L_24;
goto IL_00a4;
}
IL_00a4:
{
String_t* L_25 = V_3;
return L_25;
}
}
// System.Net.IPEndPoint Lidgren.Network.NetBuffer::ReadIPEndPoint()
extern Il2CppClass* NetUtility_t3562260209_il2cpp_TypeInfo_var;
extern Il2CppClass* IPEndPoint_t2615413766_il2cpp_TypeInfo_var;
extern const uint32_t NetBuffer_ReadIPEndPoint_m430505649_MetadataUsageId;
extern "C" IPEndPoint_t2615413766 * NetBuffer_ReadIPEndPoint_m430505649 (NetBuffer_t3608062491 * __this, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetBuffer_ReadIPEndPoint_m430505649_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
uint8_t V_0 = 0x0;
ByteU5BU5D_t3397334013* V_1 = NULL;
int32_t V_2 = 0;
IPAddress_t1399971723 * V_3 = NULL;
IPEndPoint_t2615413766 * V_4 = NULL;
{
uint8_t L_0 = NetBuffer_ReadByte_m3348400846(__this, /*hidden argument*/NULL);
V_0 = L_0;
uint8_t L_1 = V_0;
ByteU5BU5D_t3397334013* L_2 = NetBuffer_ReadBytes_m4004009464(__this, L_1, /*hidden argument*/NULL);
V_1 = L_2;
uint16_t L_3 = NetBuffer_ReadUInt16_m907876270(__this, /*hidden argument*/NULL);
V_2 = L_3;
ByteU5BU5D_t3397334013* L_4 = V_1;
IL2CPP_RUNTIME_CLASS_INIT(NetUtility_t3562260209_il2cpp_TypeInfo_var);
IPAddress_t1399971723 * L_5 = NetUtility_CreateAddressFromBytes_m1989273768(NULL /*static, unused*/, L_4, /*hidden argument*/NULL);
V_3 = L_5;
IPAddress_t1399971723 * L_6 = V_3;
int32_t L_7 = V_2;
IPEndPoint_t2615413766 * L_8 = (IPEndPoint_t2615413766 *)il2cpp_codegen_object_new(IPEndPoint_t2615413766_il2cpp_TypeInfo_var);
IPEndPoint__ctor_m3477723888(L_8, L_6, L_7, /*hidden argument*/NULL);
V_4 = L_8;
goto IL_0029;
}
IL_0029:
{
IPEndPoint_t2615413766 * L_9 = V_4;
return L_9;
}
}
// System.Void Lidgren.Network.NetBuffer::EnsureBufferSize(System.Int32)
extern Il2CppClass* ByteU5BU5D_t3397334013_il2cpp_TypeInfo_var;
extern const MethodInfo* Array_Resize_TisByte_t3683104436_m3136363656_MethodInfo_var;
extern const uint32_t NetBuffer_EnsureBufferSize_m2910474188_MetadataUsageId;
extern "C" void NetBuffer_EnsureBufferSize_m2910474188 (NetBuffer_t3608062491 * __this, int32_t ___numberOfBits0, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetBuffer_EnsureBufferSize_m2910474188_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
int32_t V_0 = 0;
bool V_1 = false;
{
int32_t L_0 = ___numberOfBits0;
V_0 = ((int32_t)((int32_t)((int32_t)((int32_t)L_0+(int32_t)7))>>(int32_t)3));
ByteU5BU5D_t3397334013* L_1 = __this->get_m_data_2();
V_1 = (bool)((((int32_t)((((Il2CppObject*)(ByteU5BU5D_t3397334013*)L_1) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_2 = V_1;
if (L_2)
{
goto IL_0028;
}
}
{
int32_t L_3 = V_0;
__this->set_m_data_2(((ByteU5BU5D_t3397334013*)SZArrayNew(ByteU5BU5D_t3397334013_il2cpp_TypeInfo_var, (uint32_t)((int32_t)((int32_t)L_3+(int32_t)4)))));
goto IL_004b;
}
IL_0028:
{
ByteU5BU5D_t3397334013* L_4 = __this->get_m_data_2();
NullCheck(L_4);
int32_t L_5 = V_0;
V_1 = (bool)((((int32_t)((((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_4)->max_length))))) < ((int32_t)L_5))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_6 = V_1;
if (L_6)
{
goto IL_0049;
}
}
{
ByteU5BU5D_t3397334013** L_7 = __this->get_address_of_m_data_2();
int32_t L_8 = V_0;
Array_Resize_TisByte_t3683104436_m3136363656(NULL /*static, unused*/, L_7, ((int32_t)((int32_t)L_8+(int32_t)4)), /*hidden argument*/Array_Resize_TisByte_t3683104436_m3136363656_MethodInfo_var);
}
IL_0049:
{
goto IL_004b;
}
IL_004b:
{
return;
}
}
// System.Void Lidgren.Network.NetBuffer::InternalEnsureBufferSize(System.Int32)
extern Il2CppClass* ByteU5BU5D_t3397334013_il2cpp_TypeInfo_var;
extern const MethodInfo* Array_Resize_TisByte_t3683104436_m3136363656_MethodInfo_var;
extern const uint32_t NetBuffer_InternalEnsureBufferSize_m2673967747_MetadataUsageId;
extern "C" void NetBuffer_InternalEnsureBufferSize_m2673967747 (NetBuffer_t3608062491 * __this, int32_t ___numberOfBits0, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetBuffer_InternalEnsureBufferSize_m2673967747_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
int32_t V_0 = 0;
bool V_1 = false;
{
int32_t L_0 = ___numberOfBits0;
V_0 = ((int32_t)((int32_t)((int32_t)((int32_t)L_0+(int32_t)7))>>(int32_t)3));
ByteU5BU5D_t3397334013* L_1 = __this->get_m_data_2();
V_1 = (bool)((((int32_t)((((Il2CppObject*)(ByteU5BU5D_t3397334013*)L_1) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_2 = V_1;
if (L_2)
{
goto IL_0026;
}
}
{
int32_t L_3 = V_0;
__this->set_m_data_2(((ByteU5BU5D_t3397334013*)SZArrayNew(ByteU5BU5D_t3397334013_il2cpp_TypeInfo_var, (uint32_t)L_3)));
goto IL_0047;
}
IL_0026:
{
ByteU5BU5D_t3397334013* L_4 = __this->get_m_data_2();
NullCheck(L_4);
int32_t L_5 = V_0;
V_1 = (bool)((((int32_t)((((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_4)->max_length))))) < ((int32_t)L_5))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_6 = V_1;
if (L_6)
{
goto IL_0045;
}
}
{
ByteU5BU5D_t3397334013** L_7 = __this->get_address_of_m_data_2();
int32_t L_8 = V_0;
Array_Resize_TisByte_t3683104436_m3136363656(NULL /*static, unused*/, L_7, L_8, /*hidden argument*/Array_Resize_TisByte_t3683104436_m3136363656_MethodInfo_var);
}
IL_0045:
{
goto IL_0047;
}
IL_0047:
{
return;
}
}
// System.Void Lidgren.Network.NetBuffer::Write(System.Byte)
extern "C" void NetBuffer_Write_m4142810212 (NetBuffer_t3608062491 * __this, uint8_t ___source0, const MethodInfo* method)
{
{
int32_t L_0 = __this->get_m_bitLength_3();
NetBuffer_EnsureBufferSize_m2910474188(__this, ((int32_t)((int32_t)L_0+(int32_t)8)), /*hidden argument*/NULL);
uint8_t L_1 = ___source0;
ByteU5BU5D_t3397334013* L_2 = __this->get_m_data_2();
int32_t L_3 = __this->get_m_bitLength_3();
NetBitWriter_WriteByte_m1348088823(NULL /*static, unused*/, L_1, 8, L_2, L_3, /*hidden argument*/NULL);
int32_t L_4 = __this->get_m_bitLength_3();
__this->set_m_bitLength_3(((int32_t)((int32_t)L_4+(int32_t)8)));
return;
}
}
// System.Void Lidgren.Network.NetBuffer::Write(System.Byte[])
extern Il2CppClass* ArgumentNullException_t628810857_il2cpp_TypeInfo_var;
extern Il2CppCodeGenString* _stringLiteral4211174801;
extern const uint32_t NetBuffer_Write_m3595600516_MetadataUsageId;
extern "C" void NetBuffer_Write_m3595600516 (NetBuffer_t3608062491 * __this, ByteU5BU5D_t3397334013* ___source0, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetBuffer_Write_m3595600516_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
int32_t V_0 = 0;
bool V_1 = false;
{
ByteU5BU5D_t3397334013* L_0 = ___source0;
V_1 = (bool)((((int32_t)((((Il2CppObject*)(ByteU5BU5D_t3397334013*)L_0) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_1 = V_1;
if (L_1)
{
goto IL_0017;
}
}
{
ArgumentNullException_t628810857 * L_2 = (ArgumentNullException_t628810857 *)il2cpp_codegen_object_new(ArgumentNullException_t628810857_il2cpp_TypeInfo_var);
ArgumentNullException__ctor_m3380712306(L_2, _stringLiteral4211174801, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_2);
}
IL_0017:
{
ByteU5BU5D_t3397334013* L_3 = ___source0;
NullCheck(L_3);
V_0 = ((int32_t)((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_3)->max_length))))*(int32_t)8));
int32_t L_4 = __this->get_m_bitLength_3();
int32_t L_5 = V_0;
NetBuffer_EnsureBufferSize_m2910474188(__this, ((int32_t)((int32_t)L_4+(int32_t)L_5)), /*hidden argument*/NULL);
ByteU5BU5D_t3397334013* L_6 = ___source0;
ByteU5BU5D_t3397334013* L_7 = ___source0;
NullCheck(L_7);
ByteU5BU5D_t3397334013* L_8 = __this->get_m_data_2();
int32_t L_9 = __this->get_m_bitLength_3();
NetBitWriter_WriteBytes_m3262891483(NULL /*static, unused*/, L_6, 0, (((int32_t)((int32_t)(((Il2CppArray *)L_7)->max_length)))), L_8, L_9, /*hidden argument*/NULL);
int32_t L_10 = __this->get_m_bitLength_3();
int32_t L_11 = V_0;
__this->set_m_bitLength_3(((int32_t)((int32_t)L_10+(int32_t)L_11)));
return;
}
}
// System.Void Lidgren.Network.NetBuffer::Write(System.Byte[],System.Int32,System.Int32)
extern Il2CppClass* ArgumentNullException_t628810857_il2cpp_TypeInfo_var;
extern Il2CppCodeGenString* _stringLiteral4211174801;
extern const uint32_t NetBuffer_Write_m3872681458_MetadataUsageId;
extern "C" void NetBuffer_Write_m3872681458 (NetBuffer_t3608062491 * __this, ByteU5BU5D_t3397334013* ___source0, int32_t ___offsetInBytes1, int32_t ___numberOfBytes2, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetBuffer_Write_m3872681458_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
int32_t V_0 = 0;
bool V_1 = false;
{
ByteU5BU5D_t3397334013* L_0 = ___source0;
V_1 = (bool)((((int32_t)((((Il2CppObject*)(ByteU5BU5D_t3397334013*)L_0) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_1 = V_1;
if (L_1)
{
goto IL_0017;
}
}
{
ArgumentNullException_t628810857 * L_2 = (ArgumentNullException_t628810857 *)il2cpp_codegen_object_new(ArgumentNullException_t628810857_il2cpp_TypeInfo_var);
ArgumentNullException__ctor_m3380712306(L_2, _stringLiteral4211174801, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_2);
}
IL_0017:
{
int32_t L_3 = ___numberOfBytes2;
V_0 = ((int32_t)((int32_t)L_3*(int32_t)8));
int32_t L_4 = __this->get_m_bitLength_3();
int32_t L_5 = V_0;
NetBuffer_EnsureBufferSize_m2910474188(__this, ((int32_t)((int32_t)L_4+(int32_t)L_5)), /*hidden argument*/NULL);
ByteU5BU5D_t3397334013* L_6 = ___source0;
int32_t L_7 = ___offsetInBytes1;
int32_t L_8 = ___numberOfBytes2;
ByteU5BU5D_t3397334013* L_9 = __this->get_m_data_2();
int32_t L_10 = __this->get_m_bitLength_3();
NetBitWriter_WriteBytes_m3262891483(NULL /*static, unused*/, L_6, L_7, L_8, L_9, L_10, /*hidden argument*/NULL);
int32_t L_11 = __this->get_m_bitLength_3();
int32_t L_12 = V_0;
__this->set_m_bitLength_3(((int32_t)((int32_t)L_11+(int32_t)L_12)));
return;
}
}
// System.Void Lidgren.Network.NetBuffer::Write(System.Int32)
extern "C" void NetBuffer_Write_m3675152492 (NetBuffer_t3608062491 * __this, int32_t ___source0, const MethodInfo* method)
{
{
int32_t L_0 = __this->get_m_bitLength_3();
NetBuffer_EnsureBufferSize_m2910474188(__this, ((int32_t)((int32_t)L_0+(int32_t)((int32_t)32))), /*hidden argument*/NULL);
int32_t L_1 = ___source0;
ByteU5BU5D_t3397334013* L_2 = __this->get_m_data_2();
int32_t L_3 = __this->get_m_bitLength_3();
NetBitWriter_WriteUInt32_m1361372613(NULL /*static, unused*/, L_1, ((int32_t)32), L_2, L_3, /*hidden argument*/NULL);
int32_t L_4 = __this->get_m_bitLength_3();
__this->set_m_bitLength_3(((int32_t)((int32_t)L_4+(int32_t)((int32_t)32))));
return;
}
}
// System.Void Lidgren.Network.NetBuffer::Write(System.UInt32)
extern "C" void NetBuffer_Write_m2917047851 (NetBuffer_t3608062491 * __this, uint32_t ___source0, const MethodInfo* method)
{
{
int32_t L_0 = __this->get_m_bitLength_3();
NetBuffer_EnsureBufferSize_m2910474188(__this, ((int32_t)((int32_t)L_0+(int32_t)((int32_t)32))), /*hidden argument*/NULL);
uint32_t L_1 = ___source0;
ByteU5BU5D_t3397334013* L_2 = __this->get_m_data_2();
int32_t L_3 = __this->get_m_bitLength_3();
NetBitWriter_WriteUInt32_m1361372613(NULL /*static, unused*/, L_1, ((int32_t)32), L_2, L_3, /*hidden argument*/NULL);
int32_t L_4 = __this->get_m_bitLength_3();
__this->set_m_bitLength_3(((int32_t)((int32_t)L_4+(int32_t)((int32_t)32))));
return;
}
}
// System.Void Lidgren.Network.NetBuffer::Write(System.Int64)
extern "C" void NetBuffer_Write_m4098639993 (NetBuffer_t3608062491 * __this, int64_t ___source0, const MethodInfo* method)
{
uint64_t V_0 = 0;
{
int32_t L_0 = __this->get_m_bitLength_3();
NetBuffer_EnsureBufferSize_m2910474188(__this, ((int32_t)((int32_t)L_0+(int32_t)((int32_t)64))), /*hidden argument*/NULL);
int64_t L_1 = ___source0;
V_0 = L_1;
uint64_t L_2 = V_0;
ByteU5BU5D_t3397334013* L_3 = __this->get_m_data_2();
int32_t L_4 = __this->get_m_bitLength_3();
NetBitWriter_WriteUInt64_m3878476069(NULL /*static, unused*/, L_2, ((int32_t)64), L_3, L_4, /*hidden argument*/NULL);
int32_t L_5 = __this->get_m_bitLength_3();
__this->set_m_bitLength_3(((int32_t)((int32_t)L_5+(int32_t)((int32_t)64))));
return;
}
}
// System.Void Lidgren.Network.NetBuffer::Write(System.Single)
extern "C" void NetBuffer_Write_m2191092918 (NetBuffer_t3608062491 * __this, float ___source0, const MethodInfo* method)
{
SingleUIntUnion_t3787661257 V_0;
memset(&V_0, 0, sizeof(V_0));
{
(&V_0)->set_UIntValue_1(0);
float L_0 = ___source0;
(&V_0)->set_SingleValue_0(L_0);
uint32_t L_1 = (&V_0)->get_UIntValue_1();
NetBuffer_Write_m2917047851(__this, L_1, /*hidden argument*/NULL);
return;
}
}
// System.Int32 Lidgren.Network.NetBuffer::WriteVariableUInt32(System.UInt32)
extern "C" int32_t NetBuffer_WriteVariableUInt32_m1610554926 (NetBuffer_t3608062491 * __this, uint32_t ___value0, const MethodInfo* method)
{
int32_t V_0 = 0;
uint32_t V_1 = 0;
int32_t V_2 = 0;
bool V_3 = false;
{
V_0 = 1;
uint32_t L_0 = ___value0;
V_1 = L_0;
goto IL_0020;
}
IL_0007:
{
uint32_t L_1 = V_1;
NetBuffer_Write_m4142810212(__this, (((int32_t)((uint8_t)((int32_t)((int32_t)L_1|(int32_t)((int32_t)128)))))), /*hidden argument*/NULL);
uint32_t L_2 = V_1;
V_1 = ((int32_t)((uint32_t)L_2>>7));
int32_t L_3 = V_0;
V_0 = ((int32_t)((int32_t)L_3+(int32_t)1));
}
IL_0020:
{
uint32_t L_4 = V_1;
V_3 = (bool)((((int32_t)((!(((uint32_t)L_4) >= ((uint32_t)((int32_t)128))))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_5 = V_3;
if (L_5)
{
goto IL_0007;
}
}
{
uint32_t L_6 = V_1;
NetBuffer_Write_m4142810212(__this, (((int32_t)((uint8_t)L_6))), /*hidden argument*/NULL);
int32_t L_7 = V_0;
V_2 = L_7;
goto IL_003c;
}
IL_003c:
{
int32_t L_8 = V_2;
return L_8;
}
}
// System.Void Lidgren.Network.NetBuffer::Write(System.String)
extern Il2CppClass* String_t_il2cpp_TypeInfo_var;
extern Il2CppClass* Encoding_t663144255_il2cpp_TypeInfo_var;
extern const uint32_t NetBuffer_Write_m962556565_MetadataUsageId;
extern "C" void NetBuffer_Write_m962556565 (NetBuffer_t3608062491 * __this, String_t* ___source0, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetBuffer_Write_m962556565_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
ByteU5BU5D_t3397334013* V_0 = NULL;
bool V_1 = false;
{
String_t* L_0 = ___source0;
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
bool L_1 = String_IsNullOrEmpty_m2802126737(NULL /*static, unused*/, L_0, /*hidden argument*/NULL);
V_1 = (bool)((((int32_t)L_1) == ((int32_t)0))? 1 : 0);
bool L_2 = V_1;
if (L_2)
{
goto IL_0019;
}
}
{
NetBuffer_WriteVariableUInt32_m1610554926(__this, 0, /*hidden argument*/NULL);
goto IL_004c;
}
IL_0019:
{
IL2CPP_RUNTIME_CLASS_INIT(Encoding_t663144255_il2cpp_TypeInfo_var);
Encoding_t663144255 * L_3 = Encoding_get_UTF8_m1752852937(NULL /*static, unused*/, /*hidden argument*/NULL);
String_t* L_4 = ___source0;
NullCheck(L_3);
ByteU5BU5D_t3397334013* L_5 = VirtFuncInvoker1< ByteU5BU5D_t3397334013*, String_t* >::Invoke(10 /* System.Byte[] System.Text.Encoding::GetBytes(System.String) */, L_3, L_4);
V_0 = L_5;
int32_t L_6 = __this->get_m_bitLength_3();
ByteU5BU5D_t3397334013* L_7 = V_0;
NullCheck(L_7);
NetBuffer_EnsureBufferSize_m2910474188(__this, ((int32_t)((int32_t)((int32_t)((int32_t)L_6+(int32_t)8))+(int32_t)((int32_t)((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_7)->max_length))))*(int32_t)8)))), /*hidden argument*/NULL);
ByteU5BU5D_t3397334013* L_8 = V_0;
NullCheck(L_8);
NetBuffer_WriteVariableUInt32_m1610554926(__this, (((int32_t)((int32_t)(((Il2CppArray *)L_8)->max_length)))), /*hidden argument*/NULL);
ByteU5BU5D_t3397334013* L_9 = V_0;
NetBuffer_Write_m3595600516(__this, L_9, /*hidden argument*/NULL);
}
IL_004c:
{
return;
}
}
// System.Void Lidgren.Network.NetBuffer::.ctor()
extern "C" void NetBuffer__ctor_m3780783062 (NetBuffer_t3608062491 * __this, const MethodInfo* method)
{
{
Object__ctor_m2551263788(__this, /*hidden argument*/NULL);
return;
}
}
// Lidgren.Network.NetConnection Lidgren.Network.NetClient::get_ServerConnection()
extern Il2CppClass* Il2CppObject_il2cpp_TypeInfo_var;
extern const MethodInfo* List_1_get_Count_m1394854046_MethodInfo_var;
extern const MethodInfo* List_1_get_Item_m1684201913_MethodInfo_var;
extern const uint32_t NetClient_get_ServerConnection_m1176301950_MetadataUsageId;
extern "C" NetConnection_t3331492029 * NetClient_get_ServerConnection_m1176301950 (NetClient_t1212131464 * __this, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetClient_get_ServerConnection_m1176301950_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
NetConnection_t3331492029 * V_0 = NULL;
NetConnection_t3331492029 * V_1 = NULL;
bool V_2 = false;
Exception_t1927440687 * __last_unhandled_exception = 0;
NO_UNUSED_WARNING (__last_unhandled_exception);
Exception_t1927440687 * __exception_local = 0;
NO_UNUSED_WARNING (__exception_local);
int32_t __leave_target = 0;
NO_UNUSED_WARNING (__leave_target);
{
V_0 = (NetConnection_t3331492029 *)NULL;
List_1_t2700613161 * L_0 = ((NetPeer_t1779390221 *)__this)->get_m_connections_3();
NullCheck(L_0);
int32_t L_1 = List_1_get_Count_m1394854046(L_0, /*hidden argument*/List_1_get_Count_m1394854046_MethodInfo_var);
V_2 = (bool)((((int32_t)((((int32_t)L_1) > ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_2 = V_2;
if (L_2)
{
goto IL_0032;
}
}
{
}
IL_0019:
try
{ // begin try (depth: 1)
List_1_t2700613161 * L_3 = ((NetPeer_t1779390221 *)__this)->get_m_connections_3();
NullCheck(L_3);
NetConnection_t3331492029 * L_4 = List_1_get_Item_m1684201913(L_3, 0, /*hidden argument*/List_1_get_Item_m1684201913_MethodInfo_var);
V_0 = L_4;
goto IL_0030;
} // end try (depth: 1)
catch(Il2CppExceptionWrapper& e)
{
__exception_local = (Exception_t1927440687 *)e.ex;
if(il2cpp_codegen_class_is_assignable_from (Il2CppObject_il2cpp_TypeInfo_var, e.ex->object.klass))
goto CATCH_002a;
throw e;
}
CATCH_002a:
{ // begin catch(System.Object)
V_1 = (NetConnection_t3331492029 *)NULL;
goto IL_0036;
} // end catch (depth: 1)
IL_0030:
{
}
IL_0032:
{
NetConnection_t3331492029 * L_5 = V_0;
V_1 = L_5;
goto IL_0036;
}
IL_0036:
{
NetConnection_t3331492029 * L_6 = V_1;
return L_6;
}
}
// System.Void Lidgren.Network.NetClient::.ctor(Lidgren.Network.NetPeerConfiguration)
extern "C" void NetClient__ctor_m488755095 (NetClient_t1212131464 * __this, NetPeerConfiguration_t136603591 * ___config0, const MethodInfo* method)
{
{
NetPeerConfiguration_t136603591 * L_0 = ___config0;
NetPeer__ctor_m1244084668(__this, L_0, /*hidden argument*/NULL);
NetPeerConfiguration_t136603591 * L_1 = ___config0;
NullCheck(L_1);
NetPeerConfiguration_set_AcceptIncomingConnections_m1397507705(L_1, (bool)0, /*hidden argument*/NULL);
return;
}
}
// Lidgren.Network.NetConnection Lidgren.Network.NetClient::Connect(System.Net.IPEndPoint,Lidgren.Network.NetOutgoingMessage)
extern const MethodInfo* List_1_get_Count_m1394854046_MethodInfo_var;
extern const MethodInfo* Dictionary_2_get_Count_m3270350375_MethodInfo_var;
extern Il2CppCodeGenString* _stringLiteral3227040912;
extern Il2CppCodeGenString* _stringLiteral2586083448;
extern const uint32_t NetClient_Connect_m901032661_MetadataUsageId;
extern "C" NetConnection_t3331492029 * NetClient_Connect_m901032661 (NetClient_t1212131464 * __this, IPEndPoint_t2615413766 * ___remoteEndPoint0, NetOutgoingMessage_t2016542980 * ___hailMessage1, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetClient_Connect_m901032661_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
NetConnection_t3331492029 * V_0 = NULL;
List_1_t2700613161 * V_1 = NULL;
bool V_2 = false;
Dictionary_2_t3898409514 * V_3 = NULL;
Exception_t1927440687 * __last_unhandled_exception = 0;
NO_UNUSED_WARNING (__last_unhandled_exception);
Exception_t1927440687 * __exception_local = 0;
NO_UNUSED_WARNING (__exception_local);
int32_t __leave_target = 0;
NO_UNUSED_WARNING (__leave_target);
{
List_1_t2700613161 * L_0 = ((NetPeer_t1779390221 *)__this)->get_m_connections_3();
List_1_t2700613161 * L_1 = L_0;
V_1 = L_1;
Monitor_Enter_m2136705809(NULL /*static, unused*/, L_1, /*hidden argument*/NULL);
}
IL_000f:
try
{ // begin try (depth: 1)
{
List_1_t2700613161 * L_2 = ((NetPeer_t1779390221 *)__this)->get_m_connections_3();
NullCheck(L_2);
int32_t L_3 = List_1_get_Count_m1394854046(L_2, /*hidden argument*/List_1_get_Count_m1394854046_MethodInfo_var);
V_2 = (bool)((((int32_t)((((int32_t)L_3) > ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_4 = V_2;
if (L_4)
{
goto IL_0036;
}
}
IL_0025:
{
NetPeer_LogWarning_m3266657906(__this, _stringLiteral3227040912, /*hidden argument*/NULL);
V_0 = (NetConnection_t3331492029 *)NULL;
IL2CPP_LEAVE(0x8E, FINALLY_0039);
}
IL_0036:
{
IL2CPP_LEAVE(0x41, FINALLY_0039);
}
} // end try (depth: 1)
catch(Il2CppExceptionWrapper& e)
{
__last_unhandled_exception = (Exception_t1927440687 *)e.ex;
goto FINALLY_0039;
}
FINALLY_0039:
{ // begin finally (depth: 1)
List_1_t2700613161 * L_5 = V_1;
Monitor_Exit_m2677760297(NULL /*static, unused*/, L_5, /*hidden argument*/NULL);
IL2CPP_END_FINALLY(57)
} // end finally (depth: 1)
IL2CPP_CLEANUP(57)
{
IL2CPP_JUMP_TBL(0x8E, IL_008e)
IL2CPP_JUMP_TBL(0x41, IL_0041)
IL2CPP_RETHROW_IF_UNHANDLED(Exception_t1927440687 *)
}
IL_0041:
{
Dictionary_2_t3898409514 * L_6 = ((NetPeer_t1779390221 *)__this)->get_m_handshakes_24();
Dictionary_2_t3898409514 * L_7 = L_6;
V_3 = L_7;
Monitor_Enter_m2136705809(NULL /*static, unused*/, L_7, /*hidden argument*/NULL);
}
IL_0050:
try
{ // begin try (depth: 1)
{
Dictionary_2_t3898409514 * L_8 = ((NetPeer_t1779390221 *)__this)->get_m_handshakes_24();
NullCheck(L_8);
int32_t L_9 = Dictionary_2_get_Count_m3270350375(L_8, /*hidden argument*/Dictionary_2_get_Count_m3270350375_MethodInfo_var);
V_2 = (bool)((((int32_t)((((int32_t)L_9) > ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_10 = V_2;
if (L_10)
{
goto IL_0077;
}
}
IL_0066:
{
NetPeer_LogWarning_m3266657906(__this, _stringLiteral2586083448, /*hidden argument*/NULL);
V_0 = (NetConnection_t3331492029 *)NULL;
IL2CPP_LEAVE(0x8E, FINALLY_007a);
}
IL_0077:
{
IL2CPP_LEAVE(0x82, FINALLY_007a);
}
} // end try (depth: 1)
catch(Il2CppExceptionWrapper& e)
{
__last_unhandled_exception = (Exception_t1927440687 *)e.ex;
goto FINALLY_007a;
}
FINALLY_007a:
{ // begin finally (depth: 1)
Dictionary_2_t3898409514 * L_11 = V_3;
Monitor_Exit_m2677760297(NULL /*static, unused*/, L_11, /*hidden argument*/NULL);
IL2CPP_END_FINALLY(122)
} // end finally (depth: 1)
IL2CPP_CLEANUP(122)
{
IL2CPP_JUMP_TBL(0x8E, IL_008e)
IL2CPP_JUMP_TBL(0x82, IL_0082)
IL2CPP_RETHROW_IF_UNHANDLED(Exception_t1927440687 *)
}
IL_0082:
{
IPEndPoint_t2615413766 * L_12 = ___remoteEndPoint0;
NetOutgoingMessage_t2016542980 * L_13 = ___hailMessage1;
NetConnection_t3331492029 * L_14 = NetPeer_Connect_m539482134(__this, L_12, L_13, /*hidden argument*/NULL);
V_0 = L_14;
goto IL_008e;
}
IL_008e:
{
NetConnection_t3331492029 * L_15 = V_0;
return L_15;
}
}
// Lidgren.Network.NetSendResult Lidgren.Network.NetClient::SendMessage(Lidgren.Network.NetOutgoingMessage,Lidgren.Network.NetDeliveryMethod)
extern Il2CppCodeGenString* _stringLiteral2575739905;
extern const uint32_t NetClient_SendMessage_m1500161650_MetadataUsageId;
extern "C" int32_t NetClient_SendMessage_m1500161650 (NetClient_t1212131464 * __this, NetOutgoingMessage_t2016542980 * ___msg0, uint8_t ___method1, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetClient_SendMessage_m1500161650_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
NetConnection_t3331492029 * V_0 = NULL;
int32_t V_1 = 0;
bool V_2 = false;
{
NetConnection_t3331492029 * L_0 = NetClient_get_ServerConnection_m1176301950(__this, /*hidden argument*/NULL);
V_0 = L_0;
NetConnection_t3331492029 * L_1 = V_0;
V_2 = (bool)((((int32_t)((((Il2CppObject*)(NetConnection_t3331492029 *)L_1) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_2 = V_2;
if (L_2)
{
goto IL_0024;
}
}
{
NetPeer_LogWarning_m3266657906(__this, _stringLiteral2575739905, /*hidden argument*/NULL);
V_1 = 0;
goto IL_0030;
}
IL_0024:
{
NetConnection_t3331492029 * L_3 = V_0;
NetOutgoingMessage_t2016542980 * L_4 = ___msg0;
uint8_t L_5 = ___method1;
NullCheck(L_3);
int32_t L_6 = NetConnection_SendMessage_m179193270(L_3, L_4, L_5, 0, /*hidden argument*/NULL);
V_1 = L_6;
goto IL_0030;
}
IL_0030:
{
int32_t L_7 = V_1;
return L_7;
}
}
// System.String Lidgren.Network.NetClient::ToString()
extern Il2CppClass* String_t_il2cpp_TypeInfo_var;
extern Il2CppCodeGenString* _stringLiteral388383977;
extern Il2CppCodeGenString* _stringLiteral372029425;
extern const uint32_t NetClient_ToString_m3242266770_MetadataUsageId;
extern "C" String_t* NetClient_ToString_m3242266770 (NetClient_t1212131464 * __this, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetClient_ToString_m3242266770_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
String_t* V_0 = NULL;
{
NetConnection_t3331492029 * L_0 = NetClient_get_ServerConnection_m1176301950(__this, /*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_1 = String_Concat_m2000667605(NULL /*static, unused*/, _stringLiteral388383977, L_0, _stringLiteral372029425, /*hidden argument*/NULL);
V_0 = L_1;
goto IL_0019;
}
IL_0019:
{
String_t* L_2 = V_0;
return L_2;
}
}
// Lidgren.Network.NetPeer Lidgren.Network.NetConnection::get_Peer()
extern "C" NetPeer_t1779390221 * NetConnection_get_Peer_m784846870 (NetConnection_t3331492029 * __this, const MethodInfo* method)
{
NetPeer_t1779390221 * V_0 = NULL;
{
NetPeer_t1779390221 * L_0 = __this->get_m_peer_0();
V_0 = L_0;
goto IL_000a;
}
IL_000a:
{
NetPeer_t1779390221 * L_1 = V_0;
return L_1;
}
}
// Lidgren.Network.NetConnectionStatus Lidgren.Network.NetConnection::get_Status()
extern "C" int32_t NetConnection_get_Status_m2998852826 (NetConnection_t3331492029 * __this, const MethodInfo* method)
{
int32_t V_0 = 0;
{
int32_t L_0 = __this->get_m_visibleStatus_4();
V_0 = L_0;
goto IL_000a;
}
IL_000a:
{
int32_t L_1 = V_0;
return L_1;
}
}
// System.Net.IPEndPoint Lidgren.Network.NetConnection::get_RemoteEndPoint()
extern "C" IPEndPoint_t2615413766 * NetConnection_get_RemoteEndPoint_m1562753089 (NetConnection_t3331492029 * __this, const MethodInfo* method)
{
IPEndPoint_t2615413766 * V_0 = NULL;
{
IPEndPoint_t2615413766 * L_0 = __this->get_m_remoteEndPoint_5();
V_0 = L_0;
goto IL_000a;
}
IL_000a:
{
IPEndPoint_t2615413766 * L_1 = V_0;
return L_1;
}
}
// System.Double Lidgren.Network.NetConnection::GetResendDelay()
extern "C" double NetConnection_GetResendDelay_m601539877 (NetConnection_t3331492029 * __this, const MethodInfo* method)
{
double V_0 = 0.0;
double V_1 = 0.0;
bool V_2 = false;
{
double L_0 = __this->get_m_averageRoundtripTime_25();
V_0 = L_0;
double L_1 = V_0;
V_2 = (bool)((!(((double)L_1) <= ((double)(0.0))))? 1 : 0);
bool L_2 = V_2;
if (L_2)
{
goto IL_0022;
}
}
{
V_0 = (0.1);
}
IL_0022:
{
double L_3 = V_0;
V_1 = ((double)((double)(0.025)+(double)((double)((double)L_3*(double)(2.1)))));
goto IL_003a;
}
IL_003a:
{
double L_4 = V_1;
return L_4;
}
}
// System.Void Lidgren.Network.NetConnection::.ctor(Lidgren.Network.NetPeer,System.Net.IPEndPoint)
extern Il2CppClass* NetSenderChannelBaseU5BU5D_t470374901_il2cpp_TypeInfo_var;
extern Il2CppClass* NetReceiverChannelBaseU5BU5D_t1250440839_il2cpp_TypeInfo_var;
extern Il2CppClass* NetQueue_1_t1156019562_il2cpp_TypeInfo_var;
extern Il2CppClass* NetConnectionStatistics_t1235765202_il2cpp_TypeInfo_var;
extern const MethodInfo* NetQueue_1__ctor_m2256563907_MethodInfo_var;
extern const uint32_t NetConnection__ctor_m695103806_MetadataUsageId;
extern "C" void NetConnection__ctor_m695103806 (NetConnection_t3331492029 * __this, NetPeer_t1779390221 * ___peer0, IPEndPoint_t2615413766 * ___remoteEndPoint1, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetConnection__ctor_m695103806_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
{
__this->set_m_timeoutDeadline_26((1.7976931348623157E+308));
Object__ctor_m2551263788(__this, /*hidden argument*/NULL);
NetPeer_t1779390221 * L_0 = ___peer0;
__this->set_m_peer_0(L_0);
NetPeer_t1779390221 * L_1 = __this->get_m_peer_0();
NullCheck(L_1);
NetPeerConfiguration_t136603591 * L_2 = NetPeer_get_Configuration_m323836264(L_1, /*hidden argument*/NULL);
__this->set_m_peerConfiguration_1(L_2);
__this->set_m_status_2(0);
__this->set_m_outputtedStatus_3(0);
__this->set_m_visibleStatus_4(0);
IPEndPoint_t2615413766 * L_3 = ___remoteEndPoint1;
__this->set_m_remoteEndPoint_5(L_3);
__this->set_m_sendChannels_6(((NetSenderChannelBaseU5BU5D_t470374901*)SZArrayNew(NetSenderChannelBaseU5BU5D_t470374901_il2cpp_TypeInfo_var, (uint32_t)((int32_t)99))));
__this->set_m_receiveChannels_7(((NetReceiverChannelBaseU5BU5D_t1250440839*)SZArrayNew(NetReceiverChannelBaseU5BU5D_t1250440839_il2cpp_TypeInfo_var, (uint32_t)((int32_t)99))));
NetQueue_1_t1156019562 * L_4 = (NetQueue_1_t1156019562 *)il2cpp_codegen_object_new(NetQueue_1_t1156019562_il2cpp_TypeInfo_var);
NetQueue_1__ctor_m2256563907(L_4, 4, /*hidden argument*/NetQueue_1__ctor_m2256563907_MethodInfo_var);
__this->set_m_queuedOutgoingAcks_10(L_4);
NetQueue_1_t1156019562 * L_5 = (NetQueue_1_t1156019562 *)il2cpp_codegen_object_new(NetQueue_1_t1156019562_il2cpp_TypeInfo_var);
NetQueue_1__ctor_m2256563907(L_5, 4, /*hidden argument*/NetQueue_1__ctor_m2256563907_MethodInfo_var);
__this->set_m_queuedIncomingAcks_11(L_5);
NetConnectionStatistics_t1235765202 * L_6 = (NetConnectionStatistics_t1235765202 *)il2cpp_codegen_object_new(NetConnectionStatistics_t1235765202_il2cpp_TypeInfo_var);
NetConnectionStatistics__ctor_m2288023573(L_6, __this, /*hidden argument*/NULL);
__this->set_m_statistics_14(L_6);
__this->set_m_averageRoundtripTime_25((-1.0));
NetPeerConfiguration_t136603591 * L_7 = __this->get_m_peerConfiguration_1();
NullCheck(L_7);
int32_t L_8 = NetPeerConfiguration_get_MaximumTransmissionUnit_m2375210687(L_7, /*hidden argument*/NULL);
__this->set_m_currentMTU_34(L_8);
return;
}
}
// System.Void Lidgren.Network.NetConnection::MutateEndPoint(System.Net.IPEndPoint)
extern "C" void NetConnection_MutateEndPoint_m3264432459 (NetConnection_t3331492029 * __this, IPEndPoint_t2615413766 * ___endPoint0, const MethodInfo* method)
{
{
IPEndPoint_t2615413766 * L_0 = ___endPoint0;
__this->set_m_remoteEndPoint_5(L_0);
return;
}
}
// System.Void Lidgren.Network.NetConnection::ResetTimeout(System.Double)
extern "C" void NetConnection_ResetTimeout_m3986183602 (NetConnection_t3331492029 * __this, double ___now0, const MethodInfo* method)
{
{
double L_0 = ___now0;
NetPeerConfiguration_t136603591 * L_1 = __this->get_m_peerConfiguration_1();
NullCheck(L_1);
float L_2 = L_1->get_m_connectionTimeout_11();
__this->set_m_timeoutDeadline_26(((double)((double)L_0+(double)(((double)((double)L_2))))));
return;
}
}
// System.Void Lidgren.Network.NetConnection::SetStatus(Lidgren.Network.NetConnectionStatus,System.String)
extern Il2CppClass* String_t_il2cpp_TypeInfo_var;
extern Il2CppClass* NetTime_t3056501352_il2cpp_TypeInfo_var;
extern Il2CppClass* Double_t4078015681_il2cpp_TypeInfo_var;
extern Il2CppCodeGenString* _stringLiteral2812317870;
extern const uint32_t NetConnection_SetStatus_m2040093136_MetadataUsageId;
extern "C" void NetConnection_SetStatus_m2040093136 (NetConnection_t3331492029 * __this, int32_t ___status0, String_t* ___reason1, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetConnection_SetStatus_m2040093136_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
NetIncomingMessage_t2014089816 * V_0 = NULL;
bool V_1 = false;
int32_t G_B8_0 = 0;
int32_t G_B8_1 = 0;
NetPeer_t1779390221 * G_B8_2 = NULL;
int32_t G_B7_0 = 0;
int32_t G_B7_1 = 0;
NetPeer_t1779390221 * G_B7_2 = NULL;
int32_t G_B9_0 = 0;
int32_t G_B9_1 = 0;
int32_t G_B9_2 = 0;
NetPeer_t1779390221 * G_B9_3 = NULL;
{
int32_t L_0 = ___status0;
__this->set_m_status_2(L_0);
String_t* L_1 = ___reason1;
V_1 = (bool)((((int32_t)((((Il2CppObject*)(String_t*)L_1) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_2 = V_1;
if (L_2)
{
goto IL_001a;
}
}
{
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_3 = ((String_t_StaticFields*)String_t_il2cpp_TypeInfo_var->static_fields)->get_Empty_2();
___reason1 = L_3;
}
IL_001a:
{
int32_t L_4 = __this->get_m_status_2();
V_1 = (bool)((((int32_t)((((int32_t)L_4) == ((int32_t)5))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_5 = V_1;
if (L_5)
{
goto IL_0065;
}
}
{
IL2CPP_RUNTIME_CLASS_INIT(NetTime_t3056501352_il2cpp_TypeInfo_var);
double L_6 = NetTime_get_Now_m1609702533(NULL /*static, unused*/, /*hidden argument*/NULL);
NetPeerConfiguration_t136603591 * L_7 = __this->get_m_peerConfiguration_1();
NullCheck(L_7);
float L_8 = L_7->get_m_connectionTimeout_11();
__this->set_m_timeoutDeadline_26(((double)((double)L_6+(double)(((double)((double)L_8))))));
NetPeer_t1779390221 * L_9 = __this->get_m_peer_0();
double L_10 = __this->get_m_timeoutDeadline_26();
double L_11 = L_10;
Il2CppObject * L_12 = Box(Double_t4078015681_il2cpp_TypeInfo_var, &L_11);
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_13 = String_Concat_m56707527(NULL /*static, unused*/, _stringLiteral2812317870, L_12, /*hidden argument*/NULL);
NullCheck(L_9);
NetPeer_LogVerbose_m3434660420(L_9, L_13, /*hidden argument*/NULL);
}
IL_0065:
{
NetPeerConfiguration_t136603591 * L_14 = __this->get_m_peerConfiguration_1();
NullCheck(L_14);
bool L_15 = NetPeerConfiguration_IsMessageTypeEnabled_m1110774391(L_14, 1, /*hidden argument*/NULL);
V_1 = (bool)((((int32_t)L_15) == ((int32_t)0))? 1 : 0);
bool L_16 = V_1;
if (L_16)
{
goto IL_00ed;
}
}
{
int32_t L_17 = __this->get_m_outputtedStatus_3();
int32_t L_18 = ___status0;
V_1 = (bool)((((int32_t)L_17) == ((int32_t)L_18))? 1 : 0);
bool L_19 = V_1;
if (L_19)
{
goto IL_00ea;
}
}
{
NetPeer_t1779390221 * L_20 = __this->get_m_peer_0();
String_t* L_21 = ___reason1;
NullCheck(L_21);
int32_t L_22 = String_get_Length_m1606060069(L_21, /*hidden argument*/NULL);
String_t* L_23 = ___reason1;
NullCheck(L_23);
int32_t L_24 = String_get_Length_m1606060069(L_23, /*hidden argument*/NULL);
G_B7_0 = ((int32_t)((int32_t)4+(int32_t)L_22));
G_B7_1 = 1;
G_B7_2 = L_20;
if ((((int32_t)L_24) > ((int32_t)((int32_t)126))))
{
G_B8_0 = ((int32_t)((int32_t)4+(int32_t)L_22));
G_B8_1 = 1;
G_B8_2 = L_20;
goto IL_00a3;
}
}
{
G_B9_0 = 1;
G_B9_1 = G_B7_0;
G_B9_2 = G_B7_1;
G_B9_3 = G_B7_2;
goto IL_00a4;
}
IL_00a3:
{
G_B9_0 = 2;
G_B9_1 = G_B8_0;
G_B9_2 = G_B8_1;
G_B9_3 = G_B8_2;
}
IL_00a4:
{
NullCheck(G_B9_3);
NetIncomingMessage_t2014089816 * L_25 = NetPeer_CreateIncomingMessage_m2109562735(G_B9_3, G_B9_2, ((int32_t)((int32_t)G_B9_1+(int32_t)G_B9_0)), /*hidden argument*/NULL);
V_0 = L_25;
NetIncomingMessage_t2014089816 * L_26 = V_0;
NullCheck(L_26);
L_26->set_m_senderConnection_7(__this);
NetIncomingMessage_t2014089816 * L_27 = V_0;
IPEndPoint_t2615413766 * L_28 = __this->get_m_remoteEndPoint_5();
NullCheck(L_27);
L_27->set_m_senderEndPoint_6(L_28);
NetIncomingMessage_t2014089816 * L_29 = V_0;
int32_t L_30 = __this->get_m_status_2();
NullCheck(L_29);
NetBuffer_Write_m4142810212(L_29, (((int32_t)((uint8_t)L_30))), /*hidden argument*/NULL);
NetIncomingMessage_t2014089816 * L_31 = V_0;
String_t* L_32 = ___reason1;
NullCheck(L_31);
NetBuffer_Write_m962556565(L_31, L_32, /*hidden argument*/NULL);
NetPeer_t1779390221 * L_33 = __this->get_m_peer_0();
NetIncomingMessage_t2014089816 * L_34 = V_0;
NullCheck(L_33);
NetPeer_ReleaseMessage_m3520648965(L_33, L_34, /*hidden argument*/NULL);
int32_t L_35 = ___status0;
__this->set_m_outputtedStatus_3(L_35);
}
IL_00ea:
{
goto IL_0107;
}
IL_00ed:
{
int32_t L_36 = __this->get_m_status_2();
__this->set_m_outputtedStatus_3(L_36);
int32_t L_37 = __this->get_m_status_2();
__this->set_m_visibleStatus_4(L_37);
}
IL_0107:
{
return;
}
}
// System.Void Lidgren.Network.NetConnection::Heartbeat(System.Double,System.UInt32)
extern Il2CppClass* ObjectU5BU5D_t3614634134_il2cpp_TypeInfo_var;
extern Il2CppClass* Double_t4078015681_il2cpp_TypeInfo_var;
extern Il2CppClass* String_t_il2cpp_TypeInfo_var;
extern const MethodInfo* NetQueue_1_get_Count_m440124770_MethodInfo_var;
extern const MethodInfo* NetQueue_1_TryDequeue_m2063198819_MethodInfo_var;
extern Il2CppCodeGenString* _stringLiteral2542256798;
extern Il2CppCodeGenString* _stringLiteral1690320731;
extern Il2CppCodeGenString* _stringLiteral3785970509;
extern const uint32_t NetConnection_Heartbeat_m3721342474_MetadataUsageId;
extern "C" void NetConnection_Heartbeat_m3721342474 (NetConnection_t3331492029 * __this, double ___now0, uint32_t ___frameCounter1, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetConnection_Heartbeat_m3721342474_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
bool V_0 = false;
ByteU5BU5D_t3397334013* V_1 = NULL;
int32_t V_2 = 0;
int32_t V_3 = 0;
int32_t V_4 = 0;
int32_t V_5 = 0;
NetTuple_2_t3234296172 V_6;
memset(&V_6, 0, sizeof(V_6));
NetTuple_2_t3234296172 V_7;
memset(&V_7, 0, sizeof(V_7));
NetSenderChannelBase_t3096690204 * V_8 = NULL;
NetSenderChannelBase_t3096690204 * V_9 = NULL;
bool V_10 = false;
ObjectU5BU5D_t3614634134* V_11 = NULL;
int32_t V_12 = 0;
int32_t G_B3_0 = 0;
int32_t G_B24_0 = 0;
int32_t G_B38_0 = 0;
int32_t G_B45_0 = 0;
int32_t G_B52_0 = 0;
{
NetPeer_t1779390221 * L_0 = __this->get_m_peer_0();
NullCheck(L_0);
NetPeer_VerifyNetworkThread_m4075953563(L_0, /*hidden argument*/NULL);
int32_t L_1 = __this->get_m_status_2();
if ((((int32_t)L_1) == ((int32_t)1)))
{
goto IL_0024;
}
}
{
int32_t L_2 = __this->get_m_status_2();
G_B3_0 = ((((int32_t)((((int32_t)L_2) == ((int32_t)4))? 1 : 0)) == ((int32_t)0))? 1 : 0);
goto IL_0025;
}
IL_0024:
{
G_B3_0 = 0;
}
IL_0025:
{
NetException_Assert_m1426298558(NULL /*static, unused*/, (bool)G_B3_0, /*hidden argument*/NULL);
uint32_t L_3 = ___frameCounter1;
V_10 = (bool)((((int32_t)((((int32_t)((int32_t)((uint32_t)(int32_t)L_3%(uint32_t)(int32_t)8))) == ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_4 = V_10;
if (L_4)
{
goto IL_011a;
}
}
{
double L_5 = ___now0;
double L_6 = __this->get_m_timeoutDeadline_26();
V_10 = (bool)((((int32_t)((((double)L_5) > ((double)L_6))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_7 = V_10;
if (L_7)
{
goto IL_00aa;
}
}
{
NetPeer_t1779390221 * L_8 = __this->get_m_peer_0();
V_11 = ((ObjectU5BU5D_t3614634134*)SZArrayNew(ObjectU5BU5D_t3614634134_il2cpp_TypeInfo_var, (uint32_t)4));
ObjectU5BU5D_t3614634134* L_9 = V_11;
NullCheck(L_9);
IL2CPP_ARRAY_BOUNDS_CHECK(L_9, 0);
ArrayElementTypeCheck (L_9, _stringLiteral2542256798);
(L_9)->SetAt(static_cast<il2cpp_array_size_t>(0), (Il2CppObject *)_stringLiteral2542256798);
ObjectU5BU5D_t3614634134* L_10 = V_11;
double L_11 = ___now0;
double L_12 = L_11;
Il2CppObject * L_13 = Box(Double_t4078015681_il2cpp_TypeInfo_var, &L_12);
NullCheck(L_10);
IL2CPP_ARRAY_BOUNDS_CHECK(L_10, 1);
ArrayElementTypeCheck (L_10, L_13);
(L_10)->SetAt(static_cast<il2cpp_array_size_t>(1), (Il2CppObject *)L_13);
ObjectU5BU5D_t3614634134* L_14 = V_11;
NullCheck(L_14);
IL2CPP_ARRAY_BOUNDS_CHECK(L_14, 2);
ArrayElementTypeCheck (L_14, _stringLiteral1690320731);
(L_14)->SetAt(static_cast<il2cpp_array_size_t>(2), (Il2CppObject *)_stringLiteral1690320731);
ObjectU5BU5D_t3614634134* L_15 = V_11;
double L_16 = __this->get_m_timeoutDeadline_26();
double L_17 = L_16;
Il2CppObject * L_18 = Box(Double_t4078015681_il2cpp_TypeInfo_var, &L_17);
NullCheck(L_15);
IL2CPP_ARRAY_BOUNDS_CHECK(L_15, 3);
ArrayElementTypeCheck (L_15, L_18);
(L_15)->SetAt(static_cast<il2cpp_array_size_t>(3), (Il2CppObject *)L_18);
ObjectU5BU5D_t3614634134* L_19 = V_11;
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_20 = String_Concat_m3881798623(NULL /*static, unused*/, L_19, /*hidden argument*/NULL);
NullCheck(L_8);
NetPeer_LogVerbose_m3434660420(L_8, L_20, /*hidden argument*/NULL);
NetConnection_ExecuteDisconnect_m666203348(__this, _stringLiteral3785970509, (bool)1, /*hidden argument*/NULL);
goto IL_049a;
}
IL_00aa:
{
int32_t L_21 = __this->get_m_status_2();
V_10 = (bool)((((int32_t)((((int32_t)L_21) == ((int32_t)5))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_22 = V_10;
if (L_22)
{
goto IL_00f1;
}
}
{
double L_23 = ___now0;
double L_24 = __this->get_m_sentPingTime_23();
NetPeer_t1779390221 * L_25 = __this->get_m_peer_0();
NullCheck(L_25);
NetPeerConfiguration_t136603591 * L_26 = L_25->get_m_configuration_21();
NullCheck(L_26);
float L_27 = L_26->get_m_pingInterval_8();
V_10 = (bool)((((int32_t)((((double)L_23) > ((double)((double)((double)L_24+(double)(((double)((double)L_27)))))))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_28 = V_10;
if (L_28)
{
goto IL_00e8;
}
}
{
NetConnection_SendPing_m2389823252(__this, /*hidden argument*/NULL);
}
IL_00e8:
{
double L_29 = ___now0;
NetConnection_MTUExpansionHeartbeat_m2691120475(__this, L_29, /*hidden argument*/NULL);
}
IL_00f1:
{
bool L_30 = __this->get_m_disconnectRequested_16();
V_10 = (bool)((((int32_t)L_30) == ((int32_t)0))? 1 : 0);
bool L_31 = V_10;
if (L_31)
{
goto IL_0119;
}
}
{
String_t* L_32 = __this->get_m_disconnectMessage_18();
bool L_33 = __this->get_m_disconnectReqSendBye_17();
NetConnection_ExecuteDisconnect_m666203348(__this, L_32, L_33, /*hidden argument*/NULL);
goto IL_049a;
}
IL_0119:
{
}
IL_011a:
{
NetPeer_t1779390221 * L_34 = __this->get_m_peer_0();
NullCheck(L_34);
ByteU5BU5D_t3397334013* L_35 = L_34->get_m_sendBuffer_11();
V_1 = L_35;
int32_t L_36 = __this->get_m_currentMTU_34();
V_2 = L_36;
uint32_t L_37 = ___frameCounter1;
V_10 = (bool)((((int32_t)((((int32_t)((int32_t)((uint32_t)(int32_t)L_37%(uint32_t)(int32_t)3))) == ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_38 = V_10;
if (L_38)
{
goto IL_0363;
}
}
{
goto IL_0302;
}
IL_0145:
{
int32_t L_39 = V_2;
int32_t L_40 = __this->get_m_sendBufferWritePtr_12();
V_3 = ((int32_t)((int32_t)((int32_t)((int32_t)L_39-(int32_t)((int32_t)((int32_t)L_40+(int32_t)5))))/(int32_t)3));
int32_t L_41 = V_3;
NetQueue_1_t1156019562 * L_42 = __this->get_m_queuedOutgoingAcks_10();
NullCheck(L_42);
int32_t L_43 = NetQueue_1_get_Count_m440124770(L_42, /*hidden argument*/NetQueue_1_get_Count_m440124770_MethodInfo_var);
V_10 = (bool)((((int32_t)((((int32_t)L_41) > ((int32_t)L_43))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_44 = V_10;
if (L_44)
{
goto IL_0176;
}
}
{
NetQueue_1_t1156019562 * L_45 = __this->get_m_queuedOutgoingAcks_10();
NullCheck(L_45);
int32_t L_46 = NetQueue_1_get_Count_m440124770(L_45, /*hidden argument*/NetQueue_1_get_Count_m440124770_MethodInfo_var);
V_3 = L_46;
}
IL_0176:
{
int32_t L_47 = V_3;
NetException_Assert_m1426298558(NULL /*static, unused*/, (bool)((((int32_t)L_47) > ((int32_t)0))? 1 : 0), /*hidden argument*/NULL);
int32_t L_48 = __this->get_m_sendBufferNumMessages_13();
__this->set_m_sendBufferNumMessages_13(((int32_t)((int32_t)L_48+(int32_t)1)));
ByteU5BU5D_t3397334013* L_49 = V_1;
int32_t L_50 = __this->get_m_sendBufferWritePtr_12();
int32_t L_51 = L_50;
V_12 = L_51;
__this->set_m_sendBufferWritePtr_12(((int32_t)((int32_t)L_51+(int32_t)1)));
int32_t L_52 = V_12;
NullCheck(L_49);
IL2CPP_ARRAY_BOUNDS_CHECK(L_49, L_52);
(L_49)->SetAt(static_cast<il2cpp_array_size_t>(L_52), (uint8_t)((int32_t)134));
ByteU5BU5D_t3397334013* L_53 = V_1;
int32_t L_54 = __this->get_m_sendBufferWritePtr_12();
int32_t L_55 = L_54;
V_12 = L_55;
__this->set_m_sendBufferWritePtr_12(((int32_t)((int32_t)L_55+(int32_t)1)));
int32_t L_56 = V_12;
NullCheck(L_53);
IL2CPP_ARRAY_BOUNDS_CHECK(L_53, L_56);
(L_53)->SetAt(static_cast<il2cpp_array_size_t>(L_56), (uint8_t)0);
ByteU5BU5D_t3397334013* L_57 = V_1;
int32_t L_58 = __this->get_m_sendBufferWritePtr_12();
int32_t L_59 = L_58;
V_12 = L_59;
__this->set_m_sendBufferWritePtr_12(((int32_t)((int32_t)L_59+(int32_t)1)));
int32_t L_60 = V_12;
NullCheck(L_57);
IL2CPP_ARRAY_BOUNDS_CHECK(L_57, L_60);
(L_57)->SetAt(static_cast<il2cpp_array_size_t>(L_60), (uint8_t)0);
int32_t L_61 = V_3;
V_4 = ((int32_t)((int32_t)((int32_t)((int32_t)L_61*(int32_t)3))*(int32_t)8));
ByteU5BU5D_t3397334013* L_62 = V_1;
int32_t L_63 = __this->get_m_sendBufferWritePtr_12();
int32_t L_64 = L_63;
V_12 = L_64;
__this->set_m_sendBufferWritePtr_12(((int32_t)((int32_t)L_64+(int32_t)1)));
int32_t L_65 = V_12;
int32_t L_66 = V_4;
NullCheck(L_62);
IL2CPP_ARRAY_BOUNDS_CHECK(L_62, L_65);
(L_62)->SetAt(static_cast<il2cpp_array_size_t>(L_65), (uint8_t)(((int32_t)((uint8_t)L_66))));
ByteU5BU5D_t3397334013* L_67 = V_1;
int32_t L_68 = __this->get_m_sendBufferWritePtr_12();
int32_t L_69 = L_68;
V_12 = L_69;
__this->set_m_sendBufferWritePtr_12(((int32_t)((int32_t)L_69+(int32_t)1)));
int32_t L_70 = V_12;
int32_t L_71 = V_4;
NullCheck(L_67);
IL2CPP_ARRAY_BOUNDS_CHECK(L_67, L_70);
(L_67)->SetAt(static_cast<il2cpp_array_size_t>(L_70), (uint8_t)(((int32_t)((uint8_t)((int32_t)((int32_t)L_71>>(int32_t)8))))));
V_5 = 0;
goto IL_0280;
}
IL_0212:
{
NetQueue_1_t1156019562 * L_72 = __this->get_m_queuedOutgoingAcks_10();
NullCheck(L_72);
NetQueue_1_TryDequeue_m2063198819(L_72, (&V_6), /*hidden argument*/NetQueue_1_TryDequeue_m2063198819_MethodInfo_var);
ByteU5BU5D_t3397334013* L_73 = V_1;
int32_t L_74 = __this->get_m_sendBufferWritePtr_12();
int32_t L_75 = L_74;
V_12 = L_75;
__this->set_m_sendBufferWritePtr_12(((int32_t)((int32_t)L_75+(int32_t)1)));
int32_t L_76 = V_12;
uint8_t L_77 = (&V_6)->get_Item1_0();
NullCheck(L_73);
IL2CPP_ARRAY_BOUNDS_CHECK(L_73, L_76);
(L_73)->SetAt(static_cast<il2cpp_array_size_t>(L_76), (uint8_t)L_77);
ByteU5BU5D_t3397334013* L_78 = V_1;
int32_t L_79 = __this->get_m_sendBufferWritePtr_12();
int32_t L_80 = L_79;
V_12 = L_80;
__this->set_m_sendBufferWritePtr_12(((int32_t)((int32_t)L_80+(int32_t)1)));
int32_t L_81 = V_12;
int32_t L_82 = (&V_6)->get_Item2_1();
NullCheck(L_78);
IL2CPP_ARRAY_BOUNDS_CHECK(L_78, L_81);
(L_78)->SetAt(static_cast<il2cpp_array_size_t>(L_81), (uint8_t)(((int32_t)((uint8_t)L_82))));
ByteU5BU5D_t3397334013* L_83 = V_1;
int32_t L_84 = __this->get_m_sendBufferWritePtr_12();
int32_t L_85 = L_84;
V_12 = L_85;
__this->set_m_sendBufferWritePtr_12(((int32_t)((int32_t)L_85+(int32_t)1)));
int32_t L_86 = V_12;
int32_t L_87 = (&V_6)->get_Item2_1();
NullCheck(L_83);
IL2CPP_ARRAY_BOUNDS_CHECK(L_83, L_86);
(L_83)->SetAt(static_cast<il2cpp_array_size_t>(L_86), (uint8_t)(((int32_t)((uint8_t)((int32_t)((int32_t)L_87>>(int32_t)8))))));
int32_t L_88 = V_5;
V_5 = ((int32_t)((int32_t)L_88+(int32_t)1));
}
IL_0280:
{
int32_t L_89 = V_5;
int32_t L_90 = V_3;
V_10 = (bool)((((int32_t)L_89) < ((int32_t)L_90))? 1 : 0);
bool L_91 = V_10;
if (L_91)
{
goto IL_0212;
}
}
{
NetQueue_1_t1156019562 * L_92 = __this->get_m_queuedOutgoingAcks_10();
NullCheck(L_92);
int32_t L_93 = NetQueue_1_get_Count_m440124770(L_92, /*hidden argument*/NetQueue_1_get_Count_m440124770_MethodInfo_var);
V_10 = (bool)((((int32_t)((((int32_t)L_93) > ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_94 = V_10;
if (L_94)
{
goto IL_0301;
}
}
{
int32_t L_95 = __this->get_m_sendBufferWritePtr_12();
if ((((int32_t)L_95) <= ((int32_t)0)))
{
goto IL_02b7;
}
}
{
int32_t L_96 = __this->get_m_sendBufferNumMessages_13();
G_B24_0 = ((((int32_t)L_96) > ((int32_t)0))? 1 : 0);
goto IL_02b8;
}
IL_02b7:
{
G_B24_0 = 0;
}
IL_02b8:
{
NetException_Assert_m1426298558(NULL /*static, unused*/, (bool)G_B24_0, /*hidden argument*/NULL);
NetPeer_t1779390221 * L_97 = __this->get_m_peer_0();
int32_t L_98 = __this->get_m_sendBufferWritePtr_12();
IPEndPoint_t2615413766 * L_99 = __this->get_m_remoteEndPoint_5();
int32_t L_100 = __this->get_m_sendBufferNumMessages_13();
NullCheck(L_97);
NetPeer_SendPacket_m625616909(L_97, L_98, L_99, L_100, (&V_0), /*hidden argument*/NULL);
NetConnectionStatistics_t1235765202 * L_101 = __this->get_m_statistics_14();
int32_t L_102 = __this->get_m_sendBufferWritePtr_12();
NullCheck(L_101);
NetConnectionStatistics_PacketSent_m833909693(L_101, L_102, 1, /*hidden argument*/NULL);
__this->set_m_sendBufferWritePtr_12(0);
__this->set_m_sendBufferNumMessages_13(0);
}
IL_0301:
{
}
IL_0302:
{
NetQueue_1_t1156019562 * L_103 = __this->get_m_queuedOutgoingAcks_10();
NullCheck(L_103);
int32_t L_104 = NetQueue_1_get_Count_m440124770(L_103, /*hidden argument*/NetQueue_1_get_Count_m440124770_MethodInfo_var);
V_10 = (bool)((((int32_t)L_104) > ((int32_t)0))? 1 : 0);
bool L_105 = V_10;
if (L_105)
{
goto IL_0145;
}
}
{
goto IL_034f;
}
IL_031b:
{
NetSenderChannelBaseU5BU5D_t470374901* L_106 = __this->get_m_sendChannels_6();
uint8_t L_107 = (&V_7)->get_Item1_0();
NullCheck(L_106);
IL2CPP_ARRAY_BOUNDS_CHECK(L_106, ((int32_t)((int32_t)L_107-(int32_t)1)));
int32_t L_108 = ((int32_t)((int32_t)L_107-(int32_t)1));
NetSenderChannelBase_t3096690204 * L_109 = (L_106)->GetAt(static_cast<il2cpp_array_size_t>(L_108));
V_8 = L_109;
NetSenderChannelBase_t3096690204 * L_110 = V_8;
V_10 = (bool)((((int32_t)((((Il2CppObject*)(NetSenderChannelBase_t3096690204 *)L_110) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_111 = V_10;
if (L_111)
{
goto IL_033e;
}
}
{
goto IL_034f;
}
IL_033e:
{
NetSenderChannelBase_t3096690204 * L_112 = V_8;
double L_113 = ___now0;
int32_t L_114 = (&V_7)->get_Item2_1();
NullCheck(L_112);
VirtActionInvoker2< double, int32_t >::Invoke(9 /* System.Void Lidgren.Network.NetSenderChannelBase::ReceiveAcknowledge(System.Double,System.Int32) */, L_112, L_113, L_114);
}
IL_034f:
{
NetQueue_1_t1156019562 * L_115 = __this->get_m_queuedIncomingAcks_11();
NullCheck(L_115);
bool L_116 = NetQueue_1_TryDequeue_m2063198819(L_115, (&V_7), /*hidden argument*/NetQueue_1_TryDequeue_m2063198819_MethodInfo_var);
V_10 = L_116;
bool L_117 = V_10;
if (L_117)
{
goto IL_031b;
}
}
{
}
IL_0363:
{
NetPeer_t1779390221 * L_118 = __this->get_m_peer_0();
NullCheck(L_118);
bool L_119 = L_118->get_m_executeFlushSendQueue_27();
V_10 = (bool)((((int32_t)L_119) == ((int32_t)0))? 1 : 0);
bool L_120 = V_10;
if (L_120)
{
goto IL_0418;
}
}
{
NetSenderChannelBaseU5BU5D_t470374901* L_121 = __this->get_m_sendChannels_6();
NullCheck(L_121);
V_5 = ((int32_t)((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_121)->max_length))))-(int32_t)1));
goto IL_0406;
}
IL_0389:
{
NetSenderChannelBaseU5BU5D_t470374901* L_122 = __this->get_m_sendChannels_6();
int32_t L_123 = V_5;
NullCheck(L_122);
IL2CPP_ARRAY_BOUNDS_CHECK(L_122, L_123);
int32_t L_124 = L_123;
NetSenderChannelBase_t3096690204 * L_125 = (L_122)->GetAt(static_cast<il2cpp_array_size_t>(L_124));
V_9 = L_125;
int32_t L_126 = __this->get_m_sendBufferWritePtr_12();
if ((((int32_t)L_126) < ((int32_t)1)))
{
goto IL_03a9;
}
}
{
int32_t L_127 = __this->get_m_sendBufferNumMessages_13();
G_B38_0 = ((((int32_t)L_127) > ((int32_t)0))? 1 : 0);
goto IL_03aa;
}
IL_03a9:
{
G_B38_0 = 1;
}
IL_03aa:
{
NetException_Assert_m1426298558(NULL /*static, unused*/, (bool)G_B38_0, /*hidden argument*/NULL);
NetSenderChannelBase_t3096690204 * L_128 = V_9;
V_10 = (bool)((((Il2CppObject*)(NetSenderChannelBase_t3096690204 *)L_128) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0);
bool L_129 = V_10;
if (L_129)
{
goto IL_03e3;
}
}
{
NetSenderChannelBase_t3096690204 * L_130 = V_9;
double L_131 = ___now0;
NullCheck(L_130);
VirtActionInvoker1< double >::Invoke(7 /* System.Void Lidgren.Network.NetSenderChannelBase::SendQueuedMessages(System.Double) */, L_130, L_131);
NetSenderChannelBase_t3096690204 * L_132 = V_9;
NullCheck(L_132);
bool L_133 = VirtFuncInvoker0< bool >::Invoke(5 /* System.Boolean Lidgren.Network.NetSenderChannelBase::NeedToSendMessages() */, L_132);
V_10 = (bool)((((int32_t)L_133) == ((int32_t)0))? 1 : 0);
bool L_134 = V_10;
if (L_134)
{
goto IL_03e2;
}
}
{
NetPeer_t1779390221 * L_135 = __this->get_m_peer_0();
NullCheck(L_135);
L_135->set_m_needFlushSendQueue_20((bool)1);
}
IL_03e2:
{
}
IL_03e3:
{
int32_t L_136 = __this->get_m_sendBufferWritePtr_12();
if ((((int32_t)L_136) < ((int32_t)1)))
{
goto IL_03f7;
}
}
{
int32_t L_137 = __this->get_m_sendBufferNumMessages_13();
G_B45_0 = ((((int32_t)L_137) > ((int32_t)0))? 1 : 0);
goto IL_03f8;
}
IL_03f7:
{
G_B45_0 = 1;
}
IL_03f8:
{
NetException_Assert_m1426298558(NULL /*static, unused*/, (bool)G_B45_0, /*hidden argument*/NULL);
int32_t L_138 = V_5;
V_5 = ((int32_t)((int32_t)L_138-(int32_t)1));
}
IL_0406:
{
int32_t L_139 = V_5;
V_10 = (bool)((((int32_t)((((int32_t)L_139) < ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_140 = V_10;
if (L_140)
{
goto IL_0389;
}
}
{
}
IL_0418:
{
int32_t L_141 = __this->get_m_sendBufferWritePtr_12();
V_10 = (bool)((((int32_t)((((int32_t)L_141) > ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_142 = V_10;
if (L_142)
{
goto IL_049a;
}
}
{
NetPeer_t1779390221 * L_143 = __this->get_m_peer_0();
NullCheck(L_143);
NetPeer_VerifyNetworkThread_m4075953563(L_143, /*hidden argument*/NULL);
int32_t L_144 = __this->get_m_sendBufferWritePtr_12();
if ((((int32_t)L_144) <= ((int32_t)0)))
{
goto IL_044b;
}
}
{
int32_t L_145 = __this->get_m_sendBufferNumMessages_13();
G_B52_0 = ((((int32_t)L_145) > ((int32_t)0))? 1 : 0);
goto IL_044c;
}
IL_044b:
{
G_B52_0 = 0;
}
IL_044c:
{
NetException_Assert_m1426298558(NULL /*static, unused*/, (bool)G_B52_0, /*hidden argument*/NULL);
NetPeer_t1779390221 * L_146 = __this->get_m_peer_0();
int32_t L_147 = __this->get_m_sendBufferWritePtr_12();
IPEndPoint_t2615413766 * L_148 = __this->get_m_remoteEndPoint_5();
int32_t L_149 = __this->get_m_sendBufferNumMessages_13();
NullCheck(L_146);
NetPeer_SendPacket_m625616909(L_146, L_147, L_148, L_149, (&V_0), /*hidden argument*/NULL);
NetConnectionStatistics_t1235765202 * L_150 = __this->get_m_statistics_14();
int32_t L_151 = __this->get_m_sendBufferWritePtr_12();
int32_t L_152 = __this->get_m_sendBufferNumMessages_13();
NullCheck(L_150);
NetConnectionStatistics_PacketSent_m833909693(L_150, L_151, L_152, /*hidden argument*/NULL);
__this->set_m_sendBufferWritePtr_12(0);
__this->set_m_sendBufferNumMessages_13(0);
}
IL_049a:
{
return;
}
}
// System.Void Lidgren.Network.NetConnection::QueueSendMessage(Lidgren.Network.NetOutgoingMessage,System.Int32)
extern "C" void NetConnection_QueueSendMessage_m496824802 (NetConnection_t3331492029 * __this, NetOutgoingMessage_t2016542980 * ___om0, int32_t ___seqNr1, const MethodInfo* method)
{
int32_t V_0 = 0;
bool V_1 = false;
bool V_2 = false;
int32_t G_B4_0 = 0;
{
NetPeer_t1779390221 * L_0 = __this->get_m_peer_0();
NullCheck(L_0);
NetPeer_VerifyNetworkThread_m4075953563(L_0, /*hidden argument*/NULL);
NetOutgoingMessage_t2016542980 * L_1 = ___om0;
NullCheck(L_1);
int32_t L_2 = NetOutgoingMessage_GetEncodedSize_m3842097810(L_1, /*hidden argument*/NULL);
V_0 = L_2;
int32_t L_3 = __this->get_m_sendBufferWritePtr_12();
int32_t L_4 = V_0;
int32_t L_5 = __this->get_m_currentMTU_34();
V_2 = (bool)((((int32_t)((((int32_t)((int32_t)((int32_t)L_3+(int32_t)L_4))) > ((int32_t)L_5))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_6 = V_2;
if (L_6)
{
goto IL_0092;
}
}
{
int32_t L_7 = __this->get_m_sendBufferWritePtr_12();
if ((((int32_t)L_7) <= ((int32_t)0)))
{
goto IL_0043;
}
}
{
int32_t L_8 = __this->get_m_sendBufferNumMessages_13();
G_B4_0 = ((((int32_t)((((int32_t)L_8) > ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0);
goto IL_0044;
}
IL_0043:
{
G_B4_0 = 1;
}
IL_0044:
{
V_2 = (bool)G_B4_0;
bool L_9 = V_2;
if (L_9)
{
goto IL_0091;
}
}
{
NetPeer_t1779390221 * L_10 = __this->get_m_peer_0();
int32_t L_11 = __this->get_m_sendBufferWritePtr_12();
IPEndPoint_t2615413766 * L_12 = __this->get_m_remoteEndPoint_5();
int32_t L_13 = __this->get_m_sendBufferNumMessages_13();
NullCheck(L_10);
NetPeer_SendPacket_m625616909(L_10, L_11, L_12, L_13, (&V_1), /*hidden argument*/NULL);
NetConnectionStatistics_t1235765202 * L_14 = __this->get_m_statistics_14();
int32_t L_15 = __this->get_m_sendBufferWritePtr_12();
int32_t L_16 = __this->get_m_sendBufferNumMessages_13();
NullCheck(L_14);
NetConnectionStatistics_PacketSent_m833909693(L_14, L_15, L_16, /*hidden argument*/NULL);
__this->set_m_sendBufferWritePtr_12(0);
__this->set_m_sendBufferNumMessages_13(0);
}
IL_0091:
{
}
IL_0092:
{
NetOutgoingMessage_t2016542980 * L_17 = ___om0;
NetPeer_t1779390221 * L_18 = __this->get_m_peer_0();
NullCheck(L_18);
ByteU5BU5D_t3397334013* L_19 = L_18->get_m_sendBuffer_11();
int32_t L_20 = __this->get_m_sendBufferWritePtr_12();
int32_t L_21 = ___seqNr1;
NullCheck(L_17);
int32_t L_22 = NetOutgoingMessage_Encode_m2473987076(L_17, L_19, L_20, L_21, /*hidden argument*/NULL);
__this->set_m_sendBufferWritePtr_12(L_22);
int32_t L_23 = __this->get_m_sendBufferNumMessages_13();
__this->set_m_sendBufferNumMessages_13(((int32_t)((int32_t)L_23+(int32_t)1)));
int32_t L_24 = __this->get_m_sendBufferWritePtr_12();
int32_t L_25 = __this->get_m_currentMTU_34();
V_2 = (bool)((((int32_t)((((int32_t)L_24) > ((int32_t)L_25))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_26 = V_2;
if (L_26)
{
goto IL_011b;
}
}
{
NetPeer_t1779390221 * L_27 = __this->get_m_peer_0();
int32_t L_28 = __this->get_m_sendBufferWritePtr_12();
IPEndPoint_t2615413766 * L_29 = __this->get_m_remoteEndPoint_5();
int32_t L_30 = __this->get_m_sendBufferNumMessages_13();
NullCheck(L_27);
NetPeer_SendPacket_m625616909(L_27, L_28, L_29, L_30, (&V_1), /*hidden argument*/NULL);
NetConnectionStatistics_t1235765202 * L_31 = __this->get_m_statistics_14();
int32_t L_32 = __this->get_m_sendBufferWritePtr_12();
int32_t L_33 = __this->get_m_sendBufferNumMessages_13();
NullCheck(L_31);
NetConnectionStatistics_PacketSent_m833909693(L_31, L_32, L_33, /*hidden argument*/NULL);
__this->set_m_sendBufferWritePtr_12(0);
__this->set_m_sendBufferNumMessages_13(0);
}
IL_011b:
{
int32_t L_34 = __this->get_m_sendBufferWritePtr_12();
V_2 = (bool)((((int32_t)((((int32_t)L_34) > ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_35 = V_2;
if (L_35)
{
goto IL_0137;
}
}
{
NetPeer_t1779390221 * L_36 = __this->get_m_peer_0();
NullCheck(L_36);
L_36->set_m_needFlushSendQueue_20((bool)1);
}
IL_0137:
{
NetOutgoingMessage_t2016542980 * L_37 = ___om0;
NullCheck(L_37);
int32_t* L_38 = L_37->get_address_of_m_recyclingCount_7();
Interlocked_Decrement_m70525859(NULL /*static, unused*/, L_38, /*hidden argument*/NULL);
return;
}
}
// Lidgren.Network.NetSendResult Lidgren.Network.NetConnection::SendMessage(Lidgren.Network.NetOutgoingMessage,Lidgren.Network.NetDeliveryMethod,System.Int32)
extern "C" int32_t NetConnection_SendMessage_m179193270 (NetConnection_t3331492029 * __this, NetOutgoingMessage_t2016542980 * ___msg0, uint8_t ___method1, int32_t ___sequenceChannel2, const MethodInfo* method)
{
int32_t V_0 = 0;
{
NetPeer_t1779390221 * L_0 = __this->get_m_peer_0();
NetOutgoingMessage_t2016542980 * L_1 = ___msg0;
uint8_t L_2 = ___method1;
int32_t L_3 = ___sequenceChannel2;
NullCheck(L_0);
int32_t L_4 = NetPeer_SendMessage_m3610804500(L_0, L_1, __this, L_2, L_3, /*hidden argument*/NULL);
V_0 = L_4;
goto IL_0013;
}
IL_0013:
{
int32_t L_5 = V_0;
return L_5;
}
}
// Lidgren.Network.NetSendResult Lidgren.Network.NetConnection::EnqueueMessage(Lidgren.Network.NetOutgoingMessage,Lidgren.Network.NetDeliveryMethod,System.Int32)
extern Il2CppCodeGenString* _stringLiteral1457837033;
extern const uint32_t NetConnection_EnqueueMessage_m3897273412_MetadataUsageId;
extern "C" int32_t NetConnection_EnqueueMessage_m3897273412 (NetConnection_t3331492029 * __this, NetOutgoingMessage_t2016542980 * ___msg0, uint8_t ___method1, int32_t ___sequenceChannel2, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetConnection_EnqueueMessage_m3897273412_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
uint8_t V_0 = 0;
int32_t V_1 = 0;
NetSenderChannelBase_t3096690204 * V_2 = NULL;
int32_t V_3 = 0;
int32_t V_4 = 0;
bool V_5 = false;
int32_t G_B8_0 = 0;
{
int32_t L_0 = __this->get_m_status_2();
V_5 = (bool)((((int32_t)L_0) == ((int32_t)5))? 1 : 0);
bool L_1 = V_5;
if (L_1)
{
goto IL_0015;
}
}
{
V_4 = 0;
goto IL_0086;
}
IL_0015:
{
uint8_t L_2 = ___method1;
int32_t L_3 = ___sequenceChannel2;
V_0 = (((int32_t)((uint8_t)((int32_t)((int32_t)L_2+(int32_t)L_3)))));
NetOutgoingMessage_t2016542980 * L_4 = ___msg0;
uint8_t L_5 = V_0;
NullCheck(L_4);
L_4->set_m_messageType_5(L_5);
uint8_t L_6 = ___method1;
int32_t L_7 = ___sequenceChannel2;
V_1 = ((int32_t)((int32_t)((int32_t)((int32_t)L_6-(int32_t)1))+(int32_t)L_7));
NetSenderChannelBaseU5BU5D_t470374901* L_8 = __this->get_m_sendChannels_6();
int32_t L_9 = V_1;
NullCheck(L_8);
IL2CPP_ARRAY_BOUNDS_CHECK(L_8, L_9);
int32_t L_10 = L_9;
NetSenderChannelBase_t3096690204 * L_11 = (L_8)->GetAt(static_cast<il2cpp_array_size_t>(L_10));
V_2 = L_11;
NetSenderChannelBase_t3096690204 * L_12 = V_2;
V_5 = (bool)((((int32_t)((((Il2CppObject*)(NetSenderChannelBase_t3096690204 *)L_12) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_13 = V_5;
if (L_13)
{
goto IL_0045;
}
}
{
uint8_t L_14 = V_0;
NetSenderChannelBase_t3096690204 * L_15 = NetConnection_CreateSenderChannel_m4115641717(__this, L_14, /*hidden argument*/NULL);
V_2 = L_15;
}
IL_0045:
{
uint8_t L_16 = ___method1;
if ((((int32_t)L_16) == ((int32_t)1)))
{
goto IL_0060;
}
}
{
uint8_t L_17 = ___method1;
if ((((int32_t)L_17) == ((int32_t)2)))
{
goto IL_0060;
}
}
{
NetOutgoingMessage_t2016542980 * L_18 = ___msg0;
NullCheck(L_18);
int32_t L_19 = NetOutgoingMessage_GetEncodedSize_m3842097810(L_18, /*hidden argument*/NULL);
int32_t L_20 = __this->get_m_currentMTU_34();
G_B8_0 = ((((int32_t)((((int32_t)L_19) > ((int32_t)L_20))? 1 : 0)) == ((int32_t)0))? 1 : 0);
goto IL_0061;
}
IL_0060:
{
G_B8_0 = 1;
}
IL_0061:
{
V_5 = (bool)G_B8_0;
bool L_21 = V_5;
if (L_21)
{
goto IL_0079;
}
}
{
NetPeer_t1779390221 * L_22 = __this->get_m_peer_0();
NullCheck(L_22);
NetPeer_ThrowOrLog_m2301784333(L_22, _stringLiteral1457837033, /*hidden argument*/NULL);
}
IL_0079:
{
NetSenderChannelBase_t3096690204 * L_23 = V_2;
NetOutgoingMessage_t2016542980 * L_24 = ___msg0;
NullCheck(L_23);
int32_t L_25 = VirtFuncInvoker1< int32_t, NetOutgoingMessage_t2016542980 * >::Invoke(6 /* Lidgren.Network.NetSendResult Lidgren.Network.NetSenderChannelBase::Enqueue(Lidgren.Network.NetOutgoingMessage) */, L_23, L_24);
V_3 = L_25;
int32_t L_26 = V_3;
V_4 = L_26;
goto IL_0086;
}
IL_0086:
{
int32_t L_27 = V_4;
return L_27;
}
}
// Lidgren.Network.NetSenderChannelBase Lidgren.Network.NetConnection::CreateSenderChannel(Lidgren.Network.NetMessageType)
extern Il2CppClass* NetUtility_t3562260209_il2cpp_TypeInfo_var;
extern Il2CppClass* NetUnreliableSenderChannel_t1909769502_il2cpp_TypeInfo_var;
extern Il2CppClass* NetReliableSenderChannel_t2899775811_il2cpp_TypeInfo_var;
extern const uint32_t NetConnection_CreateSenderChannel_m4115641717_MetadataUsageId;
extern "C" NetSenderChannelBase_t3096690204 * NetConnection_CreateSenderChannel_m4115641717 (NetConnection_t3331492029 * __this, uint8_t ___tp0, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetConnection_CreateSenderChannel_m4115641717_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
NetSenderChannelBase_t3096690204 * V_0 = NULL;
uint8_t V_1 = 0;
int32_t V_2 = 0;
int32_t V_3 = 0;
NetSenderChannelBase_t3096690204 * V_4 = NULL;
NetSenderChannelBaseU5BU5D_t470374901* V_5 = NULL;
bool V_6 = false;
uint8_t V_7 = 0;
Exception_t1927440687 * __last_unhandled_exception = 0;
NO_UNUSED_WARNING (__last_unhandled_exception);
Exception_t1927440687 * __exception_local = 0;
NO_UNUSED_WARNING (__exception_local);
int32_t __leave_target = 0;
NO_UNUSED_WARNING (__leave_target);
{
NetSenderChannelBaseU5BU5D_t470374901* L_0 = __this->get_m_sendChannels_6();
NetSenderChannelBaseU5BU5D_t470374901* L_1 = L_0;
V_5 = L_1;
Monitor_Enter_m2136705809(NULL /*static, unused*/, (Il2CppObject *)(Il2CppObject *)L_1, /*hidden argument*/NULL);
}
IL_0010:
try
{ // begin try (depth: 1)
{
uint8_t L_2 = ___tp0;
IL2CPP_RUNTIME_CLASS_INIT(NetUtility_t3562260209_il2cpp_TypeInfo_var);
uint8_t L_3 = NetUtility_GetDeliveryMethod_m2383198164(NULL /*static, unused*/, L_2, /*hidden argument*/NULL);
V_1 = L_3;
uint8_t L_4 = ___tp0;
uint8_t L_5 = V_1;
V_2 = ((int32_t)((int32_t)L_4-(int32_t)L_5));
uint8_t L_6 = V_1;
int32_t L_7 = V_2;
V_3 = ((int32_t)((int32_t)((int32_t)((int32_t)L_6-(int32_t)1))+(int32_t)L_7));
NetSenderChannelBaseU5BU5D_t470374901* L_8 = __this->get_m_sendChannels_6();
int32_t L_9 = V_3;
NullCheck(L_8);
IL2CPP_ARRAY_BOUNDS_CHECK(L_8, L_9);
int32_t L_10 = L_9;
NetSenderChannelBase_t3096690204 * L_11 = (L_8)->GetAt(static_cast<il2cpp_array_size_t>(L_10));
V_6 = (bool)((((Il2CppObject*)(NetSenderChannelBase_t3096690204 *)L_11) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0);
bool L_12 = V_6;
if (L_12)
{
goto IL_0040;
}
}
IL_0033:
{
NetSenderChannelBaseU5BU5D_t470374901* L_13 = __this->get_m_sendChannels_6();
int32_t L_14 = V_3;
NullCheck(L_13);
IL2CPP_ARRAY_BOUNDS_CHECK(L_13, L_14);
int32_t L_15 = L_14;
NetSenderChannelBase_t3096690204 * L_16 = (L_13)->GetAt(static_cast<il2cpp_array_size_t>(L_15));
V_0 = L_16;
goto IL_00a7;
}
IL_0040:
{
uint8_t L_17 = V_1;
V_7 = L_17;
uint8_t L_18 = V_7;
if (((int32_t)((int32_t)L_18-(int32_t)1)) == 0)
{
goto IL_006f;
}
if (((int32_t)((int32_t)L_18-(int32_t)1)) == 1)
{
goto IL_006f;
}
}
IL_0055:
{
uint8_t L_19 = V_7;
if (((int32_t)((int32_t)L_19-(int32_t)((int32_t)34))) == 0)
{
goto IL_008e;
}
if (((int32_t)((int32_t)L_19-(int32_t)((int32_t)34))) == 1)
{
goto IL_008e;
}
}
IL_0067:
{
uint8_t L_20 = V_7;
if ((((int32_t)L_20) == ((int32_t)((int32_t)67))))
{
goto IL_007f;
}
}
IL_006d:
{
goto IL_008e;
}
IL_006f:
{
uint8_t L_21 = V_1;
IL2CPP_RUNTIME_CLASS_INIT(NetUtility_t3562260209_il2cpp_TypeInfo_var);
int32_t L_22 = NetUtility_GetWindowSize_m1637041950(NULL /*static, unused*/, L_21, /*hidden argument*/NULL);
uint8_t L_23 = V_1;
NetUnreliableSenderChannel_t1909769502 * L_24 = (NetUnreliableSenderChannel_t1909769502 *)il2cpp_codegen_object_new(NetUnreliableSenderChannel_t1909769502_il2cpp_TypeInfo_var);
NetUnreliableSenderChannel__ctor_m2332360361(L_24, __this, L_22, L_23, /*hidden argument*/NULL);
V_0 = L_24;
goto IL_009d;
}
IL_007f:
{
uint8_t L_25 = V_1;
IL2CPP_RUNTIME_CLASS_INIT(NetUtility_t3562260209_il2cpp_TypeInfo_var);
int32_t L_26 = NetUtility_GetWindowSize_m1637041950(NULL /*static, unused*/, L_25, /*hidden argument*/NULL);
NetReliableSenderChannel_t2899775811 * L_27 = (NetReliableSenderChannel_t2899775811 *)il2cpp_codegen_object_new(NetReliableSenderChannel_t2899775811_il2cpp_TypeInfo_var);
NetReliableSenderChannel__ctor_m2647494615(L_27, __this, L_26, /*hidden argument*/NULL);
V_0 = L_27;
goto IL_009d;
}
IL_008e:
{
uint8_t L_28 = V_1;
IL2CPP_RUNTIME_CLASS_INIT(NetUtility_t3562260209_il2cpp_TypeInfo_var);
int32_t L_29 = NetUtility_GetWindowSize_m1637041950(NULL /*static, unused*/, L_28, /*hidden argument*/NULL);
NetReliableSenderChannel_t2899775811 * L_30 = (NetReliableSenderChannel_t2899775811 *)il2cpp_codegen_object_new(NetReliableSenderChannel_t2899775811_il2cpp_TypeInfo_var);
NetReliableSenderChannel__ctor_m2647494615(L_30, __this, L_29, /*hidden argument*/NULL);
V_0 = L_30;
goto IL_009d;
}
IL_009d:
{
NetSenderChannelBaseU5BU5D_t470374901* L_31 = __this->get_m_sendChannels_6();
int32_t L_32 = V_3;
NetSenderChannelBase_t3096690204 * L_33 = V_0;
NullCheck(L_31);
IL2CPP_ARRAY_BOUNDS_CHECK(L_31, L_32);
ArrayElementTypeCheck (L_31, L_33);
(L_31)->SetAt(static_cast<il2cpp_array_size_t>(L_32), (NetSenderChannelBase_t3096690204 *)L_33);
}
IL_00a7:
{
IL2CPP_LEAVE(0xB3, FINALLY_00aa);
}
} // end try (depth: 1)
catch(Il2CppExceptionWrapper& e)
{
__last_unhandled_exception = (Exception_t1927440687 *)e.ex;
goto FINALLY_00aa;
}
FINALLY_00aa:
{ // begin finally (depth: 1)
NetSenderChannelBaseU5BU5D_t470374901* L_34 = V_5;
Monitor_Exit_m2677760297(NULL /*static, unused*/, (Il2CppObject *)(Il2CppObject *)L_34, /*hidden argument*/NULL);
IL2CPP_END_FINALLY(170)
} // end finally (depth: 1)
IL2CPP_CLEANUP(170)
{
IL2CPP_JUMP_TBL(0xB3, IL_00b3)
IL2CPP_RETHROW_IF_UNHANDLED(Exception_t1927440687 *)
}
IL_00b3:
{
NetSenderChannelBase_t3096690204 * L_35 = V_0;
V_4 = L_35;
goto IL_00b9;
}
IL_00b9:
{
NetSenderChannelBase_t3096690204 * L_36 = V_4;
return L_36;
}
}
// System.Void Lidgren.Network.NetConnection::ReceivedLibraryMessage(Lidgren.Network.NetMessageType,System.Int32,System.Int32)
extern Il2CppClass* NetTime_t3056501352_il2cpp_TypeInfo_var;
extern Il2CppClass* NetMessageType_t191235414_il2cpp_TypeInfo_var;
extern Il2CppClass* String_t_il2cpp_TypeInfo_var;
extern const MethodInfo* NetTuple_2__ctor_m2674576177_MethodInfo_var;
extern const MethodInfo* NetQueue_1_Enqueue_m2553464330_MethodInfo_var;
extern Il2CppCodeGenString* _stringLiteral1031971635;
extern Il2CppCodeGenString* _stringLiteral1195162060;
extern Il2CppCodeGenString* _stringLiteral2567606853;
extern Il2CppCodeGenString* _stringLiteral401183843;
extern Il2CppCodeGenString* _stringLiteral4058921736;
extern const uint32_t NetConnection_ReceivedLibraryMessage_m3458110466_MetadataUsageId;
extern "C" void NetConnection_ReceivedLibraryMessage_m3458110466 (NetConnection_t3331492029 * __this, uint8_t ___tp0, int32_t ___ptr1, int32_t ___payloadLength2, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetConnection_ReceivedLibraryMessage_m3458110466_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
double V_0 = 0.0;
NetIncomingMessage_t2014089816 * V_1 = NULL;
int32_t V_2 = 0;
uint8_t V_3 = 0;
int32_t V_4 = 0;
int32_t V_5 = 0;
NetIncomingMessage_t2014089816 * V_6 = NULL;
int32_t V_7 = 0;
float V_8 = 0.0f;
NetIncomingMessage_t2014089816 * V_9 = NULL;
int32_t V_10 = 0;
uint8_t V_11 = 0;
bool V_12 = false;
{
NetPeer_t1779390221 * L_0 = __this->get_m_peer_0();
NullCheck(L_0);
NetPeer_VerifyNetworkThread_m4075953563(L_0, /*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(NetTime_t3056501352_il2cpp_TypeInfo_var);
double L_1 = NetTime_get_Now_m1609702533(NULL /*static, unused*/, /*hidden argument*/NULL);
V_0 = L_1;
uint8_t L_2 = ___tp0;
V_11 = L_2;
uint8_t L_3 = V_11;
if (((int32_t)((int32_t)L_3-(int32_t)((int32_t)128))) == 0)
{
goto IL_009b;
}
if (((int32_t)((int32_t)L_3-(int32_t)((int32_t)128))) == 1)
{
goto IL_014b;
}
if (((int32_t)((int32_t)L_3-(int32_t)((int32_t)128))) == 2)
{
goto IL_016d;
}
if (((int32_t)((int32_t)L_3-(int32_t)((int32_t)128))) == 3)
{
goto IL_0060;
}
if (((int32_t)((int32_t)L_3-(int32_t)((int32_t)128))) == 4)
{
goto IL_0086;
}
if (((int32_t)((int32_t)L_3-(int32_t)((int32_t)128))) == 5)
{
goto IL_0096;
}
if (((int32_t)((int32_t)L_3-(int32_t)((int32_t)128))) == 6)
{
goto IL_00de;
}
if (((int32_t)((int32_t)L_3-(int32_t)((int32_t)128))) == 7)
{
goto IL_00b1;
}
if (((int32_t)((int32_t)L_3-(int32_t)((int32_t)128))) == 8)
{
goto IL_0206;
}
if (((int32_t)((int32_t)L_3-(int32_t)((int32_t)128))) == 9)
{
goto IL_0206;
}
if (((int32_t)((int32_t)L_3-(int32_t)((int32_t)128))) == 10)
{
goto IL_0206;
}
if (((int32_t)((int32_t)L_3-(int32_t)((int32_t)128))) == 11)
{
goto IL_01f7;
}
if (((int32_t)((int32_t)L_3-(int32_t)((int32_t)128))) == 12)
{
goto IL_019f;
}
if (((int32_t)((int32_t)L_3-(int32_t)((int32_t)128))) == 13)
{
goto IL_01a9;
}
}
{
goto IL_0206;
}
IL_0060:
{
NetPeer_t1779390221 * L_4 = __this->get_m_peer_0();
uint8_t L_5 = ___tp0;
uint8_t L_6 = L_5;
Il2CppObject * L_7 = Box(NetMessageType_t191235414_il2cpp_TypeInfo_var, &L_6);
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_8 = String_Concat_m2000667605(NULL /*static, unused*/, _stringLiteral1031971635, L_7, _stringLiteral1195162060, /*hidden argument*/NULL);
NullCheck(L_4);
NetPeer_LogDebug_m2983960595(L_4, L_8, /*hidden argument*/NULL);
goto IL_0224;
}
IL_0086:
{
double L_9 = V_0;
uint8_t L_10 = ___tp0;
int32_t L_11 = ___ptr1;
int32_t L_12 = ___payloadLength2;
NetConnection_HandleConnectResponse_m2887867750(__this, L_9, L_10, L_11, L_12, /*hidden argument*/NULL);
goto IL_0224;
}
IL_0096:
{
goto IL_0224;
}
IL_009b:
{
NetPeer_t1779390221 * L_13 = __this->get_m_peer_0();
NullCheck(L_13);
NetPeer_ThrowOrLog_m2301784333(L_13, _stringLiteral2567606853, /*hidden argument*/NULL);
goto IL_0224;
}
IL_00b1:
{
NetPeer_t1779390221 * L_14 = __this->get_m_peer_0();
int32_t L_15 = ___ptr1;
int32_t L_16 = ___payloadLength2;
NullCheck(L_14);
NetIncomingMessage_t2014089816 * L_17 = NetPeer_SetupReadHelperMessage_m906183392(L_14, L_15, L_16, /*hidden argument*/NULL);
V_1 = L_17;
__this->set_m_disconnectRequested_16((bool)1);
NetIncomingMessage_t2014089816 * L_18 = V_1;
NullCheck(L_18);
String_t* L_19 = NetBuffer_ReadString_m1223210798(L_18, /*hidden argument*/NULL);
__this->set_m_disconnectMessage_18(L_19);
__this->set_m_disconnectReqSendBye_17((bool)0);
goto IL_0224;
}
IL_00de:
{
V_2 = 0;
goto IL_013c;
}
IL_00e2:
{
NetPeer_t1779390221 * L_20 = __this->get_m_peer_0();
NullCheck(L_20);
ByteU5BU5D_t3397334013* L_21 = L_20->get_m_receiveBuffer_12();
int32_t L_22 = ___ptr1;
int32_t L_23 = L_22;
___ptr1 = ((int32_t)((int32_t)L_23+(int32_t)1));
NullCheck(L_21);
IL2CPP_ARRAY_BOUNDS_CHECK(L_21, L_23);
int32_t L_24 = L_23;
uint8_t L_25 = (L_21)->GetAt(static_cast<il2cpp_array_size_t>(L_24));
V_3 = L_25;
NetPeer_t1779390221 * L_26 = __this->get_m_peer_0();
NullCheck(L_26);
ByteU5BU5D_t3397334013* L_27 = L_26->get_m_receiveBuffer_12();
int32_t L_28 = ___ptr1;
int32_t L_29 = L_28;
___ptr1 = ((int32_t)((int32_t)L_29+(int32_t)1));
NullCheck(L_27);
IL2CPP_ARRAY_BOUNDS_CHECK(L_27, L_29);
int32_t L_30 = L_29;
uint8_t L_31 = (L_27)->GetAt(static_cast<il2cpp_array_size_t>(L_30));
V_4 = L_31;
int32_t L_32 = V_4;
NetPeer_t1779390221 * L_33 = __this->get_m_peer_0();
NullCheck(L_33);
ByteU5BU5D_t3397334013* L_34 = L_33->get_m_receiveBuffer_12();
int32_t L_35 = ___ptr1;
int32_t L_36 = L_35;
___ptr1 = ((int32_t)((int32_t)L_36+(int32_t)1));
NullCheck(L_34);
IL2CPP_ARRAY_BOUNDS_CHECK(L_34, L_36);
int32_t L_37 = L_36;
uint8_t L_38 = (L_34)->GetAt(static_cast<il2cpp_array_size_t>(L_37));
V_4 = ((int32_t)((int32_t)L_32|(int32_t)((int32_t)((int32_t)L_38<<(int32_t)8))));
NetQueue_1_t1156019562 * L_39 = __this->get_m_queuedIncomingAcks_11();
uint8_t L_40 = V_3;
int32_t L_41 = V_4;
NetTuple_2_t3234296172 L_42;
memset(&L_42, 0, sizeof(L_42));
NetTuple_2__ctor_m2674576177(&L_42, L_40, L_41, /*hidden argument*/NetTuple_2__ctor_m2674576177_MethodInfo_var);
NullCheck(L_39);
NetQueue_1_Enqueue_m2553464330(L_39, L_42, /*hidden argument*/NetQueue_1_Enqueue_m2553464330_MethodInfo_var);
int32_t L_43 = V_2;
V_2 = ((int32_t)((int32_t)L_43+(int32_t)3));
}
IL_013c:
{
int32_t L_44 = V_2;
int32_t L_45 = ___payloadLength2;
V_12 = (bool)((((int32_t)L_44) < ((int32_t)L_45))? 1 : 0);
bool L_46 = V_12;
if (L_46)
{
goto IL_00e2;
}
}
{
goto IL_0224;
}
IL_014b:
{
NetPeer_t1779390221 * L_47 = __this->get_m_peer_0();
NullCheck(L_47);
ByteU5BU5D_t3397334013* L_48 = L_47->get_m_receiveBuffer_12();
int32_t L_49 = ___ptr1;
int32_t L_50 = L_49;
___ptr1 = ((int32_t)((int32_t)L_50+(int32_t)1));
NullCheck(L_48);
IL2CPP_ARRAY_BOUNDS_CHECK(L_48, L_50);
int32_t L_51 = L_50;
uint8_t L_52 = (L_48)->GetAt(static_cast<il2cpp_array_size_t>(L_51));
V_5 = L_52;
int32_t L_53 = V_5;
NetConnection_SendPong_m2305285507(__this, L_53, /*hidden argument*/NULL);
goto IL_0224;
}
IL_016d:
{
NetPeer_t1779390221 * L_54 = __this->get_m_peer_0();
int32_t L_55 = ___ptr1;
int32_t L_56 = ___payloadLength2;
NullCheck(L_54);
NetIncomingMessage_t2014089816 * L_57 = NetPeer_SetupReadHelperMessage_m906183392(L_54, L_55, L_56, /*hidden argument*/NULL);
V_6 = L_57;
NetIncomingMessage_t2014089816 * L_58 = V_6;
NullCheck(L_58);
uint8_t L_59 = NetBuffer_ReadByte_m3348400846(L_58, /*hidden argument*/NULL);
V_7 = L_59;
NetIncomingMessage_t2014089816 * L_60 = V_6;
NullCheck(L_60);
float L_61 = NetBuffer_ReadSingle_m2767420110(L_60, /*hidden argument*/NULL);
V_8 = L_61;
double L_62 = V_0;
int32_t L_63 = V_7;
float L_64 = V_8;
NetConnection_ReceivedPong_m1658356675(__this, L_62, L_63, L_64, /*hidden argument*/NULL);
goto IL_0224;
}
IL_019f:
{
int32_t L_65 = ___payloadLength2;
NetConnection_SendMTUSuccess_m827100686(__this, L_65, /*hidden argument*/NULL);
goto IL_0224;
}
IL_01a9:
{
NetPeer_t1779390221 * L_66 = __this->get_m_peer_0();
NullCheck(L_66);
NetPeerConfiguration_t136603591 * L_67 = NetPeer_get_Configuration_m323836264(L_66, /*hidden argument*/NULL);
NullCheck(L_67);
bool L_68 = NetPeerConfiguration_get_AutoExpandMTU_m1376610458(L_67, /*hidden argument*/NULL);
V_12 = L_68;
bool L_69 = V_12;
if (L_69)
{
goto IL_01d3;
}
}
{
NetPeer_t1779390221 * L_70 = __this->get_m_peer_0();
NullCheck(L_70);
NetPeer_LogDebug_m2983960595(L_70, _stringLiteral401183843, /*hidden argument*/NULL);
goto IL_0224;
}
IL_01d3:
{
NetPeer_t1779390221 * L_71 = __this->get_m_peer_0();
int32_t L_72 = ___ptr1;
int32_t L_73 = ___payloadLength2;
NullCheck(L_71);
NetIncomingMessage_t2014089816 * L_74 = NetPeer_SetupReadHelperMessage_m906183392(L_71, L_72, L_73, /*hidden argument*/NULL);
V_9 = L_74;
NetIncomingMessage_t2014089816 * L_75 = V_9;
NullCheck(L_75);
int32_t L_76 = NetBuffer_ReadInt32_m2479521906(L_75, /*hidden argument*/NULL);
V_10 = L_76;
double L_77 = V_0;
int32_t L_78 = V_10;
NetConnection_HandleExpandMTUSuccess_m3820777494(__this, L_77, L_78, /*hidden argument*/NULL);
goto IL_0224;
}
IL_01f7:
{
NetPeer_t1779390221 * L_79 = __this->get_m_peer_0();
int32_t L_80 = ___ptr1;
NullCheck(L_79);
NetPeer_HandleNatIntroduction_m4079714032(L_79, L_80, /*hidden argument*/NULL);
goto IL_0224;
}
IL_0206:
{
NetPeer_t1779390221 * L_81 = __this->get_m_peer_0();
uint8_t L_82 = ___tp0;
uint8_t L_83 = L_82;
Il2CppObject * L_84 = Box(NetMessageType_t191235414_il2cpp_TypeInfo_var, &L_83);
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_85 = String_Concat_m56707527(NULL /*static, unused*/, _stringLiteral4058921736, L_84, /*hidden argument*/NULL);
NullCheck(L_81);
NetPeer_LogWarning_m3266657906(L_81, L_85, /*hidden argument*/NULL);
goto IL_0224;
}
IL_0224:
{
return;
}
}
// System.Void Lidgren.Network.NetConnection::ReceivedMessage(Lidgren.Network.NetIncomingMessage)
extern "C" void NetConnection_ReceivedMessage_m864391479 (NetConnection_t3331492029 * __this, NetIncomingMessage_t2014089816 * ___msg0, const MethodInfo* method)
{
uint8_t V_0 = 0;
int32_t V_1 = 0;
NetReceiverChannelBase_t908288882 * V_2 = NULL;
bool V_3 = false;
{
NetPeer_t1779390221 * L_0 = __this->get_m_peer_0();
NullCheck(L_0);
NetPeer_VerifyNetworkThread_m4075953563(L_0, /*hidden argument*/NULL);
NetIncomingMessage_t2014089816 * L_1 = ___msg0;
NullCheck(L_1);
uint8_t L_2 = L_1->get_m_receivedMessageType_9();
V_0 = L_2;
uint8_t L_3 = V_0;
V_1 = ((int32_t)((int32_t)L_3-(int32_t)1));
NetReceiverChannelBaseU5BU5D_t1250440839* L_4 = __this->get_m_receiveChannels_7();
int32_t L_5 = V_1;
NullCheck(L_4);
IL2CPP_ARRAY_BOUNDS_CHECK(L_4, L_5);
int32_t L_6 = L_5;
NetReceiverChannelBase_t908288882 * L_7 = (L_4)->GetAt(static_cast<il2cpp_array_size_t>(L_6));
V_2 = L_7;
NetReceiverChannelBase_t908288882 * L_8 = V_2;
V_3 = (bool)((((int32_t)((((Il2CppObject*)(NetReceiverChannelBase_t908288882 *)L_8) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_9 = V_3;
if (L_9)
{
goto IL_0034;
}
}
{
uint8_t L_10 = V_0;
NetReceiverChannelBase_t908288882 * L_11 = NetConnection_CreateReceiverChannel_m1916476265(__this, L_10, /*hidden argument*/NULL);
V_2 = L_11;
}
IL_0034:
{
NetReceiverChannelBase_t908288882 * L_12 = V_2;
NetIncomingMessage_t2014089816 * L_13 = ___msg0;
NullCheck(L_12);
VirtActionInvoker1< NetIncomingMessage_t2014089816 * >::Invoke(4 /* System.Void Lidgren.Network.NetReceiverChannelBase::ReceiveMessage(Lidgren.Network.NetIncomingMessage) */, L_12, L_13);
return;
}
}
// Lidgren.Network.NetReceiverChannelBase Lidgren.Network.NetConnection::CreateReceiverChannel(Lidgren.Network.NetMessageType)
extern Il2CppClass* NetUtility_t3562260209_il2cpp_TypeInfo_var;
extern Il2CppClass* NetUnreliableUnorderedReceiver_t3541921227_il2cpp_TypeInfo_var;
extern Il2CppClass* NetReliableOrderedReceiver_t2554037675_il2cpp_TypeInfo_var;
extern Il2CppClass* NetUnreliableSequencedReceiver_t2497601560_il2cpp_TypeInfo_var;
extern Il2CppClass* NetReliableUnorderedReceiver_t3992686328_il2cpp_TypeInfo_var;
extern Il2CppClass* NetReliableSequencedReceiver_t2385271929_il2cpp_TypeInfo_var;
extern Il2CppClass* NetException_t2452891498_il2cpp_TypeInfo_var;
extern Il2CppCodeGenString* _stringLiteral2124365638;
extern const uint32_t NetConnection_CreateReceiverChannel_m1916476265_MetadataUsageId;
extern "C" NetReceiverChannelBase_t908288882 * NetConnection_CreateReceiverChannel_m1916476265 (NetConnection_t3331492029 * __this, uint8_t ___tp0, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetConnection_CreateReceiverChannel_m1916476265_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
NetReceiverChannelBase_t908288882 * V_0 = NULL;
uint8_t V_1 = 0;
int32_t V_2 = 0;
NetReceiverChannelBase_t908288882 * V_3 = NULL;
uint8_t V_4 = 0;
{
NetPeer_t1779390221 * L_0 = __this->get_m_peer_0();
NullCheck(L_0);
NetPeer_VerifyNetworkThread_m4075953563(L_0, /*hidden argument*/NULL);
uint8_t L_1 = ___tp0;
IL2CPP_RUNTIME_CLASS_INIT(NetUtility_t3562260209_il2cpp_TypeInfo_var);
uint8_t L_2 = NetUtility_GetDeliveryMethod_m2383198164(NULL /*static, unused*/, L_1, /*hidden argument*/NULL);
V_1 = L_2;
uint8_t L_3 = V_1;
V_4 = L_3;
uint8_t L_4 = V_4;
if (((int32_t)((int32_t)L_4-(int32_t)1)) == 0)
{
goto IL_0042;
}
if (((int32_t)((int32_t)L_4-(int32_t)1)) == 1)
{
goto IL_0056;
}
}
{
uint8_t L_5 = V_4;
if (((int32_t)((int32_t)L_5-(int32_t)((int32_t)34))) == 0)
{
goto IL_005f;
}
if (((int32_t)((int32_t)L_5-(int32_t)((int32_t)34))) == 1)
{
goto IL_006a;
}
}
{
uint8_t L_6 = V_4;
if ((((int32_t)L_6) == ((int32_t)((int32_t)67))))
{
goto IL_004b;
}
}
{
goto IL_0075;
}
IL_0042:
{
NetUnreliableUnorderedReceiver_t3541921227 * L_7 = (NetUnreliableUnorderedReceiver_t3541921227 *)il2cpp_codegen_object_new(NetUnreliableUnorderedReceiver_t3541921227_il2cpp_TypeInfo_var);
NetUnreliableUnorderedReceiver__ctor_m3560667024(L_7, __this, /*hidden argument*/NULL);
V_0 = L_7;
goto IL_0080;
}
IL_004b:
{
NetReliableOrderedReceiver_t2554037675 * L_8 = (NetReliableOrderedReceiver_t2554037675 *)il2cpp_codegen_object_new(NetReliableOrderedReceiver_t2554037675_il2cpp_TypeInfo_var);
NetReliableOrderedReceiver__ctor_m3553848617(L_8, __this, ((int32_t)64), /*hidden argument*/NULL);
V_0 = L_8;
goto IL_0080;
}
IL_0056:
{
NetUnreliableSequencedReceiver_t2497601560 * L_9 = (NetUnreliableSequencedReceiver_t2497601560 *)il2cpp_codegen_object_new(NetUnreliableSequencedReceiver_t2497601560_il2cpp_TypeInfo_var);
NetUnreliableSequencedReceiver__ctor_m3415245671(L_9, __this, /*hidden argument*/NULL);
V_0 = L_9;
goto IL_0080;
}
IL_005f:
{
NetReliableUnorderedReceiver_t3992686328 * L_10 = (NetReliableUnorderedReceiver_t3992686328 *)il2cpp_codegen_object_new(NetReliableUnorderedReceiver_t3992686328_il2cpp_TypeInfo_var);
NetReliableUnorderedReceiver__ctor_m1507047812(L_10, __this, ((int32_t)64), /*hidden argument*/NULL);
V_0 = L_10;
goto IL_0080;
}
IL_006a:
{
NetReliableSequencedReceiver_t2385271929 * L_11 = (NetReliableSequencedReceiver_t2385271929 *)il2cpp_codegen_object_new(NetReliableSequencedReceiver_t2385271929_il2cpp_TypeInfo_var);
NetReliableSequencedReceiver__ctor_m408695305(L_11, __this, ((int32_t)64), /*hidden argument*/NULL);
V_0 = L_11;
goto IL_0080;
}
IL_0075:
{
NetException_t2452891498 * L_12 = (NetException_t2452891498 *)il2cpp_codegen_object_new(NetException_t2452891498_il2cpp_TypeInfo_var);
NetException__ctor_m2724322251(L_12, _stringLiteral2124365638, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_12);
}
IL_0080:
{
uint8_t L_13 = ___tp0;
V_2 = ((int32_t)((int32_t)L_13-(int32_t)1));
NetReceiverChannelBaseU5BU5D_t1250440839* L_14 = __this->get_m_receiveChannels_7();
int32_t L_15 = V_2;
NullCheck(L_14);
IL2CPP_ARRAY_BOUNDS_CHECK(L_14, L_15);
int32_t L_16 = L_15;
NetReceiverChannelBase_t908288882 * L_17 = (L_14)->GetAt(static_cast<il2cpp_array_size_t>(L_16));
NetException_Assert_m1426298558(NULL /*static, unused*/, (bool)((((Il2CppObject*)(NetReceiverChannelBase_t908288882 *)L_17) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0), /*hidden argument*/NULL);
NetReceiverChannelBaseU5BU5D_t1250440839* L_18 = __this->get_m_receiveChannels_7();
int32_t L_19 = V_2;
NetReceiverChannelBase_t908288882 * L_20 = V_0;
NullCheck(L_18);
IL2CPP_ARRAY_BOUNDS_CHECK(L_18, L_19);
ArrayElementTypeCheck (L_18, L_20);
(L_18)->SetAt(static_cast<il2cpp_array_size_t>(L_19), (NetReceiverChannelBase_t908288882 *)L_20);
NetReceiverChannelBase_t908288882 * L_21 = V_0;
V_3 = L_21;
goto IL_00a2;
}
IL_00a2:
{
NetReceiverChannelBase_t908288882 * L_22 = V_3;
return L_22;
}
}
// System.Void Lidgren.Network.NetConnection::QueueAck(Lidgren.Network.NetMessageType,System.Int32)
extern const MethodInfo* NetTuple_2__ctor_m2674576177_MethodInfo_var;
extern const MethodInfo* NetQueue_1_Enqueue_m2553464330_MethodInfo_var;
extern const uint32_t NetConnection_QueueAck_m3101883724_MetadataUsageId;
extern "C" void NetConnection_QueueAck_m3101883724 (NetConnection_t3331492029 * __this, uint8_t ___tp0, int32_t ___sequenceNumber1, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetConnection_QueueAck_m3101883724_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
{
NetQueue_1_t1156019562 * L_0 = __this->get_m_queuedOutgoingAcks_10();
uint8_t L_1 = ___tp0;
int32_t L_2 = ___sequenceNumber1;
NetTuple_2_t3234296172 L_3;
memset(&L_3, 0, sizeof(L_3));
NetTuple_2__ctor_m2674576177(&L_3, L_1, L_2, /*hidden argument*/NetTuple_2__ctor_m2674576177_MethodInfo_var);
NullCheck(L_0);
NetQueue_1_Enqueue_m2553464330(L_0, L_3, /*hidden argument*/NetQueue_1_Enqueue_m2553464330_MethodInfo_var);
return;
}
}
// System.Void Lidgren.Network.NetConnection::Shutdown(System.String)
extern "C" void NetConnection_Shutdown_m3044084954 (NetConnection_t3331492029 * __this, String_t* ___reason0, const MethodInfo* method)
{
{
String_t* L_0 = ___reason0;
NetConnection_ExecuteDisconnect_m666203348(__this, L_0, (bool)1, /*hidden argument*/NULL);
return;
}
}
// System.String Lidgren.Network.NetConnection::ToString()
extern Il2CppClass* String_t_il2cpp_TypeInfo_var;
extern Il2CppCodeGenString* _stringLiteral1779609581;
extern Il2CppCodeGenString* _stringLiteral372029425;
extern const uint32_t NetConnection_ToString_m1379453827_MetadataUsageId;
extern "C" String_t* NetConnection_ToString_m1379453827 (NetConnection_t3331492029 * __this, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetConnection_ToString_m1379453827_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
String_t* V_0 = NULL;
{
IPEndPoint_t2615413766 * L_0 = __this->get_m_remoteEndPoint_5();
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_1 = String_Concat_m2000667605(NULL /*static, unused*/, _stringLiteral1779609581, L_0, _stringLiteral372029425, /*hidden argument*/NULL);
V_0 = L_1;
goto IL_0019;
}
IL_0019:
{
String_t* L_2 = V_0;
return L_2;
}
}
// System.Void Lidgren.Network.NetConnection::UnconnectedHeartbeat(System.Double)
extern Il2CppClass* NetConnectionStatus_t952199027_il2cpp_TypeInfo_var;
extern Il2CppClass* String_t_il2cpp_TypeInfo_var;
extern Il2CppCodeGenString* _stringLiteral3845336161;
extern Il2CppCodeGenString* _stringLiteral1908377056;
extern Il2CppCodeGenString* _stringLiteral3524187948;
extern Il2CppCodeGenString* _stringLiteral3330822647;
extern const uint32_t NetConnection_UnconnectedHeartbeat_m3795858382_MetadataUsageId;
extern "C" void NetConnection_UnconnectedHeartbeat_m3795858382 (NetConnection_t3331492029 * __this, double ___now0, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetConnection_UnconnectedHeartbeat_m3795858382_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
bool V_0 = false;
int32_t V_1 = 0;
{
NetPeer_t1779390221 * L_0 = __this->get_m_peer_0();
NullCheck(L_0);
NetPeer_VerifyNetworkThread_m4075953563(L_0, /*hidden argument*/NULL);
bool L_1 = __this->get_m_disconnectRequested_16();
V_0 = (bool)((((int32_t)L_1) == ((int32_t)0))? 1 : 0);
bool L_2 = V_0;
if (L_2)
{
goto IL_0028;
}
}
{
String_t* L_3 = __this->get_m_disconnectMessage_18();
NetConnection_ExecuteDisconnect_m666203348(__this, L_3, (bool)1, /*hidden argument*/NULL);
}
IL_0028:
{
bool L_4 = __this->get_m_connectRequested_15();
V_0 = (bool)((((int32_t)L_4) == ((int32_t)0))? 1 : 0);
bool L_5 = V_0;
if (L_5)
{
goto IL_00a2;
}
}
{
int32_t L_6 = __this->get_m_status_2();
V_1 = L_6;
int32_t L_7 = V_1;
if (L_7 == 0)
{
goto IL_0093;
}
if (L_7 == 1)
{
goto IL_0074;
}
if (L_7 == 2)
{
goto IL_0093;
}
if (L_7 == 3)
{
goto IL_0093;
}
if (L_7 == 4)
{
goto IL_0065;
}
if (L_7 == 5)
{
goto IL_0065;
}
if (L_7 == 6)
{
goto IL_0091;
}
if (L_7 == 7)
{
goto IL_007e;
}
}
{
goto IL_0093;
}
IL_0065:
{
NetConnection_ExecuteDisconnect_m666203348(__this, _stringLiteral3845336161, (bool)1, /*hidden argument*/NULL);
goto IL_009d;
}
IL_0074:
{
double L_8 = ___now0;
NetConnection_SendConnect_m3418894170(__this, L_8, /*hidden argument*/NULL);
goto IL_009d;
}
IL_007e:
{
NetPeer_t1779390221 * L_9 = __this->get_m_peer_0();
NullCheck(L_9);
NetPeer_ThrowOrLog_m2301784333(L_9, _stringLiteral1908377056, /*hidden argument*/NULL);
goto IL_009d;
}
IL_0091:
{
goto IL_009d;
}
IL_0093:
{
double L_10 = ___now0;
NetConnection_SendConnect_m3418894170(__this, L_10, /*hidden argument*/NULL);
goto IL_009d;
}
IL_009d:
{
goto IL_014f;
}
IL_00a2:
{
double L_11 = ___now0;
double L_12 = __this->get_m_lastHandshakeSendTime_21();
NetPeerConfiguration_t136603591 * L_13 = __this->get_m_peerConfiguration_1();
NullCheck(L_13);
float L_14 = L_13->get_m_resendHandshakeInterval_20();
V_0 = (bool)((((int32_t)((((double)((double)((double)L_11-(double)L_12))) > ((double)(((double)((double)L_14)))))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_15 = V_0;
if (L_15)
{
goto IL_014f;
}
}
{
int32_t L_16 = __this->get_m_handshakeAttempts_22();
NetPeerConfiguration_t136603591 * L_17 = __this->get_m_peerConfiguration_1();
NullCheck(L_17);
int32_t L_18 = L_17->get_m_maximumHandshakeAttempts_21();
V_0 = (bool)((((int32_t)L_16) < ((int32_t)L_18))? 1 : 0);
bool L_19 = V_0;
if (L_19)
{
goto IL_00ea;
}
}
{
NetConnection_ExecuteDisconnect_m666203348(__this, _stringLiteral3524187948, (bool)1, /*hidden argument*/NULL);
goto IL_014f;
}
IL_00ea:
{
int32_t L_20 = __this->get_m_status_2();
V_1 = L_20;
int32_t L_21 = V_1;
if (L_21 == 0)
{
goto IL_012b;
}
if (L_21 == 1)
{
goto IL_010d;
}
if (L_21 == 2)
{
goto IL_012b;
}
if (L_21 == 3)
{
goto IL_0122;
}
if (L_21 == 4)
{
goto IL_0117;
}
}
{
goto IL_012b;
}
IL_010d:
{
double L_22 = ___now0;
NetConnection_SendConnect_m3418894170(__this, L_22, /*hidden argument*/NULL);
goto IL_014e;
}
IL_0117:
{
double L_23 = ___now0;
NetConnection_SendConnectResponse_m1494124902(__this, L_23, (bool)1, /*hidden argument*/NULL);
goto IL_014e;
}
IL_0122:
{
double L_24 = ___now0;
__this->set_m_lastHandshakeSendTime_21(L_24);
goto IL_014e;
}
IL_012b:
{
NetPeer_t1779390221 * L_25 = __this->get_m_peer_0();
int32_t L_26 = __this->get_m_status_2();
int32_t L_27 = L_26;
Il2CppObject * L_28 = Box(NetConnectionStatus_t952199027_il2cpp_TypeInfo_var, &L_27);
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_29 = String_Concat_m56707527(NULL /*static, unused*/, _stringLiteral3330822647, L_28, /*hidden argument*/NULL);
NullCheck(L_25);
NetPeer_LogWarning_m3266657906(L_25, L_29, /*hidden argument*/NULL);
goto IL_014e;
}
IL_014e:
{
}
IL_014f:
{
return;
}
}
// System.Void Lidgren.Network.NetConnection::ExecuteDisconnect(System.String,System.Boolean)
extern const MethodInfo* Dictionary_2_Remove_m2570672626_MethodInfo_var;
extern const uint32_t NetConnection_ExecuteDisconnect_m666203348_MetadataUsageId;
extern "C" void NetConnection_ExecuteDisconnect_m666203348 (NetConnection_t3331492029 * __this, String_t* ___reason0, bool ___sendByeMessage1, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetConnection_ExecuteDisconnect_m666203348_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
int32_t V_0 = 0;
NetSenderChannelBase_t3096690204 * V_1 = NULL;
bool V_2 = false;
Dictionary_2_t3898409514 * V_3 = NULL;
Exception_t1927440687 * __last_unhandled_exception = 0;
NO_UNUSED_WARNING (__last_unhandled_exception);
Exception_t1927440687 * __exception_local = 0;
NO_UNUSED_WARNING (__exception_local);
int32_t __leave_target = 0;
NO_UNUSED_WARNING (__leave_target);
{
NetPeer_t1779390221 * L_0 = __this->get_m_peer_0();
NullCheck(L_0);
NetPeer_VerifyNetworkThread_m4075953563(L_0, /*hidden argument*/NULL);
V_0 = 0;
goto IL_002f;
}
IL_0011:
{
NetSenderChannelBaseU5BU5D_t470374901* L_1 = __this->get_m_sendChannels_6();
int32_t L_2 = V_0;
NullCheck(L_1);
IL2CPP_ARRAY_BOUNDS_CHECK(L_1, L_2);
int32_t L_3 = L_2;
NetSenderChannelBase_t3096690204 * L_4 = (L_1)->GetAt(static_cast<il2cpp_array_size_t>(L_3));
V_1 = L_4;
NetSenderChannelBase_t3096690204 * L_5 = V_1;
V_2 = (bool)((((Il2CppObject*)(NetSenderChannelBase_t3096690204 *)L_5) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0);
bool L_6 = V_2;
if (L_6)
{
goto IL_002a;
}
}
{
NetSenderChannelBase_t3096690204 * L_7 = V_1;
NullCheck(L_7);
VirtActionInvoker0::Invoke(8 /* System.Void Lidgren.Network.NetSenderChannelBase::Reset() */, L_7);
}
IL_002a:
{
int32_t L_8 = V_0;
V_0 = ((int32_t)((int32_t)L_8+(int32_t)1));
}
IL_002f:
{
int32_t L_9 = V_0;
NetSenderChannelBaseU5BU5D_t470374901* L_10 = __this->get_m_sendChannels_6();
NullCheck(L_10);
V_2 = (bool)((((int32_t)L_9) < ((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_10)->max_length))))))? 1 : 0);
bool L_11 = V_2;
if (L_11)
{
goto IL_0011;
}
}
{
bool L_12 = ___sendByeMessage1;
V_2 = (bool)((((int32_t)L_12) == ((int32_t)0))? 1 : 0);
bool L_13 = V_2;
if (L_13)
{
goto IL_004f;
}
}
{
String_t* L_14 = ___reason0;
NetConnection_SendDisconnect_m1840522381(__this, L_14, (bool)1, /*hidden argument*/NULL);
}
IL_004f:
{
int32_t L_15 = __this->get_m_status_2();
V_2 = (bool)((((int32_t)((((int32_t)L_15) == ((int32_t)2))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_16 = V_2;
if (L_16)
{
goto IL_006a;
}
}
{
__this->set_m_status_2(7);
goto IL_0075;
}
IL_006a:
{
String_t* L_17 = ___reason0;
NetConnection_SetStatus_m2040093136(__this, 7, L_17, /*hidden argument*/NULL);
}
IL_0075:
{
NetPeer_t1779390221 * L_18 = __this->get_m_peer_0();
NullCheck(L_18);
Dictionary_2_t3898409514 * L_19 = L_18->get_m_handshakes_24();
Dictionary_2_t3898409514 * L_20 = L_19;
V_3 = L_20;
Monitor_Enter_m2136705809(NULL /*static, unused*/, L_20, /*hidden argument*/NULL);
}
IL_0088:
try
{ // begin try (depth: 1)
NetPeer_t1779390221 * L_21 = __this->get_m_peer_0();
NullCheck(L_21);
Dictionary_2_t3898409514 * L_22 = L_21->get_m_handshakes_24();
IPEndPoint_t2615413766 * L_23 = __this->get_m_remoteEndPoint_5();
NullCheck(L_22);
Dictionary_2_Remove_m2570672626(L_22, L_23, /*hidden argument*/Dictionary_2_Remove_m2570672626_MethodInfo_var);
IL2CPP_LEAVE(0xA9, FINALLY_00a1);
} // end try (depth: 1)
catch(Il2CppExceptionWrapper& e)
{
__last_unhandled_exception = (Exception_t1927440687 *)e.ex;
goto FINALLY_00a1;
}
FINALLY_00a1:
{ // begin finally (depth: 1)
Dictionary_2_t3898409514 * L_24 = V_3;
Monitor_Exit_m2677760297(NULL /*static, unused*/, L_24, /*hidden argument*/NULL);
IL2CPP_END_FINALLY(161)
} // end finally (depth: 1)
IL2CPP_CLEANUP(161)
{
IL2CPP_JUMP_TBL(0xA9, IL_00a9)
IL2CPP_RETHROW_IF_UNHANDLED(Exception_t1927440687 *)
}
IL_00a9:
{
__this->set_m_disconnectRequested_16((bool)0);
__this->set_m_connectRequested_15((bool)0);
__this->set_m_handshakeAttempts_22(0);
return;
}
}
// System.Void Lidgren.Network.NetConnection::SendConnect(System.Double)
extern Il2CppCodeGenString* _stringLiteral2935650295;
extern Il2CppCodeGenString* _stringLiteral1808009572;
extern const uint32_t NetConnection_SendConnect_m3418894170_MetadataUsageId;
extern "C" void NetConnection_SendConnect_m3418894170 (NetConnection_t3331492029 * __this, double ___now0, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetConnection_SendConnect_m3418894170_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
int32_t V_0 = 0;
NetOutgoingMessage_t2016542980 * V_1 = NULL;
bool V_2 = false;
int32_t G_B2_0 = 0;
int32_t G_B1_0 = 0;
int32_t G_B3_0 = 0;
int32_t G_B3_1 = 0;
{
NetPeer_t1779390221 * L_0 = __this->get_m_peer_0();
NullCheck(L_0);
NetPeer_VerifyNetworkThread_m4075953563(L_0, /*hidden argument*/NULL);
NetPeerConfiguration_t136603591 * L_1 = __this->get_m_peerConfiguration_1();
NullCheck(L_1);
String_t* L_2 = NetPeerConfiguration_get_AppIdentifier_m1563815312(L_1, /*hidden argument*/NULL);
NullCheck(L_2);
int32_t L_3 = String_get_Length_m1606060069(L_2, /*hidden argument*/NULL);
V_0 = ((int32_t)((int32_t)((int32_t)13)+(int32_t)L_3));
int32_t L_4 = V_0;
NetOutgoingMessage_t2016542980 * L_5 = __this->get_m_localHailMessage_8();
G_B1_0 = L_4;
if (!L_5)
{
G_B2_0 = L_4;
goto IL_0037;
}
}
{
NetOutgoingMessage_t2016542980 * L_6 = __this->get_m_localHailMessage_8();
NullCheck(L_6);
int32_t L_7 = NetBuffer_get_LengthBytes_m2765088638(L_6, /*hidden argument*/NULL);
G_B3_0 = L_7;
G_B3_1 = G_B1_0;
goto IL_0038;
}
IL_0037:
{
G_B3_0 = 0;
G_B3_1 = G_B2_0;
}
IL_0038:
{
V_0 = ((int32_t)((int32_t)G_B3_1+(int32_t)G_B3_0));
NetPeer_t1779390221 * L_8 = __this->get_m_peer_0();
int32_t L_9 = V_0;
NullCheck(L_8);
NetOutgoingMessage_t2016542980 * L_10 = NetPeer_CreateMessage_m3328975762(L_8, L_9, /*hidden argument*/NULL);
V_1 = L_10;
NetOutgoingMessage_t2016542980 * L_11 = V_1;
NullCheck(L_11);
L_11->set_m_messageType_5(((int32_t)131));
NetOutgoingMessage_t2016542980 * L_12 = V_1;
NetPeerConfiguration_t136603591 * L_13 = __this->get_m_peerConfiguration_1();
NullCheck(L_13);
String_t* L_14 = NetPeerConfiguration_get_AppIdentifier_m1563815312(L_13, /*hidden argument*/NULL);
NullCheck(L_12);
NetBuffer_Write_m962556565(L_12, L_14, /*hidden argument*/NULL);
NetOutgoingMessage_t2016542980 * L_15 = V_1;
NetPeer_t1779390221 * L_16 = __this->get_m_peer_0();
NullCheck(L_16);
int64_t L_17 = L_16->get_m_uniqueIdentifier_26();
NullCheck(L_15);
NetBuffer_Write_m4098639993(L_15, L_17, /*hidden argument*/NULL);
NetOutgoingMessage_t2016542980 * L_18 = V_1;
double L_19 = ___now0;
NullCheck(L_18);
NetBuffer_Write_m2191092918(L_18, (((float)((float)L_19))), /*hidden argument*/NULL);
NetOutgoingMessage_t2016542980 * L_20 = V_1;
NetConnection_WriteLocalHail_m1600369383(__this, L_20, /*hidden argument*/NULL);
NetPeer_t1779390221 * L_21 = __this->get_m_peer_0();
NetOutgoingMessage_t2016542980 * L_22 = V_1;
IPEndPoint_t2615413766 * L_23 = __this->get_m_remoteEndPoint_5();
NullCheck(L_21);
NetPeer_SendLibrary_m4133093622(L_21, L_22, L_23, /*hidden argument*/NULL);
__this->set_m_connectRequested_15((bool)0);
double L_24 = ___now0;
__this->set_m_lastHandshakeSendTime_21(L_24);
int32_t L_25 = __this->get_m_handshakeAttempts_22();
__this->set_m_handshakeAttempts_22(((int32_t)((int32_t)L_25+(int32_t)1)));
int32_t L_26 = __this->get_m_handshakeAttempts_22();
V_2 = (bool)((((int32_t)((((int32_t)L_26) > ((int32_t)1))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_27 = V_2;
if (L_27)
{
goto IL_00d8;
}
}
{
NetPeer_t1779390221 * L_28 = __this->get_m_peer_0();
NullCheck(L_28);
NetPeer_LogDebug_m2983960595(L_28, _stringLiteral2935650295, /*hidden argument*/NULL);
}
IL_00d8:
{
NetConnection_SetStatus_m2040093136(__this, 1, _stringLiteral1808009572, /*hidden argument*/NULL);
return;
}
}
// System.Void Lidgren.Network.NetConnection::SendConnectResponse(System.Double,System.Boolean)
extern const MethodInfo* NetTuple_2__ctor_m896140118_MethodInfo_var;
extern const MethodInfo* NetQueue_1_Enqueue_m1061700747_MethodInfo_var;
extern Il2CppCodeGenString* _stringLiteral3004604600;
extern Il2CppCodeGenString* _stringLiteral2417339459;
extern const uint32_t NetConnection_SendConnectResponse_m1494124902_MetadataUsageId;
extern "C" void NetConnection_SendConnectResponse_m1494124902 (NetConnection_t3331492029 * __this, double ___now0, bool ___onLibraryThread1, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetConnection_SendConnectResponse_m1494124902_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
NetOutgoingMessage_t2016542980 * V_0 = NULL;
bool V_1 = false;
int32_t G_B4_0 = 0;
NetPeer_t1779390221 * G_B4_1 = NULL;
int32_t G_B3_0 = 0;
NetPeer_t1779390221 * G_B3_1 = NULL;
int32_t G_B5_0 = 0;
int32_t G_B5_1 = 0;
NetPeer_t1779390221 * G_B5_2 = NULL;
{
bool L_0 = ___onLibraryThread1;
V_1 = (bool)((((int32_t)L_0) == ((int32_t)0))? 1 : 0);
bool L_1 = V_1;
if (L_1)
{
goto IL_0015;
}
}
{
NetPeer_t1779390221 * L_2 = __this->get_m_peer_0();
NullCheck(L_2);
NetPeer_VerifyNetworkThread_m4075953563(L_2, /*hidden argument*/NULL);
}
IL_0015:
{
NetPeer_t1779390221 * L_3 = __this->get_m_peer_0();
NetPeerConfiguration_t136603591 * L_4 = __this->get_m_peerConfiguration_1();
NullCheck(L_4);
String_t* L_5 = NetPeerConfiguration_get_AppIdentifier_m1563815312(L_4, /*hidden argument*/NULL);
NullCheck(L_5);
int32_t L_6 = String_get_Length_m1606060069(L_5, /*hidden argument*/NULL);
NetOutgoingMessage_t2016542980 * L_7 = __this->get_m_localHailMessage_8();
G_B3_0 = ((int32_t)((int32_t)L_6+(int32_t)((int32_t)13)));
G_B3_1 = L_3;
if (!L_7)
{
G_B4_0 = ((int32_t)((int32_t)L_6+(int32_t)((int32_t)13)));
G_B4_1 = L_3;
goto IL_0043;
}
}
{
NetOutgoingMessage_t2016542980 * L_8 = __this->get_m_localHailMessage_8();
NullCheck(L_8);
int32_t L_9 = NetBuffer_get_LengthBytes_m2765088638(L_8, /*hidden argument*/NULL);
G_B5_0 = L_9;
G_B5_1 = G_B3_0;
G_B5_2 = G_B3_1;
goto IL_0044;
}
IL_0043:
{
G_B5_0 = 0;
G_B5_1 = G_B4_0;
G_B5_2 = G_B4_1;
}
IL_0044:
{
NullCheck(G_B5_2);
NetOutgoingMessage_t2016542980 * L_10 = NetPeer_CreateMessage_m3328975762(G_B5_2, ((int32_t)((int32_t)G_B5_1+(int32_t)G_B5_0)), /*hidden argument*/NULL);
V_0 = L_10;
NetOutgoingMessage_t2016542980 * L_11 = V_0;
NullCheck(L_11);
L_11->set_m_messageType_5(((int32_t)132));
NetOutgoingMessage_t2016542980 * L_12 = V_0;
NetPeerConfiguration_t136603591 * L_13 = __this->get_m_peerConfiguration_1();
NullCheck(L_13);
String_t* L_14 = NetPeerConfiguration_get_AppIdentifier_m1563815312(L_13, /*hidden argument*/NULL);
NullCheck(L_12);
NetBuffer_Write_m962556565(L_12, L_14, /*hidden argument*/NULL);
NetOutgoingMessage_t2016542980 * L_15 = V_0;
NetPeer_t1779390221 * L_16 = __this->get_m_peer_0();
NullCheck(L_16);
int64_t L_17 = L_16->get_m_uniqueIdentifier_26();
NullCheck(L_15);
NetBuffer_Write_m4098639993(L_15, L_17, /*hidden argument*/NULL);
NetOutgoingMessage_t2016542980 * L_18 = V_0;
double L_19 = ___now0;
NullCheck(L_18);
NetBuffer_Write_m2191092918(L_18, (((float)((float)L_19))), /*hidden argument*/NULL);
NetOutgoingMessage_t2016542980 * L_20 = V_0;
NullCheck(L_20);
int32_t* L_21 = L_20->get_address_of_m_recyclingCount_7();
Interlocked_Increment_m129308425(NULL /*static, unused*/, L_21, /*hidden argument*/NULL);
NetOutgoingMessage_t2016542980 * L_22 = V_0;
NetConnection_WriteLocalHail_m1600369383(__this, L_22, /*hidden argument*/NULL);
bool L_23 = ___onLibraryThread1;
V_1 = (bool)((((int32_t)L_23) == ((int32_t)0))? 1 : 0);
bool L_24 = V_1;
if (L_24)
{
goto IL_00b5;
}
}
{
NetPeer_t1779390221 * L_25 = __this->get_m_peer_0();
NetOutgoingMessage_t2016542980 * L_26 = V_0;
IPEndPoint_t2615413766 * L_27 = __this->get_m_remoteEndPoint_5();
NullCheck(L_25);
NetPeer_SendLibrary_m4133093622(L_25, L_26, L_27, /*hidden argument*/NULL);
goto IL_00d2;
}
IL_00b5:
{
NetPeer_t1779390221 * L_28 = __this->get_m_peer_0();
NullCheck(L_28);
NetQueue_1_t1703294902 * L_29 = L_28->get_m_unsentUnconnectedMessages_23();
IPEndPoint_t2615413766 * L_30 = __this->get_m_remoteEndPoint_5();
NetOutgoingMessage_t2016542980 * L_31 = V_0;
NetTuple_2_t3781571512 L_32;
memset(&L_32, 0, sizeof(L_32));
NetTuple_2__ctor_m896140118(&L_32, L_30, L_31, /*hidden argument*/NetTuple_2__ctor_m896140118_MethodInfo_var);
NullCheck(L_29);
NetQueue_1_Enqueue_m1061700747(L_29, L_32, /*hidden argument*/NetQueue_1_Enqueue_m1061700747_MethodInfo_var);
}
IL_00d2:
{
double L_33 = ___now0;
__this->set_m_lastHandshakeSendTime_21(L_33);
int32_t L_34 = __this->get_m_handshakeAttempts_22();
__this->set_m_handshakeAttempts_22(((int32_t)((int32_t)L_34+(int32_t)1)));
int32_t L_35 = __this->get_m_handshakeAttempts_22();
V_1 = (bool)((((int32_t)((((int32_t)L_35) > ((int32_t)1))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_36 = V_1;
if (L_36)
{
goto IL_0108;
}
}
{
NetPeer_t1779390221 * L_37 = __this->get_m_peer_0();
NullCheck(L_37);
NetPeer_LogDebug_m2983960595(L_37, _stringLiteral3004604600, /*hidden argument*/NULL);
}
IL_0108:
{
NetConnection_SetStatus_m2040093136(__this, 4, _stringLiteral2417339459, /*hidden argument*/NULL);
return;
}
}
// System.Void Lidgren.Network.NetConnection::SendDisconnect(System.String,System.Boolean)
extern const MethodInfo* NetTuple_2__ctor_m896140118_MethodInfo_var;
extern const MethodInfo* NetQueue_1_Enqueue_m1061700747_MethodInfo_var;
extern const uint32_t NetConnection_SendDisconnect_m1840522381_MetadataUsageId;
extern "C" void NetConnection_SendDisconnect_m1840522381 (NetConnection_t3331492029 * __this, String_t* ___reason0, bool ___onLibraryThread1, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetConnection_SendDisconnect_m1840522381_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
NetOutgoingMessage_t2016542980 * V_0 = NULL;
bool V_1 = false;
{
bool L_0 = ___onLibraryThread1;
V_1 = (bool)((((int32_t)L_0) == ((int32_t)0))? 1 : 0);
bool L_1 = V_1;
if (L_1)
{
goto IL_0015;
}
}
{
NetPeer_t1779390221 * L_2 = __this->get_m_peer_0();
NullCheck(L_2);
NetPeer_VerifyNetworkThread_m4075953563(L_2, /*hidden argument*/NULL);
}
IL_0015:
{
NetPeer_t1779390221 * L_3 = __this->get_m_peer_0();
String_t* L_4 = ___reason0;
NullCheck(L_3);
NetOutgoingMessage_t2016542980 * L_5 = NetPeer_CreateMessage_m3445598245(L_3, L_4, /*hidden argument*/NULL);
V_0 = L_5;
NetOutgoingMessage_t2016542980 * L_6 = V_0;
NullCheck(L_6);
L_6->set_m_messageType_5(((int32_t)135));
NetOutgoingMessage_t2016542980 * L_7 = V_0;
NullCheck(L_7);
int32_t* L_8 = L_7->get_address_of_m_recyclingCount_7();
Interlocked_Increment_m129308425(NULL /*static, unused*/, L_8, /*hidden argument*/NULL);
bool L_9 = ___onLibraryThread1;
V_1 = (bool)((((int32_t)L_9) == ((int32_t)0))? 1 : 0);
bool L_10 = V_1;
if (L_10)
{
goto IL_0056;
}
}
{
NetPeer_t1779390221 * L_11 = __this->get_m_peer_0();
NetOutgoingMessage_t2016542980 * L_12 = V_0;
IPEndPoint_t2615413766 * L_13 = __this->get_m_remoteEndPoint_5();
NullCheck(L_11);
NetPeer_SendLibrary_m4133093622(L_11, L_12, L_13, /*hidden argument*/NULL);
goto IL_0073;
}
IL_0056:
{
NetPeer_t1779390221 * L_14 = __this->get_m_peer_0();
NullCheck(L_14);
NetQueue_1_t1703294902 * L_15 = L_14->get_m_unsentUnconnectedMessages_23();
IPEndPoint_t2615413766 * L_16 = __this->get_m_remoteEndPoint_5();
NetOutgoingMessage_t2016542980 * L_17 = V_0;
NetTuple_2_t3781571512 L_18;
memset(&L_18, 0, sizeof(L_18));
NetTuple_2__ctor_m896140118(&L_18, L_16, L_17, /*hidden argument*/NetTuple_2__ctor_m896140118_MethodInfo_var);
NullCheck(L_15);
NetQueue_1_Enqueue_m1061700747(L_15, L_18, /*hidden argument*/NetQueue_1_Enqueue_m1061700747_MethodInfo_var);
}
IL_0073:
{
return;
}
}
// System.Void Lidgren.Network.NetConnection::WriteLocalHail(Lidgren.Network.NetOutgoingMessage)
extern Il2CppClass* Int32_t2071877448_il2cpp_TypeInfo_var;
extern Il2CppClass* String_t_il2cpp_TypeInfo_var;
extern Il2CppCodeGenString* _stringLiteral3786716932;
extern const uint32_t NetConnection_WriteLocalHail_m1600369383_MetadataUsageId;
extern "C" void NetConnection_WriteLocalHail_m1600369383 (NetConnection_t3331492029 * __this, NetOutgoingMessage_t2016542980 * ___om0, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetConnection_WriteLocalHail_m1600369383_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
ByteU5BU5D_t3397334013* V_0 = NULL;
bool V_1 = false;
int32_t G_B4_0 = 0;
{
NetOutgoingMessage_t2016542980 * L_0 = __this->get_m_localHailMessage_8();
V_1 = (bool)((((Il2CppObject*)(NetOutgoingMessage_t2016542980 *)L_0) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0);
bool L_1 = V_1;
if (L_1)
{
goto IL_00b3;
}
}
{
NetOutgoingMessage_t2016542980 * L_2 = __this->get_m_localHailMessage_8();
NullCheck(L_2);
ByteU5BU5D_t3397334013* L_3 = NetBuffer_get_Data_m1302059707(L_2, /*hidden argument*/NULL);
V_0 = L_3;
ByteU5BU5D_t3397334013* L_4 = V_0;
if (!L_4)
{
goto IL_0033;
}
}
{
ByteU5BU5D_t3397334013* L_5 = V_0;
NullCheck(L_5);
NetOutgoingMessage_t2016542980 * L_6 = __this->get_m_localHailMessage_8();
NullCheck(L_6);
int32_t L_7 = NetBuffer_get_LengthBytes_m2765088638(L_6, /*hidden argument*/NULL);
G_B4_0 = ((((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_5)->max_length))))) < ((int32_t)L_7))? 1 : 0);
goto IL_0034;
}
IL_0033:
{
G_B4_0 = 1;
}
IL_0034:
{
V_1 = (bool)G_B4_0;
bool L_8 = V_1;
if (L_8)
{
goto IL_00b2;
}
}
{
NetOutgoingMessage_t2016542980 * L_9 = ___om0;
NullCheck(L_9);
int32_t L_10 = NetBuffer_get_LengthBytes_m2765088638(L_9, /*hidden argument*/NULL);
NetOutgoingMessage_t2016542980 * L_11 = __this->get_m_localHailMessage_8();
NullCheck(L_11);
int32_t L_12 = NetBuffer_get_LengthBytes_m2765088638(L_11, /*hidden argument*/NULL);
NetPeerConfiguration_t136603591 * L_13 = __this->get_m_peerConfiguration_1();
NullCheck(L_13);
int32_t L_14 = L_13->get_m_maximumTransmissionUnit_26();
V_1 = (bool)((((int32_t)((((int32_t)((int32_t)((int32_t)L_10+(int32_t)L_12))) > ((int32_t)((int32_t)((int32_t)L_14-(int32_t)((int32_t)10)))))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_15 = V_1;
if (L_15)
{
goto IL_0093;
}
}
{
NetPeer_t1779390221 * L_16 = __this->get_m_peer_0();
NetPeerConfiguration_t136603591 * L_17 = __this->get_m_peerConfiguration_1();
NullCheck(L_17);
int32_t L_18 = L_17->get_m_maximumTransmissionUnit_26();
NetOutgoingMessage_t2016542980 * L_19 = ___om0;
NullCheck(L_19);
int32_t L_20 = NetBuffer_get_LengthBytes_m2765088638(L_19, /*hidden argument*/NULL);
int32_t L_21 = ((int32_t)((int32_t)((int32_t)((int32_t)L_18-(int32_t)((int32_t)10)))-(int32_t)L_20));
Il2CppObject * L_22 = Box(Int32_t2071877448_il2cpp_TypeInfo_var, &L_21);
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_23 = String_Concat_m56707527(NULL /*static, unused*/, _stringLiteral3786716932, L_22, /*hidden argument*/NULL);
NullCheck(L_16);
NetPeer_ThrowOrLog_m2301784333(L_16, L_23, /*hidden argument*/NULL);
}
IL_0093:
{
NetOutgoingMessage_t2016542980 * L_24 = ___om0;
NetOutgoingMessage_t2016542980 * L_25 = __this->get_m_localHailMessage_8();
NullCheck(L_25);
ByteU5BU5D_t3397334013* L_26 = NetBuffer_get_Data_m1302059707(L_25, /*hidden argument*/NULL);
NetOutgoingMessage_t2016542980 * L_27 = __this->get_m_localHailMessage_8();
NullCheck(L_27);
int32_t L_28 = NetBuffer_get_LengthBytes_m2765088638(L_27, /*hidden argument*/NULL);
NullCheck(L_24);
NetBuffer_Write_m3872681458(L_24, L_26, 0, L_28, /*hidden argument*/NULL);
}
IL_00b2:
{
}
IL_00b3:
{
return;
}
}
// System.Void Lidgren.Network.NetConnection::SendConnectionEstablished()
extern Il2CppClass* NetTime_t3056501352_il2cpp_TypeInfo_var;
extern Il2CppClass* NetUtility_t3562260209_il2cpp_TypeInfo_var;
extern Il2CppClass* String_t_il2cpp_TypeInfo_var;
extern Il2CppCodeGenString* _stringLiteral246561994;
extern const uint32_t NetConnection_SendConnectionEstablished_m3743151856_MetadataUsageId;
extern "C" void NetConnection_SendConnectionEstablished_m3743151856 (NetConnection_t3331492029 * __this, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetConnection_SendConnectionEstablished_m3743151856_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
NetOutgoingMessage_t2016542980 * V_0 = NULL;
bool V_1 = false;
{
NetPeer_t1779390221 * L_0 = __this->get_m_peer_0();
NullCheck(L_0);
NetOutgoingMessage_t2016542980 * L_1 = NetPeer_CreateMessage_m3328975762(L_0, 4, /*hidden argument*/NULL);
V_0 = L_1;
NetOutgoingMessage_t2016542980 * L_2 = V_0;
NullCheck(L_2);
L_2->set_m_messageType_5(((int32_t)133));
NetOutgoingMessage_t2016542980 * L_3 = V_0;
IL2CPP_RUNTIME_CLASS_INIT(NetTime_t3056501352_il2cpp_TypeInfo_var);
double L_4 = NetTime_get_Now_m1609702533(NULL /*static, unused*/, /*hidden argument*/NULL);
NullCheck(L_3);
NetBuffer_Write_m2191092918(L_3, (((float)((float)L_4))), /*hidden argument*/NULL);
NetPeer_t1779390221 * L_5 = __this->get_m_peer_0();
NetOutgoingMessage_t2016542980 * L_6 = V_0;
IPEndPoint_t2615413766 * L_7 = __this->get_m_remoteEndPoint_5();
NullCheck(L_5);
NetPeer_SendLibrary_m4133093622(L_5, L_6, L_7, /*hidden argument*/NULL);
__this->set_m_handshakeAttempts_22(0);
NetConnection_InitializePing_m1433079092(__this, /*hidden argument*/NULL);
int32_t L_8 = __this->get_m_status_2();
V_1 = (bool)((((int32_t)L_8) == ((int32_t)5))? 1 : 0);
bool L_9 = V_1;
if (L_9)
{
goto IL_0071;
}
}
{
int64_t L_10 = __this->get_m_remoteUniqueIdentifier_9();
IL2CPP_RUNTIME_CLASS_INIT(NetUtility_t3562260209_il2cpp_TypeInfo_var);
String_t* L_11 = NetUtility_ToHexString_m433916538(NULL /*static, unused*/, L_10, /*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_12 = String_Concat_m2596409543(NULL /*static, unused*/, _stringLiteral246561994, L_11, /*hidden argument*/NULL);
NetConnection_SetStatus_m2040093136(__this, 5, L_12, /*hidden argument*/NULL);
}
IL_0071:
{
return;
}
}
// System.Void Lidgren.Network.NetConnection::ReceivedHandshake(System.Double,Lidgren.Network.NetMessageType,System.Int32,System.Int32)
extern Il2CppClass* ObjectU5BU5D_t3614634134_il2cpp_TypeInfo_var;
extern Il2CppClass* NetMessageType_t191235414_il2cpp_TypeInfo_var;
extern Il2CppClass* NetConnectionStatus_t952199027_il2cpp_TypeInfo_var;
extern Il2CppClass* Int32_t2071877448_il2cpp_TypeInfo_var;
extern Il2CppClass* String_t_il2cpp_TypeInfo_var;
extern Il2CppClass* NetUtility_t3562260209_il2cpp_TypeInfo_var;
extern Il2CppClass* Il2CppObject_il2cpp_TypeInfo_var;
extern Il2CppCodeGenString* _stringLiteral4231290937;
extern Il2CppCodeGenString* _stringLiteral3755334964;
extern Il2CppCodeGenString* _stringLiteral2339958817;
extern Il2CppCodeGenString* _stringLiteral1872536088;
extern Il2CppCodeGenString* _stringLiteral1791829564;
extern Il2CppCodeGenString* _stringLiteral246561994;
extern Il2CppCodeGenString* _stringLiteral4069224161;
extern Il2CppCodeGenString* _stringLiteral1666295375;
extern const uint32_t NetConnection_ReceivedHandshake_m1128410455_MetadataUsageId;
extern "C" void NetConnection_ReceivedHandshake_m1128410455 (NetConnection_t3331492029 * __this, double ___now0, uint8_t ___tp1, int32_t ___ptr2, int32_t ___payloadLength3, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetConnection_ReceivedHandshake_m1128410455_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
ByteU5BU5D_t3397334013* V_0 = NULL;
bool V_1 = false;
NetIncomingMessage_t2014089816 * V_2 = NULL;
NetIncomingMessage_t2014089816 * V_3 = NULL;
String_t* V_4 = NULL;
NetIncomingMessage_t2014089816 * V_5 = NULL;
uint8_t V_6 = 0;
bool V_7 = false;
ObjectU5BU5D_t3614634134* V_8 = NULL;
int32_t V_9 = 0;
Exception_t1927440687 * __last_unhandled_exception = 0;
NO_UNUSED_WARNING (__last_unhandled_exception);
Exception_t1927440687 * __exception_local = 0;
NO_UNUSED_WARNING (__exception_local);
int32_t __leave_target = 0;
NO_UNUSED_WARNING (__leave_target);
int32_t G_B10_0 = 0;
NetPeer_t1779390221 * G_B10_1 = NULL;
int32_t G_B9_0 = 0;
NetPeer_t1779390221 * G_B9_1 = NULL;
int32_t G_B11_0 = 0;
int32_t G_B11_1 = 0;
NetPeer_t1779390221 * G_B11_2 = NULL;
{
NetPeer_t1779390221 * L_0 = __this->get_m_peer_0();
NullCheck(L_0);
NetPeer_VerifyNetworkThread_m4075953563(L_0, /*hidden argument*/NULL);
uint8_t L_1 = ___tp1;
V_6 = L_1;
uint8_t L_2 = V_6;
if (((int32_t)((int32_t)L_2-(int32_t)((int32_t)129))) == 0)
{
goto IL_0317;
}
if (((int32_t)((int32_t)L_2-(int32_t)((int32_t)129))) == 1)
{
goto IL_0319;
}
if (((int32_t)((int32_t)L_2-(int32_t)((int32_t)129))) == 2)
{
goto IL_0046;
}
if (((int32_t)((int32_t)L_2-(int32_t)((int32_t)129))) == 3)
{
goto IL_0210;
}
if (((int32_t)((int32_t)L_2-(int32_t)((int32_t)129))) == 4)
{
goto IL_0221;
}
if (((int32_t)((int32_t)L_2-(int32_t)((int32_t)129))) == 5)
{
goto IL_0319;
}
if (((int32_t)((int32_t)L_2-(int32_t)((int32_t)129))) == 6)
{
goto IL_02b1;
}
if (((int32_t)((int32_t)L_2-(int32_t)((int32_t)129))) == 7)
{
goto IL_02e7;
}
if (((int32_t)((int32_t)L_2-(int32_t)((int32_t)129))) == 8)
{
goto IL_02ff;
}
}
{
goto IL_0319;
}
IL_0046:
{
int32_t L_3 = __this->get_m_status_2();
V_7 = (bool)((((int32_t)((((int32_t)L_3) == ((int32_t)2))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_4 = V_7;
if (L_4)
{
goto IL_0165;
}
}
{
int32_t L_5 = ___ptr2;
int32_t L_6 = ___payloadLength3;
bool L_7 = NetConnection_ValidateHandshakeData_m3971068028(__this, L_5, L_6, (&V_0), /*hidden argument*/NULL);
V_1 = L_7;
bool L_8 = V_1;
V_7 = (bool)((((int32_t)L_8) == ((int32_t)0))? 1 : 0);
bool L_9 = V_7;
if (L_9)
{
goto IL_0160;
}
}
{
ByteU5BU5D_t3397334013* L_10 = V_0;
V_7 = (bool)((((Il2CppObject*)(ByteU5BU5D_t3397334013*)L_10) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0);
bool L_11 = V_7;
if (L_11)
{
goto IL_00a8;
}
}
{
NetPeer_t1779390221 * L_12 = __this->get_m_peer_0();
ByteU5BU5D_t3397334013* L_13 = V_0;
NullCheck(L_12);
NetIncomingMessage_t2014089816 * L_14 = NetPeer_CreateIncomingMessage_m1102215321(L_12, 8, L_13, /*hidden argument*/NULL);
__this->set_m_remoteHailMessage_20(L_14);
NetIncomingMessage_t2014089816 * L_15 = __this->get_m_remoteHailMessage_20();
ByteU5BU5D_t3397334013* L_16 = V_0;
NullCheck(L_16);
NullCheck(L_15);
NetBuffer_set_LengthBits_m2102256812(L_15, ((int32_t)((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_16)->max_length))))*(int32_t)8)), /*hidden argument*/NULL);
goto IL_00b1;
}
IL_00a8:
{
__this->set_m_remoteHailMessage_20((NetIncomingMessage_t2014089816 *)NULL);
}
IL_00b1:
{
NetPeerConfiguration_t136603591 * L_17 = __this->get_m_peerConfiguration_1();
NullCheck(L_17);
bool L_18 = NetPeerConfiguration_IsMessageTypeEnabled_m1110774391(L_17, 4, /*hidden argument*/NULL);
V_7 = (bool)((((int32_t)L_18) == ((int32_t)0))? 1 : 0);
bool L_19 = V_7;
if (L_19)
{
goto IL_0154;
}
}
{
NetPeer_t1779390221 * L_20 = __this->get_m_peer_0();
NetIncomingMessage_t2014089816 * L_21 = __this->get_m_remoteHailMessage_20();
G_B9_0 = 4;
G_B9_1 = L_20;
if (!L_21)
{
G_B10_0 = 4;
G_B10_1 = L_20;
goto IL_00e6;
}
}
{
NetIncomingMessage_t2014089816 * L_22 = __this->get_m_remoteHailMessage_20();
NullCheck(L_22);
int32_t L_23 = NetBuffer_get_LengthBytes_m2765088638(L_22, /*hidden argument*/NULL);
G_B11_0 = L_23;
G_B11_1 = G_B9_0;
G_B11_2 = G_B9_1;
goto IL_00e7;
}
IL_00e6:
{
G_B11_0 = 0;
G_B11_1 = G_B10_0;
G_B11_2 = G_B10_1;
}
IL_00e7:
{
NullCheck(G_B11_2);
NetIncomingMessage_t2014089816 * L_24 = NetPeer_CreateIncomingMessage_m2109562735(G_B11_2, G_B11_1, G_B11_0, /*hidden argument*/NULL);
V_2 = L_24;
NetIncomingMessage_t2014089816 * L_25 = V_2;
double L_26 = ___now0;
NullCheck(L_25);
L_25->set_m_receiveTime_11(L_26);
NetIncomingMessage_t2014089816 * L_27 = V_2;
NullCheck(L_27);
L_27->set_m_senderConnection_7(__this);
NetIncomingMessage_t2014089816 * L_28 = V_2;
IPEndPoint_t2615413766 * L_29 = __this->get_m_remoteEndPoint_5();
NullCheck(L_28);
L_28->set_m_senderEndPoint_6(L_29);
NetIncomingMessage_t2014089816 * L_30 = __this->get_m_remoteHailMessage_20();
V_7 = (bool)((((Il2CppObject*)(NetIncomingMessage_t2014089816 *)L_30) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0);
bool L_31 = V_7;
if (L_31)
{
goto IL_0135;
}
}
{
NetIncomingMessage_t2014089816 * L_32 = V_2;
NetIncomingMessage_t2014089816 * L_33 = __this->get_m_remoteHailMessage_20();
NullCheck(L_33);
ByteU5BU5D_t3397334013* L_34 = ((NetBuffer_t3608062491 *)L_33)->get_m_data_2();
NetIncomingMessage_t2014089816 * L_35 = __this->get_m_remoteHailMessage_20();
NullCheck(L_35);
int32_t L_36 = NetBuffer_get_LengthBytes_m2765088638(L_35, /*hidden argument*/NULL);
NullCheck(L_32);
NetBuffer_Write_m3872681458(L_32, L_34, 0, L_36, /*hidden argument*/NULL);
}
IL_0135:
{
NetConnection_SetStatus_m2040093136(__this, 3, _stringLiteral4231290937, /*hidden argument*/NULL);
NetPeer_t1779390221 * L_37 = __this->get_m_peer_0();
NetIncomingMessage_t2014089816 * L_38 = V_2;
NullCheck(L_37);
NetPeer_ReleaseMessage_m3520648965(L_37, L_38, /*hidden argument*/NULL);
goto IL_035d;
}
IL_0154:
{
double L_39 = ___now0;
NetConnection_SendConnectResponse_m1494124902(__this, (((double)((double)(((float)((float)L_39)))))), (bool)1, /*hidden argument*/NULL);
}
IL_0160:
{
goto IL_035d;
}
IL_0165:
{
int32_t L_40 = __this->get_m_status_2();
V_7 = (bool)((((int32_t)((((int32_t)L_40) == ((int32_t)3))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_41 = V_7;
if (L_41)
{
goto IL_018e;
}
}
{
NetPeer_t1779390221 * L_42 = __this->get_m_peer_0();
NullCheck(L_42);
NetPeer_LogWarning_m3266657906(L_42, _stringLiteral3755334964, /*hidden argument*/NULL);
goto IL_035d;
}
IL_018e:
{
int32_t L_43 = __this->get_m_status_2();
V_7 = (bool)((((int32_t)((((int32_t)L_43) == ((int32_t)4))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_44 = V_7;
if (L_44)
{
goto IL_01b1;
}
}
{
double L_45 = ___now0;
NetConnection_SendConnectResponse_m1494124902(__this, (((double)((double)(((float)((float)L_45)))))), (bool)1, /*hidden argument*/NULL);
goto IL_035d;
}
IL_01b1:
{
NetPeer_t1779390221 * L_46 = __this->get_m_peer_0();
V_8 = ((ObjectU5BU5D_t3614634134*)SZArrayNew(ObjectU5BU5D_t3614634134_il2cpp_TypeInfo_var, (uint32_t)6));
ObjectU5BU5D_t3614634134* L_47 = V_8;
NullCheck(L_47);
IL2CPP_ARRAY_BOUNDS_CHECK(L_47, 0);
ArrayElementTypeCheck (L_47, _stringLiteral2339958817);
(L_47)->SetAt(static_cast<il2cpp_array_size_t>(0), (Il2CppObject *)_stringLiteral2339958817);
ObjectU5BU5D_t3614634134* L_48 = V_8;
uint8_t L_49 = ___tp1;
uint8_t L_50 = L_49;
Il2CppObject * L_51 = Box(NetMessageType_t191235414_il2cpp_TypeInfo_var, &L_50);
NullCheck(L_48);
IL2CPP_ARRAY_BOUNDS_CHECK(L_48, 1);
ArrayElementTypeCheck (L_48, L_51);
(L_48)->SetAt(static_cast<il2cpp_array_size_t>(1), (Il2CppObject *)L_51);
ObjectU5BU5D_t3614634134* L_52 = V_8;
NullCheck(L_52);
IL2CPP_ARRAY_BOUNDS_CHECK(L_52, 2);
ArrayElementTypeCheck (L_52, _stringLiteral1872536088);
(L_52)->SetAt(static_cast<il2cpp_array_size_t>(2), (Il2CppObject *)_stringLiteral1872536088);
ObjectU5BU5D_t3614634134* L_53 = V_8;
int32_t L_54 = __this->get_m_status_2();
int32_t L_55 = L_54;
Il2CppObject * L_56 = Box(NetConnectionStatus_t952199027_il2cpp_TypeInfo_var, &L_55);
NullCheck(L_53);
IL2CPP_ARRAY_BOUNDS_CHECK(L_53, 3);
ArrayElementTypeCheck (L_53, L_56);
(L_53)->SetAt(static_cast<il2cpp_array_size_t>(3), (Il2CppObject *)L_56);
ObjectU5BU5D_t3614634134* L_57 = V_8;
NullCheck(L_57);
IL2CPP_ARRAY_BOUNDS_CHECK(L_57, 4);
ArrayElementTypeCheck (L_57, _stringLiteral1791829564);
(L_57)->SetAt(static_cast<il2cpp_array_size_t>(4), (Il2CppObject *)_stringLiteral1791829564);
ObjectU5BU5D_t3614634134* L_58 = V_8;
int32_t L_59 = ___payloadLength3;
int32_t L_60 = L_59;
Il2CppObject * L_61 = Box(Int32_t2071877448_il2cpp_TypeInfo_var, &L_60);
NullCheck(L_58);
IL2CPP_ARRAY_BOUNDS_CHECK(L_58, 5);
ArrayElementTypeCheck (L_58, L_61);
(L_58)->SetAt(static_cast<il2cpp_array_size_t>(5), (Il2CppObject *)L_61);
ObjectU5BU5D_t3614634134* L_62 = V_8;
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_63 = String_Concat_m3881798623(NULL /*static, unused*/, L_62, /*hidden argument*/NULL);
NullCheck(L_46);
NetPeer_LogDebug_m2983960595(L_46, L_63, /*hidden argument*/NULL);
goto IL_035d;
}
IL_0210:
{
double L_64 = ___now0;
uint8_t L_65 = ___tp1;
int32_t L_66 = ___ptr2;
int32_t L_67 = ___payloadLength3;
NetConnection_HandleConnectResponse_m2887867750(__this, L_64, L_65, L_66, L_67, /*hidden argument*/NULL);
goto IL_035d;
}
IL_0221:
{
int32_t L_68 = __this->get_m_status_2();
V_9 = L_68;
int32_t L_69 = V_9;
if (L_69 == 0)
{
goto IL_0254;
}
if (L_69 == 1)
{
goto IL_0258;
}
if (L_69 == 2)
{
goto IL_0256;
}
if (L_69 == 3)
{
goto IL_02ac;
}
if (L_69 == 4)
{
goto IL_025a;
}
if (L_69 == 5)
{
goto IL_0252;
}
if (L_69 == 6)
{
goto IL_0254;
}
if (L_69 == 7)
{
goto IL_0254;
}
}
{
goto IL_02ac;
}
IL_0252:
{
goto IL_02ac;
}
IL_0254:
{
goto IL_02ac;
}
IL_0256:
{
goto IL_02ac;
}
IL_0258:
{
goto IL_02ac;
}
IL_025a:
{
NetPeer_t1779390221 * L_70 = __this->get_m_peer_0();
int32_t L_71 = ___ptr2;
int32_t L_72 = ___payloadLength3;
NullCheck(L_70);
NetIncomingMessage_t2014089816 * L_73 = NetPeer_SetupReadHelperMessage_m906183392(L_70, L_71, L_72, /*hidden argument*/NULL);
V_3 = L_73;
NetIncomingMessage_t2014089816 * L_74 = V_3;
NullCheck(L_74);
float L_75 = NetBuffer_ReadSingle_m2767420110(L_74, /*hidden argument*/NULL);
NetConnection_InitializeRemoteTimeOffset_m4193429857(__this, L_75, /*hidden argument*/NULL);
NetPeer_t1779390221 * L_76 = __this->get_m_peer_0();
NullCheck(L_76);
NetPeer_AcceptConnection_m1347999118(L_76, __this, /*hidden argument*/NULL);
NetConnection_InitializePing_m1433079092(__this, /*hidden argument*/NULL);
int64_t L_77 = __this->get_m_remoteUniqueIdentifier_9();
IL2CPP_RUNTIME_CLASS_INIT(NetUtility_t3562260209_il2cpp_TypeInfo_var);
String_t* L_78 = NetUtility_ToHexString_m433916538(NULL /*static, unused*/, L_77, /*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_79 = String_Concat_m2596409543(NULL /*static, unused*/, _stringLiteral246561994, L_78, /*hidden argument*/NULL);
NetConnection_SetStatus_m2040093136(__this, 5, L_79, /*hidden argument*/NULL);
goto IL_035d;
}
IL_02ac:
{
goto IL_035d;
}
IL_02b1:
{
V_4 = _stringLiteral4069224161;
}
IL_02b8:
try
{ // begin try (depth: 1)
NetPeer_t1779390221 * L_80 = __this->get_m_peer_0();
int32_t L_81 = ___ptr2;
int32_t L_82 = ___payloadLength3;
NullCheck(L_80);
NetIncomingMessage_t2014089816 * L_83 = NetPeer_SetupReadHelperMessage_m906183392(L_80, L_81, L_82, /*hidden argument*/NULL);
V_5 = L_83;
NetIncomingMessage_t2014089816 * L_84 = V_5;
NullCheck(L_84);
String_t* L_85 = NetBuffer_ReadString_m1223210798(L_84, /*hidden argument*/NULL);
V_4 = L_85;
goto IL_02da;
} // end try (depth: 1)
catch(Il2CppExceptionWrapper& e)
{
__exception_local = (Exception_t1927440687 *)e.ex;
if(il2cpp_codegen_class_is_assignable_from (Il2CppObject_il2cpp_TypeInfo_var, e.ex->object.klass))
goto CATCH_02d5;
throw e;
}
CATCH_02d5:
{ // begin catch(System.Object)
goto IL_02da;
} // end catch (depth: 1)
IL_02da:
{
String_t* L_86 = V_4;
NetConnection_ExecuteDisconnect_m666203348(__this, L_86, (bool)0, /*hidden argument*/NULL);
goto IL_035d;
}
IL_02e7:
{
NetPeer_t1779390221 * L_87 = __this->get_m_peer_0();
double L_88 = ___now0;
IPEndPoint_t2615413766 * L_89 = __this->get_m_remoteEndPoint_5();
int32_t L_90 = ___ptr2;
int32_t L_91 = ___payloadLength3;
NullCheck(L_87);
NetPeer_HandleIncomingDiscoveryRequest_m4170027425(L_87, L_88, L_89, L_90, L_91, /*hidden argument*/NULL);
goto IL_035d;
}
IL_02ff:
{
NetPeer_t1779390221 * L_92 = __this->get_m_peer_0();
double L_93 = ___now0;
IPEndPoint_t2615413766 * L_94 = __this->get_m_remoteEndPoint_5();
int32_t L_95 = ___ptr2;
int32_t L_96 = ___payloadLength3;
NullCheck(L_92);
NetPeer_HandleIncomingDiscoveryResponse_m1395777003(L_92, L_93, L_94, L_95, L_96, /*hidden argument*/NULL);
goto IL_035d;
}
IL_0317:
{
goto IL_035d;
}
IL_0319:
{
NetPeer_t1779390221 * L_97 = __this->get_m_peer_0();
V_8 = ((ObjectU5BU5D_t3614634134*)SZArrayNew(ObjectU5BU5D_t3614634134_il2cpp_TypeInfo_var, (uint32_t)4));
ObjectU5BU5D_t3614634134* L_98 = V_8;
NullCheck(L_98);
IL2CPP_ARRAY_BOUNDS_CHECK(L_98, 0);
ArrayElementTypeCheck (L_98, _stringLiteral1666295375);
(L_98)->SetAt(static_cast<il2cpp_array_size_t>(0), (Il2CppObject *)_stringLiteral1666295375);
ObjectU5BU5D_t3614634134* L_99 = V_8;
uint8_t L_100 = ___tp1;
uint8_t L_101 = L_100;
Il2CppObject * L_102 = Box(NetMessageType_t191235414_il2cpp_TypeInfo_var, &L_101);
NullCheck(L_99);
IL2CPP_ARRAY_BOUNDS_CHECK(L_99, 1);
ArrayElementTypeCheck (L_99, L_102);
(L_99)->SetAt(static_cast<il2cpp_array_size_t>(1), (Il2CppObject *)L_102);
ObjectU5BU5D_t3614634134* L_103 = V_8;
NullCheck(L_103);
IL2CPP_ARRAY_BOUNDS_CHECK(L_103, 2);
ArrayElementTypeCheck (L_103, _stringLiteral1791829564);
(L_103)->SetAt(static_cast<il2cpp_array_size_t>(2), (Il2CppObject *)_stringLiteral1791829564);
ObjectU5BU5D_t3614634134* L_104 = V_8;
int32_t L_105 = ___payloadLength3;
int32_t L_106 = L_105;
Il2CppObject * L_107 = Box(Int32_t2071877448_il2cpp_TypeInfo_var, &L_106);
NullCheck(L_104);
IL2CPP_ARRAY_BOUNDS_CHECK(L_104, 3);
ArrayElementTypeCheck (L_104, L_107);
(L_104)->SetAt(static_cast<il2cpp_array_size_t>(3), (Il2CppObject *)L_107);
ObjectU5BU5D_t3614634134* L_108 = V_8;
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_109 = String_Concat_m3881798623(NULL /*static, unused*/, L_108, /*hidden argument*/NULL);
NullCheck(L_97);
NetPeer_LogDebug_m2983960595(L_97, L_109, /*hidden argument*/NULL);
goto IL_035d;
}
IL_035d:
{
return;
}
}
// System.Void Lidgren.Network.NetConnection::HandleConnectResponse(System.Double,Lidgren.Network.NetMessageType,System.Int32,System.Int32)
extern "C" void NetConnection_HandleConnectResponse_m2887867750 (NetConnection_t3331492029 * __this, double ___now0, uint8_t ___tp1, int32_t ___ptr2, int32_t ___payloadLength3, const MethodInfo* method)
{
ByteU5BU5D_t3397334013* V_0 = NULL;
bool V_1 = false;
int32_t V_2 = 0;
bool V_3 = false;
{
int32_t L_0 = __this->get_m_status_2();
V_2 = L_0;
int32_t L_1 = V_2;
if (L_1 == 0)
{
goto IL_0098;
}
if (L_1 == 1)
{
goto IL_0030;
}
if (L_1 == 2)
{
goto IL_0098;
}
if (L_1 == 3)
{
goto IL_00a3;
}
if (L_1 == 4)
{
goto IL_0096;
}
if (L_1 == 5)
{
goto IL_009a;
}
if (L_1 == 6)
{
goto IL_0098;
}
if (L_1 == 7)
{
goto IL_0098;
}
}
{
goto IL_00a3;
}
IL_0030:
{
int32_t L_2 = ___ptr2;
int32_t L_3 = ___payloadLength3;
bool L_4 = NetConnection_ValidateHandshakeData_m3971068028(__this, L_2, L_3, (&V_0), /*hidden argument*/NULL);
V_1 = L_4;
bool L_5 = V_1;
V_3 = (bool)((((int32_t)L_5) == ((int32_t)0))? 1 : 0);
bool L_6 = V_3;
if (L_6)
{
goto IL_0094;
}
}
{
ByteU5BU5D_t3397334013* L_7 = V_0;
V_3 = (bool)((((Il2CppObject*)(ByteU5BU5D_t3397334013*)L_7) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0);
bool L_8 = V_3;
if (L_8)
{
goto IL_0075;
}
}
{
NetPeer_t1779390221 * L_9 = __this->get_m_peer_0();
ByteU5BU5D_t3397334013* L_10 = V_0;
NullCheck(L_9);
NetIncomingMessage_t2014089816 * L_11 = NetPeer_CreateIncomingMessage_m1102215321(L_9, 8, L_10, /*hidden argument*/NULL);
__this->set_m_remoteHailMessage_20(L_11);
NetIncomingMessage_t2014089816 * L_12 = __this->get_m_remoteHailMessage_20();
ByteU5BU5D_t3397334013* L_13 = V_0;
NullCheck(L_13);
NullCheck(L_12);
NetBuffer_set_LengthBits_m2102256812(L_12, ((int32_t)((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_13)->max_length))))*(int32_t)8)), /*hidden argument*/NULL);
goto IL_007e;
}
IL_0075:
{
__this->set_m_remoteHailMessage_20((NetIncomingMessage_t2014089816 *)NULL);
}
IL_007e:
{
NetPeer_t1779390221 * L_14 = __this->get_m_peer_0();
NullCheck(L_14);
NetPeer_AcceptConnection_m1347999118(L_14, __this, /*hidden argument*/NULL);
NetConnection_SendConnectionEstablished_m3743151856(__this, /*hidden argument*/NULL);
goto IL_00a3;
}
IL_0094:
{
goto IL_00a3;
}
IL_0096:
{
goto IL_00a3;
}
IL_0098:
{
goto IL_00a3;
}
IL_009a:
{
NetConnection_SendConnectionEstablished_m3743151856(__this, /*hidden argument*/NULL);
goto IL_00a3;
}
IL_00a3:
{
return;
}
}
// System.Boolean Lidgren.Network.NetConnection::ValidateHandshakeData(System.Int32,System.Int32,System.Byte[]&)
extern Il2CppClass* String_t_il2cpp_TypeInfo_var;
extern Il2CppClass* Exception_t1927440687_il2cpp_TypeInfo_var;
extern Il2CppCodeGenString* _stringLiteral88985751;
extern Il2CppCodeGenString* _stringLiteral569298411;
extern Il2CppCodeGenString* _stringLiteral3124240064;
extern const uint32_t NetConnection_ValidateHandshakeData_m3971068028_MetadataUsageId;
extern "C" bool NetConnection_ValidateHandshakeData_m3971068028 (NetConnection_t3331492029 * __this, int32_t ___ptr0, int32_t ___payloadLength1, ByteU5BU5D_t3397334013** ___hail2, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetConnection_ValidateHandshakeData_m3971068028_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
NetIncomingMessage_t2014089816 * V_0 = NULL;
String_t* V_1 = NULL;
int64_t V_2 = 0;
int32_t V_3 = 0;
Exception_t1927440687 * V_4 = NULL;
bool V_5 = false;
bool V_6 = false;
Exception_t1927440687 * __last_unhandled_exception = 0;
NO_UNUSED_WARNING (__last_unhandled_exception);
Exception_t1927440687 * __exception_local = 0;
NO_UNUSED_WARNING (__exception_local);
int32_t __leave_target = 0;
NO_UNUSED_WARNING (__leave_target);
{
ByteU5BU5D_t3397334013** L_0 = ___hail2;
*((Il2CppObject **)(L_0)) = (Il2CppObject *)NULL;
Il2CppCodeGenWriteBarrier((Il2CppObject **)(L_0), (Il2CppObject *)NULL);
NetPeer_t1779390221 * L_1 = __this->get_m_peer_0();
int32_t L_2 = ___ptr0;
int32_t L_3 = ___payloadLength1;
NullCheck(L_1);
NetIncomingMessage_t2014089816 * L_4 = NetPeer_SetupReadHelperMessage_m906183392(L_1, L_2, L_3, /*hidden argument*/NULL);
V_0 = L_4;
}
IL_0012:
try
{ // begin try (depth: 1)
{
NetIncomingMessage_t2014089816 * L_5 = V_0;
NullCheck(L_5);
String_t* L_6 = NetBuffer_ReadString_m1223210798(L_5, /*hidden argument*/NULL);
V_1 = L_6;
NetIncomingMessage_t2014089816 * L_7 = V_0;
NullCheck(L_7);
int64_t L_8 = NetBuffer_ReadInt64_m2415498424(L_7, /*hidden argument*/NULL);
V_2 = L_8;
NetIncomingMessage_t2014089816 * L_9 = V_0;
NullCheck(L_9);
float L_10 = NetBuffer_ReadSingle_m2767420110(L_9, /*hidden argument*/NULL);
NetConnection_InitializeRemoteTimeOffset_m4193429857(__this, L_10, /*hidden argument*/NULL);
int32_t L_11 = ___payloadLength1;
NetIncomingMessage_t2014089816 * L_12 = V_0;
NullCheck(L_12);
int32_t L_13 = NetBuffer_get_PositionInBytes_m2104121730(L_12, /*hidden argument*/NULL);
int32_t L_14 = ___ptr0;
V_3 = ((int32_t)((int32_t)L_11-(int32_t)((int32_t)((int32_t)L_13-(int32_t)L_14))));
int32_t L_15 = V_3;
V_6 = (bool)((((int32_t)((((int32_t)L_15) > ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_16 = V_6;
if (L_16)
{
goto IL_004f;
}
}
IL_0046:
{
ByteU5BU5D_t3397334013** L_17 = ___hail2;
NetIncomingMessage_t2014089816 * L_18 = V_0;
int32_t L_19 = V_3;
NullCheck(L_18);
ByteU5BU5D_t3397334013* L_20 = NetBuffer_ReadBytes_m4004009464(L_18, L_19, /*hidden argument*/NULL);
*((Il2CppObject **)(L_17)) = (Il2CppObject *)L_20;
Il2CppCodeGenWriteBarrier((Il2CppObject **)(L_17), (Il2CppObject *)L_20);
}
IL_004f:
{
String_t* L_21 = V_1;
NetPeer_t1779390221 * L_22 = __this->get_m_peer_0();
NullCheck(L_22);
NetPeerConfiguration_t136603591 * L_23 = L_22->get_m_configuration_21();
NullCheck(L_23);
String_t* L_24 = NetPeerConfiguration_get_AppIdentifier_m1563815312(L_23, /*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
bool L_25 = String_op_Inequality_m304203149(NULL /*static, unused*/, L_21, L_24, /*hidden argument*/NULL);
V_6 = (bool)((((int32_t)L_25) == ((int32_t)0))? 1 : 0);
bool L_26 = V_6;
if (L_26)
{
goto IL_0081;
}
}
IL_006e:
{
NetConnection_ExecuteDisconnect_m666203348(__this, _stringLiteral88985751, (bool)1, /*hidden argument*/NULL);
V_5 = (bool)0;
goto IL_00c3;
}
IL_0081:
{
int64_t L_27 = V_2;
__this->set_m_remoteUniqueIdentifier_9(L_27);
goto IL_00bd;
}
} // end try (depth: 1)
catch(Il2CppExceptionWrapper& e)
{
__exception_local = (Exception_t1927440687 *)e.ex;
if(il2cpp_codegen_class_is_assignable_from (Exception_t1927440687_il2cpp_TypeInfo_var, e.ex->object.klass))
goto CATCH_008b;
throw e;
}
CATCH_008b:
{ // begin catch(System.Exception)
V_4 = ((Exception_t1927440687 *)__exception_local);
NetConnection_ExecuteDisconnect_m666203348(__this, _stringLiteral569298411, (bool)1, /*hidden argument*/NULL);
NetPeer_t1779390221 * L_28 = __this->get_m_peer_0();
Exception_t1927440687 * L_29 = V_4;
NullCheck(L_29);
String_t* L_30 = VirtFuncInvoker0< String_t* >::Invoke(6 /* System.String System.Exception::get_Message() */, L_29);
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_31 = String_Concat_m2596409543(NULL /*static, unused*/, _stringLiteral3124240064, L_30, /*hidden argument*/NULL);
NullCheck(L_28);
NetPeer_LogWarning_m3266657906(L_28, L_31, /*hidden argument*/NULL);
V_5 = (bool)0;
goto IL_00c3;
} // end catch (depth: 1)
IL_00bd:
{
V_5 = (bool)1;
goto IL_00c3;
}
IL_00c3:
{
bool L_32 = V_5;
return L_32;
}
}
// System.Void Lidgren.Network.NetConnection::InitializeRemoteTimeOffset(System.Single)
extern Il2CppClass* NetTime_t3056501352_il2cpp_TypeInfo_var;
extern const uint32_t NetConnection_InitializeRemoteTimeOffset_m4193429857_MetadataUsageId;
extern "C" void NetConnection_InitializeRemoteTimeOffset_m4193429857 (NetConnection_t3331492029 * __this, float ___remoteSendTime0, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetConnection_InitializeRemoteTimeOffset_m4193429857_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
{
float L_0 = ___remoteSendTime0;
double L_1 = __this->get_m_averageRoundtripTime_25();
IL2CPP_RUNTIME_CLASS_INIT(NetTime_t3056501352_il2cpp_TypeInfo_var);
double L_2 = NetTime_get_Now_m1609702533(NULL /*static, unused*/, /*hidden argument*/NULL);
__this->set_m_remoteTimeOffset_27(((double)((double)((double)((double)(((double)((double)L_0)))+(double)((double)((double)L_1/(double)(2.0)))))-(double)L_2)));
return;
}
}
// System.Void Lidgren.Network.NetConnection::InitializePing()
extern Il2CppClass* NetTime_t3056501352_il2cpp_TypeInfo_var;
extern const uint32_t NetConnection_InitializePing_m1433079092_MetadataUsageId;
extern "C" void NetConnection_InitializePing_m1433079092 (NetConnection_t3331492029 * __this, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetConnection_InitializePing_m1433079092_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
{
IL2CPP_RUNTIME_CLASS_INIT(NetTime_t3056501352_il2cpp_TypeInfo_var);
double L_0 = NetTime_get_Now_m1609702533(NULL /*static, unused*/, /*hidden argument*/NULL);
NetPeerConfiguration_t136603591 * L_1 = __this->get_m_peerConfiguration_1();
NullCheck(L_1);
float L_2 = L_1->get_m_connectionTimeout_11();
__this->set_m_timeoutDeadline_26(((double)((double)L_0+(double)((double)((double)(((double)((double)L_2)))*(double)(2.0))))));
NetConnection_SendPing_m2389823252(__this, /*hidden argument*/NULL);
return;
}
}
// System.Void Lidgren.Network.NetConnection::SendPing()
extern Il2CppClass* NetTime_t3056501352_il2cpp_TypeInfo_var;
extern const uint32_t NetConnection_SendPing_m2389823252_MetadataUsageId;
extern "C" void NetConnection_SendPing_m2389823252 (NetConnection_t3331492029 * __this, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetConnection_SendPing_m2389823252_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
NetOutgoingMessage_t2016542980 * V_0 = NULL;
int32_t V_1 = 0;
bool V_2 = false;
{
NetPeer_t1779390221 * L_0 = __this->get_m_peer_0();
NullCheck(L_0);
NetPeer_VerifyNetworkThread_m4075953563(L_0, /*hidden argument*/NULL);
int32_t L_1 = __this->get_m_sentPingNumber_24();
__this->set_m_sentPingNumber_24(((int32_t)((int32_t)L_1+(int32_t)1)));
IL2CPP_RUNTIME_CLASS_INIT(NetTime_t3056501352_il2cpp_TypeInfo_var);
double L_2 = NetTime_get_Now_m1609702533(NULL /*static, unused*/, /*hidden argument*/NULL);
__this->set_m_sentPingTime_23(L_2);
NetPeer_t1779390221 * L_3 = __this->get_m_peer_0();
NullCheck(L_3);
NetOutgoingMessage_t2016542980 * L_4 = NetPeer_CreateMessage_m3328975762(L_3, 1, /*hidden argument*/NULL);
V_0 = L_4;
NetOutgoingMessage_t2016542980 * L_5 = V_0;
int32_t L_6 = __this->get_m_sentPingNumber_24();
NullCheck(L_5);
NetBuffer_Write_m4142810212(L_5, (((int32_t)((uint8_t)L_6))), /*hidden argument*/NULL);
NetOutgoingMessage_t2016542980 * L_7 = V_0;
NullCheck(L_7);
L_7->set_m_messageType_5(((int32_t)129));
NetOutgoingMessage_t2016542980 * L_8 = V_0;
NetPeer_t1779390221 * L_9 = __this->get_m_peer_0();
NullCheck(L_9);
ByteU5BU5D_t3397334013* L_10 = L_9->get_m_sendBuffer_11();
NullCheck(L_8);
int32_t L_11 = NetOutgoingMessage_Encode_m2473987076(L_8, L_10, 0, 0, /*hidden argument*/NULL);
V_1 = L_11;
NetPeer_t1779390221 * L_12 = __this->get_m_peer_0();
int32_t L_13 = V_1;
IPEndPoint_t2615413766 * L_14 = __this->get_m_remoteEndPoint_5();
NullCheck(L_12);
NetPeer_SendPacket_m625616909(L_12, L_13, L_14, 1, (&V_2), /*hidden argument*/NULL);
NetConnectionStatistics_t1235765202 * L_15 = __this->get_m_statistics_14();
int32_t L_16 = V_1;
NullCheck(L_15);
NetConnectionStatistics_PacketSent_m833909693(L_15, L_16, 1, /*hidden argument*/NULL);
NetPeer_t1779390221 * L_17 = __this->get_m_peer_0();
NetOutgoingMessage_t2016542980 * L_18 = V_0;
NullCheck(L_17);
NetPeer_Recycle_m2290156780(L_17, L_18, /*hidden argument*/NULL);
return;
}
}
// System.Void Lidgren.Network.NetConnection::SendPong(System.Int32)
extern Il2CppClass* NetTime_t3056501352_il2cpp_TypeInfo_var;
extern const uint32_t NetConnection_SendPong_m2305285507_MetadataUsageId;
extern "C" void NetConnection_SendPong_m2305285507 (NetConnection_t3331492029 * __this, int32_t ___pingNumber0, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetConnection_SendPong_m2305285507_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
NetOutgoingMessage_t2016542980 * V_0 = NULL;
int32_t V_1 = 0;
bool V_2 = false;
{
NetPeer_t1779390221 * L_0 = __this->get_m_peer_0();
NullCheck(L_0);
NetPeer_VerifyNetworkThread_m4075953563(L_0, /*hidden argument*/NULL);
NetPeer_t1779390221 * L_1 = __this->get_m_peer_0();
NullCheck(L_1);
NetOutgoingMessage_t2016542980 * L_2 = NetPeer_CreateMessage_m3328975762(L_1, 5, /*hidden argument*/NULL);
V_0 = L_2;
NetOutgoingMessage_t2016542980 * L_3 = V_0;
int32_t L_4 = ___pingNumber0;
NullCheck(L_3);
NetBuffer_Write_m4142810212(L_3, (((int32_t)((uint8_t)L_4))), /*hidden argument*/NULL);
NetOutgoingMessage_t2016542980 * L_5 = V_0;
IL2CPP_RUNTIME_CLASS_INIT(NetTime_t3056501352_il2cpp_TypeInfo_var);
double L_6 = NetTime_get_Now_m1609702533(NULL /*static, unused*/, /*hidden argument*/NULL);
NullCheck(L_5);
NetBuffer_Write_m2191092918(L_5, (((float)((float)L_6))), /*hidden argument*/NULL);
NetOutgoingMessage_t2016542980 * L_7 = V_0;
NullCheck(L_7);
L_7->set_m_messageType_5(((int32_t)130));
NetOutgoingMessage_t2016542980 * L_8 = V_0;
NetPeer_t1779390221 * L_9 = __this->get_m_peer_0();
NullCheck(L_9);
ByteU5BU5D_t3397334013* L_10 = L_9->get_m_sendBuffer_11();
NullCheck(L_8);
int32_t L_11 = NetOutgoingMessage_Encode_m2473987076(L_8, L_10, 0, 0, /*hidden argument*/NULL);
V_1 = L_11;
NetPeer_t1779390221 * L_12 = __this->get_m_peer_0();
int32_t L_13 = V_1;
IPEndPoint_t2615413766 * L_14 = __this->get_m_remoteEndPoint_5();
NullCheck(L_12);
NetPeer_SendPacket_m625616909(L_12, L_13, L_14, 1, (&V_2), /*hidden argument*/NULL);
NetConnectionStatistics_t1235765202 * L_15 = __this->get_m_statistics_14();
int32_t L_16 = V_1;
NullCheck(L_15);
NetConnectionStatistics_PacketSent_m833909693(L_15, L_16, 1, /*hidden argument*/NULL);
NetPeer_t1779390221 * L_17 = __this->get_m_peer_0();
NetOutgoingMessage_t2016542980 * L_18 = V_0;
NullCheck(L_17);
NetPeer_Recycle_m2290156780(L_17, L_18, /*hidden argument*/NULL);
return;
}
}
// System.Void Lidgren.Network.NetConnection::ReceivedPong(System.Double,System.Int32,System.Single)
extern Il2CppClass* ObjectU5BU5D_t3614634134_il2cpp_TypeInfo_var;
extern Il2CppClass* NetTime_t3056501352_il2cpp_TypeInfo_var;
extern Il2CppClass* Double_t4078015681_il2cpp_TypeInfo_var;
extern Il2CppClass* String_t_il2cpp_TypeInfo_var;
extern Il2CppClass* NetReliableSenderChannel_t2899775811_il2cpp_TypeInfo_var;
extern Il2CppCodeGenString* _stringLiteral4245561682;
extern Il2CppCodeGenString* _stringLiteral1321227063;
extern Il2CppCodeGenString* _stringLiteral2416199701;
extern Il2CppCodeGenString* _stringLiteral3057783585;
extern Il2CppCodeGenString* _stringLiteral2075953382;
extern Il2CppCodeGenString* _stringLiteral272685891;
extern Il2CppCodeGenString* _stringLiteral372029317;
extern const uint32_t NetConnection_ReceivedPong_m1658356675_MetadataUsageId;
extern "C" void NetConnection_ReceivedPong_m1658356675 (NetConnection_t3331492029 * __this, double ___now0, int32_t ___pongNumber1, float ___remoteSendTime2, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetConnection_ReceivedPong_m1658356675_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
double V_0 = 0.0;
double V_1 = 0.0;
double V_2 = 0.0;
NetSenderChannelBase_t3096690204 * V_3 = NULL;
NetReliableSenderChannel_t2899775811 * V_4 = NULL;
NetIncomingMessage_t2014089816 * V_5 = NULL;
bool V_6 = false;
ObjectU5BU5D_t3614634134* V_7 = NULL;
NetSenderChannelBaseU5BU5D_t470374901* V_8 = NULL;
int32_t V_9 = 0;
{
int32_t L_0 = ___pongNumber1;
int32_t L_1 = __this->get_m_sentPingNumber_24();
V_6 = (bool)((((int32_t)(((int32_t)((uint8_t)L_0)))) == ((int32_t)(((int32_t)((uint8_t)L_1)))))? 1 : 0);
bool L_2 = V_6;
if (L_2)
{
goto IL_0029;
}
}
{
NetPeer_t1779390221 * L_3 = __this->get_m_peer_0();
NullCheck(L_3);
NetPeer_LogVerbose_m3434660420(L_3, _stringLiteral4245561682, /*hidden argument*/NULL);
goto IL_0241;
}
IL_0029:
{
double L_4 = ___now0;
NetPeerConfiguration_t136603591 * L_5 = __this->get_m_peerConfiguration_1();
NullCheck(L_5);
float L_6 = L_5->get_m_connectionTimeout_11();
__this->set_m_timeoutDeadline_26(((double)((double)L_4+(double)(((double)((double)L_6))))));
double L_7 = ___now0;
double L_8 = __this->get_m_sentPingTime_23();
V_0 = ((double)((double)L_7-(double)L_8));
double L_9 = V_0;
NetException_Assert_m1426298558(NULL /*static, unused*/, (bool)((((int32_t)((!(((double)L_9) >= ((double)(0.0))))? 1 : 0)) == ((int32_t)0))? 1 : 0), /*hidden argument*/NULL);
float L_10 = ___remoteSendTime2;
double L_11 = V_0;
double L_12 = ___now0;
V_1 = ((double)((double)((double)((double)(((double)((double)L_10)))+(double)((double)((double)L_11/(double)(2.0)))))-(double)L_12));
double L_13 = __this->get_m_averageRoundtripTime_25();
V_6 = (bool)((((int32_t)((((double)L_13) < ((double)(0.0)))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_14 = V_6;
if (L_14)
{
goto IL_00e3;
}
}
{
double L_15 = V_1;
__this->set_m_remoteTimeOffset_27(L_15);
double L_16 = V_0;
__this->set_m_averageRoundtripTime_25(L_16);
NetPeer_t1779390221 * L_17 = __this->get_m_peer_0();
V_7 = ((ObjectU5BU5D_t3614634134*)SZArrayNew(ObjectU5BU5D_t3614634134_il2cpp_TypeInfo_var, (uint32_t)4));
ObjectU5BU5D_t3614634134* L_18 = V_7;
NullCheck(L_18);
IL2CPP_ARRAY_BOUNDS_CHECK(L_18, 0);
ArrayElementTypeCheck (L_18, _stringLiteral1321227063);
(L_18)->SetAt(static_cast<il2cpp_array_size_t>(0), (Il2CppObject *)_stringLiteral1321227063);
ObjectU5BU5D_t3614634134* L_19 = V_7;
double L_20 = __this->get_m_averageRoundtripTime_25();
IL2CPP_RUNTIME_CLASS_INIT(NetTime_t3056501352_il2cpp_TypeInfo_var);
String_t* L_21 = NetTime_ToReadable_m2326980775(NULL /*static, unused*/, L_20, /*hidden argument*/NULL);
NullCheck(L_19);
IL2CPP_ARRAY_BOUNDS_CHECK(L_19, 1);
ArrayElementTypeCheck (L_19, L_21);
(L_19)->SetAt(static_cast<il2cpp_array_size_t>(1), (Il2CppObject *)L_21);
ObjectU5BU5D_t3614634134* L_22 = V_7;
NullCheck(L_22);
IL2CPP_ARRAY_BOUNDS_CHECK(L_22, 2);
ArrayElementTypeCheck (L_22, _stringLiteral2416199701);
(L_22)->SetAt(static_cast<il2cpp_array_size_t>(2), (Il2CppObject *)_stringLiteral2416199701);
ObjectU5BU5D_t3614634134* L_23 = V_7;
double L_24 = ___now0;
double L_25 = V_1;
double L_26 = ((double)((double)L_24+(double)L_25));
Il2CppObject * L_27 = Box(Double_t4078015681_il2cpp_TypeInfo_var, &L_26);
NullCheck(L_23);
IL2CPP_ARRAY_BOUNDS_CHECK(L_23, 3);
ArrayElementTypeCheck (L_23, L_27);
(L_23)->SetAt(static_cast<il2cpp_array_size_t>(3), (Il2CppObject *)L_27);
ObjectU5BU5D_t3614634134* L_28 = V_7;
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_29 = String_Concat_m3881798623(NULL /*static, unused*/, L_28, /*hidden argument*/NULL);
NullCheck(L_17);
NetPeer_LogDebug_m2983960595(L_17, L_29, /*hidden argument*/NULL);
goto IL_0195;
}
IL_00e3:
{
double L_30 = __this->get_m_averageRoundtripTime_25();
double L_31 = V_0;
__this->set_m_averageRoundtripTime_25(((double)((double)((double)((double)L_30*(double)(0.7)))+(double)((double)((double)L_31*(double)(0.3))))));
double L_32 = __this->get_m_remoteTimeOffset_27();
int32_t L_33 = __this->get_m_sentPingNumber_24();
double L_34 = V_1;
int32_t L_35 = __this->get_m_sentPingNumber_24();
__this->set_m_remoteTimeOffset_27(((double)((double)((double)((double)((double)((double)L_32*(double)(((double)((double)((int32_t)((int32_t)L_33-(int32_t)1)))))))+(double)L_34))/(double)(((double)((double)L_35))))));
NetPeer_t1779390221 * L_36 = __this->get_m_peer_0();
V_7 = ((ObjectU5BU5D_t3614634134*)SZArrayNew(ObjectU5BU5D_t3614634134_il2cpp_TypeInfo_var, (uint32_t)7));
ObjectU5BU5D_t3614634134* L_37 = V_7;
NullCheck(L_37);
IL2CPP_ARRAY_BOUNDS_CHECK(L_37, 0);
ArrayElementTypeCheck (L_37, _stringLiteral3057783585);
(L_37)->SetAt(static_cast<il2cpp_array_size_t>(0), (Il2CppObject *)_stringLiteral3057783585);
ObjectU5BU5D_t3614634134* L_38 = V_7;
double L_39 = __this->get_m_averageRoundtripTime_25();
IL2CPP_RUNTIME_CLASS_INIT(NetTime_t3056501352_il2cpp_TypeInfo_var);
String_t* L_40 = NetTime_ToReadable_m2326980775(NULL /*static, unused*/, L_39, /*hidden argument*/NULL);
NullCheck(L_38);
IL2CPP_ARRAY_BOUNDS_CHECK(L_38, 1);
ArrayElementTypeCheck (L_38, L_40);
(L_38)->SetAt(static_cast<il2cpp_array_size_t>(1), (Il2CppObject *)L_40);
ObjectU5BU5D_t3614634134* L_41 = V_7;
NullCheck(L_41);
IL2CPP_ARRAY_BOUNDS_CHECK(L_41, 2);
ArrayElementTypeCheck (L_41, _stringLiteral2075953382);
(L_41)->SetAt(static_cast<il2cpp_array_size_t>(2), (Il2CppObject *)_stringLiteral2075953382);
ObjectU5BU5D_t3614634134* L_42 = V_7;
double L_43 = ___now0;
double L_44 = __this->get_m_remoteTimeOffset_27();
double L_45 = ((double)((double)L_43+(double)L_44));
Il2CppObject * L_46 = Box(Double_t4078015681_il2cpp_TypeInfo_var, &L_45);
NullCheck(L_42);
IL2CPP_ARRAY_BOUNDS_CHECK(L_42, 3);
ArrayElementTypeCheck (L_42, L_46);
(L_42)->SetAt(static_cast<il2cpp_array_size_t>(3), (Il2CppObject *)L_46);
ObjectU5BU5D_t3614634134* L_47 = V_7;
NullCheck(L_47);
IL2CPP_ARRAY_BOUNDS_CHECK(L_47, 4);
ArrayElementTypeCheck (L_47, _stringLiteral272685891);
(L_47)->SetAt(static_cast<il2cpp_array_size_t>(4), (Il2CppObject *)_stringLiteral272685891);
ObjectU5BU5D_t3614634134* L_48 = V_7;
double L_49 = __this->get_m_remoteTimeOffset_27();
double L_50 = L_49;
Il2CppObject * L_51 = Box(Double_t4078015681_il2cpp_TypeInfo_var, &L_50);
NullCheck(L_48);
IL2CPP_ARRAY_BOUNDS_CHECK(L_48, 5);
ArrayElementTypeCheck (L_48, L_51);
(L_48)->SetAt(static_cast<il2cpp_array_size_t>(5), (Il2CppObject *)L_51);
ObjectU5BU5D_t3614634134* L_52 = V_7;
NullCheck(L_52);
IL2CPP_ARRAY_BOUNDS_CHECK(L_52, 6);
ArrayElementTypeCheck (L_52, _stringLiteral372029317);
(L_52)->SetAt(static_cast<il2cpp_array_size_t>(6), (Il2CppObject *)_stringLiteral372029317);
ObjectU5BU5D_t3614634134* L_53 = V_7;
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_54 = String_Concat_m3881798623(NULL /*static, unused*/, L_53, /*hidden argument*/NULL);
NullCheck(L_36);
NetPeer_LogVerbose_m3434660420(L_36, L_54, /*hidden argument*/NULL);
}
IL_0195:
{
double L_55 = NetConnection_GetResendDelay_m601539877(__this, /*hidden argument*/NULL);
V_2 = L_55;
NetSenderChannelBaseU5BU5D_t470374901* L_56 = __this->get_m_sendChannels_6();
V_8 = L_56;
V_9 = 0;
goto IL_01d3;
}
IL_01aa:
{
NetSenderChannelBaseU5BU5D_t470374901* L_57 = V_8;
int32_t L_58 = V_9;
NullCheck(L_57);
IL2CPP_ARRAY_BOUNDS_CHECK(L_57, L_58);
int32_t L_59 = L_58;
NetSenderChannelBase_t3096690204 * L_60 = (L_57)->GetAt(static_cast<il2cpp_array_size_t>(L_59));
V_3 = L_60;
NetSenderChannelBase_t3096690204 * L_61 = V_3;
V_4 = ((NetReliableSenderChannel_t2899775811 *)IsInstSealed(L_61, NetReliableSenderChannel_t2899775811_il2cpp_TypeInfo_var));
NetReliableSenderChannel_t2899775811 * L_62 = V_4;
V_6 = (bool)((((Il2CppObject*)(NetReliableSenderChannel_t2899775811 *)L_62) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0);
bool L_63 = V_6;
if (L_63)
{
goto IL_01cc;
}
}
{
NetReliableSenderChannel_t2899775811 * L_64 = V_4;
double L_65 = V_2;
NullCheck(L_64);
L_64->set_m_resendDelay_8(L_65);
}
IL_01cc:
{
int32_t L_66 = V_9;
V_9 = ((int32_t)((int32_t)L_66+(int32_t)1));
}
IL_01d3:
{
int32_t L_67 = V_9;
NetSenderChannelBaseU5BU5D_t470374901* L_68 = V_8;
NullCheck(L_68);
V_6 = (bool)((((int32_t)L_67) < ((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_68)->max_length))))))? 1 : 0);
bool L_69 = V_6;
if (L_69)
{
goto IL_01aa;
}
}
{
NetPeer_t1779390221 * L_70 = __this->get_m_peer_0();
NullCheck(L_70);
NetPeerConfiguration_t136603591 * L_71 = L_70->get_m_configuration_21();
NullCheck(L_71);
bool L_72 = NetPeerConfiguration_IsMessageTypeEnabled_m1110774391(L_71, ((int32_t)4096), /*hidden argument*/NULL);
V_6 = (bool)((((int32_t)L_72) == ((int32_t)0))? 1 : 0);
bool L_73 = V_6;
if (L_73)
{
goto IL_0241;
}
}
{
NetPeer_t1779390221 * L_74 = __this->get_m_peer_0();
NullCheck(L_74);
NetIncomingMessage_t2014089816 * L_75 = NetPeer_CreateIncomingMessage_m2109562735(L_74, ((int32_t)4096), 4, /*hidden argument*/NULL);
V_5 = L_75;
NetIncomingMessage_t2014089816 * L_76 = V_5;
NullCheck(L_76);
L_76->set_m_senderConnection_7(__this);
NetIncomingMessage_t2014089816 * L_77 = V_5;
IPEndPoint_t2615413766 * L_78 = __this->get_m_remoteEndPoint_5();
NullCheck(L_77);
L_77->set_m_senderEndPoint_6(L_78);
NetIncomingMessage_t2014089816 * L_79 = V_5;
double L_80 = V_0;
NullCheck(L_79);
NetBuffer_Write_m2191092918(L_79, (((float)((float)L_80))), /*hidden argument*/NULL);
NetPeer_t1779390221 * L_81 = __this->get_m_peer_0();
NetIncomingMessage_t2014089816 * L_82 = V_5;
NullCheck(L_81);
NetPeer_ReleaseMessage_m3520648965(L_81, L_82, /*hidden argument*/NULL);
}
IL_0241:
{
return;
}
}
// System.Void Lidgren.Network.NetConnection::InitExpandMTU(System.Double)
extern "C" void NetConnection_InitExpandMTU_m3761872672 (NetConnection_t3331492029 * __this, double ___now0, const MethodInfo* method)
{
{
double L_0 = ___now0;
NetPeerConfiguration_t136603591 * L_1 = __this->get_m_peerConfiguration_1();
NullCheck(L_1);
float L_2 = L_1->get_m_expandMTUFrequency_28();
double L_3 = __this->get_m_averageRoundtripTime_25();
__this->set_m_lastSentMTUAttemptTime_32(((double)((double)((double)((double)((double)((double)L_0+(double)(((double)((double)L_2)))))+(double)(1.5)))+(double)L_3)));
__this->set_m_largestSuccessfulMTU_29(((int32_t)512));
__this->set_m_smallestFailedMTU_30((-1));
NetPeerConfiguration_t136603591 * L_4 = __this->get_m_peerConfiguration_1();
NullCheck(L_4);
int32_t L_5 = NetPeerConfiguration_get_MaximumTransmissionUnit_m2375210687(L_4, /*hidden argument*/NULL);
__this->set_m_currentMTU_34(L_5);
return;
}
}
// System.Void Lidgren.Network.NetConnection::MTUExpansionHeartbeat(System.Double)
extern "C" void NetConnection_MTUExpansionHeartbeat_m2691120475 (NetConnection_t3331492029 * __this, double ___now0, const MethodInfo* method)
{
bool V_0 = false;
{
int32_t L_0 = __this->get_m_expandMTUStatus_28();
V_0 = (bool)((((int32_t)((((int32_t)L_0) == ((int32_t)2))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_1 = V_0;
if (L_1)
{
goto IL_0016;
}
}
{
goto IL_00b1;
}
IL_0016:
{
int32_t L_2 = __this->get_m_expandMTUStatus_28();
V_0 = (bool)((((int32_t)((((int32_t)L_2) == ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_3 = V_0;
if (L_3)
{
goto IL_0050;
}
}
{
NetPeerConfiguration_t136603591 * L_4 = __this->get_m_peerConfiguration_1();
NullCheck(L_4);
bool L_5 = L_4->get_m_autoExpandMTU_27();
V_0 = L_5;
bool L_6 = V_0;
if (L_6)
{
goto IL_0046;
}
}
{
int32_t L_7 = __this->get_m_currentMTU_34();
NetConnection_FinalizeMTU_m2014645003(__this, L_7, /*hidden argument*/NULL);
goto IL_00b1;
}
IL_0046:
{
double L_8 = ___now0;
NetConnection_ExpandMTU_m3901073334(__this, L_8, /*hidden argument*/NULL);
goto IL_00b1;
}
IL_0050:
{
double L_9 = ___now0;
double L_10 = __this->get_m_lastSentMTUAttemptTime_32();
NetPeerConfiguration_t136603591 * L_11 = __this->get_m_peerConfiguration_1();
NullCheck(L_11);
float L_12 = NetPeerConfiguration_get_ExpandMTUFrequency_m1301209541(L_11, /*hidden argument*/NULL);
V_0 = (bool)((((int32_t)((((double)L_9) > ((double)((double)((double)L_10+(double)(((double)((double)L_12)))))))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_13 = V_0;
if (L_13)
{
goto IL_00b1;
}
}
{
int32_t L_14 = __this->get_m_mtuAttemptFails_33();
__this->set_m_mtuAttemptFails_33(((int32_t)((int32_t)L_14+(int32_t)1)));
int32_t L_15 = __this->get_m_mtuAttemptFails_33();
V_0 = (bool)((((int32_t)((((int32_t)L_15) == ((int32_t)3))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_16 = V_0;
if (L_16)
{
goto IL_009c;
}
}
{
int32_t L_17 = __this->get_m_currentMTU_34();
NetConnection_FinalizeMTU_m2014645003(__this, L_17, /*hidden argument*/NULL);
goto IL_00b1;
}
IL_009c:
{
int32_t L_18 = __this->get_m_lastSentMTUAttemptSize_31();
__this->set_m_smallestFailedMTU_30(L_18);
double L_19 = ___now0;
NetConnection_ExpandMTU_m3901073334(__this, L_19, /*hidden argument*/NULL);
}
IL_00b1:
{
return;
}
}
// System.Void Lidgren.Network.NetConnection::ExpandMTU(System.Double)
extern "C" void NetConnection_ExpandMTU_m3901073334 (NetConnection_t3331492029 * __this, double ___now0, const MethodInfo* method)
{
int32_t V_0 = 0;
bool V_1 = false;
{
int32_t L_0 = __this->get_m_smallestFailedMTU_30();
V_1 = (bool)((((int32_t)((((int32_t)L_0) == ((int32_t)(-1)))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_1 = V_1;
if (L_1)
{
goto IL_0024;
}
}
{
int32_t L_2 = __this->get_m_currentMTU_34();
V_0 = (((int32_t)((int32_t)((float)((float)(((float)((float)L_2)))*(float)(1.25f))))));
goto IL_003d;
}
IL_0024:
{
int32_t L_3 = __this->get_m_smallestFailedMTU_30();
int32_t L_4 = __this->get_m_largestSuccessfulMTU_29();
V_0 = (((int32_t)((int32_t)((float)((float)((float)((float)(((float)((float)L_3)))+(float)(((float)((float)L_4)))))/(float)(2.0f))))));
}
IL_003d:
{
int32_t L_5 = V_0;
V_1 = (bool)((((int32_t)((((int32_t)L_5) > ((int32_t)((int32_t)8190)))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_6 = V_1;
if (L_6)
{
goto IL_0052;
}
}
{
V_0 = ((int32_t)8190);
}
IL_0052:
{
int32_t L_7 = V_0;
int32_t L_8 = __this->get_m_largestSuccessfulMTU_29();
V_1 = (bool)((((int32_t)((((int32_t)L_7) == ((int32_t)L_8))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_9 = V_1;
if (L_9)
{
goto IL_0072;
}
}
{
int32_t L_10 = __this->get_m_largestSuccessfulMTU_29();
NetConnection_FinalizeMTU_m2014645003(__this, L_10, /*hidden argument*/NULL);
goto IL_007b;
}
IL_0072:
{
double L_11 = ___now0;
int32_t L_12 = V_0;
NetConnection_SendExpandMTU_m2101316153(__this, L_11, L_12, /*hidden argument*/NULL);
}
IL_007b:
{
return;
}
}
// System.Void Lidgren.Network.NetConnection::SendExpandMTU(System.Double,System.Int32)
extern Il2CppClass* ByteU5BU5D_t3397334013_il2cpp_TypeInfo_var;
extern const uint32_t NetConnection_SendExpandMTU_m2101316153_MetadataUsageId;
extern "C" void NetConnection_SendExpandMTU_m2101316153 (NetConnection_t3331492029 * __this, double ___now0, int32_t ___size1, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetConnection_SendExpandMTU_m2101316153_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
NetOutgoingMessage_t2016542980 * V_0 = NULL;
ByteU5BU5D_t3397334013* V_1 = NULL;
int32_t V_2 = 0;
bool V_3 = false;
bool V_4 = false;
int32_t G_B4_0 = 0;
{
NetPeer_t1779390221 * L_0 = __this->get_m_peer_0();
int32_t L_1 = ___size1;
NullCheck(L_0);
NetOutgoingMessage_t2016542980 * L_2 = NetPeer_CreateMessage_m3328975762(L_0, L_1, /*hidden argument*/NULL);
V_0 = L_2;
int32_t L_3 = ___size1;
V_1 = ((ByteU5BU5D_t3397334013*)SZArrayNew(ByteU5BU5D_t3397334013_il2cpp_TypeInfo_var, (uint32_t)L_3));
NetOutgoingMessage_t2016542980 * L_4 = V_0;
ByteU5BU5D_t3397334013* L_5 = V_1;
NullCheck(L_4);
NetBuffer_Write_m3595600516(L_4, L_5, /*hidden argument*/NULL);
NetOutgoingMessage_t2016542980 * L_6 = V_0;
NullCheck(L_6);
L_6->set_m_messageType_5(((int32_t)140));
NetOutgoingMessage_t2016542980 * L_7 = V_0;
NetPeer_t1779390221 * L_8 = __this->get_m_peer_0();
NullCheck(L_8);
ByteU5BU5D_t3397334013* L_9 = L_8->get_m_sendBuffer_11();
NullCheck(L_7);
int32_t L_10 = NetOutgoingMessage_Encode_m2473987076(L_7, L_9, 0, 0, /*hidden argument*/NULL);
V_2 = L_10;
NetPeer_t1779390221 * L_11 = __this->get_m_peer_0();
int32_t L_12 = V_2;
IPEndPoint_t2615413766 * L_13 = __this->get_m_remoteEndPoint_5();
NullCheck(L_11);
bool L_14 = NetPeer_SendMTUPacket_m1323873705(L_11, L_12, L_13, /*hidden argument*/NULL);
V_3 = L_14;
bool L_15 = V_3;
V_4 = L_15;
bool L_16 = V_4;
if (L_16)
{
goto IL_00c0;
}
}
{
int32_t L_17 = __this->get_m_smallestFailedMTU_30();
if ((((int32_t)L_17) == ((int32_t)(-1))))
{
goto IL_006e;
}
}
{
int32_t L_18 = ___size1;
int32_t L_19 = __this->get_m_smallestFailedMTU_30();
G_B4_0 = ((((int32_t)((((int32_t)L_18) < ((int32_t)L_19))? 1 : 0)) == ((int32_t)0))? 1 : 0);
goto IL_006f;
}
IL_006e:
{
G_B4_0 = 0;
}
IL_006f:
{
V_4 = (bool)G_B4_0;
bool L_20 = V_4;
if (L_20)
{
goto IL_00b6;
}
}
{
int32_t L_21 = ___size1;
__this->set_m_smallestFailedMTU_30(L_21);
int32_t L_22 = __this->get_m_mtuAttemptFails_33();
__this->set_m_mtuAttemptFails_33(((int32_t)((int32_t)L_22+(int32_t)1)));
int32_t L_23 = __this->get_m_mtuAttemptFails_33();
NetPeerConfiguration_t136603591 * L_24 = __this->get_m_peerConfiguration_1();
NullCheck(L_24);
int32_t L_25 = NetPeerConfiguration_get_ExpandMTUFailAttempts_m2610030021(L_24, /*hidden argument*/NULL);
V_4 = (bool)((((int32_t)L_23) < ((int32_t)L_25))? 1 : 0);
bool L_26 = V_4;
if (L_26)
{
goto IL_00b5;
}
}
{
int32_t L_27 = __this->get_m_largestSuccessfulMTU_29();
NetConnection_FinalizeMTU_m2014645003(__this, L_27, /*hidden argument*/NULL);
goto IL_00e9;
}
IL_00b5:
{
}
IL_00b6:
{
double L_28 = ___now0;
NetConnection_ExpandMTU_m3901073334(__this, L_28, /*hidden argument*/NULL);
goto IL_00e9;
}
IL_00c0:
{
int32_t L_29 = ___size1;
__this->set_m_lastSentMTUAttemptSize_31(L_29);
double L_30 = ___now0;
__this->set_m_lastSentMTUAttemptTime_32(L_30);
NetConnectionStatistics_t1235765202 * L_31 = __this->get_m_statistics_14();
int32_t L_32 = V_2;
NullCheck(L_31);
NetConnectionStatistics_PacketSent_m833909693(L_31, L_32, 1, /*hidden argument*/NULL);
NetPeer_t1779390221 * L_33 = __this->get_m_peer_0();
NetOutgoingMessage_t2016542980 * L_34 = V_0;
NullCheck(L_33);
NetPeer_Recycle_m2290156780(L_33, L_34, /*hidden argument*/NULL);
}
IL_00e9:
{
return;
}
}
// System.Void Lidgren.Network.NetConnection::FinalizeMTU(System.Int32)
extern Il2CppClass* Int32_t2071877448_il2cpp_TypeInfo_var;
extern Il2CppClass* String_t_il2cpp_TypeInfo_var;
extern Il2CppCodeGenString* _stringLiteral1699947350;
extern Il2CppCodeGenString* _stringLiteral2058082297;
extern const uint32_t NetConnection_FinalizeMTU_m2014645003_MetadataUsageId;
extern "C" void NetConnection_FinalizeMTU_m2014645003 (NetConnection_t3331492029 * __this, int32_t ___size0, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetConnection_FinalizeMTU_m2014645003_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
bool V_0 = false;
{
int32_t L_0 = __this->get_m_expandMTUStatus_28();
V_0 = (bool)((((int32_t)((((int32_t)L_0) == ((int32_t)2))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_1 = V_0;
if (L_1)
{
goto IL_0013;
}
}
{
goto IL_0060;
}
IL_0013:
{
__this->set_m_expandMTUStatus_28(2);
int32_t L_2 = ___size0;
__this->set_m_currentMTU_34(L_2);
int32_t L_3 = __this->get_m_currentMTU_34();
NetPeerConfiguration_t136603591 * L_4 = __this->get_m_peerConfiguration_1();
NullCheck(L_4);
int32_t L_5 = L_4->get_m_maximumTransmissionUnit_26();
V_0 = (bool)((((int32_t)L_3) == ((int32_t)L_5))? 1 : 0);
bool L_6 = V_0;
if (L_6)
{
goto IL_005e;
}
}
{
NetPeer_t1779390221 * L_7 = __this->get_m_peer_0();
int32_t L_8 = __this->get_m_currentMTU_34();
int32_t L_9 = L_8;
Il2CppObject * L_10 = Box(Int32_t2071877448_il2cpp_TypeInfo_var, &L_9);
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_11 = String_Concat_m2000667605(NULL /*static, unused*/, _stringLiteral1699947350, L_10, _stringLiteral2058082297, /*hidden argument*/NULL);
NullCheck(L_7);
NetPeer_LogDebug_m2983960595(L_7, L_11, /*hidden argument*/NULL);
}
IL_005e:
{
goto IL_0060;
}
IL_0060:
{
return;
}
}
// System.Void Lidgren.Network.NetConnection::SendMTUSuccess(System.Int32)
extern "C" void NetConnection_SendMTUSuccess_m827100686 (NetConnection_t3331492029 * __this, int32_t ___size0, const MethodInfo* method)
{
NetOutgoingMessage_t2016542980 * V_0 = NULL;
int32_t V_1 = 0;
bool V_2 = false;
{
NetPeer_t1779390221 * L_0 = __this->get_m_peer_0();
NullCheck(L_0);
NetOutgoingMessage_t2016542980 * L_1 = NetPeer_CreateMessage_m3328975762(L_0, 4, /*hidden argument*/NULL);
V_0 = L_1;
NetOutgoingMessage_t2016542980 * L_2 = V_0;
int32_t L_3 = ___size0;
NullCheck(L_2);
NetBuffer_Write_m3675152492(L_2, L_3, /*hidden argument*/NULL);
NetOutgoingMessage_t2016542980 * L_4 = V_0;
NullCheck(L_4);
L_4->set_m_messageType_5(((int32_t)141));
NetOutgoingMessage_t2016542980 * L_5 = V_0;
NetPeer_t1779390221 * L_6 = __this->get_m_peer_0();
NullCheck(L_6);
ByteU5BU5D_t3397334013* L_7 = L_6->get_m_sendBuffer_11();
NullCheck(L_5);
int32_t L_8 = NetOutgoingMessage_Encode_m2473987076(L_5, L_7, 0, 0, /*hidden argument*/NULL);
V_1 = L_8;
NetPeer_t1779390221 * L_9 = __this->get_m_peer_0();
int32_t L_10 = V_1;
IPEndPoint_t2615413766 * L_11 = __this->get_m_remoteEndPoint_5();
NullCheck(L_9);
NetPeer_SendPacket_m625616909(L_9, L_10, L_11, 1, (&V_2), /*hidden argument*/NULL);
NetPeer_t1779390221 * L_12 = __this->get_m_peer_0();
NetOutgoingMessage_t2016542980 * L_13 = V_0;
NullCheck(L_12);
NetPeer_Recycle_m2290156780(L_12, L_13, /*hidden argument*/NULL);
NetConnectionStatistics_t1235765202 * L_14 = __this->get_m_statistics_14();
int32_t L_15 = V_1;
NullCheck(L_14);
NetConnectionStatistics_PacketSent_m833909693(L_14, L_15, 1, /*hidden argument*/NULL);
return;
}
}
// System.Void Lidgren.Network.NetConnection::HandleExpandMTUSuccess(System.Double,System.Int32)
extern "C" void NetConnection_HandleExpandMTUSuccess_m3820777494 (NetConnection_t3331492029 * __this, double ___now0, int32_t ___size1, const MethodInfo* method)
{
bool V_0 = false;
{
int32_t L_0 = ___size1;
int32_t L_1 = __this->get_m_largestSuccessfulMTU_29();
V_0 = (bool)((((int32_t)((((int32_t)L_0) > ((int32_t)L_1))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_2 = V_0;
if (L_2)
{
goto IL_0018;
}
}
{
int32_t L_3 = ___size1;
__this->set_m_largestSuccessfulMTU_29(L_3);
}
IL_0018:
{
int32_t L_4 = ___size1;
int32_t L_5 = __this->get_m_currentMTU_34();
V_0 = (bool)((((int32_t)((((int32_t)L_4) < ((int32_t)L_5))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_6 = V_0;
if (L_6)
{
goto IL_002b;
}
}
{
goto IL_003a;
}
IL_002b:
{
int32_t L_7 = ___size1;
__this->set_m_currentMTU_34(L_7);
double L_8 = ___now0;
NetConnection_ExpandMTU_m3901073334(__this, L_8, /*hidden argument*/NULL);
}
IL_003a:
{
return;
}
}
// System.Void Lidgren.Network.NetConnectionStatistics::.ctor(Lidgren.Network.NetConnection)
extern "C" void NetConnectionStatistics__ctor_m2288023573 (NetConnectionStatistics_t1235765202 * __this, NetConnection_t3331492029 * ___conn0, const MethodInfo* method)
{
{
Object__ctor_m2551263788(__this, /*hidden argument*/NULL);
NetConnection_t3331492029 * L_0 = ___conn0;
__this->set_m_connection_0(L_0);
NetConnectionStatistics_Reset_m3876387378(__this, /*hidden argument*/NULL);
return;
}
}
// System.Void Lidgren.Network.NetConnectionStatistics::Reset()
extern "C" void NetConnectionStatistics_Reset_m3876387378 (NetConnectionStatistics_t1235765202 * __this, const MethodInfo* method)
{
{
__this->set_m_sentPackets_1((((int64_t)((int64_t)0))));
__this->set_m_receivedPackets_2((((int64_t)((int64_t)0))));
__this->set_m_sentMessages_3((((int64_t)((int64_t)0))));
__this->set_m_receivedMessages_4((((int64_t)((int64_t)0))));
__this->set_m_receivedFragments_6((((int64_t)((int64_t)0))));
__this->set_m_sentBytes_7((((int64_t)((int64_t)0))));
__this->set_m_receivedBytes_8((((int64_t)((int64_t)0))));
__this->set_m_resentMessagesDueToDelay_9((((int64_t)((int64_t)0))));
__this->set_m_resentMessagesDueToHole_10((((int64_t)((int64_t)0))));
return;
}
}
// System.Void Lidgren.Network.NetConnectionStatistics::PacketSent(System.Int32,System.Int32)
extern "C" void NetConnectionStatistics_PacketSent_m833909693 (NetConnectionStatistics_t1235765202 * __this, int32_t ___numBytes0, int32_t ___numMessages1, const MethodInfo* method)
{
int32_t G_B3_0 = 0;
{
int32_t L_0 = ___numBytes0;
if ((((int32_t)L_0) <= ((int32_t)0)))
{
goto IL_000b;
}
}
{
int32_t L_1 = ___numMessages1;
G_B3_0 = ((((int32_t)L_1) > ((int32_t)0))? 1 : 0);
goto IL_000c;
}
IL_000b:
{
G_B3_0 = 0;
}
IL_000c:
{
NetException_Assert_m1426298558(NULL /*static, unused*/, (bool)G_B3_0, /*hidden argument*/NULL);
int64_t L_2 = __this->get_m_sentPackets_1();
__this->set_m_sentPackets_1(((int64_t)((int64_t)L_2+(int64_t)(((int64_t)((int64_t)1))))));
int64_t L_3 = __this->get_m_sentBytes_7();
int32_t L_4 = ___numBytes0;
__this->set_m_sentBytes_7(((int64_t)((int64_t)L_3+(int64_t)(((int64_t)((int64_t)L_4))))));
int64_t L_5 = __this->get_m_sentMessages_3();
int32_t L_6 = ___numMessages1;
__this->set_m_sentMessages_3(((int64_t)((int64_t)L_5+(int64_t)(((int64_t)((int64_t)L_6))))));
return;
}
}
// System.Void Lidgren.Network.NetConnectionStatistics::PacketReceived(System.Int32,System.Int32,System.Int32)
extern "C" void NetConnectionStatistics_PacketReceived_m1973808183 (NetConnectionStatistics_t1235765202 * __this, int32_t ___numBytes0, int32_t ___numMessages1, int32_t ___numFragments2, const MethodInfo* method)
{
int32_t G_B3_0 = 0;
{
int32_t L_0 = ___numBytes0;
if ((((int32_t)L_0) <= ((int32_t)0)))
{
goto IL_000b;
}
}
{
int32_t L_1 = ___numMessages1;
G_B3_0 = ((((int32_t)L_1) > ((int32_t)0))? 1 : 0);
goto IL_000c;
}
IL_000b:
{
G_B3_0 = 0;
}
IL_000c:
{
NetException_Assert_m1426298558(NULL /*static, unused*/, (bool)G_B3_0, /*hidden argument*/NULL);
int64_t L_2 = __this->get_m_receivedPackets_2();
__this->set_m_receivedPackets_2(((int64_t)((int64_t)L_2+(int64_t)(((int64_t)((int64_t)1))))));
int64_t L_3 = __this->get_m_receivedBytes_8();
int32_t L_4 = ___numBytes0;
__this->set_m_receivedBytes_8(((int64_t)((int64_t)L_3+(int64_t)(((int64_t)((int64_t)L_4))))));
int64_t L_5 = __this->get_m_receivedMessages_4();
int32_t L_6 = ___numMessages1;
__this->set_m_receivedMessages_4(((int64_t)((int64_t)L_5+(int64_t)(((int64_t)((int64_t)L_6))))));
int64_t L_7 = __this->get_m_receivedFragments_6();
int32_t L_8 = ___numFragments2;
__this->set_m_receivedFragments_6(((int64_t)((int64_t)L_7+(int64_t)(((int64_t)((int64_t)L_8))))));
return;
}
}
// System.Void Lidgren.Network.NetConnectionStatistics::MessageResent(Lidgren.Network.MessageResendReason)
extern "C" void NetConnectionStatistics_MessageResent_m3999886766 (NetConnectionStatistics_t1235765202 * __this, int32_t ___reason0, const MethodInfo* method)
{
bool V_0 = false;
{
int32_t L_0 = ___reason0;
V_0 = (bool)((((int32_t)((((int32_t)L_0) == ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_1 = V_0;
if (L_1)
{
goto IL_001d;
}
}
{
int64_t L_2 = __this->get_m_resentMessagesDueToDelay_9();
__this->set_m_resentMessagesDueToDelay_9(((int64_t)((int64_t)L_2+(int64_t)(((int64_t)((int64_t)1))))));
goto IL_002c;
}
IL_001d:
{
int64_t L_3 = __this->get_m_resentMessagesDueToHole_10();
__this->set_m_resentMessagesDueToHole_10(((int64_t)((int64_t)L_3+(int64_t)(((int64_t)((int64_t)1))))));
}
IL_002c:
{
return;
}
}
// System.Void Lidgren.Network.NetConnectionStatistics::MessageDropped()
extern "C" void NetConnectionStatistics_MessageDropped_m4117327218 (NetConnectionStatistics_t1235765202 * __this, const MethodInfo* method)
{
{
int64_t L_0 = __this->get_m_droppedMessages_5();
__this->set_m_droppedMessages_5(((int64_t)((int64_t)L_0+(int64_t)(((int64_t)((int64_t)1))))));
return;
}
}
// System.String Lidgren.Network.NetConnectionStatistics::ToString()
extern Il2CppClass* StringBuilder_t1221177846_il2cpp_TypeInfo_var;
extern Il2CppClass* Int32_t2071877448_il2cpp_TypeInfo_var;
extern Il2CppClass* String_t_il2cpp_TypeInfo_var;
extern Il2CppClass* ObjectU5BU5D_t3614634134_il2cpp_TypeInfo_var;
extern Il2CppClass* Int64_t909078037_il2cpp_TypeInfo_var;
extern Il2CppClass* NetReliableSenderChannel_t2899775811_il2cpp_TypeInfo_var;
extern Il2CppClass* NetReliableOrderedReceiver_t2554037675_il2cpp_TypeInfo_var;
extern Il2CppCodeGenString* _stringLiteral3033998311;
extern Il2CppCodeGenString* _stringLiteral3611366396;
extern Il2CppCodeGenString* _stringLiteral3196969700;
extern Il2CppCodeGenString* _stringLiteral3895894051;
extern Il2CppCodeGenString* _stringLiteral2753271771;
extern Il2CppCodeGenString* _stringLiteral1174327339;
extern Il2CppCodeGenString* _stringLiteral688910150;
extern Il2CppCodeGenString* _stringLiteral3517506669;
extern Il2CppCodeGenString* _stringLiteral1060952548;
extern Il2CppCodeGenString* _stringLiteral3516013425;
extern Il2CppCodeGenString* _stringLiteral3507262861;
extern Il2CppCodeGenString* _stringLiteral2026179425;
extern Il2CppCodeGenString* _stringLiteral3188287249;
extern Il2CppCodeGenString* _stringLiteral3308454241;
extern Il2CppCodeGenString* _stringLiteral1628089849;
extern const uint32_t NetConnectionStatistics_ToString_m2368372030_MetadataUsageId;
extern "C" String_t* NetConnectionStatistics_ToString_m2368372030 (NetConnectionStatistics_t1235765202 * __this, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetConnectionStatistics_ToString_m2368372030_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
StringBuilder_t1221177846 * V_0 = NULL;
int32_t V_1 = 0;
int32_t V_2 = 0;
NetSenderChannelBase_t3096690204 * V_3 = NULL;
NetReliableSenderChannel_t2899775811 * V_4 = NULL;
int32_t V_5 = 0;
int32_t V_6 = 0;
NetReceiverChannelBase_t908288882 * V_7 = NULL;
NetReliableOrderedReceiver_t2554037675 * V_8 = NULL;
String_t* V_9 = NULL;
ObjectU5BU5D_t3614634134* V_10 = NULL;
bool V_11 = false;
NetSenderChannelBaseU5BU5D_t470374901* V_12 = NULL;
int32_t V_13 = 0;
NetReceiverChannelBaseU5BU5D_t1250440839* V_14 = NULL;
{
StringBuilder_t1221177846 * L_0 = (StringBuilder_t1221177846 *)il2cpp_codegen_object_new(StringBuilder_t1221177846_il2cpp_TypeInfo_var);
StringBuilder__ctor_m3946851802(L_0, /*hidden argument*/NULL);
V_0 = L_0;
StringBuilder_t1221177846 * L_1 = V_0;
NetConnection_t3331492029 * L_2 = __this->get_m_connection_0();
NullCheck(L_2);
int32_t L_3 = L_2->get_m_currentMTU_34();
int32_t L_4 = L_3;
Il2CppObject * L_5 = Box(Int32_t2071877448_il2cpp_TypeInfo_var, &L_4);
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_6 = String_Concat_m56707527(NULL /*static, unused*/, _stringLiteral3033998311, L_5, /*hidden argument*/NULL);
NullCheck(L_1);
StringBuilder_AppendLine_m2033101329(L_1, L_6, /*hidden argument*/NULL);
StringBuilder_t1221177846 * L_7 = V_0;
V_10 = ((ObjectU5BU5D_t3614634134*)SZArrayNew(ObjectU5BU5D_t3614634134_il2cpp_TypeInfo_var, (uint32_t)7));
ObjectU5BU5D_t3614634134* L_8 = V_10;
NullCheck(L_8);
IL2CPP_ARRAY_BOUNDS_CHECK(L_8, 0);
ArrayElementTypeCheck (L_8, _stringLiteral3611366396);
(L_8)->SetAt(static_cast<il2cpp_array_size_t>(0), (Il2CppObject *)_stringLiteral3611366396);
ObjectU5BU5D_t3614634134* L_9 = V_10;
int64_t L_10 = __this->get_m_sentBytes_7();
int64_t L_11 = L_10;
Il2CppObject * L_12 = Box(Int64_t909078037_il2cpp_TypeInfo_var, &L_11);
NullCheck(L_9);
IL2CPP_ARRAY_BOUNDS_CHECK(L_9, 1);
ArrayElementTypeCheck (L_9, L_12);
(L_9)->SetAt(static_cast<il2cpp_array_size_t>(1), (Il2CppObject *)L_12);
ObjectU5BU5D_t3614634134* L_13 = V_10;
NullCheck(L_13);
IL2CPP_ARRAY_BOUNDS_CHECK(L_13, 2);
ArrayElementTypeCheck (L_13, _stringLiteral3196969700);
(L_13)->SetAt(static_cast<il2cpp_array_size_t>(2), (Il2CppObject *)_stringLiteral3196969700);
ObjectU5BU5D_t3614634134* L_14 = V_10;
int64_t L_15 = __this->get_m_sentMessages_3();
int64_t L_16 = L_15;
Il2CppObject * L_17 = Box(Int64_t909078037_il2cpp_TypeInfo_var, &L_16);
NullCheck(L_14);
IL2CPP_ARRAY_BOUNDS_CHECK(L_14, 3);
ArrayElementTypeCheck (L_14, L_17);
(L_14)->SetAt(static_cast<il2cpp_array_size_t>(3), (Il2CppObject *)L_17);
ObjectU5BU5D_t3614634134* L_18 = V_10;
NullCheck(L_18);
IL2CPP_ARRAY_BOUNDS_CHECK(L_18, 4);
ArrayElementTypeCheck (L_18, _stringLiteral3895894051);
(L_18)->SetAt(static_cast<il2cpp_array_size_t>(4), (Il2CppObject *)_stringLiteral3895894051);
ObjectU5BU5D_t3614634134* L_19 = V_10;
int64_t L_20 = __this->get_m_sentPackets_1();
int64_t L_21 = L_20;
Il2CppObject * L_22 = Box(Int64_t909078037_il2cpp_TypeInfo_var, &L_21);
NullCheck(L_19);
IL2CPP_ARRAY_BOUNDS_CHECK(L_19, 5);
ArrayElementTypeCheck (L_19, L_22);
(L_19)->SetAt(static_cast<il2cpp_array_size_t>(5), (Il2CppObject *)L_22);
ObjectU5BU5D_t3614634134* L_23 = V_10;
NullCheck(L_23);
IL2CPP_ARRAY_BOUNDS_CHECK(L_23, 6);
ArrayElementTypeCheck (L_23, _stringLiteral2753271771);
(L_23)->SetAt(static_cast<il2cpp_array_size_t>(6), (Il2CppObject *)_stringLiteral2753271771);
ObjectU5BU5D_t3614634134* L_24 = V_10;
String_t* L_25 = String_Concat_m3881798623(NULL /*static, unused*/, L_24, /*hidden argument*/NULL);
NullCheck(L_7);
StringBuilder_AppendLine_m2033101329(L_7, L_25, /*hidden argument*/NULL);
StringBuilder_t1221177846 * L_26 = V_0;
V_10 = ((ObjectU5BU5D_t3614634134*)SZArrayNew(ObjectU5BU5D_t3614634134_il2cpp_TypeInfo_var, (uint32_t)((int32_t)9)));
ObjectU5BU5D_t3614634134* L_27 = V_10;
NullCheck(L_27);
IL2CPP_ARRAY_BOUNDS_CHECK(L_27, 0);
ArrayElementTypeCheck (L_27, _stringLiteral1174327339);
(L_27)->SetAt(static_cast<il2cpp_array_size_t>(0), (Il2CppObject *)_stringLiteral1174327339);
ObjectU5BU5D_t3614634134* L_28 = V_10;
int64_t L_29 = __this->get_m_receivedBytes_8();
int64_t L_30 = L_29;
Il2CppObject * L_31 = Box(Int64_t909078037_il2cpp_TypeInfo_var, &L_30);
NullCheck(L_28);
IL2CPP_ARRAY_BOUNDS_CHECK(L_28, 1);
ArrayElementTypeCheck (L_28, L_31);
(L_28)->SetAt(static_cast<il2cpp_array_size_t>(1), (Il2CppObject *)L_31);
ObjectU5BU5D_t3614634134* L_32 = V_10;
NullCheck(L_32);
IL2CPP_ARRAY_BOUNDS_CHECK(L_32, 2);
ArrayElementTypeCheck (L_32, _stringLiteral3196969700);
(L_32)->SetAt(static_cast<il2cpp_array_size_t>(2), (Il2CppObject *)_stringLiteral3196969700);
ObjectU5BU5D_t3614634134* L_33 = V_10;
int64_t L_34 = __this->get_m_receivedMessages_4();
int64_t L_35 = L_34;
Il2CppObject * L_36 = Box(Int64_t909078037_il2cpp_TypeInfo_var, &L_35);
NullCheck(L_33);
IL2CPP_ARRAY_BOUNDS_CHECK(L_33, 3);
ArrayElementTypeCheck (L_33, L_36);
(L_33)->SetAt(static_cast<il2cpp_array_size_t>(3), (Il2CppObject *)L_36);
ObjectU5BU5D_t3614634134* L_37 = V_10;
NullCheck(L_37);
IL2CPP_ARRAY_BOUNDS_CHECK(L_37, 4);
ArrayElementTypeCheck (L_37, _stringLiteral688910150);
(L_37)->SetAt(static_cast<il2cpp_array_size_t>(4), (Il2CppObject *)_stringLiteral688910150);
ObjectU5BU5D_t3614634134* L_38 = V_10;
int64_t L_39 = __this->get_m_receivedFragments_6();
int64_t L_40 = L_39;
Il2CppObject * L_41 = Box(Int64_t909078037_il2cpp_TypeInfo_var, &L_40);
NullCheck(L_38);
IL2CPP_ARRAY_BOUNDS_CHECK(L_38, 5);
ArrayElementTypeCheck (L_38, L_41);
(L_38)->SetAt(static_cast<il2cpp_array_size_t>(5), (Il2CppObject *)L_41);
ObjectU5BU5D_t3614634134* L_42 = V_10;
NullCheck(L_42);
IL2CPP_ARRAY_BOUNDS_CHECK(L_42, 6);
ArrayElementTypeCheck (L_42, _stringLiteral3517506669);
(L_42)->SetAt(static_cast<il2cpp_array_size_t>(6), (Il2CppObject *)_stringLiteral3517506669);
ObjectU5BU5D_t3614634134* L_43 = V_10;
int64_t L_44 = __this->get_m_receivedPackets_2();
int64_t L_45 = L_44;
Il2CppObject * L_46 = Box(Int64_t909078037_il2cpp_TypeInfo_var, &L_45);
NullCheck(L_43);
IL2CPP_ARRAY_BOUNDS_CHECK(L_43, 7);
ArrayElementTypeCheck (L_43, L_46);
(L_43)->SetAt(static_cast<il2cpp_array_size_t>(7), (Il2CppObject *)L_46);
ObjectU5BU5D_t3614634134* L_47 = V_10;
NullCheck(L_47);
IL2CPP_ARRAY_BOUNDS_CHECK(L_47, 8);
ArrayElementTypeCheck (L_47, _stringLiteral2753271771);
(L_47)->SetAt(static_cast<il2cpp_array_size_t>(8), (Il2CppObject *)_stringLiteral2753271771);
ObjectU5BU5D_t3614634134* L_48 = V_10;
String_t* L_49 = String_Concat_m3881798623(NULL /*static, unused*/, L_48, /*hidden argument*/NULL);
NullCheck(L_26);
StringBuilder_AppendLine_m2033101329(L_26, L_49, /*hidden argument*/NULL);
StringBuilder_t1221177846 * L_50 = V_0;
int64_t L_51 = __this->get_m_droppedMessages_5();
int64_t L_52 = L_51;
Il2CppObject * L_53 = Box(Int64_t909078037_il2cpp_TypeInfo_var, &L_52);
String_t* L_54 = String_Concat_m2000667605(NULL /*static, unused*/, _stringLiteral1060952548, L_53, _stringLiteral3516013425, /*hidden argument*/NULL);
NullCheck(L_50);
StringBuilder_AppendLine_m2033101329(L_50, L_54, /*hidden argument*/NULL);
int64_t L_55 = __this->get_m_resentMessagesDueToDelay_9();
V_11 = (bool)((((int32_t)((((int64_t)L_55) > ((int64_t)(((int64_t)((int64_t)0)))))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_56 = V_11;
if (L_56)
{
goto IL_015f;
}
}
{
StringBuilder_t1221177846 * L_57 = V_0;
int64_t L_58 = __this->get_m_resentMessagesDueToDelay_9();
int64_t L_59 = L_58;
Il2CppObject * L_60 = Box(Int64_t909078037_il2cpp_TypeInfo_var, &L_59);
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_61 = String_Concat_m56707527(NULL /*static, unused*/, _stringLiteral3507262861, L_60, /*hidden argument*/NULL);
NullCheck(L_57);
StringBuilder_AppendLine_m2033101329(L_57, L_61, /*hidden argument*/NULL);
}
IL_015f:
{
int64_t L_62 = __this->get_m_resentMessagesDueToHole_10();
V_11 = (bool)((((int32_t)((((int64_t)L_62) > ((int64_t)(((int64_t)((int64_t)0)))))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_63 = V_11;
if (L_63)
{
goto IL_018e;
}
}
{
StringBuilder_t1221177846 * L_64 = V_0;
int64_t L_65 = __this->get_m_resentMessagesDueToHole_10();
int64_t L_66 = L_65;
Il2CppObject * L_67 = Box(Int64_t909078037_il2cpp_TypeInfo_var, &L_66);
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_68 = String_Concat_m56707527(NULL /*static, unused*/, _stringLiteral2026179425, L_67, /*hidden argument*/NULL);
NullCheck(L_64);
StringBuilder_AppendLine_m2033101329(L_64, L_68, /*hidden argument*/NULL);
}
IL_018e:
{
V_1 = 0;
V_2 = 0;
NetConnection_t3331492029 * L_69 = __this->get_m_connection_0();
NullCheck(L_69);
NetSenderChannelBaseU5BU5D_t470374901* L_70 = L_69->get_m_sendChannels_6();
V_12 = L_70;
V_13 = 0;
goto IL_021e;
}
IL_01a5:
{
NetSenderChannelBaseU5BU5D_t470374901* L_71 = V_12;
int32_t L_72 = V_13;
NullCheck(L_71);
IL2CPP_ARRAY_BOUNDS_CHECK(L_71, L_72);
int32_t L_73 = L_72;
NetSenderChannelBase_t3096690204 * L_74 = (L_71)->GetAt(static_cast<il2cpp_array_size_t>(L_73));
V_3 = L_74;
NetSenderChannelBase_t3096690204 * L_75 = V_3;
V_11 = (bool)((((int32_t)((((Il2CppObject*)(NetSenderChannelBase_t3096690204 *)L_75) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_76 = V_11;
if (L_76)
{
goto IL_01bb;
}
}
{
goto IL_0218;
}
IL_01bb:
{
int32_t L_77 = V_1;
NetSenderChannelBase_t3096690204 * L_78 = V_3;
NullCheck(L_78);
int32_t L_79 = NetSenderChannelBase_get_QueuedSendsCount_m1530659097(L_78, /*hidden argument*/NULL);
V_1 = ((int32_t)((int32_t)L_77+(int32_t)L_79));
NetSenderChannelBase_t3096690204 * L_80 = V_3;
V_4 = ((NetReliableSenderChannel_t2899775811 *)IsInstSealed(L_80, NetReliableSenderChannel_t2899775811_il2cpp_TypeInfo_var));
NetReliableSenderChannel_t2899775811 * L_81 = V_4;
V_11 = (bool)((((Il2CppObject*)(NetReliableSenderChannel_t2899775811 *)L_81) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0);
bool L_82 = V_11;
if (L_82)
{
goto IL_0217;
}
}
{
V_5 = 0;
goto IL_0203;
}
IL_01dd:
{
NetReliableSenderChannel_t2899775811 * L_83 = V_4;
NullCheck(L_83);
NetStoredReliableMessageU5BU5D_t4079791060* L_84 = L_83->get_m_storedMessages_7();
int32_t L_85 = V_5;
NullCheck(L_84);
IL2CPP_ARRAY_BOUNDS_CHECK(L_84, L_85);
NetOutgoingMessage_t2016542980 * L_86 = ((L_84)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_85)))->get_Message_2();
V_11 = (bool)((((Il2CppObject*)(NetOutgoingMessage_t2016542980 *)L_86) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0);
bool L_87 = V_11;
if (L_87)
{
goto IL_01fd;
}
}
{
int32_t L_88 = V_2;
V_2 = ((int32_t)((int32_t)L_88+(int32_t)1));
}
IL_01fd:
{
int32_t L_89 = V_5;
V_5 = ((int32_t)((int32_t)L_89+(int32_t)1));
}
IL_0203:
{
int32_t L_90 = V_5;
NetReliableSenderChannel_t2899775811 * L_91 = V_4;
NullCheck(L_91);
NetStoredReliableMessageU5BU5D_t4079791060* L_92 = L_91->get_m_storedMessages_7();
NullCheck(L_92);
V_11 = (bool)((((int32_t)L_90) < ((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_92)->max_length))))))? 1 : 0);
bool L_93 = V_11;
if (L_93)
{
goto IL_01dd;
}
}
{
}
IL_0217:
{
}
IL_0218:
{
int32_t L_94 = V_13;
V_13 = ((int32_t)((int32_t)L_94+(int32_t)1));
}
IL_021e:
{
int32_t L_95 = V_13;
NetSenderChannelBaseU5BU5D_t470374901* L_96 = V_12;
NullCheck(L_96);
V_11 = (bool)((((int32_t)L_95) < ((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_96)->max_length))))))? 1 : 0);
bool L_97 = V_11;
if (L_97)
{
goto IL_01a5;
}
}
{
V_6 = 0;
NetConnection_t3331492029 * L_98 = __this->get_m_connection_0();
NullCheck(L_98);
NetReceiverChannelBaseU5BU5D_t1250440839* L_99 = L_98->get_m_receiveChannels_7();
V_14 = L_99;
V_13 = 0;
goto IL_02a1;
}
IL_0245:
{
NetReceiverChannelBaseU5BU5D_t1250440839* L_100 = V_14;
int32_t L_101 = V_13;
NullCheck(L_100);
IL2CPP_ARRAY_BOUNDS_CHECK(L_100, L_101);
int32_t L_102 = L_101;
NetReceiverChannelBase_t908288882 * L_103 = (L_100)->GetAt(static_cast<il2cpp_array_size_t>(L_102));
V_7 = L_103;
NetReceiverChannelBase_t908288882 * L_104 = V_7;
V_8 = ((NetReliableOrderedReceiver_t2554037675 *)IsInstSealed(L_104, NetReliableOrderedReceiver_t2554037675_il2cpp_TypeInfo_var));
NetReliableOrderedReceiver_t2554037675 * L_105 = V_8;
V_11 = (bool)((((Il2CppObject*)(NetReliableOrderedReceiver_t2554037675 *)L_105) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0);
bool L_106 = V_11;
if (L_106)
{
goto IL_029a;
}
}
{
V_5 = 0;
goto IL_0286;
}
IL_0267:
{
NetReliableOrderedReceiver_t2554037675 * L_107 = V_8;
NullCheck(L_107);
NetIncomingMessageU5BU5D_t827121993* L_108 = L_107->get_m_withheldMessages_5();
int32_t L_109 = V_5;
NullCheck(L_108);
IL2CPP_ARRAY_BOUNDS_CHECK(L_108, L_109);
int32_t L_110 = L_109;
NetIncomingMessage_t2014089816 * L_111 = (L_108)->GetAt(static_cast<il2cpp_array_size_t>(L_110));
V_11 = (bool)((((Il2CppObject*)(NetIncomingMessage_t2014089816 *)L_111) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0);
bool L_112 = V_11;
if (L_112)
{
goto IL_0280;
}
}
{
int32_t L_113 = V_6;
V_6 = ((int32_t)((int32_t)L_113+(int32_t)1));
}
IL_0280:
{
int32_t L_114 = V_5;
V_5 = ((int32_t)((int32_t)L_114+(int32_t)1));
}
IL_0286:
{
int32_t L_115 = V_5;
NetReliableOrderedReceiver_t2554037675 * L_116 = V_8;
NullCheck(L_116);
NetIncomingMessageU5BU5D_t827121993* L_117 = L_116->get_m_withheldMessages_5();
NullCheck(L_117);
V_11 = (bool)((((int32_t)L_115) < ((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_117)->max_length))))))? 1 : 0);
bool L_118 = V_11;
if (L_118)
{
goto IL_0267;
}
}
{
}
IL_029a:
{
int32_t L_119 = V_13;
V_13 = ((int32_t)((int32_t)L_119+(int32_t)1));
}
IL_02a1:
{
int32_t L_120 = V_13;
NetReceiverChannelBaseU5BU5D_t1250440839* L_121 = V_14;
NullCheck(L_121);
V_11 = (bool)((((int32_t)L_120) < ((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_121)->max_length))))))? 1 : 0);
bool L_122 = V_11;
if (L_122)
{
goto IL_0245;
}
}
{
StringBuilder_t1221177846 * L_123 = V_0;
int32_t L_124 = V_1;
int32_t L_125 = L_124;
Il2CppObject * L_126 = Box(Int32_t2071877448_il2cpp_TypeInfo_var, &L_125);
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_127 = String_Concat_m56707527(NULL /*static, unused*/, _stringLiteral3188287249, L_126, /*hidden argument*/NULL);
NullCheck(L_123);
StringBuilder_AppendLine_m2033101329(L_123, L_127, /*hidden argument*/NULL);
StringBuilder_t1221177846 * L_128 = V_0;
int32_t L_129 = V_2;
int32_t L_130 = L_129;
Il2CppObject * L_131 = Box(Int32_t2071877448_il2cpp_TypeInfo_var, &L_130);
String_t* L_132 = String_Concat_m56707527(NULL /*static, unused*/, _stringLiteral3308454241, L_131, /*hidden argument*/NULL);
NullCheck(L_128);
StringBuilder_AppendLine_m2033101329(L_128, L_132, /*hidden argument*/NULL);
StringBuilder_t1221177846 * L_133 = V_0;
int32_t L_134 = V_6;
int32_t L_135 = L_134;
Il2CppObject * L_136 = Box(Int32_t2071877448_il2cpp_TypeInfo_var, &L_135);
String_t* L_137 = String_Concat_m56707527(NULL /*static, unused*/, _stringLiteral1628089849, L_136, /*hidden argument*/NULL);
NullCheck(L_133);
StringBuilder_AppendLine_m2033101329(L_133, L_137, /*hidden argument*/NULL);
StringBuilder_t1221177846 * L_138 = V_0;
NullCheck(L_138);
String_t* L_139 = VirtFuncInvoker0< String_t* >::Invoke(3 /* System.String System.Object::ToString() */, L_138);
V_9 = L_139;
goto IL_02ff;
}
IL_02ff:
{
String_t* L_140 = V_9;
return L_140;
}
}
// System.Void Lidgren.Network.NetException::.ctor()
extern "C" void NetException__ctor_m407345561 (NetException_t2452891498 * __this, const MethodInfo* method)
{
{
Exception__ctor_m3886110570(__this, /*hidden argument*/NULL);
return;
}
}
// System.Void Lidgren.Network.NetException::.ctor(System.String)
extern "C" void NetException__ctor_m2724322251 (NetException_t2452891498 * __this, String_t* ___message0, const MethodInfo* method)
{
{
String_t* L_0 = ___message0;
Exception__ctor_m485833136(__this, L_0, /*hidden argument*/NULL);
return;
}
}
// System.Void Lidgren.Network.NetException::Assert(System.Boolean,System.String)
extern Il2CppClass* NetException_t2452891498_il2cpp_TypeInfo_var;
extern const uint32_t NetException_Assert_m1067120882_MetadataUsageId;
extern "C" void NetException_Assert_m1067120882 (Il2CppObject * __this /* static, unused */, bool ___isOk0, String_t* ___message1, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetException_Assert_m1067120882_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
bool V_0 = false;
{
bool L_0 = ___isOk0;
V_0 = L_0;
bool L_1 = V_0;
if (L_1)
{
goto IL_000d;
}
}
{
String_t* L_2 = ___message1;
NetException_t2452891498 * L_3 = (NetException_t2452891498 *)il2cpp_codegen_object_new(NetException_t2452891498_il2cpp_TypeInfo_var);
NetException__ctor_m2724322251(L_3, L_2, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_3);
}
IL_000d:
{
return;
}
}
// System.Void Lidgren.Network.NetException::Assert(System.Boolean)
extern Il2CppClass* NetException_t2452891498_il2cpp_TypeInfo_var;
extern const uint32_t NetException_Assert_m1426298558_MetadataUsageId;
extern "C" void NetException_Assert_m1426298558 (Il2CppObject * __this /* static, unused */, bool ___isOk0, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetException_Assert_m1426298558_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
bool V_0 = false;
{
bool L_0 = ___isOk0;
V_0 = L_0;
bool L_1 = V_0;
if (L_1)
{
goto IL_000c;
}
}
{
NetException_t2452891498 * L_2 = (NetException_t2452891498 *)il2cpp_codegen_object_new(NetException_t2452891498_il2cpp_TypeInfo_var);
NetException__ctor_m407345561(L_2, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_2);
}
IL_000c:
{
return;
}
}
// System.Int32 Lidgren.Network.NetFragmentationHelper::WriteHeader(System.Byte[],System.Int32,System.Int32,System.Int32,System.Int32,System.Int32)
extern "C" int32_t NetFragmentationHelper_WriteHeader_m2245683411 (Il2CppObject * __this /* static, unused */, ByteU5BU5D_t3397334013* ___destination0, int32_t ___ptr1, int32_t ___group2, int32_t ___totalBits3, int32_t ___chunkByteSize4, int32_t ___chunkNumber5, const MethodInfo* method)
{
uint32_t V_0 = 0;
uint32_t V_1 = 0;
uint32_t V_2 = 0;
uint32_t V_3 = 0;
int32_t V_4 = 0;
bool V_5 = false;
{
int32_t L_0 = ___group2;
V_0 = L_0;
goto IL_001b;
}
IL_0005:
{
ByteU5BU5D_t3397334013* L_1 = ___destination0;
int32_t L_2 = ___ptr1;
int32_t L_3 = L_2;
___ptr1 = ((int32_t)((int32_t)L_3+(int32_t)1));
uint32_t L_4 = V_0;
NullCheck(L_1);
IL2CPP_ARRAY_BOUNDS_CHECK(L_1, L_3);
(L_1)->SetAt(static_cast<il2cpp_array_size_t>(L_3), (uint8_t)(((int32_t)((uint8_t)((int32_t)((int32_t)L_4|(int32_t)((int32_t)128)))))));
uint32_t L_5 = V_0;
V_0 = ((int32_t)((uint32_t)L_5>>7));
}
IL_001b:
{
uint32_t L_6 = V_0;
V_5 = (bool)((((int32_t)((!(((uint32_t)L_6) >= ((uint32_t)((int32_t)128))))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_7 = V_5;
if (L_7)
{
goto IL_0005;
}
}
{
ByteU5BU5D_t3397334013* L_8 = ___destination0;
int32_t L_9 = ___ptr1;
int32_t L_10 = L_9;
___ptr1 = ((int32_t)((int32_t)L_10+(int32_t)1));
uint32_t L_11 = V_0;
NullCheck(L_8);
IL2CPP_ARRAY_BOUNDS_CHECK(L_8, L_10);
(L_8)->SetAt(static_cast<il2cpp_array_size_t>(L_10), (uint8_t)(((int32_t)((uint8_t)L_11))));
int32_t L_12 = ___totalBits3;
V_1 = L_12;
goto IL_0050;
}
IL_003a:
{
ByteU5BU5D_t3397334013* L_13 = ___destination0;
int32_t L_14 = ___ptr1;
int32_t L_15 = L_14;
___ptr1 = ((int32_t)((int32_t)L_15+(int32_t)1));
uint32_t L_16 = V_1;
NullCheck(L_13);
IL2CPP_ARRAY_BOUNDS_CHECK(L_13, L_15);
(L_13)->SetAt(static_cast<il2cpp_array_size_t>(L_15), (uint8_t)(((int32_t)((uint8_t)((int32_t)((int32_t)L_16|(int32_t)((int32_t)128)))))));
uint32_t L_17 = V_1;
V_1 = ((int32_t)((uint32_t)L_17>>7));
}
IL_0050:
{
uint32_t L_18 = V_1;
V_5 = (bool)((((int32_t)((!(((uint32_t)L_18) >= ((uint32_t)((int32_t)128))))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_19 = V_5;
if (L_19)
{
goto IL_003a;
}
}
{
ByteU5BU5D_t3397334013* L_20 = ___destination0;
int32_t L_21 = ___ptr1;
int32_t L_22 = L_21;
___ptr1 = ((int32_t)((int32_t)L_22+(int32_t)1));
uint32_t L_23 = V_1;
NullCheck(L_20);
IL2CPP_ARRAY_BOUNDS_CHECK(L_20, L_22);
(L_20)->SetAt(static_cast<il2cpp_array_size_t>(L_22), (uint8_t)(((int32_t)((uint8_t)L_23))));
int32_t L_24 = ___chunkByteSize4;
V_2 = L_24;
goto IL_0086;
}
IL_0070:
{
ByteU5BU5D_t3397334013* L_25 = ___destination0;
int32_t L_26 = ___ptr1;
int32_t L_27 = L_26;
___ptr1 = ((int32_t)((int32_t)L_27+(int32_t)1));
uint32_t L_28 = V_2;
NullCheck(L_25);
IL2CPP_ARRAY_BOUNDS_CHECK(L_25, L_27);
(L_25)->SetAt(static_cast<il2cpp_array_size_t>(L_27), (uint8_t)(((int32_t)((uint8_t)((int32_t)((int32_t)L_28|(int32_t)((int32_t)128)))))));
uint32_t L_29 = V_2;
V_2 = ((int32_t)((uint32_t)L_29>>7));
}
IL_0086:
{
uint32_t L_30 = V_2;
V_5 = (bool)((((int32_t)((!(((uint32_t)L_30) >= ((uint32_t)((int32_t)128))))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_31 = V_5;
if (L_31)
{
goto IL_0070;
}
}
{
ByteU5BU5D_t3397334013* L_32 = ___destination0;
int32_t L_33 = ___ptr1;
int32_t L_34 = L_33;
___ptr1 = ((int32_t)((int32_t)L_34+(int32_t)1));
uint32_t L_35 = V_2;
NullCheck(L_32);
IL2CPP_ARRAY_BOUNDS_CHECK(L_32, L_34);
(L_32)->SetAt(static_cast<il2cpp_array_size_t>(L_34), (uint8_t)(((int32_t)((uint8_t)L_35))));
int32_t L_36 = ___chunkNumber5;
V_3 = L_36;
goto IL_00bc;
}
IL_00a6:
{
ByteU5BU5D_t3397334013* L_37 = ___destination0;
int32_t L_38 = ___ptr1;
int32_t L_39 = L_38;
___ptr1 = ((int32_t)((int32_t)L_39+(int32_t)1));
uint32_t L_40 = V_3;
NullCheck(L_37);
IL2CPP_ARRAY_BOUNDS_CHECK(L_37, L_39);
(L_37)->SetAt(static_cast<il2cpp_array_size_t>(L_39), (uint8_t)(((int32_t)((uint8_t)((int32_t)((int32_t)L_40|(int32_t)((int32_t)128)))))));
uint32_t L_41 = V_3;
V_3 = ((int32_t)((uint32_t)L_41>>7));
}
IL_00bc:
{
uint32_t L_42 = V_3;
V_5 = (bool)((((int32_t)((!(((uint32_t)L_42) >= ((uint32_t)((int32_t)128))))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_43 = V_5;
if (L_43)
{
goto IL_00a6;
}
}
{
ByteU5BU5D_t3397334013* L_44 = ___destination0;
int32_t L_45 = ___ptr1;
int32_t L_46 = L_45;
___ptr1 = ((int32_t)((int32_t)L_46+(int32_t)1));
uint32_t L_47 = V_3;
NullCheck(L_44);
IL2CPP_ARRAY_BOUNDS_CHECK(L_44, L_46);
(L_44)->SetAt(static_cast<il2cpp_array_size_t>(L_46), (uint8_t)(((int32_t)((uint8_t)L_47))));
int32_t L_48 = ___ptr1;
V_4 = L_48;
goto IL_00dc;
}
IL_00dc:
{
int32_t L_49 = V_4;
return L_49;
}
}
// System.Int32 Lidgren.Network.NetFragmentationHelper::ReadHeader(System.Byte[],System.Int32,System.Int32&,System.Int32&,System.Int32&,System.Int32&)
extern "C" int32_t NetFragmentationHelper_ReadHeader_m1346941602 (Il2CppObject * __this /* static, unused */, ByteU5BU5D_t3397334013* ___buffer0, int32_t ___ptr1, int32_t* ___group2, int32_t* ___totalBits3, int32_t* ___chunkByteSize4, int32_t* ___chunkNumber5, const MethodInfo* method)
{
int32_t V_0 = 0;
int32_t V_1 = 0;
uint8_t V_2 = 0x0;
int32_t V_3 = 0;
bool V_4 = false;
{
V_0 = 0;
V_1 = 0;
goto IL_003e;
}
IL_0007:
{
ByteU5BU5D_t3397334013* L_0 = ___buffer0;
int32_t L_1 = ___ptr1;
int32_t L_2 = L_1;
___ptr1 = ((int32_t)((int32_t)L_2+(int32_t)1));
NullCheck(L_0);
IL2CPP_ARRAY_BOUNDS_CHECK(L_0, L_2);
int32_t L_3 = L_2;
uint8_t L_4 = (L_0)->GetAt(static_cast<il2cpp_array_size_t>(L_3));
V_2 = L_4;
int32_t L_5 = V_0;
uint8_t L_6 = V_2;
int32_t L_7 = V_1;
V_0 = ((int32_t)((int32_t)L_5|(int32_t)((int32_t)((int32_t)((int32_t)((int32_t)L_6&(int32_t)((int32_t)127)))<<(int32_t)((int32_t)((int32_t)((int32_t)((int32_t)L_7&(int32_t)((int32_t)31)))&(int32_t)((int32_t)31)))))));
int32_t L_8 = V_1;
V_1 = ((int32_t)((int32_t)L_8+(int32_t)7));
uint8_t L_9 = V_2;
V_4 = (bool)((((int32_t)((((int32_t)((int32_t)((int32_t)L_9&(int32_t)((int32_t)128)))) == ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_10 = V_4;
if (L_10)
{
goto IL_003d;
}
}
{
int32_t* L_11 = ___group2;
int32_t L_12 = V_0;
*((int32_t*)(L_11)) = (int32_t)L_12;
goto IL_0043;
}
IL_003d:
{
}
IL_003e:
{
V_4 = (bool)1;
goto IL_0007;
}
IL_0043:
{
V_0 = 0;
V_1 = 0;
goto IL_0080;
}
IL_0049:
{
ByteU5BU5D_t3397334013* L_13 = ___buffer0;
int32_t L_14 = ___ptr1;
int32_t L_15 = L_14;
___ptr1 = ((int32_t)((int32_t)L_15+(int32_t)1));
NullCheck(L_13);
IL2CPP_ARRAY_BOUNDS_CHECK(L_13, L_15);
int32_t L_16 = L_15;
uint8_t L_17 = (L_13)->GetAt(static_cast<il2cpp_array_size_t>(L_16));
V_2 = L_17;
int32_t L_18 = V_0;
uint8_t L_19 = V_2;
int32_t L_20 = V_1;
V_0 = ((int32_t)((int32_t)L_18|(int32_t)((int32_t)((int32_t)((int32_t)((int32_t)L_19&(int32_t)((int32_t)127)))<<(int32_t)((int32_t)((int32_t)((int32_t)((int32_t)L_20&(int32_t)((int32_t)31)))&(int32_t)((int32_t)31)))))));
int32_t L_21 = V_1;
V_1 = ((int32_t)((int32_t)L_21+(int32_t)7));
uint8_t L_22 = V_2;
V_4 = (bool)((((int32_t)((((int32_t)((int32_t)((int32_t)L_22&(int32_t)((int32_t)128)))) == ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_23 = V_4;
if (L_23)
{
goto IL_007f;
}
}
{
int32_t* L_24 = ___totalBits3;
int32_t L_25 = V_0;
*((int32_t*)(L_24)) = (int32_t)L_25;
goto IL_0085;
}
IL_007f:
{
}
IL_0080:
{
V_4 = (bool)1;
goto IL_0049;
}
IL_0085:
{
V_0 = 0;
V_1 = 0;
goto IL_00c3;
}
IL_008b:
{
ByteU5BU5D_t3397334013* L_26 = ___buffer0;
int32_t L_27 = ___ptr1;
int32_t L_28 = L_27;
___ptr1 = ((int32_t)((int32_t)L_28+(int32_t)1));
NullCheck(L_26);
IL2CPP_ARRAY_BOUNDS_CHECK(L_26, L_28);
int32_t L_29 = L_28;
uint8_t L_30 = (L_26)->GetAt(static_cast<il2cpp_array_size_t>(L_29));
V_2 = L_30;
int32_t L_31 = V_0;
uint8_t L_32 = V_2;
int32_t L_33 = V_1;
V_0 = ((int32_t)((int32_t)L_31|(int32_t)((int32_t)((int32_t)((int32_t)((int32_t)L_32&(int32_t)((int32_t)127)))<<(int32_t)((int32_t)((int32_t)((int32_t)((int32_t)L_33&(int32_t)((int32_t)31)))&(int32_t)((int32_t)31)))))));
int32_t L_34 = V_1;
V_1 = ((int32_t)((int32_t)L_34+(int32_t)7));
uint8_t L_35 = V_2;
V_4 = (bool)((((int32_t)((((int32_t)((int32_t)((int32_t)L_35&(int32_t)((int32_t)128)))) == ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_36 = V_4;
if (L_36)
{
goto IL_00c2;
}
}
{
int32_t* L_37 = ___chunkByteSize4;
int32_t L_38 = V_0;
*((int32_t*)(L_37)) = (int32_t)L_38;
goto IL_00c8;
}
IL_00c2:
{
}
IL_00c3:
{
V_4 = (bool)1;
goto IL_008b;
}
IL_00c8:
{
V_0 = 0;
V_1 = 0;
goto IL_0106;
}
IL_00ce:
{
ByteU5BU5D_t3397334013* L_39 = ___buffer0;
int32_t L_40 = ___ptr1;
int32_t L_41 = L_40;
___ptr1 = ((int32_t)((int32_t)L_41+(int32_t)1));
NullCheck(L_39);
IL2CPP_ARRAY_BOUNDS_CHECK(L_39, L_41);
int32_t L_42 = L_41;
uint8_t L_43 = (L_39)->GetAt(static_cast<il2cpp_array_size_t>(L_42));
V_2 = L_43;
int32_t L_44 = V_0;
uint8_t L_45 = V_2;
int32_t L_46 = V_1;
V_0 = ((int32_t)((int32_t)L_44|(int32_t)((int32_t)((int32_t)((int32_t)((int32_t)L_45&(int32_t)((int32_t)127)))<<(int32_t)((int32_t)((int32_t)((int32_t)((int32_t)L_46&(int32_t)((int32_t)31)))&(int32_t)((int32_t)31)))))));
int32_t L_47 = V_1;
V_1 = ((int32_t)((int32_t)L_47+(int32_t)7));
uint8_t L_48 = V_2;
V_4 = (bool)((((int32_t)((((int32_t)((int32_t)((int32_t)L_48&(int32_t)((int32_t)128)))) == ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_49 = V_4;
if (L_49)
{
goto IL_0105;
}
}
{
int32_t* L_50 = ___chunkNumber5;
int32_t L_51 = V_0;
*((int32_t*)(L_50)) = (int32_t)L_51;
goto IL_010b;
}
IL_0105:
{
}
IL_0106:
{
V_4 = (bool)1;
goto IL_00ce;
}
IL_010b:
{
int32_t L_52 = ___ptr1;
V_3 = L_52;
goto IL_010f;
}
IL_010f:
{
int32_t L_53 = V_3;
return L_53;
}
}
// System.Int32 Lidgren.Network.NetFragmentationHelper::GetFragmentationHeaderSize(System.Int32,System.Int32,System.Int32,System.Int32)
extern "C" int32_t NetFragmentationHelper_GetFragmentationHeaderSize_m3360396866 (Il2CppObject * __this /* static, unused */, int32_t ___groupId0, int32_t ___totalBytes1, int32_t ___chunkByteSize2, int32_t ___numChunks3, const MethodInfo* method)
{
int32_t V_0 = 0;
uint32_t V_1 = 0;
uint32_t V_2 = 0;
uint32_t V_3 = 0;
uint32_t V_4 = 0;
int32_t V_5 = 0;
bool V_6 = false;
{
V_0 = 4;
int32_t L_0 = ___groupId0;
V_1 = L_0;
goto IL_0011;
}
IL_0007:
{
int32_t L_1 = V_0;
V_0 = ((int32_t)((int32_t)L_1+(int32_t)1));
uint32_t L_2 = V_1;
V_1 = ((int32_t)((uint32_t)L_2>>7));
}
IL_0011:
{
uint32_t L_3 = V_1;
V_6 = (bool)((((int32_t)((!(((uint32_t)L_3) >= ((uint32_t)((int32_t)128))))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_4 = V_6;
if (L_4)
{
goto IL_0007;
}
}
{
int32_t L_5 = ___totalBytes1;
V_2 = ((int32_t)((int32_t)L_5*(int32_t)8));
goto IL_0032;
}
IL_0028:
{
int32_t L_6 = V_0;
V_0 = ((int32_t)((int32_t)L_6+(int32_t)1));
uint32_t L_7 = V_2;
V_2 = ((int32_t)((uint32_t)L_7>>7));
}
IL_0032:
{
uint32_t L_8 = V_2;
V_6 = (bool)((((int32_t)((!(((uint32_t)L_8) >= ((uint32_t)((int32_t)128))))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_9 = V_6;
if (L_9)
{
goto IL_0028;
}
}
{
int32_t L_10 = ___chunkByteSize2;
V_3 = L_10;
goto IL_0051;
}
IL_0047:
{
int32_t L_11 = V_0;
V_0 = ((int32_t)((int32_t)L_11+(int32_t)1));
uint32_t L_12 = V_3;
V_3 = ((int32_t)((uint32_t)L_12>>7));
}
IL_0051:
{
uint32_t L_13 = V_3;
V_6 = (bool)((((int32_t)((!(((uint32_t)L_13) >= ((uint32_t)((int32_t)128))))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_14 = V_6;
if (L_14)
{
goto IL_0047;
}
}
{
int32_t L_15 = ___numChunks3;
V_4 = L_15;
goto IL_0073;
}
IL_0067:
{
int32_t L_16 = V_0;
V_0 = ((int32_t)((int32_t)L_16+(int32_t)1));
uint32_t L_17 = V_4;
V_4 = ((int32_t)((uint32_t)L_17>>7));
}
IL_0073:
{
uint32_t L_18 = V_4;
V_6 = (bool)((((int32_t)((!(((uint32_t)L_18) >= ((uint32_t)((int32_t)128))))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_19 = V_6;
if (L_19)
{
goto IL_0067;
}
}
{
int32_t L_20 = V_0;
V_5 = L_20;
goto IL_008a;
}
IL_008a:
{
int32_t L_21 = V_5;
return L_21;
}
}
// System.Int32 Lidgren.Network.NetFragmentationHelper::GetBestChunkSize(System.Int32,System.Int32,System.Int32)
extern "C" int32_t NetFragmentationHelper_GetBestChunkSize_m1359511180 (Il2CppObject * __this /* static, unused */, int32_t ___group0, int32_t ___totalBytes1, int32_t ___mtu2, const MethodInfo* method)
{
int32_t V_0 = 0;
int32_t V_1 = 0;
int32_t V_2 = 0;
int32_t V_3 = 0;
int32_t V_4 = 0;
bool V_5 = false;
{
int32_t L_0 = ___mtu2;
V_0 = ((int32_t)((int32_t)((int32_t)((int32_t)L_0-(int32_t)5))-(int32_t)4));
int32_t L_1 = ___group0;
int32_t L_2 = ___totalBytes1;
int32_t L_3 = V_0;
int32_t L_4 = ___totalBytes1;
int32_t L_5 = V_0;
int32_t L_6 = NetFragmentationHelper_GetFragmentationHeaderSize_m3360396866(NULL /*static, unused*/, L_1, L_2, L_3, ((int32_t)((int32_t)L_4/(int32_t)L_5)), /*hidden argument*/NULL);
V_1 = L_6;
int32_t L_7 = ___mtu2;
int32_t L_8 = V_1;
V_0 = ((int32_t)((int32_t)((int32_t)((int32_t)L_7-(int32_t)5))-(int32_t)L_8));
V_2 = 0;
}
IL_001b:
{
int32_t L_9 = V_0;
V_0 = ((int32_t)((int32_t)L_9-(int32_t)1));
int32_t L_10 = ___totalBytes1;
int32_t L_11 = V_0;
V_3 = ((int32_t)((int32_t)L_10/(int32_t)L_11));
int32_t L_12 = V_3;
int32_t L_13 = V_0;
int32_t L_14 = ___totalBytes1;
V_5 = (bool)((((int32_t)((((int32_t)((int32_t)((int32_t)L_12*(int32_t)L_13))) < ((int32_t)L_14))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_15 = V_5;
if (L_15)
{
goto IL_0037;
}
}
{
int32_t L_16 = V_3;
V_3 = ((int32_t)((int32_t)L_16+(int32_t)1));
}
IL_0037:
{
int32_t L_17 = ___group0;
int32_t L_18 = ___totalBytes1;
int32_t L_19 = V_0;
int32_t L_20 = V_3;
int32_t L_21 = NetFragmentationHelper_GetFragmentationHeaderSize_m3360396866(NULL /*static, unused*/, L_17, L_18, L_19, L_20, /*hidden argument*/NULL);
V_2 = L_21;
int32_t L_22 = V_0;
int32_t L_23 = V_2;
int32_t L_24 = ___mtu2;
V_5 = (bool)((((int32_t)((((int32_t)((int32_t)((int32_t)((int32_t)((int32_t)((int32_t)((int32_t)L_22+(int32_t)L_23))+(int32_t)5))+(int32_t)1))) < ((int32_t)L_24))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_25 = V_5;
if (L_25)
{
goto IL_001b;
}
}
{
int32_t L_26 = V_0;
V_4 = L_26;
goto IL_005a;
}
IL_005a:
{
int32_t L_27 = V_4;
return L_27;
}
}
// Lidgren.Network.NetIncomingMessageType Lidgren.Network.NetIncomingMessage::get_MessageType()
extern "C" int32_t NetIncomingMessage_get_MessageType_m1134653489 (NetIncomingMessage_t2014089816 * __this, const MethodInfo* method)
{
int32_t V_0 = 0;
{
int32_t L_0 = __this->get_m_incomingMessageType_5();
V_0 = L_0;
goto IL_000a;
}
IL_000a:
{
int32_t L_1 = V_0;
return L_1;
}
}
// Lidgren.Network.NetConnection Lidgren.Network.NetIncomingMessage::get_SenderConnection()
extern "C" NetConnection_t3331492029 * NetIncomingMessage_get_SenderConnection_m102869984 (NetIncomingMessage_t2014089816 * __this, const MethodInfo* method)
{
NetConnection_t3331492029 * V_0 = NULL;
{
NetConnection_t3331492029 * L_0 = __this->get_m_senderConnection_7();
V_0 = L_0;
goto IL_000a;
}
IL_000a:
{
NetConnection_t3331492029 * L_1 = V_0;
return L_1;
}
}
// System.Void Lidgren.Network.NetIncomingMessage::.ctor(Lidgren.Network.NetIncomingMessageType)
extern Il2CppClass* NetBuffer_t3608062491_il2cpp_TypeInfo_var;
extern const uint32_t NetIncomingMessage__ctor_m2874845560_MetadataUsageId;
extern "C" void NetIncomingMessage__ctor_m2874845560 (NetIncomingMessage_t2014089816 * __this, int32_t ___tp0, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetIncomingMessage__ctor_m2874845560_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
{
IL2CPP_RUNTIME_CLASS_INIT(NetBuffer_t3608062491_il2cpp_TypeInfo_var);
NetBuffer__ctor_m3780783062(__this, /*hidden argument*/NULL);
int32_t L_0 = ___tp0;
__this->set_m_incomingMessageType_5(L_0);
return;
}
}
// System.Void Lidgren.Network.NetIncomingMessage::Reset()
extern "C" void NetIncomingMessage_Reset_m2284406032 (NetIncomingMessage_t2014089816 * __this, const MethodInfo* method)
{
{
__this->set_m_incomingMessageType_5(0);
((NetBuffer_t3608062491 *)__this)->set_m_readPosition_4(0);
__this->set_m_receivedMessageType_9(((int32_t)128));
__this->set_m_senderConnection_7((NetConnection_t3331492029 *)NULL);
((NetBuffer_t3608062491 *)__this)->set_m_bitLength_3(0);
__this->set_m_isFragment_10((bool)0);
return;
}
}
// System.String Lidgren.Network.NetIncomingMessage::ToString()
extern Il2CppClass* ObjectU5BU5D_t3614634134_il2cpp_TypeInfo_var;
extern Il2CppClass* Int32_t2071877448_il2cpp_TypeInfo_var;
extern Il2CppClass* String_t_il2cpp_TypeInfo_var;
extern Il2CppCodeGenString* _stringLiteral2875225744;
extern Il2CppCodeGenString* _stringLiteral372029310;
extern Il2CppCodeGenString* _stringLiteral3950120644;
extern const uint32_t NetIncomingMessage_ToString_m4237620030_MetadataUsageId;
extern "C" String_t* NetIncomingMessage_ToString_m4237620030 (NetIncomingMessage_t2014089816 * __this, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetIncomingMessage_ToString_m4237620030_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
String_t* V_0 = NULL;
ObjectU5BU5D_t3614634134* V_1 = NULL;
{
V_1 = ((ObjectU5BU5D_t3614634134*)SZArrayNew(ObjectU5BU5D_t3614634134_il2cpp_TypeInfo_var, (uint32_t)5));
ObjectU5BU5D_t3614634134* L_0 = V_1;
NullCheck(L_0);
IL2CPP_ARRAY_BOUNDS_CHECK(L_0, 0);
ArrayElementTypeCheck (L_0, _stringLiteral2875225744);
(L_0)->SetAt(static_cast<il2cpp_array_size_t>(0), (Il2CppObject *)_stringLiteral2875225744);
ObjectU5BU5D_t3614634134* L_1 = V_1;
int32_t L_2 = __this->get_m_sequenceNumber_8();
int32_t L_3 = L_2;
Il2CppObject * L_4 = Box(Int32_t2071877448_il2cpp_TypeInfo_var, &L_3);
NullCheck(L_1);
IL2CPP_ARRAY_BOUNDS_CHECK(L_1, 1);
ArrayElementTypeCheck (L_1, L_4);
(L_1)->SetAt(static_cast<il2cpp_array_size_t>(1), (Il2CppObject *)L_4);
ObjectU5BU5D_t3614634134* L_5 = V_1;
NullCheck(L_5);
IL2CPP_ARRAY_BOUNDS_CHECK(L_5, 2);
ArrayElementTypeCheck (L_5, _stringLiteral372029310);
(L_5)->SetAt(static_cast<il2cpp_array_size_t>(2), (Il2CppObject *)_stringLiteral372029310);
ObjectU5BU5D_t3614634134* L_6 = V_1;
int32_t L_7 = NetBuffer_get_LengthBytes_m2765088638(__this, /*hidden argument*/NULL);
int32_t L_8 = L_7;
Il2CppObject * L_9 = Box(Int32_t2071877448_il2cpp_TypeInfo_var, &L_8);
NullCheck(L_6);
IL2CPP_ARRAY_BOUNDS_CHECK(L_6, 3);
ArrayElementTypeCheck (L_6, L_9);
(L_6)->SetAt(static_cast<il2cpp_array_size_t>(3), (Il2CppObject *)L_9);
ObjectU5BU5D_t3614634134* L_10 = V_1;
NullCheck(L_10);
IL2CPP_ARRAY_BOUNDS_CHECK(L_10, 4);
ArrayElementTypeCheck (L_10, _stringLiteral3950120644);
(L_10)->SetAt(static_cast<il2cpp_array_size_t>(4), (Il2CppObject *)_stringLiteral3950120644);
ObjectU5BU5D_t3614634134* L_11 = V_1;
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_12 = String_Concat_m3881798623(NULL /*static, unused*/, L_11, /*hidden argument*/NULL);
V_0 = L_12;
goto IL_0045;
}
IL_0045:
{
String_t* L_13 = V_0;
return L_13;
}
}
// System.Void Lidgren.Network.NetOutgoingMessage::.ctor()
extern Il2CppClass* NetBuffer_t3608062491_il2cpp_TypeInfo_var;
extern const uint32_t NetOutgoingMessage__ctor_m724105531_MetadataUsageId;
extern "C" void NetOutgoingMessage__ctor_m724105531 (NetOutgoingMessage_t2016542980 * __this, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetOutgoingMessage__ctor_m724105531_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
{
IL2CPP_RUNTIME_CLASS_INIT(NetBuffer_t3608062491_il2cpp_TypeInfo_var);
NetBuffer__ctor_m3780783062(__this, /*hidden argument*/NULL);
return;
}
}
// System.Void Lidgren.Network.NetOutgoingMessage::Reset()
extern "C" void NetOutgoingMessage_Reset_m4185181874 (NetOutgoingMessage_t2016542980 * __this, const MethodInfo* method)
{
{
__this->set_m_messageType_5(((int32_t)128));
((NetBuffer_t3608062491 *)__this)->set_m_bitLength_3(0);
__this->set_m_isSent_6((bool)0);
int32_t L_0 = __this->get_m_recyclingCount_7();
NetException_Assert_m1426298558(NULL /*static, unused*/, (bool)((((int32_t)L_0) == ((int32_t)0))? 1 : 0), /*hidden argument*/NULL);
__this->set_m_fragmentGroup_8(0);
return;
}
}
// System.Int32 Lidgren.Network.NetOutgoingMessage::Encode(System.Byte[],System.Int32,System.Int32)
extern Il2CppClass* NetUtility_t3562260209_il2cpp_TypeInfo_var;
extern const uint32_t NetOutgoingMessage_Encode_m2473987076_MetadataUsageId;
extern "C" int32_t NetOutgoingMessage_Encode_m2473987076 (NetOutgoingMessage_t2016542980 * __this, ByteU5BU5D_t3397334013* ___intoBuffer0, int32_t ___ptr1, int32_t ___sequenceNumber2, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetOutgoingMessage_Encode_m2473987076_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
uint8_t V_0 = 0x0;
int32_t V_1 = 0;
int32_t V_2 = 0;
int32_t V_3 = 0;
int32_t V_4 = 0;
int32_t V_5 = 0;
bool V_6 = false;
int32_t G_B2_0 = 0;
int32_t G_B1_0 = 0;
int32_t G_B3_0 = 0;
int32_t G_B3_1 = 0;
{
ByteU5BU5D_t3397334013* L_0 = ___intoBuffer0;
int32_t L_1 = ___ptr1;
int32_t L_2 = L_1;
___ptr1 = ((int32_t)((int32_t)L_2+(int32_t)1));
uint8_t L_3 = __this->get_m_messageType_5();
NullCheck(L_0);
IL2CPP_ARRAY_BOUNDS_CHECK(L_0, L_2);
(L_0)->SetAt(static_cast<il2cpp_array_size_t>(L_2), (uint8_t)L_3);
int32_t L_4 = ___sequenceNumber2;
int32_t L_5 = __this->get_m_fragmentGroup_8();
G_B1_0 = ((int32_t)((int32_t)L_4<<(int32_t)1));
if (!L_5)
{
G_B2_0 = ((int32_t)((int32_t)L_4<<(int32_t)1));
goto IL_001d;
}
}
{
G_B3_0 = 1;
G_B3_1 = G_B1_0;
goto IL_001e;
}
IL_001d:
{
G_B3_0 = 0;
G_B3_1 = G_B2_0;
}
IL_001e:
{
V_0 = (((int32_t)((uint8_t)((int32_t)((int32_t)G_B3_1|(int32_t)G_B3_0)))));
ByteU5BU5D_t3397334013* L_6 = ___intoBuffer0;
int32_t L_7 = ___ptr1;
int32_t L_8 = L_7;
___ptr1 = ((int32_t)((int32_t)L_8+(int32_t)1));
uint8_t L_9 = V_0;
NullCheck(L_6);
IL2CPP_ARRAY_BOUNDS_CHECK(L_6, L_8);
(L_6)->SetAt(static_cast<il2cpp_array_size_t>(L_8), (uint8_t)L_9);
ByteU5BU5D_t3397334013* L_10 = ___intoBuffer0;
int32_t L_11 = ___ptr1;
int32_t L_12 = L_11;
___ptr1 = ((int32_t)((int32_t)L_12+(int32_t)1));
int32_t L_13 = ___sequenceNumber2;
NullCheck(L_10);
IL2CPP_ARRAY_BOUNDS_CHECK(L_10, L_12);
(L_10)->SetAt(static_cast<il2cpp_array_size_t>(L_12), (uint8_t)(((int32_t)((uint8_t)((int32_t)((int32_t)L_13>>(int32_t)7))))));
int32_t L_14 = __this->get_m_fragmentGroup_8();
V_6 = (bool)((((int32_t)((((int32_t)L_14) == ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_15 = V_6;
if (L_15)
{
goto IL_00a0;
}
}
{
ByteU5BU5D_t3397334013* L_16 = ___intoBuffer0;
int32_t L_17 = ___ptr1;
int32_t L_18 = L_17;
___ptr1 = ((int32_t)((int32_t)L_18+(int32_t)1));
int32_t L_19 = ((NetBuffer_t3608062491 *)__this)->get_m_bitLength_3();
NullCheck(L_16);
IL2CPP_ARRAY_BOUNDS_CHECK(L_16, L_18);
(L_16)->SetAt(static_cast<il2cpp_array_size_t>(L_18), (uint8_t)(((int32_t)((uint8_t)L_19))));
ByteU5BU5D_t3397334013* L_20 = ___intoBuffer0;
int32_t L_21 = ___ptr1;
int32_t L_22 = L_21;
___ptr1 = ((int32_t)((int32_t)L_22+(int32_t)1));
int32_t L_23 = ((NetBuffer_t3608062491 *)__this)->get_m_bitLength_3();
NullCheck(L_20);
IL2CPP_ARRAY_BOUNDS_CHECK(L_20, L_22);
(L_20)->SetAt(static_cast<il2cpp_array_size_t>(L_22), (uint8_t)(((int32_t)((uint8_t)((int32_t)((int32_t)L_23>>(int32_t)8))))));
int32_t L_24 = ((NetBuffer_t3608062491 *)__this)->get_m_bitLength_3();
IL2CPP_RUNTIME_CLASS_INIT(NetUtility_t3562260209_il2cpp_TypeInfo_var);
int32_t L_25 = NetUtility_BytesToHoldBits_m1372162852(NULL /*static, unused*/, L_24, /*hidden argument*/NULL);
V_1 = L_25;
int32_t L_26 = V_1;
V_6 = (bool)((((int32_t)((((int32_t)L_26) > ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_27 = V_6;
if (L_27)
{
goto IL_009a;
}
}
{
ByteU5BU5D_t3397334013* L_28 = ((NetBuffer_t3608062491 *)__this)->get_m_data_2();
ByteU5BU5D_t3397334013* L_29 = ___intoBuffer0;
int32_t L_30 = ___ptr1;
int32_t L_31 = V_1;
Buffer_BlockCopy_m1586717258(NULL /*static, unused*/, (Il2CppArray *)(Il2CppArray *)L_28, 0, (Il2CppArray *)(Il2CppArray *)L_29, L_30, L_31, /*hidden argument*/NULL);
int32_t L_32 = ___ptr1;
int32_t L_33 = V_1;
___ptr1 = ((int32_t)((int32_t)L_32+(int32_t)L_33));
}
IL_009a:
{
goto IL_0143;
}
IL_00a0:
{
int32_t L_34 = ___ptr1;
V_2 = L_34;
ByteU5BU5D_t3397334013* L_35 = ___intoBuffer0;
int32_t L_36 = ___ptr1;
int32_t L_37 = L_36;
___ptr1 = ((int32_t)((int32_t)L_37+(int32_t)1));
int32_t L_38 = ((NetBuffer_t3608062491 *)__this)->get_m_bitLength_3();
NullCheck(L_35);
IL2CPP_ARRAY_BOUNDS_CHECK(L_35, L_37);
(L_35)->SetAt(static_cast<il2cpp_array_size_t>(L_37), (uint8_t)(((int32_t)((uint8_t)L_38))));
ByteU5BU5D_t3397334013* L_39 = ___intoBuffer0;
int32_t L_40 = ___ptr1;
int32_t L_41 = L_40;
___ptr1 = ((int32_t)((int32_t)L_41+(int32_t)1));
int32_t L_42 = ((NetBuffer_t3608062491 *)__this)->get_m_bitLength_3();
NullCheck(L_39);
IL2CPP_ARRAY_BOUNDS_CHECK(L_39, L_41);
(L_39)->SetAt(static_cast<il2cpp_array_size_t>(L_41), (uint8_t)(((int32_t)((uint8_t)((int32_t)((int32_t)L_42>>(int32_t)8))))));
ByteU5BU5D_t3397334013* L_43 = ___intoBuffer0;
int32_t L_44 = ___ptr1;
int32_t L_45 = __this->get_m_fragmentGroup_8();
int32_t L_46 = __this->get_m_fragmentGroupTotalBits_9();
int32_t L_47 = __this->get_m_fragmentChunkByteSize_10();
int32_t L_48 = __this->get_m_fragmentChunkNumber_11();
int32_t L_49 = NetFragmentationHelper_WriteHeader_m2245683411(NULL /*static, unused*/, L_43, L_44, L_45, L_46, L_47, L_48, /*hidden argument*/NULL);
___ptr1 = L_49;
int32_t L_50 = ___ptr1;
int32_t L_51 = V_2;
V_3 = ((int32_t)((int32_t)((int32_t)((int32_t)L_50-(int32_t)L_51))-(int32_t)2));
int32_t L_52 = ((NetBuffer_t3608062491 *)__this)->get_m_bitLength_3();
int32_t L_53 = V_3;
V_4 = ((int32_t)((int32_t)L_52+(int32_t)((int32_t)((int32_t)L_53*(int32_t)8))));
ByteU5BU5D_t3397334013* L_54 = ___intoBuffer0;
int32_t L_55 = V_2;
int32_t L_56 = V_4;
NullCheck(L_54);
IL2CPP_ARRAY_BOUNDS_CHECK(L_54, L_55);
(L_54)->SetAt(static_cast<il2cpp_array_size_t>(L_55), (uint8_t)(((int32_t)((uint8_t)L_56))));
ByteU5BU5D_t3397334013* L_57 = ___intoBuffer0;
int32_t L_58 = V_2;
int32_t L_59 = V_4;
NullCheck(L_57);
IL2CPP_ARRAY_BOUNDS_CHECK(L_57, ((int32_t)((int32_t)L_58+(int32_t)1)));
(L_57)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)((int32_t)L_58+(int32_t)1))), (uint8_t)(((int32_t)((uint8_t)((int32_t)((int32_t)L_59>>(int32_t)8))))));
int32_t L_60 = ((NetBuffer_t3608062491 *)__this)->get_m_bitLength_3();
IL2CPP_RUNTIME_CLASS_INIT(NetUtility_t3562260209_il2cpp_TypeInfo_var);
int32_t L_61 = NetUtility_BytesToHoldBits_m1372162852(NULL /*static, unused*/, L_60, /*hidden argument*/NULL);
V_1 = L_61;
int32_t L_62 = V_1;
V_6 = (bool)((((int32_t)((((int32_t)L_62) > ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_63 = V_6;
if (L_63)
{
goto IL_0142;
}
}
{
ByteU5BU5D_t3397334013* L_64 = ((NetBuffer_t3608062491 *)__this)->get_m_data_2();
int32_t L_65 = __this->get_m_fragmentChunkNumber_11();
int32_t L_66 = __this->get_m_fragmentChunkByteSize_10();
ByteU5BU5D_t3397334013* L_67 = ___intoBuffer0;
int32_t L_68 = ___ptr1;
int32_t L_69 = V_1;
Buffer_BlockCopy_m1586717258(NULL /*static, unused*/, (Il2CppArray *)(Il2CppArray *)L_64, ((int32_t)((int32_t)L_65*(int32_t)L_66)), (Il2CppArray *)(Il2CppArray *)L_67, L_68, L_69, /*hidden argument*/NULL);
int32_t L_70 = ___ptr1;
int32_t L_71 = V_1;
___ptr1 = ((int32_t)((int32_t)L_70+(int32_t)L_71));
}
IL_0142:
{
}
IL_0143:
{
int32_t L_72 = ___ptr1;
NetException_Assert_m1426298558(NULL /*static, unused*/, (bool)((((int32_t)L_72) > ((int32_t)0))? 1 : 0), /*hidden argument*/NULL);
int32_t L_73 = ___ptr1;
V_5 = L_73;
goto IL_0152;
}
IL_0152:
{
int32_t L_74 = V_5;
return L_74;
}
}
// System.Int32 Lidgren.Network.NetOutgoingMessage::GetEncodedSize()
extern "C" int32_t NetOutgoingMessage_GetEncodedSize_m3842097810 (NetOutgoingMessage_t2016542980 * __this, const MethodInfo* method)
{
int32_t V_0 = 0;
int32_t V_1 = 0;
bool V_2 = false;
{
V_0 = 5;
int32_t L_0 = __this->get_m_fragmentGroup_8();
V_2 = (bool)((((int32_t)L_0) == ((int32_t)0))? 1 : 0);
bool L_1 = V_2;
if (L_1)
{
goto IL_0032;
}
}
{
int32_t L_2 = V_0;
int32_t L_3 = __this->get_m_fragmentGroup_8();
int32_t L_4 = __this->get_m_fragmentGroupTotalBits_9();
int32_t L_5 = __this->get_m_fragmentChunkByteSize_10();
int32_t L_6 = __this->get_m_fragmentChunkNumber_11();
int32_t L_7 = NetFragmentationHelper_GetFragmentationHeaderSize_m3360396866(NULL /*static, unused*/, L_3, ((int32_t)((int32_t)L_4/(int32_t)8)), L_5, L_6, /*hidden argument*/NULL);
V_0 = ((int32_t)((int32_t)L_2+(int32_t)L_7));
}
IL_0032:
{
int32_t L_8 = V_0;
int32_t L_9 = NetBuffer_get_LengthBytes_m2765088638(__this, /*hidden argument*/NULL);
V_0 = ((int32_t)((int32_t)L_8+(int32_t)L_9));
int32_t L_10 = V_0;
V_1 = L_10;
goto IL_003f;
}
IL_003f:
{
int32_t L_11 = V_1;
return L_11;
}
}
// System.String Lidgren.Network.NetOutgoingMessage::ToString()
extern Il2CppClass* ObjectU5BU5D_t3614634134_il2cpp_TypeInfo_var;
extern Il2CppClass* NetMessageType_t191235414_il2cpp_TypeInfo_var;
extern Il2CppClass* Int32_t2071877448_il2cpp_TypeInfo_var;
extern Il2CppClass* String_t_il2cpp_TypeInfo_var;
extern Il2CppCodeGenString* _stringLiteral176854741;
extern Il2CppCodeGenString* _stringLiteral372029310;
extern Il2CppCodeGenString* _stringLiteral3950120644;
extern const uint32_t NetOutgoingMessage_ToString_m1440072292_MetadataUsageId;
extern "C" String_t* NetOutgoingMessage_ToString_m1440072292 (NetOutgoingMessage_t2016542980 * __this, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetOutgoingMessage_ToString_m1440072292_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
String_t* V_0 = NULL;
bool V_1 = false;
ObjectU5BU5D_t3614634134* V_2 = NULL;
{
bool L_0 = __this->get_m_isSent_6();
V_1 = (bool)((((int32_t)L_0) == ((int32_t)0))? 1 : 0);
bool L_1 = V_1;
if (L_1)
{
goto IL_0052;
}
}
{
V_2 = ((ObjectU5BU5D_t3614634134*)SZArrayNew(ObjectU5BU5D_t3614634134_il2cpp_TypeInfo_var, (uint32_t)5));
ObjectU5BU5D_t3614634134* L_2 = V_2;
NullCheck(L_2);
IL2CPP_ARRAY_BOUNDS_CHECK(L_2, 0);
ArrayElementTypeCheck (L_2, _stringLiteral176854741);
(L_2)->SetAt(static_cast<il2cpp_array_size_t>(0), (Il2CppObject *)_stringLiteral176854741);
ObjectU5BU5D_t3614634134* L_3 = V_2;
uint8_t L_4 = __this->get_m_messageType_5();
uint8_t L_5 = L_4;
Il2CppObject * L_6 = Box(NetMessageType_t191235414_il2cpp_TypeInfo_var, &L_5);
NullCheck(L_3);
IL2CPP_ARRAY_BOUNDS_CHECK(L_3, 1);
ArrayElementTypeCheck (L_3, L_6);
(L_3)->SetAt(static_cast<il2cpp_array_size_t>(1), (Il2CppObject *)L_6);
ObjectU5BU5D_t3614634134* L_7 = V_2;
NullCheck(L_7);
IL2CPP_ARRAY_BOUNDS_CHECK(L_7, 2);
ArrayElementTypeCheck (L_7, _stringLiteral372029310);
(L_7)->SetAt(static_cast<il2cpp_array_size_t>(2), (Il2CppObject *)_stringLiteral372029310);
ObjectU5BU5D_t3614634134* L_8 = V_2;
int32_t L_9 = NetBuffer_get_LengthBytes_m2765088638(__this, /*hidden argument*/NULL);
int32_t L_10 = L_9;
Il2CppObject * L_11 = Box(Int32_t2071877448_il2cpp_TypeInfo_var, &L_10);
NullCheck(L_8);
IL2CPP_ARRAY_BOUNDS_CHECK(L_8, 3);
ArrayElementTypeCheck (L_8, L_11);
(L_8)->SetAt(static_cast<il2cpp_array_size_t>(3), (Il2CppObject *)L_11);
ObjectU5BU5D_t3614634134* L_12 = V_2;
NullCheck(L_12);
IL2CPP_ARRAY_BOUNDS_CHECK(L_12, 4);
ArrayElementTypeCheck (L_12, _stringLiteral3950120644);
(L_12)->SetAt(static_cast<il2cpp_array_size_t>(4), (Il2CppObject *)_stringLiteral3950120644);
ObjectU5BU5D_t3614634134* L_13 = V_2;
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_14 = String_Concat_m3881798623(NULL /*static, unused*/, L_13, /*hidden argument*/NULL);
V_0 = L_14;
goto IL_006f;
}
IL_0052:
{
int32_t L_15 = NetBuffer_get_LengthBytes_m2765088638(__this, /*hidden argument*/NULL);
int32_t L_16 = L_15;
Il2CppObject * L_17 = Box(Int32_t2071877448_il2cpp_TypeInfo_var, &L_16);
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_18 = String_Concat_m2000667605(NULL /*static, unused*/, _stringLiteral176854741, L_17, _stringLiteral3950120644, /*hidden argument*/NULL);
V_0 = L_18;
goto IL_006f;
}
IL_006f:
{
String_t* L_19 = V_0;
return L_19;
}
}
// System.Void Lidgren.Network.NetPeer::HandleNatIntroduction(System.Int32)
extern Il2CppClass* String_t_il2cpp_TypeInfo_var;
extern const MethodInfo* NetTuple_2__ctor_m896140118_MethodInfo_var;
extern const MethodInfo* NetQueue_1_Enqueue_m1061700747_MethodInfo_var;
extern Il2CppCodeGenString* _stringLiteral3657623505;
extern Il2CppCodeGenString* _stringLiteral3374638073;
extern Il2CppCodeGenString* _stringLiteral3430667732;
extern Il2CppCodeGenString* _stringLiteral2404739822;
extern const uint32_t NetPeer_HandleNatIntroduction_m4079714032_MetadataUsageId;
extern "C" void NetPeer_HandleNatIntroduction_m4079714032 (NetPeer_t1779390221 * __this, int32_t ___ptr0, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetPeer_HandleNatIntroduction_m4079714032_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
NetIncomingMessage_t2014089816 * V_0 = NULL;
uint8_t V_1 = 0x0;
IPEndPoint_t2615413766 * V_2 = NULL;
IPEndPoint_t2615413766 * V_3 = NULL;
String_t* V_4 = NULL;
bool V_5 = false;
NetOutgoingMessage_t2016542980 * V_6 = NULL;
bool V_7 = false;
String_t* G_B2_0 = NULL;
NetPeer_t1779390221 * G_B2_1 = NULL;
String_t* G_B1_0 = NULL;
NetPeer_t1779390221 * G_B1_1 = NULL;
String_t* G_B3_0 = NULL;
String_t* G_B3_1 = NULL;
NetPeer_t1779390221 * G_B3_2 = NULL;
int32_t G_B6_0 = 0;
{
NetPeer_VerifyNetworkThread_m4075953563(__this, /*hidden argument*/NULL);
int32_t L_0 = ___ptr0;
NetIncomingMessage_t2014089816 * L_1 = NetPeer_SetupReadHelperMessage_m906183392(__this, L_0, ((int32_t)1000), /*hidden argument*/NULL);
V_0 = L_1;
NetIncomingMessage_t2014089816 * L_2 = V_0;
NullCheck(L_2);
uint8_t L_3 = NetBuffer_ReadByte_m3348400846(L_2, /*hidden argument*/NULL);
V_1 = L_3;
NetIncomingMessage_t2014089816 * L_4 = V_0;
NullCheck(L_4);
IPEndPoint_t2615413766 * L_5 = NetBuffer_ReadIPEndPoint_m430505649(L_4, /*hidden argument*/NULL);
V_2 = L_5;
NetIncomingMessage_t2014089816 * L_6 = V_0;
NullCheck(L_6);
IPEndPoint_t2615413766 * L_7 = NetBuffer_ReadIPEndPoint_m430505649(L_6, /*hidden argument*/NULL);
V_3 = L_7;
NetIncomingMessage_t2014089816 * L_8 = V_0;
NullCheck(L_8);
String_t* L_9 = NetBuffer_ReadString_m1223210798(L_8, /*hidden argument*/NULL);
V_4 = L_9;
uint8_t L_10 = V_1;
V_5 = (bool)((((int32_t)((((int32_t)L_10) == ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_11 = V_5;
G_B1_0 = _stringLiteral3657623505;
G_B1_1 = __this;
if (L_11)
{
G_B2_0 = _stringLiteral3657623505;
G_B2_1 = __this;
goto IL_004c;
}
}
{
G_B3_0 = _stringLiteral3374638073;
G_B3_1 = G_B1_0;
G_B3_2 = G_B1_1;
goto IL_0051;
}
IL_004c:
{
G_B3_0 = _stringLiteral3430667732;
G_B3_1 = G_B2_0;
G_B3_2 = G_B2_1;
}
IL_0051:
{
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_12 = String_Concat_m2596409543(NULL /*static, unused*/, G_B3_1, G_B3_0, /*hidden argument*/NULL);
NullCheck(G_B3_2);
NetPeer_LogDebug_m2983960595(G_B3_2, L_12, /*hidden argument*/NULL);
bool L_13 = V_5;
if (L_13)
{
goto IL_0073;
}
}
{
NetPeerConfiguration_t136603591 * L_14 = __this->get_m_configuration_21();
NullCheck(L_14);
bool L_15 = NetPeerConfiguration_IsMessageTypeEnabled_m1110774391(L_14, ((int32_t)2048), /*hidden argument*/NULL);
G_B6_0 = ((int32_t)(L_15));
goto IL_0074;
}
IL_0073:
{
G_B6_0 = 1;
}
IL_0074:
{
V_7 = (bool)G_B6_0;
bool L_16 = V_7;
if (L_16)
{
goto IL_0080;
}
}
{
goto IL_0136;
}
IL_0080:
{
NetOutgoingMessage_t2016542980 * L_17 = NetPeer_CreateMessage_m3328975762(__this, 1, /*hidden argument*/NULL);
V_6 = L_17;
NetOutgoingMessage_t2016542980 * L_18 = V_6;
NullCheck(L_18);
L_18->set_m_messageType_5(((int32_t)138));
NetOutgoingMessage_t2016542980 * L_19 = V_6;
uint8_t L_20 = V_1;
NullCheck(L_19);
NetBuffer_Write_m4142810212(L_19, L_20, /*hidden argument*/NULL);
NetOutgoingMessage_t2016542980 * L_21 = V_6;
String_t* L_22 = V_4;
NullCheck(L_21);
NetBuffer_Write_m962556565(L_21, L_22, /*hidden argument*/NULL);
NetOutgoingMessage_t2016542980 * L_23 = V_6;
NullCheck(L_23);
int32_t* L_24 = L_23->get_address_of_m_recyclingCount_7();
Interlocked_Increment_m129308425(NULL /*static, unused*/, L_24, /*hidden argument*/NULL);
NetQueue_1_t1703294902 * L_25 = __this->get_m_unsentUnconnectedMessages_23();
IPEndPoint_t2615413766 * L_26 = V_2;
NetOutgoingMessage_t2016542980 * L_27 = V_6;
NetTuple_2_t3781571512 L_28;
memset(&L_28, 0, sizeof(L_28));
NetTuple_2__ctor_m896140118(&L_28, L_26, L_27, /*hidden argument*/NetTuple_2__ctor_m896140118_MethodInfo_var);
NullCheck(L_25);
NetQueue_1_Enqueue_m1061700747(L_25, L_28, /*hidden argument*/NetQueue_1_Enqueue_m1061700747_MethodInfo_var);
IPEndPoint_t2615413766 * L_29 = V_2;
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_30 = String_Concat_m56707527(NULL /*static, unused*/, _stringLiteral2404739822, L_29, /*hidden argument*/NULL);
NetPeer_LogDebug_m2983960595(__this, L_30, /*hidden argument*/NULL);
NetOutgoingMessage_t2016542980 * L_31 = NetPeer_CreateMessage_m3328975762(__this, 1, /*hidden argument*/NULL);
V_6 = L_31;
NetOutgoingMessage_t2016542980 * L_32 = V_6;
NullCheck(L_32);
L_32->set_m_messageType_5(((int32_t)138));
NetOutgoingMessage_t2016542980 * L_33 = V_6;
uint8_t L_34 = V_1;
NullCheck(L_33);
NetBuffer_Write_m4142810212(L_33, L_34, /*hidden argument*/NULL);
NetOutgoingMessage_t2016542980 * L_35 = V_6;
String_t* L_36 = V_4;
NullCheck(L_35);
NetBuffer_Write_m962556565(L_35, L_36, /*hidden argument*/NULL);
NetOutgoingMessage_t2016542980 * L_37 = V_6;
NullCheck(L_37);
int32_t* L_38 = L_37->get_address_of_m_recyclingCount_7();
Interlocked_Increment_m129308425(NULL /*static, unused*/, L_38, /*hidden argument*/NULL);
NetQueue_1_t1703294902 * L_39 = __this->get_m_unsentUnconnectedMessages_23();
IPEndPoint_t2615413766 * L_40 = V_3;
NetOutgoingMessage_t2016542980 * L_41 = V_6;
NetTuple_2_t3781571512 L_42;
memset(&L_42, 0, sizeof(L_42));
NetTuple_2__ctor_m896140118(&L_42, L_40, L_41, /*hidden argument*/NetTuple_2__ctor_m896140118_MethodInfo_var);
NullCheck(L_39);
NetQueue_1_Enqueue_m1061700747(L_39, L_42, /*hidden argument*/NetQueue_1_Enqueue_m1061700747_MethodInfo_var);
IPEndPoint_t2615413766 * L_43 = V_3;
String_t* L_44 = String_Concat_m56707527(NULL /*static, unused*/, _stringLiteral2404739822, L_43, /*hidden argument*/NULL);
NetPeer_LogDebug_m2983960595(__this, L_44, /*hidden argument*/NULL);
}
IL_0136:
{
return;
}
}
// System.Void Lidgren.Network.NetPeer::HandleNatPunch(System.Int32,System.Net.IPEndPoint)
extern Il2CppClass* ObjectU5BU5D_t3614634134_il2cpp_TypeInfo_var;
extern Il2CppClass* String_t_il2cpp_TypeInfo_var;
extern const MethodInfo* NetTuple_2__ctor_m896140118_MethodInfo_var;
extern const MethodInfo* NetQueue_1_Enqueue_m1061700747_MethodInfo_var;
extern Il2CppCodeGenString* _stringLiteral143800184;
extern Il2CppCodeGenString* _stringLiteral2837538112;
extern Il2CppCodeGenString* _stringLiteral3165262718;
extern const uint32_t NetPeer_HandleNatPunch_m77480994_MetadataUsageId;
extern "C" void NetPeer_HandleNatPunch_m77480994 (NetPeer_t1779390221 * __this, int32_t ___ptr0, IPEndPoint_t2615413766 * ___senderEndPoint1, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetPeer_HandleNatPunch_m77480994_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
NetIncomingMessage_t2014089816 * V_0 = NULL;
bool V_1 = false;
String_t* V_2 = NULL;
NetOutgoingMessage_t2016542980 * V_3 = NULL;
NetOutgoingMessage_t2016542980 * V_4 = NULL;
bool V_5 = false;
ObjectU5BU5D_t3614634134* V_6 = NULL;
{
int32_t L_0 = ___ptr0;
NetIncomingMessage_t2014089816 * L_1 = NetPeer_SetupReadHelperMessage_m906183392(__this, L_0, ((int32_t)1000), /*hidden argument*/NULL);
V_0 = L_1;
NetIncomingMessage_t2014089816 * L_2 = V_0;
NullCheck(L_2);
uint8_t L_3 = NetBuffer_ReadByte_m3348400846(L_2, /*hidden argument*/NULL);
V_1 = (bool)((((int32_t)L_3) == ((int32_t)0))? 1 : 0);
NetIncomingMessage_t2014089816 * L_4 = V_0;
NullCheck(L_4);
String_t* L_5 = NetBuffer_ReadString_m1223210798(L_4, /*hidden argument*/NULL);
V_2 = L_5;
bool L_6 = V_1;
V_5 = (bool)((((int32_t)L_6) == ((int32_t)0))? 1 : 0);
bool L_7 = V_5;
if (L_7)
{
goto IL_00a1;
}
}
{
V_6 = ((ObjectU5BU5D_t3614634134*)SZArrayNew(ObjectU5BU5D_t3614634134_il2cpp_TypeInfo_var, (uint32_t)4));
ObjectU5BU5D_t3614634134* L_8 = V_6;
NullCheck(L_8);
IL2CPP_ARRAY_BOUNDS_CHECK(L_8, 0);
ArrayElementTypeCheck (L_8, _stringLiteral143800184);
(L_8)->SetAt(static_cast<il2cpp_array_size_t>(0), (Il2CppObject *)_stringLiteral143800184);
ObjectU5BU5D_t3614634134* L_9 = V_6;
IPEndPoint_t2615413766 * L_10 = ___senderEndPoint1;
NullCheck(L_9);
IL2CPP_ARRAY_BOUNDS_CHECK(L_9, 1);
ArrayElementTypeCheck (L_9, L_10);
(L_9)->SetAt(static_cast<il2cpp_array_size_t>(1), (Il2CppObject *)L_10);
ObjectU5BU5D_t3614634134* L_11 = V_6;
NullCheck(L_11);
IL2CPP_ARRAY_BOUNDS_CHECK(L_11, 2);
ArrayElementTypeCheck (L_11, _stringLiteral2837538112);
(L_11)->SetAt(static_cast<il2cpp_array_size_t>(2), (Il2CppObject *)_stringLiteral2837538112);
ObjectU5BU5D_t3614634134* L_12 = V_6;
String_t* L_13 = V_2;
NullCheck(L_12);
IL2CPP_ARRAY_BOUNDS_CHECK(L_12, 3);
ArrayElementTypeCheck (L_12, L_13);
(L_12)->SetAt(static_cast<il2cpp_array_size_t>(3), (Il2CppObject *)L_13);
ObjectU5BU5D_t3614634134* L_14 = V_6;
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_15 = String_Concat_m3881798623(NULL /*static, unused*/, L_14, /*hidden argument*/NULL);
NetPeer_LogDebug_m2983960595(__this, L_15, /*hidden argument*/NULL);
NetOutgoingMessage_t2016542980 * L_16 = NetPeer_CreateMessage_m3328975762(__this, 1, /*hidden argument*/NULL);
V_3 = L_16;
NetOutgoingMessage_t2016542980 * L_17 = V_3;
NullCheck(L_17);
L_17->set_m_messageType_5(((int32_t)143));
NetOutgoingMessage_t2016542980 * L_18 = V_3;
NullCheck(L_18);
NetBuffer_Write_m4142810212(L_18, 1, /*hidden argument*/NULL);
NetOutgoingMessage_t2016542980 * L_19 = V_3;
String_t* L_20 = V_2;
NullCheck(L_19);
NetBuffer_Write_m962556565(L_19, L_20, /*hidden argument*/NULL);
NetOutgoingMessage_t2016542980 * L_21 = V_3;
NullCheck(L_21);
int32_t* L_22 = L_21->get_address_of_m_recyclingCount_7();
Interlocked_Increment_m129308425(NULL /*static, unused*/, L_22, /*hidden argument*/NULL);
NetQueue_1_t1703294902 * L_23 = __this->get_m_unsentUnconnectedMessages_23();
IPEndPoint_t2615413766 * L_24 = ___senderEndPoint1;
NetOutgoingMessage_t2016542980 * L_25 = V_3;
NetTuple_2_t3781571512 L_26;
memset(&L_26, 0, sizeof(L_26));
NetTuple_2__ctor_m896140118(&L_26, L_24, L_25, /*hidden argument*/NetTuple_2__ctor_m896140118_MethodInfo_var);
NullCheck(L_23);
NetQueue_1_Enqueue_m1061700747(L_23, L_26, /*hidden argument*/NetQueue_1_Enqueue_m1061700747_MethodInfo_var);
goto IL_011d;
}
IL_00a1:
{
V_6 = ((ObjectU5BU5D_t3614634134*)SZArrayNew(ObjectU5BU5D_t3614634134_il2cpp_TypeInfo_var, (uint32_t)4));
ObjectU5BU5D_t3614634134* L_27 = V_6;
NullCheck(L_27);
IL2CPP_ARRAY_BOUNDS_CHECK(L_27, 0);
ArrayElementTypeCheck (L_27, _stringLiteral143800184);
(L_27)->SetAt(static_cast<il2cpp_array_size_t>(0), (Il2CppObject *)_stringLiteral143800184);
ObjectU5BU5D_t3614634134* L_28 = V_6;
IPEndPoint_t2615413766 * L_29 = ___senderEndPoint1;
NullCheck(L_28);
IL2CPP_ARRAY_BOUNDS_CHECK(L_28, 1);
ArrayElementTypeCheck (L_28, L_29);
(L_28)->SetAt(static_cast<il2cpp_array_size_t>(1), (Il2CppObject *)L_29);
ObjectU5BU5D_t3614634134* L_30 = V_6;
NullCheck(L_30);
IL2CPP_ARRAY_BOUNDS_CHECK(L_30, 2);
ArrayElementTypeCheck (L_30, _stringLiteral3165262718);
(L_30)->SetAt(static_cast<il2cpp_array_size_t>(2), (Il2CppObject *)_stringLiteral3165262718);
ObjectU5BU5D_t3614634134* L_31 = V_6;
String_t* L_32 = V_2;
NullCheck(L_31);
IL2CPP_ARRAY_BOUNDS_CHECK(L_31, 3);
ArrayElementTypeCheck (L_31, L_32);
(L_31)->SetAt(static_cast<il2cpp_array_size_t>(3), (Il2CppObject *)L_32);
ObjectU5BU5D_t3614634134* L_33 = V_6;
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_34 = String_Concat_m3881798623(NULL /*static, unused*/, L_33, /*hidden argument*/NULL);
NetPeer_LogDebug_m2983960595(__this, L_34, /*hidden argument*/NULL);
NetOutgoingMessage_t2016542980 * L_35 = NetPeer_CreateMessage_m3328975762(__this, 1, /*hidden argument*/NULL);
V_4 = L_35;
NetOutgoingMessage_t2016542980 * L_36 = V_4;
NullCheck(L_36);
L_36->set_m_messageType_5(((int32_t)142));
NetOutgoingMessage_t2016542980 * L_37 = V_4;
NullCheck(L_37);
NetBuffer_Write_m4142810212(L_37, 0, /*hidden argument*/NULL);
NetOutgoingMessage_t2016542980 * L_38 = V_4;
String_t* L_39 = V_2;
NullCheck(L_38);
NetBuffer_Write_m962556565(L_38, L_39, /*hidden argument*/NULL);
NetOutgoingMessage_t2016542980 * L_40 = V_4;
NullCheck(L_40);
int32_t* L_41 = L_40->get_address_of_m_recyclingCount_7();
Interlocked_Increment_m129308425(NULL /*static, unused*/, L_41, /*hidden argument*/NULL);
NetQueue_1_t1703294902 * L_42 = __this->get_m_unsentUnconnectedMessages_23();
IPEndPoint_t2615413766 * L_43 = ___senderEndPoint1;
NetOutgoingMessage_t2016542980 * L_44 = V_4;
NetTuple_2_t3781571512 L_45;
memset(&L_45, 0, sizeof(L_45));
NetTuple_2__ctor_m896140118(&L_45, L_43, L_44, /*hidden argument*/NetTuple_2__ctor_m896140118_MethodInfo_var);
NullCheck(L_42);
NetQueue_1_Enqueue_m1061700747(L_42, L_45, /*hidden argument*/NetQueue_1_Enqueue_m1061700747_MethodInfo_var);
}
IL_011d:
{
return;
}
}
// System.Void Lidgren.Network.NetPeer::HandleNatPunchConfirmRequest(System.Int32,System.Net.IPEndPoint)
extern Il2CppClass* ObjectU5BU5D_t3614634134_il2cpp_TypeInfo_var;
extern Il2CppClass* String_t_il2cpp_TypeInfo_var;
extern const MethodInfo* NetTuple_2__ctor_m896140118_MethodInfo_var;
extern const MethodInfo* NetQueue_1_Enqueue_m1061700747_MethodInfo_var;
extern Il2CppCodeGenString* _stringLiteral2395040233;
extern Il2CppCodeGenString* _stringLiteral2770199202;
extern const uint32_t NetPeer_HandleNatPunchConfirmRequest_m3944409323_MetadataUsageId;
extern "C" void NetPeer_HandleNatPunchConfirmRequest_m3944409323 (NetPeer_t1779390221 * __this, int32_t ___ptr0, IPEndPoint_t2615413766 * ___senderEndPoint1, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetPeer_HandleNatPunchConfirmRequest_m3944409323_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
NetIncomingMessage_t2014089816 * V_0 = NULL;
bool V_1 = false;
String_t* V_2 = NULL;
NetOutgoingMessage_t2016542980 * V_3 = NULL;
ObjectU5BU5D_t3614634134* V_4 = NULL;
NetOutgoingMessage_t2016542980 * G_B2_0 = NULL;
NetOutgoingMessage_t2016542980 * G_B1_0 = NULL;
int32_t G_B3_0 = 0;
NetOutgoingMessage_t2016542980 * G_B3_1 = NULL;
{
int32_t L_0 = ___ptr0;
NetIncomingMessage_t2014089816 * L_1 = NetPeer_SetupReadHelperMessage_m906183392(__this, L_0, ((int32_t)1000), /*hidden argument*/NULL);
V_0 = L_1;
NetIncomingMessage_t2014089816 * L_2 = V_0;
NullCheck(L_2);
uint8_t L_3 = NetBuffer_ReadByte_m3348400846(L_2, /*hidden argument*/NULL);
V_1 = (bool)((((int32_t)L_3) == ((int32_t)0))? 1 : 0);
NetIncomingMessage_t2014089816 * L_4 = V_0;
NullCheck(L_4);
String_t* L_5 = NetBuffer_ReadString_m1223210798(L_4, /*hidden argument*/NULL);
V_2 = L_5;
V_4 = ((ObjectU5BU5D_t3614634134*)SZArrayNew(ObjectU5BU5D_t3614634134_il2cpp_TypeInfo_var, (uint32_t)4));
ObjectU5BU5D_t3614634134* L_6 = V_4;
NullCheck(L_6);
IL2CPP_ARRAY_BOUNDS_CHECK(L_6, 0);
ArrayElementTypeCheck (L_6, _stringLiteral2395040233);
(L_6)->SetAt(static_cast<il2cpp_array_size_t>(0), (Il2CppObject *)_stringLiteral2395040233);
ObjectU5BU5D_t3614634134* L_7 = V_4;
IPEndPoint_t2615413766 * L_8 = ___senderEndPoint1;
NullCheck(L_7);
IL2CPP_ARRAY_BOUNDS_CHECK(L_7, 1);
ArrayElementTypeCheck (L_7, L_8);
(L_7)->SetAt(static_cast<il2cpp_array_size_t>(1), (Il2CppObject *)L_8);
ObjectU5BU5D_t3614634134* L_9 = V_4;
NullCheck(L_9);
IL2CPP_ARRAY_BOUNDS_CHECK(L_9, 2);
ArrayElementTypeCheck (L_9, _stringLiteral2770199202);
(L_9)->SetAt(static_cast<il2cpp_array_size_t>(2), (Il2CppObject *)_stringLiteral2770199202);
ObjectU5BU5D_t3614634134* L_10 = V_4;
String_t* L_11 = V_2;
NullCheck(L_10);
IL2CPP_ARRAY_BOUNDS_CHECK(L_10, 3);
ArrayElementTypeCheck (L_10, L_11);
(L_10)->SetAt(static_cast<il2cpp_array_size_t>(3), (Il2CppObject *)L_11);
ObjectU5BU5D_t3614634134* L_12 = V_4;
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_13 = String_Concat_m3881798623(NULL /*static, unused*/, L_12, /*hidden argument*/NULL);
NetPeer_LogDebug_m2983960595(__this, L_13, /*hidden argument*/NULL);
NetOutgoingMessage_t2016542980 * L_14 = NetPeer_CreateMessage_m3328975762(__this, 1, /*hidden argument*/NULL);
V_3 = L_14;
NetOutgoingMessage_t2016542980 * L_15 = V_3;
NullCheck(L_15);
L_15->set_m_messageType_5(((int32_t)143));
NetOutgoingMessage_t2016542980 * L_16 = V_3;
bool L_17 = V_1;
G_B1_0 = L_16;
if (L_17)
{
G_B2_0 = L_16;
goto IL_006b;
}
}
{
G_B3_0 = 0;
G_B3_1 = G_B1_0;
goto IL_006c;
}
IL_006b:
{
G_B3_0 = 1;
G_B3_1 = G_B2_0;
}
IL_006c:
{
NullCheck(G_B3_1);
NetBuffer_Write_m4142810212(G_B3_1, G_B3_0, /*hidden argument*/NULL);
NetOutgoingMessage_t2016542980 * L_18 = V_3;
String_t* L_19 = V_2;
NullCheck(L_18);
NetBuffer_Write_m962556565(L_18, L_19, /*hidden argument*/NULL);
NetOutgoingMessage_t2016542980 * L_20 = V_3;
NullCheck(L_20);
int32_t* L_21 = L_20->get_address_of_m_recyclingCount_7();
Interlocked_Increment_m129308425(NULL /*static, unused*/, L_21, /*hidden argument*/NULL);
NetQueue_1_t1703294902 * L_22 = __this->get_m_unsentUnconnectedMessages_23();
IPEndPoint_t2615413766 * L_23 = ___senderEndPoint1;
NetOutgoingMessage_t2016542980 * L_24 = V_3;
NetTuple_2_t3781571512 L_25;
memset(&L_25, 0, sizeof(L_25));
NetTuple_2__ctor_m896140118(&L_25, L_23, L_24, /*hidden argument*/NetTuple_2__ctor_m896140118_MethodInfo_var);
NullCheck(L_22);
NetQueue_1_Enqueue_m1061700747(L_22, L_25, /*hidden argument*/NetQueue_1_Enqueue_m1061700747_MethodInfo_var);
return;
}
}
// System.Void Lidgren.Network.NetPeer::HandleNatPunchConfirmed(System.Int32,System.Net.IPEndPoint)
extern Il2CppClass* String_t_il2cpp_TypeInfo_var;
extern Il2CppCodeGenString* _stringLiteral792097889;
extern Il2CppCodeGenString* _stringLiteral4165751516;
extern Il2CppCodeGenString* _stringLiteral60653504;
extern const uint32_t NetPeer_HandleNatPunchConfirmed_m1119557487_MetadataUsageId;
extern "C" void NetPeer_HandleNatPunchConfirmed_m1119557487 (NetPeer_t1779390221 * __this, int32_t ___ptr0, IPEndPoint_t2615413766 * ___senderEndPoint1, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetPeer_HandleNatPunchConfirmed_m1119557487_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
NetIncomingMessage_t2014089816 * V_0 = NULL;
bool V_1 = false;
String_t* V_2 = NULL;
NetIncomingMessage_t2014089816 * V_3 = NULL;
bool V_4 = false;
{
int32_t L_0 = ___ptr0;
NetIncomingMessage_t2014089816 * L_1 = NetPeer_SetupReadHelperMessage_m906183392(__this, L_0, ((int32_t)1000), /*hidden argument*/NULL);
V_0 = L_1;
NetIncomingMessage_t2014089816 * L_2 = V_0;
NullCheck(L_2);
uint8_t L_3 = NetBuffer_ReadByte_m3348400846(L_2, /*hidden argument*/NULL);
V_1 = (bool)((((int32_t)L_3) == ((int32_t)0))? 1 : 0);
bool L_4 = V_1;
V_4 = (bool)((((int32_t)L_4) == ((int32_t)0))? 1 : 0);
bool L_5 = V_4;
if (L_5)
{
goto IL_003c;
}
}
{
IPEndPoint_t2615413766 * L_6 = ___senderEndPoint1;
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_7 = String_Concat_m2000667605(NULL /*static, unused*/, _stringLiteral792097889, L_6, _stringLiteral4165751516, /*hidden argument*/NULL);
NetPeer_LogDebug_m2983960595(__this, L_7, /*hidden argument*/NULL);
goto IL_007f;
}
IL_003c:
{
NetIncomingMessage_t2014089816 * L_8 = V_0;
NullCheck(L_8);
String_t* L_9 = NetBuffer_ReadString_m1223210798(L_8, /*hidden argument*/NULL);
V_2 = L_9;
IPEndPoint_t2615413766 * L_10 = ___senderEndPoint1;
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_11 = String_Concat_m2000667605(NULL /*static, unused*/, _stringLiteral792097889, L_10, _stringLiteral60653504, /*hidden argument*/NULL);
NetPeer_LogDebug_m2983960595(__this, L_11, /*hidden argument*/NULL);
NetIncomingMessage_t2014089816 * L_12 = NetPeer_CreateIncomingMessage_m2109562735(__this, ((int32_t)2048), ((int32_t)10), /*hidden argument*/NULL);
V_3 = L_12;
NetIncomingMessage_t2014089816 * L_13 = V_3;
IPEndPoint_t2615413766 * L_14 = ___senderEndPoint1;
NullCheck(L_13);
L_13->set_m_senderEndPoint_6(L_14);
NetIncomingMessage_t2014089816 * L_15 = V_3;
String_t* L_16 = V_2;
NullCheck(L_15);
NetBuffer_Write_m962556565(L_15, L_16, /*hidden argument*/NULL);
NetIncomingMessage_t2014089816 * L_17 = V_3;
NetPeer_ReleaseMessage_m3520648965(__this, L_17, /*hidden argument*/NULL);
}
IL_007f:
{
return;
}
}
// System.Threading.AutoResetEvent Lidgren.Network.NetPeer::get_MessageReceivedEvent()
extern Il2CppClass* AutoResetEvent_t15112628_il2cpp_TypeInfo_var;
extern const uint32_t NetPeer_get_MessageReceivedEvent_m4116203547_MetadataUsageId;
extern "C" AutoResetEvent_t15112628 * NetPeer_get_MessageReceivedEvent_m4116203547 (NetPeer_t1779390221 * __this, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetPeer_get_MessageReceivedEvent_m4116203547_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
AutoResetEvent_t15112628 * V_0 = NULL;
bool V_1 = false;
Il2CppObject * V_2 = NULL;
Exception_t1927440687 * __last_unhandled_exception = 0;
NO_UNUSED_WARNING (__last_unhandled_exception);
Exception_t1927440687 * __exception_local = 0;
NO_UNUSED_WARNING (__exception_local);
int32_t __leave_target = 0;
NO_UNUSED_WARNING (__leave_target);
{
AutoResetEvent_t15112628 * L_0 = __this->get_m_messageReceivedEvent_28();
V_1 = (bool)((((int32_t)((((Il2CppObject*)(AutoResetEvent_t15112628 *)L_0) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_1 = V_1;
if (L_1)
{
goto IL_004a;
}
}
{
Il2CppObject * L_2 = __this->get_m_messageReceivedEventCreationLock_2();
Il2CppObject * L_3 = L_2;
V_2 = L_3;
Monitor_Enter_m2136705809(NULL /*static, unused*/, L_3, /*hidden argument*/NULL);
}
IL_0020:
try
{ // begin try (depth: 1)
{
AutoResetEvent_t15112628 * L_4 = __this->get_m_messageReceivedEvent_28();
V_1 = (bool)((((int32_t)((((Il2CppObject*)(AutoResetEvent_t15112628 *)L_4) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_5 = V_1;
if (L_5)
{
goto IL_003d;
}
}
IL_0031:
{
AutoResetEvent_t15112628 * L_6 = (AutoResetEvent_t15112628 *)il2cpp_codegen_object_new(AutoResetEvent_t15112628_il2cpp_TypeInfo_var);
AutoResetEvent__ctor_m2634317352(L_6, (bool)0, /*hidden argument*/NULL);
__this->set_m_messageReceivedEvent_28(L_6);
}
IL_003d:
{
IL2CPP_LEAVE(0x48, FINALLY_0040);
}
} // end try (depth: 1)
catch(Il2CppExceptionWrapper& e)
{
__last_unhandled_exception = (Exception_t1927440687 *)e.ex;
goto FINALLY_0040;
}
FINALLY_0040:
{ // begin finally (depth: 1)
Il2CppObject * L_7 = V_2;
Monitor_Exit_m2677760297(NULL /*static, unused*/, L_7, /*hidden argument*/NULL);
IL2CPP_END_FINALLY(64)
} // end finally (depth: 1)
IL2CPP_CLEANUP(64)
{
IL2CPP_JUMP_TBL(0x48, IL_0048)
IL2CPP_RETHROW_IF_UNHANDLED(Exception_t1927440687 *)
}
IL_0048:
{
}
IL_004a:
{
AutoResetEvent_t15112628 * L_8 = __this->get_m_messageReceivedEvent_28();
V_0 = L_8;
goto IL_0053;
}
IL_0053:
{
AutoResetEvent_t15112628 * L_9 = V_0;
return L_9;
}
}
// System.Int32 Lidgren.Network.NetPeer::get_ConnectionsCount()
extern const MethodInfo* List_1_get_Count_m1394854046_MethodInfo_var;
extern const uint32_t NetPeer_get_ConnectionsCount_m847920945_MetadataUsageId;
extern "C" int32_t NetPeer_get_ConnectionsCount_m847920945 (NetPeer_t1779390221 * __this, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetPeer_get_ConnectionsCount_m847920945_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
int32_t V_0 = 0;
{
List_1_t2700613161 * L_0 = __this->get_m_connections_3();
NullCheck(L_0);
int32_t L_1 = List_1_get_Count_m1394854046(L_0, /*hidden argument*/List_1_get_Count_m1394854046_MethodInfo_var);
V_0 = L_1;
goto IL_000f;
}
IL_000f:
{
int32_t L_2 = V_0;
return L_2;
}
}
// Lidgren.Network.NetPeerConfiguration Lidgren.Network.NetPeer::get_Configuration()
extern "C" NetPeerConfiguration_t136603591 * NetPeer_get_Configuration_m323836264 (NetPeer_t1779390221 * __this, const MethodInfo* method)
{
NetPeerConfiguration_t136603591 * V_0 = NULL;
{
NetPeerConfiguration_t136603591 * L_0 = __this->get_m_configuration_21();
V_0 = L_0;
goto IL_000a;
}
IL_000a:
{
NetPeerConfiguration_t136603591 * L_1 = V_0;
return L_1;
}
}
// System.Void Lidgren.Network.NetPeer::.ctor(Lidgren.Network.NetPeerConfiguration)
extern Il2CppClass* Il2CppObject_il2cpp_TypeInfo_var;
extern Il2CppClass* List_1_t667328605_il2cpp_TypeInfo_var;
extern Il2CppClass* NetPeerStatistics_t101027066_il2cpp_TypeInfo_var;
extern Il2CppClass* NetQueue_1_t4230780502_il2cpp_TypeInfo_var;
extern Il2CppClass* NetQueue_1_t1703294902_il2cpp_TypeInfo_var;
extern Il2CppClass* List_1_t2700613161_il2cpp_TypeInfo_var;
extern Il2CppClass* Dictionary_2_t3898409514_il2cpp_TypeInfo_var;
extern Il2CppClass* IPAddress_t1399971723_il2cpp_TypeInfo_var;
extern Il2CppClass* IPEndPoint_t2615413766_il2cpp_TypeInfo_var;
extern Il2CppClass* Dictionary_2_t2557578811_il2cpp_TypeInfo_var;
extern const MethodInfo* List_1__ctor_m2848358961_MethodInfo_var;
extern const MethodInfo* NetQueue_1__ctor_m2751966236_MethodInfo_var;
extern const MethodInfo* NetQueue_1__ctor_m3815424430_MethodInfo_var;
extern const MethodInfo* List_1__ctor_m3318628702_MethodInfo_var;
extern const MethodInfo* Dictionary_2__ctor_m4180928651_MethodInfo_var;
extern const MethodInfo* Dictionary_2__ctor_m1945917482_MethodInfo_var;
extern const uint32_t NetPeer__ctor_m1244084668_MetadataUsageId;
extern "C" void NetPeer__ctor_m1244084668 (NetPeer_t1779390221 * __this, NetPeerConfiguration_t136603591 * ___config0, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetPeer__ctor_m1244084668_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
{
Il2CppObject * L_0 = (Il2CppObject *)il2cpp_codegen_object_new(Il2CppObject_il2cpp_TypeInfo_var);
Object__ctor_m2551263788(L_0, /*hidden argument*/NULL);
__this->set_m_messageReceivedEventCreationLock_2(L_0);
Il2CppObject * L_1 = (Il2CppObject *)il2cpp_codegen_object_new(Il2CppObject_il2cpp_TypeInfo_var);
Object__ctor_m2551263788(L_1, /*hidden argument*/NULL);
__this->set_m_initializeLock_15(L_1);
__this->set_m_lastSocketBind_18((-3.4028234663852886E+38));
List_1_t667328605 * L_2 = (List_1_t667328605 *)il2cpp_codegen_object_new(List_1_t667328605_il2cpp_TypeInfo_var);
List_1__ctor_m2848358961(L_2, /*hidden argument*/List_1__ctor_m2848358961_MethodInfo_var);
__this->set_m_delayedPackets_30(L_2);
Object__ctor_m2551263788(__this, /*hidden argument*/NULL);
NetPeerConfiguration_t136603591 * L_3 = ___config0;
__this->set_m_configuration_21(L_3);
NetPeerStatistics_t101027066 * L_4 = (NetPeerStatistics_t101027066 *)il2cpp_codegen_object_new(NetPeerStatistics_t101027066_il2cpp_TypeInfo_var);
NetPeerStatistics__ctor_m358809733(L_4, __this, /*hidden argument*/NULL);
__this->set_m_statistics_25(L_4);
NetQueue_1_t4230780502 * L_5 = (NetQueue_1_t4230780502 *)il2cpp_codegen_object_new(NetQueue_1_t4230780502_il2cpp_TypeInfo_var);
NetQueue_1__ctor_m2751966236(L_5, 4, /*hidden argument*/NetQueue_1__ctor_m2751966236_MethodInfo_var);
__this->set_m_releasedIncomingMessages_22(L_5);
NetQueue_1_t1703294902 * L_6 = (NetQueue_1_t1703294902 *)il2cpp_codegen_object_new(NetQueue_1_t1703294902_il2cpp_TypeInfo_var);
NetQueue_1__ctor_m3815424430(L_6, 2, /*hidden argument*/NetQueue_1__ctor_m3815424430_MethodInfo_var);
__this->set_m_unsentUnconnectedMessages_23(L_6);
List_1_t2700613161 * L_7 = (List_1_t2700613161 *)il2cpp_codegen_object_new(List_1_t2700613161_il2cpp_TypeInfo_var);
List_1__ctor_m3318628702(L_7, /*hidden argument*/List_1__ctor_m3318628702_MethodInfo_var);
__this->set_m_connections_3(L_7);
Dictionary_2_t3898409514 * L_8 = (Dictionary_2_t3898409514 *)il2cpp_codegen_object_new(Dictionary_2_t3898409514_il2cpp_TypeInfo_var);
Dictionary_2__ctor_m4180928651(L_8, /*hidden argument*/Dictionary_2__ctor_m4180928651_MethodInfo_var);
__this->set_m_connectionLookup_4(L_8);
Dictionary_2_t3898409514 * L_9 = (Dictionary_2_t3898409514 *)il2cpp_codegen_object_new(Dictionary_2_t3898409514_il2cpp_TypeInfo_var);
Dictionary_2__ctor_m4180928651(L_9, /*hidden argument*/Dictionary_2__ctor_m4180928651_MethodInfo_var);
__this->set_m_handshakes_24(L_9);
IL2CPP_RUNTIME_CLASS_INIT(IPAddress_t1399971723_il2cpp_TypeInfo_var);
IPAddress_t1399971723 * L_10 = ((IPAddress_t1399971723_StaticFields*)IPAddress_t1399971723_il2cpp_TypeInfo_var->static_fields)->get_Any_4();
IPEndPoint_t2615413766 * L_11 = (IPEndPoint_t2615413766 *)il2cpp_codegen_object_new(IPEndPoint_t2615413766_il2cpp_TypeInfo_var);
IPEndPoint__ctor_m3477723888(L_11, L_10, 0, /*hidden argument*/NULL);
__this->set_m_senderRemote_14(L_11);
__this->set_m_status_8(0);
Dictionary_2_t2557578811 * L_12 = (Dictionary_2_t2557578811 *)il2cpp_codegen_object_new(Dictionary_2_t2557578811_il2cpp_TypeInfo_var);
Dictionary_2__ctor_m1945917482(L_12, /*hidden argument*/Dictionary_2__ctor_m1945917482_MethodInfo_var);
__this->set_m_receivedFragmentGroups_7(L_12);
return;
}
}
// System.Void Lidgren.Network.NetPeer::Start()
extern Il2CppClass* String_t_il2cpp_TypeInfo_var;
extern Il2CppClass* NetPeer_t1779390221_il2cpp_TypeInfo_var;
extern Il2CppClass* ThreadStart_t3437517264_il2cpp_TypeInfo_var;
extern Il2CppClass* Thread_t241561612_il2cpp_TypeInfo_var;
extern Il2CppClass* NetUtility_t3562260209_il2cpp_TypeInfo_var;
extern const MethodInfo* NetPeer_NetworkLoop_m1488252008_MethodInfo_var;
extern Il2CppCodeGenString* _stringLiteral1313602929;
extern Il2CppCodeGenString* _stringLiteral2344018411;
extern Il2CppCodeGenString* _stringLiteral613995275;
extern const uint32_t NetPeer_Start_m3936372496_MetadataUsageId;
extern "C" void NetPeer_Start_m3936372496 (NetPeer_t1779390221 * __this, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetPeer_Start_m3936372496_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
int32_t V_0 = 0;
bool V_1 = false;
{
int32_t L_0 = __this->get_m_status_8();
V_1 = (bool)((((int32_t)L_0) == ((int32_t)0))? 1 : 0);
bool L_1 = V_1;
if (L_1)
{
goto IL_0020;
}
}
{
NetPeer_LogWarning_m3266657906(__this, _stringLiteral1313602929, /*hidden argument*/NULL);
goto IL_00dd;
}
IL_0020:
{
__this->set_m_status_8(1);
NetPeerConfiguration_t136603591 * L_2 = __this->get_m_configuration_21();
NullCheck(L_2);
String_t* L_3 = NetPeerConfiguration_get_NetworkThreadName_m2092581791(L_2, /*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
bool L_4 = String_op_Equality_m1790663636(NULL /*static, unused*/, L_3, _stringLiteral2344018411, /*hidden argument*/NULL);
V_1 = (bool)((((int32_t)L_4) == ((int32_t)0))? 1 : 0);
bool L_5 = V_1;
if (L_5)
{
goto IL_006d;
}
}
{
int32_t L_6 = Interlocked_Increment_m129308425(NULL /*static, unused*/, (((NetPeer_t1779390221_StaticFields*)NetPeer_t1779390221_il2cpp_TypeInfo_var->static_fields)->get_address_of_s_initializedPeersCount_0()), /*hidden argument*/NULL);
V_0 = L_6;
NetPeerConfiguration_t136603591 * L_7 = __this->get_m_configuration_21();
String_t* L_8 = Int32_ToString_m2960866144((&V_0), /*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_9 = String_Concat_m2596409543(NULL /*static, unused*/, _stringLiteral613995275, L_8, /*hidden argument*/NULL);
NullCheck(L_7);
NetPeerConfiguration_set_NetworkThreadName_m1927203884(L_7, L_9, /*hidden argument*/NULL);
}
IL_006d:
{
NetPeer_InitializeNetwork_m4038073148(__this, /*hidden argument*/NULL);
IntPtr_t L_10;
L_10.set_m_value_0((void*)(void*)NetPeer_NetworkLoop_m1488252008_MethodInfo_var);
ThreadStart_t3437517264 * L_11 = (ThreadStart_t3437517264 *)il2cpp_codegen_object_new(ThreadStart_t3437517264_il2cpp_TypeInfo_var);
ThreadStart__ctor_m3015256841(L_11, __this, L_10, /*hidden argument*/NULL);
Thread_t241561612 * L_12 = (Thread_t241561612 *)il2cpp_codegen_object_new(Thread_t241561612_il2cpp_TypeInfo_var);
Thread__ctor_m4175494164(L_12, L_11, /*hidden argument*/NULL);
__this->set_m_networkThread_9(L_12);
Thread_t241561612 * L_13 = __this->get_m_networkThread_9();
NetPeerConfiguration_t136603591 * L_14 = __this->get_m_configuration_21();
NullCheck(L_14);
String_t* L_15 = NetPeerConfiguration_get_NetworkThreadName_m2092581791(L_14, /*hidden argument*/NULL);
NullCheck(L_13);
Thread_set_Name_m1343706609(L_13, L_15, /*hidden argument*/NULL);
Thread_t241561612 * L_16 = __this->get_m_networkThread_9();
NullCheck(L_16);
Thread_set_IsBackground_m2222126055(L_16, (bool)1, /*hidden argument*/NULL);
Thread_t241561612 * L_17 = __this->get_m_networkThread_9();
NullCheck(L_17);
Thread_Start_m1419497481(L_17, /*hidden argument*/NULL);
NetUPnP_t2794379482 * L_18 = __this->get_m_upnp_19();
V_1 = (bool)((((Il2CppObject*)(NetUPnP_t2794379482 *)L_18) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0);
bool L_19 = V_1;
if (L_19)
{
goto IL_00d5;
}
}
{
NetUPnP_t2794379482 * L_20 = __this->get_m_upnp_19();
NullCheck(L_20);
NetUPnP_Discover_m2977051670(L_20, __this, /*hidden argument*/NULL);
}
IL_00d5:
{
IL2CPP_RUNTIME_CLASS_INIT(NetUtility_t3562260209_il2cpp_TypeInfo_var);
NetUtility_Sleep_m886463228(NULL /*static, unused*/, ((int32_t)50), /*hidden argument*/NULL);
}
IL_00dd:
{
return;
}
}
// Lidgren.Network.NetIncomingMessage Lidgren.Network.NetPeer::ReadMessage()
extern const MethodInfo* NetQueue_1_TryDequeue_m2762539262_MethodInfo_var;
extern const uint32_t NetPeer_ReadMessage_m1719847425_MetadataUsageId;
extern "C" NetIncomingMessage_t2014089816 * NetPeer_ReadMessage_m1719847425 (NetPeer_t1779390221 * __this, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetPeer_ReadMessage_m1719847425_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
NetIncomingMessage_t2014089816 * V_0 = NULL;
int32_t V_1 = 0;
NetIncomingMessage_t2014089816 * V_2 = NULL;
bool V_3 = false;
{
NetQueue_1_t4230780502 * L_0 = __this->get_m_releasedIncomingMessages_22();
NullCheck(L_0);
bool L_1 = NetQueue_1_TryDequeue_m2762539262(L_0, (&V_0), /*hidden argument*/NetQueue_1_TryDequeue_m2762539262_MethodInfo_var);
V_3 = (bool)((((int32_t)L_1) == ((int32_t)0))? 1 : 0);
bool L_2 = V_3;
if (L_2)
{
goto IL_003c;
}
}
{
NetIncomingMessage_t2014089816 * L_3 = V_0;
NullCheck(L_3);
int32_t L_4 = NetIncomingMessage_get_MessageType_m1134653489(L_3, /*hidden argument*/NULL);
V_3 = (bool)((((int32_t)((((int32_t)L_4) == ((int32_t)1))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_5 = V_3;
if (L_5)
{
goto IL_003b;
}
}
{
NetIncomingMessage_t2014089816 * L_6 = V_0;
NullCheck(L_6);
uint8_t L_7 = NetBuffer_PeekByte_m934254441(L_6, /*hidden argument*/NULL);
V_1 = L_7;
NetIncomingMessage_t2014089816 * L_8 = V_0;
NullCheck(L_8);
NetConnection_t3331492029 * L_9 = NetIncomingMessage_get_SenderConnection_m102869984(L_8, /*hidden argument*/NULL);
int32_t L_10 = V_1;
NullCheck(L_9);
L_9->set_m_visibleStatus_4(L_10);
}
IL_003b:
{
}
IL_003c:
{
NetIncomingMessage_t2014089816 * L_11 = V_0;
V_2 = L_11;
goto IL_0040;
}
IL_0040:
{
NetIncomingMessage_t2014089816 * L_12 = V_2;
return L_12;
}
}
// System.Void Lidgren.Network.NetPeer::SendLibrary(Lidgren.Network.NetOutgoingMessage,System.Net.IPEndPoint)
extern "C" void NetPeer_SendLibrary_m4133093622 (NetPeer_t1779390221 * __this, NetOutgoingMessage_t2016542980 * ___msg0, IPEndPoint_t2615413766 * ___recipient1, const MethodInfo* method)
{
bool V_0 = false;
int32_t V_1 = 0;
{
NetPeer_VerifyNetworkThread_m4075953563(__this, /*hidden argument*/NULL);
NetOutgoingMessage_t2016542980 * L_0 = ___msg0;
NullCheck(L_0);
bool L_1 = L_0->get_m_isSent_6();
NetException_Assert_m1426298558(NULL /*static, unused*/, (bool)((((int32_t)L_1) == ((int32_t)0))? 1 : 0), /*hidden argument*/NULL);
NetOutgoingMessage_t2016542980 * L_2 = ___msg0;
ByteU5BU5D_t3397334013* L_3 = __this->get_m_sendBuffer_11();
NullCheck(L_2);
int32_t L_4 = NetOutgoingMessage_Encode_m2473987076(L_2, L_3, 0, 0, /*hidden argument*/NULL);
V_1 = L_4;
int32_t L_5 = V_1;
IPEndPoint_t2615413766 * L_6 = ___recipient1;
NetPeer_SendPacket_m625616909(__this, L_5, L_6, 1, (&V_0), /*hidden argument*/NULL);
NetOutgoingMessage_t2016542980 * L_7 = ___msg0;
NullCheck(L_7);
L_7->set_m_recyclingCount_7(0);
NetOutgoingMessage_t2016542980 * L_8 = ___msg0;
NetPeer_Recycle_m2290156780(__this, L_8, /*hidden argument*/NULL);
return;
}
}
// System.Net.IPEndPoint Lidgren.Network.NetPeer::GetNetEndPoint(System.String,System.Int32)
extern Il2CppClass* NetUtility_t3562260209_il2cpp_TypeInfo_var;
extern Il2CppClass* NetException_t2452891498_il2cpp_TypeInfo_var;
extern Il2CppClass* IPEndPoint_t2615413766_il2cpp_TypeInfo_var;
extern Il2CppCodeGenString* _stringLiteral805736132;
extern const uint32_t NetPeer_GetNetEndPoint_m1659140620_MetadataUsageId;
extern "C" IPEndPoint_t2615413766 * NetPeer_GetNetEndPoint_m1659140620 (Il2CppObject * __this /* static, unused */, String_t* ___host0, int32_t ___port1, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetPeer_GetNetEndPoint_m1659140620_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
IPAddress_t1399971723 * V_0 = NULL;
IPEndPoint_t2615413766 * V_1 = NULL;
bool V_2 = false;
{
String_t* L_0 = ___host0;
IL2CPP_RUNTIME_CLASS_INIT(NetUtility_t3562260209_il2cpp_TypeInfo_var);
IPAddress_t1399971723 * L_1 = NetUtility_Resolve_m1627662274(NULL /*static, unused*/, L_0, /*hidden argument*/NULL);
V_0 = L_1;
IPAddress_t1399971723 * L_2 = V_0;
V_2 = (bool)((((int32_t)((((Il2CppObject*)(IPAddress_t1399971723 *)L_2) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_3 = V_2;
if (L_3)
{
goto IL_001e;
}
}
{
NetException_t2452891498 * L_4 = (NetException_t2452891498 *)il2cpp_codegen_object_new(NetException_t2452891498_il2cpp_TypeInfo_var);
NetException__ctor_m2724322251(L_4, _stringLiteral805736132, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_4);
}
IL_001e:
{
IPAddress_t1399971723 * L_5 = V_0;
int32_t L_6 = ___port1;
IPEndPoint_t2615413766 * L_7 = (IPEndPoint_t2615413766 *)il2cpp_codegen_object_new(IPEndPoint_t2615413766_il2cpp_TypeInfo_var);
IPEndPoint__ctor_m3477723888(L_7, L_5, L_6, /*hidden argument*/NULL);
V_1 = L_7;
goto IL_0028;
}
IL_0028:
{
IPEndPoint_t2615413766 * L_8 = V_1;
return L_8;
}
}
// Lidgren.Network.NetConnection Lidgren.Network.NetPeer::Connect(System.String,System.Int32)
extern "C" NetConnection_t3331492029 * NetPeer_Connect_m1304614920 (NetPeer_t1779390221 * __this, String_t* ___host0, int32_t ___port1, const MethodInfo* method)
{
NetConnection_t3331492029 * V_0 = NULL;
{
String_t* L_0 = ___host0;
int32_t L_1 = ___port1;
IPEndPoint_t2615413766 * L_2 = NetPeer_GetNetEndPoint_m1659140620(NULL /*static, unused*/, L_0, L_1, /*hidden argument*/NULL);
NetConnection_t3331492029 * L_3 = VirtFuncInvoker2< NetConnection_t3331492029 *, IPEndPoint_t2615413766 *, NetOutgoingMessage_t2016542980 * >::Invoke(4 /* Lidgren.Network.NetConnection Lidgren.Network.NetPeer::Connect(System.Net.IPEndPoint,Lidgren.Network.NetOutgoingMessage) */, __this, L_2, (NetOutgoingMessage_t2016542980 *)NULL);
V_0 = L_3;
goto IL_0012;
}
IL_0012:
{
NetConnection_t3331492029 * L_4 = V_0;
return L_4;
}
}
// Lidgren.Network.NetConnection Lidgren.Network.NetPeer::Connect(System.Net.IPEndPoint,Lidgren.Network.NetOutgoingMessage)
extern Il2CppClass* ArgumentNullException_t628810857_il2cpp_TypeInfo_var;
extern Il2CppClass* NetException_t2452891498_il2cpp_TypeInfo_var;
extern Il2CppClass* NetTime_t3056501352_il2cpp_TypeInfo_var;
extern Il2CppClass* NetConnectionStatus_t952199027_il2cpp_TypeInfo_var;
extern Il2CppClass* String_t_il2cpp_TypeInfo_var;
extern Il2CppClass* NetConnection_t3331492029_il2cpp_TypeInfo_var;
extern const MethodInfo* Dictionary_2_ContainsKey_m2053216074_MethodInfo_var;
extern const MethodInfo* Dictionary_2_TryGetValue_m2698685646_MethodInfo_var;
extern const MethodInfo* Dictionary_2_Add_m462421331_MethodInfo_var;
extern Il2CppCodeGenString* _stringLiteral599359995;
extern Il2CppCodeGenString* _stringLiteral369833300;
extern Il2CppCodeGenString* _stringLiteral3332880525;
extern Il2CppCodeGenString* _stringLiteral4036189522;
extern const uint32_t NetPeer_Connect_m539482134_MetadataUsageId;
extern "C" NetConnection_t3331492029 * NetPeer_Connect_m539482134 (NetPeer_t1779390221 * __this, IPEndPoint_t2615413766 * ___remoteEndPoint0, NetOutgoingMessage_t2016542980 * ___hailMessage1, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetPeer_Connect_m539482134_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
NetConnection_t3331492029 * V_0 = NULL;
NetConnection_t3331492029 * V_1 = NULL;
NetConnection_t3331492029 * V_2 = NULL;
bool V_3 = false;
List_1_t2700613161 * V_4 = NULL;
int32_t V_5 = 0;
Exception_t1927440687 * __last_unhandled_exception = 0;
NO_UNUSED_WARNING (__last_unhandled_exception);
Exception_t1927440687 * __exception_local = 0;
NO_UNUSED_WARNING (__exception_local);
int32_t __leave_target = 0;
NO_UNUSED_WARNING (__leave_target);
{
IPEndPoint_t2615413766 * L_0 = ___remoteEndPoint0;
V_3 = (bool)((((int32_t)((((Il2CppObject*)(IPEndPoint_t2615413766 *)L_0) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_1 = V_3;
if (L_1)
{
goto IL_0017;
}
}
{
ArgumentNullException_t628810857 * L_2 = (ArgumentNullException_t628810857 *)il2cpp_codegen_object_new(ArgumentNullException_t628810857_il2cpp_TypeInfo_var);
ArgumentNullException__ctor_m3380712306(L_2, _stringLiteral599359995, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_2);
}
IL_0017:
{
List_1_t2700613161 * L_3 = __this->get_m_connections_3();
List_1_t2700613161 * L_4 = L_3;
V_4 = L_4;
Monitor_Enter_m2136705809(NULL /*static, unused*/, L_4, /*hidden argument*/NULL);
}
IL_0026:
try
{ // begin try (depth: 1)
{
int32_t L_5 = __this->get_m_status_8();
V_3 = (bool)((((int32_t)((((int32_t)L_5) == ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_6 = V_3;
if (L_6)
{
goto IL_0042;
}
}
IL_0037:
{
NetException_t2452891498 * L_7 = (NetException_t2452891498 *)il2cpp_codegen_object_new(NetException_t2452891498_il2cpp_TypeInfo_var);
NetException__ctor_m2724322251(L_7, _stringLiteral369833300, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_7);
}
IL_0042:
{
Dictionary_2_t3898409514 * L_8 = __this->get_m_connectionLookup_4();
IPEndPoint_t2615413766 * L_9 = ___remoteEndPoint0;
NullCheck(L_8);
bool L_10 = Dictionary_2_ContainsKey_m2053216074(L_8, L_9, /*hidden argument*/Dictionary_2_ContainsKey_m2053216074_MethodInfo_var);
V_3 = (bool)((((int32_t)L_10) == ((int32_t)0))? 1 : 0);
bool L_11 = V_3;
if (L_11)
{
goto IL_0060;
}
}
IL_0055:
{
NetException_t2452891498 * L_12 = (NetException_t2452891498 *)il2cpp_codegen_object_new(NetException_t2452891498_il2cpp_TypeInfo_var);
NetException__ctor_m2724322251(L_12, _stringLiteral3332880525, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_12);
}
IL_0060:
{
Dictionary_2_t3898409514 * L_13 = __this->get_m_handshakes_24();
IPEndPoint_t2615413766 * L_14 = ___remoteEndPoint0;
NullCheck(L_13);
bool L_15 = Dictionary_2_TryGetValue_m2698685646(L_13, L_14, (&V_0), /*hidden argument*/Dictionary_2_TryGetValue_m2698685646_MethodInfo_var);
V_3 = (bool)((((int32_t)L_15) == ((int32_t)0))? 1 : 0);
bool L_16 = V_3;
if (L_16)
{
goto IL_00c4;
}
}
IL_0075:
{
NetConnection_t3331492029 * L_17 = V_0;
NullCheck(L_17);
int32_t L_18 = L_17->get_m_status_2();
V_5 = L_18;
int32_t L_19 = V_5;
if ((((int32_t)L_19) == ((int32_t)1)))
{
goto IL_008a;
}
}
IL_0083:
{
int32_t L_20 = V_5;
if ((((int32_t)L_20) == ((int32_t)4)))
{
goto IL_0093;
}
}
IL_0088:
{
goto IL_00a2;
}
IL_008a:
{
NetConnection_t3331492029 * L_21 = V_0;
NullCheck(L_21);
L_21->set_m_connectRequested_15((bool)1);
goto IL_00c0;
}
IL_0093:
{
NetConnection_t3331492029 * L_22 = V_0;
IL2CPP_RUNTIME_CLASS_INIT(NetTime_t3056501352_il2cpp_TypeInfo_var);
double L_23 = NetTime_get_Now_m1609702533(NULL /*static, unused*/, /*hidden argument*/NULL);
NullCheck(L_22);
NetConnection_SendConnectResponse_m1494124902(L_22, L_23, (bool)0, /*hidden argument*/NULL);
goto IL_00c0;
}
IL_00a2:
{
NetConnection_t3331492029 * L_24 = V_0;
NullCheck(L_24);
int32_t L_25 = L_24->get_m_status_2();
int32_t L_26 = L_25;
Il2CppObject * L_27 = Box(NetConnectionStatus_t952199027_il2cpp_TypeInfo_var, &L_26);
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_28 = String_Concat_m56707527(NULL /*static, unused*/, _stringLiteral4036189522, L_27, /*hidden argument*/NULL);
NetPeer_LogWarning_m3266657906(__this, L_28, /*hidden argument*/NULL);
goto IL_00c0;
}
IL_00c0:
{
NetConnection_t3331492029 * L_29 = V_0;
V_2 = L_29;
IL2CPP_LEAVE(0x103, FINALLY_00fa);
}
IL_00c4:
{
IPEndPoint_t2615413766 * L_30 = ___remoteEndPoint0;
NetConnection_t3331492029 * L_31 = (NetConnection_t3331492029 *)il2cpp_codegen_object_new(NetConnection_t3331492029_il2cpp_TypeInfo_var);
NetConnection__ctor_m695103806(L_31, __this, L_30, /*hidden argument*/NULL);
V_1 = L_31;
NetConnection_t3331492029 * L_32 = V_1;
NullCheck(L_32);
L_32->set_m_status_2(1);
NetConnection_t3331492029 * L_33 = V_1;
NetOutgoingMessage_t2016542980 * L_34 = ___hailMessage1;
NullCheck(L_33);
L_33->set_m_localHailMessage_8(L_34);
NetConnection_t3331492029 * L_35 = V_1;
NullCheck(L_35);
L_35->set_m_connectRequested_15((bool)1);
NetConnection_t3331492029 * L_36 = V_1;
NullCheck(L_36);
L_36->set_m_connectionInitiator_19((bool)1);
Dictionary_2_t3898409514 * L_37 = __this->get_m_handshakes_24();
IPEndPoint_t2615413766 * L_38 = ___remoteEndPoint0;
NetConnection_t3331492029 * L_39 = V_1;
NullCheck(L_37);
Dictionary_2_Add_m462421331(L_37, L_38, L_39, /*hidden argument*/Dictionary_2_Add_m462421331_MethodInfo_var);
NetConnection_t3331492029 * L_40 = V_1;
V_2 = L_40;
IL2CPP_LEAVE(0x103, FINALLY_00fa);
}
} // end try (depth: 1)
catch(Il2CppExceptionWrapper& e)
{
__last_unhandled_exception = (Exception_t1927440687 *)e.ex;
goto FINALLY_00fa;
}
FINALLY_00fa:
{ // begin finally (depth: 1)
List_1_t2700613161 * L_41 = V_4;
Monitor_Exit_m2677760297(NULL /*static, unused*/, L_41, /*hidden argument*/NULL);
IL2CPP_END_FINALLY(250)
} // end finally (depth: 1)
IL2CPP_CLEANUP(250)
{
IL2CPP_JUMP_TBL(0x103, IL_0103)
IL2CPP_RETHROW_IF_UNHANDLED(Exception_t1927440687 *)
}
IL_0103:
{
NetConnection_t3331492029 * L_42 = V_2;
return L_42;
}
}
// System.Void Lidgren.Network.NetPeer::RawSend(System.Byte[],System.Int32,System.Int32,System.Net.IPEndPoint)
extern "C" void NetPeer_RawSend_m737396087 (NetPeer_t1779390221 * __this, ByteU5BU5D_t3397334013* ___arr0, int32_t ___offset1, int32_t ___length2, IPEndPoint_t2615413766 * ___destination3, const MethodInfo* method)
{
bool V_0 = false;
{
ByteU5BU5D_t3397334013* L_0 = ___arr0;
int32_t L_1 = ___offset1;
ByteU5BU5D_t3397334013* L_2 = __this->get_m_sendBuffer_11();
int32_t L_3 = ___length2;
Array_Copy_m3808317496(NULL /*static, unused*/, (Il2CppArray *)(Il2CppArray *)L_0, L_1, (Il2CppArray *)(Il2CppArray *)L_2, 0, L_3, /*hidden argument*/NULL);
int32_t L_4 = ___length2;
IPEndPoint_t2615413766 * L_5 = ___destination3;
NetPeer_SendPacket_m625616909(__this, L_4, L_5, 1, (&V_0), /*hidden argument*/NULL);
return;
}
}
// System.Void Lidgren.Network.NetPeer::ThrowOrLog(System.String)
extern Il2CppClass* NetException_t2452891498_il2cpp_TypeInfo_var;
extern const uint32_t NetPeer_ThrowOrLog_m2301784333_MetadataUsageId;
extern "C" void NetPeer_ThrowOrLog_m2301784333 (NetPeer_t1779390221 * __this, String_t* ___message0, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetPeer_ThrowOrLog_m2301784333_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
{
String_t* L_0 = ___message0;
NetException_t2452891498 * L_1 = (NetException_t2452891498 *)il2cpp_codegen_object_new(NetException_t2452891498_il2cpp_TypeInfo_var);
NetException__ctor_m2724322251(L_1, L_0, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_1);
}
}
// Lidgren.Network.NetSendResult Lidgren.Network.NetPeer::SendFragmentedMessage(Lidgren.Network.NetOutgoingMessage,System.Collections.Generic.IList`1<Lidgren.Network.NetConnection>,Lidgren.Network.NetDeliveryMethod,System.Int32)
extern Il2CppClass* ICollection_1_t4283567334_il2cpp_TypeInfo_var;
extern Il2CppClass* IEnumerable_1_t3623619074_il2cpp_TypeInfo_var;
extern Il2CppClass* IEnumerator_1_t807015856_il2cpp_TypeInfo_var;
extern Il2CppClass* IEnumerator_t1466026749_il2cpp_TypeInfo_var;
extern Il2CppClass* IDisposable_t2427283555_il2cpp_TypeInfo_var;
extern const uint32_t NetPeer_SendFragmentedMessage_m1345482430_MetadataUsageId;
extern "C" int32_t NetPeer_SendFragmentedMessage_m1345482430 (NetPeer_t1779390221 * __this, NetOutgoingMessage_t2016542980 * ___msg0, Il2CppObject* ___recipients1, uint8_t ___method2, int32_t ___sequenceChannel3, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetPeer_SendFragmentedMessage_m1345482430_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
int32_t V_0 = 0;
int32_t V_1 = 0;
int32_t V_2 = 0;
int32_t V_3 = 0;
int32_t V_4 = 0;
int32_t V_5 = 0;
int32_t V_6 = 0;
int32_t V_7 = 0;
int32_t V_8 = 0;
NetOutgoingMessage_t2016542980 * V_9 = NULL;
NetConnection_t3331492029 * V_10 = NULL;
int32_t V_11 = 0;
int32_t V_12 = 0;
bool V_13 = false;
Il2CppObject* V_14 = NULL;
Exception_t1927440687 * __last_unhandled_exception = 0;
NO_UNUSED_WARNING (__last_unhandled_exception);
Exception_t1927440687 * __exception_local = 0;
NO_UNUSED_WARNING (__exception_local);
int32_t __leave_target = 0;
NO_UNUSED_WARNING (__leave_target);
NetOutgoingMessage_t2016542980 * G_B7_0 = NULL;
NetOutgoingMessage_t2016542980 * G_B6_0 = NULL;
int32_t G_B8_0 = 0;
NetOutgoingMessage_t2016542980 * G_B8_1 = NULL;
{
int32_t* L_0 = __this->get_address_of_m_lastUsedFragmentGroup_6();
int32_t L_1 = Interlocked_Increment_m129308425(NULL /*static, unused*/, L_0, /*hidden argument*/NULL);
V_0 = L_1;
int32_t L_2 = V_0;
V_13 = (bool)((((int32_t)L_2) < ((int32_t)((int32_t)65534)))? 1 : 0);
bool L_3 = V_13;
if (L_3)
{
goto IL_0026;
}
}
{
__this->set_m_lastUsedFragmentGroup_6(1);
V_0 = 1;
}
IL_0026:
{
NetOutgoingMessage_t2016542980 * L_4 = ___msg0;
int32_t L_5 = V_0;
NullCheck(L_4);
L_4->set_m_fragmentGroup_8(L_5);
NetOutgoingMessage_t2016542980 * L_6 = ___msg0;
NullCheck(L_6);
int32_t L_7 = NetBuffer_get_LengthBytes_m2765088638(L_6, /*hidden argument*/NULL);
V_1 = L_7;
Il2CppObject* L_8 = ___recipients1;
int32_t L_9 = NetPeer_GetMTU_m2569335695(NULL /*static, unused*/, L_8, /*hidden argument*/NULL);
V_2 = L_9;
int32_t L_10 = V_0;
int32_t L_11 = V_1;
int32_t L_12 = V_2;
int32_t L_13 = NetFragmentationHelper_GetBestChunkSize_m1359511180(NULL /*static, unused*/, L_10, L_11, L_12, /*hidden argument*/NULL);
V_3 = L_13;
int32_t L_14 = V_1;
int32_t L_15 = V_3;
V_4 = ((int32_t)((int32_t)L_14/(int32_t)L_15));
int32_t L_16 = V_4;
int32_t L_17 = V_3;
int32_t L_18 = V_1;
V_13 = (bool)((((int32_t)((((int32_t)((int32_t)((int32_t)L_16*(int32_t)L_17))) < ((int32_t)L_18))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_19 = V_13;
if (L_19)
{
goto IL_005f;
}
}
{
int32_t L_20 = V_4;
V_4 = ((int32_t)((int32_t)L_20+(int32_t)1));
}
IL_005f:
{
V_5 = 1;
int32_t L_21 = V_3;
V_6 = ((int32_t)((int32_t)L_21*(int32_t)8));
NetOutgoingMessage_t2016542980 * L_22 = ___msg0;
NullCheck(L_22);
int32_t L_23 = NetBuffer_get_LengthBits_m2426148225(L_22, /*hidden argument*/NULL);
V_7 = L_23;
V_8 = 0;
goto IL_017f;
}
IL_0077:
{
NetOutgoingMessage_t2016542980 * L_24 = NetPeer_CreateMessage_m3328975762(__this, 0, /*hidden argument*/NULL);
V_9 = L_24;
NetOutgoingMessage_t2016542980 * L_25 = V_9;
int32_t L_26 = V_7;
int32_t L_27 = V_6;
G_B6_0 = L_25;
if ((((int32_t)L_26) > ((int32_t)L_27)))
{
G_B7_0 = L_25;
goto IL_008d;
}
}
{
int32_t L_28 = V_7;
G_B8_0 = L_28;
G_B8_1 = G_B6_0;
goto IL_008f;
}
IL_008d:
{
int32_t L_29 = V_6;
G_B8_0 = L_29;
G_B8_1 = G_B7_0;
}
IL_008f:
{
NullCheck(G_B8_1);
((NetBuffer_t3608062491 *)G_B8_1)->set_m_bitLength_3(G_B8_0);
NetOutgoingMessage_t2016542980 * L_30 = V_9;
NetOutgoingMessage_t2016542980 * L_31 = ___msg0;
NullCheck(L_31);
ByteU5BU5D_t3397334013* L_32 = ((NetBuffer_t3608062491 *)L_31)->get_m_data_2();
NullCheck(L_30);
((NetBuffer_t3608062491 *)L_30)->set_m_data_2(L_32);
NetOutgoingMessage_t2016542980 * L_33 = V_9;
int32_t L_34 = V_0;
NullCheck(L_33);
L_33->set_m_fragmentGroup_8(L_34);
NetOutgoingMessage_t2016542980 * L_35 = V_9;
int32_t L_36 = V_1;
NullCheck(L_35);
L_35->set_m_fragmentGroupTotalBits_9(((int32_t)((int32_t)L_36*(int32_t)8)));
NetOutgoingMessage_t2016542980 * L_37 = V_9;
int32_t L_38 = V_3;
NullCheck(L_37);
L_37->set_m_fragmentChunkByteSize_10(L_38);
NetOutgoingMessage_t2016542980 * L_39 = V_9;
int32_t L_40 = V_8;
NullCheck(L_39);
L_39->set_m_fragmentChunkNumber_11(L_40);
NetOutgoingMessage_t2016542980 * L_41 = V_9;
NullCheck(L_41);
int32_t L_42 = ((NetBuffer_t3608062491 *)L_41)->get_m_bitLength_3();
NetException_Assert_m1426298558(NULL /*static, unused*/, (bool)((((int32_t)((((int32_t)L_42) == ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0), /*hidden argument*/NULL);
NetOutgoingMessage_t2016542980 * L_43 = V_9;
NullCheck(L_43);
int32_t L_44 = NetOutgoingMessage_GetEncodedSize_m3842097810(L_43, /*hidden argument*/NULL);
int32_t L_45 = V_2;
NetException_Assert_m1426298558(NULL /*static, unused*/, (bool)((((int32_t)L_44) < ((int32_t)L_45))? 1 : 0), /*hidden argument*/NULL);
NetOutgoingMessage_t2016542980 * L_46 = V_9;
NullCheck(L_46);
int32_t* L_47 = L_46->get_address_of_m_recyclingCount_7();
Il2CppObject* L_48 = ___recipients1;
NullCheck(L_48);
int32_t L_49 = InterfaceFuncInvoker0< int32_t >::Invoke(0 /* System.Int32 System.Collections.Generic.ICollection`1<Lidgren.Network.NetConnection>::get_Count() */, ICollection_1_t4283567334_il2cpp_TypeInfo_var, L_48);
Interlocked_Add_m2992456762(NULL /*static, unused*/, L_47, L_49, /*hidden argument*/NULL);
Il2CppObject* L_50 = ___recipients1;
NullCheck(L_50);
Il2CppObject* L_51 = InterfaceFuncInvoker0< Il2CppObject* >::Invoke(0 /* System.Collections.Generic.IEnumerator`1<!0> System.Collections.Generic.IEnumerable`1<Lidgren.Network.NetConnection>::GetEnumerator() */, IEnumerable_1_t3623619074_il2cpp_TypeInfo_var, L_50);
V_14 = L_51;
}
IL_0104:
try
{ // begin try (depth: 1)
{
goto IL_014d;
}
IL_0106:
{
Il2CppObject* L_52 = V_14;
NullCheck(L_52);
NetConnection_t3331492029 * L_53 = InterfaceFuncInvoker0< NetConnection_t3331492029 * >::Invoke(0 /* !0 System.Collections.Generic.IEnumerator`1<Lidgren.Network.NetConnection>::get_Current() */, IEnumerator_1_t807015856_il2cpp_TypeInfo_var, L_52);
V_10 = L_53;
NetConnection_t3331492029 * L_54 = V_10;
NetOutgoingMessage_t2016542980 * L_55 = V_9;
uint8_t L_56 = ___method2;
int32_t L_57 = ___sequenceChannel3;
NullCheck(L_54);
int32_t L_58 = NetConnection_EnqueueMessage_m3897273412(L_54, L_55, L_56, L_57, /*hidden argument*/NULL);
V_11 = L_58;
int32_t L_59 = V_11;
V_13 = (bool)((((int32_t)((((int32_t)L_59) == ((int32_t)3))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_60 = V_13;
if (L_60)
{
goto IL_0139;
}
}
IL_012c:
{
NetOutgoingMessage_t2016542980 * L_61 = V_9;
NullCheck(L_61);
int32_t* L_62 = L_61->get_address_of_m_recyclingCount_7();
Interlocked_Decrement_m70525859(NULL /*static, unused*/, L_62, /*hidden argument*/NULL);
}
IL_0139:
{
int32_t L_63 = V_11;
int32_t L_64 = V_5;
V_13 = (bool)((((int32_t)((((int32_t)L_63) > ((int32_t)L_64))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_65 = V_13;
if (L_65)
{
goto IL_014c;
}
}
IL_0148:
{
int32_t L_66 = V_11;
V_5 = L_66;
}
IL_014c:
{
}
IL_014d:
{
Il2CppObject* L_67 = V_14;
NullCheck(L_67);
bool L_68 = InterfaceFuncInvoker0< bool >::Invoke(1 /* System.Boolean System.Collections.IEnumerator::MoveNext() */, IEnumerator_t1466026749_il2cpp_TypeInfo_var, L_67);
V_13 = L_68;
bool L_69 = V_13;
if (L_69)
{
goto IL_0106;
}
}
IL_015a:
{
IL2CPP_LEAVE(0x170, FINALLY_015c);
}
} // end try (depth: 1)
catch(Il2CppExceptionWrapper& e)
{
__last_unhandled_exception = (Exception_t1927440687 *)e.ex;
goto FINALLY_015c;
}
FINALLY_015c:
{ // begin finally (depth: 1)
{
Il2CppObject* L_70 = V_14;
V_13 = (bool)((((Il2CppObject*)(Il2CppObject*)L_70) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0);
bool L_71 = V_13;
if (L_71)
{
goto IL_016f;
}
}
IL_0167:
{
Il2CppObject* L_72 = V_14;
NullCheck(L_72);
InterfaceActionInvoker0::Invoke(0 /* System.Void System.IDisposable::Dispose() */, IDisposable_t2427283555_il2cpp_TypeInfo_var, L_72);
}
IL_016f:
{
IL2CPP_END_FINALLY(348)
}
} // end finally (depth: 1)
IL2CPP_CLEANUP(348)
{
IL2CPP_JUMP_TBL(0x170, IL_0170)
IL2CPP_RETHROW_IF_UNHANDLED(Exception_t1927440687 *)
}
IL_0170:
{
int32_t L_73 = V_7;
int32_t L_74 = V_6;
V_7 = ((int32_t)((int32_t)L_73-(int32_t)L_74));
int32_t L_75 = V_8;
V_8 = ((int32_t)((int32_t)L_75+(int32_t)1));
}
IL_017f:
{
int32_t L_76 = V_8;
int32_t L_77 = V_4;
V_13 = (bool)((((int32_t)L_76) < ((int32_t)L_77))? 1 : 0);
bool L_78 = V_13;
if (L_78)
{
goto IL_0077;
}
}
{
int32_t L_79 = V_5;
V_12 = L_79;
goto IL_0194;
}
IL_0194:
{
int32_t L_80 = V_12;
return L_80;
}
}
// System.Void Lidgren.Network.NetPeer::HandleReleasedFragment(Lidgren.Network.NetIncomingMessage)
extern Il2CppClass* NetUtility_t3562260209_il2cpp_TypeInfo_var;
extern Il2CppClass* ObjectU5BU5D_t3614634134_il2cpp_TypeInfo_var;
extern Il2CppClass* Int32_t2071877448_il2cpp_TypeInfo_var;
extern Il2CppClass* String_t_il2cpp_TypeInfo_var;
extern Il2CppClass* Dictionary_2_t3116406337_il2cpp_TypeInfo_var;
extern Il2CppClass* ReceivedFragmentGroup_t4108580702_il2cpp_TypeInfo_var;
extern Il2CppClass* ByteU5BU5D_t3397334013_il2cpp_TypeInfo_var;
extern Il2CppClass* NetBitVector_t1774780753_il2cpp_TypeInfo_var;
extern const MethodInfo* Dictionary_2_TryGetValue_m1324564509_MethodInfo_var;
extern const MethodInfo* Dictionary_2__ctor_m752686887_MethodInfo_var;
extern const MethodInfo* Dictionary_2_set_Item_m3704576329_MethodInfo_var;
extern const MethodInfo* Dictionary_2_TryGetValue_m855411342_MethodInfo_var;
extern const MethodInfo* Dictionary_2_set_Item_m2302260864_MethodInfo_var;
extern const MethodInfo* Dictionary_2_Remove_m1546056622_MethodInfo_var;
extern Il2CppCodeGenString* _stringLiteral4240255234;
extern Il2CppCodeGenString* _stringLiteral3074570466;
extern Il2CppCodeGenString* _stringLiteral372029317;
extern Il2CppCodeGenString* _stringLiteral2270452699;
extern Il2CppCodeGenString* _stringLiteral728633301;
extern Il2CppCodeGenString* _stringLiteral455075110;
extern Il2CppCodeGenString* _stringLiteral3852101942;
extern Il2CppCodeGenString* _stringLiteral399521832;
extern Il2CppCodeGenString* _stringLiteral2353303200;
extern Il2CppCodeGenString* _stringLiteral321480496;
extern Il2CppCodeGenString* _stringLiteral2676434177;
extern const uint32_t NetPeer_HandleReleasedFragment_m1676538552_MetadataUsageId;
extern "C" void NetPeer_HandleReleasedFragment_m1676538552 (NetPeer_t1779390221 * __this, NetIncomingMessage_t2014089816 * ___im0, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetPeer_HandleReleasedFragment_m1676538552_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
int32_t V_0 = 0;
int32_t V_1 = 0;
int32_t V_2 = 0;
int32_t V_3 = 0;
int32_t V_4 = 0;
int32_t V_5 = 0;
int32_t V_6 = 0;
Dictionary_2_t3116406337 * V_7 = NULL;
ReceivedFragmentGroup_t4108580702 * V_8 = NULL;
int32_t V_9 = 0;
int32_t V_10 = 0;
bool V_11 = false;
ObjectU5BU5D_t3614634134* V_12 = NULL;
{
NetPeer_VerifyNetworkThread_m4075953563(__this, /*hidden argument*/NULL);
NetIncomingMessage_t2014089816 * L_0 = ___im0;
NullCheck(L_0);
ByteU5BU5D_t3397334013* L_1 = ((NetBuffer_t3608062491 *)L_0)->get_m_data_2();
int32_t L_2 = NetFragmentationHelper_ReadHeader_m1346941602(NULL /*static, unused*/, L_1, 0, (&V_0), (&V_1), (&V_2), (&V_3), /*hidden argument*/NULL);
V_4 = L_2;
NetIncomingMessage_t2014089816 * L_3 = ___im0;
NullCheck(L_3);
int32_t L_4 = NetBuffer_get_LengthBytes_m2765088638(L_3, /*hidden argument*/NULL);
int32_t L_5 = V_4;
NetException_Assert_m1426298558(NULL /*static, unused*/, (bool)((((int32_t)L_4) > ((int32_t)L_5))? 1 : 0), /*hidden argument*/NULL);
int32_t L_6 = V_0;
NetException_Assert_m1426298558(NULL /*static, unused*/, (bool)((((int32_t)L_6) > ((int32_t)0))? 1 : 0), /*hidden argument*/NULL);
int32_t L_7 = V_1;
NetException_Assert_m1426298558(NULL /*static, unused*/, (bool)((((int32_t)L_7) > ((int32_t)0))? 1 : 0), /*hidden argument*/NULL);
int32_t L_8 = V_2;
NetException_Assert_m1426298558(NULL /*static, unused*/, (bool)((((int32_t)L_8) > ((int32_t)0))? 1 : 0), /*hidden argument*/NULL);
int32_t L_9 = V_1;
IL2CPP_RUNTIME_CLASS_INIT(NetUtility_t3562260209_il2cpp_TypeInfo_var);
int32_t L_10 = NetUtility_BytesToHoldBits_m1372162852(NULL /*static, unused*/, L_9, /*hidden argument*/NULL);
V_5 = L_10;
int32_t L_11 = V_5;
int32_t L_12 = V_2;
V_6 = ((int32_t)((int32_t)L_11/(int32_t)L_12));
int32_t L_13 = V_6;
int32_t L_14 = V_2;
int32_t L_15 = V_5;
V_11 = (bool)((((int32_t)((((int32_t)((int32_t)((int32_t)L_13*(int32_t)L_14))) < ((int32_t)L_15))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_16 = V_11;
if (L_16)
{
goto IL_0071;
}
}
{
int32_t L_17 = V_6;
V_6 = ((int32_t)((int32_t)L_17+(int32_t)1));
}
IL_0071:
{
int32_t L_18 = V_3;
int32_t L_19 = V_6;
NetException_Assert_m1426298558(NULL /*static, unused*/, (bool)((((int32_t)L_18) < ((int32_t)L_19))? 1 : 0), /*hidden argument*/NULL);
int32_t L_20 = V_3;
int32_t L_21 = V_6;
V_11 = (bool)((((int32_t)L_20) < ((int32_t)L_21))? 1 : 0);
bool L_22 = V_11;
if (L_22)
{
goto IL_00d3;
}
}
{
V_12 = ((ObjectU5BU5D_t3614634134*)SZArrayNew(ObjectU5BU5D_t3614634134_il2cpp_TypeInfo_var, (uint32_t)5));
ObjectU5BU5D_t3614634134* L_23 = V_12;
NullCheck(L_23);
IL2CPP_ARRAY_BOUNDS_CHECK(L_23, 0);
ArrayElementTypeCheck (L_23, _stringLiteral4240255234);
(L_23)->SetAt(static_cast<il2cpp_array_size_t>(0), (Il2CppObject *)_stringLiteral4240255234);
ObjectU5BU5D_t3614634134* L_24 = V_12;
int32_t L_25 = V_3;
int32_t L_26 = L_25;
Il2CppObject * L_27 = Box(Int32_t2071877448_il2cpp_TypeInfo_var, &L_26);
NullCheck(L_24);
IL2CPP_ARRAY_BOUNDS_CHECK(L_24, 1);
ArrayElementTypeCheck (L_24, L_27);
(L_24)->SetAt(static_cast<il2cpp_array_size_t>(1), (Il2CppObject *)L_27);
ObjectU5BU5D_t3614634134* L_28 = V_12;
NullCheck(L_28);
IL2CPP_ARRAY_BOUNDS_CHECK(L_28, 2);
ArrayElementTypeCheck (L_28, _stringLiteral3074570466);
(L_28)->SetAt(static_cast<il2cpp_array_size_t>(2), (Il2CppObject *)_stringLiteral3074570466);
ObjectU5BU5D_t3614634134* L_29 = V_12;
int32_t L_30 = V_6;
int32_t L_31 = L_30;
Il2CppObject * L_32 = Box(Int32_t2071877448_il2cpp_TypeInfo_var, &L_31);
NullCheck(L_29);
IL2CPP_ARRAY_BOUNDS_CHECK(L_29, 3);
ArrayElementTypeCheck (L_29, L_32);
(L_29)->SetAt(static_cast<il2cpp_array_size_t>(3), (Il2CppObject *)L_32);
ObjectU5BU5D_t3614634134* L_33 = V_12;
NullCheck(L_33);
IL2CPP_ARRAY_BOUNDS_CHECK(L_33, 4);
ArrayElementTypeCheck (L_33, _stringLiteral372029317);
(L_33)->SetAt(static_cast<il2cpp_array_size_t>(4), (Il2CppObject *)_stringLiteral372029317);
ObjectU5BU5D_t3614634134* L_34 = V_12;
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_35 = String_Concat_m3881798623(NULL /*static, unused*/, L_34, /*hidden argument*/NULL);
NetPeer_LogWarning_m3266657906(__this, L_35, /*hidden argument*/NULL);
goto IL_0296;
}
IL_00d3:
{
Dictionary_2_t2557578811 * L_36 = __this->get_m_receivedFragmentGroups_7();
NetIncomingMessage_t2014089816 * L_37 = ___im0;
NullCheck(L_37);
NetConnection_t3331492029 * L_38 = NetIncomingMessage_get_SenderConnection_m102869984(L_37, /*hidden argument*/NULL);
NullCheck(L_36);
bool L_39 = Dictionary_2_TryGetValue_m1324564509(L_36, L_38, (&V_7), /*hidden argument*/Dictionary_2_TryGetValue_m1324564509_MethodInfo_var);
V_11 = L_39;
bool L_40 = V_11;
if (L_40)
{
goto IL_0109;
}
}
{
Dictionary_2_t3116406337 * L_41 = (Dictionary_2_t3116406337 *)il2cpp_codegen_object_new(Dictionary_2_t3116406337_il2cpp_TypeInfo_var);
Dictionary_2__ctor_m752686887(L_41, /*hidden argument*/Dictionary_2__ctor_m752686887_MethodInfo_var);
V_7 = L_41;
Dictionary_2_t2557578811 * L_42 = __this->get_m_receivedFragmentGroups_7();
NetIncomingMessage_t2014089816 * L_43 = ___im0;
NullCheck(L_43);
NetConnection_t3331492029 * L_44 = NetIncomingMessage_get_SenderConnection_m102869984(L_43, /*hidden argument*/NULL);
Dictionary_2_t3116406337 * L_45 = V_7;
NullCheck(L_42);
Dictionary_2_set_Item_m3704576329(L_42, L_44, L_45, /*hidden argument*/Dictionary_2_set_Item_m3704576329_MethodInfo_var);
}
IL_0109:
{
Dictionary_2_t3116406337 * L_46 = V_7;
int32_t L_47 = V_0;
NullCheck(L_46);
bool L_48 = Dictionary_2_TryGetValue_m855411342(L_46, L_47, (&V_8), /*hidden argument*/Dictionary_2_TryGetValue_m855411342_MethodInfo_var);
V_11 = L_48;
bool L_49 = V_11;
if (L_49)
{
goto IL_0149;
}
}
{
ReceivedFragmentGroup_t4108580702 * L_50 = (ReceivedFragmentGroup_t4108580702 *)il2cpp_codegen_object_new(ReceivedFragmentGroup_t4108580702_il2cpp_TypeInfo_var);
ReceivedFragmentGroup__ctor_m4190711617(L_50, /*hidden argument*/NULL);
V_8 = L_50;
ReceivedFragmentGroup_t4108580702 * L_51 = V_8;
int32_t L_52 = V_5;
NullCheck(L_51);
L_51->set_Data_0(((ByteU5BU5D_t3397334013*)SZArrayNew(ByteU5BU5D_t3397334013_il2cpp_TypeInfo_var, (uint32_t)L_52)));
ReceivedFragmentGroup_t4108580702 * L_53 = V_8;
int32_t L_54 = V_6;
NetBitVector_t1774780753 * L_55 = (NetBitVector_t1774780753 *)il2cpp_codegen_object_new(NetBitVector_t1774780753_il2cpp_TypeInfo_var);
NetBitVector__ctor_m1517128273(L_55, L_54, /*hidden argument*/NULL);
NullCheck(L_53);
L_53->set_ReceivedChunks_1(L_55);
Dictionary_2_t3116406337 * L_56 = V_7;
int32_t L_57 = V_0;
ReceivedFragmentGroup_t4108580702 * L_58 = V_8;
NullCheck(L_56);
Dictionary_2_set_Item_m2302260864(L_56, L_57, L_58, /*hidden argument*/Dictionary_2_set_Item_m2302260864_MethodInfo_var);
}
IL_0149:
{
ReceivedFragmentGroup_t4108580702 * L_59 = V_8;
NullCheck(L_59);
NetBitVector_t1774780753 * L_60 = L_59->get_ReceivedChunks_1();
int32_t L_61 = V_3;
NullCheck(L_60);
NetBitVector_set_Bit_m3149930918(L_60, L_61, (bool)1, /*hidden argument*/NULL);
int32_t L_62 = V_3;
int32_t L_63 = V_2;
V_9 = ((int32_t)((int32_t)L_62*(int32_t)L_63));
NetIncomingMessage_t2014089816 * L_64 = ___im0;
NullCheck(L_64);
ByteU5BU5D_t3397334013* L_65 = ((NetBuffer_t3608062491 *)L_64)->get_m_data_2();
int32_t L_66 = V_4;
ReceivedFragmentGroup_t4108580702 * L_67 = V_8;
NullCheck(L_67);
ByteU5BU5D_t3397334013* L_68 = L_67->get_Data_0();
int32_t L_69 = V_9;
NetIncomingMessage_t2014089816 * L_70 = ___im0;
NullCheck(L_70);
int32_t L_71 = NetBuffer_get_LengthBytes_m2765088638(L_70, /*hidden argument*/NULL);
int32_t L_72 = V_4;
Buffer_BlockCopy_m1586717258(NULL /*static, unused*/, (Il2CppArray *)(Il2CppArray *)L_65, L_66, (Il2CppArray *)(Il2CppArray *)L_68, L_69, ((int32_t)((int32_t)L_71-(int32_t)L_72)), /*hidden argument*/NULL);
ReceivedFragmentGroup_t4108580702 * L_73 = V_8;
NullCheck(L_73);
NetBitVector_t1774780753 * L_74 = L_73->get_ReceivedChunks_1();
NullCheck(L_74);
int32_t L_75 = NetBitVector_Count_m179947577(L_74, /*hidden argument*/NULL);
V_10 = L_75;
V_12 = ((ObjectU5BU5D_t3614634134*)SZArrayNew(ObjectU5BU5D_t3614634134_il2cpp_TypeInfo_var, (uint32_t)7));
ObjectU5BU5D_t3614634134* L_76 = V_12;
NullCheck(L_76);
IL2CPP_ARRAY_BOUNDS_CHECK(L_76, 0);
ArrayElementTypeCheck (L_76, _stringLiteral2270452699);
(L_76)->SetAt(static_cast<il2cpp_array_size_t>(0), (Il2CppObject *)_stringLiteral2270452699);
ObjectU5BU5D_t3614634134* L_77 = V_12;
int32_t L_78 = V_3;
int32_t L_79 = L_78;
Il2CppObject * L_80 = Box(Int32_t2071877448_il2cpp_TypeInfo_var, &L_79);
NullCheck(L_77);
IL2CPP_ARRAY_BOUNDS_CHECK(L_77, 1);
ArrayElementTypeCheck (L_77, L_80);
(L_77)->SetAt(static_cast<il2cpp_array_size_t>(1), (Il2CppObject *)L_80);
ObjectU5BU5D_t3614634134* L_81 = V_12;
NullCheck(L_81);
IL2CPP_ARRAY_BOUNDS_CHECK(L_81, 2);
ArrayElementTypeCheck (L_81, _stringLiteral728633301);
(L_81)->SetAt(static_cast<il2cpp_array_size_t>(2), (Il2CppObject *)_stringLiteral728633301);
ObjectU5BU5D_t3614634134* L_82 = V_12;
int32_t L_83 = V_6;
int32_t L_84 = L_83;
Il2CppObject * L_85 = Box(Int32_t2071877448_il2cpp_TypeInfo_var, &L_84);
NullCheck(L_82);
IL2CPP_ARRAY_BOUNDS_CHECK(L_82, 3);
ArrayElementTypeCheck (L_82, L_85);
(L_82)->SetAt(static_cast<il2cpp_array_size_t>(3), (Il2CppObject *)L_85);
ObjectU5BU5D_t3614634134* L_86 = V_12;
NullCheck(L_86);
IL2CPP_ARRAY_BOUNDS_CHECK(L_86, 4);
ArrayElementTypeCheck (L_86, _stringLiteral455075110);
(L_86)->SetAt(static_cast<il2cpp_array_size_t>(4), (Il2CppObject *)_stringLiteral455075110);
ObjectU5BU5D_t3614634134* L_87 = V_12;
int32_t L_88 = V_10;
int32_t L_89 = L_88;
Il2CppObject * L_90 = Box(Int32_t2071877448_il2cpp_TypeInfo_var, &L_89);
NullCheck(L_87);
IL2CPP_ARRAY_BOUNDS_CHECK(L_87, 5);
ArrayElementTypeCheck (L_87, L_90);
(L_87)->SetAt(static_cast<il2cpp_array_size_t>(5), (Il2CppObject *)L_90);
ObjectU5BU5D_t3614634134* L_91 = V_12;
NullCheck(L_91);
IL2CPP_ARRAY_BOUNDS_CHECK(L_91, 6);
ArrayElementTypeCheck (L_91, _stringLiteral3852101942);
(L_91)->SetAt(static_cast<il2cpp_array_size_t>(6), (Il2CppObject *)_stringLiteral3852101942);
ObjectU5BU5D_t3614634134* L_92 = V_12;
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_93 = String_Concat_m3881798623(NULL /*static, unused*/, L_92, /*hidden argument*/NULL);
NetPeer_LogVerbose_m3434660420(__this, L_93, /*hidden argument*/NULL);
ReceivedFragmentGroup_t4108580702 * L_94 = V_8;
NullCheck(L_94);
NetBitVector_t1774780753 * L_95 = L_94->get_ReceivedChunks_1();
NullCheck(L_95);
int32_t L_96 = NetBitVector_Count_m179947577(L_95, /*hidden argument*/NULL);
int32_t L_97 = V_6;
V_11 = (bool)((((int32_t)((((int32_t)L_96) == ((int32_t)L_97))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_98 = V_11;
if (L_98)
{
goto IL_028a;
}
}
{
NetIncomingMessage_t2014089816 * L_99 = ___im0;
ReceivedFragmentGroup_t4108580702 * L_100 = V_8;
NullCheck(L_100);
ByteU5BU5D_t3397334013* L_101 = L_100->get_Data_0();
NullCheck(L_99);
((NetBuffer_t3608062491 *)L_99)->set_m_data_2(L_101);
NetIncomingMessage_t2014089816 * L_102 = ___im0;
int32_t L_103 = V_1;
NullCheck(L_102);
((NetBuffer_t3608062491 *)L_102)->set_m_bitLength_3(L_103);
NetIncomingMessage_t2014089816 * L_104 = ___im0;
NullCheck(L_104);
L_104->set_m_isFragment_10((bool)0);
V_12 = ((ObjectU5BU5D_t3614634134*)SZArrayNew(ObjectU5BU5D_t3614634134_il2cpp_TypeInfo_var, (uint32_t)7));
ObjectU5BU5D_t3614634134* L_105 = V_12;
NullCheck(L_105);
IL2CPP_ARRAY_BOUNDS_CHECK(L_105, 0);
ArrayElementTypeCheck (L_105, _stringLiteral399521832);
(L_105)->SetAt(static_cast<il2cpp_array_size_t>(0), (Il2CppObject *)_stringLiteral399521832);
ObjectU5BU5D_t3614634134* L_106 = V_12;
int32_t L_107 = V_0;
int32_t L_108 = L_107;
Il2CppObject * L_109 = Box(Int32_t2071877448_il2cpp_TypeInfo_var, &L_108);
NullCheck(L_106);
IL2CPP_ARRAY_BOUNDS_CHECK(L_106, 1);
ArrayElementTypeCheck (L_106, L_109);
(L_106)->SetAt(static_cast<il2cpp_array_size_t>(1), (Il2CppObject *)L_109);
ObjectU5BU5D_t3614634134* L_110 = V_12;
NullCheck(L_110);
IL2CPP_ARRAY_BOUNDS_CHECK(L_110, 2);
ArrayElementTypeCheck (L_110, _stringLiteral2353303200);
(L_110)->SetAt(static_cast<il2cpp_array_size_t>(2), (Il2CppObject *)_stringLiteral2353303200);
ObjectU5BU5D_t3614634134* L_111 = V_12;
int32_t L_112 = V_6;
int32_t L_113 = L_112;
Il2CppObject * L_114 = Box(Int32_t2071877448_il2cpp_TypeInfo_var, &L_113);
NullCheck(L_111);
IL2CPP_ARRAY_BOUNDS_CHECK(L_111, 3);
ArrayElementTypeCheck (L_111, L_114);
(L_111)->SetAt(static_cast<il2cpp_array_size_t>(3), (Il2CppObject *)L_114);
ObjectU5BU5D_t3614634134* L_115 = V_12;
NullCheck(L_115);
IL2CPP_ARRAY_BOUNDS_CHECK(L_115, 4);
ArrayElementTypeCheck (L_115, _stringLiteral321480496);
(L_115)->SetAt(static_cast<il2cpp_array_size_t>(4), (Il2CppObject *)_stringLiteral321480496);
ObjectU5BU5D_t3614634134* L_116 = V_12;
int32_t L_117 = V_1;
int32_t L_118 = L_117;
Il2CppObject * L_119 = Box(Int32_t2071877448_il2cpp_TypeInfo_var, &L_118);
NullCheck(L_116);
IL2CPP_ARRAY_BOUNDS_CHECK(L_116, 5);
ArrayElementTypeCheck (L_116, L_119);
(L_116)->SetAt(static_cast<il2cpp_array_size_t>(5), (Il2CppObject *)L_119);
ObjectU5BU5D_t3614634134* L_120 = V_12;
NullCheck(L_120);
IL2CPP_ARRAY_BOUNDS_CHECK(L_120, 6);
ArrayElementTypeCheck (L_120, _stringLiteral2676434177);
(L_120)->SetAt(static_cast<il2cpp_array_size_t>(6), (Il2CppObject *)_stringLiteral2676434177);
ObjectU5BU5D_t3614634134* L_121 = V_12;
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_122 = String_Concat_m3881798623(NULL /*static, unused*/, L_121, /*hidden argument*/NULL);
NetPeer_LogVerbose_m3434660420(__this, L_122, /*hidden argument*/NULL);
Dictionary_2_t3116406337 * L_123 = V_7;
int32_t L_124 = V_0;
NullCheck(L_123);
Dictionary_2_Remove_m1546056622(L_123, L_124, /*hidden argument*/Dictionary_2_Remove_m1546056622_MethodInfo_var);
NetIncomingMessage_t2014089816 * L_125 = ___im0;
NetPeer_ReleaseMessage_m3520648965(__this, L_125, /*hidden argument*/NULL);
goto IL_0294;
}
IL_028a:
{
NetIncomingMessage_t2014089816 * L_126 = ___im0;
NetPeer_Recycle_m1601919902(__this, L_126, /*hidden argument*/NULL);
}
IL_0294:
{
goto IL_0296;
}
IL_0296:
{
return;
}
}
// System.Net.Sockets.Socket Lidgren.Network.NetPeer::get_Socket()
extern "C" Socket_t3821512045 * NetPeer_get_Socket_m1042619742 (NetPeer_t1779390221 * __this, const MethodInfo* method)
{
Socket_t3821512045 * V_0 = NULL;
{
Socket_t3821512045 * L_0 = __this->get_m_socket_10();
V_0 = L_0;
goto IL_000a;
}
IL_000a:
{
Socket_t3821512045 * L_1 = V_0;
return L_1;
}
}
// System.Void Lidgren.Network.NetPeer::ReleaseMessage(Lidgren.Network.NetIncomingMessage)
extern Il2CppClass* Exception_t1927440687_il2cpp_TypeInfo_var;
extern Il2CppClass* String_t_il2cpp_TypeInfo_var;
extern const MethodInfo* NetQueue_1_Enqueue_m989769817_MethodInfo_var;
extern const MethodInfo* List_1_GetEnumerator_m2323646086_MethodInfo_var;
extern const MethodInfo* Enumerator_get_Current_m1930271102_MethodInfo_var;
extern const MethodInfo* Enumerator_MoveNext_m884872724_MethodInfo_var;
extern const MethodInfo* Enumerator_Dispose_m3281725221_MethodInfo_var;
extern Il2CppCodeGenString* _stringLiteral3176581795;
extern const uint32_t NetPeer_ReleaseMessage_m3520648965_MetadataUsageId;
extern "C" void NetPeer_ReleaseMessage_m3520648965 (NetPeer_t1779390221 * __this, NetIncomingMessage_t2014089816 * ___msg0, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetPeer_ReleaseMessage_m3520648965_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
NetTuple_2_t1886281639 V_0;
memset(&V_0, 0, sizeof(V_0));
Exception_t1927440687 * V_1 = NULL;
bool V_2 = false;
Enumerator_t790132445 V_3;
memset(&V_3, 0, sizeof(V_3));
Exception_t1927440687 * __last_unhandled_exception = 0;
NO_UNUSED_WARNING (__last_unhandled_exception);
Exception_t1927440687 * __exception_local = 0;
NO_UNUSED_WARNING (__exception_local);
int32_t __leave_target = 0;
NO_UNUSED_WARNING (__leave_target);
{
NetIncomingMessage_t2014089816 * L_0 = ___msg0;
NullCheck(L_0);
int32_t L_1 = L_0->get_m_incomingMessageType_5();
NetException_Assert_m1426298558(NULL /*static, unused*/, (bool)((((int32_t)((((int32_t)L_1) == ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0), /*hidden argument*/NULL);
NetIncomingMessage_t2014089816 * L_2 = ___msg0;
NullCheck(L_2);
bool L_3 = L_2->get_m_isFragment_10();
V_2 = (bool)((((int32_t)L_3) == ((int32_t)0))? 1 : 0);
bool L_4 = V_2;
if (L_4)
{
goto IL_002e;
}
}
{
NetIncomingMessage_t2014089816 * L_5 = ___msg0;
NetPeer_HandleReleasedFragment_m1676538552(__this, L_5, /*hidden argument*/NULL);
goto IL_00ca;
}
IL_002e:
{
NetQueue_1_t4230780502 * L_6 = __this->get_m_releasedIncomingMessages_22();
NetIncomingMessage_t2014089816 * L_7 = ___msg0;
NullCheck(L_6);
NetQueue_1_Enqueue_m989769817(L_6, L_7, /*hidden argument*/NetQueue_1_Enqueue_m989769817_MethodInfo_var);
AutoResetEvent_t15112628 * L_8 = __this->get_m_messageReceivedEvent_28();
V_2 = (bool)((((Il2CppObject*)(AutoResetEvent_t15112628 *)L_8) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0);
bool L_9 = V_2;
if (L_9)
{
goto IL_0054;
}
}
{
AutoResetEvent_t15112628 * L_10 = __this->get_m_messageReceivedEvent_28();
NullCheck(L_10);
EventWaitHandle_Set_m2975776670(L_10, /*hidden argument*/NULL);
}
IL_0054:
{
List_1_t1255402771 * L_11 = __this->get_m_receiveCallbacks_29();
V_2 = (bool)((((Il2CppObject*)(List_1_t1255402771 *)L_11) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0);
bool L_12 = V_2;
if (L_12)
{
goto IL_00ca;
}
}
{
List_1_t1255402771 * L_13 = __this->get_m_receiveCallbacks_29();
NullCheck(L_13);
Enumerator_t790132445 L_14 = List_1_GetEnumerator_m2323646086(L_13, /*hidden argument*/List_1_GetEnumerator_m2323646086_MethodInfo_var);
V_3 = L_14;
}
IL_006f:
try
{ // begin try (depth: 1)
{
goto IL_00ac;
}
IL_0071:
{
NetTuple_2_t1886281639 L_15 = Enumerator_get_Current_m1930271102((&V_3), /*hidden argument*/Enumerator_get_Current_m1930271102_MethodInfo_var);
V_0 = L_15;
}
IL_007a:
try
{ // begin try (depth: 2)
SynchronizationContext_t3857790437 * L_16 = (&V_0)->get_Item1_0();
SendOrPostCallback_t296893742 * L_17 = (&V_0)->get_Item2_1();
NullCheck(L_16);
VirtActionInvoker2< SendOrPostCallback_t296893742 *, Il2CppObject * >::Invoke(4 /* System.Void System.Threading.SynchronizationContext::Post(System.Threading.SendOrPostCallback,System.Object) */, L_16, L_17, __this);
goto IL_00aa;
} // end try (depth: 2)
catch(Il2CppExceptionWrapper& e)
{
__exception_local = (Exception_t1927440687 *)e.ex;
if(il2cpp_codegen_class_is_assignable_from (Exception_t1927440687_il2cpp_TypeInfo_var, e.ex->object.klass))
goto CATCH_0093;
throw e;
}
CATCH_0093:
{ // begin catch(System.Exception)
V_1 = ((Exception_t1927440687 *)__exception_local);
Exception_t1927440687 * L_18 = V_1;
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_19 = String_Concat_m56707527(NULL /*static, unused*/, _stringLiteral3176581795, L_18, /*hidden argument*/NULL);
NetPeer_LogWarning_m3266657906(__this, L_19, /*hidden argument*/NULL);
goto IL_00aa;
} // end catch (depth: 2)
IL_00aa:
{
}
IL_00ac:
{
bool L_20 = Enumerator_MoveNext_m884872724((&V_3), /*hidden argument*/Enumerator_MoveNext_m884872724_MethodInfo_var);
V_2 = L_20;
bool L_21 = V_2;
if (L_21)
{
goto IL_0071;
}
}
IL_00b7:
{
IL2CPP_LEAVE(0xC8, FINALLY_00b9);
}
} // end try (depth: 1)
catch(Il2CppExceptionWrapper& e)
{
__last_unhandled_exception = (Exception_t1927440687 *)e.ex;
goto FINALLY_00b9;
}
FINALLY_00b9:
{ // begin finally (depth: 1)
Enumerator_Dispose_m3281725221((&V_3), /*hidden argument*/Enumerator_Dispose_m3281725221_MethodInfo_var);
IL2CPP_END_FINALLY(185)
} // end finally (depth: 1)
IL2CPP_CLEANUP(185)
{
IL2CPP_JUMP_TBL(0xC8, IL_00c8)
IL2CPP_RETHROW_IF_UNHANDLED(Exception_t1927440687 *)
}
IL_00c8:
{
}
IL_00ca:
{
return;
}
}
// System.Void Lidgren.Network.NetPeer::BindSocket(System.Boolean)
extern Il2CppClass* NetTime_t3056501352_il2cpp_TypeInfo_var;
extern Il2CppClass* Double_t4078015681_il2cpp_TypeInfo_var;
extern Il2CppClass* String_t_il2cpp_TypeInfo_var;
extern Il2CppClass* Socket_t3821512045_il2cpp_TypeInfo_var;
extern Il2CppClass* IPEndPoint_t2615413766_il2cpp_TypeInfo_var;
extern Il2CppClass* ByteU5BU5D_t3397334013_il2cpp_TypeInfo_var;
extern Il2CppClass* Convert_t2607082565_il2cpp_TypeInfo_var;
extern Il2CppClass* Il2CppObject_il2cpp_TypeInfo_var;
extern Il2CppClass* ObjectU5BU5D_t3614634134_il2cpp_TypeInfo_var;
extern Il2CppClass* Boolean_t3825574718_il2cpp_TypeInfo_var;
extern Il2CppCodeGenString* _stringLiteral1046210774;
extern Il2CppCodeGenString* _stringLiteral4073575562;
extern Il2CppCodeGenString* _stringLiteral3331961208;
extern Il2CppCodeGenString* _stringLiteral811305496;
extern const uint32_t NetPeer_BindSocket_m3838079755_MetadataUsageId;
extern "C" void NetPeer_BindSocket_m3838079755 (NetPeer_t1779390221 * __this, bool ___reBind0, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetPeer_BindSocket_m3838079755_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
double V_0 = 0.0;
EndPoint_t4156119363 * V_1 = NULL;
uint32_t V_2 = 0;
IPEndPoint_t2615413766 * V_3 = NULL;
bool V_4 = false;
ByteU5BU5D_t3397334013* V_5 = NULL;
ObjectU5BU5D_t3614634134* V_6 = NULL;
Exception_t1927440687 * __last_unhandled_exception = 0;
NO_UNUSED_WARNING (__last_unhandled_exception);
Exception_t1927440687 * __exception_local = 0;
NO_UNUSED_WARNING (__exception_local);
int32_t __leave_target = 0;
NO_UNUSED_WARNING (__leave_target);
IPAddress_t1399971723 * G_B8_0 = NULL;
IPAddress_t1399971723 * G_B7_0 = NULL;
int32_t G_B9_0 = 0;
IPAddress_t1399971723 * G_B9_1 = NULL;
{
IL2CPP_RUNTIME_CLASS_INIT(NetTime_t3056501352_il2cpp_TypeInfo_var);
double L_0 = NetTime_get_Now_m1609702533(NULL /*static, unused*/, /*hidden argument*/NULL);
V_0 = L_0;
double L_1 = V_0;
double L_2 = __this->get_m_lastSocketBind_18();
V_4 = (bool)((((int32_t)((((double)((double)((double)L_1-(double)L_2))) < ((double)(1.0)))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_3 = V_4;
if (L_3)
{
goto IL_004c;
}
}
{
double L_4 = V_0;
double L_5 = __this->get_m_lastSocketBind_18();
double L_6 = ((double)((double)L_4-(double)L_5));
Il2CppObject * L_7 = Box(Double_t4078015681_il2cpp_TypeInfo_var, &L_6);
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_8 = String_Concat_m2000667605(NULL /*static, unused*/, _stringLiteral1046210774, L_7, _stringLiteral4073575562, /*hidden argument*/NULL);
NetPeer_LogDebug_m2983960595(__this, L_8, /*hidden argument*/NULL);
goto IL_0191;
}
IL_004c:
{
double L_9 = V_0;
__this->set_m_lastSocketBind_18(L_9);
Socket_t3821512045 * L_10 = __this->get_m_socket_10();
V_4 = (bool)((((int32_t)((((Il2CppObject*)(Socket_t3821512045 *)L_10) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_11 = V_4;
if (L_11)
{
goto IL_0074;
}
}
{
Socket_t3821512045 * L_12 = (Socket_t3821512045 *)il2cpp_codegen_object_new(Socket_t3821512045_il2cpp_TypeInfo_var);
Socket__ctor_m2624772808(L_12, 2, 2, ((int32_t)17), /*hidden argument*/NULL);
__this->set_m_socket_10(L_12);
}
IL_0074:
{
bool L_13 = ___reBind0;
V_4 = (bool)((((int32_t)L_13) == ((int32_t)0))? 1 : 0);
bool L_14 = V_4;
if (L_14)
{
goto IL_0091;
}
}
{
Socket_t3821512045 * L_15 = __this->get_m_socket_10();
NullCheck(L_15);
Socket_SetSocketOption_m2520328933(L_15, ((int32_t)65535), 4, 1, /*hidden argument*/NULL);
}
IL_0091:
{
Socket_t3821512045 * L_16 = __this->get_m_socket_10();
NetPeerConfiguration_t136603591 * L_17 = __this->get_m_configuration_21();
NullCheck(L_17);
int32_t L_18 = NetPeerConfiguration_get_ReceiveBufferSize_m3874336565(L_17, /*hidden argument*/NULL);
NullCheck(L_16);
Socket_set_ReceiveBufferSize_m2259137467(L_16, L_18, /*hidden argument*/NULL);
Socket_t3821512045 * L_19 = __this->get_m_socket_10();
NetPeerConfiguration_t136603591 * L_20 = __this->get_m_configuration_21();
NullCheck(L_20);
int32_t L_21 = NetPeerConfiguration_get_SendBufferSize_m1353049686(L_20, /*hidden argument*/NULL);
NullCheck(L_19);
Socket_set_SendBufferSize_m3462801204(L_19, L_21, /*hidden argument*/NULL);
Socket_t3821512045 * L_22 = __this->get_m_socket_10();
NullCheck(L_22);
Socket_set_Blocking_m353034810(L_22, (bool)0, /*hidden argument*/NULL);
NetPeerConfiguration_t136603591 * L_23 = __this->get_m_configuration_21();
NullCheck(L_23);
IPAddress_t1399971723 * L_24 = NetPeerConfiguration_get_LocalAddress_m4101942348(L_23, /*hidden argument*/NULL);
bool L_25 = ___reBind0;
G_B7_0 = L_24;
if (L_25)
{
G_B8_0 = L_24;
goto IL_00e7;
}
}
{
NetPeerConfiguration_t136603591 * L_26 = __this->get_m_configuration_21();
NullCheck(L_26);
int32_t L_27 = NetPeerConfiguration_get_Port_m3233330308(L_26, /*hidden argument*/NULL);
G_B9_0 = L_27;
G_B9_1 = G_B7_0;
goto IL_00ed;
}
IL_00e7:
{
int32_t L_28 = __this->get_m_listenPort_1();
G_B9_0 = L_28;
G_B9_1 = G_B8_0;
}
IL_00ed:
{
IPEndPoint_t2615413766 * L_29 = (IPEndPoint_t2615413766 *)il2cpp_codegen_object_new(IPEndPoint_t2615413766_il2cpp_TypeInfo_var);
IPEndPoint__ctor_m3477723888(L_29, G_B9_1, G_B9_0, /*hidden argument*/NULL);
V_1 = L_29;
Socket_t3821512045 * L_30 = __this->get_m_socket_10();
EndPoint_t4156119363 * L_31 = V_1;
NullCheck(L_30);
Socket_Bind_m2654205209(L_30, L_31, /*hidden argument*/NULL);
}
IL_0101:
try
{ // begin try (depth: 1)
V_2 = ((int32_t)-1744830452);
Socket_t3821512045 * L_32 = __this->get_m_socket_10();
uint32_t L_33 = V_2;
V_5 = ((ByteU5BU5D_t3397334013*)SZArrayNew(ByteU5BU5D_t3397334013_il2cpp_TypeInfo_var, (uint32_t)1));
ByteU5BU5D_t3397334013* L_34 = V_5;
IL2CPP_RUNTIME_CLASS_INIT(Convert_t2607082565_il2cpp_TypeInfo_var);
uint8_t L_35 = Convert_ToByte_m3220387780(NULL /*static, unused*/, (bool)0, /*hidden argument*/NULL);
NullCheck(L_34);
IL2CPP_ARRAY_BOUNDS_CHECK(L_34, 0);
(L_34)->SetAt(static_cast<il2cpp_array_size_t>(0), (uint8_t)L_35);
ByteU5BU5D_t3397334013* L_36 = V_5;
NullCheck(L_32);
Socket_IOControl_m93430235(L_32, L_33, L_36, (ByteU5BU5D_t3397334013*)(ByteU5BU5D_t3397334013*)NULL, /*hidden argument*/NULL);
goto IL_0132;
} // end try (depth: 1)
catch(Il2CppExceptionWrapper& e)
{
__exception_local = (Exception_t1927440687 *)e.ex;
if(il2cpp_codegen_class_is_assignable_from (Il2CppObject_il2cpp_TypeInfo_var, e.ex->object.klass))
goto CATCH_012d;
throw e;
}
CATCH_012d:
{ // begin catch(System.Object)
goto IL_0132;
} // end catch (depth: 1)
IL_0132:
{
Socket_t3821512045 * L_37 = __this->get_m_socket_10();
NullCheck(L_37);
EndPoint_t4156119363 * L_38 = Socket_get_LocalEndPoint_m289394380(L_37, /*hidden argument*/NULL);
V_3 = ((IPEndPoint_t2615413766 *)IsInstClass(L_38, IPEndPoint_t2615413766_il2cpp_TypeInfo_var));
V_6 = ((ObjectU5BU5D_t3614634134*)SZArrayNew(ObjectU5BU5D_t3614634134_il2cpp_TypeInfo_var, (uint32_t)4));
ObjectU5BU5D_t3614634134* L_39 = V_6;
NullCheck(L_39);
IL2CPP_ARRAY_BOUNDS_CHECK(L_39, 0);
ArrayElementTypeCheck (L_39, _stringLiteral3331961208);
(L_39)->SetAt(static_cast<il2cpp_array_size_t>(0), (Il2CppObject *)_stringLiteral3331961208);
ObjectU5BU5D_t3614634134* L_40 = V_6;
IPEndPoint_t2615413766 * L_41 = V_3;
NullCheck(L_40);
IL2CPP_ARRAY_BOUNDS_CHECK(L_40, 1);
ArrayElementTypeCheck (L_40, L_41);
(L_40)->SetAt(static_cast<il2cpp_array_size_t>(1), (Il2CppObject *)L_41);
ObjectU5BU5D_t3614634134* L_42 = V_6;
NullCheck(L_42);
IL2CPP_ARRAY_BOUNDS_CHECK(L_42, 2);
ArrayElementTypeCheck (L_42, _stringLiteral811305496);
(L_42)->SetAt(static_cast<il2cpp_array_size_t>(2), (Il2CppObject *)_stringLiteral811305496);
ObjectU5BU5D_t3614634134* L_43 = V_6;
Socket_t3821512045 * L_44 = __this->get_m_socket_10();
NullCheck(L_44);
bool L_45 = Socket_get_IsBound_m2059543394(L_44, /*hidden argument*/NULL);
bool L_46 = L_45;
Il2CppObject * L_47 = Box(Boolean_t3825574718_il2cpp_TypeInfo_var, &L_46);
NullCheck(L_43);
IL2CPP_ARRAY_BOUNDS_CHECK(L_43, 3);
ArrayElementTypeCheck (L_43, L_47);
(L_43)->SetAt(static_cast<il2cpp_array_size_t>(3), (Il2CppObject *)L_47);
ObjectU5BU5D_t3614634134* L_48 = V_6;
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_49 = String_Concat_m3881798623(NULL /*static, unused*/, L_48, /*hidden argument*/NULL);
NetPeer_LogDebug_m2983960595(__this, L_49, /*hidden argument*/NULL);
IPEndPoint_t2615413766 * L_50 = V_3;
NullCheck(L_50);
int32_t L_51 = IPEndPoint_get_Port_m1973738026(L_50, /*hidden argument*/NULL);
__this->set_m_listenPort_1(L_51);
}
IL_0191:
{
return;
}
}
// System.Void Lidgren.Network.NetPeer::InitializeNetwork()
extern Il2CppClass* NetUPnP_t2794379482_il2cpp_TypeInfo_var;
extern Il2CppClass* ByteU5BU5D_t3397334013_il2cpp_TypeInfo_var;
extern Il2CppClass* NetIncomingMessage_t2014089816_il2cpp_TypeInfo_var;
extern Il2CppClass* NetUtility_t3562260209_il2cpp_TypeInfo_var;
extern Il2CppClass* IPEndPoint_t2615413766_il2cpp_TypeInfo_var;
extern Il2CppClass* BitConverter_t3195628829_il2cpp_TypeInfo_var;
extern const MethodInfo* NetQueue_1_Clear_m2237230048_MethodInfo_var;
extern const MethodInfo* NetQueue_1_Clear_m3067589550_MethodInfo_var;
extern const MethodInfo* Dictionary_2_Clear_m1586068996_MethodInfo_var;
extern const uint32_t NetPeer_InitializeNetwork_m4038073148_MetadataUsageId;
extern "C" void NetPeer_InitializeNetwork_m4038073148 (NetPeer_t1779390221 * __this, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetPeer_InitializeNetwork_m4038073148_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
ByteU5BU5D_t3397334013* V_0 = NULL;
IPEndPoint_t2615413766 * V_1 = NULL;
ByteU5BU5D_t3397334013* V_2 = NULL;
ByteU5BU5D_t3397334013* V_3 = NULL;
Il2CppObject * V_4 = NULL;
bool V_5 = false;
Exception_t1927440687 * __last_unhandled_exception = 0;
NO_UNUSED_WARNING (__last_unhandled_exception);
Exception_t1927440687 * __exception_local = 0;
NO_UNUSED_WARNING (__exception_local);
int32_t __leave_target = 0;
NO_UNUSED_WARNING (__leave_target);
{
Il2CppObject * L_0 = __this->get_m_initializeLock_15();
Il2CppObject * L_1 = L_0;
V_4 = L_1;
Monitor_Enter_m2136705809(NULL /*static, unused*/, L_1, /*hidden argument*/NULL);
}
IL_0010:
try
{ // begin try (depth: 1)
{
NetPeerConfiguration_t136603591 * L_2 = __this->get_m_configuration_21();
NullCheck(L_2);
NetPeerConfiguration_Lock_m363221111(L_2, /*hidden argument*/NULL);
int32_t L_3 = __this->get_m_status_8();
V_5 = (bool)((((int32_t)((((int32_t)L_3) == ((int32_t)2))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_4 = V_5;
if (L_4)
{
goto IL_0034;
}
}
IL_002f:
{
IL2CPP_LEAVE(0x142, FINALLY_0138);
}
IL_0034:
{
NetPeerConfiguration_t136603591 * L_5 = __this->get_m_configuration_21();
NullCheck(L_5);
bool L_6 = L_5->get_m_enableUPnP_12();
V_5 = (bool)((((int32_t)L_6) == ((int32_t)0))? 1 : 0);
bool L_7 = V_5;
if (L_7)
{
goto IL_0054;
}
}
IL_0048:
{
NetUPnP_t2794379482 * L_8 = (NetUPnP_t2794379482 *)il2cpp_codegen_object_new(NetUPnP_t2794379482_il2cpp_TypeInfo_var);
NetUPnP__ctor_m1248845477(L_8, __this, /*hidden argument*/NULL);
__this->set_m_upnp_19(L_8);
}
IL_0054:
{
NetPeer_InitializePools_m2290904387(__this, /*hidden argument*/NULL);
NetQueue_1_t4230780502 * L_9 = __this->get_m_releasedIncomingMessages_22();
NullCheck(L_9);
NetQueue_1_Clear_m2237230048(L_9, /*hidden argument*/NetQueue_1_Clear_m2237230048_MethodInfo_var);
NetQueue_1_t1703294902 * L_10 = __this->get_m_unsentUnconnectedMessages_23();
NullCheck(L_10);
NetQueue_1_Clear_m3067589550(L_10, /*hidden argument*/NetQueue_1_Clear_m3067589550_MethodInfo_var);
Dictionary_2_t3898409514 * L_11 = __this->get_m_handshakes_24();
NullCheck(L_11);
Dictionary_2_Clear_m1586068996(L_11, /*hidden argument*/Dictionary_2_Clear_m1586068996_MethodInfo_var);
NetPeer_BindSocket_m3838079755(__this, (bool)0, /*hidden argument*/NULL);
NetPeerConfiguration_t136603591 * L_12 = __this->get_m_configuration_21();
NullCheck(L_12);
int32_t L_13 = NetPeerConfiguration_get_ReceiveBufferSize_m3874336565(L_12, /*hidden argument*/NULL);
__this->set_m_receiveBuffer_12(((ByteU5BU5D_t3397334013*)SZArrayNew(ByteU5BU5D_t3397334013_il2cpp_TypeInfo_var, (uint32_t)L_13)));
NetPeerConfiguration_t136603591 * L_14 = __this->get_m_configuration_21();
NullCheck(L_14);
int32_t L_15 = NetPeerConfiguration_get_SendBufferSize_m1353049686(L_14, /*hidden argument*/NULL);
__this->set_m_sendBuffer_11(((ByteU5BU5D_t3397334013*)SZArrayNew(ByteU5BU5D_t3397334013_il2cpp_TypeInfo_var, (uint32_t)L_15)));
NetIncomingMessage_t2014089816 * L_16 = (NetIncomingMessage_t2014089816 *)il2cpp_codegen_object_new(NetIncomingMessage_t2014089816_il2cpp_TypeInfo_var);
NetIncomingMessage__ctor_m2874845560(L_16, 0, /*hidden argument*/NULL);
__this->set_m_readHelperMessage_13(L_16);
NetIncomingMessage_t2014089816 * L_17 = __this->get_m_readHelperMessage_13();
ByteU5BU5D_t3397334013* L_18 = __this->get_m_receiveBuffer_12();
NullCheck(L_17);
((NetBuffer_t3608062491 *)L_17)->set_m_data_2(L_18);
IL2CPP_RUNTIME_CLASS_INIT(NetUtility_t3562260209_il2cpp_TypeInfo_var);
ByteU5BU5D_t3397334013* L_19 = NetUtility_GetMacAddressBytes_m2783516176(NULL /*static, unused*/, /*hidden argument*/NULL);
V_0 = L_19;
Socket_t3821512045 * L_20 = __this->get_m_socket_10();
NullCheck(L_20);
EndPoint_t4156119363 * L_21 = Socket_get_LocalEndPoint_m289394380(L_20, /*hidden argument*/NULL);
V_1 = ((IPEndPoint_t2615413766 *)IsInstClass(L_21, IPEndPoint_t2615413766_il2cpp_TypeInfo_var));
IPEndPoint_t2615413766 * L_22 = V_1;
NullCheck(L_22);
int32_t L_23 = VirtFuncInvoker0< int32_t >::Invoke(2 /* System.Int32 System.Object::GetHashCode() */, L_22);
IL2CPP_RUNTIME_CLASS_INIT(BitConverter_t3195628829_il2cpp_TypeInfo_var);
ByteU5BU5D_t3397334013* L_24 = BitConverter_GetBytes_m1300847478(NULL /*static, unused*/, L_23, /*hidden argument*/NULL);
V_2 = L_24;
ByteU5BU5D_t3397334013* L_25 = V_2;
NullCheck(L_25);
ByteU5BU5D_t3397334013* L_26 = V_0;
NullCheck(L_26);
V_3 = ((ByteU5BU5D_t3397334013*)SZArrayNew(ByteU5BU5D_t3397334013_il2cpp_TypeInfo_var, (uint32_t)((int32_t)((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_25)->max_length))))+(int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_26)->max_length))))))));
ByteU5BU5D_t3397334013* L_27 = V_2;
ByteU5BU5D_t3397334013* L_28 = V_3;
ByteU5BU5D_t3397334013* L_29 = V_2;
NullCheck(L_29);
Array_Copy_m3808317496(NULL /*static, unused*/, (Il2CppArray *)(Il2CppArray *)L_27, 0, (Il2CppArray *)(Il2CppArray *)L_28, 0, (((int32_t)((int32_t)(((Il2CppArray *)L_29)->max_length)))), /*hidden argument*/NULL);
ByteU5BU5D_t3397334013* L_30 = V_0;
ByteU5BU5D_t3397334013* L_31 = V_3;
ByteU5BU5D_t3397334013* L_32 = V_2;
NullCheck(L_32);
ByteU5BU5D_t3397334013* L_33 = V_0;
NullCheck(L_33);
Array_Copy_m3808317496(NULL /*static, unused*/, (Il2CppArray *)(Il2CppArray *)L_30, 0, (Il2CppArray *)(Il2CppArray *)L_31, (((int32_t)((int32_t)(((Il2CppArray *)L_32)->max_length)))), (((int32_t)((int32_t)(((Il2CppArray *)L_33)->max_length)))), /*hidden argument*/NULL);
ByteU5BU5D_t3397334013* L_34 = V_3;
ByteU5BU5D_t3397334013* L_35 = NetUtility_ComputeSHAHash_m2577505156(NULL /*static, unused*/, L_34, /*hidden argument*/NULL);
int64_t L_36 = BitConverter_ToInt64_m1329623425(NULL /*static, unused*/, L_35, 0, /*hidden argument*/NULL);
__this->set_m_uniqueIdentifier_26(L_36);
__this->set_m_status_8(2);
IL2CPP_LEAVE(0x141, FINALLY_0138);
}
} // end try (depth: 1)
catch(Il2CppExceptionWrapper& e)
{
__last_unhandled_exception = (Exception_t1927440687 *)e.ex;
goto FINALLY_0138;
}
FINALLY_0138:
{ // begin finally (depth: 1)
Il2CppObject * L_37 = V_4;
Monitor_Exit_m2677760297(NULL /*static, unused*/, L_37, /*hidden argument*/NULL);
IL2CPP_END_FINALLY(312)
} // end finally (depth: 1)
IL2CPP_CLEANUP(312)
{
IL2CPP_JUMP_TBL(0x142, IL_0142)
IL2CPP_JUMP_TBL(0x141, IL_0141)
IL2CPP_RETHROW_IF_UNHANDLED(Exception_t1927440687 *)
}
IL_0141:
{
}
IL_0142:
{
return;
}
}
// System.Void Lidgren.Network.NetPeer::NetworkLoop()
extern Il2CppClass* Exception_t1927440687_il2cpp_TypeInfo_var;
extern Il2CppCodeGenString* _stringLiteral2542021573;
extern const uint32_t NetPeer_NetworkLoop_m1488252008_MetadataUsageId;
extern "C" void NetPeer_NetworkLoop_m1488252008 (NetPeer_t1779390221 * __this, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetPeer_NetworkLoop_m1488252008_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
Exception_t1927440687 * V_0 = NULL;
bool V_1 = false;
Exception_t1927440687 * __last_unhandled_exception = 0;
NO_UNUSED_WARNING (__last_unhandled_exception);
Exception_t1927440687 * __exception_local = 0;
NO_UNUSED_WARNING (__exception_local);
int32_t __leave_target = 0;
NO_UNUSED_WARNING (__leave_target);
{
NetPeer_VerifyNetworkThread_m4075953563(__this, /*hidden argument*/NULL);
NetPeer_LogDebug_m2983960595(__this, _stringLiteral2542021573, /*hidden argument*/NULL);
}
IL_0014:
{
}
IL_0015:
try
{ // begin try (depth: 1)
NetPeer_Heartbeat_m4039216740(__this, /*hidden argument*/NULL);
goto IL_0032;
} // end try (depth: 1)
catch(Il2CppExceptionWrapper& e)
{
__exception_local = (Exception_t1927440687 *)e.ex;
if(il2cpp_codegen_class_is_assignable_from (Exception_t1927440687_il2cpp_TypeInfo_var, e.ex->object.klass))
goto CATCH_0020;
throw e;
}
CATCH_0020:
{ // begin catch(System.Exception)
V_0 = ((Exception_t1927440687 *)__exception_local);
Exception_t1927440687 * L_0 = V_0;
NullCheck(L_0);
String_t* L_1 = VirtFuncInvoker0< String_t* >::Invoke(3 /* System.String System.Object::ToString() */, L_0);
NetPeer_LogWarning_m3266657906(__this, L_1, /*hidden argument*/NULL);
goto IL_0032;
} // end catch (depth: 1)
IL_0032:
{
int32_t L_2 = __this->get_m_status_8();
V_1 = (bool)((((int32_t)L_2) == ((int32_t)2))? 1 : 0);
bool L_3 = V_1;
if (L_3)
{
goto IL_0014;
}
}
{
NetPeer_ExecutePeerShutdown_m4009449549(__this, /*hidden argument*/NULL);
return;
}
}
// System.Void Lidgren.Network.NetPeer::ExecutePeerShutdown()
extern Il2CppClass* List_1_t2700613161_il2cpp_TypeInfo_var;
extern Il2CppClass* NetUtility_t3562260209_il2cpp_TypeInfo_var;
extern Il2CppClass* Exception_t1927440687_il2cpp_TypeInfo_var;
extern Il2CppClass* String_t_il2cpp_TypeInfo_var;
extern const MethodInfo* Dictionary_2_get_Count_m3270350375_MethodInfo_var;
extern const MethodInfo* List_1_get_Count_m1394854046_MethodInfo_var;
extern const MethodInfo* List_1__ctor_m3477244707_MethodInfo_var;
extern const MethodInfo* List_1_GetEnumerator_m1905895923_MethodInfo_var;
extern const MethodInfo* Enumerator_get_Current_m2264966067_MethodInfo_var;
extern const MethodInfo* List_1_Add_m2801045858_MethodInfo_var;
extern const MethodInfo* Enumerator_MoveNext_m1275401007_MethodInfo_var;
extern const MethodInfo* Enumerator_Dispose_m2177334822_MethodInfo_var;
extern const MethodInfo* Dictionary_2_get_Values_m2081171493_MethodInfo_var;
extern const MethodInfo* ValueCollection_GetEnumerator_m4258835047_MethodInfo_var;
extern const MethodInfo* Enumerator_get_Current_m1025502873_MethodInfo_var;
extern const MethodInfo* List_1_Contains_m4168039338_MethodInfo_var;
extern const MethodInfo* Enumerator_MoveNext_m3140744238_MethodInfo_var;
extern const MethodInfo* Enumerator_Dispose_m622234141_MethodInfo_var;
extern const MethodInfo* NetQueue_1_Clear_m3067589550_MethodInfo_var;
extern const MethodInfo* List_1_Clear_m3383322207_MethodInfo_var;
extern const MethodInfo* Dictionary_2_Clear_m1586068996_MethodInfo_var;
extern Il2CppCodeGenString* _stringLiteral4164533770;
extern Il2CppCodeGenString* _stringLiteral2728614686;
extern Il2CppCodeGenString* _stringLiteral1328456286;
extern Il2CppCodeGenString* _stringLiteral799260213;
extern const uint32_t NetPeer_ExecutePeerShutdown_m4009449549_MetadataUsageId;
extern "C" void NetPeer_ExecutePeerShutdown_m4009449549 (NetPeer_t1779390221 * __this, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetPeer_ExecutePeerShutdown_m4009449549_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
List_1_t2700613161 * V_0 = NULL;
NetConnection_t3331492029 * V_1 = NULL;
NetConnection_t3331492029 * V_2 = NULL;
Exception_t1927440687 * V_3 = NULL;
List_1_t2700613161 * V_4 = NULL;
Enumerator_t2235342835 V_5;
memset(&V_5, 0, sizeof(V_5));
bool V_6 = false;
Dictionary_2_t3898409514 * V_7 = NULL;
Enumerator_t1289974982 V_8;
memset(&V_8, 0, sizeof(V_8));
Il2CppObject * V_9 = NULL;
Exception_t1927440687 * __last_unhandled_exception = 0;
NO_UNUSED_WARNING (__last_unhandled_exception);
Exception_t1927440687 * __exception_local = 0;
NO_UNUSED_WARNING (__exception_local);
int32_t __leave_target = 0;
NO_UNUSED_WARNING (__leave_target);
int32_t G_B16_0 = 0;
{
NetPeer_VerifyNetworkThread_m4075953563(__this, /*hidden argument*/NULL);
NetPeer_LogDebug_m2983960595(__this, _stringLiteral4164533770, /*hidden argument*/NULL);
Dictionary_2_t3898409514 * L_0 = __this->get_m_handshakes_24();
NullCheck(L_0);
int32_t L_1 = Dictionary_2_get_Count_m3270350375(L_0, /*hidden argument*/Dictionary_2_get_Count_m3270350375_MethodInfo_var);
List_1_t2700613161 * L_2 = __this->get_m_connections_3();
NullCheck(L_2);
int32_t L_3 = List_1_get_Count_m1394854046(L_2, /*hidden argument*/List_1_get_Count_m1394854046_MethodInfo_var);
List_1_t2700613161 * L_4 = (List_1_t2700613161 *)il2cpp_codegen_object_new(List_1_t2700613161_il2cpp_TypeInfo_var);
List_1__ctor_m3477244707(L_4, ((int32_t)((int32_t)L_1+(int32_t)L_3)), /*hidden argument*/List_1__ctor_m3477244707_MethodInfo_var);
V_0 = L_4;
List_1_t2700613161 * L_5 = __this->get_m_connections_3();
List_1_t2700613161 * L_6 = L_5;
V_4 = L_6;
Monitor_Enter_m2136705809(NULL /*static, unused*/, L_6, /*hidden argument*/NULL);
}
IL_0040:
try
{ // begin try (depth: 1)
{
List_1_t2700613161 * L_7 = __this->get_m_connections_3();
NullCheck(L_7);
Enumerator_t2235342835 L_8 = List_1_GetEnumerator_m1905895923(L_7, /*hidden argument*/List_1_GetEnumerator_m1905895923_MethodInfo_var);
V_5 = L_8;
}
IL_004f:
try
{ // begin try (depth: 2)
{
goto IL_006b;
}
IL_0051:
{
NetConnection_t3331492029 * L_9 = Enumerator_get_Current_m2264966067((&V_5), /*hidden argument*/Enumerator_get_Current_m2264966067_MethodInfo_var);
V_1 = L_9;
NetConnection_t3331492029 * L_10 = V_1;
V_6 = (bool)((((Il2CppObject*)(NetConnection_t3331492029 *)L_10) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0);
bool L_11 = V_6;
if (L_11)
{
goto IL_006b;
}
}
IL_0063:
{
List_1_t2700613161 * L_12 = V_0;
NetConnection_t3331492029 * L_13 = V_1;
NullCheck(L_12);
List_1_Add_m2801045858(L_12, L_13, /*hidden argument*/List_1_Add_m2801045858_MethodInfo_var);
}
IL_006b:
{
bool L_14 = Enumerator_MoveNext_m1275401007((&V_5), /*hidden argument*/Enumerator_MoveNext_m1275401007_MethodInfo_var);
V_6 = L_14;
bool L_15 = V_6;
if (L_15)
{
goto IL_0051;
}
}
IL_0078:
{
IL2CPP_LEAVE(0x89, FINALLY_007a);
}
} // end try (depth: 2)
catch(Il2CppExceptionWrapper& e)
{
__last_unhandled_exception = (Exception_t1927440687 *)e.ex;
goto FINALLY_007a;
}
FINALLY_007a:
{ // begin finally (depth: 2)
Enumerator_Dispose_m2177334822((&V_5), /*hidden argument*/Enumerator_Dispose_m2177334822_MethodInfo_var);
IL2CPP_END_FINALLY(122)
} // end finally (depth: 2)
IL2CPP_CLEANUP(122)
{
IL2CPP_JUMP_TBL(0x89, IL_0089)
IL2CPP_RETHROW_IF_UNHANDLED(Exception_t1927440687 *)
}
IL_0089:
{
IL2CPP_LEAVE(0x96, FINALLY_008d);
}
} // end try (depth: 1)
catch(Il2CppExceptionWrapper& e)
{
__last_unhandled_exception = (Exception_t1927440687 *)e.ex;
goto FINALLY_008d;
}
FINALLY_008d:
{ // begin finally (depth: 1)
List_1_t2700613161 * L_16 = V_4;
Monitor_Exit_m2677760297(NULL /*static, unused*/, L_16, /*hidden argument*/NULL);
IL2CPP_END_FINALLY(141)
} // end finally (depth: 1)
IL2CPP_CLEANUP(141)
{
IL2CPP_JUMP_TBL(0x96, IL_0096)
IL2CPP_RETHROW_IF_UNHANDLED(Exception_t1927440687 *)
}
IL_0096:
{
Dictionary_2_t3898409514 * L_17 = __this->get_m_handshakes_24();
Dictionary_2_t3898409514 * L_18 = L_17;
V_7 = L_18;
Monitor_Enter_m2136705809(NULL /*static, unused*/, L_18, /*hidden argument*/NULL);
}
IL_00a6:
try
{ // begin try (depth: 1)
{
Dictionary_2_t3898409514 * L_19 = __this->get_m_handshakes_24();
NullCheck(L_19);
ValueCollection_t2601469357 * L_20 = Dictionary_2_get_Values_m2081171493(L_19, /*hidden argument*/Dictionary_2_get_Values_m2081171493_MethodInfo_var);
NullCheck(L_20);
Enumerator_t1289974982 L_21 = ValueCollection_GetEnumerator_m4258835047(L_20, /*hidden argument*/ValueCollection_GetEnumerator_m4258835047_MethodInfo_var);
V_8 = L_21;
}
IL_00ba:
try
{ // begin try (depth: 2)
{
goto IL_00e0;
}
IL_00bc:
{
NetConnection_t3331492029 * L_22 = Enumerator_get_Current_m1025502873((&V_8), /*hidden argument*/Enumerator_get_Current_m1025502873_MethodInfo_var);
V_2 = L_22;
NetConnection_t3331492029 * L_23 = V_2;
if (!L_23)
{
goto IL_00d0;
}
}
IL_00c7:
{
List_1_t2700613161 * L_24 = V_0;
NetConnection_t3331492029 * L_25 = V_2;
NullCheck(L_24);
bool L_26 = List_1_Contains_m4168039338(L_24, L_25, /*hidden argument*/List_1_Contains_m4168039338_MethodInfo_var);
G_B16_0 = ((int32_t)(L_26));
goto IL_00d1;
}
IL_00d0:
{
G_B16_0 = 1;
}
IL_00d1:
{
V_6 = (bool)G_B16_0;
bool L_27 = V_6;
if (L_27)
{
goto IL_00e0;
}
}
IL_00d8:
{
List_1_t2700613161 * L_28 = V_0;
NetConnection_t3331492029 * L_29 = V_2;
NullCheck(L_28);
List_1_Add_m2801045858(L_28, L_29, /*hidden argument*/List_1_Add_m2801045858_MethodInfo_var);
}
IL_00e0:
{
bool L_30 = Enumerator_MoveNext_m3140744238((&V_8), /*hidden argument*/Enumerator_MoveNext_m3140744238_MethodInfo_var);
V_6 = L_30;
bool L_31 = V_6;
if (L_31)
{
goto IL_00bc;
}
}
IL_00ed:
{
IL2CPP_LEAVE(0xFE, FINALLY_00ef);
}
} // end try (depth: 2)
catch(Il2CppExceptionWrapper& e)
{
__last_unhandled_exception = (Exception_t1927440687 *)e.ex;
goto FINALLY_00ef;
}
FINALLY_00ef:
{ // begin finally (depth: 2)
Enumerator_Dispose_m622234141((&V_8), /*hidden argument*/Enumerator_Dispose_m622234141_MethodInfo_var);
IL2CPP_END_FINALLY(239)
} // end finally (depth: 2)
IL2CPP_CLEANUP(239)
{
IL2CPP_JUMP_TBL(0xFE, IL_00fe)
IL2CPP_RETHROW_IF_UNHANDLED(Exception_t1927440687 *)
}
IL_00fe:
{
IL2CPP_LEAVE(0x10B, FINALLY_0102);
}
} // end try (depth: 1)
catch(Il2CppExceptionWrapper& e)
{
__last_unhandled_exception = (Exception_t1927440687 *)e.ex;
goto FINALLY_0102;
}
FINALLY_0102:
{ // begin finally (depth: 1)
Dictionary_2_t3898409514 * L_32 = V_7;
Monitor_Exit_m2677760297(NULL /*static, unused*/, L_32, /*hidden argument*/NULL);
IL2CPP_END_FINALLY(258)
} // end finally (depth: 1)
IL2CPP_CLEANUP(258)
{
IL2CPP_JUMP_TBL(0x10B, IL_010b)
IL2CPP_RETHROW_IF_UNHANDLED(Exception_t1927440687 *)
}
IL_010b:
{
List_1_t2700613161 * L_33 = V_0;
NullCheck(L_33);
Enumerator_t2235342835 L_34 = List_1_GetEnumerator_m1905895923(L_33, /*hidden argument*/List_1_GetEnumerator_m1905895923_MethodInfo_var);
V_5 = L_34;
}
IL_0115:
try
{ // begin try (depth: 1)
{
goto IL_012c;
}
IL_0117:
{
NetConnection_t3331492029 * L_35 = Enumerator_get_Current_m2264966067((&V_5), /*hidden argument*/Enumerator_get_Current_m2264966067_MethodInfo_var);
V_1 = L_35;
NetConnection_t3331492029 * L_36 = V_1;
String_t* L_37 = __this->get_m_shutdownReason_5();
NullCheck(L_36);
NetConnection_Shutdown_m3044084954(L_36, L_37, /*hidden argument*/NULL);
}
IL_012c:
{
bool L_38 = Enumerator_MoveNext_m1275401007((&V_5), /*hidden argument*/Enumerator_MoveNext_m1275401007_MethodInfo_var);
V_6 = L_38;
bool L_39 = V_6;
if (L_39)
{
goto IL_0117;
}
}
IL_0139:
{
IL2CPP_LEAVE(0x14A, FINALLY_013b);
}
} // end try (depth: 1)
catch(Il2CppExceptionWrapper& e)
{
__last_unhandled_exception = (Exception_t1927440687 *)e.ex;
goto FINALLY_013b;
}
FINALLY_013b:
{ // begin finally (depth: 1)
Enumerator_Dispose_m2177334822((&V_5), /*hidden argument*/Enumerator_Dispose_m2177334822_MethodInfo_var);
IL2CPP_END_FINALLY(315)
} // end finally (depth: 1)
IL2CPP_CLEANUP(315)
{
IL2CPP_JUMP_TBL(0x14A, IL_014a)
IL2CPP_RETHROW_IF_UNHANDLED(Exception_t1927440687 *)
}
IL_014a:
{
NetPeer_FlushDelayedPackets_m2271676463(__this, /*hidden argument*/NULL);
NetPeer_Heartbeat_m4039216740(__this, /*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(NetUtility_t3562260209_il2cpp_TypeInfo_var);
NetUtility_Sleep_m886463228(NULL /*static, unused*/, ((int32_t)10), /*hidden argument*/NULL);
Il2CppObject * L_40 = __this->get_m_initializeLock_15();
Il2CppObject * L_41 = L_40;
V_9 = L_41;
Monitor_Enter_m2136705809(NULL /*static, unused*/, L_41, /*hidden argument*/NULL);
}
IL_0170:
try
{ // begin try (depth: 1)
{
}
IL_0171:
try
{ // begin try (depth: 2)
{
Socket_t3821512045 * L_42 = __this->get_m_socket_10();
V_6 = (bool)((((Il2CppObject*)(Socket_t3821512045 *)L_42) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0);
bool L_43 = V_6;
if (L_43)
{
goto IL_01df;
}
}
IL_0181:
{
}
IL_0182:
try
{ // begin try (depth: 3)
Socket_t3821512045 * L_44 = __this->get_m_socket_10();
NullCheck(L_44);
Socket_Shutdown_m4200427980(L_44, 0, /*hidden argument*/NULL);
goto IL_01af;
} // end try (depth: 3)
catch(Il2CppExceptionWrapper& e)
{
__exception_local = (Exception_t1927440687 *)e.ex;
if(il2cpp_codegen_class_is_assignable_from (Exception_t1927440687_il2cpp_TypeInfo_var, e.ex->object.klass))
goto CATCH_0193;
throw e;
}
CATCH_0193:
{ // begin catch(System.Exception)
V_3 = ((Exception_t1927440687 *)__exception_local);
Exception_t1927440687 * L_45 = V_3;
NullCheck(L_45);
String_t* L_46 = VirtFuncInvoker0< String_t* >::Invoke(3 /* System.String System.Object::ToString() */, L_45);
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_47 = String_Concat_m2596409543(NULL /*static, unused*/, _stringLiteral2728614686, L_46, /*hidden argument*/NULL);
NetPeer_LogDebug_m2983960595(__this, L_47, /*hidden argument*/NULL);
goto IL_01af;
} // end catch (depth: 3)
IL_01af:
{
}
IL_01b0:
try
{ // begin try (depth: 3)
Socket_t3821512045 * L_48 = __this->get_m_socket_10();
NullCheck(L_48);
Socket_Close_m2025852140(L_48, 2, /*hidden argument*/NULL);
goto IL_01dd;
} // end try (depth: 3)
catch(Il2CppExceptionWrapper& e)
{
__exception_local = (Exception_t1927440687 *)e.ex;
if(il2cpp_codegen_class_is_assignable_from (Exception_t1927440687_il2cpp_TypeInfo_var, e.ex->object.klass))
goto CATCH_01c1;
throw e;
}
CATCH_01c1:
{ // begin catch(System.Exception)
V_3 = ((Exception_t1927440687 *)__exception_local);
Exception_t1927440687 * L_49 = V_3;
NullCheck(L_49);
String_t* L_50 = VirtFuncInvoker0< String_t* >::Invoke(3 /* System.String System.Object::ToString() */, L_49);
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_51 = String_Concat_m2596409543(NULL /*static, unused*/, _stringLiteral1328456286, L_50, /*hidden argument*/NULL);
NetPeer_LogDebug_m2983960595(__this, L_51, /*hidden argument*/NULL);
goto IL_01dd;
} // end catch (depth: 3)
IL_01dd:
{
}
IL_01df:
{
IL2CPP_LEAVE(0x21A, FINALLY_01e2);
}
} // end try (depth: 2)
catch(Il2CppExceptionWrapper& e)
{
__last_unhandled_exception = (Exception_t1927440687 *)e.ex;
goto FINALLY_01e2;
}
FINALLY_01e2:
{ // begin finally (depth: 2)
{
__this->set_m_socket_10((Socket_t3821512045 *)NULL);
__this->set_m_status_8(0);
NetPeer_LogDebug_m2983960595(__this, _stringLiteral799260213, /*hidden argument*/NULL);
AutoResetEvent_t15112628 * L_52 = __this->get_m_messageReceivedEvent_28();
V_6 = (bool)((((Il2CppObject*)(AutoResetEvent_t15112628 *)L_52) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0);
bool L_53 = V_6;
if (L_53)
{
goto IL_0218;
}
}
IL_020c:
{
AutoResetEvent_t15112628 * L_54 = __this->get_m_messageReceivedEvent_28();
NullCheck(L_54);
EventWaitHandle_Set_m2975776670(L_54, /*hidden argument*/NULL);
}
IL_0218:
{
IL2CPP_END_FINALLY(482)
}
} // end finally (depth: 2)
IL2CPP_CLEANUP(482)
{
IL2CPP_JUMP_TBL(0x21A, IL_021a)
IL2CPP_RETHROW_IF_UNHANDLED(Exception_t1927440687 *)
}
IL_021a:
{
__this->set_m_lastSocketBind_18((-3.4028234663852886E+38));
__this->set_m_receiveBuffer_12((ByteU5BU5D_t3397334013*)NULL);
__this->set_m_sendBuffer_11((ByteU5BU5D_t3397334013*)NULL);
NetQueue_1_t1703294902 * L_55 = __this->get_m_unsentUnconnectedMessages_23();
NullCheck(L_55);
NetQueue_1_Clear_m3067589550(L_55, /*hidden argument*/NetQueue_1_Clear_m3067589550_MethodInfo_var);
List_1_t2700613161 * L_56 = __this->get_m_connections_3();
NullCheck(L_56);
List_1_Clear_m3383322207(L_56, /*hidden argument*/List_1_Clear_m3383322207_MethodInfo_var);
Dictionary_2_t3898409514 * L_57 = __this->get_m_connectionLookup_4();
NullCheck(L_57);
Dictionary_2_Clear_m1586068996(L_57, /*hidden argument*/Dictionary_2_Clear_m1586068996_MethodInfo_var);
Dictionary_2_t3898409514 * L_58 = __this->get_m_handshakes_24();
NullCheck(L_58);
Dictionary_2_Clear_m1586068996(L_58, /*hidden argument*/Dictionary_2_Clear_m1586068996_MethodInfo_var);
IL2CPP_LEAVE(0x274, FINALLY_026b);
}
} // end try (depth: 1)
catch(Il2CppExceptionWrapper& e)
{
__last_unhandled_exception = (Exception_t1927440687 *)e.ex;
goto FINALLY_026b;
}
FINALLY_026b:
{ // begin finally (depth: 1)
Il2CppObject * L_59 = V_9;
Monitor_Exit_m2677760297(NULL /*static, unused*/, L_59, /*hidden argument*/NULL);
IL2CPP_END_FINALLY(619)
} // end finally (depth: 1)
IL2CPP_CLEANUP(619)
{
IL2CPP_JUMP_TBL(0x274, IL_0274)
IL2CPP_RETHROW_IF_UNHANDLED(Exception_t1927440687 *)
}
IL_0274:
{
goto IL_0277;
}
IL_0277:
{
return;
}
}
// System.Void Lidgren.Network.NetPeer::Heartbeat()
extern Il2CppClass* NetTime_t3056501352_il2cpp_TypeInfo_var;
extern Il2CppClass* SocketException_t1618573604_il2cpp_TypeInfo_var;
extern Il2CppClass* String_t_il2cpp_TypeInfo_var;
extern Il2CppClass* IPEndPoint_t2615413766_il2cpp_TypeInfo_var;
extern Il2CppClass* Encoding_t663144255_il2cpp_TypeInfo_var;
extern Il2CppClass* Exception_t1927440687_il2cpp_TypeInfo_var;
extern Il2CppClass* NetUtility_t3562260209_il2cpp_TypeInfo_var;
extern Il2CppClass* ObjectU5BU5D_t3614634134_il2cpp_TypeInfo_var;
extern Il2CppClass* Int32_t2071877448_il2cpp_TypeInfo_var;
extern Il2CppClass* NetMessageType_t191235414_il2cpp_TypeInfo_var;
extern const MethodInfo* List_1_get_Count_m1394854046_MethodInfo_var;
extern const MethodInfo* Dictionary_2_GetEnumerator_m3728096743_MethodInfo_var;
extern const MethodInfo* Enumerator_get_Current_m2227275631_MethodInfo_var;
extern const MethodInfo* KeyValuePair_2_get_Value_m1515431574_MethodInfo_var;
extern const MethodInfo* KeyValuePair_2_get_Key_m4001602897_MethodInfo_var;
extern const MethodInfo* Dictionary_2_ContainsKey_m2053216074_MethodInfo_var;
extern const MethodInfo* Dictionary_2_Remove_m2570672626_MethodInfo_var;
extern const MethodInfo* Enumerator_MoveNext_m586729744_MethodInfo_var;
extern const MethodInfo* Enumerator_Dispose_m2896629615_MethodInfo_var;
extern const MethodInfo* List_1_get_Item_m1684201913_MethodInfo_var;
extern const MethodInfo* List_1_RemoveAt_m3633877100_MethodInfo_var;
extern const MethodInfo* NetQueue_1_TryDequeue_m504151096_MethodInfo_var;
extern const MethodInfo* Dictionary_2_TryGetValue_m2698685646_MethodInfo_var;
extern Il2CppCodeGenString* _stringLiteral2944197306;
extern Il2CppCodeGenString* _stringLiteral1648757208;
extern Il2CppCodeGenString* _stringLiteral3329200195;
extern Il2CppCodeGenString* _stringLiteral701915360;
extern Il2CppCodeGenString* _stringLiteral671997955;
extern Il2CppCodeGenString* _stringLiteral1880305331;
extern Il2CppCodeGenString* _stringLiteral409666631;
extern Il2CppCodeGenString* _stringLiteral372029345;
extern Il2CppCodeGenString* _stringLiteral1189522563;
extern Il2CppCodeGenString* _stringLiteral3718723205;
extern Il2CppCodeGenString* _stringLiteral986412037;
extern Il2CppCodeGenString* _stringLiteral89479935;
extern Il2CppCodeGenString* _stringLiteral3099179458;
extern Il2CppCodeGenString* _stringLiteral4166804854;
extern const uint32_t NetPeer_Heartbeat_m4039216740_MetadataUsageId;
extern "C" void NetPeer_Heartbeat_m4039216740 (NetPeer_t1779390221 * __this, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetPeer_Heartbeat_m4039216740_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
double V_0 = 0.0;
double V_1 = 0.0;
int32_t V_2 = 0;
KeyValuePair_2_t1655754736 V_3;
memset(&V_3, 0, sizeof(V_3));
NetConnection_t3331492029 * V_4 = NULL;
int32_t V_5 = 0;
NetTuple_2_t3781571512 V_6;
memset(&V_6, 0, sizeof(V_6));
NetOutgoingMessage_t2016542980 * V_7 = NULL;
int32_t V_8 = 0;
bool V_9 = false;
int32_t V_10 = 0;
SocketException_t1618573604 * V_11 = NULL;
IPEndPoint_t2615413766 * V_12 = NULL;
String_t* V_13 = NULL;
Exception_t1927440687 * V_14 = NULL;
NetConnection_t3331492029 * V_15 = NULL;
int32_t V_16 = 0;
int32_t V_17 = 0;
int32_t V_18 = 0;
uint8_t V_19 = 0;
uint8_t V_20 = 0x0;
uint8_t V_21 = 0x0;
bool V_22 = false;
uint16_t V_23 = 0;
uint16_t V_24 = 0;
int32_t V_25 = 0;
NetIncomingMessage_t2014089816 * V_26 = NULL;
bool V_27 = false;
Enumerator_t923466920 V_28;
memset(&V_28, 0, sizeof(V_28));
List_1_t2700613161 * V_29 = NULL;
int32_t V_30 = 0;
ObjectU5BU5D_t3614634134* V_31 = NULL;
Exception_t1927440687 * __last_unhandled_exception = 0;
NO_UNUSED_WARNING (__last_unhandled_exception);
Exception_t1927440687 * __exception_local = 0;
NO_UNUSED_WARNING (__exception_local);
int32_t __leave_target = 0;
NO_UNUSED_WARNING (__leave_target);
int32_t G_B5_0 = 0;
int32_t G_B14_0 = 0;
int32_t G_B18_0 = 0;
int32_t G_B29_0 = 0;
int32_t G_B66_0 = 0;
int32_t G_B70_0 = 0;
int32_t G_B83_0 = 0;
int32_t G_B93_0 = 0;
{
NetPeer_VerifyNetworkThread_m4075953563(__this, /*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(NetTime_t3056501352_il2cpp_TypeInfo_var);
double L_0 = NetTime_get_Now_m1609702533(NULL /*static, unused*/, /*hidden argument*/NULL);
V_0 = L_0;
double L_1 = V_0;
double L_2 = __this->get_m_lastHeartbeat_17();
V_1 = ((double)((double)L_1-(double)L_2));
List_1_t2700613161 * L_3 = __this->get_m_connections_3();
NullCheck(L_3);
int32_t L_4 = List_1_get_Count_m1394854046(L_3, /*hidden argument*/List_1_get_Count_m1394854046_MethodInfo_var);
V_2 = ((int32_t)((int32_t)((int32_t)1250)-(int32_t)L_4));
int32_t L_5 = V_2;
V_27 = (bool)((((int32_t)((((int32_t)L_5) < ((int32_t)((int32_t)250)))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_6 = V_27;
if (L_6)
{
goto IL_0040;
}
}
{
V_2 = ((int32_t)250);
}
IL_0040:
{
double L_7 = V_1;
int32_t L_8 = V_2;
if ((((double)L_7) > ((double)((double)((double)(1.0)/(double)(((double)((double)L_8))))))))
{
goto IL_0060;
}
}
{
double L_9 = V_1;
G_B5_0 = ((((int32_t)((((double)L_9) < ((double)(0.0)))? 1 : 0)) == ((int32_t)0))? 1 : 0);
goto IL_0061;
}
IL_0060:
{
G_B5_0 = 0;
}
IL_0061:
{
V_27 = (bool)G_B5_0;
bool L_10 = V_27;
if (L_10)
{
goto IL_02bc;
}
}
{
uint32_t L_11 = __this->get_m_frameCounter_16();
__this->set_m_frameCounter_16(((int32_t)((int32_t)L_11+(int32_t)1)));
double L_12 = V_0;
__this->set_m_lastHeartbeat_17(L_12);
uint32_t L_13 = __this->get_m_frameCounter_16();
V_27 = (bool)((((int32_t)((((int32_t)((int32_t)((uint32_t)(int32_t)L_13%(uint32_t)(int32_t)3))) == ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_14 = V_27;
if (L_14)
{
goto IL_017b;
}
}
{
Dictionary_2_t3898409514 * L_15 = __this->get_m_handshakes_24();
NullCheck(L_15);
Enumerator_t923466920 L_16 = Dictionary_2_GetEnumerator_m3728096743(L_15, /*hidden argument*/Dictionary_2_GetEnumerator_m3728096743_MethodInfo_var);
V_28 = L_16;
}
IL_00a7:
try
{ // begin try (depth: 1)
{
goto IL_0158;
}
IL_00ac:
{
KeyValuePair_2_t1655754736 L_17 = Enumerator_get_Current_m2227275631((&V_28), /*hidden argument*/Enumerator_get_Current_m2227275631_MethodInfo_var);
V_3 = L_17;
NetConnection_t3331492029 * L_18 = KeyValuePair_2_get_Value_m1515431574((&V_3), /*hidden argument*/KeyValuePair_2_get_Value_m1515431574_MethodInfo_var);
V_4 = L_18;
IPEndPoint_t2615413766 * L_19 = KeyValuePair_2_get_Key_m4001602897((&V_3), /*hidden argument*/KeyValuePair_2_get_Key_m4001602897_MethodInfo_var);
IPEndPoint_t2615413766 * L_20 = KeyValuePair_2_get_Key_m4001602897((&V_3), /*hidden argument*/KeyValuePair_2_get_Key_m4001602897_MethodInfo_var);
V_27 = (bool)((((Il2CppObject*)(IPEndPoint_t2615413766 *)L_19) == ((Il2CppObject*)(IPEndPoint_t2615413766 *)L_20))? 1 : 0);
bool L_21 = V_27;
if (L_21)
{
goto IL_00e0;
}
}
IL_00d4:
{
NetPeer_LogWarning_m3266657906(__this, _stringLiteral2944197306, /*hidden argument*/NULL);
}
IL_00e0:
{
NetConnection_t3331492029 * L_22 = V_4;
double L_23 = V_0;
NullCheck(L_22);
NetConnection_UnconnectedHeartbeat_m3795858382(L_22, L_23, /*hidden argument*/NULL);
NetConnection_t3331492029 * L_24 = V_4;
NullCheck(L_24);
int32_t L_25 = L_24->get_m_status_2();
if ((((int32_t)L_25) == ((int32_t)5)))
{
goto IL_0102;
}
}
IL_00f3:
{
NetConnection_t3331492029 * L_26 = V_4;
NullCheck(L_26);
int32_t L_27 = L_26->get_m_status_2();
G_B14_0 = ((((int32_t)((((int32_t)L_27) == ((int32_t)7))? 1 : 0)) == ((int32_t)0))? 1 : 0);
goto IL_0103;
}
IL_0102:
{
G_B14_0 = 0;
}
IL_0103:
{
V_27 = (bool)G_B14_0;
bool L_28 = V_27;
if (L_28)
{
goto IL_0157;
}
}
IL_010a:
{
NetConnection_t3331492029 * L_29 = V_4;
NullCheck(L_29);
int32_t L_30 = L_29->get_m_status_2();
if ((!(((uint32_t)L_30) == ((uint32_t)7))))
{
goto IL_012c;
}
}
IL_0115:
{
Dictionary_2_t3898409514 * L_31 = __this->get_m_handshakes_24();
NetConnection_t3331492029 * L_32 = V_4;
NullCheck(L_32);
IPEndPoint_t2615413766 * L_33 = NetConnection_get_RemoteEndPoint_m1562753089(L_32, /*hidden argument*/NULL);
NullCheck(L_31);
bool L_34 = Dictionary_2_ContainsKey_m2053216074(L_31, L_33, /*hidden argument*/Dictionary_2_ContainsKey_m2053216074_MethodInfo_var);
G_B18_0 = ((((int32_t)L_34) == ((int32_t)0))? 1 : 0);
goto IL_012d;
}
IL_012c:
{
G_B18_0 = 1;
}
IL_012d:
{
V_27 = (bool)G_B18_0;
bool L_35 = V_27;
if (L_35)
{
goto IL_0155;
}
}
IL_0134:
{
NetPeer_LogWarning_m3266657906(__this, _stringLiteral1648757208, /*hidden argument*/NULL);
Dictionary_2_t3898409514 * L_36 = __this->get_m_handshakes_24();
NetConnection_t3331492029 * L_37 = V_4;
NullCheck(L_37);
IPEndPoint_t2615413766 * L_38 = NetConnection_get_RemoteEndPoint_m1562753089(L_37, /*hidden argument*/NULL);
NullCheck(L_36);
Dictionary_2_Remove_m2570672626(L_36, L_38, /*hidden argument*/Dictionary_2_Remove_m2570672626_MethodInfo_var);
}
IL_0155:
{
goto IL_0168;
}
IL_0157:
{
}
IL_0158:
{
bool L_39 = Enumerator_MoveNext_m586729744((&V_28), /*hidden argument*/Enumerator_MoveNext_m586729744_MethodInfo_var);
V_27 = L_39;
bool L_40 = V_27;
if (L_40)
{
goto IL_00ac;
}
}
IL_0168:
{
IL2CPP_LEAVE(0x179, FINALLY_016a);
}
} // end try (depth: 1)
catch(Il2CppExceptionWrapper& e)
{
__last_unhandled_exception = (Exception_t1927440687 *)e.ex;
goto FINALLY_016a;
}
FINALLY_016a:
{ // begin finally (depth: 1)
Enumerator_Dispose_m2896629615((&V_28), /*hidden argument*/Enumerator_Dispose_m2896629615_MethodInfo_var);
IL2CPP_END_FINALLY(362)
} // end finally (depth: 1)
IL2CPP_CLEANUP(362)
{
IL2CPP_JUMP_TBL(0x179, IL_0179)
IL2CPP_RETHROW_IF_UNHANDLED(Exception_t1927440687 *)
}
IL_0179:
{
}
IL_017b:
{
NetPeer_SendDelayedPackets_m213428423(__this, /*hidden argument*/NULL);
NetPeerConfiguration_t136603591 * L_41 = __this->get_m_configuration_21();
NullCheck(L_41);
bool L_42 = L_41->get_m_autoFlushSendQueue_13();
if (!L_42)
{
goto IL_019a;
}
}
{
bool L_43 = __this->get_m_needFlushSendQueue_20();
G_B29_0 = ((((int32_t)L_43) == ((int32_t)0))? 1 : 0);
goto IL_019b;
}
IL_019a:
{
G_B29_0 = 1;
}
IL_019b:
{
V_27 = (bool)G_B29_0;
bool L_44 = V_27;
if (L_44)
{
goto IL_01b2;
}
}
{
__this->set_m_executeFlushSendQueue_27((bool)1);
__this->set_m_needFlushSendQueue_20((bool)0);
}
IL_01b2:
{
List_1_t2700613161 * L_45 = __this->get_m_connections_3();
List_1_t2700613161 * L_46 = L_45;
V_29 = L_46;
Monitor_Enter_m2136705809(NULL /*static, unused*/, L_46, /*hidden argument*/NULL);
}
IL_01c1:
try
{ // begin try (depth: 1)
{
List_1_t2700613161 * L_47 = __this->get_m_connections_3();
NullCheck(L_47);
int32_t L_48 = List_1_get_Count_m1394854046(L_47, /*hidden argument*/List_1_get_Count_m1394854046_MethodInfo_var);
V_5 = ((int32_t)((int32_t)L_48-(int32_t)1));
goto IL_022f;
}
IL_01d3:
{
List_1_t2700613161 * L_49 = __this->get_m_connections_3();
int32_t L_50 = V_5;
NullCheck(L_49);
NetConnection_t3331492029 * L_51 = List_1_get_Item_m1684201913(L_49, L_50, /*hidden argument*/List_1_get_Item_m1684201913_MethodInfo_var);
V_4 = L_51;
NetConnection_t3331492029 * L_52 = V_4;
double L_53 = V_0;
uint32_t L_54 = __this->get_m_frameCounter_16();
NullCheck(L_52);
NetConnection_Heartbeat_m3721342474(L_52, L_53, L_54, /*hidden argument*/NULL);
NetConnection_t3331492029 * L_55 = V_4;
NullCheck(L_55);
int32_t L_56 = L_55->get_m_status_2();
V_27 = (bool)((((int32_t)((((int32_t)L_56) == ((int32_t)7))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_57 = V_27;
if (L_57)
{
goto IL_0228;
}
}
IL_0205:
{
List_1_t2700613161 * L_58 = __this->get_m_connections_3();
int32_t L_59 = V_5;
NullCheck(L_58);
List_1_RemoveAt_m3633877100(L_58, L_59, /*hidden argument*/List_1_RemoveAt_m3633877100_MethodInfo_var);
Dictionary_2_t3898409514 * L_60 = __this->get_m_connectionLookup_4();
NetConnection_t3331492029 * L_61 = V_4;
NullCheck(L_61);
IPEndPoint_t2615413766 * L_62 = NetConnection_get_RemoteEndPoint_m1562753089(L_61, /*hidden argument*/NULL);
NullCheck(L_60);
Dictionary_2_Remove_m2570672626(L_60, L_62, /*hidden argument*/Dictionary_2_Remove_m2570672626_MethodInfo_var);
}
IL_0228:
{
int32_t L_63 = V_5;
V_5 = ((int32_t)((int32_t)L_63-(int32_t)1));
}
IL_022f:
{
int32_t L_64 = V_5;
V_27 = (bool)((((int32_t)((((int32_t)L_64) < ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_65 = V_27;
if (L_65)
{
goto IL_01d3;
}
}
IL_023d:
{
IL2CPP_LEAVE(0x249, FINALLY_0240);
}
} // end try (depth: 1)
catch(Il2CppExceptionWrapper& e)
{
__last_unhandled_exception = (Exception_t1927440687 *)e.ex;
goto FINALLY_0240;
}
FINALLY_0240:
{ // begin finally (depth: 1)
List_1_t2700613161 * L_66 = V_29;
Monitor_Exit_m2677760297(NULL /*static, unused*/, L_66, /*hidden argument*/NULL);
IL2CPP_END_FINALLY(576)
} // end finally (depth: 1)
IL2CPP_CLEANUP(576)
{
IL2CPP_JUMP_TBL(0x249, IL_0249)
IL2CPP_RETHROW_IF_UNHANDLED(Exception_t1927440687 *)
}
IL_0249:
{
__this->set_m_executeFlushSendQueue_27((bool)0);
goto IL_02a8;
}
IL_0253:
{
NetOutgoingMessage_t2016542980 * L_67 = (&V_6)->get_Item2_1();
V_7 = L_67;
NetOutgoingMessage_t2016542980 * L_68 = V_7;
ByteU5BU5D_t3397334013* L_69 = __this->get_m_sendBuffer_11();
NullCheck(L_68);
int32_t L_70 = NetOutgoingMessage_Encode_m2473987076(L_68, L_69, 0, 0, /*hidden argument*/NULL);
V_8 = L_70;
NetOutgoingMessage_t2016542980 * L_71 = V_7;
NullCheck(L_71);
int32_t* L_72 = L_71->get_address_of_m_recyclingCount_7();
Interlocked_Decrement_m70525859(NULL /*static, unused*/, L_72, /*hidden argument*/NULL);
NetOutgoingMessage_t2016542980 * L_73 = V_7;
NullCheck(L_73);
int32_t L_74 = L_73->get_m_recyclingCount_7();
V_27 = (bool)((((int32_t)L_74) > ((int32_t)0))? 1 : 0);
bool L_75 = V_27;
if (L_75)
{
goto IL_0294;
}
}
{
NetOutgoingMessage_t2016542980 * L_76 = V_7;
NetPeer_Recycle_m2290156780(__this, L_76, /*hidden argument*/NULL);
}
IL_0294:
{
int32_t L_77 = V_8;
IPEndPoint_t2615413766 * L_78 = (&V_6)->get_Item1_0();
NetPeer_SendPacket_m625616909(__this, L_77, L_78, 1, (&V_9), /*hidden argument*/NULL);
}
IL_02a8:
{
NetQueue_1_t1703294902 * L_79 = __this->get_m_unsentUnconnectedMessages_23();
NullCheck(L_79);
bool L_80 = NetQueue_1_TryDequeue_m504151096(L_79, (&V_6), /*hidden argument*/NetQueue_1_TryDequeue_m504151096_MethodInfo_var);
V_27 = L_80;
bool L_81 = V_27;
if (L_81)
{
goto IL_0253;
}
}
{
}
IL_02bc:
{
NetUPnP_t2794379482 * L_82 = __this->get_m_upnp_19();
V_27 = (bool)((((Il2CppObject*)(NetUPnP_t2794379482 *)L_82) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0);
bool L_83 = V_27;
if (L_83)
{
goto IL_02d7;
}
}
{
NetUPnP_t2794379482 * L_84 = __this->get_m_upnp_19();
NullCheck(L_84);
NetUPnP_CheckForDiscoveryTimeout_m1059646905(L_84, /*hidden argument*/NULL);
}
IL_02d7:
{
Socket_t3821512045 * L_85 = __this->get_m_socket_10();
V_27 = (bool)((((int32_t)((((Il2CppObject*)(Socket_t3821512045 *)L_85) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_86 = V_27;
if (L_86)
{
goto IL_02ee;
}
}
{
goto IL_0780;
}
IL_02ee:
{
Socket_t3821512045 * L_87 = __this->get_m_socket_10();
NullCheck(L_87);
bool L_88 = Socket_Poll_m2898913906(L_87, ((int32_t)1000), 0, /*hidden argument*/NULL);
V_27 = L_88;
bool L_89 = V_27;
if (L_89)
{
goto IL_030a;
}
}
{
goto IL_0780;
}
IL_030a:
{
IL2CPP_RUNTIME_CLASS_INIT(NetTime_t3056501352_il2cpp_TypeInfo_var);
double L_90 = NetTime_get_Now_m1609702533(NULL /*static, unused*/, /*hidden argument*/NULL);
V_0 = L_90;
}
IL_0310:
{
V_10 = 0;
}
IL_0314:
try
{ // begin try (depth: 1)
Socket_t3821512045 * L_91 = __this->get_m_socket_10();
ByteU5BU5D_t3397334013* L_92 = __this->get_m_receiveBuffer_12();
ByteU5BU5D_t3397334013* L_93 = __this->get_m_receiveBuffer_12();
NullCheck(L_93);
EndPoint_t4156119363 ** L_94 = __this->get_address_of_m_senderRemote_14();
NullCheck(L_91);
int32_t L_95 = Socket_ReceiveFrom_m376318322(L_91, L_92, 0, (((int32_t)((int32_t)(((Il2CppArray *)L_93)->max_length)))), 0, L_94, /*hidden argument*/NULL);
V_10 = L_95;
goto IL_0396;
} // end try (depth: 1)
catch(Il2CppExceptionWrapper& e)
{
__exception_local = (Exception_t1927440687 *)e.ex;
if(il2cpp_codegen_class_is_assignable_from (SocketException_t1618573604_il2cpp_TypeInfo_var, e.ex->object.klass))
goto CATCH_033b;
throw e;
}
CATCH_033b:
{ // begin catch(System.Net.Sockets.SocketException)
{
V_11 = ((SocketException_t1618573604 *)__exception_local);
SocketException_t1618573604 * L_96 = V_11;
NullCheck(L_96);
int32_t L_97 = SocketException_get_SocketErrorCode_m3898993591(L_96, /*hidden argument*/NULL);
V_30 = L_97;
int32_t L_98 = V_30;
if ((((int32_t)L_98) == ((int32_t)((int32_t)10054))))
{
goto IL_035b;
}
}
IL_0350:
{
int32_t L_99 = V_30;
if ((((int32_t)L_99) == ((int32_t)((int32_t)10057))))
{
goto IL_036c;
}
}
IL_0359:
{
goto IL_0379;
}
IL_035b:
{
NetPeer_LogWarning_m3266657906(__this, _stringLiteral3329200195, /*hidden argument*/NULL);
goto IL_0780;
}
IL_036c:
{
NetPeer_BindSocket_m3838079755(__this, (bool)1, /*hidden argument*/NULL);
goto IL_0780;
}
IL_0379:
{
SocketException_t1618573604 * L_100 = V_11;
NullCheck(L_100);
String_t* L_101 = VirtFuncInvoker0< String_t* >::Invoke(3 /* System.String System.Object::ToString() */, L_100);
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_102 = String_Concat_m2596409543(NULL /*static, unused*/, _stringLiteral701915360, L_101, /*hidden argument*/NULL);
NetPeer_LogWarning_m3266657906(__this, L_102, /*hidden argument*/NULL);
goto IL_0780;
}
} // end catch (depth: 1)
IL_0396:
{
int32_t L_103 = V_10;
V_27 = (bool)((((int32_t)((((int32_t)L_103) < ((int32_t)5))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_104 = V_27;
if (L_104)
{
goto IL_03aa;
}
}
{
goto IL_0780;
}
IL_03aa:
{
EndPoint_t4156119363 * L_105 = __this->get_m_senderRemote_14();
V_12 = ((IPEndPoint_t2615413766 *)CastclassClass(L_105, IPEndPoint_t2615413766_il2cpp_TypeInfo_var));
NetUPnP_t2794379482 * L_106 = __this->get_m_upnp_19();
if (!L_106)
{
goto IL_03d8;
}
}
{
double L_107 = V_0;
NetUPnP_t2794379482 * L_108 = __this->get_m_upnp_19();
NullCheck(L_108);
double L_109 = L_108->get_m_discoveryResponseDeadline_4();
if ((!(((double)L_107) < ((double)L_109))))
{
goto IL_03d8;
}
}
{
int32_t L_110 = V_10;
G_B66_0 = ((((int32_t)((((int32_t)L_110) > ((int32_t)((int32_t)32)))? 1 : 0)) == ((int32_t)0))? 1 : 0);
goto IL_03d9;
}
IL_03d8:
{
G_B66_0 = 1;
}
IL_03d9:
{
V_27 = (bool)G_B66_0;
bool L_111 = V_27;
if (L_111)
{
goto IL_048e;
}
}
{
IL2CPP_RUNTIME_CLASS_INIT(Encoding_t663144255_il2cpp_TypeInfo_var);
Encoding_t663144255 * L_112 = Encoding_get_UTF8_m1752852937(NULL /*static, unused*/, /*hidden argument*/NULL);
ByteU5BU5D_t3397334013* L_113 = __this->get_m_receiveBuffer_12();
int32_t L_114 = V_10;
NullCheck(L_112);
String_t* L_115 = VirtFuncInvoker3< String_t*, ByteU5BU5D_t3397334013*, int32_t, int32_t >::Invoke(21 /* System.String System.Text.Encoding::GetString(System.Byte[],System.Int32,System.Int32) */, L_112, L_113, 0, L_114);
V_13 = L_115;
String_t* L_116 = V_13;
NullCheck(L_116);
bool L_117 = String_Contains_m4017059963(L_116, _stringLiteral671997955, /*hidden argument*/NULL);
if (L_117)
{
goto IL_0418;
}
}
{
String_t* L_118 = V_13;
NullCheck(L_118);
bool L_119 = String_Contains_m4017059963(L_118, _stringLiteral1880305331, /*hidden argument*/NULL);
G_B70_0 = ((((int32_t)L_119) == ((int32_t)0))? 1 : 0);
goto IL_0419;
}
IL_0418:
{
G_B70_0 = 0;
}
IL_0419:
{
V_27 = (bool)G_B70_0;
bool L_120 = V_27;
if (L_120)
{
goto IL_048d;
}
}
{
}
IL_0421:
try
{ // begin try (depth: 1)
String_t* L_121 = V_13;
String_t* L_122 = V_13;
NullCheck(L_122);
String_t* L_123 = String_ToLower_m2994460523(L_122, /*hidden argument*/NULL);
NullCheck(L_123);
int32_t L_124 = String_IndexOf_m4251815737(L_123, _stringLiteral409666631, /*hidden argument*/NULL);
NullCheck(L_121);
String_t* L_125 = String_Substring_m2032624251(L_121, ((int32_t)((int32_t)L_124+(int32_t)((int32_t)9))), /*hidden argument*/NULL);
V_13 = L_125;
String_t* L_126 = V_13;
String_t* L_127 = V_13;
NullCheck(L_127);
int32_t L_128 = String_IndexOf_m4251815737(L_127, _stringLiteral372029345, /*hidden argument*/NULL);
NullCheck(L_126);
String_t* L_129 = String_Substring_m12482732(L_126, 0, L_128, /*hidden argument*/NULL);
NullCheck(L_129);
String_t* L_130 = String_Trim_m2668767713(L_129, /*hidden argument*/NULL);
V_13 = L_130;
NetUPnP_t2794379482 * L_131 = __this->get_m_upnp_19();
String_t* L_132 = V_13;
NullCheck(L_131);
NetUPnP_ExtractServiceUrl_m1890440714(L_131, L_132, /*hidden argument*/NULL);
goto IL_0780;
} // end try (depth: 1)
catch(Il2CppExceptionWrapper& e)
{
__exception_local = (Exception_t1927440687 *)e.ex;
if(il2cpp_codegen_class_is_assignable_from (Exception_t1927440687_il2cpp_TypeInfo_var, e.ex->object.klass))
goto CATCH_046d;
throw e;
}
CATCH_046d:
{ // begin catch(System.Exception)
V_14 = ((Exception_t1927440687 *)__exception_local);
Exception_t1927440687 * L_133 = V_14;
NullCheck(L_133);
String_t* L_134 = VirtFuncInvoker0< String_t* >::Invoke(3 /* System.String System.Object::ToString() */, L_133);
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_135 = String_Concat_m2596409543(NULL /*static, unused*/, _stringLiteral1189522563, L_134, /*hidden argument*/NULL);
NetPeer_LogDebug_m2983960595(__this, L_135, /*hidden argument*/NULL);
goto IL_0780;
} // end catch (depth: 1)
IL_048d:
{
}
IL_048e:
{
V_15 = (NetConnection_t3331492029 *)NULL;
Dictionary_2_t3898409514 * L_136 = __this->get_m_connectionLookup_4();
IPEndPoint_t2615413766 * L_137 = V_12;
NullCheck(L_136);
Dictionary_2_TryGetValue_m2698685646(L_136, L_137, (&V_15), /*hidden argument*/Dictionary_2_TryGetValue_m2698685646_MethodInfo_var);
V_16 = 0;
V_17 = 0;
V_18 = 0;
goto IL_0724;
}
IL_04af:
{
int32_t L_138 = V_16;
V_16 = ((int32_t)((int32_t)L_138+(int32_t)1));
ByteU5BU5D_t3397334013* L_139 = __this->get_m_receiveBuffer_12();
int32_t L_140 = V_18;
int32_t L_141 = L_140;
V_18 = ((int32_t)((int32_t)L_141+(int32_t)1));
NullCheck(L_139);
IL2CPP_ARRAY_BOUNDS_CHECK(L_139, L_141);
int32_t L_142 = L_141;
uint8_t L_143 = (L_139)->GetAt(static_cast<il2cpp_array_size_t>(L_142));
V_19 = L_143;
ByteU5BU5D_t3397334013* L_144 = __this->get_m_receiveBuffer_12();
int32_t L_145 = V_18;
int32_t L_146 = L_145;
V_18 = ((int32_t)((int32_t)L_146+(int32_t)1));
NullCheck(L_144);
IL2CPP_ARRAY_BOUNDS_CHECK(L_144, L_146);
int32_t L_147 = L_146;
uint8_t L_148 = (L_144)->GetAt(static_cast<il2cpp_array_size_t>(L_147));
V_20 = L_148;
ByteU5BU5D_t3397334013* L_149 = __this->get_m_receiveBuffer_12();
int32_t L_150 = V_18;
int32_t L_151 = L_150;
V_18 = ((int32_t)((int32_t)L_151+(int32_t)1));
NullCheck(L_149);
IL2CPP_ARRAY_BOUNDS_CHECK(L_149, L_151);
int32_t L_152 = L_151;
uint8_t L_153 = (L_149)->GetAt(static_cast<il2cpp_array_size_t>(L_152));
V_21 = L_153;
uint8_t L_154 = V_20;
V_22 = (bool)((((int32_t)((int32_t)((int32_t)L_154&(int32_t)1))) == ((int32_t)1))? 1 : 0);
uint8_t L_155 = V_20;
uint8_t L_156 = V_21;
V_23 = (((int32_t)((uint16_t)((int32_t)((int32_t)((int32_t)((int32_t)L_155>>(int32_t)1))|(int32_t)((int32_t)((int32_t)L_156<<(int32_t)7)))))));
bool L_157 = V_22;
V_27 = (bool)((((int32_t)L_157) == ((int32_t)0))? 1 : 0);
bool L_158 = V_27;
if (L_158)
{
goto IL_050c;
}
}
{
int32_t L_159 = V_17;
V_17 = ((int32_t)((int32_t)L_159+(int32_t)1));
}
IL_050c:
{
ByteU5BU5D_t3397334013* L_160 = __this->get_m_receiveBuffer_12();
int32_t L_161 = V_18;
int32_t L_162 = L_161;
V_18 = ((int32_t)((int32_t)L_162+(int32_t)1));
NullCheck(L_160);
IL2CPP_ARRAY_BOUNDS_CHECK(L_160, L_162);
int32_t L_163 = L_162;
uint8_t L_164 = (L_160)->GetAt(static_cast<il2cpp_array_size_t>(L_163));
ByteU5BU5D_t3397334013* L_165 = __this->get_m_receiveBuffer_12();
int32_t L_166 = V_18;
int32_t L_167 = L_166;
V_18 = ((int32_t)((int32_t)L_167+(int32_t)1));
NullCheck(L_165);
IL2CPP_ARRAY_BOUNDS_CHECK(L_165, L_167);
int32_t L_168 = L_167;
uint8_t L_169 = (L_165)->GetAt(static_cast<il2cpp_array_size_t>(L_168));
V_24 = (((int32_t)((uint16_t)((int32_t)((int32_t)L_164|(int32_t)((int32_t)((int32_t)L_169<<(int32_t)8)))))));
uint16_t L_170 = V_24;
IL2CPP_RUNTIME_CLASS_INIT(NetUtility_t3562260209_il2cpp_TypeInfo_var);
int32_t L_171 = NetUtility_BytesToHoldBits_m1372162852(NULL /*static, unused*/, L_170, /*hidden argument*/NULL);
V_25 = L_171;
int32_t L_172 = V_10;
int32_t L_173 = V_18;
int32_t L_174 = V_25;
V_27 = (bool)((((int32_t)((((int32_t)((int32_t)((int32_t)L_172-(int32_t)L_173))) < ((int32_t)L_174))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_175 = V_27;
if (L_175)
{
goto IL_0590;
}
}
{
V_31 = ((ObjectU5BU5D_t3614634134*)SZArrayNew(ObjectU5BU5D_t3614634134_il2cpp_TypeInfo_var, (uint32_t)4));
ObjectU5BU5D_t3614634134* L_176 = V_31;
NullCheck(L_176);
IL2CPP_ARRAY_BOUNDS_CHECK(L_176, 0);
ArrayElementTypeCheck (L_176, _stringLiteral3718723205);
(L_176)->SetAt(static_cast<il2cpp_array_size_t>(0), (Il2CppObject *)_stringLiteral3718723205);
ObjectU5BU5D_t3614634134* L_177 = V_31;
int32_t L_178 = V_25;
int32_t L_179 = L_178;
Il2CppObject * L_180 = Box(Int32_t2071877448_il2cpp_TypeInfo_var, &L_179);
NullCheck(L_177);
IL2CPP_ARRAY_BOUNDS_CHECK(L_177, 1);
ArrayElementTypeCheck (L_177, L_180);
(L_177)->SetAt(static_cast<il2cpp_array_size_t>(1), (Il2CppObject *)L_180);
ObjectU5BU5D_t3614634134* L_181 = V_31;
NullCheck(L_181);
IL2CPP_ARRAY_BOUNDS_CHECK(L_181, 2);
ArrayElementTypeCheck (L_181, _stringLiteral986412037);
(L_181)->SetAt(static_cast<il2cpp_array_size_t>(2), (Il2CppObject *)_stringLiteral986412037);
ObjectU5BU5D_t3614634134* L_182 = V_31;
int32_t L_183 = V_10;
int32_t L_184 = V_18;
int32_t L_185 = ((int32_t)((int32_t)L_183-(int32_t)L_184));
Il2CppObject * L_186 = Box(Int32_t2071877448_il2cpp_TypeInfo_var, &L_185);
NullCheck(L_182);
IL2CPP_ARRAY_BOUNDS_CHECK(L_182, 3);
ArrayElementTypeCheck (L_182, L_186);
(L_182)->SetAt(static_cast<il2cpp_array_size_t>(3), (Il2CppObject *)L_186);
ObjectU5BU5D_t3614634134* L_187 = V_31;
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_188 = String_Concat_m3881798623(NULL /*static, unused*/, L_187, /*hidden argument*/NULL);
NetPeer_LogWarning_m3266657906(__this, L_188, /*hidden argument*/NULL);
goto IL_0780;
}
IL_0590:
{
uint8_t L_189 = V_19;
if ((((int32_t)L_189) < ((int32_t)((int32_t)99))))
{
goto IL_059e;
}
}
{
uint8_t L_190 = V_19;
G_B83_0 = ((((int32_t)L_190) > ((int32_t)((int32_t)127)))? 1 : 0);
goto IL_059f;
}
IL_059e:
{
G_B83_0 = 1;
}
IL_059f:
{
V_27 = (bool)G_B83_0;
bool L_191 = V_27;
if (L_191)
{
goto IL_05c4;
}
}
{
uint8_t L_192 = V_19;
uint8_t L_193 = L_192;
Il2CppObject * L_194 = Box(NetMessageType_t191235414_il2cpp_TypeInfo_var, &L_193);
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_195 = String_Concat_m56707527(NULL /*static, unused*/, _stringLiteral89479935, L_194, /*hidden argument*/NULL);
NetPeer_ThrowOrLog_m2301784333(__this, L_195, /*hidden argument*/NULL);
goto IL_0780;
}
IL_05c4:
try
{ // begin try (depth: 1)
{
uint8_t L_196 = V_19;
V_27 = (bool)((((int32_t)L_196) < ((int32_t)((int32_t)128)))? 1 : 0);
bool L_197 = V_27;
if (L_197)
{
goto IL_0606;
}
}
IL_05d4:
{
NetConnection_t3331492029 * L_198 = V_15;
V_27 = (bool)((((Il2CppObject*)(NetConnection_t3331492029 *)L_198) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0);
bool L_199 = V_27;
if (L_199)
{
goto IL_05f0;
}
}
IL_05e0:
{
NetConnection_t3331492029 * L_200 = V_15;
uint8_t L_201 = V_19;
int32_t L_202 = V_18;
int32_t L_203 = V_25;
NullCheck(L_200);
NetConnection_ReceivedLibraryMessage_m3458110466(L_200, L_201, L_202, L_203, /*hidden argument*/NULL);
goto IL_0600;
}
IL_05f0:
{
double L_204 = V_0;
IPEndPoint_t2615413766 * L_205 = V_12;
uint8_t L_206 = V_19;
int32_t L_207 = V_18;
int32_t L_208 = V_25;
NetPeer_ReceivedUnconnectedLibraryMessage_m2683277802(__this, L_204, L_205, L_206, L_207, L_208, /*hidden argument*/NULL);
}
IL_0600:
{
goto IL_06d9;
}
IL_0606:
{
NetConnection_t3331492029 * L_209 = V_15;
if (L_209)
{
goto IL_0619;
}
}
IL_060b:
{
NetPeerConfiguration_t136603591 * L_210 = __this->get_m_configuration_21();
NullCheck(L_210);
bool L_211 = NetPeerConfiguration_IsMessageTypeEnabled_m1110774391(L_210, 2, /*hidden argument*/NULL);
G_B93_0 = ((int32_t)(L_211));
goto IL_061a;
}
IL_0619:
{
G_B93_0 = 1;
}
IL_061a:
{
V_27 = (bool)G_B93_0;
bool L_212 = V_27;
if (L_212)
{
goto IL_0626;
}
}
IL_0621:
{
goto IL_0780;
}
IL_0626:
{
int32_t L_213 = V_25;
NetIncomingMessage_t2014089816 * L_214 = NetPeer_CreateIncomingMessage_m2109562735(__this, 8, L_213, /*hidden argument*/NULL);
V_26 = L_214;
NetIncomingMessage_t2014089816 * L_215 = V_26;
bool L_216 = V_22;
NullCheck(L_215);
L_215->set_m_isFragment_10(L_216);
NetIncomingMessage_t2014089816 * L_217 = V_26;
double L_218 = V_0;
NullCheck(L_217);
L_217->set_m_receiveTime_11(L_218);
NetIncomingMessage_t2014089816 * L_219 = V_26;
uint16_t L_220 = V_23;
NullCheck(L_219);
L_219->set_m_sequenceNumber_8(L_220);
NetIncomingMessage_t2014089816 * L_221 = V_26;
uint8_t L_222 = V_19;
NullCheck(L_221);
L_221->set_m_receivedMessageType_9(L_222);
NetIncomingMessage_t2014089816 * L_223 = V_26;
NetConnection_t3331492029 * L_224 = V_15;
NullCheck(L_223);
L_223->set_m_senderConnection_7(L_224);
NetIncomingMessage_t2014089816 * L_225 = V_26;
IPEndPoint_t2615413766 * L_226 = V_12;
NullCheck(L_225);
L_225->set_m_senderEndPoint_6(L_226);
NetIncomingMessage_t2014089816 * L_227 = V_26;
uint16_t L_228 = V_24;
NullCheck(L_227);
((NetBuffer_t3608062491 *)L_227)->set_m_bitLength_3(L_228);
ByteU5BU5D_t3397334013* L_229 = __this->get_m_receiveBuffer_12();
int32_t L_230 = V_18;
NetIncomingMessage_t2014089816 * L_231 = V_26;
NullCheck(L_231);
ByteU5BU5D_t3397334013* L_232 = ((NetBuffer_t3608062491 *)L_231)->get_m_data_2();
int32_t L_233 = V_25;
Buffer_BlockCopy_m1586717258(NULL /*static, unused*/, (Il2CppArray *)(Il2CppArray *)L_229, L_230, (Il2CppArray *)(Il2CppArray *)L_232, 0, L_233, /*hidden argument*/NULL);
NetConnection_t3331492029 * L_234 = V_15;
V_27 = (bool)((((Il2CppObject*)(NetConnection_t3331492029 *)L_234) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0);
bool L_235 = V_27;
if (L_235)
{
goto IL_06c5;
}
}
IL_0692:
{
uint8_t L_236 = V_19;
V_27 = (bool)((((int32_t)((((int32_t)L_236) == ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_237 = V_27;
if (L_237)
{
goto IL_06b6;
}
}
IL_06a1:
{
NetIncomingMessage_t2014089816 * L_238 = V_26;
NullCheck(L_238);
L_238->set_m_incomingMessageType_5(2);
NetIncomingMessage_t2014089816 * L_239 = V_26;
NetPeer_ReleaseMessage_m3520648965(__this, L_239, /*hidden argument*/NULL);
goto IL_06c2;
}
IL_06b6:
{
NetConnection_t3331492029 * L_240 = V_15;
NetIncomingMessage_t2014089816 * L_241 = V_26;
NullCheck(L_240);
NetConnection_ReceivedMessage_m864391479(L_240, L_241, /*hidden argument*/NULL);
}
IL_06c2:
{
goto IL_06d8;
}
IL_06c5:
{
NetIncomingMessage_t2014089816 * L_242 = V_26;
NullCheck(L_242);
L_242->set_m_incomingMessageType_5(2);
NetIncomingMessage_t2014089816 * L_243 = V_26;
NetPeer_ReleaseMessage_m3520648965(__this, L_243, /*hidden argument*/NULL);
}
IL_06d8:
{
}
IL_06d9:
{
goto IL_071b;
}
} // end try (depth: 1)
catch(Il2CppExceptionWrapper& e)
{
__exception_local = (Exception_t1927440687 *)e.ex;
if(il2cpp_codegen_class_is_assignable_from (Exception_t1927440687_il2cpp_TypeInfo_var, e.ex->object.klass))
goto CATCH_06dc;
throw e;
}
CATCH_06dc:
{ // begin catch(System.Exception)
V_14 = ((Exception_t1927440687 *)__exception_local);
V_31 = ((ObjectU5BU5D_t3614634134*)SZArrayNew(ObjectU5BU5D_t3614634134_il2cpp_TypeInfo_var, (uint32_t)4));
ObjectU5BU5D_t3614634134* L_244 = V_31;
NullCheck(L_244);
IL2CPP_ARRAY_BOUNDS_CHECK(L_244, 0);
ArrayElementTypeCheck (L_244, _stringLiteral3099179458);
(L_244)->SetAt(static_cast<il2cpp_array_size_t>(0), (Il2CppObject *)_stringLiteral3099179458);
ObjectU5BU5D_t3614634134* L_245 = V_31;
Exception_t1927440687 * L_246 = V_14;
NullCheck(L_246);
String_t* L_247 = VirtFuncInvoker0< String_t* >::Invoke(6 /* System.String System.Exception::get_Message() */, L_246);
NullCheck(L_245);
IL2CPP_ARRAY_BOUNDS_CHECK(L_245, 1);
ArrayElementTypeCheck (L_245, L_247);
(L_245)->SetAt(static_cast<il2cpp_array_size_t>(1), (Il2CppObject *)L_247);
ObjectU5BU5D_t3614634134* L_248 = V_31;
NullCheck(L_248);
IL2CPP_ARRAY_BOUNDS_CHECK(L_248, 2);
ArrayElementTypeCheck (L_248, _stringLiteral4166804854);
(L_248)->SetAt(static_cast<il2cpp_array_size_t>(2), (Il2CppObject *)_stringLiteral4166804854);
ObjectU5BU5D_t3614634134* L_249 = V_31;
IPEndPoint_t2615413766 * L_250 = V_12;
NullCheck(L_249);
IL2CPP_ARRAY_BOUNDS_CHECK(L_249, 3);
ArrayElementTypeCheck (L_249, L_250);
(L_249)->SetAt(static_cast<il2cpp_array_size_t>(3), (Il2CppObject *)L_250);
ObjectU5BU5D_t3614634134* L_251 = V_31;
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_252 = String_Concat_m3881798623(NULL /*static, unused*/, L_251, /*hidden argument*/NULL);
NetPeer_LogError_m1931099304(__this, L_252, /*hidden argument*/NULL);
goto IL_071b;
} // end catch (depth: 1)
IL_071b:
{
int32_t L_253 = V_18;
int32_t L_254 = V_25;
V_18 = ((int32_t)((int32_t)L_253+(int32_t)L_254));
}
IL_0724:
{
int32_t L_255 = V_10;
int32_t L_256 = V_18;
V_27 = (bool)((((int32_t)((((int32_t)((int32_t)((int32_t)L_255-(int32_t)L_256))) < ((int32_t)5))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_257 = V_27;
if (L_257)
{
goto IL_04af;
}
}
{
NetPeerStatistics_t101027066 * L_258 = __this->get_m_statistics_25();
int32_t L_259 = V_10;
int32_t L_260 = V_16;
int32_t L_261 = V_17;
NullCheck(L_258);
NetPeerStatistics_PacketReceived_m2812231107(L_258, L_259, L_260, L_261, /*hidden argument*/NULL);
NetConnection_t3331492029 * L_262 = V_15;
V_27 = (bool)((((Il2CppObject*)(NetConnection_t3331492029 *)L_262) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0);
bool L_263 = V_27;
if (L_263)
{
goto IL_0768;
}
}
{
NetConnection_t3331492029 * L_264 = V_15;
NullCheck(L_264);
NetConnectionStatistics_t1235765202 * L_265 = L_264->get_m_statistics_14();
int32_t L_266 = V_10;
int32_t L_267 = V_16;
int32_t L_268 = V_17;
NullCheck(L_265);
NetConnectionStatistics_PacketReceived_m1973808183(L_265, L_266, L_267, L_268, /*hidden argument*/NULL);
}
IL_0768:
{
Socket_t3821512045 * L_269 = __this->get_m_socket_10();
NullCheck(L_269);
int32_t L_270 = Socket_get_Available_m2478984899(L_269, /*hidden argument*/NULL);
V_27 = (bool)((((int32_t)L_270) > ((int32_t)0))? 1 : 0);
bool L_271 = V_27;
if (L_271)
{
goto IL_0310;
}
}
IL_0780:
{
return;
}
}
// System.Void Lidgren.Network.NetPeer::FlushSendQueue()
extern "C" void NetPeer_FlushSendQueue_m2253071797 (NetPeer_t1779390221 * __this, const MethodInfo* method)
{
{
__this->set_m_executeFlushSendQueue_27((bool)1);
return;
}
}
// System.Void Lidgren.Network.NetPeer::HandleIncomingDiscoveryRequest(System.Double,System.Net.IPEndPoint,System.Int32,System.Int32)
extern "C" void NetPeer_HandleIncomingDiscoveryRequest_m4170027425 (NetPeer_t1779390221 * __this, double ___now0, IPEndPoint_t2615413766 * ___senderEndPoint1, int32_t ___ptr2, int32_t ___payloadByteLength3, const MethodInfo* method)
{
NetIncomingMessage_t2014089816 * V_0 = NULL;
bool V_1 = false;
{
NetPeerConfiguration_t136603591 * L_0 = __this->get_m_configuration_21();
NullCheck(L_0);
bool L_1 = NetPeerConfiguration_IsMessageTypeEnabled_m1110774391(L_0, ((int32_t)32), /*hidden argument*/NULL);
V_1 = (bool)((((int32_t)L_1) == ((int32_t)0))? 1 : 0);
bool L_2 = V_1;
if (L_2)
{
goto IL_0064;
}
}
{
int32_t L_3 = ___payloadByteLength3;
NetIncomingMessage_t2014089816 * L_4 = NetPeer_CreateIncomingMessage_m2109562735(__this, ((int32_t)32), L_3, /*hidden argument*/NULL);
V_0 = L_4;
int32_t L_5 = ___payloadByteLength3;
V_1 = (bool)((((int32_t)((((int32_t)L_5) > ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_6 = V_1;
if (L_6)
{
goto IL_0043;
}
}
{
ByteU5BU5D_t3397334013* L_7 = __this->get_m_receiveBuffer_12();
int32_t L_8 = ___ptr2;
NetIncomingMessage_t2014089816 * L_9 = V_0;
NullCheck(L_9);
ByteU5BU5D_t3397334013* L_10 = ((NetBuffer_t3608062491 *)L_9)->get_m_data_2();
int32_t L_11 = ___payloadByteLength3;
Buffer_BlockCopy_m1586717258(NULL /*static, unused*/, (Il2CppArray *)(Il2CppArray *)L_7, L_8, (Il2CppArray *)(Il2CppArray *)L_10, 0, L_11, /*hidden argument*/NULL);
}
IL_0043:
{
NetIncomingMessage_t2014089816 * L_12 = V_0;
double L_13 = ___now0;
NullCheck(L_12);
L_12->set_m_receiveTime_11(L_13);
NetIncomingMessage_t2014089816 * L_14 = V_0;
int32_t L_15 = ___payloadByteLength3;
NullCheck(L_14);
((NetBuffer_t3608062491 *)L_14)->set_m_bitLength_3(((int32_t)((int32_t)L_15*(int32_t)8)));
NetIncomingMessage_t2014089816 * L_16 = V_0;
IPEndPoint_t2615413766 * L_17 = ___senderEndPoint1;
NullCheck(L_16);
L_16->set_m_senderEndPoint_6(L_17);
NetIncomingMessage_t2014089816 * L_18 = V_0;
NetPeer_ReleaseMessage_m3520648965(__this, L_18, /*hidden argument*/NULL);
}
IL_0064:
{
return;
}
}
// System.Void Lidgren.Network.NetPeer::HandleIncomingDiscoveryResponse(System.Double,System.Net.IPEndPoint,System.Int32,System.Int32)
extern "C" void NetPeer_HandleIncomingDiscoveryResponse_m1395777003 (NetPeer_t1779390221 * __this, double ___now0, IPEndPoint_t2615413766 * ___senderEndPoint1, int32_t ___ptr2, int32_t ___payloadByteLength3, const MethodInfo* method)
{
NetIncomingMessage_t2014089816 * V_0 = NULL;
bool V_1 = false;
{
NetPeerConfiguration_t136603591 * L_0 = __this->get_m_configuration_21();
NullCheck(L_0);
bool L_1 = NetPeerConfiguration_IsMessageTypeEnabled_m1110774391(L_0, ((int32_t)64), /*hidden argument*/NULL);
V_1 = (bool)((((int32_t)L_1) == ((int32_t)0))? 1 : 0);
bool L_2 = V_1;
if (L_2)
{
goto IL_0064;
}
}
{
int32_t L_3 = ___payloadByteLength3;
NetIncomingMessage_t2014089816 * L_4 = NetPeer_CreateIncomingMessage_m2109562735(__this, ((int32_t)64), L_3, /*hidden argument*/NULL);
V_0 = L_4;
int32_t L_5 = ___payloadByteLength3;
V_1 = (bool)((((int32_t)((((int32_t)L_5) > ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_6 = V_1;
if (L_6)
{
goto IL_0043;
}
}
{
ByteU5BU5D_t3397334013* L_7 = __this->get_m_receiveBuffer_12();
int32_t L_8 = ___ptr2;
NetIncomingMessage_t2014089816 * L_9 = V_0;
NullCheck(L_9);
ByteU5BU5D_t3397334013* L_10 = ((NetBuffer_t3608062491 *)L_9)->get_m_data_2();
int32_t L_11 = ___payloadByteLength3;
Buffer_BlockCopy_m1586717258(NULL /*static, unused*/, (Il2CppArray *)(Il2CppArray *)L_7, L_8, (Il2CppArray *)(Il2CppArray *)L_10, 0, L_11, /*hidden argument*/NULL);
}
IL_0043:
{
NetIncomingMessage_t2014089816 * L_12 = V_0;
double L_13 = ___now0;
NullCheck(L_12);
L_12->set_m_receiveTime_11(L_13);
NetIncomingMessage_t2014089816 * L_14 = V_0;
int32_t L_15 = ___payloadByteLength3;
NullCheck(L_14);
((NetBuffer_t3608062491 *)L_14)->set_m_bitLength_3(((int32_t)((int32_t)L_15*(int32_t)8)));
NetIncomingMessage_t2014089816 * L_16 = V_0;
IPEndPoint_t2615413766 * L_17 = ___senderEndPoint1;
NullCheck(L_16);
L_16->set_m_senderEndPoint_6(L_17);
NetIncomingMessage_t2014089816 * L_18 = V_0;
NetPeer_ReleaseMessage_m3520648965(__this, L_18, /*hidden argument*/NULL);
}
IL_0064:
{
return;
}
}
// System.Void Lidgren.Network.NetPeer::ReceivedUnconnectedLibraryMessage(System.Double,System.Net.IPEndPoint,Lidgren.Network.NetMessageType,System.Int32,System.Int32)
extern Il2CppClass* String_t_il2cpp_TypeInfo_var;
extern Il2CppClass* ObjectU5BU5D_t3614634134_il2cpp_TypeInfo_var;
extern Il2CppClass* NetMessageType_t191235414_il2cpp_TypeInfo_var;
extern Il2CppClass* NetConnection_t3331492029_il2cpp_TypeInfo_var;
extern const MethodInfo* Dictionary_2_TryGetValue_m2698685646_MethodInfo_var;
extern const MethodInfo* Dictionary_2_GetEnumerator_m3728096743_MethodInfo_var;
extern const MethodInfo* Enumerator_get_Current_m2227275631_MethodInfo_var;
extern const MethodInfo* KeyValuePair_2_get_Key_m4001602897_MethodInfo_var;
extern const MethodInfo* KeyValuePair_2_get_Value_m1515431574_MethodInfo_var;
extern const MethodInfo* Dictionary_2_Remove_m2570672626_MethodInfo_var;
extern const MethodInfo* Dictionary_2_Add_m462421331_MethodInfo_var;
extern const MethodInfo* Enumerator_MoveNext_m586729744_MethodInfo_var;
extern const MethodInfo* Enumerator_Dispose_m2896629615_MethodInfo_var;
extern const MethodInfo* Dictionary_2_get_Count_m3270350375_MethodInfo_var;
extern const MethodInfo* List_1_get_Count_m1394854046_MethodInfo_var;
extern Il2CppCodeGenString* _stringLiteral698253060;
extern Il2CppCodeGenString* _stringLiteral1068359790;
extern Il2CppCodeGenString* _stringLiteral4166804854;
extern Il2CppCodeGenString* _stringLiteral292773447;
extern Il2CppCodeGenString* _stringLiteral930789854;
extern Il2CppCodeGenString* _stringLiteral2576259168;
extern const uint32_t NetPeer_ReceivedUnconnectedLibraryMessage_m2683277802_MetadataUsageId;
extern "C" void NetPeer_ReceivedUnconnectedLibraryMessage_m2683277802 (NetPeer_t1779390221 * __this, double ___now0, IPEndPoint_t2615413766 * ___senderEndPoint1, uint8_t ___tp2, int32_t ___ptr3, int32_t ___payloadByteLength4, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetPeer_ReceivedUnconnectedLibraryMessage_m2683277802_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
NetConnection_t3331492029 * V_0 = NULL;
KeyValuePair_2_t1655754736 V_1;
memset(&V_1, 0, sizeof(V_1));
NetConnection_t3331492029 * V_2 = NULL;
int32_t V_3 = 0;
NetOutgoingMessage_t2016542980 * V_4 = NULL;
NetConnection_t3331492029 * V_5 = NULL;
bool V_6 = false;
uint8_t V_7 = 0;
Dictionary_2_t3898409514 * V_8 = NULL;
Enumerator_t923466920 V_9;
memset(&V_9, 0, sizeof(V_9));
ObjectU5BU5D_t3614634134* V_10 = NULL;
Exception_t1927440687 * __last_unhandled_exception = 0;
NO_UNUSED_WARNING (__last_unhandled_exception);
Exception_t1927440687 * __exception_local = 0;
NO_UNUSED_WARNING (__exception_local);
int32_t __leave_target = 0;
NO_UNUSED_WARNING (__leave_target);
{
Dictionary_2_t3898409514 * L_0 = __this->get_m_handshakes_24();
IPEndPoint_t2615413766 * L_1 = ___senderEndPoint1;
NullCheck(L_0);
bool L_2 = Dictionary_2_TryGetValue_m2698685646(L_0, L_1, (&V_0), /*hidden argument*/Dictionary_2_TryGetValue_m2698685646_MethodInfo_var);
V_6 = (bool)((((int32_t)L_2) == ((int32_t)0))? 1 : 0);
bool L_3 = V_6;
if (L_3)
{
goto IL_002b;
}
}
{
NetConnection_t3331492029 * L_4 = V_0;
double L_5 = ___now0;
uint8_t L_6 = ___tp2;
int32_t L_7 = ___ptr3;
int32_t L_8 = ___payloadByteLength4;
NullCheck(L_4);
NetConnection_ReceivedHandshake_m1128410455(L_4, L_5, L_6, L_7, L_8, /*hidden argument*/NULL);
goto IL_0372;
}
IL_002b:
{
uint8_t L_9 = ___tp2;
V_7 = L_9;
uint8_t L_10 = V_7;
if (((int32_t)((int32_t)L_10-(int32_t)((int32_t)131))) == 0)
{
goto IL_0280;
}
if (((int32_t)((int32_t)L_10-(int32_t)((int32_t)131))) == 1)
{
goto IL_0137;
}
if (((int32_t)((int32_t)L_10-(int32_t)((int32_t)131))) == 2)
{
goto IL_0339;
}
if (((int32_t)((int32_t)L_10-(int32_t)((int32_t)131))) == 3)
{
goto IL_0339;
}
if (((int32_t)((int32_t)L_10-(int32_t)((int32_t)131))) == 4)
{
goto IL_0325;
}
if (((int32_t)((int32_t)L_10-(int32_t)((int32_t)131))) == 5)
{
goto IL_0074;
}
if (((int32_t)((int32_t)L_10-(int32_t)((int32_t)131))) == 6)
{
goto IL_0086;
}
if (((int32_t)((int32_t)L_10-(int32_t)((int32_t)131))) == 7)
{
goto IL_00bf;
}
if (((int32_t)((int32_t)L_10-(int32_t)((int32_t)131))) == 8)
{
goto IL_0098;
}
if (((int32_t)((int32_t)L_10-(int32_t)((int32_t)131))) == 9)
{
goto IL_0339;
}
if (((int32_t)((int32_t)L_10-(int32_t)((int32_t)131))) == 10)
{
goto IL_0339;
}
if (((int32_t)((int32_t)L_10-(int32_t)((int32_t)131))) == 11)
{
goto IL_00e7;
}
if (((int32_t)((int32_t)L_10-(int32_t)((int32_t)131))) == 12)
{
goto IL_010f;
}
}
{
goto IL_0339;
}
IL_0074:
{
double L_11 = ___now0;
IPEndPoint_t2615413766 * L_12 = ___senderEndPoint1;
int32_t L_13 = ___ptr3;
int32_t L_14 = ___payloadByteLength4;
NetPeer_HandleIncomingDiscoveryRequest_m4170027425(__this, L_11, L_12, L_13, L_14, /*hidden argument*/NULL);
goto IL_0372;
}
IL_0086:
{
double L_15 = ___now0;
IPEndPoint_t2615413766 * L_16 = ___senderEndPoint1;
int32_t L_17 = ___ptr3;
int32_t L_18 = ___payloadByteLength4;
NetPeer_HandleIncomingDiscoveryResponse_m1395777003(__this, L_15, L_16, L_17, L_18, /*hidden argument*/NULL);
goto IL_0372;
}
IL_0098:
{
NetPeerConfiguration_t136603591 * L_19 = __this->get_m_configuration_21();
NullCheck(L_19);
bool L_20 = NetPeerConfiguration_IsMessageTypeEnabled_m1110774391(L_19, ((int32_t)2048), /*hidden argument*/NULL);
V_6 = (bool)((((int32_t)L_20) == ((int32_t)0))? 1 : 0);
bool L_21 = V_6;
if (L_21)
{
goto IL_00ba;
}
}
{
int32_t L_22 = ___ptr3;
NetPeer_HandleNatIntroduction_m4079714032(__this, L_22, /*hidden argument*/NULL);
}
IL_00ba:
{
goto IL_0372;
}
IL_00bf:
{
NetPeerConfiguration_t136603591 * L_23 = __this->get_m_configuration_21();
NullCheck(L_23);
bool L_24 = NetPeerConfiguration_IsMessageTypeEnabled_m1110774391(L_23, ((int32_t)2048), /*hidden argument*/NULL);
V_6 = (bool)((((int32_t)L_24) == ((int32_t)0))? 1 : 0);
bool L_25 = V_6;
if (L_25)
{
goto IL_00e2;
}
}
{
int32_t L_26 = ___ptr3;
IPEndPoint_t2615413766 * L_27 = ___senderEndPoint1;
NetPeer_HandleNatPunch_m77480994(__this, L_26, L_27, /*hidden argument*/NULL);
}
IL_00e2:
{
goto IL_0372;
}
IL_00e7:
{
NetPeerConfiguration_t136603591 * L_28 = __this->get_m_configuration_21();
NullCheck(L_28);
bool L_29 = NetPeerConfiguration_IsMessageTypeEnabled_m1110774391(L_28, ((int32_t)2048), /*hidden argument*/NULL);
V_6 = (bool)((((int32_t)L_29) == ((int32_t)0))? 1 : 0);
bool L_30 = V_6;
if (L_30)
{
goto IL_010a;
}
}
{
int32_t L_31 = ___ptr3;
IPEndPoint_t2615413766 * L_32 = ___senderEndPoint1;
NetPeer_HandleNatPunchConfirmRequest_m3944409323(__this, L_31, L_32, /*hidden argument*/NULL);
}
IL_010a:
{
goto IL_0372;
}
IL_010f:
{
NetPeerConfiguration_t136603591 * L_33 = __this->get_m_configuration_21();
NullCheck(L_33);
bool L_34 = NetPeerConfiguration_IsMessageTypeEnabled_m1110774391(L_33, ((int32_t)2048), /*hidden argument*/NULL);
V_6 = (bool)((((int32_t)L_34) == ((int32_t)0))? 1 : 0);
bool L_35 = V_6;
if (L_35)
{
goto IL_0132;
}
}
{
int32_t L_36 = ___ptr3;
IPEndPoint_t2615413766 * L_37 = ___senderEndPoint1;
NetPeer_HandleNatPunchConfirmed_m1119557487(__this, L_36, L_37, /*hidden argument*/NULL);
}
IL_0132:
{
goto IL_0372;
}
IL_0137:
{
Dictionary_2_t3898409514 * L_38 = __this->get_m_handshakes_24();
Dictionary_2_t3898409514 * L_39 = L_38;
V_8 = L_39;
Monitor_Enter_m2136705809(NULL /*static, unused*/, L_39, /*hidden argument*/NULL);
}
IL_0146:
try
{ // begin try (depth: 1)
{
Dictionary_2_t3898409514 * L_40 = __this->get_m_handshakes_24();
NullCheck(L_40);
Enumerator_t923466920 L_41 = Dictionary_2_GetEnumerator_m3728096743(L_40, /*hidden argument*/Dictionary_2_GetEnumerator_m3728096743_MethodInfo_var);
V_9 = L_41;
}
IL_0155:
try
{ // begin try (depth: 2)
{
goto IL_0215;
}
IL_015a:
{
KeyValuePair_2_t1655754736 L_42 = Enumerator_get_Current_m2227275631((&V_9), /*hidden argument*/Enumerator_get_Current_m2227275631_MethodInfo_var);
V_1 = L_42;
IPEndPoint_t2615413766 * L_43 = KeyValuePair_2_get_Key_m4001602897((&V_1), /*hidden argument*/KeyValuePair_2_get_Key_m4001602897_MethodInfo_var);
NullCheck(L_43);
IPAddress_t1399971723 * L_44 = IPEndPoint_get_Address_m1772553499(L_43, /*hidden argument*/NULL);
IPEndPoint_t2615413766 * L_45 = ___senderEndPoint1;
NullCheck(L_45);
IPAddress_t1399971723 * L_46 = IPEndPoint_get_Address_m1772553499(L_45, /*hidden argument*/NULL);
NullCheck(L_44);
bool L_47 = VirtFuncInvoker1< bool, Il2CppObject * >::Invoke(0 /* System.Boolean System.Object::Equals(System.Object) */, L_44, L_46);
V_6 = (bool)((((int32_t)L_47) == ((int32_t)0))? 1 : 0);
bool L_48 = V_6;
if (L_48)
{
goto IL_0214;
}
}
IL_0186:
{
NetConnection_t3331492029 * L_49 = KeyValuePair_2_get_Value_m1515431574((&V_1), /*hidden argument*/KeyValuePair_2_get_Value_m1515431574_MethodInfo_var);
NullCheck(L_49);
bool L_50 = L_49->get_m_connectionInitiator_19();
V_6 = (bool)((((int32_t)L_50) == ((int32_t)0))? 1 : 0);
bool L_51 = V_6;
if (L_51)
{
goto IL_0213;
}
}
IL_019c:
{
NetConnection_t3331492029 * L_52 = KeyValuePair_2_get_Value_m1515431574((&V_1), /*hidden argument*/KeyValuePair_2_get_Value_m1515431574_MethodInfo_var);
V_2 = L_52;
Dictionary_2_t3898409514 * L_53 = __this->get_m_connectionLookup_4();
IPEndPoint_t2615413766 * L_54 = KeyValuePair_2_get_Key_m4001602897((&V_1), /*hidden argument*/KeyValuePair_2_get_Key_m4001602897_MethodInfo_var);
NullCheck(L_53);
Dictionary_2_Remove_m2570672626(L_53, L_54, /*hidden argument*/Dictionary_2_Remove_m2570672626_MethodInfo_var);
Dictionary_2_t3898409514 * L_55 = __this->get_m_handshakes_24();
IPEndPoint_t2615413766 * L_56 = KeyValuePair_2_get_Key_m4001602897((&V_1), /*hidden argument*/KeyValuePair_2_get_Key_m4001602897_MethodInfo_var);
NullCheck(L_55);
Dictionary_2_Remove_m2570672626(L_55, L_56, /*hidden argument*/Dictionary_2_Remove_m2570672626_MethodInfo_var);
IPEndPoint_t2615413766 * L_57 = ___senderEndPoint1;
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_58 = String_Concat_m56707527(NULL /*static, unused*/, _stringLiteral698253060, L_57, /*hidden argument*/NULL);
NetPeer_LogDebug_m2983960595(__this, L_58, /*hidden argument*/NULL);
NetConnection_t3331492029 * L_59 = V_2;
IPEndPoint_t2615413766 * L_60 = ___senderEndPoint1;
NullCheck(L_59);
NetConnection_MutateEndPoint_m3264432459(L_59, L_60, /*hidden argument*/NULL);
Dictionary_2_t3898409514 * L_61 = __this->get_m_connectionLookup_4();
IPEndPoint_t2615413766 * L_62 = ___senderEndPoint1;
NetConnection_t3331492029 * L_63 = V_2;
NullCheck(L_61);
Dictionary_2_Add_m462421331(L_61, L_62, L_63, /*hidden argument*/Dictionary_2_Add_m462421331_MethodInfo_var);
Dictionary_2_t3898409514 * L_64 = __this->get_m_handshakes_24();
IPEndPoint_t2615413766 * L_65 = ___senderEndPoint1;
NetConnection_t3331492029 * L_66 = V_2;
NullCheck(L_64);
Dictionary_2_Add_m462421331(L_64, L_65, L_66, /*hidden argument*/Dictionary_2_Add_m462421331_MethodInfo_var);
NetConnection_t3331492029 * L_67 = V_2;
double L_68 = ___now0;
uint8_t L_69 = ___tp2;
int32_t L_70 = ___ptr3;
int32_t L_71 = ___payloadByteLength4;
NullCheck(L_67);
NetConnection_ReceivedHandshake_m1128410455(L_67, L_68, L_69, L_70, L_71, /*hidden argument*/NULL);
IL2CPP_LEAVE(0x372, FINALLY_0227);
}
IL_0213:
{
}
IL_0214:
{
}
IL_0215:
{
bool L_72 = Enumerator_MoveNext_m586729744((&V_9), /*hidden argument*/Enumerator_MoveNext_m586729744_MethodInfo_var);
V_6 = L_72;
bool L_73 = V_6;
if (L_73)
{
goto IL_015a;
}
}
IL_0225:
{
IL2CPP_LEAVE(0x236, FINALLY_0227);
}
} // end try (depth: 2)
catch(Il2CppExceptionWrapper& e)
{
__last_unhandled_exception = (Exception_t1927440687 *)e.ex;
goto FINALLY_0227;
}
FINALLY_0227:
{ // begin finally (depth: 2)
Enumerator_Dispose_m2896629615((&V_9), /*hidden argument*/Enumerator_Dispose_m2896629615_MethodInfo_var);
IL2CPP_END_FINALLY(551)
} // end finally (depth: 2)
IL2CPP_CLEANUP(551)
{
IL2CPP_END_CLEANUP(0x372, FINALLY_023a);
IL2CPP_JUMP_TBL(0x236, IL_0236)
IL2CPP_RETHROW_IF_UNHANDLED(Exception_t1927440687 *)
}
IL_0236:
{
IL2CPP_LEAVE(0x243, FINALLY_023a);
}
} // end try (depth: 1)
catch(Il2CppExceptionWrapper& e)
{
__last_unhandled_exception = (Exception_t1927440687 *)e.ex;
goto FINALLY_023a;
}
FINALLY_023a:
{ // begin finally (depth: 1)
Dictionary_2_t3898409514 * L_74 = V_8;
Monitor_Exit_m2677760297(NULL /*static, unused*/, L_74, /*hidden argument*/NULL);
IL2CPP_END_FINALLY(570)
} // end finally (depth: 1)
IL2CPP_CLEANUP(570)
{
IL2CPP_JUMP_TBL(0x372, IL_0372)
IL2CPP_JUMP_TBL(0x243, IL_0243)
IL2CPP_RETHROW_IF_UNHANDLED(Exception_t1927440687 *)
}
IL_0243:
{
V_10 = ((ObjectU5BU5D_t3614634134*)SZArrayNew(ObjectU5BU5D_t3614634134_il2cpp_TypeInfo_var, (uint32_t)4));
ObjectU5BU5D_t3614634134* L_75 = V_10;
NullCheck(L_75);
IL2CPP_ARRAY_BOUNDS_CHECK(L_75, 0);
ArrayElementTypeCheck (L_75, _stringLiteral1068359790);
(L_75)->SetAt(static_cast<il2cpp_array_size_t>(0), (Il2CppObject *)_stringLiteral1068359790);
ObjectU5BU5D_t3614634134* L_76 = V_10;
uint8_t L_77 = ___tp2;
uint8_t L_78 = L_77;
Il2CppObject * L_79 = Box(NetMessageType_t191235414_il2cpp_TypeInfo_var, &L_78);
NullCheck(L_76);
IL2CPP_ARRAY_BOUNDS_CHECK(L_76, 1);
ArrayElementTypeCheck (L_76, L_79);
(L_76)->SetAt(static_cast<il2cpp_array_size_t>(1), (Il2CppObject *)L_79);
ObjectU5BU5D_t3614634134* L_80 = V_10;
NullCheck(L_80);
IL2CPP_ARRAY_BOUNDS_CHECK(L_80, 2);
ArrayElementTypeCheck (L_80, _stringLiteral4166804854);
(L_80)->SetAt(static_cast<il2cpp_array_size_t>(2), (Il2CppObject *)_stringLiteral4166804854);
ObjectU5BU5D_t3614634134* L_81 = V_10;
IPEndPoint_t2615413766 * L_82 = ___senderEndPoint1;
NullCheck(L_81);
IL2CPP_ARRAY_BOUNDS_CHECK(L_81, 3);
ArrayElementTypeCheck (L_81, L_82);
(L_81)->SetAt(static_cast<il2cpp_array_size_t>(3), (Il2CppObject *)L_82);
ObjectU5BU5D_t3614634134* L_83 = V_10;
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_84 = String_Concat_m3881798623(NULL /*static, unused*/, L_83, /*hidden argument*/NULL);
NetPeer_LogWarning_m3266657906(__this, L_84, /*hidden argument*/NULL);
goto IL_0372;
}
IL_0280:
{
NetPeerConfiguration_t136603591 * L_85 = __this->get_m_configuration_21();
NullCheck(L_85);
bool L_86 = NetPeerConfiguration_get_AcceptIncomingConnections_m878586354(L_85, /*hidden argument*/NULL);
V_6 = L_86;
bool L_87 = V_6;
if (L_87)
{
goto IL_02a3;
}
}
{
NetPeer_LogWarning_m3266657906(__this, _stringLiteral292773447, /*hidden argument*/NULL);
goto IL_0372;
}
IL_02a3:
{
Dictionary_2_t3898409514 * L_88 = __this->get_m_handshakes_24();
NullCheck(L_88);
int32_t L_89 = Dictionary_2_get_Count_m3270350375(L_88, /*hidden argument*/Dictionary_2_get_Count_m3270350375_MethodInfo_var);
List_1_t2700613161 * L_90 = __this->get_m_connections_3();
NullCheck(L_90);
int32_t L_91 = List_1_get_Count_m1394854046(L_90, /*hidden argument*/List_1_get_Count_m1394854046_MethodInfo_var);
V_3 = ((int32_t)((int32_t)L_89+(int32_t)L_91));
int32_t L_92 = V_3;
NetPeerConfiguration_t136603591 * L_93 = __this->get_m_configuration_21();
NullCheck(L_93);
int32_t L_94 = L_93->get_m_maximumConnections_6();
V_6 = (bool)((((int32_t)L_92) < ((int32_t)L_94))? 1 : 0);
bool L_95 = V_6;
if (L_95)
{
goto IL_02f5;
}
}
{
NetOutgoingMessage_t2016542980 * L_96 = NetPeer_CreateMessage_m3445598245(__this, _stringLiteral930789854, /*hidden argument*/NULL);
V_4 = L_96;
NetOutgoingMessage_t2016542980 * L_97 = V_4;
NullCheck(L_97);
L_97->set_m_messageType_5(((int32_t)135));
NetOutgoingMessage_t2016542980 * L_98 = V_4;
IPEndPoint_t2615413766 * L_99 = ___senderEndPoint1;
NetPeer_SendLibrary_m4133093622(__this, L_98, L_99, /*hidden argument*/NULL);
goto IL_0372;
}
IL_02f5:
{
IPEndPoint_t2615413766 * L_100 = ___senderEndPoint1;
NetConnection_t3331492029 * L_101 = (NetConnection_t3331492029 *)il2cpp_codegen_object_new(NetConnection_t3331492029_il2cpp_TypeInfo_var);
NetConnection__ctor_m695103806(L_101, __this, L_100, /*hidden argument*/NULL);
V_5 = L_101;
NetConnection_t3331492029 * L_102 = V_5;
NullCheck(L_102);
L_102->set_m_status_2(2);
Dictionary_2_t3898409514 * L_103 = __this->get_m_handshakes_24();
IPEndPoint_t2615413766 * L_104 = ___senderEndPoint1;
NetConnection_t3331492029 * L_105 = V_5;
NullCheck(L_103);
Dictionary_2_Add_m462421331(L_103, L_104, L_105, /*hidden argument*/Dictionary_2_Add_m462421331_MethodInfo_var);
NetConnection_t3331492029 * L_106 = V_5;
double L_107 = ___now0;
uint8_t L_108 = ___tp2;
int32_t L_109 = ___ptr3;
int32_t L_110 = ___payloadByteLength4;
NullCheck(L_106);
NetConnection_ReceivedHandshake_m1128410455(L_106, L_107, L_108, L_109, L_110, /*hidden argument*/NULL);
goto IL_0372;
}
IL_0325:
{
IPEndPoint_t2615413766 * L_111 = ___senderEndPoint1;
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_112 = String_Concat_m56707527(NULL /*static, unused*/, _stringLiteral2576259168, L_111, /*hidden argument*/NULL);
NetPeer_LogVerbose_m3434660420(__this, L_112, /*hidden argument*/NULL);
goto IL_0372;
}
IL_0339:
{
V_10 = ((ObjectU5BU5D_t3614634134*)SZArrayNew(ObjectU5BU5D_t3614634134_il2cpp_TypeInfo_var, (uint32_t)4));
ObjectU5BU5D_t3614634134* L_113 = V_10;
NullCheck(L_113);
IL2CPP_ARRAY_BOUNDS_CHECK(L_113, 0);
ArrayElementTypeCheck (L_113, _stringLiteral1068359790);
(L_113)->SetAt(static_cast<il2cpp_array_size_t>(0), (Il2CppObject *)_stringLiteral1068359790);
ObjectU5BU5D_t3614634134* L_114 = V_10;
uint8_t L_115 = ___tp2;
uint8_t L_116 = L_115;
Il2CppObject * L_117 = Box(NetMessageType_t191235414_il2cpp_TypeInfo_var, &L_116);
NullCheck(L_114);
IL2CPP_ARRAY_BOUNDS_CHECK(L_114, 1);
ArrayElementTypeCheck (L_114, L_117);
(L_114)->SetAt(static_cast<il2cpp_array_size_t>(1), (Il2CppObject *)L_117);
ObjectU5BU5D_t3614634134* L_118 = V_10;
NullCheck(L_118);
IL2CPP_ARRAY_BOUNDS_CHECK(L_118, 2);
ArrayElementTypeCheck (L_118, _stringLiteral4166804854);
(L_118)->SetAt(static_cast<il2cpp_array_size_t>(2), (Il2CppObject *)_stringLiteral4166804854);
ObjectU5BU5D_t3614634134* L_119 = V_10;
IPEndPoint_t2615413766 * L_120 = ___senderEndPoint1;
NullCheck(L_119);
IL2CPP_ARRAY_BOUNDS_CHECK(L_119, 3);
ArrayElementTypeCheck (L_119, L_120);
(L_119)->SetAt(static_cast<il2cpp_array_size_t>(3), (Il2CppObject *)L_120);
ObjectU5BU5D_t3614634134* L_121 = V_10;
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_122 = String_Concat_m3881798623(NULL /*static, unused*/, L_121, /*hidden argument*/NULL);
NetPeer_LogWarning_m3266657906(__this, L_122, /*hidden argument*/NULL);
goto IL_0372;
}
IL_0372:
{
return;
}
}
// System.Void Lidgren.Network.NetPeer::AcceptConnection(Lidgren.Network.NetConnection)
extern Il2CppClass* NetTime_t3056501352_il2cpp_TypeInfo_var;
extern const MethodInfo* Dictionary_2_Remove_m2570672626_MethodInfo_var;
extern const MethodInfo* List_1_Contains_m4168039338_MethodInfo_var;
extern const MethodInfo* List_1_Add_m2801045858_MethodInfo_var;
extern const MethodInfo* Dictionary_2_Add_m462421331_MethodInfo_var;
extern Il2CppCodeGenString* _stringLiteral1728373786;
extern Il2CppCodeGenString* _stringLiteral4058863251;
extern const uint32_t NetPeer_AcceptConnection_m1347999118_MetadataUsageId;
extern "C" void NetPeer_AcceptConnection_m1347999118 (NetPeer_t1779390221 * __this, NetConnection_t3331492029 * ___conn0, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetPeer_AcceptConnection_m1347999118_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
bool V_0 = false;
List_1_t2700613161 * V_1 = NULL;
Exception_t1927440687 * __last_unhandled_exception = 0;
NO_UNUSED_WARNING (__last_unhandled_exception);
Exception_t1927440687 * __exception_local = 0;
NO_UNUSED_WARNING (__exception_local);
int32_t __leave_target = 0;
NO_UNUSED_WARNING (__leave_target);
{
NetConnection_t3331492029 * L_0 = ___conn0;
IL2CPP_RUNTIME_CLASS_INIT(NetTime_t3056501352_il2cpp_TypeInfo_var);
double L_1 = NetTime_get_Now_m1609702533(NULL /*static, unused*/, /*hidden argument*/NULL);
NullCheck(L_0);
NetConnection_InitExpandMTU_m3761872672(L_0, L_1, /*hidden argument*/NULL);
Dictionary_2_t3898409514 * L_2 = __this->get_m_handshakes_24();
NetConnection_t3331492029 * L_3 = ___conn0;
NullCheck(L_3);
IPEndPoint_t2615413766 * L_4 = L_3->get_m_remoteEndPoint_5();
NullCheck(L_2);
bool L_5 = Dictionary_2_Remove_m2570672626(L_2, L_4, /*hidden argument*/Dictionary_2_Remove_m2570672626_MethodInfo_var);
V_0 = L_5;
bool L_6 = V_0;
if (L_6)
{
goto IL_002e;
}
}
{
NetPeer_LogWarning_m3266657906(__this, _stringLiteral1728373786, /*hidden argument*/NULL);
}
IL_002e:
{
List_1_t2700613161 * L_7 = __this->get_m_connections_3();
List_1_t2700613161 * L_8 = L_7;
V_1 = L_8;
Monitor_Enter_m2136705809(NULL /*static, unused*/, L_8, /*hidden argument*/NULL);
}
IL_003c:
try
{ // begin try (depth: 1)
{
List_1_t2700613161 * L_9 = __this->get_m_connections_3();
NetConnection_t3331492029 * L_10 = ___conn0;
NullCheck(L_9);
bool L_11 = List_1_Contains_m4168039338(L_9, L_10, /*hidden argument*/List_1_Contains_m4168039338_MethodInfo_var);
V_0 = (bool)((((int32_t)L_11) == ((int32_t)0))? 1 : 0);
bool L_12 = V_0;
if (L_12)
{
goto IL_0060;
}
}
IL_0050:
{
NetPeer_LogWarning_m3266657906(__this, _stringLiteral4058863251, /*hidden argument*/NULL);
goto IL_0082;
}
IL_0060:
{
List_1_t2700613161 * L_13 = __this->get_m_connections_3();
NetConnection_t3331492029 * L_14 = ___conn0;
NullCheck(L_13);
List_1_Add_m2801045858(L_13, L_14, /*hidden argument*/List_1_Add_m2801045858_MethodInfo_var);
Dictionary_2_t3898409514 * L_15 = __this->get_m_connectionLookup_4();
NetConnection_t3331492029 * L_16 = ___conn0;
NullCheck(L_16);
IPEndPoint_t2615413766 * L_17 = L_16->get_m_remoteEndPoint_5();
NetConnection_t3331492029 * L_18 = ___conn0;
NullCheck(L_15);
Dictionary_2_Add_m462421331(L_15, L_17, L_18, /*hidden argument*/Dictionary_2_Add_m462421331_MethodInfo_var);
}
IL_0082:
{
IL2CPP_LEAVE(0x8D, FINALLY_0085);
}
} // end try (depth: 1)
catch(Il2CppExceptionWrapper& e)
{
__last_unhandled_exception = (Exception_t1927440687 *)e.ex;
goto FINALLY_0085;
}
FINALLY_0085:
{ // begin finally (depth: 1)
List_1_t2700613161 * L_19 = V_1;
Monitor_Exit_m2677760297(NULL /*static, unused*/, L_19, /*hidden argument*/NULL);
IL2CPP_END_FINALLY(133)
} // end finally (depth: 1)
IL2CPP_CLEANUP(133)
{
IL2CPP_JUMP_TBL(0x8D, IL_008d)
IL2CPP_RETHROW_IF_UNHANDLED(Exception_t1927440687 *)
}
IL_008d:
{
return;
}
}
// System.Void Lidgren.Network.NetPeer::VerifyNetworkThread()
extern Il2CppClass* Thread_t241561612_il2cpp_TypeInfo_var;
extern Il2CppClass* ObjectU5BU5D_t3614634134_il2cpp_TypeInfo_var;
extern Il2CppClass* Int32_t2071877448_il2cpp_TypeInfo_var;
extern Il2CppClass* String_t_il2cpp_TypeInfo_var;
extern Il2CppClass* NetException_t2452891498_il2cpp_TypeInfo_var;
extern Il2CppCodeGenString* _stringLiteral966470011;
extern Il2CppCodeGenString* _stringLiteral1158037928;
extern Il2CppCodeGenString* _stringLiteral372029317;
extern const uint32_t NetPeer_VerifyNetworkThread_m4075953563_MetadataUsageId;
extern "C" void NetPeer_VerifyNetworkThread_m4075953563 (NetPeer_t1779390221 * __this, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetPeer_VerifyNetworkThread_m4075953563_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
Thread_t241561612 * V_0 = NULL;
bool V_1 = false;
ObjectU5BU5D_t3614634134* V_2 = NULL;
{
IL2CPP_RUNTIME_CLASS_INIT(Thread_t241561612_il2cpp_TypeInfo_var);
Thread_t241561612 * L_0 = Thread_get_CurrentThread_m3667342817(NULL /*static, unused*/, /*hidden argument*/NULL);
V_0 = L_0;
Thread_t241561612 * L_1 = Thread_get_CurrentThread_m3667342817(NULL /*static, unused*/, /*hidden argument*/NULL);
Thread_t241561612 * L_2 = __this->get_m_networkThread_9();
V_1 = (bool)((((Il2CppObject*)(Thread_t241561612 *)L_1) == ((Il2CppObject*)(Thread_t241561612 *)L_2))? 1 : 0);
bool L_3 = V_1;
if (L_3)
{
goto IL_005a;
}
}
{
V_2 = ((ObjectU5BU5D_t3614634134*)SZArrayNew(ObjectU5BU5D_t3614634134_il2cpp_TypeInfo_var, (uint32_t)5));
ObjectU5BU5D_t3614634134* L_4 = V_2;
NullCheck(L_4);
IL2CPP_ARRAY_BOUNDS_CHECK(L_4, 0);
ArrayElementTypeCheck (L_4, _stringLiteral966470011);
(L_4)->SetAt(static_cast<il2cpp_array_size_t>(0), (Il2CppObject *)_stringLiteral966470011);
ObjectU5BU5D_t3614634134* L_5 = V_2;
Thread_t241561612 * L_6 = V_0;
NullCheck(L_6);
String_t* L_7 = Thread_get_Name_m1646946390(L_6, /*hidden argument*/NULL);
NullCheck(L_5);
IL2CPP_ARRAY_BOUNDS_CHECK(L_5, 1);
ArrayElementTypeCheck (L_5, L_7);
(L_5)->SetAt(static_cast<il2cpp_array_size_t>(1), (Il2CppObject *)L_7);
ObjectU5BU5D_t3614634134* L_8 = V_2;
NullCheck(L_8);
IL2CPP_ARRAY_BOUNDS_CHECK(L_8, 2);
ArrayElementTypeCheck (L_8, _stringLiteral1158037928);
(L_8)->SetAt(static_cast<il2cpp_array_size_t>(2), (Il2CppObject *)_stringLiteral1158037928);
ObjectU5BU5D_t3614634134* L_9 = V_2;
Thread_t241561612 * L_10 = V_0;
NullCheck(L_10);
int32_t L_11 = Thread_get_ManagedThreadId_m1995754972(L_10, /*hidden argument*/NULL);
int32_t L_12 = L_11;
Il2CppObject * L_13 = Box(Int32_t2071877448_il2cpp_TypeInfo_var, &L_12);
NullCheck(L_9);
IL2CPP_ARRAY_BOUNDS_CHECK(L_9, 3);
ArrayElementTypeCheck (L_9, L_13);
(L_9)->SetAt(static_cast<il2cpp_array_size_t>(3), (Il2CppObject *)L_13);
ObjectU5BU5D_t3614634134* L_14 = V_2;
NullCheck(L_14);
IL2CPP_ARRAY_BOUNDS_CHECK(L_14, 4);
ArrayElementTypeCheck (L_14, _stringLiteral372029317);
(L_14)->SetAt(static_cast<il2cpp_array_size_t>(4), (Il2CppObject *)_stringLiteral372029317);
ObjectU5BU5D_t3614634134* L_15 = V_2;
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_16 = String_Concat_m3881798623(NULL /*static, unused*/, L_15, /*hidden argument*/NULL);
NetException_t2452891498 * L_17 = (NetException_t2452891498 *)il2cpp_codegen_object_new(NetException_t2452891498_il2cpp_TypeInfo_var);
NetException__ctor_m2724322251(L_17, L_16, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_17);
}
IL_005a:
{
return;
}
}
// Lidgren.Network.NetIncomingMessage Lidgren.Network.NetPeer::SetupReadHelperMessage(System.Int32,System.Int32)
extern "C" NetIncomingMessage_t2014089816 * NetPeer_SetupReadHelperMessage_m906183392 (NetPeer_t1779390221 * __this, int32_t ___ptr0, int32_t ___payloadLength1, const MethodInfo* method)
{
NetIncomingMessage_t2014089816 * V_0 = NULL;
{
NetPeer_VerifyNetworkThread_m4075953563(__this, /*hidden argument*/NULL);
NetIncomingMessage_t2014089816 * L_0 = __this->get_m_readHelperMessage_13();
int32_t L_1 = ___ptr0;
int32_t L_2 = ___payloadLength1;
NullCheck(L_0);
((NetBuffer_t3608062491 *)L_0)->set_m_bitLength_3(((int32_t)((int32_t)((int32_t)((int32_t)L_1+(int32_t)L_2))*(int32_t)8)));
NetIncomingMessage_t2014089816 * L_3 = __this->get_m_readHelperMessage_13();
int32_t L_4 = ___ptr0;
NullCheck(L_3);
((NetBuffer_t3608062491 *)L_3)->set_m_readPosition_4(((int32_t)((int32_t)L_4*(int32_t)8)));
NetIncomingMessage_t2014089816 * L_5 = __this->get_m_readHelperMessage_13();
V_0 = L_5;
goto IL_002f;
}
IL_002f:
{
NetIncomingMessage_t2014089816 * L_6 = V_0;
return L_6;
}
}
// System.Void Lidgren.Network.NetPeer::SendPacket(System.Int32,System.Net.IPEndPoint,System.Int32,System.Boolean&)
extern Il2CppClass* MWCRandom_t315011312_il2cpp_TypeInfo_var;
extern Il2CppClass* Int32_t2071877448_il2cpp_TypeInfo_var;
extern Il2CppClass* String_t_il2cpp_TypeInfo_var;
extern Il2CppClass* DelayedPacket_t1298207473_il2cpp_TypeInfo_var;
extern Il2CppClass* ByteU5BU5D_t3397334013_il2cpp_TypeInfo_var;
extern Il2CppClass* NetTime_t3056501352_il2cpp_TypeInfo_var;
extern const MethodInfo* List_1_Add_m3810272245_MethodInfo_var;
extern Il2CppCodeGenString* _stringLiteral352310852;
extern Il2CppCodeGenString* _stringLiteral979995151;
extern const uint32_t NetPeer_SendPacket_m625616909_MetadataUsageId;
extern "C" void NetPeer_SendPacket_m625616909 (NetPeer_t1779390221 * __this, int32_t ___numBytes0, IPEndPoint_t2615413766 * ___target1, int32_t ___numMessages2, bool* ___connectionReset3, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetPeer_SendPacket_m625616909_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
float V_0 = 0.0f;
float V_1 = 0.0f;
float V_2 = 0.0f;
bool V_3 = false;
int32_t V_4 = 0;
float V_5 = 0.0f;
int32_t V_6 = 0;
DelayedPacket_t1298207473 * V_7 = NULL;
bool V_8 = false;
int32_t G_B7_0 = 0;
int32_t G_B11_0 = 0;
int32_t G_B17_0 = 0;
{
bool* L_0 = ___connectionReset3;
*((int8_t*)(L_0)) = (int8_t)0;
NetPeerConfiguration_t136603591 * L_1 = __this->get_m_configuration_21();
NullCheck(L_1);
float L_2 = L_1->get_m_loss_22();
V_0 = L_2;
float L_3 = V_0;
V_8 = (bool)((((int32_t)((((float)L_3) > ((float)(0.0f)))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_4 = V_8;
if (L_4)
{
goto IL_005d;
}
}
{
IL2CPP_RUNTIME_CLASS_INIT(MWCRandom_t315011312_il2cpp_TypeInfo_var);
MWCRandom_t315011312 * L_5 = ((MWCRandom_t315011312_StaticFields*)MWCRandom_t315011312_il2cpp_TypeInfo_var->static_fields)->get_Instance_4();
NullCheck(L_5);
double L_6 = VirtFuncInvoker0< double >::Invoke(8 /* System.Double System.Random::NextDouble() */, L_5);
float L_7 = V_0;
V_8 = (bool)((((int32_t)((((float)(((float)((float)L_6)))) < ((float)L_7))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_8 = V_8;
if (L_8)
{
goto IL_005c;
}
}
{
int32_t L_9 = ___numBytes0;
int32_t L_10 = L_9;
Il2CppObject * L_11 = Box(Int32_t2071877448_il2cpp_TypeInfo_var, &L_10);
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_12 = String_Concat_m2000667605(NULL /*static, unused*/, _stringLiteral352310852, L_11, _stringLiteral979995151, /*hidden argument*/NULL);
NetPeer_LogVerbose_m3434660420(__this, L_12, /*hidden argument*/NULL);
goto IL_01d5;
}
IL_005c:
{
}
IL_005d:
{
NetPeerStatistics_t101027066 * L_13 = __this->get_m_statistics_25();
int32_t L_14 = ___numBytes0;
int32_t L_15 = ___numMessages2;
NullCheck(L_13);
NetPeerStatistics_PacketSent_m2099282197(L_13, L_14, L_15, /*hidden argument*/NULL);
NetPeerConfiguration_t136603591 * L_16 = __this->get_m_configuration_21();
NullCheck(L_16);
float L_17 = L_16->get_m_minimumOneWayLatency_24();
V_1 = L_17;
NetPeerConfiguration_t136603591 * L_18 = __this->get_m_configuration_21();
NullCheck(L_18);
float L_19 = L_18->get_m_randomOneWayLatency_25();
V_2 = L_19;
float L_20 = V_1;
if ((!(((float)L_20) == ((float)(0.0f)))))
{
goto IL_0098;
}
}
{
float L_21 = V_2;
G_B7_0 = ((((int32_t)((((float)L_21) == ((float)(0.0f)))? 1 : 0)) == ((int32_t)0))? 1 : 0);
goto IL_0099;
}
IL_0098:
{
G_B7_0 = 1;
}
IL_0099:
{
V_8 = (bool)G_B7_0;
bool L_22 = V_8;
if (L_22)
{
goto IL_00ff;
}
}
{
ByteU5BU5D_t3397334013* L_23 = __this->get_m_sendBuffer_11();
int32_t L_24 = ___numBytes0;
IPEndPoint_t2615413766 * L_25 = ___target1;
bool* L_26 = ___connectionReset3;
bool L_27 = NetPeer_ActuallySendPacket_m4213106728(__this, L_23, L_24, L_25, L_26, /*hidden argument*/NULL);
V_3 = L_27;
NetPeerConfiguration_t136603591 * L_28 = __this->get_m_configuration_21();
NullCheck(L_28);
float L_29 = L_28->get_m_duplicates_23();
if ((!(((float)L_29) > ((float)(0.0f)))))
{
goto IL_00e1;
}
}
{
IL2CPP_RUNTIME_CLASS_INIT(MWCRandom_t315011312_il2cpp_TypeInfo_var);
MWCRandom_t315011312 * L_30 = ((MWCRandom_t315011312_StaticFields*)MWCRandom_t315011312_il2cpp_TypeInfo_var->static_fields)->get_Instance_4();
NullCheck(L_30);
double L_31 = VirtFuncInvoker0< double >::Invoke(8 /* System.Double System.Random::NextDouble() */, L_30);
NetPeerConfiguration_t136603591 * L_32 = __this->get_m_configuration_21();
NullCheck(L_32);
float L_33 = L_32->get_m_duplicates_23();
G_B11_0 = ((((int32_t)((((double)L_31) < ((double)(((double)((double)L_33)))))? 1 : 0)) == ((int32_t)0))? 1 : 0);
goto IL_00e2;
}
IL_00e1:
{
G_B11_0 = 1;
}
IL_00e2:
{
V_8 = (bool)G_B11_0;
bool L_34 = V_8;
if (L_34)
{
goto IL_00fa;
}
}
{
ByteU5BU5D_t3397334013* L_35 = __this->get_m_sendBuffer_11();
int32_t L_36 = ___numBytes0;
IPEndPoint_t2615413766 * L_37 = ___target1;
bool* L_38 = ___connectionReset3;
NetPeer_ActuallySendPacket_m4213106728(__this, L_35, L_36, L_37, L_38, /*hidden argument*/NULL);
}
IL_00fa:
{
goto IL_01d5;
}
IL_00ff:
{
V_4 = 1;
NetPeerConfiguration_t136603591 * L_39 = __this->get_m_configuration_21();
NullCheck(L_39);
float L_40 = L_39->get_m_duplicates_23();
if ((!(((float)L_40) > ((float)(0.0f)))))
{
goto IL_0130;
}
}
{
IL2CPP_RUNTIME_CLASS_INIT(MWCRandom_t315011312_il2cpp_TypeInfo_var);
MWCRandom_t315011312 * L_41 = ((MWCRandom_t315011312_StaticFields*)MWCRandom_t315011312_il2cpp_TypeInfo_var->static_fields)->get_Instance_4();
NullCheck(L_41);
float L_42 = NetRandom_NextSingle_m2975933834(L_41, /*hidden argument*/NULL);
NetPeerConfiguration_t136603591 * L_43 = __this->get_m_configuration_21();
NullCheck(L_43);
float L_44 = L_43->get_m_duplicates_23();
G_B17_0 = ((((int32_t)((((float)L_42) < ((float)L_44))? 1 : 0)) == ((int32_t)0))? 1 : 0);
goto IL_0131;
}
IL_0130:
{
G_B17_0 = 1;
}
IL_0131:
{
V_8 = (bool)G_B17_0;
bool L_45 = V_8;
if (L_45)
{
goto IL_013e;
}
}
{
int32_t L_46 = V_4;
V_4 = ((int32_t)((int32_t)L_46+(int32_t)1));
}
IL_013e:
{
V_5 = (0.0f);
V_6 = 0;
goto IL_01c6;
}
IL_014a:
{
NetPeerConfiguration_t136603591 * L_47 = __this->get_m_configuration_21();
NullCheck(L_47);
float L_48 = L_47->get_m_minimumOneWayLatency_24();
IL2CPP_RUNTIME_CLASS_INIT(MWCRandom_t315011312_il2cpp_TypeInfo_var);
MWCRandom_t315011312 * L_49 = ((MWCRandom_t315011312_StaticFields*)MWCRandom_t315011312_il2cpp_TypeInfo_var->static_fields)->get_Instance_4();
NullCheck(L_49);
float L_50 = NetRandom_NextSingle_m2975933834(L_49, /*hidden argument*/NULL);
NetPeerConfiguration_t136603591 * L_51 = __this->get_m_configuration_21();
NullCheck(L_51);
float L_52 = L_51->get_m_randomOneWayLatency_25();
V_5 = ((float)((float)L_48+(float)((float)((float)L_50*(float)L_52))));
DelayedPacket_t1298207473 * L_53 = (DelayedPacket_t1298207473 *)il2cpp_codegen_object_new(DelayedPacket_t1298207473_il2cpp_TypeInfo_var);
DelayedPacket__ctor_m30217367(L_53, /*hidden argument*/NULL);
V_7 = L_53;
DelayedPacket_t1298207473 * L_54 = V_7;
IPEndPoint_t2615413766 * L_55 = ___target1;
NullCheck(L_54);
L_54->set_Target_2(L_55);
DelayedPacket_t1298207473 * L_56 = V_7;
int32_t L_57 = ___numBytes0;
NullCheck(L_56);
L_56->set_Data_0(((ByteU5BU5D_t3397334013*)SZArrayNew(ByteU5BU5D_t3397334013_il2cpp_TypeInfo_var, (uint32_t)L_57)));
ByteU5BU5D_t3397334013* L_58 = __this->get_m_sendBuffer_11();
DelayedPacket_t1298207473 * L_59 = V_7;
NullCheck(L_59);
ByteU5BU5D_t3397334013* L_60 = L_59->get_Data_0();
int32_t L_61 = ___numBytes0;
Buffer_BlockCopy_m1586717258(NULL /*static, unused*/, (Il2CppArray *)(Il2CppArray *)L_58, 0, (Il2CppArray *)(Il2CppArray *)L_60, 0, L_61, /*hidden argument*/NULL);
DelayedPacket_t1298207473 * L_62 = V_7;
IL2CPP_RUNTIME_CLASS_INIT(NetTime_t3056501352_il2cpp_TypeInfo_var);
double L_63 = NetTime_get_Now_m1609702533(NULL /*static, unused*/, /*hidden argument*/NULL);
float L_64 = V_5;
NullCheck(L_62);
L_62->set_DelayedUntil_1(((double)((double)L_63+(double)(((double)((double)L_64))))));
List_1_t667328605 * L_65 = __this->get_m_delayedPackets_30();
DelayedPacket_t1298207473 * L_66 = V_7;
NullCheck(L_65);
List_1_Add_m3810272245(L_65, L_66, /*hidden argument*/List_1_Add_m3810272245_MethodInfo_var);
int32_t L_67 = V_6;
V_6 = ((int32_t)((int32_t)L_67+(int32_t)1));
}
IL_01c6:
{
int32_t L_68 = V_6;
int32_t L_69 = V_4;
V_8 = (bool)((((int32_t)L_68) < ((int32_t)L_69))? 1 : 0);
bool L_70 = V_8;
if (L_70)
{
goto IL_014a;
}
}
IL_01d5:
{
return;
}
}
// System.Void Lidgren.Network.NetPeer::SendDelayedPackets()
extern Il2CppClass* NetTime_t3056501352_il2cpp_TypeInfo_var;
extern const MethodInfo* List_1_get_Count_m1493969637_MethodInfo_var;
extern const MethodInfo* List_1_GetEnumerator_m655420434_MethodInfo_var;
extern const MethodInfo* Enumerator_get_Current_m1466792658_MethodInfo_var;
extern const MethodInfo* List_1_Remove_m4112597920_MethodInfo_var;
extern const MethodInfo* Enumerator_MoveNext_m3327494400_MethodInfo_var;
extern const MethodInfo* Enumerator_Dispose_m1541289489_MethodInfo_var;
extern const uint32_t NetPeer_SendDelayedPackets_m213428423_MetadataUsageId;
extern "C" void NetPeer_SendDelayedPackets_m213428423 (NetPeer_t1779390221 * __this, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetPeer_SendDelayedPackets_m213428423_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
double V_0 = 0.0;
bool V_1 = false;
DelayedPacket_t1298207473 * V_2 = NULL;
bool V_3 = false;
Enumerator_t202058279 V_4;
memset(&V_4, 0, sizeof(V_4));
Exception_t1927440687 * __last_unhandled_exception = 0;
NO_UNUSED_WARNING (__last_unhandled_exception);
Exception_t1927440687 * __exception_local = 0;
NO_UNUSED_WARNING (__exception_local);
int32_t __leave_target = 0;
NO_UNUSED_WARNING (__leave_target);
{
List_1_t667328605 * L_0 = __this->get_m_delayedPackets_30();
NullCheck(L_0);
int32_t L_1 = List_1_get_Count_m1493969637(L_0, /*hidden argument*/List_1_get_Count_m1493969637_MethodInfo_var);
V_3 = (bool)((((int32_t)L_1) > ((int32_t)0))? 1 : 0);
bool L_2 = V_3;
if (L_2)
{
goto IL_0015;
}
}
{
goto IL_0090;
}
IL_0015:
{
IL2CPP_RUNTIME_CLASS_INIT(NetTime_t3056501352_il2cpp_TypeInfo_var);
double L_3 = NetTime_get_Now_m1609702533(NULL /*static, unused*/, /*hidden argument*/NULL);
V_0 = L_3;
}
IL_001b:
{
List_1_t667328605 * L_4 = __this->get_m_delayedPackets_30();
NullCheck(L_4);
Enumerator_t202058279 L_5 = List_1_GetEnumerator_m655420434(L_4, /*hidden argument*/List_1_GetEnumerator_m655420434_MethodInfo_var);
V_4 = L_5;
}
IL_002a:
try
{ // begin try (depth: 1)
{
goto IL_0073;
}
IL_002c:
{
DelayedPacket_t1298207473 * L_6 = Enumerator_get_Current_m1466792658((&V_4), /*hidden argument*/Enumerator_get_Current_m1466792658_MethodInfo_var);
V_2 = L_6;
double L_7 = V_0;
DelayedPacket_t1298207473 * L_8 = V_2;
NullCheck(L_8);
double L_9 = L_8->get_DelayedUntil_1();
V_3 = (bool)((((int32_t)((((double)L_7) > ((double)L_9))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_10 = V_3;
if (L_10)
{
goto IL_0072;
}
}
IL_0045:
{
DelayedPacket_t1298207473 * L_11 = V_2;
NullCheck(L_11);
ByteU5BU5D_t3397334013* L_12 = L_11->get_Data_0();
DelayedPacket_t1298207473 * L_13 = V_2;
NullCheck(L_13);
ByteU5BU5D_t3397334013* L_14 = L_13->get_Data_0();
NullCheck(L_14);
DelayedPacket_t1298207473 * L_15 = V_2;
NullCheck(L_15);
IPEndPoint_t2615413766 * L_16 = L_15->get_Target_2();
NetPeer_ActuallySendPacket_m4213106728(__this, L_12, (((int32_t)((int32_t)(((Il2CppArray *)L_14)->max_length)))), L_16, (&V_1), /*hidden argument*/NULL);
List_1_t667328605 * L_17 = __this->get_m_delayedPackets_30();
DelayedPacket_t1298207473 * L_18 = V_2;
NullCheck(L_17);
List_1_Remove_m4112597920(L_17, L_18, /*hidden argument*/List_1_Remove_m4112597920_MethodInfo_var);
goto IL_001b;
}
IL_0072:
{
}
IL_0073:
{
bool L_19 = Enumerator_MoveNext_m3327494400((&V_4), /*hidden argument*/Enumerator_MoveNext_m3327494400_MethodInfo_var);
V_3 = L_19;
bool L_20 = V_3;
if (L_20)
{
goto IL_002c;
}
}
IL_007e:
{
IL2CPP_LEAVE(0x8F, FINALLY_0080);
}
} // end try (depth: 1)
catch(Il2CppExceptionWrapper& e)
{
__last_unhandled_exception = (Exception_t1927440687 *)e.ex;
goto FINALLY_0080;
}
FINALLY_0080:
{ // begin finally (depth: 1)
Enumerator_Dispose_m1541289489((&V_4), /*hidden argument*/Enumerator_Dispose_m1541289489_MethodInfo_var);
IL2CPP_END_FINALLY(128)
} // end finally (depth: 1)
IL2CPP_CLEANUP(128)
{
IL2CPP_JUMP_TBL(0x8F, IL_008f)
IL2CPP_RETHROW_IF_UNHANDLED(Exception_t1927440687 *)
}
IL_008f:
{
}
IL_0090:
{
return;
}
}
// System.Void Lidgren.Network.NetPeer::FlushDelayedPackets()
extern Il2CppClass* Il2CppObject_il2cpp_TypeInfo_var;
extern const MethodInfo* List_1_GetEnumerator_m655420434_MethodInfo_var;
extern const MethodInfo* Enumerator_get_Current_m1466792658_MethodInfo_var;
extern const MethodInfo* Enumerator_MoveNext_m3327494400_MethodInfo_var;
extern const MethodInfo* Enumerator_Dispose_m1541289489_MethodInfo_var;
extern const MethodInfo* List_1_Clear_m3510185858_MethodInfo_var;
extern const uint32_t NetPeer_FlushDelayedPackets_m2271676463_MetadataUsageId;
extern "C" void NetPeer_FlushDelayedPackets_m2271676463 (NetPeer_t1779390221 * __this, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetPeer_FlushDelayedPackets_m2271676463_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
bool V_0 = false;
DelayedPacket_t1298207473 * V_1 = NULL;
Enumerator_t202058279 V_2;
memset(&V_2, 0, sizeof(V_2));
bool V_3 = false;
Exception_t1927440687 * __last_unhandled_exception = 0;
NO_UNUSED_WARNING (__last_unhandled_exception);
Exception_t1927440687 * __exception_local = 0;
NO_UNUSED_WARNING (__exception_local);
int32_t __leave_target = 0;
NO_UNUSED_WARNING (__leave_target);
{
}
IL_0001:
try
{ // begin try (depth: 1)
{
List_1_t667328605 * L_0 = __this->get_m_delayedPackets_30();
NullCheck(L_0);
Enumerator_t202058279 L_1 = List_1_GetEnumerator_m655420434(L_0, /*hidden argument*/List_1_GetEnumerator_m655420434_MethodInfo_var);
V_2 = L_1;
}
IL_000f:
try
{ // begin try (depth: 2)
{
goto IL_0036;
}
IL_0011:
{
DelayedPacket_t1298207473 * L_2 = Enumerator_get_Current_m1466792658((&V_2), /*hidden argument*/Enumerator_get_Current_m1466792658_MethodInfo_var);
V_1 = L_2;
DelayedPacket_t1298207473 * L_3 = V_1;
NullCheck(L_3);
ByteU5BU5D_t3397334013* L_4 = L_3->get_Data_0();
DelayedPacket_t1298207473 * L_5 = V_1;
NullCheck(L_5);
ByteU5BU5D_t3397334013* L_6 = L_5->get_Data_0();
NullCheck(L_6);
DelayedPacket_t1298207473 * L_7 = V_1;
NullCheck(L_7);
IPEndPoint_t2615413766 * L_8 = L_7->get_Target_2();
NetPeer_ActuallySendPacket_m4213106728(__this, L_4, (((int32_t)((int32_t)(((Il2CppArray *)L_6)->max_length)))), L_8, (&V_0), /*hidden argument*/NULL);
}
IL_0036:
{
bool L_9 = Enumerator_MoveNext_m3327494400((&V_2), /*hidden argument*/Enumerator_MoveNext_m3327494400_MethodInfo_var);
V_3 = L_9;
bool L_10 = V_3;
if (L_10)
{
goto IL_0011;
}
}
IL_0041:
{
IL2CPP_LEAVE(0x52, FINALLY_0043);
}
} // end try (depth: 2)
catch(Il2CppExceptionWrapper& e)
{
__last_unhandled_exception = (Exception_t1927440687 *)e.ex;
goto FINALLY_0043;
}
FINALLY_0043:
{ // begin finally (depth: 2)
Enumerator_Dispose_m1541289489((&V_2), /*hidden argument*/Enumerator_Dispose_m1541289489_MethodInfo_var);
IL2CPP_END_FINALLY(67)
} // end finally (depth: 2)
IL2CPP_CLEANUP(67)
{
IL2CPP_JUMP_TBL(0x52, IL_0052)
IL2CPP_RETHROW_IF_UNHANDLED(Exception_t1927440687 *)
}
IL_0052:
{
List_1_t667328605 * L_11 = __this->get_m_delayedPackets_30();
NullCheck(L_11);
List_1_Clear_m3510185858(L_11, /*hidden argument*/List_1_Clear_m3510185858_MethodInfo_var);
goto IL_0067;
}
} // end try (depth: 1)
catch(Il2CppExceptionWrapper& e)
{
__exception_local = (Exception_t1927440687 *)e.ex;
if(il2cpp_codegen_class_is_assignable_from (Il2CppObject_il2cpp_TypeInfo_var, e.ex->object.klass))
goto CATCH_0062;
throw e;
}
CATCH_0062:
{ // begin catch(System.Object)
goto IL_0067;
} // end catch (depth: 1)
IL_0067:
{
return;
}
}
// System.Boolean Lidgren.Network.NetPeer::ActuallySendPacket(System.Byte[],System.Int32,System.Net.IPEndPoint,System.Boolean&)
extern Il2CppClass* NetUtility_t3562260209_il2cpp_TypeInfo_var;
extern Il2CppClass* ObjectU5BU5D_t3614634134_il2cpp_TypeInfo_var;
extern Il2CppClass* Int32_t2071877448_il2cpp_TypeInfo_var;
extern Il2CppClass* String_t_il2cpp_TypeInfo_var;
extern Il2CppClass* SocketException_t1618573604_il2cpp_TypeInfo_var;
extern Il2CppClass* Exception_t1927440687_il2cpp_TypeInfo_var;
extern Il2CppCodeGenString* _stringLiteral3279583894;
extern Il2CppCodeGenString* _stringLiteral2658163415;
extern Il2CppCodeGenString* _stringLiteral1493780019;
extern Il2CppCodeGenString* _stringLiteral2211373706;
extern Il2CppCodeGenString* _stringLiteral3628407244;
extern const uint32_t NetPeer_ActuallySendPacket_m4213106728_MetadataUsageId;
extern "C" bool NetPeer_ActuallySendPacket_m4213106728 (NetPeer_t1779390221 * __this, ByteU5BU5D_t3397334013* ___data0, int32_t ___numBytes1, IPEndPoint_t2615413766 * ___target2, bool* ___connectionReset3, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetPeer_ActuallySendPacket_m4213106728_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
IPAddress_t1399971723 * V_0 = NULL;
int32_t V_1 = 0;
SocketException_t1618573604 * V_2 = NULL;
Exception_t1927440687 * V_3 = NULL;
bool V_4 = false;
bool V_5 = false;
ObjectU5BU5D_t3614634134* V_6 = NULL;
Exception_t1927440687 * __last_unhandled_exception = 0;
NO_UNUSED_WARNING (__last_unhandled_exception);
Exception_t1927440687 * __exception_local = 0;
NO_UNUSED_WARNING (__exception_local);
int32_t __leave_target = 0;
NO_UNUSED_WARNING (__leave_target);
{
bool* L_0 = ___connectionReset3;
*((int8_t*)(L_0)) = (int8_t)0;
V_0 = (IPAddress_t1399971723 *)NULL;
}
IL_0007:
try
{ // begin try (depth: 1)
try
{ // begin try (depth: 2)
{
IL2CPP_RUNTIME_CLASS_INIT(NetUtility_t3562260209_il2cpp_TypeInfo_var);
IPAddress_t1399971723 * L_1 = NetUtility_GetCachedBroadcastAddress_m1409773543(NULL /*static, unused*/, /*hidden argument*/NULL);
V_0 = L_1;
IPEndPoint_t2615413766 * L_2 = ___target2;
NullCheck(L_2);
IPAddress_t1399971723 * L_3 = IPEndPoint_get_Address_m1772553499(L_2, /*hidden argument*/NULL);
IPAddress_t1399971723 * L_4 = V_0;
V_5 = (bool)((((int32_t)((((Il2CppObject*)(IPAddress_t1399971723 *)L_3) == ((Il2CppObject*)(IPAddress_t1399971723 *)L_4))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_5 = V_5;
if (L_5)
{
goto IL_0048;
}
}
IL_0020:
{
IPEndPoint_t2615413766 * L_6 = ___target2;
NetPeerConfiguration_t136603591 * L_7 = __this->get_m_configuration_21();
NullCheck(L_7);
IPAddress_t1399971723 * L_8 = NetPeerConfiguration_get_BroadcastAddress_m3449879104(L_7, /*hidden argument*/NULL);
NullCheck(L_6);
IPEndPoint_set_Address_m42566818(L_6, L_8, /*hidden argument*/NULL);
Socket_t3821512045 * L_9 = __this->get_m_socket_10();
NullCheck(L_9);
Socket_SetSocketOption_m180008383(L_9, ((int32_t)65535), ((int32_t)32), (bool)1, /*hidden argument*/NULL);
}
IL_0048:
{
Socket_t3821512045 * L_10 = __this->get_m_socket_10();
ByteU5BU5D_t3397334013* L_11 = ___data0;
int32_t L_12 = ___numBytes1;
IPEndPoint_t2615413766 * L_13 = ___target2;
NullCheck(L_10);
int32_t L_14 = Socket_SendTo_m3632452604(L_10, L_11, 0, L_12, 0, L_13, /*hidden argument*/NULL);
V_1 = L_14;
int32_t L_15 = ___numBytes1;
int32_t L_16 = V_1;
V_5 = (bool)((((int32_t)L_15) == ((int32_t)L_16))? 1 : 0);
bool L_17 = V_5;
if (L_17)
{
goto IL_00a8;
}
}
IL_0063:
{
V_6 = ((ObjectU5BU5D_t3614634134*)SZArrayNew(ObjectU5BU5D_t3614634134_il2cpp_TypeInfo_var, (uint32_t)5));
ObjectU5BU5D_t3614634134* L_18 = V_6;
NullCheck(L_18);
IL2CPP_ARRAY_BOUNDS_CHECK(L_18, 0);
ArrayElementTypeCheck (L_18, _stringLiteral3279583894);
(L_18)->SetAt(static_cast<il2cpp_array_size_t>(0), (Il2CppObject *)_stringLiteral3279583894);
ObjectU5BU5D_t3614634134* L_19 = V_6;
int32_t L_20 = ___numBytes1;
int32_t L_21 = L_20;
Il2CppObject * L_22 = Box(Int32_t2071877448_il2cpp_TypeInfo_var, &L_21);
NullCheck(L_19);
IL2CPP_ARRAY_BOUNDS_CHECK(L_19, 1);
ArrayElementTypeCheck (L_19, L_22);
(L_19)->SetAt(static_cast<il2cpp_array_size_t>(1), (Il2CppObject *)L_22);
ObjectU5BU5D_t3614634134* L_23 = V_6;
NullCheck(L_23);
IL2CPP_ARRAY_BOUNDS_CHECK(L_23, 2);
ArrayElementTypeCheck (L_23, _stringLiteral2658163415);
(L_23)->SetAt(static_cast<il2cpp_array_size_t>(2), (Il2CppObject *)_stringLiteral2658163415);
ObjectU5BU5D_t3614634134* L_24 = V_6;
int32_t L_25 = V_1;
int32_t L_26 = L_25;
Il2CppObject * L_27 = Box(Int32_t2071877448_il2cpp_TypeInfo_var, &L_26);
NullCheck(L_24);
IL2CPP_ARRAY_BOUNDS_CHECK(L_24, 3);
ArrayElementTypeCheck (L_24, L_27);
(L_24)->SetAt(static_cast<il2cpp_array_size_t>(3), (Il2CppObject *)L_27);
ObjectU5BU5D_t3614634134* L_28 = V_6;
NullCheck(L_28);
IL2CPP_ARRAY_BOUNDS_CHECK(L_28, 4);
ArrayElementTypeCheck (L_28, _stringLiteral1493780019);
(L_28)->SetAt(static_cast<il2cpp_array_size_t>(4), (Il2CppObject *)_stringLiteral1493780019);
ObjectU5BU5D_t3614634134* L_29 = V_6;
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_30 = String_Concat_m3881798623(NULL /*static, unused*/, L_29, /*hidden argument*/NULL);
NetPeer_LogWarning_m3266657906(__this, L_30, /*hidden argument*/NULL);
}
IL_00a8:
{
goto IL_0121;
}
} // end try (depth: 2)
catch(Il2CppExceptionWrapper& e)
{
__exception_local = (Exception_t1927440687 *)e.ex;
if(il2cpp_codegen_class_is_assignable_from (SocketException_t1618573604_il2cpp_TypeInfo_var, e.ex->object.klass))
goto CATCH_00ab;
if(il2cpp_codegen_class_is_assignable_from (Exception_t1927440687_il2cpp_TypeInfo_var, e.ex->object.klass))
goto CATCH_010a;
throw e;
}
CATCH_00ab:
{ // begin catch(System.Net.Sockets.SocketException)
{
V_2 = ((SocketException_t1618573604 *)__exception_local);
SocketException_t1618573604 * L_31 = V_2;
NullCheck(L_31);
int32_t L_32 = SocketException_get_SocketErrorCode_m3898993591(L_31, /*hidden argument*/NULL);
V_5 = (bool)((((int32_t)((((int32_t)L_32) == ((int32_t)((int32_t)10035)))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_33 = V_5;
if (L_33)
{
goto IL_00d5;
}
}
IL_00c3:
{
NetPeer_LogWarning_m3266657906(__this, _stringLiteral2211373706, /*hidden argument*/NULL);
V_4 = (bool)0;
IL2CPP_LEAVE(0x153, FINALLY_0124);
}
IL_00d5:
{
SocketException_t1618573604 * L_34 = V_2;
NullCheck(L_34);
int32_t L_35 = SocketException_get_SocketErrorCode_m3898993591(L_34, /*hidden argument*/NULL);
V_5 = (bool)((((int32_t)((((int32_t)L_35) == ((int32_t)((int32_t)10054)))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_36 = V_5;
if (L_36)
{
goto IL_00f5;
}
}
IL_00eb:
{
bool* L_37 = ___connectionReset3;
*((int8_t*)(L_37)) = (int8_t)1;
V_4 = (bool)0;
IL2CPP_LEAVE(0x153, FINALLY_0124);
}
IL_00f5:
{
SocketException_t1618573604 * L_38 = V_2;
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_39 = String_Concat_m56707527(NULL /*static, unused*/, _stringLiteral3628407244, L_38, /*hidden argument*/NULL);
NetPeer_LogError_m1931099304(__this, L_39, /*hidden argument*/NULL);
goto IL_0121;
}
} // end catch (depth: 2)
CATCH_010a:
{ // begin catch(System.Exception)
V_3 = ((Exception_t1927440687 *)__exception_local);
Exception_t1927440687 * L_40 = V_3;
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_41 = String_Concat_m56707527(NULL /*static, unused*/, _stringLiteral3628407244, L_40, /*hidden argument*/NULL);
NetPeer_LogError_m1931099304(__this, L_41, /*hidden argument*/NULL);
goto IL_0121;
} // end catch (depth: 2)
IL_0121:
{
IL2CPP_LEAVE(0x14D, FINALLY_0124);
}
} // end try (depth: 1)
catch(Il2CppExceptionWrapper& e)
{
__last_unhandled_exception = (Exception_t1927440687 *)e.ex;
goto FINALLY_0124;
}
FINALLY_0124:
{ // begin finally (depth: 1)
{
IPEndPoint_t2615413766 * L_42 = ___target2;
NullCheck(L_42);
IPAddress_t1399971723 * L_43 = IPEndPoint_get_Address_m1772553499(L_42, /*hidden argument*/NULL);
IPAddress_t1399971723 * L_44 = V_0;
V_5 = (bool)((((int32_t)((((Il2CppObject*)(IPAddress_t1399971723 *)L_43) == ((Il2CppObject*)(IPAddress_t1399971723 *)L_44))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_45 = V_5;
if (L_45)
{
goto IL_014b;
}
}
IL_0137:
{
Socket_t3821512045 * L_46 = __this->get_m_socket_10();
NullCheck(L_46);
Socket_SetSocketOption_m180008383(L_46, ((int32_t)65535), ((int32_t)32), (bool)0, /*hidden argument*/NULL);
}
IL_014b:
{
IL2CPP_END_FINALLY(292)
}
} // end finally (depth: 1)
IL2CPP_CLEANUP(292)
{
IL2CPP_JUMP_TBL(0x153, IL_0153)
IL2CPP_JUMP_TBL(0x14D, IL_014d)
IL2CPP_RETHROW_IF_UNHANDLED(Exception_t1927440687 *)
}
IL_014d:
{
V_4 = (bool)1;
goto IL_0153;
}
IL_0153:
{
bool L_47 = V_4;
return L_47;
}
}
// System.Boolean Lidgren.Network.NetPeer::SendMTUPacket(System.Int32,System.Net.IPEndPoint)
extern Il2CppClass* ObjectU5BU5D_t3614634134_il2cpp_TypeInfo_var;
extern Il2CppClass* Int32_t2071877448_il2cpp_TypeInfo_var;
extern Il2CppClass* String_t_il2cpp_TypeInfo_var;
extern Il2CppClass* SocketException_t1618573604_il2cpp_TypeInfo_var;
extern Il2CppClass* Exception_t1927440687_il2cpp_TypeInfo_var;
extern Il2CppClass* SocketError_t307542793_il2cpp_TypeInfo_var;
extern Il2CppCodeGenString* _stringLiteral3279583894;
extern Il2CppCodeGenString* _stringLiteral2658163415;
extern Il2CppCodeGenString* _stringLiteral1493780019;
extern Il2CppCodeGenString* _stringLiteral2211373706;
extern Il2CppCodeGenString* _stringLiteral907202932;
extern Il2CppCodeGenString* _stringLiteral811305477;
extern Il2CppCodeGenString* _stringLiteral3628407244;
extern const uint32_t NetPeer_SendMTUPacket_m1323873705_MetadataUsageId;
extern "C" bool NetPeer_SendMTUPacket_m1323873705 (NetPeer_t1779390221 * __this, int32_t ___numBytes0, IPEndPoint_t2615413766 * ___target1, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetPeer_SendMTUPacket_m1323873705_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
int32_t V_0 = 0;
SocketException_t1618573604 * V_1 = NULL;
Exception_t1927440687 * V_2 = NULL;
bool V_3 = false;
bool V_4 = false;
ObjectU5BU5D_t3614634134* V_5 = NULL;
Exception_t1927440687 * __last_unhandled_exception = 0;
NO_UNUSED_WARNING (__last_unhandled_exception);
Exception_t1927440687 * __exception_local = 0;
NO_UNUSED_WARNING (__exception_local);
int32_t __leave_target = 0;
NO_UNUSED_WARNING (__leave_target);
{
}
IL_0001:
try
{ // begin try (depth: 1)
try
{ // begin try (depth: 2)
{
Socket_t3821512045 * L_0 = __this->get_m_socket_10();
NullCheck(L_0);
Socket_set_DontFragment_m3458934082(L_0, (bool)1, /*hidden argument*/NULL);
Socket_t3821512045 * L_1 = __this->get_m_socket_10();
ByteU5BU5D_t3397334013* L_2 = __this->get_m_sendBuffer_11();
int32_t L_3 = ___numBytes0;
IPEndPoint_t2615413766 * L_4 = ___target1;
NullCheck(L_1);
int32_t L_5 = Socket_SendTo_m3632452604(L_1, L_2, 0, L_3, 0, L_4, /*hidden argument*/NULL);
V_0 = L_5;
int32_t L_6 = ___numBytes0;
int32_t L_7 = V_0;
V_4 = (bool)((((int32_t)L_6) == ((int32_t)L_7))? 1 : 0);
bool L_8 = V_4;
if (L_8)
{
goto IL_0074;
}
}
IL_002f:
{
V_5 = ((ObjectU5BU5D_t3614634134*)SZArrayNew(ObjectU5BU5D_t3614634134_il2cpp_TypeInfo_var, (uint32_t)5));
ObjectU5BU5D_t3614634134* L_9 = V_5;
NullCheck(L_9);
IL2CPP_ARRAY_BOUNDS_CHECK(L_9, 0);
ArrayElementTypeCheck (L_9, _stringLiteral3279583894);
(L_9)->SetAt(static_cast<il2cpp_array_size_t>(0), (Il2CppObject *)_stringLiteral3279583894);
ObjectU5BU5D_t3614634134* L_10 = V_5;
int32_t L_11 = ___numBytes0;
int32_t L_12 = L_11;
Il2CppObject * L_13 = Box(Int32_t2071877448_il2cpp_TypeInfo_var, &L_12);
NullCheck(L_10);
IL2CPP_ARRAY_BOUNDS_CHECK(L_10, 1);
ArrayElementTypeCheck (L_10, L_13);
(L_10)->SetAt(static_cast<il2cpp_array_size_t>(1), (Il2CppObject *)L_13);
ObjectU5BU5D_t3614634134* L_14 = V_5;
NullCheck(L_14);
IL2CPP_ARRAY_BOUNDS_CHECK(L_14, 2);
ArrayElementTypeCheck (L_14, _stringLiteral2658163415);
(L_14)->SetAt(static_cast<il2cpp_array_size_t>(2), (Il2CppObject *)_stringLiteral2658163415);
ObjectU5BU5D_t3614634134* L_15 = V_5;
int32_t L_16 = V_0;
int32_t L_17 = L_16;
Il2CppObject * L_18 = Box(Int32_t2071877448_il2cpp_TypeInfo_var, &L_17);
NullCheck(L_15);
IL2CPP_ARRAY_BOUNDS_CHECK(L_15, 3);
ArrayElementTypeCheck (L_15, L_18);
(L_15)->SetAt(static_cast<il2cpp_array_size_t>(3), (Il2CppObject *)L_18);
ObjectU5BU5D_t3614634134* L_19 = V_5;
NullCheck(L_19);
IL2CPP_ARRAY_BOUNDS_CHECK(L_19, 4);
ArrayElementTypeCheck (L_19, _stringLiteral1493780019);
(L_19)->SetAt(static_cast<il2cpp_array_size_t>(4), (Il2CppObject *)_stringLiteral1493780019);
ObjectU5BU5D_t3614634134* L_20 = V_5;
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_21 = String_Concat_m3881798623(NULL /*static, unused*/, L_20, /*hidden argument*/NULL);
NetPeer_LogWarning_m3266657906(__this, L_21, /*hidden argument*/NULL);
}
IL_0074:
{
NetPeerStatistics_t101027066 * L_22 = __this->get_m_statistics_25();
int32_t L_23 = ___numBytes0;
NullCheck(L_22);
NetPeerStatistics_PacketSent_m2099282197(L_22, L_23, 1, /*hidden argument*/NULL);
goto IL_0141;
}
} // end try (depth: 2)
catch(Il2CppExceptionWrapper& e)
{
__exception_local = (Exception_t1927440687 *)e.ex;
if(il2cpp_codegen_class_is_assignable_from (SocketException_t1618573604_il2cpp_TypeInfo_var, e.ex->object.klass))
goto CATCH_0088;
if(il2cpp_codegen_class_is_assignable_from (Exception_t1927440687_il2cpp_TypeInfo_var, e.ex->object.klass))
goto CATCH_012a;
throw e;
}
CATCH_0088:
{ // begin catch(System.Net.Sockets.SocketException)
{
V_1 = ((SocketException_t1618573604 *)__exception_local);
SocketException_t1618573604 * L_24 = V_1;
NullCheck(L_24);
int32_t L_25 = SocketException_get_SocketErrorCode_m3898993591(L_24, /*hidden argument*/NULL);
V_4 = (bool)((((int32_t)((((int32_t)L_25) == ((int32_t)((int32_t)10040)))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_26 = V_4;
if (L_26)
{
goto IL_00a7;
}
}
IL_00a0:
{
V_3 = (bool)0;
IL2CPP_LEAVE(0x159, FINALLY_0144);
}
IL_00a7:
{
SocketException_t1618573604 * L_27 = V_1;
NullCheck(L_27);
int32_t L_28 = SocketException_get_SocketErrorCode_m3898993591(L_27, /*hidden argument*/NULL);
V_4 = (bool)((((int32_t)((((int32_t)L_28) == ((int32_t)((int32_t)10035)))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_29 = V_4;
if (L_29)
{
goto IL_00d1;
}
}
IL_00bd:
{
NetPeer_LogWarning_m3266657906(__this, _stringLiteral2211373706, /*hidden argument*/NULL);
V_3 = (bool)1;
IL2CPP_LEAVE(0x159, FINALLY_0144);
}
IL_00d1:
{
SocketException_t1618573604 * L_30 = V_1;
NullCheck(L_30);
int32_t L_31 = SocketException_get_SocketErrorCode_m3898993591(L_30, /*hidden argument*/NULL);
V_4 = (bool)((((int32_t)((((int32_t)L_31) == ((int32_t)((int32_t)10054)))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_32 = V_4;
if (L_32)
{
goto IL_00eb;
}
}
IL_00e7:
{
V_3 = (bool)1;
IL2CPP_LEAVE(0x159, FINALLY_0144);
}
IL_00eb:
{
V_5 = ((ObjectU5BU5D_t3614634134*)SZArrayNew(ObjectU5BU5D_t3614634134_il2cpp_TypeInfo_var, (uint32_t)4));
ObjectU5BU5D_t3614634134* L_33 = V_5;
NullCheck(L_33);
IL2CPP_ARRAY_BOUNDS_CHECK(L_33, 0);
ArrayElementTypeCheck (L_33, _stringLiteral907202932);
(L_33)->SetAt(static_cast<il2cpp_array_size_t>(0), (Il2CppObject *)_stringLiteral907202932);
ObjectU5BU5D_t3614634134* L_34 = V_5;
SocketException_t1618573604 * L_35 = V_1;
NullCheck(L_35);
int32_t L_36 = SocketException_get_SocketErrorCode_m3898993591(L_35, /*hidden argument*/NULL);
int32_t L_37 = L_36;
Il2CppObject * L_38 = Box(SocketError_t307542793_il2cpp_TypeInfo_var, &L_37);
NullCheck(L_34);
IL2CPP_ARRAY_BOUNDS_CHECK(L_34, 1);
ArrayElementTypeCheck (L_34, L_38);
(L_34)->SetAt(static_cast<il2cpp_array_size_t>(1), (Il2CppObject *)L_38);
ObjectU5BU5D_t3614634134* L_39 = V_5;
NullCheck(L_39);
IL2CPP_ARRAY_BOUNDS_CHECK(L_39, 2);
ArrayElementTypeCheck (L_39, _stringLiteral811305477);
(L_39)->SetAt(static_cast<il2cpp_array_size_t>(2), (Il2CppObject *)_stringLiteral811305477);
ObjectU5BU5D_t3614634134* L_40 = V_5;
SocketException_t1618573604 * L_41 = V_1;
NullCheck(L_40);
IL2CPP_ARRAY_BOUNDS_CHECK(L_40, 3);
ArrayElementTypeCheck (L_40, L_41);
(L_40)->SetAt(static_cast<il2cpp_array_size_t>(3), (Il2CppObject *)L_41);
ObjectU5BU5D_t3614634134* L_42 = V_5;
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_43 = String_Concat_m3881798623(NULL /*static, unused*/, L_42, /*hidden argument*/NULL);
NetPeer_LogError_m1931099304(__this, L_43, /*hidden argument*/NULL);
goto IL_0141;
}
} // end catch (depth: 2)
CATCH_012a:
{ // begin catch(System.Exception)
V_2 = ((Exception_t1927440687 *)__exception_local);
Exception_t1927440687 * L_44 = V_2;
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_45 = String_Concat_m56707527(NULL /*static, unused*/, _stringLiteral3628407244, L_44, /*hidden argument*/NULL);
NetPeer_LogError_m1931099304(__this, L_45, /*hidden argument*/NULL);
goto IL_0141;
} // end catch (depth: 2)
IL_0141:
{
IL2CPP_LEAVE(0x154, FINALLY_0144);
}
} // end try (depth: 1)
catch(Il2CppExceptionWrapper& e)
{
__last_unhandled_exception = (Exception_t1927440687 *)e.ex;
goto FINALLY_0144;
}
FINALLY_0144:
{ // begin finally (depth: 1)
Socket_t3821512045 * L_46 = __this->get_m_socket_10();
NullCheck(L_46);
Socket_set_DontFragment_m3458934082(L_46, (bool)0, /*hidden argument*/NULL);
IL2CPP_END_FINALLY(324)
} // end finally (depth: 1)
IL2CPP_CLEANUP(324)
{
IL2CPP_JUMP_TBL(0x159, IL_0159)
IL2CPP_JUMP_TBL(0x154, IL_0154)
IL2CPP_RETHROW_IF_UNHANDLED(Exception_t1927440687 *)
}
IL_0154:
{
V_3 = (bool)1;
goto IL_0159;
}
IL_0159:
{
bool L_47 = V_3;
return L_47;
}
}
// System.Void Lidgren.Network.NetPeer::LogVerbose(System.String)
extern "C" void NetPeer_LogVerbose_m3434660420 (NetPeer_t1779390221 * __this, String_t* ___message0, const MethodInfo* method)
{
bool V_0 = false;
{
NetPeerConfiguration_t136603591 * L_0 = __this->get_m_configuration_21();
NullCheck(L_0);
bool L_1 = NetPeerConfiguration_IsMessageTypeEnabled_m1110774391(L_0, ((int32_t)128), /*hidden argument*/NULL);
V_0 = (bool)((((int32_t)L_1) == ((int32_t)0))? 1 : 0);
bool L_2 = V_0;
if (L_2)
{
goto IL_002b;
}
}
{
String_t* L_3 = ___message0;
NetIncomingMessage_t2014089816 * L_4 = NetPeer_CreateIncomingMessage_m226906442(__this, ((int32_t)128), L_3, /*hidden argument*/NULL);
NetPeer_ReleaseMessage_m3520648965(__this, L_4, /*hidden argument*/NULL);
}
IL_002b:
{
return;
}
}
// System.Void Lidgren.Network.NetPeer::LogDebug(System.String)
extern "C" void NetPeer_LogDebug_m2983960595 (NetPeer_t1779390221 * __this, String_t* ___message0, const MethodInfo* method)
{
bool V_0 = false;
{
NetPeerConfiguration_t136603591 * L_0 = __this->get_m_configuration_21();
NullCheck(L_0);
bool L_1 = NetPeerConfiguration_IsMessageTypeEnabled_m1110774391(L_0, ((int32_t)256), /*hidden argument*/NULL);
V_0 = (bool)((((int32_t)L_1) == ((int32_t)0))? 1 : 0);
bool L_2 = V_0;
if (L_2)
{
goto IL_002b;
}
}
{
String_t* L_3 = ___message0;
NetIncomingMessage_t2014089816 * L_4 = NetPeer_CreateIncomingMessage_m226906442(__this, ((int32_t)256), L_3, /*hidden argument*/NULL);
NetPeer_ReleaseMessage_m3520648965(__this, L_4, /*hidden argument*/NULL);
}
IL_002b:
{
return;
}
}
// System.Void Lidgren.Network.NetPeer::LogWarning(System.String)
extern "C" void NetPeer_LogWarning_m3266657906 (NetPeer_t1779390221 * __this, String_t* ___message0, const MethodInfo* method)
{
bool V_0 = false;
{
NetPeerConfiguration_t136603591 * L_0 = __this->get_m_configuration_21();
NullCheck(L_0);
bool L_1 = NetPeerConfiguration_IsMessageTypeEnabled_m1110774391(L_0, ((int32_t)512), /*hidden argument*/NULL);
V_0 = (bool)((((int32_t)L_1) == ((int32_t)0))? 1 : 0);
bool L_2 = V_0;
if (L_2)
{
goto IL_002b;
}
}
{
String_t* L_3 = ___message0;
NetIncomingMessage_t2014089816 * L_4 = NetPeer_CreateIncomingMessage_m226906442(__this, ((int32_t)512), L_3, /*hidden argument*/NULL);
NetPeer_ReleaseMessage_m3520648965(__this, L_4, /*hidden argument*/NULL);
}
IL_002b:
{
return;
}
}
// System.Void Lidgren.Network.NetPeer::LogError(System.String)
extern "C" void NetPeer_LogError_m1931099304 (NetPeer_t1779390221 * __this, String_t* ___message0, const MethodInfo* method)
{
bool V_0 = false;
{
NetPeerConfiguration_t136603591 * L_0 = __this->get_m_configuration_21();
NullCheck(L_0);
bool L_1 = NetPeerConfiguration_IsMessageTypeEnabled_m1110774391(L_0, ((int32_t)1024), /*hidden argument*/NULL);
V_0 = (bool)((((int32_t)L_1) == ((int32_t)0))? 1 : 0);
bool L_2 = V_0;
if (L_2)
{
goto IL_002b;
}
}
{
String_t* L_3 = ___message0;
NetIncomingMessage_t2014089816 * L_4 = NetPeer_CreateIncomingMessage_m226906442(__this, ((int32_t)1024), L_3, /*hidden argument*/NULL);
NetPeer_ReleaseMessage_m3520648965(__this, L_4, /*hidden argument*/NULL);
}
IL_002b:
{
return;
}
}
// System.Void Lidgren.Network.NetPeer::InitializePools()
extern Il2CppClass* List_1_t2766455145_il2cpp_TypeInfo_var;
extern Il2CppClass* NetQueue_1_t4233233666_il2cpp_TypeInfo_var;
extern Il2CppClass* NetQueue_1_t4230780502_il2cpp_TypeInfo_var;
extern const MethodInfo* List_1__ctor_m4273216646_MethodInfo_var;
extern const MethodInfo* NetQueue_1__ctor_m2411511422_MethodInfo_var;
extern const MethodInfo* NetQueue_1__ctor_m2751966236_MethodInfo_var;
extern const uint32_t NetPeer_InitializePools_m2290904387_MetadataUsageId;
extern "C" void NetPeer_InitializePools_m2290904387 (NetPeer_t1779390221 * __this, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetPeer_InitializePools_m2290904387_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
bool V_0 = false;
{
__this->set_m_storageSlotsUsedCount_35(0);
NetPeerConfiguration_t136603591 * L_0 = __this->get_m_configuration_21();
NullCheck(L_0);
bool L_1 = NetPeerConfiguration_get_UseMessageRecycling_m3846967355(L_0, /*hidden argument*/NULL);
V_0 = (bool)((((int32_t)L_1) == ((int32_t)0))? 1 : 0);
bool L_2 = V_0;
if (L_2)
{
goto IL_0043;
}
}
{
List_1_t2766455145 * L_3 = (List_1_t2766455145 *)il2cpp_codegen_object_new(List_1_t2766455145_il2cpp_TypeInfo_var);
List_1__ctor_m4273216646(L_3, ((int32_t)16), /*hidden argument*/List_1__ctor_m4273216646_MethodInfo_var);
__this->set_m_storagePool_31(L_3);
NetQueue_1_t4233233666 * L_4 = (NetQueue_1_t4233233666 *)il2cpp_codegen_object_new(NetQueue_1_t4233233666_il2cpp_TypeInfo_var);
NetQueue_1__ctor_m2411511422(L_4, 4, /*hidden argument*/NetQueue_1__ctor_m2411511422_MethodInfo_var);
__this->set_m_outgoingMessagesPool_32(L_4);
NetQueue_1_t4230780502 * L_5 = (NetQueue_1_t4230780502 *)il2cpp_codegen_object_new(NetQueue_1_t4230780502_il2cpp_TypeInfo_var);
NetQueue_1__ctor_m2751966236(L_5, 4, /*hidden argument*/NetQueue_1__ctor_m2751966236_MethodInfo_var);
__this->set_m_incomingMessagesPool_33(L_5);
goto IL_005a;
}
IL_0043:
{
__this->set_m_storagePool_31((List_1_t2766455145 *)NULL);
__this->set_m_outgoingMessagesPool_32((NetQueue_1_t4233233666 *)NULL);
__this->set_m_incomingMessagesPool_33((NetQueue_1_t4230780502 *)NULL);
}
IL_005a:
{
NetPeerConfiguration_t136603591 * L_6 = __this->get_m_configuration_21();
NullCheck(L_6);
int32_t L_7 = NetPeerConfiguration_get_RecycledCacheMaxCount_m2721437515(L_6, /*hidden argument*/NULL);
__this->set_m_maxCacheCount_36(L_7);
return;
}
}
// System.Byte[] Lidgren.Network.NetPeer::GetStorage(System.Int32)
extern Il2CppClass* ByteU5BU5D_t3397334013_il2cpp_TypeInfo_var;
extern const MethodInfo* List_1_get_Item_m3195270850_MethodInfo_var;
extern const MethodInfo* List_1_set_Item_m3147885089_MethodInfo_var;
extern const MethodInfo* List_1_get_Count_m3625537567_MethodInfo_var;
extern const uint32_t NetPeer_GetStorage_m389417990_MetadataUsageId;
extern "C" ByteU5BU5D_t3397334013* NetPeer_GetStorage_m389417990 (NetPeer_t1779390221 * __this, int32_t ___minimumCapacityInBytes0, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetPeer_GetStorage_m389417990_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
int32_t V_0 = 0;
ByteU5BU5D_t3397334013* V_1 = NULL;
ByteU5BU5D_t3397334013* V_2 = NULL;
bool V_3 = false;
List_1_t2766455145 * V_4 = NULL;
Exception_t1927440687 * __last_unhandled_exception = 0;
NO_UNUSED_WARNING (__last_unhandled_exception);
Exception_t1927440687 * __exception_local = 0;
NO_UNUSED_WARNING (__exception_local);
int32_t __leave_target = 0;
NO_UNUSED_WARNING (__leave_target);
int32_t G_B7_0 = 0;
{
List_1_t2766455145 * L_0 = __this->get_m_storagePool_31();
V_3 = (bool)((((int32_t)((((Il2CppObject*)(List_1_t2766455145 *)L_0) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_1 = V_3;
if (L_1)
{
goto IL_001d;
}
}
{
int32_t L_2 = ___minimumCapacityInBytes0;
V_2 = ((ByteU5BU5D_t3397334013*)SZArrayNew(ByteU5BU5D_t3397334013_il2cpp_TypeInfo_var, (uint32_t)L_2));
goto IL_00c2;
}
IL_001d:
{
List_1_t2766455145 * L_3 = __this->get_m_storagePool_31();
List_1_t2766455145 * L_4 = L_3;
V_4 = L_4;
Monitor_Enter_m2136705809(NULL /*static, unused*/, L_4, /*hidden argument*/NULL);
}
IL_002c:
try
{ // begin try (depth: 1)
{
V_0 = 0;
goto IL_0086;
}
IL_0031:
{
List_1_t2766455145 * L_5 = __this->get_m_storagePool_31();
int32_t L_6 = V_0;
NullCheck(L_5);
ByteU5BU5D_t3397334013* L_7 = List_1_get_Item_m3195270850(L_5, L_6, /*hidden argument*/List_1_get_Item_m3195270850_MethodInfo_var);
V_1 = L_7;
ByteU5BU5D_t3397334013* L_8 = V_1;
if (!L_8)
{
goto IL_004a;
}
}
IL_0042:
{
ByteU5BU5D_t3397334013* L_9 = V_1;
NullCheck(L_9);
int32_t L_10 = ___minimumCapacityInBytes0;
G_B7_0 = ((((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_9)->max_length))))) < ((int32_t)L_10))? 1 : 0);
goto IL_004b;
}
IL_004a:
{
G_B7_0 = 1;
}
IL_004b:
{
V_3 = (bool)G_B7_0;
bool L_11 = V_3;
if (L_11)
{
goto IL_0081;
}
}
IL_0050:
{
List_1_t2766455145 * L_12 = __this->get_m_storagePool_31();
int32_t L_13 = V_0;
NullCheck(L_12);
List_1_set_Item_m3147885089(L_12, L_13, (ByteU5BU5D_t3397334013*)(ByteU5BU5D_t3397334013*)NULL, /*hidden argument*/List_1_set_Item_m3147885089_MethodInfo_var);
int32_t L_14 = __this->get_m_storageSlotsUsedCount_35();
__this->set_m_storageSlotsUsedCount_35(((int32_t)((int32_t)L_14-(int32_t)1)));
int32_t L_15 = __this->get_m_storagePoolBytes_34();
ByteU5BU5D_t3397334013* L_16 = V_1;
NullCheck(L_16);
__this->set_m_storagePoolBytes_34(((int32_t)((int32_t)L_15-(int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_16)->max_length)))))));
ByteU5BU5D_t3397334013* L_17 = V_1;
V_2 = L_17;
IL2CPP_LEAVE(0xC2, FINALLY_009b);
}
IL_0081:
{
int32_t L_18 = V_0;
V_0 = ((int32_t)((int32_t)L_18+(int32_t)1));
}
IL_0086:
{
int32_t L_19 = V_0;
List_1_t2766455145 * L_20 = __this->get_m_storagePool_31();
NullCheck(L_20);
int32_t L_21 = List_1_get_Count_m3625537567(L_20, /*hidden argument*/List_1_get_Count_m3625537567_MethodInfo_var);
V_3 = (bool)((((int32_t)L_19) < ((int32_t)L_21))? 1 : 0);
bool L_22 = V_3;
if (L_22)
{
goto IL_0031;
}
}
IL_0098:
{
IL2CPP_LEAVE(0xA4, FINALLY_009b);
}
} // end try (depth: 1)
catch(Il2CppExceptionWrapper& e)
{
__last_unhandled_exception = (Exception_t1927440687 *)e.ex;
goto FINALLY_009b;
}
FINALLY_009b:
{ // begin finally (depth: 1)
List_1_t2766455145 * L_23 = V_4;
Monitor_Exit_m2677760297(NULL /*static, unused*/, L_23, /*hidden argument*/NULL);
IL2CPP_END_FINALLY(155)
} // end finally (depth: 1)
IL2CPP_CLEANUP(155)
{
IL2CPP_JUMP_TBL(0xC2, IL_00c2)
IL2CPP_JUMP_TBL(0xA4, IL_00a4)
IL2CPP_RETHROW_IF_UNHANDLED(Exception_t1927440687 *)
}
IL_00a4:
{
NetPeerStatistics_t101027066 * L_24 = __this->get_m_statistics_25();
NetPeerStatistics_t101027066 * L_25 = L_24;
NullCheck(L_25);
int64_t L_26 = L_25->get_m_bytesAllocated_8();
int32_t L_27 = ___minimumCapacityInBytes0;
NullCheck(L_25);
L_25->set_m_bytesAllocated_8(((int64_t)((int64_t)L_26+(int64_t)(((int64_t)((int64_t)L_27))))));
int32_t L_28 = ___minimumCapacityInBytes0;
V_2 = ((ByteU5BU5D_t3397334013*)SZArrayNew(ByteU5BU5D_t3397334013_il2cpp_TypeInfo_var, (uint32_t)L_28));
goto IL_00c2;
}
IL_00c2:
{
ByteU5BU5D_t3397334013* L_29 = V_2;
return L_29;
}
}
// System.Void Lidgren.Network.NetPeer::Recycle(System.Byte[])
extern Il2CppClass* NetRandom_t509742058_il2cpp_TypeInfo_var;
extern const MethodInfo* List_1_get_Count_m3625537567_MethodInfo_var;
extern const MethodInfo* List_1_get_Item_m3195270850_MethodInfo_var;
extern const MethodInfo* List_1_set_Item_m3147885089_MethodInfo_var;
extern const MethodInfo* List_1_Add_m44369977_MethodInfo_var;
extern const uint32_t NetPeer_Recycle_m1253877116_MetadataUsageId;
extern "C" void NetPeer_Recycle_m1253877116 (NetPeer_t1779390221 * __this, ByteU5BU5D_t3397334013* ___storage0, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetPeer_Recycle_m1253877116_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
int32_t V_0 = 0;
int32_t V_1 = 0;
int32_t V_2 = 0;
bool V_3 = false;
List_1_t2766455145 * V_4 = NULL;
Exception_t1927440687 * __last_unhandled_exception = 0;
NO_UNUSED_WARNING (__last_unhandled_exception);
Exception_t1927440687 * __exception_local = 0;
NO_UNUSED_WARNING (__exception_local);
int32_t __leave_target = 0;
NO_UNUSED_WARNING (__leave_target);
int32_t G_B3_0 = 0;
{
List_1_t2766455145 * L_0 = __this->get_m_storagePool_31();
if (!L_0)
{
goto IL_0012;
}
}
{
ByteU5BU5D_t3397334013* L_1 = ___storage0;
G_B3_0 = ((((int32_t)((((Il2CppObject*)(ByteU5BU5D_t3397334013*)L_1) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0)) == ((int32_t)0))? 1 : 0);
goto IL_0013;
}
IL_0012:
{
G_B3_0 = 0;
}
IL_0013:
{
V_3 = (bool)G_B3_0;
bool L_2 = V_3;
if (L_2)
{
goto IL_001d;
}
}
{
goto IL_0137;
}
IL_001d:
{
List_1_t2766455145 * L_3 = __this->get_m_storagePool_31();
List_1_t2766455145 * L_4 = L_3;
V_4 = L_4;
Monitor_Enter_m2136705809(NULL /*static, unused*/, L_4, /*hidden argument*/NULL);
}
IL_002c:
try
{ // begin try (depth: 1)
{
List_1_t2766455145 * L_5 = __this->get_m_storagePool_31();
NullCheck(L_5);
int32_t L_6 = List_1_get_Count_m3625537567(L_5, /*hidden argument*/List_1_get_Count_m3625537567_MethodInfo_var);
V_0 = L_6;
V_1 = 0;
goto IL_008b;
}
IL_003d:
{
List_1_t2766455145 * L_7 = __this->get_m_storagePool_31();
int32_t L_8 = V_1;
NullCheck(L_7);
ByteU5BU5D_t3397334013* L_9 = List_1_get_Item_m3195270850(L_7, L_8, /*hidden argument*/List_1_get_Item_m3195270850_MethodInfo_var);
V_3 = (bool)((((int32_t)((((Il2CppObject*)(ByteU5BU5D_t3397334013*)L_9) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_10 = V_3;
if (L_10)
{
goto IL_0086;
}
}
IL_0054:
{
int32_t L_11 = __this->get_m_storageSlotsUsedCount_35();
__this->set_m_storageSlotsUsedCount_35(((int32_t)((int32_t)L_11+(int32_t)1)));
int32_t L_12 = __this->get_m_storagePoolBytes_34();
ByteU5BU5D_t3397334013* L_13 = ___storage0;
NullCheck(L_13);
__this->set_m_storagePoolBytes_34(((int32_t)((int32_t)L_12+(int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_13)->max_length)))))));
List_1_t2766455145 * L_14 = __this->get_m_storagePool_31();
int32_t L_15 = V_1;
ByteU5BU5D_t3397334013* L_16 = ___storage0;
NullCheck(L_14);
List_1_set_Item_m3147885089(L_14, L_15, L_16, /*hidden argument*/List_1_set_Item_m3147885089_MethodInfo_var);
IL2CPP_LEAVE(0x137, FINALLY_012d);
}
IL_0086:
{
int32_t L_17 = V_1;
V_1 = ((int32_t)((int32_t)L_17+(int32_t)1));
}
IL_008b:
{
int32_t L_18 = V_1;
int32_t L_19 = V_0;
V_3 = (bool)((((int32_t)L_18) < ((int32_t)L_19))? 1 : 0);
bool L_20 = V_3;
if (L_20)
{
goto IL_003d;
}
}
IL_0093:
{
List_1_t2766455145 * L_21 = __this->get_m_storagePool_31();
NullCheck(L_21);
int32_t L_22 = List_1_get_Count_m3625537567(L_21, /*hidden argument*/List_1_get_Count_m3625537567_MethodInfo_var);
int32_t L_23 = __this->get_m_maxCacheCount_36();
V_3 = (bool)((((int32_t)L_22) < ((int32_t)L_23))? 1 : 0);
bool L_24 = V_3;
if (L_24)
{
goto IL_00fd;
}
}
IL_00aa:
{
IL2CPP_RUNTIME_CLASS_INIT(NetRandom_t509742058_il2cpp_TypeInfo_var);
NetRandom_t509742058 * L_25 = ((NetRandom_t509742058_StaticFields*)NetRandom_t509742058_il2cpp_TypeInfo_var->static_fields)->get_Instance_3();
List_1_t2766455145 * L_26 = __this->get_m_storagePool_31();
NullCheck(L_26);
int32_t L_27 = List_1_get_Count_m3625537567(L_26, /*hidden argument*/List_1_get_Count_m3625537567_MethodInfo_var);
NullCheck(L_25);
int32_t L_28 = VirtFuncInvoker1< int32_t, int32_t >::Invoke(6 /* System.Int32 System.Random::Next(System.Int32) */, L_25, L_27);
V_2 = L_28;
int32_t L_29 = __this->get_m_storagePoolBytes_34();
List_1_t2766455145 * L_30 = __this->get_m_storagePool_31();
int32_t L_31 = V_2;
NullCheck(L_30);
ByteU5BU5D_t3397334013* L_32 = List_1_get_Item_m3195270850(L_30, L_31, /*hidden argument*/List_1_get_Item_m3195270850_MethodInfo_var);
NullCheck(L_32);
__this->set_m_storagePoolBytes_34(((int32_t)((int32_t)L_29-(int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_32)->max_length)))))));
int32_t L_33 = __this->get_m_storagePoolBytes_34();
ByteU5BU5D_t3397334013* L_34 = ___storage0;
NullCheck(L_34);
__this->set_m_storagePoolBytes_34(((int32_t)((int32_t)L_33+(int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_34)->max_length)))))));
List_1_t2766455145 * L_35 = __this->get_m_storagePool_31();
int32_t L_36 = V_2;
ByteU5BU5D_t3397334013* L_37 = ___storage0;
NullCheck(L_35);
List_1_set_Item_m3147885089(L_35, L_36, L_37, /*hidden argument*/List_1_set_Item_m3147885089_MethodInfo_var);
goto IL_012a;
}
IL_00fd:
{
int32_t L_38 = __this->get_m_storageSlotsUsedCount_35();
__this->set_m_storageSlotsUsedCount_35(((int32_t)((int32_t)L_38+(int32_t)1)));
int32_t L_39 = __this->get_m_storagePoolBytes_34();
ByteU5BU5D_t3397334013* L_40 = ___storage0;
NullCheck(L_40);
__this->set_m_storagePoolBytes_34(((int32_t)((int32_t)L_39+(int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_40)->max_length)))))));
List_1_t2766455145 * L_41 = __this->get_m_storagePool_31();
ByteU5BU5D_t3397334013* L_42 = ___storage0;
NullCheck(L_41);
List_1_Add_m44369977(L_41, L_42, /*hidden argument*/List_1_Add_m44369977_MethodInfo_var);
}
IL_012a:
{
IL2CPP_LEAVE(0x136, FINALLY_012d);
}
} // end try (depth: 1)
catch(Il2CppExceptionWrapper& e)
{
__last_unhandled_exception = (Exception_t1927440687 *)e.ex;
goto FINALLY_012d;
}
FINALLY_012d:
{ // begin finally (depth: 1)
List_1_t2766455145 * L_43 = V_4;
Monitor_Exit_m2677760297(NULL /*static, unused*/, L_43, /*hidden argument*/NULL);
IL2CPP_END_FINALLY(301)
} // end finally (depth: 1)
IL2CPP_CLEANUP(301)
{
IL2CPP_JUMP_TBL(0x137, IL_0137)
IL2CPP_JUMP_TBL(0x136, IL_0136)
IL2CPP_RETHROW_IF_UNHANDLED(Exception_t1927440687 *)
}
IL_0136:
{
}
IL_0137:
{
return;
}
}
// Lidgren.Network.NetOutgoingMessage Lidgren.Network.NetPeer::CreateMessage()
extern "C" NetOutgoingMessage_t2016542980 * NetPeer_CreateMessage_m4252675839 (NetPeer_t1779390221 * __this, const MethodInfo* method)
{
NetOutgoingMessage_t2016542980 * V_0 = NULL;
{
NetPeerConfiguration_t136603591 * L_0 = __this->get_m_configuration_21();
NullCheck(L_0);
int32_t L_1 = L_0->get_m_defaultOutgoingMessageCapacity_7();
NetOutgoingMessage_t2016542980 * L_2 = NetPeer_CreateMessage_m3328975762(__this, L_1, /*hidden argument*/NULL);
V_0 = L_2;
goto IL_0015;
}
IL_0015:
{
NetOutgoingMessage_t2016542980 * L_3 = V_0;
return L_3;
}
}
// Lidgren.Network.NetOutgoingMessage Lidgren.Network.NetPeer::CreateMessage(System.String)
extern Il2CppClass* String_t_il2cpp_TypeInfo_var;
extern const uint32_t NetPeer_CreateMessage_m3445598245_MetadataUsageId;
extern "C" NetOutgoingMessage_t2016542980 * NetPeer_CreateMessage_m3445598245 (NetPeer_t1779390221 * __this, String_t* ___content0, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetPeer_CreateMessage_m3445598245_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
NetOutgoingMessage_t2016542980 * V_0 = NULL;
NetOutgoingMessage_t2016542980 * V_1 = NULL;
bool V_2 = false;
{
String_t* L_0 = ___content0;
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
bool L_1 = String_IsNullOrEmpty_m2802126737(NULL /*static, unused*/, L_0, /*hidden argument*/NULL);
V_2 = (bool)((((int32_t)L_1) == ((int32_t)0))? 1 : 0);
bool L_2 = V_2;
if (L_2)
{
goto IL_001a;
}
}
{
NetOutgoingMessage_t2016542980 * L_3 = NetPeer_CreateMessage_m3328975762(__this, 1, /*hidden argument*/NULL);
V_0 = L_3;
goto IL_002b;
}
IL_001a:
{
String_t* L_4 = ___content0;
NullCheck(L_4);
int32_t L_5 = String_get_Length_m1606060069(L_4, /*hidden argument*/NULL);
NetOutgoingMessage_t2016542980 * L_6 = NetPeer_CreateMessage_m3328975762(__this, ((int32_t)((int32_t)2+(int32_t)L_5)), /*hidden argument*/NULL);
V_0 = L_6;
}
IL_002b:
{
NetOutgoingMessage_t2016542980 * L_7 = V_0;
String_t* L_8 = ___content0;
NullCheck(L_7);
NetBuffer_Write_m962556565(L_7, L_8, /*hidden argument*/NULL);
NetOutgoingMessage_t2016542980 * L_9 = V_0;
V_1 = L_9;
goto IL_0037;
}
IL_0037:
{
NetOutgoingMessage_t2016542980 * L_10 = V_1;
return L_10;
}
}
// Lidgren.Network.NetOutgoingMessage Lidgren.Network.NetPeer::CreateMessage(System.Int32)
extern Il2CppClass* NetOutgoingMessage_t2016542980_il2cpp_TypeInfo_var;
extern Il2CppClass* Int32_t2071877448_il2cpp_TypeInfo_var;
extern Il2CppClass* String_t_il2cpp_TypeInfo_var;
extern const MethodInfo* NetQueue_1_TryDequeue_m592441308_MethodInfo_var;
extern Il2CppCodeGenString* _stringLiteral511144471;
extern const uint32_t NetPeer_CreateMessage_m3328975762_MetadataUsageId;
extern "C" NetOutgoingMessage_t2016542980 * NetPeer_CreateMessage_m3328975762 (NetPeer_t1779390221 * __this, int32_t ___initialCapacity0, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetPeer_CreateMessage_m3328975762_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
NetOutgoingMessage_t2016542980 * V_0 = NULL;
NetOutgoingMessage_t2016542980 * V_1 = NULL;
bool V_2 = false;
int32_t G_B3_0 = 0;
{
NetQueue_1_t4233233666 * L_0 = __this->get_m_outgoingMessagesPool_32();
if (!L_0)
{
goto IL_0018;
}
}
{
NetQueue_1_t4233233666 * L_1 = __this->get_m_outgoingMessagesPool_32();
NullCheck(L_1);
bool L_2 = NetQueue_1_TryDequeue_m592441308(L_1, (&V_0), /*hidden argument*/NetQueue_1_TryDequeue_m592441308_MethodInfo_var);
G_B3_0 = ((int32_t)(L_2));
goto IL_0019;
}
IL_0018:
{
G_B3_0 = 0;
}
IL_0019:
{
V_2 = (bool)G_B3_0;
bool L_3 = V_2;
if (L_3)
{
goto IL_0024;
}
}
{
NetOutgoingMessage_t2016542980 * L_4 = (NetOutgoingMessage_t2016542980 *)il2cpp_codegen_object_new(NetOutgoingMessage_t2016542980_il2cpp_TypeInfo_var);
NetOutgoingMessage__ctor_m724105531(L_4, /*hidden argument*/NULL);
V_0 = L_4;
}
IL_0024:
{
NetOutgoingMessage_t2016542980 * L_5 = V_0;
NullCheck(L_5);
int32_t L_6 = L_5->get_m_recyclingCount_7();
NetOutgoingMessage_t2016542980 * L_7 = V_0;
NullCheck(L_7);
int32_t L_8 = L_7->get_m_recyclingCount_7();
int32_t L_9 = L_8;
Il2CppObject * L_10 = Box(Int32_t2071877448_il2cpp_TypeInfo_var, &L_9);
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_11 = String_Concat_m56707527(NULL /*static, unused*/, _stringLiteral511144471, L_10, /*hidden argument*/NULL);
NetException_Assert_m1067120882(NULL /*static, unused*/, (bool)((((int32_t)L_6) == ((int32_t)0))? 1 : 0), L_11, /*hidden argument*/NULL);
int32_t L_12 = ___initialCapacity0;
V_2 = (bool)((((int32_t)((((int32_t)L_12) > ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_13 = V_2;
if (L_13)
{
goto IL_0060;
}
}
{
NetOutgoingMessage_t2016542980 * L_14 = V_0;
int32_t L_15 = ___initialCapacity0;
ByteU5BU5D_t3397334013* L_16 = NetPeer_GetStorage_m389417990(__this, L_15, /*hidden argument*/NULL);
NullCheck(L_14);
((NetBuffer_t3608062491 *)L_14)->set_m_data_2(L_16);
}
IL_0060:
{
NetOutgoingMessage_t2016542980 * L_17 = V_0;
V_1 = L_17;
goto IL_0064;
}
IL_0064:
{
NetOutgoingMessage_t2016542980 * L_18 = V_1;
return L_18;
}
}
// Lidgren.Network.NetIncomingMessage Lidgren.Network.NetPeer::CreateIncomingMessage(Lidgren.Network.NetIncomingMessageType,System.Byte[])
extern Il2CppClass* NetIncomingMessage_t2014089816_il2cpp_TypeInfo_var;
extern const MethodInfo* NetQueue_1_TryDequeue_m2762539262_MethodInfo_var;
extern const uint32_t NetPeer_CreateIncomingMessage_m1102215321_MetadataUsageId;
extern "C" NetIncomingMessage_t2014089816 * NetPeer_CreateIncomingMessage_m1102215321 (NetPeer_t1779390221 * __this, int32_t ___tp0, ByteU5BU5D_t3397334013* ___useStorageData1, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetPeer_CreateIncomingMessage_m1102215321_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
NetIncomingMessage_t2014089816 * V_0 = NULL;
NetIncomingMessage_t2014089816 * V_1 = NULL;
bool V_2 = false;
int32_t G_B3_0 = 0;
{
NetQueue_1_t4230780502 * L_0 = __this->get_m_incomingMessagesPool_33();
if (!L_0)
{
goto IL_0018;
}
}
{
NetQueue_1_t4230780502 * L_1 = __this->get_m_incomingMessagesPool_33();
NullCheck(L_1);
bool L_2 = NetQueue_1_TryDequeue_m2762539262(L_1, (&V_0), /*hidden argument*/NetQueue_1_TryDequeue_m2762539262_MethodInfo_var);
G_B3_0 = ((int32_t)(L_2));
goto IL_0019;
}
IL_0018:
{
G_B3_0 = 0;
}
IL_0019:
{
V_2 = (bool)G_B3_0;
bool L_3 = V_2;
if (L_3)
{
goto IL_0027;
}
}
{
int32_t L_4 = ___tp0;
NetIncomingMessage_t2014089816 * L_5 = (NetIncomingMessage_t2014089816 *)il2cpp_codegen_object_new(NetIncomingMessage_t2014089816_il2cpp_TypeInfo_var);
NetIncomingMessage__ctor_m2874845560(L_5, L_4, /*hidden argument*/NULL);
V_0 = L_5;
goto IL_002e;
}
IL_0027:
{
NetIncomingMessage_t2014089816 * L_6 = V_0;
int32_t L_7 = ___tp0;
NullCheck(L_6);
L_6->set_m_incomingMessageType_5(L_7);
}
IL_002e:
{
NetIncomingMessage_t2014089816 * L_8 = V_0;
ByteU5BU5D_t3397334013* L_9 = ___useStorageData1;
NullCheck(L_8);
((NetBuffer_t3608062491 *)L_8)->set_m_data_2(L_9);
NetIncomingMessage_t2014089816 * L_10 = V_0;
V_1 = L_10;
goto IL_0039;
}
IL_0039:
{
NetIncomingMessage_t2014089816 * L_11 = V_1;
return L_11;
}
}
// Lidgren.Network.NetIncomingMessage Lidgren.Network.NetPeer::CreateIncomingMessage(Lidgren.Network.NetIncomingMessageType,System.Int32)
extern Il2CppClass* NetIncomingMessage_t2014089816_il2cpp_TypeInfo_var;
extern const MethodInfo* NetQueue_1_TryDequeue_m2762539262_MethodInfo_var;
extern const uint32_t NetPeer_CreateIncomingMessage_m2109562735_MetadataUsageId;
extern "C" NetIncomingMessage_t2014089816 * NetPeer_CreateIncomingMessage_m2109562735 (NetPeer_t1779390221 * __this, int32_t ___tp0, int32_t ___minimumByteSize1, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetPeer_CreateIncomingMessage_m2109562735_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
NetIncomingMessage_t2014089816 * V_0 = NULL;
NetIncomingMessage_t2014089816 * V_1 = NULL;
bool V_2 = false;
int32_t G_B3_0 = 0;
{
NetQueue_1_t4230780502 * L_0 = __this->get_m_incomingMessagesPool_33();
if (!L_0)
{
goto IL_0018;
}
}
{
NetQueue_1_t4230780502 * L_1 = __this->get_m_incomingMessagesPool_33();
NullCheck(L_1);
bool L_2 = NetQueue_1_TryDequeue_m2762539262(L_1, (&V_0), /*hidden argument*/NetQueue_1_TryDequeue_m2762539262_MethodInfo_var);
G_B3_0 = ((int32_t)(L_2));
goto IL_0019;
}
IL_0018:
{
G_B3_0 = 0;
}
IL_0019:
{
V_2 = (bool)G_B3_0;
bool L_3 = V_2;
if (L_3)
{
goto IL_0027;
}
}
{
int32_t L_4 = ___tp0;
NetIncomingMessage_t2014089816 * L_5 = (NetIncomingMessage_t2014089816 *)il2cpp_codegen_object_new(NetIncomingMessage_t2014089816_il2cpp_TypeInfo_var);
NetIncomingMessage__ctor_m2874845560(L_5, L_4, /*hidden argument*/NULL);
V_0 = L_5;
goto IL_002e;
}
IL_0027:
{
NetIncomingMessage_t2014089816 * L_6 = V_0;
int32_t L_7 = ___tp0;
NullCheck(L_6);
L_6->set_m_incomingMessageType_5(L_7);
}
IL_002e:
{
NetIncomingMessage_t2014089816 * L_8 = V_0;
int32_t L_9 = ___minimumByteSize1;
ByteU5BU5D_t3397334013* L_10 = NetPeer_GetStorage_m389417990(__this, L_9, /*hidden argument*/NULL);
NullCheck(L_8);
((NetBuffer_t3608062491 *)L_8)->set_m_data_2(L_10);
NetIncomingMessage_t2014089816 * L_11 = V_0;
V_1 = L_11;
goto IL_003f;
}
IL_003f:
{
NetIncomingMessage_t2014089816 * L_12 = V_1;
return L_12;
}
}
// System.Void Lidgren.Network.NetPeer::Recycle(Lidgren.Network.NetIncomingMessage)
extern const MethodInfo* NetQueue_1_Contains_m2505440926_MethodInfo_var;
extern const MethodInfo* NetQueue_1_get_Count_m1000636011_MethodInfo_var;
extern const MethodInfo* NetQueue_1_Enqueue_m989769817_MethodInfo_var;
extern Il2CppCodeGenString* _stringLiteral97253458;
extern const uint32_t NetPeer_Recycle_m1601919902_MetadataUsageId;
extern "C" void NetPeer_Recycle_m1601919902 (NetPeer_t1779390221 * __this, NetIncomingMessage_t2014089816 * ___msg0, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetPeer_Recycle_m1601919902_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
ByteU5BU5D_t3397334013* V_0 = NULL;
bool V_1 = false;
int32_t G_B3_0 = 0;
{
NetQueue_1_t4230780502 * L_0 = __this->get_m_incomingMessagesPool_33();
if (!L_0)
{
goto IL_0012;
}
}
{
NetIncomingMessage_t2014089816 * L_1 = ___msg0;
G_B3_0 = ((((int32_t)((((Il2CppObject*)(NetIncomingMessage_t2014089816 *)L_1) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0)) == ((int32_t)0))? 1 : 0);
goto IL_0013;
}
IL_0012:
{
G_B3_0 = 0;
}
IL_0013:
{
V_1 = (bool)G_B3_0;
bool L_2 = V_1;
if (L_2)
{
goto IL_001a;
}
}
{
goto IL_0078;
}
IL_001a:
{
NetQueue_1_t4230780502 * L_3 = __this->get_m_incomingMessagesPool_33();
NetIncomingMessage_t2014089816 * L_4 = ___msg0;
NullCheck(L_3);
bool L_5 = NetQueue_1_Contains_m2505440926(L_3, L_4, /*hidden argument*/NetQueue_1_Contains_m2505440926_MethodInfo_var);
NetException_Assert_m1067120882(NULL /*static, unused*/, (bool)((((int32_t)L_5) == ((int32_t)0))? 1 : 0), _stringLiteral97253458, /*hidden argument*/NULL);
NetIncomingMessage_t2014089816 * L_6 = ___msg0;
NullCheck(L_6);
ByteU5BU5D_t3397334013* L_7 = ((NetBuffer_t3608062491 *)L_6)->get_m_data_2();
V_0 = L_7;
NetIncomingMessage_t2014089816 * L_8 = ___msg0;
NullCheck(L_8);
((NetBuffer_t3608062491 *)L_8)->set_m_data_2((ByteU5BU5D_t3397334013*)NULL);
ByteU5BU5D_t3397334013* L_9 = V_0;
NetPeer_Recycle_m1253877116(__this, L_9, /*hidden argument*/NULL);
NetIncomingMessage_t2014089816 * L_10 = ___msg0;
NullCheck(L_10);
NetIncomingMessage_Reset_m2284406032(L_10, /*hidden argument*/NULL);
NetQueue_1_t4230780502 * L_11 = __this->get_m_incomingMessagesPool_33();
NullCheck(L_11);
int32_t L_12 = NetQueue_1_get_Count_m1000636011(L_11, /*hidden argument*/NetQueue_1_get_Count_m1000636011_MethodInfo_var);
int32_t L_13 = __this->get_m_maxCacheCount_36();
V_1 = (bool)((((int32_t)((((int32_t)L_12) < ((int32_t)L_13))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_14 = V_1;
if (L_14)
{
goto IL_0078;
}
}
{
NetQueue_1_t4230780502 * L_15 = __this->get_m_incomingMessagesPool_33();
NetIncomingMessage_t2014089816 * L_16 = ___msg0;
NullCheck(L_15);
NetQueue_1_Enqueue_m989769817(L_15, L_16, /*hidden argument*/NetQueue_1_Enqueue_m989769817_MethodInfo_var);
}
IL_0078:
{
return;
}
}
// System.Void Lidgren.Network.NetPeer::Recycle(Lidgren.Network.NetOutgoingMessage)
extern Il2CppClass* Int32_t2071877448_il2cpp_TypeInfo_var;
extern Il2CppClass* String_t_il2cpp_TypeInfo_var;
extern const MethodInfo* NetQueue_1_Contains_m974444428_MethodInfo_var;
extern const MethodInfo* NetQueue_1_get_Count_m685192943_MethodInfo_var;
extern const MethodInfo* NetQueue_1_Enqueue_m3616763713_MethodInfo_var;
extern Il2CppCodeGenString* _stringLiteral1912447608;
extern Il2CppCodeGenString* _stringLiteral3009685346;
extern const uint32_t NetPeer_Recycle_m2290156780_MetadataUsageId;
extern "C" void NetPeer_Recycle_m2290156780 (NetPeer_t1779390221 * __this, NetOutgoingMessage_t2016542980 * ___msg0, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetPeer_Recycle_m2290156780_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
ByteU5BU5D_t3397334013* V_0 = NULL;
bool V_1 = false;
{
NetQueue_1_t4233233666 * L_0 = __this->get_m_outgoingMessagesPool_32();
V_1 = (bool)((((int32_t)((((Il2CppObject*)(NetQueue_1_t4233233666 *)L_0) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_1 = V_1;
if (L_1)
{
goto IL_0016;
}
}
{
goto IL_00b4;
}
IL_0016:
{
NetQueue_1_t4233233666 * L_2 = __this->get_m_outgoingMessagesPool_32();
NetOutgoingMessage_t2016542980 * L_3 = ___msg0;
NullCheck(L_2);
bool L_4 = NetQueue_1_Contains_m974444428(L_2, L_3, /*hidden argument*/NetQueue_1_Contains_m974444428_MethodInfo_var);
NetException_Assert_m1067120882(NULL /*static, unused*/, (bool)((((int32_t)L_4) == ((int32_t)0))? 1 : 0), _stringLiteral1912447608, /*hidden argument*/NULL);
NetOutgoingMessage_t2016542980 * L_5 = ___msg0;
NullCheck(L_5);
int32_t L_6 = L_5->get_m_recyclingCount_7();
V_1 = (bool)((((int32_t)L_6) == ((int32_t)0))? 1 : 0);
bool L_7 = V_1;
if (L_7)
{
goto IL_0059;
}
}
{
NetOutgoingMessage_t2016542980 * L_8 = ___msg0;
NullCheck(L_8);
int32_t L_9 = L_8->get_m_recyclingCount_7();
int32_t L_10 = L_9;
Il2CppObject * L_11 = Box(Int32_t2071877448_il2cpp_TypeInfo_var, &L_10);
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_12 = String_Concat_m56707527(NULL /*static, unused*/, _stringLiteral3009685346, L_11, /*hidden argument*/NULL);
NetPeer_LogWarning_m3266657906(__this, L_12, /*hidden argument*/NULL);
}
IL_0059:
{
NetOutgoingMessage_t2016542980 * L_13 = ___msg0;
NullCheck(L_13);
L_13->set_m_recyclingCount_7(0);
NetOutgoingMessage_t2016542980 * L_14 = ___msg0;
NullCheck(L_14);
ByteU5BU5D_t3397334013* L_15 = ((NetBuffer_t3608062491 *)L_14)->get_m_data_2();
V_0 = L_15;
NetOutgoingMessage_t2016542980 * L_16 = ___msg0;
NullCheck(L_16);
((NetBuffer_t3608062491 *)L_16)->set_m_data_2((ByteU5BU5D_t3397334013*)NULL);
NetOutgoingMessage_t2016542980 * L_17 = ___msg0;
NullCheck(L_17);
int32_t L_18 = L_17->get_m_fragmentGroup_8();
V_1 = (bool)((((int32_t)((((int32_t)L_18) == ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_19 = V_1;
if (L_19)
{
goto IL_0086;
}
}
{
ByteU5BU5D_t3397334013* L_20 = V_0;
NetPeer_Recycle_m1253877116(__this, L_20, /*hidden argument*/NULL);
}
IL_0086:
{
NetOutgoingMessage_t2016542980 * L_21 = ___msg0;
NullCheck(L_21);
NetOutgoingMessage_Reset_m4185181874(L_21, /*hidden argument*/NULL);
NetQueue_1_t4233233666 * L_22 = __this->get_m_outgoingMessagesPool_32();
NullCheck(L_22);
int32_t L_23 = NetQueue_1_get_Count_m685192943(L_22, /*hidden argument*/NetQueue_1_get_Count_m685192943_MethodInfo_var);
int32_t L_24 = __this->get_m_maxCacheCount_36();
V_1 = (bool)((((int32_t)((((int32_t)L_23) < ((int32_t)L_24))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_25 = V_1;
if (L_25)
{
goto IL_00b4;
}
}
{
NetQueue_1_t4233233666 * L_26 = __this->get_m_outgoingMessagesPool_32();
NetOutgoingMessage_t2016542980 * L_27 = ___msg0;
NullCheck(L_26);
NetQueue_1_Enqueue_m3616763713(L_26, L_27, /*hidden argument*/NetQueue_1_Enqueue_m3616763713_MethodInfo_var);
}
IL_00b4:
{
return;
}
}
// Lidgren.Network.NetIncomingMessage Lidgren.Network.NetPeer::CreateIncomingMessage(Lidgren.Network.NetIncomingMessageType,System.String)
extern Il2CppClass* String_t_il2cpp_TypeInfo_var;
extern Il2CppClass* Encoding_t663144255_il2cpp_TypeInfo_var;
extern const uint32_t NetPeer_CreateIncomingMessage_m226906442_MetadataUsageId;
extern "C" NetIncomingMessage_t2014089816 * NetPeer_CreateIncomingMessage_m226906442 (NetPeer_t1779390221 * __this, int32_t ___tp0, String_t* ___text1, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetPeer_CreateIncomingMessage_m226906442_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
NetIncomingMessage_t2014089816 * V_0 = NULL;
int32_t V_1 = 0;
NetIncomingMessage_t2014089816 * V_2 = NULL;
bool V_3 = false;
int32_t G_B4_0 = 0;
int32_t G_B4_1 = 0;
NetPeer_t1779390221 * G_B4_2 = NULL;
int32_t G_B3_0 = 0;
int32_t G_B3_1 = 0;
NetPeer_t1779390221 * G_B3_2 = NULL;
int32_t G_B5_0 = 0;
int32_t G_B5_1 = 0;
int32_t G_B5_2 = 0;
NetPeer_t1779390221 * G_B5_3 = NULL;
{
String_t* L_0 = ___text1;
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
bool L_1 = String_IsNullOrEmpty_m2802126737(NULL /*static, unused*/, L_0, /*hidden argument*/NULL);
V_3 = (bool)((((int32_t)L_1) == ((int32_t)0))? 1 : 0);
bool L_2 = V_3;
if (L_2)
{
goto IL_0028;
}
}
{
int32_t L_3 = ___tp0;
NetIncomingMessage_t2014089816 * L_4 = NetPeer_CreateIncomingMessage_m2109562735(__this, L_3, 1, /*hidden argument*/NULL);
V_0 = L_4;
NetIncomingMessage_t2014089816 * L_5 = V_0;
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_6 = ((String_t_StaticFields*)String_t_il2cpp_TypeInfo_var->static_fields)->get_Empty_2();
NullCheck(L_5);
NetBuffer_Write_m962556565(L_5, L_6, /*hidden argument*/NULL);
NetIncomingMessage_t2014089816 * L_7 = V_0;
V_2 = L_7;
goto IL_0054;
}
IL_0028:
{
IL2CPP_RUNTIME_CLASS_INIT(Encoding_t663144255_il2cpp_TypeInfo_var);
Encoding_t663144255 * L_8 = Encoding_get_UTF8_m1752852937(NULL /*static, unused*/, /*hidden argument*/NULL);
String_t* L_9 = ___text1;
NullCheck(L_8);
int32_t L_10 = VirtFuncInvoker1< int32_t, String_t* >::Invoke(6 /* System.Int32 System.Text.Encoding::GetByteCount(System.String) */, L_8, L_9);
V_1 = L_10;
int32_t L_11 = ___tp0;
int32_t L_12 = V_1;
int32_t L_13 = V_1;
G_B3_0 = L_12;
G_B3_1 = L_11;
G_B3_2 = __this;
if ((((int32_t)L_13) > ((int32_t)((int32_t)127))))
{
G_B4_0 = L_12;
G_B4_1 = L_11;
G_B4_2 = __this;
goto IL_003f;
}
}
{
G_B5_0 = 1;
G_B5_1 = G_B3_0;
G_B5_2 = G_B3_1;
G_B5_3 = G_B3_2;
goto IL_0040;
}
IL_003f:
{
G_B5_0 = 2;
G_B5_1 = G_B4_0;
G_B5_2 = G_B4_1;
G_B5_3 = G_B4_2;
}
IL_0040:
{
NullCheck(G_B5_3);
NetIncomingMessage_t2014089816 * L_14 = NetPeer_CreateIncomingMessage_m2109562735(G_B5_3, G_B5_2, ((int32_t)((int32_t)G_B5_1+(int32_t)G_B5_0)), /*hidden argument*/NULL);
V_0 = L_14;
NetIncomingMessage_t2014089816 * L_15 = V_0;
String_t* L_16 = ___text1;
NullCheck(L_15);
NetBuffer_Write_m962556565(L_15, L_16, /*hidden argument*/NULL);
NetIncomingMessage_t2014089816 * L_17 = V_0;
V_2 = L_17;
goto IL_0054;
}
IL_0054:
{
NetIncomingMessage_t2014089816 * L_18 = V_2;
return L_18;
}
}
// Lidgren.Network.NetSendResult Lidgren.Network.NetPeer::SendMessage(Lidgren.Network.NetOutgoingMessage,Lidgren.Network.NetConnection,Lidgren.Network.NetDeliveryMethod,System.Int32)
extern Il2CppClass* ArgumentNullException_t628810857_il2cpp_TypeInfo_var;
extern Il2CppClass* ArgumentOutOfRangeException_t279959794_il2cpp_TypeInfo_var;
extern Il2CppClass* NetDeliveryMethod_t3645638710_il2cpp_TypeInfo_var;
extern Il2CppClass* String_t_il2cpp_TypeInfo_var;
extern Il2CppClass* NetException_t2452891498_il2cpp_TypeInfo_var;
extern Il2CppClass* NetConnectionU5BU5D_t3463746480_il2cpp_TypeInfo_var;
extern Il2CppCodeGenString* _stringLiteral3115736605;
extern Il2CppCodeGenString* _stringLiteral676241627;
extern Il2CppCodeGenString* _stringLiteral2408859122;
extern Il2CppCodeGenString* _stringLiteral100989647;
extern Il2CppCodeGenString* _stringLiteral3257827683;
extern Il2CppCodeGenString* _stringLiteral312909813;
extern Il2CppCodeGenString* _stringLiteral1007400342;
extern const uint32_t NetPeer_SendMessage_m3610804500_MetadataUsageId;
extern "C" int32_t NetPeer_SendMessage_m3610804500 (NetPeer_t1779390221 * __this, NetOutgoingMessage_t2016542980 * ___msg0, NetConnection_t3331492029 * ___recipient1, uint8_t ___method2, int32_t ___sequenceChannel3, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetPeer_SendMessage_m3610804500_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
bool V_0 = false;
int32_t V_1 = 0;
int32_t V_2 = 0;
bool V_3 = false;
NetConnectionU5BU5D_t3463746480* V_4 = NULL;
int32_t G_B12_0 = 0;
int32_t G_B14_0 = 0;
int32_t G_B20_0 = 0;
int32_t G_B23_0 = 0;
{
NetOutgoingMessage_t2016542980 * L_0 = ___msg0;
V_3 = (bool)((((int32_t)((((Il2CppObject*)(NetOutgoingMessage_t2016542980 *)L_0) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_1 = V_3;
if (L_1)
{
goto IL_0017;
}
}
{
ArgumentNullException_t628810857 * L_2 = (ArgumentNullException_t628810857 *)il2cpp_codegen_object_new(ArgumentNullException_t628810857_il2cpp_TypeInfo_var);
ArgumentNullException__ctor_m3380712306(L_2, _stringLiteral3115736605, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_2);
}
IL_0017:
{
NetConnection_t3331492029 * L_3 = ___recipient1;
V_3 = (bool)((((int32_t)((((Il2CppObject*)(NetConnection_t3331492029 *)L_3) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_4 = V_3;
if (L_4)
{
goto IL_002d;
}
}
{
ArgumentNullException_t628810857 * L_5 = (ArgumentNullException_t628810857 *)il2cpp_codegen_object_new(ArgumentNullException_t628810857_il2cpp_TypeInfo_var);
ArgumentNullException__ctor_m3380712306(L_5, _stringLiteral676241627, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_5);
}
IL_002d:
{
int32_t L_6 = ___sequenceChannel3;
V_3 = (bool)((((int32_t)L_6) < ((int32_t)((int32_t)32)))? 1 : 0);
bool L_7 = V_3;
if (L_7)
{
goto IL_0042;
}
}
{
ArgumentOutOfRangeException_t279959794 * L_8 = (ArgumentOutOfRangeException_t279959794 *)il2cpp_codegen_object_new(ArgumentOutOfRangeException_t279959794_il2cpp_TypeInfo_var);
ArgumentOutOfRangeException__ctor_m1595007065(L_8, _stringLiteral2408859122, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_8);
}
IL_0042:
{
uint8_t L_9 = ___method2;
if ((((int32_t)L_9) == ((int32_t)1)))
{
goto IL_004b;
}
}
{
uint8_t L_10 = ___method2;
if ((!(((uint32_t)L_10) == ((uint32_t)((int32_t)34)))))
{
goto IL_005f;
}
}
IL_004b:
{
uint8_t L_11 = ___method2;
if ((((int32_t)L_11) == ((int32_t)1)))
{
goto IL_0054;
}
}
{
uint8_t L_12 = ___method2;
if ((!(((uint32_t)L_12) == ((uint32_t)((int32_t)34)))))
{
goto IL_005b;
}
}
IL_0054:
{
int32_t L_13 = ___sequenceChannel3;
G_B12_0 = ((((int32_t)L_13) == ((int32_t)0))? 1 : 0);
goto IL_005c;
}
IL_005b:
{
G_B12_0 = 0;
}
IL_005c:
{
G_B14_0 = G_B12_0;
goto IL_0060;
}
IL_005f:
{
G_B14_0 = 1;
}
IL_0060:
{
uint8_t L_14 = ___method2;
uint8_t L_15 = L_14;
Il2CppObject * L_16 = Box(NetDeliveryMethod_t3645638710_il2cpp_TypeInfo_var, &L_15);
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_17 = String_Concat_m2000667605(NULL /*static, unused*/, _stringLiteral100989647, L_16, _stringLiteral3257827683, /*hidden argument*/NULL);
NetException_Assert_m1067120882(NULL /*static, unused*/, (bool)G_B14_0, L_17, /*hidden argument*/NULL);
uint8_t L_18 = ___method2;
NetException_Assert_m1067120882(NULL /*static, unused*/, (bool)((((int32_t)((((int32_t)L_18) == ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0), _stringLiteral312909813, /*hidden argument*/NULL);
NetOutgoingMessage_t2016542980 * L_19 = ___msg0;
NullCheck(L_19);
bool L_20 = L_19->get_m_isSent_6();
V_3 = (bool)((((int32_t)L_20) == ((int32_t)0))? 1 : 0);
bool L_21 = V_3;
if (L_21)
{
goto IL_00a6;
}
}
{
NetException_t2452891498 * L_22 = (NetException_t2452891498 *)il2cpp_codegen_object_new(NetException_t2452891498_il2cpp_TypeInfo_var);
NetException__ctor_m2724322251(L_22, _stringLiteral1007400342, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_22);
}
IL_00a6:
{
NetOutgoingMessage_t2016542980 * L_23 = ___msg0;
NullCheck(L_23);
L_23->set_m_isSent_6((bool)1);
uint8_t L_24 = ___method2;
if ((((int32_t)L_24) == ((int32_t)1)))
{
goto IL_00b5;
}
}
{
uint8_t L_25 = ___method2;
if ((!(((uint32_t)L_25) == ((uint32_t)2))))
{
goto IL_00c8;
}
}
IL_00b5:
{
NetPeerConfiguration_t136603591 * L_26 = __this->get_m_configuration_21();
NullCheck(L_26);
int32_t L_27 = NetPeerConfiguration_get_UnreliableSizeBehaviour_m2649350738(L_26, /*hidden argument*/NULL);
G_B20_0 = ((((int32_t)((((int32_t)L_27) == ((int32_t)1))? 1 : 0)) == ((int32_t)0))? 1 : 0);
goto IL_00c9;
}
IL_00c8:
{
G_B20_0 = 0;
}
IL_00c9:
{
V_0 = (bool)G_B20_0;
NetOutgoingMessage_t2016542980 * L_28 = ___msg0;
NullCheck(L_28);
int32_t L_29 = NetBuffer_get_LengthBytes_m2765088638(L_28, /*hidden argument*/NULL);
V_1 = ((int32_t)((int32_t)5+(int32_t)L_29));
int32_t L_30 = V_1;
NetConnection_t3331492029 * L_31 = ___recipient1;
NullCheck(L_31);
int32_t L_32 = L_31->get_m_currentMTU_34();
if ((((int32_t)L_30) <= ((int32_t)L_32)))
{
goto IL_00e3;
}
}
{
bool L_33 = V_0;
G_B23_0 = ((((int32_t)L_33) == ((int32_t)0))? 1 : 0);
goto IL_00e4;
}
IL_00e3:
{
G_B23_0 = 0;
}
IL_00e4:
{
V_3 = (bool)G_B23_0;
bool L_34 = V_3;
if (L_34)
{
goto IL_0103;
}
}
{
NetOutgoingMessage_t2016542980 * L_35 = ___msg0;
NullCheck(L_35);
int32_t* L_36 = L_35->get_address_of_m_recyclingCount_7();
Interlocked_Increment_m129308425(NULL /*static, unused*/, L_36, /*hidden argument*/NULL);
NetConnection_t3331492029 * L_37 = ___recipient1;
NetOutgoingMessage_t2016542980 * L_38 = ___msg0;
uint8_t L_39 = ___method2;
int32_t L_40 = ___sequenceChannel3;
NullCheck(L_37);
int32_t L_41 = NetConnection_EnqueueMessage_m3897273412(L_37, L_38, L_39, L_40, /*hidden argument*/NULL);
V_2 = L_41;
goto IL_0131;
}
IL_0103:
{
NetConnection_t3331492029 * L_42 = ___recipient1;
NullCheck(L_42);
int32_t L_43 = L_42->get_m_status_2();
V_3 = (bool)((((int32_t)L_43) == ((int32_t)5))? 1 : 0);
bool L_44 = V_3;
if (L_44)
{
goto IL_0115;
}
}
{
V_2 = 0;
goto IL_0131;
}
IL_0115:
{
NetOutgoingMessage_t2016542980 * L_45 = ___msg0;
V_4 = ((NetConnectionU5BU5D_t3463746480*)SZArrayNew(NetConnectionU5BU5D_t3463746480_il2cpp_TypeInfo_var, (uint32_t)1));
NetConnectionU5BU5D_t3463746480* L_46 = V_4;
NetConnection_t3331492029 * L_47 = ___recipient1;
NullCheck(L_46);
IL2CPP_ARRAY_BOUNDS_CHECK(L_46, 0);
ArrayElementTypeCheck (L_46, L_47);
(L_46)->SetAt(static_cast<il2cpp_array_size_t>(0), (NetConnection_t3331492029 *)L_47);
NetConnectionU5BU5D_t3463746480* L_48 = V_4;
uint8_t L_49 = ___method2;
int32_t L_50 = ___sequenceChannel3;
int32_t L_51 = NetPeer_SendFragmentedMessage_m1345482430(__this, L_45, (Il2CppObject*)(Il2CppObject*)L_48, L_49, L_50, /*hidden argument*/NULL);
V_2 = L_51;
goto IL_0131;
}
IL_0131:
{
int32_t L_52 = V_2;
return L_52;
}
}
// System.Int32 Lidgren.Network.NetPeer::GetMTU(System.Collections.Generic.IList`1<Lidgren.Network.NetConnection>)
extern Il2CppClass* ICollection_1_t4283567334_il2cpp_TypeInfo_var;
extern Il2CppClass* NetException_t2452891498_il2cpp_TypeInfo_var;
extern Il2CppClass* IList_1_t3872432630_il2cpp_TypeInfo_var;
extern Il2CppCodeGenString* _stringLiteral2968979408;
extern const uint32_t NetPeer_GetMTU_m2569335695_MetadataUsageId;
extern "C" int32_t NetPeer_GetMTU_m2569335695 (Il2CppObject * __this /* static, unused */, Il2CppObject* ___recipients0, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetPeer_GetMTU_m2569335695_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
int32_t V_0 = 0;
int32_t V_1 = 0;
int32_t V_2 = 0;
NetConnection_t3331492029 * V_3 = NULL;
int32_t V_4 = 0;
int32_t V_5 = 0;
bool V_6 = false;
{
Il2CppObject* L_0 = ___recipients0;
NullCheck(L_0);
int32_t L_1 = InterfaceFuncInvoker0< int32_t >::Invoke(0 /* System.Int32 System.Collections.Generic.ICollection`1<Lidgren.Network.NetConnection>::get_Count() */, ICollection_1_t4283567334_il2cpp_TypeInfo_var, L_0);
V_0 = L_1;
V_1 = ((int32_t)2147483647LL);
int32_t L_2 = V_0;
V_6 = (bool)((((int32_t)((((int32_t)L_2) < ((int32_t)1))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_3 = V_6;
if (L_3)
{
goto IL_0027;
}
}
{
NetException_t2452891498 * L_4 = (NetException_t2452891498 *)il2cpp_codegen_object_new(NetException_t2452891498_il2cpp_TypeInfo_var);
NetException__ctor_m2724322251(L_4, _stringLiteral2968979408, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_4);
}
IL_0027:
{
V_2 = 0;
goto IL_0052;
}
IL_002b:
{
Il2CppObject* L_5 = ___recipients0;
int32_t L_6 = V_2;
NullCheck(L_5);
NetConnection_t3331492029 * L_7 = InterfaceFuncInvoker1< NetConnection_t3331492029 *, int32_t >::Invoke(3 /* !0 System.Collections.Generic.IList`1<Lidgren.Network.NetConnection>::get_Item(System.Int32) */, IList_1_t3872432630_il2cpp_TypeInfo_var, L_5, L_6);
V_3 = L_7;
NetConnection_t3331492029 * L_8 = V_3;
NullCheck(L_8);
int32_t L_9 = L_8->get_m_currentMTU_34();
V_4 = L_9;
int32_t L_10 = V_4;
int32_t L_11 = V_1;
V_6 = (bool)((((int32_t)((((int32_t)L_10) < ((int32_t)L_11))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_12 = V_6;
if (L_12)
{
goto IL_004d;
}
}
{
int32_t L_13 = V_4;
V_1 = L_13;
}
IL_004d:
{
int32_t L_14 = V_2;
V_2 = ((int32_t)((int32_t)L_14+(int32_t)1));
}
IL_0052:
{
int32_t L_15 = V_2;
int32_t L_16 = V_0;
V_6 = (bool)((((int32_t)L_15) < ((int32_t)L_16))? 1 : 0);
bool L_17 = V_6;
if (L_17)
{
goto IL_002b;
}
}
{
int32_t L_18 = V_1;
V_5 = L_18;
goto IL_0061;
}
IL_0061:
{
int32_t L_19 = V_5;
return L_19;
}
}
// System.Void Lidgren.Network.NetPeer/DelayedPacket::.ctor()
extern "C" void DelayedPacket__ctor_m30217367 (DelayedPacket_t1298207473 * __this, const MethodInfo* method)
{
{
Object__ctor_m2551263788(__this, /*hidden argument*/NULL);
return;
}
}
// System.Void Lidgren.Network.NetPeerConfiguration::.ctor(System.String)
extern Il2CppClass* String_t_il2cpp_TypeInfo_var;
extern Il2CppClass* NetException_t2452891498_il2cpp_TypeInfo_var;
extern Il2CppClass* IPAddress_t1399971723_il2cpp_TypeInfo_var;
extern Il2CppClass* NetUtility_t3562260209_il2cpp_TypeInfo_var;
extern Il2CppCodeGenString* _stringLiteral3133094195;
extern Il2CppCodeGenString* _stringLiteral2344018411;
extern const uint32_t NetPeerConfiguration__ctor_m2730954738_MetadataUsageId;
extern "C" void NetPeerConfiguration__ctor_m2730954738 (NetPeerConfiguration_t136603591 * __this, String_t* ___appIdentifier0, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetPeerConfiguration__ctor_m2730954738_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
IPAddress_t1399971723 * V_0 = NULL;
bool V_1 = false;
{
Object__ctor_m2551263788(__this, /*hidden argument*/NULL);
String_t* L_0 = ___appIdentifier0;
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
bool L_1 = String_IsNullOrEmpty_m2802126737(NULL /*static, unused*/, L_0, /*hidden argument*/NULL);
V_1 = (bool)((((int32_t)L_1) == ((int32_t)0))? 1 : 0);
bool L_2 = V_1;
if (L_2)
{
goto IL_0020;
}
}
{
NetException_t2452891498 * L_3 = (NetException_t2452891498 *)il2cpp_codegen_object_new(NetException_t2452891498_il2cpp_TypeInfo_var);
NetException__ctor_m2724322251(L_3, _stringLiteral3133094195, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_3);
}
IL_0020:
{
String_t* L_4 = ___appIdentifier0;
__this->set_m_appIdentifier_1(L_4);
__this->set_m_disabledTypes_16(((int32_t)6278));
__this->set_m_networkThreadName_2(_stringLiteral2344018411);
IL2CPP_RUNTIME_CLASS_INIT(IPAddress_t1399971723_il2cpp_TypeInfo_var);
IPAddress_t1399971723 * L_5 = ((IPAddress_t1399971723_StaticFields*)IPAddress_t1399971723_il2cpp_TypeInfo_var->static_fields)->get_Any_4();
__this->set_m_localAddress_3(L_5);
IPAddress_t1399971723 * L_6 = ((IPAddress_t1399971723_StaticFields*)IPAddress_t1399971723_il2cpp_TypeInfo_var->static_fields)->get_Broadcast_5();
__this->set_m_broadcastAddress_4(L_6);
IL2CPP_RUNTIME_CLASS_INIT(NetUtility_t3562260209_il2cpp_TypeInfo_var);
IPAddress_t1399971723 * L_7 = NetUtility_GetBroadcastAddress_m2689141683(NULL /*static, unused*/, /*hidden argument*/NULL);
V_0 = L_7;
IPAddress_t1399971723 * L_8 = V_0;
V_1 = (bool)((((Il2CppObject*)(IPAddress_t1399971723 *)L_8) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0);
bool L_9 = V_1;
if (L_9)
{
goto IL_006a;
}
}
{
IPAddress_t1399971723 * L_10 = V_0;
__this->set_m_broadcastAddress_4(L_10);
}
IL_006a:
{
__this->set_m_port_17(0);
__this->set_m_receiveBufferSize_18(((int32_t)131071));
__this->set_m_sendBufferSize_19(((int32_t)131071));
__this->set_m_acceptIncomingConnections_5((bool)0);
__this->set_m_maximumConnections_6(((int32_t)32));
__this->set_m_defaultOutgoingMessageCapacity_7(((int32_t)16));
__this->set_m_pingInterval_8((4.0f));
__this->set_m_connectionTimeout_11((25.0f));
__this->set_m_useMessageRecycling_9((bool)1);
__this->set_m_recycledCacheMaxCount_10(((int32_t)64));
__this->set_m_resendHandshakeInterval_20((3.0f));
__this->set_m_maximumHandshakeAttempts_21(5);
__this->set_m_autoFlushSendQueue_13((bool)1);
__this->set_m_suppressUnreliableUnorderedAcks_15((bool)0);
__this->set_m_maximumTransmissionUnit_26(((int32_t)1408));
__this->set_m_autoExpandMTU_27((bool)0);
__this->set_m_expandMTUFrequency_28((2.0f));
__this->set_m_expandMTUFailAttempts_29(5);
__this->set_m_unreliableSizeBehaviour_14(0);
__this->set_m_loss_22((0.0f));
__this->set_m_minimumOneWayLatency_24((0.0f));
__this->set_m_randomOneWayLatency_25((0.0f));
__this->set_m_duplicates_23((0.0f));
__this->set_m_isLocked_0((bool)0);
return;
}
}
// System.Void Lidgren.Network.NetPeerConfiguration::Lock()
extern "C" void NetPeerConfiguration_Lock_m363221111 (NetPeerConfiguration_t136603591 * __this, const MethodInfo* method)
{
{
__this->set_m_isLocked_0((bool)1);
return;
}
}
// System.String Lidgren.Network.NetPeerConfiguration::get_AppIdentifier()
extern "C" String_t* NetPeerConfiguration_get_AppIdentifier_m1563815312 (NetPeerConfiguration_t136603591 * __this, const MethodInfo* method)
{
String_t* V_0 = NULL;
{
String_t* L_0 = __this->get_m_appIdentifier_1();
V_0 = L_0;
goto IL_000a;
}
IL_000a:
{
String_t* L_1 = V_0;
return L_1;
}
}
// System.Void Lidgren.Network.NetPeerConfiguration::EnableMessageType(Lidgren.Network.NetIncomingMessageType)
extern "C" void NetPeerConfiguration_EnableMessageType_m3529385845 (NetPeerConfiguration_t136603591 * __this, int32_t ___type0, const MethodInfo* method)
{
{
int32_t L_0 = __this->get_m_disabledTypes_16();
int32_t L_1 = ___type0;
__this->set_m_disabledTypes_16(((int32_t)((int32_t)L_0&(int32_t)((~L_1)))));
return;
}
}
// System.Void Lidgren.Network.NetPeerConfiguration::DisableMessageType(Lidgren.Network.NetIncomingMessageType)
extern "C" void NetPeerConfiguration_DisableMessageType_m34389850 (NetPeerConfiguration_t136603591 * __this, int32_t ___type0, const MethodInfo* method)
{
{
int32_t L_0 = __this->get_m_disabledTypes_16();
int32_t L_1 = ___type0;
__this->set_m_disabledTypes_16(((int32_t)((int32_t)L_0|(int32_t)L_1)));
return;
}
}
// System.Boolean Lidgren.Network.NetPeerConfiguration::IsMessageTypeEnabled(Lidgren.Network.NetIncomingMessageType)
extern "C" bool NetPeerConfiguration_IsMessageTypeEnabled_m1110774391 (NetPeerConfiguration_t136603591 * __this, int32_t ___type0, const MethodInfo* method)
{
bool V_0 = false;
{
int32_t L_0 = __this->get_m_disabledTypes_16();
int32_t L_1 = ___type0;
int32_t L_2 = ___type0;
V_0 = (bool)((((int32_t)((((int32_t)((int32_t)((int32_t)L_0&(int32_t)L_1))) == ((int32_t)L_2))? 1 : 0)) == ((int32_t)0))? 1 : 0);
goto IL_0012;
}
IL_0012:
{
bool L_3 = V_0;
return L_3;
}
}
// Lidgren.Network.NetUnreliableSizeBehaviour Lidgren.Network.NetPeerConfiguration::get_UnreliableSizeBehaviour()
extern "C" int32_t NetPeerConfiguration_get_UnreliableSizeBehaviour_m2649350738 (NetPeerConfiguration_t136603591 * __this, const MethodInfo* method)
{
int32_t V_0 = 0;
{
int32_t L_0 = __this->get_m_unreliableSizeBehaviour_14();
V_0 = L_0;
goto IL_000a;
}
IL_000a:
{
int32_t L_1 = V_0;
return L_1;
}
}
// System.String Lidgren.Network.NetPeerConfiguration::get_NetworkThreadName()
extern "C" String_t* NetPeerConfiguration_get_NetworkThreadName_m2092581791 (NetPeerConfiguration_t136603591 * __this, const MethodInfo* method)
{
String_t* V_0 = NULL;
{
String_t* L_0 = __this->get_m_networkThreadName_2();
V_0 = L_0;
goto IL_000a;
}
IL_000a:
{
String_t* L_1 = V_0;
return L_1;
}
}
// System.Void Lidgren.Network.NetPeerConfiguration::set_NetworkThreadName(System.String)
extern Il2CppClass* NetException_t2452891498_il2cpp_TypeInfo_var;
extern Il2CppCodeGenString* _stringLiteral970084489;
extern const uint32_t NetPeerConfiguration_set_NetworkThreadName_m1927203884_MetadataUsageId;
extern "C" void NetPeerConfiguration_set_NetworkThreadName_m1927203884 (NetPeerConfiguration_t136603591 * __this, String_t* ___value0, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetPeerConfiguration_set_NetworkThreadName_m1927203884_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
bool V_0 = false;
{
bool L_0 = __this->get_m_isLocked_0();
V_0 = (bool)((((int32_t)L_0) == ((int32_t)0))? 1 : 0);
bool L_1 = V_0;
if (L_1)
{
goto IL_0019;
}
}
{
NetException_t2452891498 * L_2 = (NetException_t2452891498 *)il2cpp_codegen_object_new(NetException_t2452891498_il2cpp_TypeInfo_var);
NetException__ctor_m2724322251(L_2, _stringLiteral970084489, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_2);
}
IL_0019:
{
String_t* L_3 = ___value0;
__this->set_m_networkThreadName_2(L_3);
return;
}
}
// System.Int32 Lidgren.Network.NetPeerConfiguration::get_MaximumTransmissionUnit()
extern "C" int32_t NetPeerConfiguration_get_MaximumTransmissionUnit_m2375210687 (NetPeerConfiguration_t136603591 * __this, const MethodInfo* method)
{
int32_t V_0 = 0;
{
int32_t L_0 = __this->get_m_maximumTransmissionUnit_26();
V_0 = L_0;
goto IL_000a;
}
IL_000a:
{
int32_t L_1 = V_0;
return L_1;
}
}
// System.Boolean Lidgren.Network.NetPeerConfiguration::get_UseMessageRecycling()
extern "C" bool NetPeerConfiguration_get_UseMessageRecycling_m3846967355 (NetPeerConfiguration_t136603591 * __this, const MethodInfo* method)
{
bool V_0 = false;
{
bool L_0 = __this->get_m_useMessageRecycling_9();
V_0 = L_0;
goto IL_000a;
}
IL_000a:
{
bool L_1 = V_0;
return L_1;
}
}
// System.Int32 Lidgren.Network.NetPeerConfiguration::get_RecycledCacheMaxCount()
extern "C" int32_t NetPeerConfiguration_get_RecycledCacheMaxCount_m2721437515 (NetPeerConfiguration_t136603591 * __this, const MethodInfo* method)
{
int32_t V_0 = 0;
{
int32_t L_0 = __this->get_m_recycledCacheMaxCount_10();
V_0 = L_0;
goto IL_000a;
}
IL_000a:
{
int32_t L_1 = V_0;
return L_1;
}
}
// System.Void Lidgren.Network.NetPeerConfiguration::set_AutoFlushSendQueue(System.Boolean)
extern "C" void NetPeerConfiguration_set_AutoFlushSendQueue_m1991348126 (NetPeerConfiguration_t136603591 * __this, bool ___value0, const MethodInfo* method)
{
{
bool L_0 = ___value0;
__this->set_m_autoFlushSendQueue_13(L_0);
return;
}
}
// System.Boolean Lidgren.Network.NetPeerConfiguration::get_SuppressUnreliableUnorderedAcks()
extern "C" bool NetPeerConfiguration_get_SuppressUnreliableUnorderedAcks_m1255305261 (NetPeerConfiguration_t136603591 * __this, const MethodInfo* method)
{
bool V_0 = false;
{
bool L_0 = __this->get_m_suppressUnreliableUnorderedAcks_15();
V_0 = L_0;
goto IL_000a;
}
IL_000a:
{
bool L_1 = V_0;
return L_1;
}
}
// System.Net.IPAddress Lidgren.Network.NetPeerConfiguration::get_LocalAddress()
extern "C" IPAddress_t1399971723 * NetPeerConfiguration_get_LocalAddress_m4101942348 (NetPeerConfiguration_t136603591 * __this, const MethodInfo* method)
{
IPAddress_t1399971723 * V_0 = NULL;
{
IPAddress_t1399971723 * L_0 = __this->get_m_localAddress_3();
V_0 = L_0;
goto IL_000a;
}
IL_000a:
{
IPAddress_t1399971723 * L_1 = V_0;
return L_1;
}
}
// System.Net.IPAddress Lidgren.Network.NetPeerConfiguration::get_BroadcastAddress()
extern "C" IPAddress_t1399971723 * NetPeerConfiguration_get_BroadcastAddress_m3449879104 (NetPeerConfiguration_t136603591 * __this, const MethodInfo* method)
{
IPAddress_t1399971723 * V_0 = NULL;
{
IPAddress_t1399971723 * L_0 = __this->get_m_broadcastAddress_4();
V_0 = L_0;
goto IL_000a;
}
IL_000a:
{
IPAddress_t1399971723 * L_1 = V_0;
return L_1;
}
}
// System.Int32 Lidgren.Network.NetPeerConfiguration::get_Port()
extern "C" int32_t NetPeerConfiguration_get_Port_m3233330308 (NetPeerConfiguration_t136603591 * __this, const MethodInfo* method)
{
int32_t V_0 = 0;
{
int32_t L_0 = __this->get_m_port_17();
V_0 = L_0;
goto IL_000a;
}
IL_000a:
{
int32_t L_1 = V_0;
return L_1;
}
}
// System.Int32 Lidgren.Network.NetPeerConfiguration::get_ReceiveBufferSize()
extern "C" int32_t NetPeerConfiguration_get_ReceiveBufferSize_m3874336565 (NetPeerConfiguration_t136603591 * __this, const MethodInfo* method)
{
int32_t V_0 = 0;
{
int32_t L_0 = __this->get_m_receiveBufferSize_18();
V_0 = L_0;
goto IL_000a;
}
IL_000a:
{
int32_t L_1 = V_0;
return L_1;
}
}
// System.Int32 Lidgren.Network.NetPeerConfiguration::get_SendBufferSize()
extern "C" int32_t NetPeerConfiguration_get_SendBufferSize_m1353049686 (NetPeerConfiguration_t136603591 * __this, const MethodInfo* method)
{
int32_t V_0 = 0;
{
int32_t L_0 = __this->get_m_sendBufferSize_19();
V_0 = L_0;
goto IL_000a;
}
IL_000a:
{
int32_t L_1 = V_0;
return L_1;
}
}
// System.Boolean Lidgren.Network.NetPeerConfiguration::get_AcceptIncomingConnections()
extern "C" bool NetPeerConfiguration_get_AcceptIncomingConnections_m878586354 (NetPeerConfiguration_t136603591 * __this, const MethodInfo* method)
{
bool V_0 = false;
{
bool L_0 = __this->get_m_acceptIncomingConnections_5();
V_0 = L_0;
goto IL_000a;
}
IL_000a:
{
bool L_1 = V_0;
return L_1;
}
}
// System.Void Lidgren.Network.NetPeerConfiguration::set_AcceptIncomingConnections(System.Boolean)
extern "C" void NetPeerConfiguration_set_AcceptIncomingConnections_m1397507705 (NetPeerConfiguration_t136603591 * __this, bool ___value0, const MethodInfo* method)
{
{
bool L_0 = ___value0;
__this->set_m_acceptIncomingConnections_5(L_0);
return;
}
}
// System.Boolean Lidgren.Network.NetPeerConfiguration::get_AutoExpandMTU()
extern "C" bool NetPeerConfiguration_get_AutoExpandMTU_m1376610458 (NetPeerConfiguration_t136603591 * __this, const MethodInfo* method)
{
bool V_0 = false;
{
bool L_0 = __this->get_m_autoExpandMTU_27();
V_0 = L_0;
goto IL_000a;
}
IL_000a:
{
bool L_1 = V_0;
return L_1;
}
}
// System.Single Lidgren.Network.NetPeerConfiguration::get_ExpandMTUFrequency()
extern "C" float NetPeerConfiguration_get_ExpandMTUFrequency_m1301209541 (NetPeerConfiguration_t136603591 * __this, const MethodInfo* method)
{
float V_0 = 0.0f;
{
float L_0 = __this->get_m_expandMTUFrequency_28();
V_0 = L_0;
goto IL_000a;
}
IL_000a:
{
float L_1 = V_0;
return L_1;
}
}
// System.Int32 Lidgren.Network.NetPeerConfiguration::get_ExpandMTUFailAttempts()
extern "C" int32_t NetPeerConfiguration_get_ExpandMTUFailAttempts_m2610030021 (NetPeerConfiguration_t136603591 * __this, const MethodInfo* method)
{
int32_t V_0 = 0;
{
int32_t L_0 = __this->get_m_expandMTUFailAttempts_29();
V_0 = L_0;
goto IL_000a;
}
IL_000a:
{
int32_t L_1 = V_0;
return L_1;
}
}
// System.Void Lidgren.Network.NetPeerStatistics::.ctor(Lidgren.Network.NetPeer)
extern "C" void NetPeerStatistics__ctor_m358809733 (NetPeerStatistics_t101027066 * __this, NetPeer_t1779390221 * ___peer0, const MethodInfo* method)
{
{
Object__ctor_m2551263788(__this, /*hidden argument*/NULL);
NetPeer_t1779390221 * L_0 = ___peer0;
__this->set_m_peer_0(L_0);
NetPeerStatistics_Reset_m36393242(__this, /*hidden argument*/NULL);
return;
}
}
// System.Void Lidgren.Network.NetPeerStatistics::Reset()
extern "C" void NetPeerStatistics_Reset_m36393242 (NetPeerStatistics_t101027066 * __this, const MethodInfo* method)
{
{
__this->set_m_sentPackets_1(0);
__this->set_m_receivedPackets_2(0);
__this->set_m_sentMessages_3(0);
__this->set_m_receivedMessages_4(0);
__this->set_m_receivedFragments_5(0);
__this->set_m_sentBytes_6(0);
__this->set_m_receivedBytes_7(0);
__this->set_m_bytesAllocated_8((((int64_t)((int64_t)0))));
return;
}
}
// System.Void Lidgren.Network.NetPeerStatistics::PacketSent(System.Int32,System.Int32)
extern "C" void NetPeerStatistics_PacketSent_m2099282197 (NetPeerStatistics_t101027066 * __this, int32_t ___numBytes0, int32_t ___numMessages1, const MethodInfo* method)
{
{
int32_t L_0 = __this->get_m_sentPackets_1();
__this->set_m_sentPackets_1(((int32_t)((int32_t)L_0+(int32_t)1)));
int32_t L_1 = __this->get_m_sentBytes_6();
int32_t L_2 = ___numBytes0;
__this->set_m_sentBytes_6(((int32_t)((int32_t)L_1+(int32_t)L_2)));
int32_t L_3 = __this->get_m_sentMessages_3();
int32_t L_4 = ___numMessages1;
__this->set_m_sentMessages_3(((int32_t)((int32_t)L_3+(int32_t)L_4)));
return;
}
}
// System.Void Lidgren.Network.NetPeerStatistics::PacketReceived(System.Int32,System.Int32,System.Int32)
extern "C" void NetPeerStatistics_PacketReceived_m2812231107 (NetPeerStatistics_t101027066 * __this, int32_t ___numBytes0, int32_t ___numMessages1, int32_t ___numFragments2, const MethodInfo* method)
{
{
int32_t L_0 = __this->get_m_receivedPackets_2();
__this->set_m_receivedPackets_2(((int32_t)((int32_t)L_0+(int32_t)1)));
int32_t L_1 = __this->get_m_receivedBytes_7();
int32_t L_2 = ___numBytes0;
__this->set_m_receivedBytes_7(((int32_t)((int32_t)L_1+(int32_t)L_2)));
int32_t L_3 = __this->get_m_receivedMessages_4();
int32_t L_4 = ___numMessages1;
__this->set_m_receivedMessages_4(((int32_t)((int32_t)L_3+(int32_t)L_4)));
int32_t L_5 = __this->get_m_receivedFragments_5();
int32_t L_6 = ___numFragments2;
__this->set_m_receivedFragments_5(((int32_t)((int32_t)L_5+(int32_t)L_6)));
return;
}
}
// System.String Lidgren.Network.NetPeerStatistics::ToString()
extern Il2CppClass* StringBuilder_t1221177846_il2cpp_TypeInfo_var;
extern Il2CppClass* String_t_il2cpp_TypeInfo_var;
extern Il2CppClass* ObjectU5BU5D_t3614634134_il2cpp_TypeInfo_var;
extern Il2CppClass* Int32_t2071877448_il2cpp_TypeInfo_var;
extern Il2CppClass* Int64_t909078037_il2cpp_TypeInfo_var;
extern Il2CppCodeGenString* _stringLiteral2627332153;
extern Il2CppCodeGenString* _stringLiteral3611366396;
extern Il2CppCodeGenString* _stringLiteral3196969700;
extern Il2CppCodeGenString* _stringLiteral3895894051;
extern Il2CppCodeGenString* _stringLiteral2753271771;
extern Il2CppCodeGenString* _stringLiteral1174327339;
extern Il2CppCodeGenString* _stringLiteral688910150;
extern Il2CppCodeGenString* _stringLiteral3517506669;
extern Il2CppCodeGenString* _stringLiteral781345298;
extern Il2CppCodeGenString* _stringLiteral2058082297;
extern Il2CppCodeGenString* _stringLiteral3959465879;
extern Il2CppCodeGenString* _stringLiteral1711054593;
extern Il2CppCodeGenString* _stringLiteral2205145915;
extern const uint32_t NetPeerStatistics_ToString_m3092286938_MetadataUsageId;
extern "C" String_t* NetPeerStatistics_ToString_m3092286938 (NetPeerStatistics_t101027066 * __this, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetPeerStatistics_ToString_m3092286938_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
StringBuilder_t1221177846 * V_0 = NULL;
String_t* V_1 = NULL;
int32_t V_2 = 0;
ObjectU5BU5D_t3614634134* V_3 = NULL;
bool V_4 = false;
{
StringBuilder_t1221177846 * L_0 = (StringBuilder_t1221177846 *)il2cpp_codegen_object_new(StringBuilder_t1221177846_il2cpp_TypeInfo_var);
StringBuilder__ctor_m3946851802(L_0, /*hidden argument*/NULL);
V_0 = L_0;
StringBuilder_t1221177846 * L_1 = V_0;
NetPeer_t1779390221 * L_2 = __this->get_m_peer_0();
NullCheck(L_2);
int32_t L_3 = NetPeer_get_ConnectionsCount_m847920945(L_2, /*hidden argument*/NULL);
V_2 = L_3;
String_t* L_4 = Int32_ToString_m2960866144((&V_2), /*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_5 = String_Concat_m2596409543(NULL /*static, unused*/, L_4, _stringLiteral2627332153, /*hidden argument*/NULL);
NullCheck(L_1);
StringBuilder_AppendLine_m2033101329(L_1, L_5, /*hidden argument*/NULL);
StringBuilder_t1221177846 * L_6 = V_0;
V_3 = ((ObjectU5BU5D_t3614634134*)SZArrayNew(ObjectU5BU5D_t3614634134_il2cpp_TypeInfo_var, (uint32_t)7));
ObjectU5BU5D_t3614634134* L_7 = V_3;
NullCheck(L_7);
IL2CPP_ARRAY_BOUNDS_CHECK(L_7, 0);
ArrayElementTypeCheck (L_7, _stringLiteral3611366396);
(L_7)->SetAt(static_cast<il2cpp_array_size_t>(0), (Il2CppObject *)_stringLiteral3611366396);
ObjectU5BU5D_t3614634134* L_8 = V_3;
int32_t L_9 = __this->get_m_sentBytes_6();
int32_t L_10 = L_9;
Il2CppObject * L_11 = Box(Int32_t2071877448_il2cpp_TypeInfo_var, &L_10);
NullCheck(L_8);
IL2CPP_ARRAY_BOUNDS_CHECK(L_8, 1);
ArrayElementTypeCheck (L_8, L_11);
(L_8)->SetAt(static_cast<il2cpp_array_size_t>(1), (Il2CppObject *)L_11);
ObjectU5BU5D_t3614634134* L_12 = V_3;
NullCheck(L_12);
IL2CPP_ARRAY_BOUNDS_CHECK(L_12, 2);
ArrayElementTypeCheck (L_12, _stringLiteral3196969700);
(L_12)->SetAt(static_cast<il2cpp_array_size_t>(2), (Il2CppObject *)_stringLiteral3196969700);
ObjectU5BU5D_t3614634134* L_13 = V_3;
int32_t L_14 = __this->get_m_sentMessages_3();
int32_t L_15 = L_14;
Il2CppObject * L_16 = Box(Int32_t2071877448_il2cpp_TypeInfo_var, &L_15);
NullCheck(L_13);
IL2CPP_ARRAY_BOUNDS_CHECK(L_13, 3);
ArrayElementTypeCheck (L_13, L_16);
(L_13)->SetAt(static_cast<il2cpp_array_size_t>(3), (Il2CppObject *)L_16);
ObjectU5BU5D_t3614634134* L_17 = V_3;
NullCheck(L_17);
IL2CPP_ARRAY_BOUNDS_CHECK(L_17, 4);
ArrayElementTypeCheck (L_17, _stringLiteral3895894051);
(L_17)->SetAt(static_cast<il2cpp_array_size_t>(4), (Il2CppObject *)_stringLiteral3895894051);
ObjectU5BU5D_t3614634134* L_18 = V_3;
int32_t L_19 = __this->get_m_sentPackets_1();
int32_t L_20 = L_19;
Il2CppObject * L_21 = Box(Int32_t2071877448_il2cpp_TypeInfo_var, &L_20);
NullCheck(L_18);
IL2CPP_ARRAY_BOUNDS_CHECK(L_18, 5);
ArrayElementTypeCheck (L_18, L_21);
(L_18)->SetAt(static_cast<il2cpp_array_size_t>(5), (Il2CppObject *)L_21);
ObjectU5BU5D_t3614634134* L_22 = V_3;
NullCheck(L_22);
IL2CPP_ARRAY_BOUNDS_CHECK(L_22, 6);
ArrayElementTypeCheck (L_22, _stringLiteral2753271771);
(L_22)->SetAt(static_cast<il2cpp_array_size_t>(6), (Il2CppObject *)_stringLiteral2753271771);
ObjectU5BU5D_t3614634134* L_23 = V_3;
String_t* L_24 = String_Concat_m3881798623(NULL /*static, unused*/, L_23, /*hidden argument*/NULL);
NullCheck(L_6);
StringBuilder_AppendLine_m2033101329(L_6, L_24, /*hidden argument*/NULL);
StringBuilder_t1221177846 * L_25 = V_0;
V_3 = ((ObjectU5BU5D_t3614634134*)SZArrayNew(ObjectU5BU5D_t3614634134_il2cpp_TypeInfo_var, (uint32_t)((int32_t)9)));
ObjectU5BU5D_t3614634134* L_26 = V_3;
NullCheck(L_26);
IL2CPP_ARRAY_BOUNDS_CHECK(L_26, 0);
ArrayElementTypeCheck (L_26, _stringLiteral1174327339);
(L_26)->SetAt(static_cast<il2cpp_array_size_t>(0), (Il2CppObject *)_stringLiteral1174327339);
ObjectU5BU5D_t3614634134* L_27 = V_3;
int32_t L_28 = __this->get_m_receivedBytes_7();
int32_t L_29 = L_28;
Il2CppObject * L_30 = Box(Int32_t2071877448_il2cpp_TypeInfo_var, &L_29);
NullCheck(L_27);
IL2CPP_ARRAY_BOUNDS_CHECK(L_27, 1);
ArrayElementTypeCheck (L_27, L_30);
(L_27)->SetAt(static_cast<il2cpp_array_size_t>(1), (Il2CppObject *)L_30);
ObjectU5BU5D_t3614634134* L_31 = V_3;
NullCheck(L_31);
IL2CPP_ARRAY_BOUNDS_CHECK(L_31, 2);
ArrayElementTypeCheck (L_31, _stringLiteral3196969700);
(L_31)->SetAt(static_cast<il2cpp_array_size_t>(2), (Il2CppObject *)_stringLiteral3196969700);
ObjectU5BU5D_t3614634134* L_32 = V_3;
int32_t L_33 = __this->get_m_receivedMessages_4();
int32_t L_34 = L_33;
Il2CppObject * L_35 = Box(Int32_t2071877448_il2cpp_TypeInfo_var, &L_34);
NullCheck(L_32);
IL2CPP_ARRAY_BOUNDS_CHECK(L_32, 3);
ArrayElementTypeCheck (L_32, L_35);
(L_32)->SetAt(static_cast<il2cpp_array_size_t>(3), (Il2CppObject *)L_35);
ObjectU5BU5D_t3614634134* L_36 = V_3;
NullCheck(L_36);
IL2CPP_ARRAY_BOUNDS_CHECK(L_36, 4);
ArrayElementTypeCheck (L_36, _stringLiteral688910150);
(L_36)->SetAt(static_cast<il2cpp_array_size_t>(4), (Il2CppObject *)_stringLiteral688910150);
ObjectU5BU5D_t3614634134* L_37 = V_3;
int32_t L_38 = __this->get_m_receivedFragments_5();
int32_t L_39 = L_38;
Il2CppObject * L_40 = Box(Int32_t2071877448_il2cpp_TypeInfo_var, &L_39);
NullCheck(L_37);
IL2CPP_ARRAY_BOUNDS_CHECK(L_37, 5);
ArrayElementTypeCheck (L_37, L_40);
(L_37)->SetAt(static_cast<il2cpp_array_size_t>(5), (Il2CppObject *)L_40);
ObjectU5BU5D_t3614634134* L_41 = V_3;
NullCheck(L_41);
IL2CPP_ARRAY_BOUNDS_CHECK(L_41, 6);
ArrayElementTypeCheck (L_41, _stringLiteral3517506669);
(L_41)->SetAt(static_cast<il2cpp_array_size_t>(6), (Il2CppObject *)_stringLiteral3517506669);
ObjectU5BU5D_t3614634134* L_42 = V_3;
int32_t L_43 = __this->get_m_receivedPackets_2();
int32_t L_44 = L_43;
Il2CppObject * L_45 = Box(Int32_t2071877448_il2cpp_TypeInfo_var, &L_44);
NullCheck(L_42);
IL2CPP_ARRAY_BOUNDS_CHECK(L_42, 7);
ArrayElementTypeCheck (L_42, L_45);
(L_42)->SetAt(static_cast<il2cpp_array_size_t>(7), (Il2CppObject *)L_45);
ObjectU5BU5D_t3614634134* L_46 = V_3;
NullCheck(L_46);
IL2CPP_ARRAY_BOUNDS_CHECK(L_46, 8);
ArrayElementTypeCheck (L_46, _stringLiteral2753271771);
(L_46)->SetAt(static_cast<il2cpp_array_size_t>(8), (Il2CppObject *)_stringLiteral2753271771);
ObjectU5BU5D_t3614634134* L_47 = V_3;
String_t* L_48 = String_Concat_m3881798623(NULL /*static, unused*/, L_47, /*hidden argument*/NULL);
NullCheck(L_25);
StringBuilder_AppendLine_m2033101329(L_25, L_48, /*hidden argument*/NULL);
StringBuilder_t1221177846 * L_49 = V_0;
int64_t L_50 = __this->get_m_bytesAllocated_8();
int64_t L_51 = L_50;
Il2CppObject * L_52 = Box(Int64_t909078037_il2cpp_TypeInfo_var, &L_51);
String_t* L_53 = String_Concat_m2000667605(NULL /*static, unused*/, _stringLiteral781345298, L_52, _stringLiteral2058082297, /*hidden argument*/NULL);
NullCheck(L_49);
StringBuilder_AppendLine_m2033101329(L_49, L_53, /*hidden argument*/NULL);
NetPeer_t1779390221 * L_54 = __this->get_m_peer_0();
NullCheck(L_54);
List_1_t2766455145 * L_55 = L_54->get_m_storagePool_31();
V_4 = (bool)((((Il2CppObject*)(List_1_t2766455145 *)L_55) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0);
bool L_56 = V_4;
if (L_56)
{
goto IL_0185;
}
}
{
StringBuilder_t1221177846 * L_57 = V_0;
V_3 = ((ObjectU5BU5D_t3614634134*)SZArrayNew(ObjectU5BU5D_t3614634134_il2cpp_TypeInfo_var, (uint32_t)5));
ObjectU5BU5D_t3614634134* L_58 = V_3;
NullCheck(L_58);
IL2CPP_ARRAY_BOUNDS_CHECK(L_58, 0);
ArrayElementTypeCheck (L_58, _stringLiteral3959465879);
(L_58)->SetAt(static_cast<il2cpp_array_size_t>(0), (Il2CppObject *)_stringLiteral3959465879);
ObjectU5BU5D_t3614634134* L_59 = V_3;
NetPeer_t1779390221 * L_60 = __this->get_m_peer_0();
NullCheck(L_60);
int32_t L_61 = L_60->get_m_storagePoolBytes_34();
int32_t L_62 = L_61;
Il2CppObject * L_63 = Box(Int32_t2071877448_il2cpp_TypeInfo_var, &L_62);
NullCheck(L_59);
IL2CPP_ARRAY_BOUNDS_CHECK(L_59, 1);
ArrayElementTypeCheck (L_59, L_63);
(L_59)->SetAt(static_cast<il2cpp_array_size_t>(1), (Il2CppObject *)L_63);
ObjectU5BU5D_t3614634134* L_64 = V_3;
NullCheck(L_64);
IL2CPP_ARRAY_BOUNDS_CHECK(L_64, 2);
ArrayElementTypeCheck (L_64, _stringLiteral1711054593);
(L_64)->SetAt(static_cast<il2cpp_array_size_t>(2), (Il2CppObject *)_stringLiteral1711054593);
ObjectU5BU5D_t3614634134* L_65 = V_3;
NetPeer_t1779390221 * L_66 = __this->get_m_peer_0();
NullCheck(L_66);
int32_t L_67 = L_66->get_m_storageSlotsUsedCount_35();
int32_t L_68 = L_67;
Il2CppObject * L_69 = Box(Int32_t2071877448_il2cpp_TypeInfo_var, &L_68);
NullCheck(L_65);
IL2CPP_ARRAY_BOUNDS_CHECK(L_65, 3);
ArrayElementTypeCheck (L_65, L_69);
(L_65)->SetAt(static_cast<il2cpp_array_size_t>(3), (Il2CppObject *)L_69);
ObjectU5BU5D_t3614634134* L_70 = V_3;
NullCheck(L_70);
IL2CPP_ARRAY_BOUNDS_CHECK(L_70, 4);
ArrayElementTypeCheck (L_70, _stringLiteral2205145915);
(L_70)->SetAt(static_cast<il2cpp_array_size_t>(4), (Il2CppObject *)_stringLiteral2205145915);
ObjectU5BU5D_t3614634134* L_71 = V_3;
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_72 = String_Concat_m3881798623(NULL /*static, unused*/, L_71, /*hidden argument*/NULL);
NullCheck(L_57);
StringBuilder_AppendLine_m2033101329(L_57, L_72, /*hidden argument*/NULL);
}
IL_0185:
{
StringBuilder_t1221177846 * L_73 = V_0;
NullCheck(L_73);
String_t* L_74 = VirtFuncInvoker0< String_t* >::Invoke(3 /* System.String System.Object::ToString() */, L_73);
V_1 = L_74;
goto IL_018e;
}
IL_018e:
{
String_t* L_75 = V_1;
return L_75;
}
}
// System.Void Lidgren.Network.NetRandom::.ctor()
extern Il2CppClass* NetRandomSeed_t726093591_il2cpp_TypeInfo_var;
extern const uint32_t NetRandom__ctor_m1930519285_MetadataUsageId;
extern "C" void NetRandom__ctor_m1930519285 (NetRandom_t509742058 * __this, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetRandom__ctor_m1930519285_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
{
Random__ctor_m1561335652(__this, /*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(NetRandomSeed_t726093591_il2cpp_TypeInfo_var);
uint32_t L_0 = NetRandomSeed_GetUInt32_m4251441882(NULL /*static, unused*/, /*hidden argument*/NULL);
VirtActionInvoker1< uint32_t >::Invoke(9 /* System.Void Lidgren.Network.NetRandom::Initialize(System.UInt32) */, __this, L_0);
return;
}
}
// System.Void Lidgren.Network.NetRandom::Initialize(System.UInt32)
extern Il2CppClass* NotImplementedException_t2785117854_il2cpp_TypeInfo_var;
extern Il2CppCodeGenString* _stringLiteral3941954466;
extern const uint32_t NetRandom_Initialize_m3538796821_MetadataUsageId;
extern "C" void NetRandom_Initialize_m3538796821 (NetRandom_t509742058 * __this, uint32_t ___seed0, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetRandom_Initialize_m3538796821_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
{
NotImplementedException_t2785117854 * L_0 = (NotImplementedException_t2785117854 *)il2cpp_codegen_object_new(NotImplementedException_t2785117854_il2cpp_TypeInfo_var);
NotImplementedException__ctor_m1795163961(L_0, _stringLiteral3941954466, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_0);
}
}
// System.UInt32 Lidgren.Network.NetRandom::NextUInt32()
extern Il2CppClass* NotImplementedException_t2785117854_il2cpp_TypeInfo_var;
extern Il2CppCodeGenString* _stringLiteral3941954466;
extern const uint32_t NetRandom_NextUInt32_m1563057962_MetadataUsageId;
extern "C" uint32_t NetRandom_NextUInt32_m1563057962 (NetRandom_t509742058 * __this, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetRandom_NextUInt32_m1563057962_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
{
NotImplementedException_t2785117854 * L_0 = (NotImplementedException_t2785117854 *)il2cpp_codegen_object_new(NotImplementedException_t2785117854_il2cpp_TypeInfo_var);
NotImplementedException__ctor_m1795163961(L_0, _stringLiteral3941954466, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_0);
}
}
// System.Int32 Lidgren.Network.NetRandom::Next()
extern "C" int32_t NetRandom_Next_m3515987696 (NetRandom_t509742058 * __this, const MethodInfo* method)
{
int32_t V_0 = 0;
int32_t V_1 = 0;
bool V_2 = false;
{
uint32_t L_0 = VirtFuncInvoker0< uint32_t >::Invoke(10 /* System.UInt32 Lidgren.Network.NetRandom::NextUInt32() */, __this);
V_0 = ((int32_t)((int32_t)((int32_t)2147483647LL)&(int32_t)L_0));
int32_t L_1 = V_0;
V_2 = (bool)((((int32_t)((((int32_t)L_1) == ((int32_t)((int32_t)2147483647LL)))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_2 = V_2;
if (L_2)
{
goto IL_0026;
}
}
{
int32_t L_3 = NetRandom_NextInt32_m3600204010(__this, /*hidden argument*/NULL);
V_1 = L_3;
goto IL_002a;
}
IL_0026:
{
int32_t L_4 = V_0;
V_1 = L_4;
goto IL_002a;
}
IL_002a:
{
int32_t L_5 = V_1;
return L_5;
}
}
// System.Int32 Lidgren.Network.NetRandom::NextInt32()
extern "C" int32_t NetRandom_NextInt32_m3600204010 (NetRandom_t509742058 * __this, const MethodInfo* method)
{
int32_t V_0 = 0;
{
uint32_t L_0 = VirtFuncInvoker0< uint32_t >::Invoke(10 /* System.UInt32 Lidgren.Network.NetRandom::NextUInt32() */, __this);
V_0 = ((int32_t)((int32_t)((int32_t)2147483647LL)&(int32_t)L_0));
goto IL_0010;
}
IL_0010:
{
int32_t L_1 = V_0;
return L_1;
}
}
// System.Double Lidgren.Network.NetRandom::NextDouble()
extern "C" double NetRandom_NextDouble_m193002282 (NetRandom_t509742058 * __this, const MethodInfo* method)
{
double V_0 = 0.0;
{
int32_t L_0 = NetRandom_NextInt32_m3600204010(__this, /*hidden argument*/NULL);
V_0 = ((double)((double)(4.6566128730773926E-10)*(double)(((double)((double)L_0)))));
goto IL_0015;
}
IL_0015:
{
double L_1 = V_0;
return L_1;
}
}
// System.Double Lidgren.Network.NetRandom::Sample()
extern "C" double NetRandom_Sample_m1013401964 (NetRandom_t509742058 * __this, const MethodInfo* method)
{
double V_0 = 0.0;
{
int32_t L_0 = NetRandom_NextInt32_m3600204010(__this, /*hidden argument*/NULL);
V_0 = ((double)((double)(4.6566128730773926E-10)*(double)(((double)((double)L_0)))));
goto IL_0015;
}
IL_0015:
{
double L_1 = V_0;
return L_1;
}
}
// System.Single Lidgren.Network.NetRandom::NextSingle()
extern "C" float NetRandom_NextSingle_m2975933834 (NetRandom_t509742058 * __this, const MethodInfo* method)
{
float V_0 = 0.0f;
float V_1 = 0.0f;
bool V_2 = false;
{
int32_t L_0 = NetRandom_NextInt32_m3600204010(__this, /*hidden argument*/NULL);
V_0 = (((float)((float)((double)((double)(4.6566128730773926E-10)*(double)(((double)((double)L_0))))))));
float L_1 = V_0;
V_2 = (bool)((((int32_t)((((float)L_1) == ((float)(1.0f)))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_2 = V_2;
if (L_2)
{
goto IL_002c;
}
}
{
float L_3 = NetRandom_NextSingle_m2975933834(__this, /*hidden argument*/NULL);
V_1 = L_3;
goto IL_0030;
}
IL_002c:
{
float L_4 = V_0;
V_1 = L_4;
goto IL_0030;
}
IL_0030:
{
float L_5 = V_1;
return L_5;
}
}
// System.Int32 Lidgren.Network.NetRandom::Next(System.Int32)
extern "C" int32_t NetRandom_Next_m2445239325 (NetRandom_t509742058 * __this, int32_t ___maxValue0, const MethodInfo* method)
{
int32_t V_0 = 0;
{
double L_0 = VirtFuncInvoker0< double >::Invoke(8 /* System.Double System.Random::NextDouble() */, __this);
int32_t L_1 = ___maxValue0;
V_0 = (((int32_t)((int32_t)((double)((double)L_0*(double)(((double)((double)L_1))))))));
goto IL_000e;
}
IL_000e:
{
int32_t L_2 = V_0;
return L_2;
}
}
// System.Int32 Lidgren.Network.NetRandom::Next(System.Int32,System.Int32)
extern "C" int32_t NetRandom_Next_m2869914940 (NetRandom_t509742058 * __this, int32_t ___minValue0, int32_t ___maxValue1, const MethodInfo* method)
{
int32_t V_0 = 0;
{
int32_t L_0 = ___minValue0;
double L_1 = VirtFuncInvoker0< double >::Invoke(8 /* System.Double System.Random::NextDouble() */, __this);
int32_t L_2 = ___maxValue1;
int32_t L_3 = ___minValue0;
V_0 = ((int32_t)((int32_t)L_0+(int32_t)(((int32_t)((int32_t)((double)((double)L_1*(double)(((double)((double)((int32_t)((int32_t)L_2-(int32_t)L_3))))))))))));
goto IL_0012;
}
IL_0012:
{
int32_t L_4 = V_0;
return L_4;
}
}
// System.Void Lidgren.Network.NetRandom::.cctor()
extern Il2CppClass* MWCRandom_t315011312_il2cpp_TypeInfo_var;
extern Il2CppClass* NetRandom_t509742058_il2cpp_TypeInfo_var;
extern const uint32_t NetRandom__cctor_m2811150516_MetadataUsageId;
extern "C" void NetRandom__cctor_m2811150516 (Il2CppObject * __this /* static, unused */, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetRandom__cctor_m2811150516_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
{
MWCRandom_t315011312 * L_0 = (MWCRandom_t315011312 *)il2cpp_codegen_object_new(MWCRandom_t315011312_il2cpp_TypeInfo_var);
MWCRandom__ctor_m14555459(L_0, /*hidden argument*/NULL);
((NetRandom_t509742058_StaticFields*)NetRandom_t509742058_il2cpp_TypeInfo_var->static_fields)->set_Instance_3(L_0);
return;
}
}
// System.UInt32 Lidgren.Network.NetRandomSeed::GetUInt32()
extern Il2CppClass* NetRandomSeed_t726093591_il2cpp_TypeInfo_var;
extern const uint32_t NetRandomSeed_GetUInt32_m4251441882_MetadataUsageId;
extern "C" uint32_t NetRandomSeed_GetUInt32_m4251441882 (Il2CppObject * __this /* static, unused */, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetRandomSeed_GetUInt32_m4251441882_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
uint64_t V_0 = 0;
uint32_t V_1 = 0;
uint32_t V_2 = 0;
uint32_t V_3 = 0;
{
IL2CPP_RUNTIME_CLASS_INIT(NetRandomSeed_t726093591_il2cpp_TypeInfo_var);
uint64_t L_0 = NetRandomSeed_GetUInt64_m1791162272(NULL /*static, unused*/, /*hidden argument*/NULL);
V_0 = L_0;
uint64_t L_1 = V_0;
V_1 = (((int32_t)((uint32_t)L_1)));
uint64_t L_2 = V_0;
V_2 = (((int32_t)((uint32_t)((int64_t)((uint64_t)L_2>>((int32_t)32))))));
uint32_t L_3 = V_1;
uint32_t L_4 = V_2;
V_3 = ((int32_t)((int32_t)L_3^(int32_t)L_4));
goto IL_0016;
}
IL_0016:
{
uint32_t L_5 = V_3;
return L_5;
}
}
// System.UInt64 Lidgren.Network.NetRandomSeed::GetUInt64()
extern Il2CppClass* Guid_t2533601593_il2cpp_TypeInfo_var;
extern Il2CppClass* NetRandomSeed_t726093591_il2cpp_TypeInfo_var;
extern Il2CppClass* NetUtility_t3562260209_il2cpp_TypeInfo_var;
extern const uint32_t NetRandomSeed_GetUInt64_m1791162272_MetadataUsageId;
extern "C" uint64_t NetRandomSeed_GetUInt64_m1791162272 (Il2CppObject * __this /* static, unused */, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetRandomSeed_GetUInt64_m1791162272_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
ByteU5BU5D_t3397334013* V_0 = NULL;
uint64_t V_1 = 0;
uint64_t V_2 = 0;
Guid_t2533601593 V_3;
memset(&V_3, 0, sizeof(V_3));
{
IL2CPP_RUNTIME_CLASS_INIT(Guid_t2533601593_il2cpp_TypeInfo_var);
Guid_t2533601593 L_0 = Guid_NewGuid_m3493657620(NULL /*static, unused*/, /*hidden argument*/NULL);
V_3 = L_0;
ByteU5BU5D_t3397334013* L_1 = Guid_ToByteArray_m1495052102((&V_3), /*hidden argument*/NULL);
V_0 = L_1;
ByteU5BU5D_t3397334013* L_2 = V_0;
NullCheck(L_2);
IL2CPP_ARRAY_BOUNDS_CHECK(L_2, 0);
int32_t L_3 = 0;
uint8_t L_4 = (L_2)->GetAt(static_cast<il2cpp_array_size_t>(L_3));
ByteU5BU5D_t3397334013* L_5 = V_0;
NullCheck(L_5);
IL2CPP_ARRAY_BOUNDS_CHECK(L_5, 1);
int32_t L_6 = 1;
uint8_t L_7 = (L_5)->GetAt(static_cast<il2cpp_array_size_t>(L_6));
ByteU5BU5D_t3397334013* L_8 = V_0;
NullCheck(L_8);
IL2CPP_ARRAY_BOUNDS_CHECK(L_8, 2);
int32_t L_9 = 2;
uint8_t L_10 = (L_8)->GetAt(static_cast<il2cpp_array_size_t>(L_9));
ByteU5BU5D_t3397334013* L_11 = V_0;
NullCheck(L_11);
IL2CPP_ARRAY_BOUNDS_CHECK(L_11, 3);
int32_t L_12 = 3;
uint8_t L_13 = (L_11)->GetAt(static_cast<il2cpp_array_size_t>(L_12));
ByteU5BU5D_t3397334013* L_14 = V_0;
NullCheck(L_14);
IL2CPP_ARRAY_BOUNDS_CHECK(L_14, 4);
int32_t L_15 = 4;
uint8_t L_16 = (L_14)->GetAt(static_cast<il2cpp_array_size_t>(L_15));
ByteU5BU5D_t3397334013* L_17 = V_0;
NullCheck(L_17);
IL2CPP_ARRAY_BOUNDS_CHECK(L_17, 5);
int32_t L_18 = 5;
uint8_t L_19 = (L_17)->GetAt(static_cast<il2cpp_array_size_t>(L_18));
ByteU5BU5D_t3397334013* L_20 = V_0;
NullCheck(L_20);
IL2CPP_ARRAY_BOUNDS_CHECK(L_20, 6);
int32_t L_21 = 6;
uint8_t L_22 = (L_20)->GetAt(static_cast<il2cpp_array_size_t>(L_21));
ByteU5BU5D_t3397334013* L_23 = V_0;
NullCheck(L_23);
IL2CPP_ARRAY_BOUNDS_CHECK(L_23, 7);
int32_t L_24 = 7;
uint8_t L_25 = (L_23)->GetAt(static_cast<il2cpp_array_size_t>(L_24));
V_1 = ((int64_t)((int64_t)((int64_t)((int64_t)((int64_t)((int64_t)((int64_t)((int64_t)((int64_t)((int64_t)((int64_t)((int64_t)((int64_t)((int64_t)(((int64_t)((uint64_t)L_4)))|(int64_t)((int64_t)((int64_t)(((int64_t)((uint64_t)L_7)))<<(int32_t)8))))|(int64_t)((int64_t)((int64_t)(((int64_t)((uint64_t)L_10)))<<(int32_t)((int32_t)16)))))|(int64_t)((int64_t)((int64_t)(((int64_t)((uint64_t)L_13)))<<(int32_t)((int32_t)24)))))|(int64_t)((int64_t)((int64_t)(((int64_t)((uint64_t)L_16)))<<(int32_t)((int32_t)32)))))|(int64_t)((int64_t)((int64_t)(((int64_t)((uint64_t)L_19)))<<(int32_t)((int32_t)40)))))|(int64_t)((int64_t)((int64_t)(((int64_t)((uint64_t)L_22)))<<(int32_t)((int32_t)48)))))|(int64_t)((int64_t)((int64_t)(((int64_t)((uint64_t)L_25)))<<(int32_t)((int32_t)56)))));
uint64_t L_26 = V_1;
IL2CPP_RUNTIME_CLASS_INIT(NetRandomSeed_t726093591_il2cpp_TypeInfo_var);
int32_t L_27 = ((NetRandomSeed_t726093591_StaticFields*)NetRandomSeed_t726093591_il2cpp_TypeInfo_var->static_fields)->get_m_seedIncrement_0();
IL2CPP_RUNTIME_CLASS_INIT(NetUtility_t3562260209_il2cpp_TypeInfo_var);
uint64_t L_28 = NetUtility_GetPlatformSeed_m3510865201(NULL /*static, unused*/, L_27, /*hidden argument*/NULL);
V_2 = ((int64_t)((int64_t)L_26^(int64_t)L_28));
goto IL_005a;
}
IL_005a:
{
uint64_t L_29 = V_2;
return L_29;
}
}
// System.Void Lidgren.Network.NetRandomSeed::.cctor()
extern Il2CppClass* NetRandomSeed_t726093591_il2cpp_TypeInfo_var;
extern const uint32_t NetRandomSeed__cctor_m2240423589_MetadataUsageId;
extern "C" void NetRandomSeed__cctor_m2240423589 (Il2CppObject * __this /* static, unused */, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetRandomSeed__cctor_m2240423589_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
{
((NetRandomSeed_t726093591_StaticFields*)NetRandomSeed_t726093591_il2cpp_TypeInfo_var->static_fields)->set_m_seedIncrement_0(((int32_t)-1640531527));
return;
}
}
// System.Void Lidgren.Network.NetReceiverChannelBase::.ctor(Lidgren.Network.NetConnection)
extern "C" void NetReceiverChannelBase__ctor_m892231457 (NetReceiverChannelBase_t908288882 * __this, NetConnection_t3331492029 * ___connection0, const MethodInfo* method)
{
{
Object__ctor_m2551263788(__this, /*hidden argument*/NULL);
NetConnection_t3331492029 * L_0 = ___connection0;
__this->set_m_connection_1(L_0);
NetConnection_t3331492029 * L_1 = ___connection0;
NullCheck(L_1);
NetPeer_t1779390221 * L_2 = L_1->get_m_peer_0();
__this->set_m_peer_0(L_2);
return;
}
}
// System.Void Lidgren.Network.NetReliableOrderedReceiver::.ctor(Lidgren.Network.NetConnection,System.Int32)
extern Il2CppClass* NetIncomingMessageU5BU5D_t827121993_il2cpp_TypeInfo_var;
extern Il2CppClass* NetBitVector_t1774780753_il2cpp_TypeInfo_var;
extern const uint32_t NetReliableOrderedReceiver__ctor_m3553848617_MetadataUsageId;
extern "C" void NetReliableOrderedReceiver__ctor_m3553848617 (NetReliableOrderedReceiver_t2554037675 * __this, NetConnection_t3331492029 * ___connection0, int32_t ___windowSize1, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetReliableOrderedReceiver__ctor_m3553848617_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
{
NetConnection_t3331492029 * L_0 = ___connection0;
NetReceiverChannelBase__ctor_m892231457(__this, L_0, /*hidden argument*/NULL);
int32_t L_1 = ___windowSize1;
__this->set_m_windowSize_3(L_1);
int32_t L_2 = ___windowSize1;
__this->set_m_withheldMessages_5(((NetIncomingMessageU5BU5D_t827121993*)SZArrayNew(NetIncomingMessageU5BU5D_t827121993_il2cpp_TypeInfo_var, (uint32_t)L_2)));
int32_t L_3 = ___windowSize1;
NetBitVector_t1774780753 * L_4 = (NetBitVector_t1774780753 *)il2cpp_codegen_object_new(NetBitVector_t1774780753_il2cpp_TypeInfo_var);
NetBitVector__ctor_m1517128273(L_4, L_3, /*hidden argument*/NULL);
__this->set_m_earlyReceived_4(L_4);
return;
}
}
// System.Void Lidgren.Network.NetReliableOrderedReceiver::AdvanceWindow()
extern "C" void NetReliableOrderedReceiver_AdvanceWindow_m2797762522 (NetReliableOrderedReceiver_t2554037675 * __this, const MethodInfo* method)
{
{
NetBitVector_t1774780753 * L_0 = __this->get_m_earlyReceived_4();
int32_t L_1 = __this->get_m_windowStart_2();
int32_t L_2 = __this->get_m_windowSize_3();
NullCheck(L_0);
NetBitVector_Set_m2669921130(L_0, ((int32_t)((int32_t)L_1%(int32_t)L_2)), (bool)0, /*hidden argument*/NULL);
int32_t L_3 = __this->get_m_windowStart_2();
__this->set_m_windowStart_2(((int32_t)((int32_t)((int32_t)((int32_t)L_3+(int32_t)1))%(int32_t)((int32_t)1024))));
return;
}
}
// System.Void Lidgren.Network.NetReliableOrderedReceiver::ReceiveMessage(Lidgren.Network.NetIncomingMessage)
extern Il2CppClass* NetUtility_t3562260209_il2cpp_TypeInfo_var;
extern Il2CppClass* String_t_il2cpp_TypeInfo_var;
extern Il2CppClass* Int32_t2071877448_il2cpp_TypeInfo_var;
extern Il2CppClass* ObjectU5BU5D_t3614634134_il2cpp_TypeInfo_var;
extern Il2CppCodeGenString* _stringLiteral3536583815;
extern Il2CppCodeGenString* _stringLiteral2279591503;
extern Il2CppCodeGenString* _stringLiteral2486397350;
extern Il2CppCodeGenString* _stringLiteral1174327339;
extern Il2CppCodeGenString* _stringLiteral1925410982;
extern Il2CppCodeGenString* _stringLiteral2282954049;
extern const uint32_t NetReliableOrderedReceiver_ReceiveMessage_m3222467075_MetadataUsageId;
extern "C" void NetReliableOrderedReceiver_ReceiveMessage_m3222467075 (NetReliableOrderedReceiver_t2554037675 * __this, NetIncomingMessage_t2014089816 * ___message0, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetReliableOrderedReceiver_ReceiveMessage_m3222467075_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
int32_t V_0 = 0;
int32_t V_1 = 0;
bool V_2 = false;
ObjectU5BU5D_t3614634134* V_3 = NULL;
{
NetIncomingMessage_t2014089816 * L_0 = ___message0;
NullCheck(L_0);
int32_t L_1 = L_0->get_m_sequenceNumber_8();
int32_t L_2 = __this->get_m_windowStart_2();
IL2CPP_RUNTIME_CLASS_INIT(NetUtility_t3562260209_il2cpp_TypeInfo_var);
int32_t L_3 = NetUtility_RelativeSequenceNumber_m1713083748(NULL /*static, unused*/, L_1, L_2, /*hidden argument*/NULL);
V_0 = L_3;
NetConnection_t3331492029 * L_4 = ((NetReceiverChannelBase_t908288882 *)__this)->get_m_connection_1();
NetIncomingMessage_t2014089816 * L_5 = ___message0;
NullCheck(L_5);
uint8_t L_6 = L_5->get_m_receivedMessageType_9();
NetIncomingMessage_t2014089816 * L_7 = ___message0;
NullCheck(L_7);
int32_t L_8 = L_7->get_m_sequenceNumber_8();
NullCheck(L_4);
NetConnection_QueueAck_m3101883724(L_4, L_6, L_8, /*hidden argument*/NULL);
int32_t L_9 = V_0;
V_2 = (bool)((((int32_t)((((int32_t)L_9) == ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_10 = V_2;
if (L_10)
{
goto IL_00da;
}
}
{
NetReliableOrderedReceiver_AdvanceWindow_m2797762522(__this, /*hidden argument*/NULL);
NetPeer_t1779390221 * L_11 = ((NetReceiverChannelBase_t908288882 *)__this)->get_m_peer_0();
NetIncomingMessage_t2014089816 * L_12 = ___message0;
NullCheck(L_11);
NetPeer_ReleaseMessage_m3520648965(L_11, L_12, /*hidden argument*/NULL);
NetIncomingMessage_t2014089816 * L_13 = ___message0;
NullCheck(L_13);
int32_t L_14 = L_13->get_m_sequenceNumber_8();
V_1 = ((int32_t)((int32_t)((int32_t)((int32_t)L_14+(int32_t)1))%(int32_t)((int32_t)1024)));
goto IL_00be;
}
IL_005f:
{
NetIncomingMessageU5BU5D_t827121993* L_15 = __this->get_m_withheldMessages_5();
int32_t L_16 = V_1;
int32_t L_17 = __this->get_m_windowSize_3();
NullCheck(L_15);
IL2CPP_ARRAY_BOUNDS_CHECK(L_15, ((int32_t)((int32_t)L_16%(int32_t)L_17)));
int32_t L_18 = ((int32_t)((int32_t)L_16%(int32_t)L_17));
NetIncomingMessage_t2014089816 * L_19 = (L_15)->GetAt(static_cast<il2cpp_array_size_t>(L_18));
___message0 = L_19;
NetIncomingMessage_t2014089816 * L_20 = ___message0;
NetException_Assert_m1426298558(NULL /*static, unused*/, (bool)((((int32_t)((((Il2CppObject*)(NetIncomingMessage_t2014089816 *)L_20) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0)) == ((int32_t)0))? 1 : 0), /*hidden argument*/NULL);
NetIncomingMessageU5BU5D_t827121993* L_21 = __this->get_m_withheldMessages_5();
int32_t L_22 = V_1;
int32_t L_23 = __this->get_m_windowSize_3();
NullCheck(L_21);
IL2CPP_ARRAY_BOUNDS_CHECK(L_21, ((int32_t)((int32_t)L_22%(int32_t)L_23)));
ArrayElementTypeCheck (L_21, NULL);
(L_21)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)((int32_t)L_22%(int32_t)L_23))), (NetIncomingMessage_t2014089816 *)NULL);
NetPeer_t1779390221 * L_24 = ((NetReceiverChannelBase_t908288882 *)__this)->get_m_peer_0();
NetIncomingMessage_t2014089816 * L_25 = ___message0;
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_26 = String_Concat_m56707527(NULL /*static, unused*/, _stringLiteral3536583815, L_25, /*hidden argument*/NULL);
NullCheck(L_24);
NetPeer_LogVerbose_m3434660420(L_24, L_26, /*hidden argument*/NULL);
NetPeer_t1779390221 * L_27 = ((NetReceiverChannelBase_t908288882 *)__this)->get_m_peer_0();
NetIncomingMessage_t2014089816 * L_28 = ___message0;
NullCheck(L_27);
NetPeer_ReleaseMessage_m3520648965(L_27, L_28, /*hidden argument*/NULL);
NetReliableOrderedReceiver_AdvanceWindow_m2797762522(__this, /*hidden argument*/NULL);
int32_t L_29 = V_1;
V_1 = ((int32_t)((int32_t)L_29+(int32_t)1));
}
IL_00be:
{
NetBitVector_t1774780753 * L_30 = __this->get_m_earlyReceived_4();
int32_t L_31 = V_1;
int32_t L_32 = __this->get_m_windowSize_3();
NullCheck(L_30);
bool L_33 = NetBitVector_get_Bit_m3575907859(L_30, ((int32_t)((int32_t)L_31%(int32_t)L_32)), /*hidden argument*/NULL);
V_2 = L_33;
bool L_34 = V_2;
if (L_34)
{
goto IL_005f;
}
}
{
goto IL_01eb;
}
IL_00da:
{
int32_t L_35 = V_0;
V_2 = (bool)((((int32_t)((((int32_t)L_35) < ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_36 = V_2;
if (L_36)
{
goto IL_0122;
}
}
{
NetConnection_t3331492029 * L_37 = ((NetReceiverChannelBase_t908288882 *)__this)->get_m_connection_1();
NullCheck(L_37);
NetConnectionStatistics_t1235765202 * L_38 = L_37->get_m_statistics_14();
NullCheck(L_38);
NetConnectionStatistics_MessageDropped_m4117327218(L_38, /*hidden argument*/NULL);
NetPeer_t1779390221 * L_39 = ((NetReceiverChannelBase_t908288882 *)__this)->get_m_peer_0();
NetIncomingMessage_t2014089816 * L_40 = ___message0;
NullCheck(L_40);
int32_t L_41 = L_40->get_m_sequenceNumber_8();
int32_t L_42 = L_41;
Il2CppObject * L_43 = Box(Int32_t2071877448_il2cpp_TypeInfo_var, &L_42);
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_44 = String_Concat_m2000667605(NULL /*static, unused*/, _stringLiteral2279591503, L_43, _stringLiteral2486397350, /*hidden argument*/NULL);
NullCheck(L_39);
NetPeer_LogVerbose_m3434660420(L_39, L_44, /*hidden argument*/NULL);
goto IL_01eb;
}
IL_0122:
{
int32_t L_45 = V_0;
int32_t L_46 = __this->get_m_windowSize_3();
V_2 = (bool)((((int32_t)((((int32_t)L_45) > ((int32_t)L_46))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_47 = V_2;
if (L_47)
{
goto IL_0181;
}
}
{
NetConnection_t3331492029 * L_48 = ((NetReceiverChannelBase_t908288882 *)__this)->get_m_connection_1();
NullCheck(L_48);
NetConnectionStatistics_t1235765202 * L_49 = L_48->get_m_statistics_14();
NullCheck(L_49);
NetConnectionStatistics_MessageDropped_m4117327218(L_49, /*hidden argument*/NULL);
NetPeer_t1779390221 * L_50 = ((NetReceiverChannelBase_t908288882 *)__this)->get_m_peer_0();
V_3 = ((ObjectU5BU5D_t3614634134*)SZArrayNew(ObjectU5BU5D_t3614634134_il2cpp_TypeInfo_var, (uint32_t)4));
ObjectU5BU5D_t3614634134* L_51 = V_3;
NullCheck(L_51);
IL2CPP_ARRAY_BOUNDS_CHECK(L_51, 0);
ArrayElementTypeCheck (L_51, _stringLiteral1174327339);
(L_51)->SetAt(static_cast<il2cpp_array_size_t>(0), (Il2CppObject *)_stringLiteral1174327339);
ObjectU5BU5D_t3614634134* L_52 = V_3;
NetIncomingMessage_t2014089816 * L_53 = ___message0;
NullCheck(L_52);
IL2CPP_ARRAY_BOUNDS_CHECK(L_52, 1);
ArrayElementTypeCheck (L_52, L_53);
(L_52)->SetAt(static_cast<il2cpp_array_size_t>(1), (Il2CppObject *)L_53);
ObjectU5BU5D_t3614634134* L_54 = V_3;
NullCheck(L_54);
IL2CPP_ARRAY_BOUNDS_CHECK(L_54, 2);
ArrayElementTypeCheck (L_54, _stringLiteral1925410982);
(L_54)->SetAt(static_cast<il2cpp_array_size_t>(2), (Il2CppObject *)_stringLiteral1925410982);
ObjectU5BU5D_t3614634134* L_55 = V_3;
int32_t L_56 = __this->get_m_windowStart_2();
int32_t L_57 = L_56;
Il2CppObject * L_58 = Box(Int32_t2071877448_il2cpp_TypeInfo_var, &L_57);
NullCheck(L_55);
IL2CPP_ARRAY_BOUNDS_CHECK(L_55, 3);
ArrayElementTypeCheck (L_55, L_58);
(L_55)->SetAt(static_cast<il2cpp_array_size_t>(3), (Il2CppObject *)L_58);
ObjectU5BU5D_t3614634134* L_59 = V_3;
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_60 = String_Concat_m3881798623(NULL /*static, unused*/, L_59, /*hidden argument*/NULL);
NullCheck(L_50);
NetPeer_LogDebug_m2983960595(L_50, L_60, /*hidden argument*/NULL);
goto IL_01eb;
}
IL_0181:
{
NetBitVector_t1774780753 * L_61 = __this->get_m_earlyReceived_4();
NetIncomingMessage_t2014089816 * L_62 = ___message0;
NullCheck(L_62);
int32_t L_63 = L_62->get_m_sequenceNumber_8();
int32_t L_64 = __this->get_m_windowSize_3();
NullCheck(L_61);
NetBitVector_Set_m2669921130(L_61, ((int32_t)((int32_t)L_63%(int32_t)L_64)), (bool)1, /*hidden argument*/NULL);
NetPeer_t1779390221 * L_65 = ((NetReceiverChannelBase_t908288882 *)__this)->get_m_peer_0();
V_3 = ((ObjectU5BU5D_t3614634134*)SZArrayNew(ObjectU5BU5D_t3614634134_il2cpp_TypeInfo_var, (uint32_t)4));
ObjectU5BU5D_t3614634134* L_66 = V_3;
NullCheck(L_66);
IL2CPP_ARRAY_BOUNDS_CHECK(L_66, 0);
ArrayElementTypeCheck (L_66, _stringLiteral1174327339);
(L_66)->SetAt(static_cast<il2cpp_array_size_t>(0), (Il2CppObject *)_stringLiteral1174327339);
ObjectU5BU5D_t3614634134* L_67 = V_3;
NetIncomingMessage_t2014089816 * L_68 = ___message0;
NullCheck(L_67);
IL2CPP_ARRAY_BOUNDS_CHECK(L_67, 1);
ArrayElementTypeCheck (L_67, L_68);
(L_67)->SetAt(static_cast<il2cpp_array_size_t>(1), (Il2CppObject *)L_68);
ObjectU5BU5D_t3614634134* L_69 = V_3;
NullCheck(L_69);
IL2CPP_ARRAY_BOUNDS_CHECK(L_69, 2);
ArrayElementTypeCheck (L_69, _stringLiteral2282954049);
(L_69)->SetAt(static_cast<il2cpp_array_size_t>(2), (Il2CppObject *)_stringLiteral2282954049);
ObjectU5BU5D_t3614634134* L_70 = V_3;
int32_t L_71 = __this->get_m_windowStart_2();
int32_t L_72 = L_71;
Il2CppObject * L_73 = Box(Int32_t2071877448_il2cpp_TypeInfo_var, &L_72);
NullCheck(L_70);
IL2CPP_ARRAY_BOUNDS_CHECK(L_70, 3);
ArrayElementTypeCheck (L_70, L_73);
(L_70)->SetAt(static_cast<il2cpp_array_size_t>(3), (Il2CppObject *)L_73);
ObjectU5BU5D_t3614634134* L_74 = V_3;
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_75 = String_Concat_m3881798623(NULL /*static, unused*/, L_74, /*hidden argument*/NULL);
NullCheck(L_65);
NetPeer_LogVerbose_m3434660420(L_65, L_75, /*hidden argument*/NULL);
NetIncomingMessageU5BU5D_t827121993* L_76 = __this->get_m_withheldMessages_5();
NetIncomingMessage_t2014089816 * L_77 = ___message0;
NullCheck(L_77);
int32_t L_78 = L_77->get_m_sequenceNumber_8();
int32_t L_79 = __this->get_m_windowSize_3();
NetIncomingMessage_t2014089816 * L_80 = ___message0;
NullCheck(L_76);
IL2CPP_ARRAY_BOUNDS_CHECK(L_76, ((int32_t)((int32_t)L_78%(int32_t)L_79)));
ArrayElementTypeCheck (L_76, L_80);
(L_76)->SetAt(static_cast<il2cpp_array_size_t>(((int32_t)((int32_t)L_78%(int32_t)L_79))), (NetIncomingMessage_t2014089816 *)L_80);
}
IL_01eb:
{
return;
}
}
// System.Boolean Lidgren.Network.NetReliableSenderChannel::NeedToSendMessages()
extern "C" bool NetReliableSenderChannel_NeedToSendMessages_m909824567 (NetReliableSenderChannel_t2899775811 * __this, const MethodInfo* method)
{
bool V_0 = false;
int32_t G_B3_0 = 0;
{
bool L_0 = NetSenderChannelBase_NeedToSendMessages_m2902542338(__this, /*hidden argument*/NULL);
if (L_0)
{
goto IL_0011;
}
}
{
bool L_1 = __this->get_m_anyStoredResends_5();
G_B3_0 = ((int32_t)(L_1));
goto IL_0012;
}
IL_0011:
{
G_B3_0 = 1;
}
IL_0012:
{
V_0 = (bool)G_B3_0;
goto IL_0016;
}
IL_0016:
{
bool L_2 = V_0;
return L_2;
}
}
// System.Void Lidgren.Network.NetReliableSenderChannel::.ctor(Lidgren.Network.NetConnection,System.Int32)
extern Il2CppClass* NetBitVector_t1774780753_il2cpp_TypeInfo_var;
extern Il2CppClass* NetStoredReliableMessageU5BU5D_t4079791060_il2cpp_TypeInfo_var;
extern Il2CppClass* NetQueue_1_t4233233666_il2cpp_TypeInfo_var;
extern const MethodInfo* NetQueue_1__ctor_m2411511422_MethodInfo_var;
extern const uint32_t NetReliableSenderChannel__ctor_m2647494615_MetadataUsageId;
extern "C" void NetReliableSenderChannel__ctor_m2647494615 (NetReliableSenderChannel_t2899775811 * __this, NetConnection_t3331492029 * ___connection0, int32_t ___windowSize1, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetReliableSenderChannel__ctor_m2647494615_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
{
NetSenderChannelBase__ctor_m1977648499(__this, /*hidden argument*/NULL);
NetConnection_t3331492029 * L_0 = ___connection0;
__this->set_m_connection_1(L_0);
int32_t L_1 = ___windowSize1;
__this->set_m_windowSize_3(L_1);
__this->set_m_windowStart_2(0);
__this->set_m_sendStart_4(0);
__this->set_m_anyStoredResends_5((bool)0);
NetBitVector_t1774780753 * L_2 = (NetBitVector_t1774780753 *)il2cpp_codegen_object_new(NetBitVector_t1774780753_il2cpp_TypeInfo_var);
NetBitVector__ctor_m1517128273(L_2, ((int32_t)1024), /*hidden argument*/NULL);
__this->set_m_receivedAcks_6(L_2);
int32_t L_3 = __this->get_m_windowSize_3();
__this->set_m_storedMessages_7(((NetStoredReliableMessageU5BU5D_t4079791060*)SZArrayNew(NetStoredReliableMessageU5BU5D_t4079791060_il2cpp_TypeInfo_var, (uint32_t)L_3)));
NetQueue_1_t4233233666 * L_4 = (NetQueue_1_t4233233666 *)il2cpp_codegen_object_new(NetQueue_1_t4233233666_il2cpp_TypeInfo_var);
NetQueue_1__ctor_m2411511422(L_4, 8, /*hidden argument*/NetQueue_1__ctor_m2411511422_MethodInfo_var);
((NetSenderChannelBase_t3096690204 *)__this)->set_m_queuedSends_0(L_4);
NetConnection_t3331492029 * L_5 = __this->get_m_connection_1();
NullCheck(L_5);
double L_6 = NetConnection_GetResendDelay_m601539877(L_5, /*hidden argument*/NULL);
__this->set_m_resendDelay_8(L_6);
return;
}
}
// System.Int32 Lidgren.Network.NetReliableSenderChannel::GetAllowedSends()
extern "C" int32_t NetReliableSenderChannel_GetAllowedSends_m1553689841 (NetReliableSenderChannel_t2899775811 * __this, const MethodInfo* method)
{
int32_t V_0 = 0;
int32_t V_1 = 0;
int32_t G_B3_0 = 0;
{
int32_t L_0 = __this->get_m_windowSize_3();
int32_t L_1 = __this->get_m_sendStart_4();
int32_t L_2 = __this->get_m_windowStart_2();
V_0 = ((int32_t)((int32_t)L_0-(int32_t)((int32_t)((int32_t)((int32_t)((int32_t)((int32_t)((int32_t)L_1+(int32_t)((int32_t)1024)))-(int32_t)L_2))%(int32_t)((int32_t)1024)))));
int32_t L_3 = V_0;
if ((((int32_t)L_3) < ((int32_t)0)))
{
goto IL_0034;
}
}
{
int32_t L_4 = V_0;
int32_t L_5 = __this->get_m_windowSize_3();
G_B3_0 = ((((int32_t)((((int32_t)L_4) > ((int32_t)L_5))? 1 : 0)) == ((int32_t)0))? 1 : 0);
goto IL_0035;
}
IL_0034:
{
G_B3_0 = 0;
}
IL_0035:
{
NetException_Assert_m1426298558(NULL /*static, unused*/, (bool)G_B3_0, /*hidden argument*/NULL);
int32_t L_6 = V_0;
V_1 = L_6;
goto IL_0040;
}
IL_0040:
{
int32_t L_7 = V_1;
return L_7;
}
}
// System.Void Lidgren.Network.NetReliableSenderChannel::Reset()
extern const MethodInfo* NetQueue_1_Clear_m2534478962_MethodInfo_var;
extern const uint32_t NetReliableSenderChannel_Reset_m2812992339_MetadataUsageId;
extern "C" void NetReliableSenderChannel_Reset_m2812992339 (NetReliableSenderChannel_t2899775811 * __this, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetReliableSenderChannel_Reset_m2812992339_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
int32_t V_0 = 0;
bool V_1 = false;
{
NetBitVector_t1774780753 * L_0 = __this->get_m_receivedAcks_6();
NullCheck(L_0);
NetBitVector_Clear_m3351354433(L_0, /*hidden argument*/NULL);
V_0 = 0;
goto IL_0027;
}
IL_0011:
{
NetStoredReliableMessageU5BU5D_t4079791060* L_1 = __this->get_m_storedMessages_7();
int32_t L_2 = V_0;
NullCheck(L_1);
IL2CPP_ARRAY_BOUNDS_CHECK(L_1, L_2);
NetStoredReliableMessage_Reset_m441337071(((L_1)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_2))), /*hidden argument*/NULL);
int32_t L_3 = V_0;
V_0 = ((int32_t)((int32_t)L_3+(int32_t)1));
}
IL_0027:
{
int32_t L_4 = V_0;
NetStoredReliableMessageU5BU5D_t4079791060* L_5 = __this->get_m_storedMessages_7();
NullCheck(L_5);
V_1 = (bool)((((int32_t)L_4) < ((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_5)->max_length))))))? 1 : 0);
bool L_6 = V_1;
if (L_6)
{
goto IL_0011;
}
}
{
__this->set_m_anyStoredResends_5((bool)0);
NetQueue_1_t4233233666 * L_7 = ((NetSenderChannelBase_t3096690204 *)__this)->get_m_queuedSends_0();
NullCheck(L_7);
NetQueue_1_Clear_m2534478962(L_7, /*hidden argument*/NetQueue_1_Clear_m2534478962_MethodInfo_var);
__this->set_m_windowStart_2(0);
__this->set_m_sendStart_4(0);
return;
}
}
// Lidgren.Network.NetSendResult Lidgren.Network.NetReliableSenderChannel::Enqueue(Lidgren.Network.NetOutgoingMessage)
extern const MethodInfo* NetQueue_1_Enqueue_m3616763713_MethodInfo_var;
extern const MethodInfo* NetQueue_1_get_Count_m685192943_MethodInfo_var;
extern const uint32_t NetReliableSenderChannel_Enqueue_m2590298439_MetadataUsageId;
extern "C" int32_t NetReliableSenderChannel_Enqueue_m2590298439 (NetReliableSenderChannel_t2899775811 * __this, NetOutgoingMessage_t2016542980 * ___message0, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetReliableSenderChannel_Enqueue_m2590298439_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
int32_t V_0 = 0;
bool V_1 = false;
{
NetQueue_1_t4233233666 * L_0 = ((NetSenderChannelBase_t3096690204 *)__this)->get_m_queuedSends_0();
NetOutgoingMessage_t2016542980 * L_1 = ___message0;
NullCheck(L_0);
NetQueue_1_Enqueue_m3616763713(L_0, L_1, /*hidden argument*/NetQueue_1_Enqueue_m3616763713_MethodInfo_var);
NetConnection_t3331492029 * L_2 = __this->get_m_connection_1();
NullCheck(L_2);
NetPeer_t1779390221 * L_3 = L_2->get_m_peer_0();
NullCheck(L_3);
L_3->set_m_needFlushSendQueue_20((bool)1);
NetQueue_1_t4233233666 * L_4 = ((NetSenderChannelBase_t3096690204 *)__this)->get_m_queuedSends_0();
NullCheck(L_4);
int32_t L_5 = NetQueue_1_get_Count_m685192943(L_4, /*hidden argument*/NetQueue_1_get_Count_m685192943_MethodInfo_var);
int32_t L_6 = VirtFuncInvoker0< int32_t >::Invoke(4 /* System.Int32 Lidgren.Network.NetSenderChannelBase::GetAllowedSends() */, __this);
V_1 = (bool)((((int32_t)L_5) > ((int32_t)L_6))? 1 : 0);
bool L_7 = V_1;
if (L_7)
{
goto IL_003a;
}
}
{
V_0 = 1;
goto IL_003e;
}
IL_003a:
{
V_0 = 2;
goto IL_003e;
}
IL_003e:
{
int32_t L_8 = V_0;
return L_8;
}
}
// System.Void Lidgren.Network.NetReliableSenderChannel::SendQueuedMessages(System.Double)
extern const MethodInfo* NetQueue_1_TryDequeue_m592441308_MethodInfo_var;
extern const MethodInfo* NetQueue_1_get_Count_m685192943_MethodInfo_var;
extern const uint32_t NetReliableSenderChannel_SendQueuedMessages_m1852233465_MetadataUsageId;
extern "C" void NetReliableSenderChannel_SendQueuedMessages_m1852233465 (NetReliableSenderChannel_t2899775811 * __this, double ___now0, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetReliableSenderChannel_SendQueuedMessages_m1852233465_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
int32_t V_0 = 0;
NetStoredReliableMessage_t1576378473 V_1;
memset(&V_1, 0, sizeof(V_1));
NetOutgoingMessage_t2016542980 * V_2 = NULL;
double V_3 = 0.0;
int32_t V_4 = 0;
bool V_5 = false;
int32_t G_B6_0 = 0;
int32_t G_B20_0 = 0;
{
__this->set_m_anyStoredResends_5((bool)0);
V_0 = 0;
goto IL_00d3;
}
IL_000f:
{
NetStoredReliableMessageU5BU5D_t4079791060* L_0 = __this->get_m_storedMessages_7();
int32_t L_1 = V_0;
NullCheck(L_0);
IL2CPP_ARRAY_BOUNDS_CHECK(L_0, L_1);
V_1 = (*(NetStoredReliableMessage_t1576378473 *)((L_0)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_1))));
NetOutgoingMessage_t2016542980 * L_2 = (&V_1)->get_Message_2();
V_2 = L_2;
NetOutgoingMessage_t2016542980 * L_3 = V_2;
V_5 = (bool)((((int32_t)((((Il2CppObject*)(NetOutgoingMessage_t2016542980 *)L_3) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_4 = V_5;
if (L_4)
{
goto IL_003c;
}
}
{
goto IL_00cf;
}
IL_003c:
{
__this->set_m_anyStoredResends_5((bool)1);
double L_5 = (&V_1)->get_LastSent_1();
V_3 = L_5;
double L_6 = V_3;
if ((!(((double)L_6) > ((double)(0.0)))))
{
goto IL_0067;
}
}
{
double L_7 = ___now0;
double L_8 = V_3;
double L_9 = __this->get_m_resendDelay_8();
G_B6_0 = ((((int32_t)((((double)((double)((double)L_7-(double)L_8))) > ((double)L_9))? 1 : 0)) == ((int32_t)0))? 1 : 0);
goto IL_0068;
}
IL_0067:
{
G_B6_0 = 1;
}
IL_0068:
{
V_5 = (bool)G_B6_0;
bool L_10 = V_5;
if (L_10)
{
goto IL_00ce;
}
}
{
NetConnection_t3331492029 * L_11 = __this->get_m_connection_1();
NullCheck(L_11);
NetConnectionStatistics_t1235765202 * L_12 = L_11->get_m_statistics_14();
NullCheck(L_12);
NetConnectionStatistics_MessageResent_m3999886766(L_12, 0, /*hidden argument*/NULL);
NetOutgoingMessage_t2016542980 * L_13 = V_2;
NullCheck(L_13);
int32_t* L_14 = L_13->get_address_of_m_recyclingCount_7();
Interlocked_Increment_m129308425(NULL /*static, unused*/, L_14, /*hidden argument*/NULL);
NetConnection_t3331492029 * L_15 = __this->get_m_connection_1();
NetOutgoingMessage_t2016542980 * L_16 = V_2;
int32_t L_17 = (&V_1)->get_SequenceNumber_3();
NullCheck(L_15);
NetConnection_QueueSendMessage_m496824802(L_15, L_16, L_17, /*hidden argument*/NULL);
NetStoredReliableMessageU5BU5D_t4079791060* L_18 = __this->get_m_storedMessages_7();
int32_t L_19 = V_0;
NullCheck(L_18);
IL2CPP_ARRAY_BOUNDS_CHECK(L_18, L_19);
double L_20 = ___now0;
((L_18)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_19)))->set_LastSent_1(L_20);
NetStoredReliableMessageU5BU5D_t4079791060* L_21 = __this->get_m_storedMessages_7();
int32_t L_22 = V_0;
NullCheck(L_21);
IL2CPP_ARRAY_BOUNDS_CHECK(L_21, L_22);
NetStoredReliableMessage_t1576378473 * L_23 = ((L_21)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_22)));
int32_t L_24 = L_23->get_NumSent_0();
L_23->set_NumSent_0(((int32_t)((int32_t)L_24+(int32_t)1)));
}
IL_00ce:
{
}
IL_00cf:
{
int32_t L_25 = V_0;
V_0 = ((int32_t)((int32_t)L_25+(int32_t)1));
}
IL_00d3:
{
int32_t L_26 = V_0;
NetStoredReliableMessageU5BU5D_t4079791060* L_27 = __this->get_m_storedMessages_7();
NullCheck(L_27);
V_5 = (bool)((((int32_t)L_26) < ((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_27)->max_length))))))? 1 : 0);
bool L_28 = V_5;
if (L_28)
{
goto IL_000f;
}
}
{
int32_t L_29 = VirtFuncInvoker0< int32_t >::Invoke(4 /* System.Int32 Lidgren.Network.NetSenderChannelBase::GetAllowedSends() */, __this);
V_4 = L_29;
int32_t L_30 = V_4;
V_5 = (bool)((((int32_t)((((int32_t)L_30) < ((int32_t)1))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_31 = V_5;
if (L_31)
{
goto IL_00ff;
}
}
{
goto IL_0155;
}
IL_00ff:
{
goto IL_0138;
}
IL_0101:
{
NetQueue_1_t4233233666 * L_32 = ((NetSenderChannelBase_t3096690204 *)__this)->get_m_queuedSends_0();
NullCheck(L_32);
bool L_33 = NetQueue_1_TryDequeue_m592441308(L_32, (&V_2), /*hidden argument*/NetQueue_1_TryDequeue_m592441308_MethodInfo_var);
V_5 = (bool)((((int32_t)L_33) == ((int32_t)0))? 1 : 0);
bool L_34 = V_5;
if (L_34)
{
goto IL_0121;
}
}
{
double L_35 = ___now0;
NetOutgoingMessage_t2016542980 * L_36 = V_2;
NetReliableSenderChannel_ExecuteSend_m2366433064(__this, L_35, L_36, /*hidden argument*/NULL);
}
IL_0121:
{
int32_t L_37 = V_4;
V_4 = ((int32_t)((int32_t)L_37-(int32_t)1));
int32_t L_38 = V_4;
int32_t L_39 = VirtFuncInvoker0< int32_t >::Invoke(4 /* System.Int32 Lidgren.Network.NetSenderChannelBase::GetAllowedSends() */, __this);
NetException_Assert_m1426298558(NULL /*static, unused*/, (bool)((((int32_t)L_38) == ((int32_t)L_39))? 1 : 0), /*hidden argument*/NULL);
}
IL_0138:
{
int32_t L_40 = V_4;
if ((((int32_t)L_40) <= ((int32_t)0)))
{
goto IL_014d;
}
}
{
NetQueue_1_t4233233666 * L_41 = ((NetSenderChannelBase_t3096690204 *)__this)->get_m_queuedSends_0();
NullCheck(L_41);
int32_t L_42 = NetQueue_1_get_Count_m685192943(L_41, /*hidden argument*/NetQueue_1_get_Count_m685192943_MethodInfo_var);
G_B20_0 = ((((int32_t)L_42) > ((int32_t)0))? 1 : 0);
goto IL_014e;
}
IL_014d:
{
G_B20_0 = 0;
}
IL_014e:
{
V_5 = (bool)G_B20_0;
bool L_43 = V_5;
if (L_43)
{
goto IL_0101;
}
}
IL_0155:
{
return;
}
}
// System.Void Lidgren.Network.NetReliableSenderChannel::ExecuteSend(System.Double,Lidgren.Network.NetOutgoingMessage)
extern "C" void NetReliableSenderChannel_ExecuteSend_m2366433064 (NetReliableSenderChannel_t2899775811 * __this, double ___now0, NetOutgoingMessage_t2016542980 * ___message1, const MethodInfo* method)
{
int32_t V_0 = 0;
int32_t V_1 = 0;
{
int32_t L_0 = __this->get_m_sendStart_4();
V_0 = L_0;
int32_t L_1 = __this->get_m_sendStart_4();
__this->set_m_sendStart_4(((int32_t)((int32_t)((int32_t)((int32_t)L_1+(int32_t)1))%(int32_t)((int32_t)1024))));
NetOutgoingMessage_t2016542980 * L_2 = ___message1;
NullCheck(L_2);
int32_t* L_3 = L_2->get_address_of_m_recyclingCount_7();
Interlocked_Increment_m129308425(NULL /*static, unused*/, L_3, /*hidden argument*/NULL);
NetConnection_t3331492029 * L_4 = __this->get_m_connection_1();
NetOutgoingMessage_t2016542980 * L_5 = ___message1;
int32_t L_6 = V_0;
NullCheck(L_4);
NetConnection_QueueSendMessage_m496824802(L_4, L_5, L_6, /*hidden argument*/NULL);
int32_t L_7 = V_0;
int32_t L_8 = __this->get_m_windowSize_3();
V_1 = ((int32_t)((int32_t)L_7%(int32_t)L_8));
NetStoredReliableMessageU5BU5D_t4079791060* L_9 = __this->get_m_storedMessages_7();
int32_t L_10 = V_1;
NullCheck(L_9);
IL2CPP_ARRAY_BOUNDS_CHECK(L_9, L_10);
NetOutgoingMessage_t2016542980 * L_11 = ((L_9)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_10)))->get_Message_2();
NetException_Assert_m1426298558(NULL /*static, unused*/, (bool)((((Il2CppObject*)(NetOutgoingMessage_t2016542980 *)L_11) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0), /*hidden argument*/NULL);
NetStoredReliableMessageU5BU5D_t4079791060* L_12 = __this->get_m_storedMessages_7();
int32_t L_13 = V_1;
NullCheck(L_12);
IL2CPP_ARRAY_BOUNDS_CHECK(L_12, L_13);
NetStoredReliableMessage_t1576378473 * L_14 = ((L_12)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_13)));
int32_t L_15 = L_14->get_NumSent_0();
L_14->set_NumSent_0(((int32_t)((int32_t)L_15+(int32_t)1)));
NetStoredReliableMessageU5BU5D_t4079791060* L_16 = __this->get_m_storedMessages_7();
int32_t L_17 = V_1;
NullCheck(L_16);
IL2CPP_ARRAY_BOUNDS_CHECK(L_16, L_17);
NetOutgoingMessage_t2016542980 * L_18 = ___message1;
((L_16)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_17)))->set_Message_2(L_18);
NetStoredReliableMessageU5BU5D_t4079791060* L_19 = __this->get_m_storedMessages_7();
int32_t L_20 = V_1;
NullCheck(L_19);
IL2CPP_ARRAY_BOUNDS_CHECK(L_19, L_20);
double L_21 = ___now0;
((L_19)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_20)))->set_LastSent_1(L_21);
NetStoredReliableMessageU5BU5D_t4079791060* L_22 = __this->get_m_storedMessages_7();
int32_t L_23 = V_1;
NullCheck(L_22);
IL2CPP_ARRAY_BOUNDS_CHECK(L_22, L_23);
int32_t L_24 = V_0;
((L_22)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_23)))->set_SequenceNumber_3(L_24);
__this->set_m_anyStoredResends_5((bool)1);
goto IL_00b1;
}
IL_00b1:
{
return;
}
}
// System.Void Lidgren.Network.NetReliableSenderChannel::DestoreMessage(System.Double,System.Int32,System.Boolean&)
extern Il2CppClass* ObjectU5BU5D_t3614634134_il2cpp_TypeInfo_var;
extern Il2CppClass* Int32_t2071877448_il2cpp_TypeInfo_var;
extern Il2CppClass* NetTime_t3056501352_il2cpp_TypeInfo_var;
extern Il2CppClass* Double_t4078015681_il2cpp_TypeInfo_var;
extern Il2CppClass* String_t_il2cpp_TypeInfo_var;
extern Il2CppClass* NetException_t2452891498_il2cpp_TypeInfo_var;
extern Il2CppClass* NetStoredReliableMessage_t1576378473_il2cpp_TypeInfo_var;
extern Il2CppCodeGenString* _stringLiteral1578693010;
extern Il2CppCodeGenString* _stringLiteral985107812;
extern Il2CppCodeGenString* _stringLiteral1650627813;
extern Il2CppCodeGenString* _stringLiteral4073575562;
extern const uint32_t NetReliableSenderChannel_DestoreMessage_m167941949_MetadataUsageId;
extern "C" void NetReliableSenderChannel_DestoreMessage_m167941949 (NetReliableSenderChannel_t2899775811 * __this, double ___now0, int32_t ___storeIndex1, bool* ___resetTimeout2, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetReliableSenderChannel_DestoreMessage_m167941949_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
NetStoredReliableMessage_t1576378473 V_0;
memset(&V_0, 0, sizeof(V_0));
NetOutgoingMessage_t2016542980 * V_1 = NULL;
bool V_2 = false;
ObjectU5BU5D_t3614634134* V_3 = NULL;
bool* G_B2_0 = NULL;
bool* G_B1_0 = NULL;
int32_t G_B3_0 = 0;
bool* G_B3_1 = NULL;
{
NetStoredReliableMessageU5BU5D_t4079791060* L_0 = __this->get_m_storedMessages_7();
int32_t L_1 = ___storeIndex1;
NullCheck(L_0);
IL2CPP_ARRAY_BOUNDS_CHECK(L_0, L_1);
V_0 = (*(NetStoredReliableMessage_t1576378473 *)((L_0)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_1))));
bool* L_2 = ___resetTimeout2;
int32_t L_3 = (&V_0)->get_NumSent_0();
G_B1_0 = L_2;
if ((!(((uint32_t)L_3) == ((uint32_t)1))))
{
G_B2_0 = L_2;
goto IL_0034;
}
}
{
double L_4 = ___now0;
double L_5 = (&V_0)->get_LastSent_1();
G_B3_0 = ((((double)((double)((double)L_4-(double)L_5))) < ((double)(2.0)))? 1 : 0);
G_B3_1 = G_B1_0;
goto IL_0035;
}
IL_0034:
{
G_B3_0 = 0;
G_B3_1 = G_B2_0;
}
IL_0035:
{
*((int8_t*)(G_B3_1)) = (int8_t)G_B3_0;
NetOutgoingMessage_t2016542980 * L_6 = (&V_0)->get_Message_2();
V_1 = L_6;
NetOutgoingMessage_t2016542980 * L_7 = V_1;
NullCheck(L_7);
int32_t* L_8 = L_7->get_address_of_m_recyclingCount_7();
Interlocked_Decrement_m70525859(NULL /*static, unused*/, L_8, /*hidden argument*/NULL);
NetOutgoingMessage_t2016542980 * L_9 = V_1;
V_2 = (bool)((((int32_t)((((Il2CppObject*)(NetOutgoingMessage_t2016542980 *)L_9) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_10 = V_2;
if (L_10)
{
goto IL_00ca;
}
}
{
V_3 = ((ObjectU5BU5D_t3614634134*)SZArrayNew(ObjectU5BU5D_t3614634134_il2cpp_TypeInfo_var, (uint32_t)7));
ObjectU5BU5D_t3614634134* L_11 = V_3;
NullCheck(L_11);
IL2CPP_ARRAY_BOUNDS_CHECK(L_11, 0);
ArrayElementTypeCheck (L_11, _stringLiteral1578693010);
(L_11)->SetAt(static_cast<il2cpp_array_size_t>(0), (Il2CppObject *)_stringLiteral1578693010);
ObjectU5BU5D_t3614634134* L_12 = V_3;
int32_t L_13 = ___storeIndex1;
int32_t L_14 = L_13;
Il2CppObject * L_15 = Box(Int32_t2071877448_il2cpp_TypeInfo_var, &L_14);
NullCheck(L_12);
IL2CPP_ARRAY_BOUNDS_CHECK(L_12, 1);
ArrayElementTypeCheck (L_12, L_15);
(L_12)->SetAt(static_cast<il2cpp_array_size_t>(1), (Il2CppObject *)L_15);
ObjectU5BU5D_t3614634134* L_16 = V_3;
NullCheck(L_16);
IL2CPP_ARRAY_BOUNDS_CHECK(L_16, 2);
ArrayElementTypeCheck (L_16, _stringLiteral985107812);
(L_16)->SetAt(static_cast<il2cpp_array_size_t>(2), (Il2CppObject *)_stringLiteral985107812);
ObjectU5BU5D_t3614634134* L_17 = V_3;
NetStoredReliableMessageU5BU5D_t4079791060* L_18 = __this->get_m_storedMessages_7();
int32_t L_19 = ___storeIndex1;
NullCheck(L_18);
IL2CPP_ARRAY_BOUNDS_CHECK(L_18, L_19);
int32_t L_20 = ((L_18)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_19)))->get_NumSent_0();
int32_t L_21 = L_20;
Il2CppObject * L_22 = Box(Int32_t2071877448_il2cpp_TypeInfo_var, &L_21);
NullCheck(L_17);
IL2CPP_ARRAY_BOUNDS_CHECK(L_17, 3);
ArrayElementTypeCheck (L_17, L_22);
(L_17)->SetAt(static_cast<il2cpp_array_size_t>(3), (Il2CppObject *)L_22);
ObjectU5BU5D_t3614634134* L_23 = V_3;
NullCheck(L_23);
IL2CPP_ARRAY_BOUNDS_CHECK(L_23, 4);
ArrayElementTypeCheck (L_23, _stringLiteral1650627813);
(L_23)->SetAt(static_cast<il2cpp_array_size_t>(4), (Il2CppObject *)_stringLiteral1650627813);
ObjectU5BU5D_t3614634134* L_24 = V_3;
IL2CPP_RUNTIME_CLASS_INIT(NetTime_t3056501352_il2cpp_TypeInfo_var);
double L_25 = NetTime_get_Now_m1609702533(NULL /*static, unused*/, /*hidden argument*/NULL);
NetStoredReliableMessageU5BU5D_t4079791060* L_26 = __this->get_m_storedMessages_7();
int32_t L_27 = ___storeIndex1;
NullCheck(L_26);
IL2CPP_ARRAY_BOUNDS_CHECK(L_26, L_27);
double L_28 = ((L_26)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_27)))->get_LastSent_1();
double L_29 = ((double)((double)L_25-(double)L_28));
Il2CppObject * L_30 = Box(Double_t4078015681_il2cpp_TypeInfo_var, &L_29);
NullCheck(L_24);
IL2CPP_ARRAY_BOUNDS_CHECK(L_24, 5);
ArrayElementTypeCheck (L_24, L_30);
(L_24)->SetAt(static_cast<il2cpp_array_size_t>(5), (Il2CppObject *)L_30);
ObjectU5BU5D_t3614634134* L_31 = V_3;
NullCheck(L_31);
IL2CPP_ARRAY_BOUNDS_CHECK(L_31, 6);
ArrayElementTypeCheck (L_31, _stringLiteral4073575562);
(L_31)->SetAt(static_cast<il2cpp_array_size_t>(6), (Il2CppObject *)_stringLiteral4073575562);
ObjectU5BU5D_t3614634134* L_32 = V_3;
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_33 = String_Concat_m3881798623(NULL /*static, unused*/, L_32, /*hidden argument*/NULL);
NetException_t2452891498 * L_34 = (NetException_t2452891498 *)il2cpp_codegen_object_new(NetException_t2452891498_il2cpp_TypeInfo_var);
NetException__ctor_m2724322251(L_34, L_33, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_34);
}
IL_00ca:
{
NetOutgoingMessage_t2016542980 * L_35 = V_1;
NullCheck(L_35);
int32_t L_36 = L_35->get_m_recyclingCount_7();
V_2 = (bool)((((int32_t)L_36) > ((int32_t)0))? 1 : 0);
bool L_37 = V_2;
if (L_37)
{
goto IL_00e9;
}
}
{
NetConnection_t3331492029 * L_38 = __this->get_m_connection_1();
NullCheck(L_38);
NetPeer_t1779390221 * L_39 = L_38->get_m_peer_0();
NetOutgoingMessage_t2016542980 * L_40 = V_1;
NullCheck(L_39);
NetPeer_Recycle_m2290156780(L_39, L_40, /*hidden argument*/NULL);
}
IL_00e9:
{
NetStoredReliableMessageU5BU5D_t4079791060* L_41 = __this->get_m_storedMessages_7();
int32_t L_42 = ___storeIndex1;
NullCheck(L_41);
IL2CPP_ARRAY_BOUNDS_CHECK(L_41, L_42);
Initobj (NetStoredReliableMessage_t1576378473_il2cpp_TypeInfo_var, ((L_41)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_42))));
return;
}
}
// System.Void Lidgren.Network.NetReliableSenderChannel::ReceiveAcknowledge(System.Double,System.Int32)
extern Il2CppClass* NetUtility_t3562260209_il2cpp_TypeInfo_var;
extern Il2CppCodeGenString* _stringLiteral1809452803;
extern const uint32_t NetReliableSenderChannel_ReceiveAcknowledge_m3155274464_MetadataUsageId;
extern "C" void NetReliableSenderChannel_ReceiveAcknowledge_m3155274464 (NetReliableSenderChannel_t2899775811 * __this, double ___now0, int32_t ___seqNr1, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetReliableSenderChannel_ReceiveAcknowledge_m3155274464_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
int32_t V_0 = 0;
bool V_1 = false;
bool V_2 = false;
int32_t V_3 = 0;
int32_t V_4 = 0;
int32_t V_5 = 0;
NetOutgoingMessage_t2016542980 * V_6 = NULL;
bool V_7 = false;
{
int32_t L_0 = ___seqNr1;
int32_t L_1 = __this->get_m_windowStart_2();
IL2CPP_RUNTIME_CLASS_INIT(NetUtility_t3562260209_il2cpp_TypeInfo_var);
int32_t L_2 = NetUtility_RelativeSequenceNumber_m1713083748(NULL /*static, unused*/, L_0, L_1, /*hidden argument*/NULL);
V_0 = L_2;
int32_t L_3 = V_0;
V_7 = (bool)((((int32_t)((((int32_t)L_3) < ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_4 = V_7;
if (L_4)
{
goto IL_0021;
}
}
{
goto IL_02ca;
}
IL_0021:
{
int32_t L_5 = V_0;
V_7 = (bool)((((int32_t)((((int32_t)L_5) == ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_6 = V_7;
if (L_6)
{
goto IL_0121;
}
}
{
int32_t L_7 = ___seqNr1;
int32_t L_8 = __this->get_m_windowStart_2();
NetException_Assert_m1426298558(NULL /*static, unused*/, (bool)((((int32_t)L_7) == ((int32_t)L_8))? 1 : 0), /*hidden argument*/NULL);
NetBitVector_t1774780753 * L_9 = __this->get_m_receivedAcks_6();
int32_t L_10 = __this->get_m_windowStart_2();
NullCheck(L_9);
NetBitVector_set_Bit_m3149930918(L_9, L_10, (bool)0, /*hidden argument*/NULL);
double L_11 = ___now0;
int32_t L_12 = __this->get_m_windowStart_2();
int32_t L_13 = __this->get_m_windowSize_3();
NetReliableSenderChannel_DestoreMessage_m167941949(__this, L_11, ((int32_t)((int32_t)L_12%(int32_t)L_13)), (&V_1), /*hidden argument*/NULL);
int32_t L_14 = __this->get_m_windowStart_2();
__this->set_m_windowStart_2(((int32_t)((int32_t)((int32_t)((int32_t)L_14+(int32_t)1))%(int32_t)((int32_t)1024))));
goto IL_00eb;
}
IL_0081:
{
NetBitVector_t1774780753 * L_15 = __this->get_m_receivedAcks_6();
int32_t L_16 = __this->get_m_windowStart_2();
NullCheck(L_15);
NetBitVector_set_Bit_m3149930918(L_15, L_16, (bool)0, /*hidden argument*/NULL);
double L_17 = ___now0;
int32_t L_18 = __this->get_m_windowStart_2();
int32_t L_19 = __this->get_m_windowSize_3();
NetReliableSenderChannel_DestoreMessage_m167941949(__this, L_17, ((int32_t)((int32_t)L_18%(int32_t)L_19)), (&V_2), /*hidden argument*/NULL);
bool L_20 = V_1;
bool L_21 = V_2;
V_1 = (bool)((int32_t)((int32_t)L_20|(int32_t)L_21));
NetStoredReliableMessageU5BU5D_t4079791060* L_22 = __this->get_m_storedMessages_7();
int32_t L_23 = __this->get_m_windowStart_2();
int32_t L_24 = __this->get_m_windowSize_3();
NullCheck(L_22);
IL2CPP_ARRAY_BOUNDS_CHECK(L_22, ((int32_t)((int32_t)L_23%(int32_t)L_24)));
NetOutgoingMessage_t2016542980 * L_25 = ((L_22)->GetAddressAt(static_cast<il2cpp_array_size_t>(((int32_t)((int32_t)L_23%(int32_t)L_24)))))->get_Message_2();
NetException_Assert_m1426298558(NULL /*static, unused*/, (bool)((((Il2CppObject*)(NetOutgoingMessage_t2016542980 *)L_25) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0), /*hidden argument*/NULL);
int32_t L_26 = __this->get_m_windowStart_2();
__this->set_m_windowStart_2(((int32_t)((int32_t)((int32_t)((int32_t)L_26+(int32_t)1))%(int32_t)((int32_t)1024))));
}
IL_00eb:
{
NetBitVector_t1774780753 * L_27 = __this->get_m_receivedAcks_6();
int32_t L_28 = __this->get_m_windowStart_2();
NullCheck(L_27);
bool L_29 = NetBitVector_Get_m2410185427(L_27, L_28, /*hidden argument*/NULL);
V_7 = L_29;
bool L_30 = V_7;
if (L_30)
{
goto IL_0081;
}
}
{
bool L_31 = V_1;
V_7 = (bool)((((int32_t)L_31) == ((int32_t)0))? 1 : 0);
bool L_32 = V_7;
if (L_32)
{
goto IL_011c;
}
}
{
NetConnection_t3331492029 * L_33 = __this->get_m_connection_1();
double L_34 = ___now0;
NullCheck(L_33);
NetConnection_ResetTimeout_m3986183602(L_33, L_34, /*hidden argument*/NULL);
}
IL_011c:
{
goto IL_02ca;
}
IL_0121:
{
int32_t L_35 = ___seqNr1;
int32_t L_36 = __this->get_m_sendStart_4();
IL2CPP_RUNTIME_CLASS_INIT(NetUtility_t3562260209_il2cpp_TypeInfo_var);
int32_t L_37 = NetUtility_RelativeSequenceNumber_m1713083748(NULL /*static, unused*/, L_35, L_36, /*hidden argument*/NULL);
V_3 = L_37;
int32_t L_38 = V_3;
V_7 = (bool)((((int32_t)L_38) > ((int32_t)0))? 1 : 0);
bool L_39 = V_7;
if (L_39)
{
goto IL_0165;
}
}
{
NetBitVector_t1774780753 * L_40 = __this->get_m_receivedAcks_6();
int32_t L_41 = ___seqNr1;
NullCheck(L_40);
bool L_42 = NetBitVector_get_Bit_m3575907859(L_40, L_41, /*hidden argument*/NULL);
V_7 = (bool)((((int32_t)L_42) == ((int32_t)0))? 1 : 0);
bool L_43 = V_7;
if (L_43)
{
goto IL_0152;
}
}
{
goto IL_0162;
}
IL_0152:
{
NetBitVector_t1774780753 * L_44 = __this->get_m_receivedAcks_6();
int32_t L_45 = ___seqNr1;
NullCheck(L_44);
NetBitVector_set_Bit_m3149930918(L_44, L_45, (bool)1, /*hidden argument*/NULL);
}
IL_0162:
{
goto IL_0184;
}
IL_0165:
{
int32_t L_46 = V_3;
V_7 = (bool)((((int32_t)((((int32_t)L_46) > ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_47 = V_7;
if (L_47)
{
goto IL_0184;
}
}
{
NetException_Assert_m1067120882(NULL /*static, unused*/, (bool)0, _stringLiteral1809452803, /*hidden argument*/NULL);
goto IL_02ca;
}
IL_0184:
{
int32_t L_48 = ___seqNr1;
V_4 = L_48;
}
IL_0187:
{
int32_t L_49 = V_4;
V_4 = ((int32_t)((int32_t)L_49-(int32_t)1));
int32_t L_50 = V_4;
V_7 = (bool)((((int32_t)((((int32_t)L_50) < ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_51 = V_7;
if (L_51)
{
goto IL_01a3;
}
}
{
V_4 = ((int32_t)1023);
}
IL_01a3:
{
NetBitVector_t1774780753 * L_52 = __this->get_m_receivedAcks_6();
int32_t L_53 = V_4;
NullCheck(L_52);
bool L_54 = NetBitVector_get_Bit_m3575907859(L_52, L_53, /*hidden argument*/NULL);
V_7 = (bool)((((int32_t)L_54) == ((int32_t)0))? 1 : 0);
bool L_55 = V_7;
if (L_55)
{
goto IL_01c0;
}
}
{
goto IL_02b3;
}
IL_01c0:
{
int32_t L_56 = V_4;
int32_t L_57 = __this->get_m_windowSize_3();
V_5 = ((int32_t)((int32_t)L_56%(int32_t)L_57));
NetStoredReliableMessageU5BU5D_t4079791060* L_58 = __this->get_m_storedMessages_7();
int32_t L_59 = V_5;
NullCheck(L_58);
IL2CPP_ARRAY_BOUNDS_CHECK(L_58, L_59);
NetOutgoingMessage_t2016542980 * L_60 = ((L_58)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_59)))->get_Message_2();
NetException_Assert_m1426298558(NULL /*static, unused*/, (bool)((((int32_t)((((Il2CppObject*)(NetOutgoingMessage_t2016542980 *)L_60) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0)) == ((int32_t)0))? 1 : 0), /*hidden argument*/NULL);
NetStoredReliableMessageU5BU5D_t4079791060* L_61 = __this->get_m_storedMessages_7();
int32_t L_62 = V_5;
NullCheck(L_61);
IL2CPP_ARRAY_BOUNDS_CHECK(L_61, L_62);
int32_t L_63 = ((L_61)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_62)))->get_NumSent_0();
V_7 = (bool)((((int32_t)((((int32_t)L_63) == ((int32_t)1))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_64 = V_7;
if (L_64)
{
goto IL_02b2;
}
}
{
NetStoredReliableMessageU5BU5D_t4079791060* L_65 = __this->get_m_storedMessages_7();
int32_t L_66 = V_5;
NullCheck(L_65);
IL2CPP_ARRAY_BOUNDS_CHECK(L_65, L_66);
NetOutgoingMessage_t2016542980 * L_67 = ((L_65)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_66)))->get_Message_2();
V_6 = L_67;
double L_68 = ___now0;
NetStoredReliableMessageU5BU5D_t4079791060* L_69 = __this->get_m_storedMessages_7();
int32_t L_70 = V_5;
NullCheck(L_69);
IL2CPP_ARRAY_BOUNDS_CHECK(L_69, L_70);
double L_71 = ((L_69)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_70)))->get_LastSent_1();
double L_72 = __this->get_m_resendDelay_8();
V_7 = (bool)((((int32_t)((((double)((double)((double)L_68-(double)L_71))) < ((double)((double)((double)L_72*(double)(0.35)))))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_73 = V_7;
if (L_73)
{
goto IL_0253;
}
}
{
goto IL_02b1;
}
IL_0253:
{
NetStoredReliableMessageU5BU5D_t4079791060* L_74 = __this->get_m_storedMessages_7();
int32_t L_75 = V_5;
NullCheck(L_74);
IL2CPP_ARRAY_BOUNDS_CHECK(L_74, L_75);
double L_76 = ___now0;
((L_74)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_75)))->set_LastSent_1(L_76);
NetStoredReliableMessageU5BU5D_t4079791060* L_77 = __this->get_m_storedMessages_7();
int32_t L_78 = V_5;
NullCheck(L_77);
IL2CPP_ARRAY_BOUNDS_CHECK(L_77, L_78);
NetStoredReliableMessage_t1576378473 * L_79 = ((L_77)->GetAddressAt(static_cast<il2cpp_array_size_t>(L_78)));
int32_t L_80 = L_79->get_NumSent_0();
L_79->set_NumSent_0(((int32_t)((int32_t)L_80+(int32_t)1)));
NetConnection_t3331492029 * L_81 = __this->get_m_connection_1();
NullCheck(L_81);
NetConnectionStatistics_t1235765202 * L_82 = L_81->get_m_statistics_14();
NullCheck(L_82);
NetConnectionStatistics_MessageResent_m3999886766(L_82, 1, /*hidden argument*/NULL);
NetOutgoingMessage_t2016542980 * L_83 = V_6;
NullCheck(L_83);
int32_t* L_84 = L_83->get_address_of_m_recyclingCount_7();
Interlocked_Increment_m129308425(NULL /*static, unused*/, L_84, /*hidden argument*/NULL);
NetConnection_t3331492029 * L_85 = __this->get_m_connection_1();
NetOutgoingMessage_t2016542980 * L_86 = V_6;
int32_t L_87 = V_4;
NullCheck(L_85);
NetConnection_QueueSendMessage_m496824802(L_85, L_86, L_87, /*hidden argument*/NULL);
}
IL_02b1:
{
}
IL_02b2:
{
}
IL_02b3:
{
int32_t L_88 = V_4;
int32_t L_89 = __this->get_m_windowStart_2();
V_7 = (bool)((((int32_t)((((int32_t)L_88) == ((int32_t)L_89))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_90 = V_7;
if (L_90)
{
goto IL_0187;
}
}
IL_02ca:
{
return;
}
}
// System.Void Lidgren.Network.NetReliableSequencedReceiver::.ctor(Lidgren.Network.NetConnection,System.Int32)
extern "C" void NetReliableSequencedReceiver__ctor_m408695305 (NetReliableSequencedReceiver_t2385271929 * __this, NetConnection_t3331492029 * ___connection0, int32_t ___windowSize1, const MethodInfo* method)
{
{
NetConnection_t3331492029 * L_0 = ___connection0;
NetReceiverChannelBase__ctor_m892231457(__this, L_0, /*hidden argument*/NULL);
int32_t L_1 = ___windowSize1;
__this->set_m_windowSize_3(L_1);
return;
}
}
// System.Void Lidgren.Network.NetReliableSequencedReceiver::AdvanceWindow()
extern "C" void NetReliableSequencedReceiver_AdvanceWindow_m2796465932 (NetReliableSequencedReceiver_t2385271929 * __this, const MethodInfo* method)
{
{
int32_t L_0 = __this->get_m_windowStart_2();
__this->set_m_windowStart_2(((int32_t)((int32_t)((int32_t)((int32_t)L_0+(int32_t)1))%(int32_t)((int32_t)1024))));
return;
}
}
// System.Void Lidgren.Network.NetReliableSequencedReceiver::ReceiveMessage(Lidgren.Network.NetIncomingMessage)
extern Il2CppClass* NetUtility_t3562260209_il2cpp_TypeInfo_var;
extern Il2CppClass* Int32_t2071877448_il2cpp_TypeInfo_var;
extern Il2CppClass* String_t_il2cpp_TypeInfo_var;
extern Il2CppClass* ObjectU5BU5D_t3614634134_il2cpp_TypeInfo_var;
extern Il2CppCodeGenString* _stringLiteral2279591503;
extern Il2CppCodeGenString* _stringLiteral3496729934;
extern Il2CppCodeGenString* _stringLiteral1174327339;
extern Il2CppCodeGenString* _stringLiteral1925410982;
extern const uint32_t NetReliableSequencedReceiver_ReceiveMessage_m2961521515_MetadataUsageId;
extern "C" void NetReliableSequencedReceiver_ReceiveMessage_m2961521515 (NetReliableSequencedReceiver_t2385271929 * __this, NetIncomingMessage_t2014089816 * ___message0, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetReliableSequencedReceiver_ReceiveMessage_m2961521515_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
int32_t V_0 = 0;
int32_t V_1 = 0;
bool V_2 = false;
ObjectU5BU5D_t3614634134* V_3 = NULL;
{
NetIncomingMessage_t2014089816 * L_0 = ___message0;
NullCheck(L_0);
int32_t L_1 = L_0->get_m_sequenceNumber_8();
V_0 = L_1;
int32_t L_2 = V_0;
int32_t L_3 = __this->get_m_windowStart_2();
IL2CPP_RUNTIME_CLASS_INIT(NetUtility_t3562260209_il2cpp_TypeInfo_var);
int32_t L_4 = NetUtility_RelativeSequenceNumber_m1713083748(NULL /*static, unused*/, L_2, L_3, /*hidden argument*/NULL);
V_1 = L_4;
NetConnection_t3331492029 * L_5 = ((NetReceiverChannelBase_t908288882 *)__this)->get_m_connection_1();
NetIncomingMessage_t2014089816 * L_6 = ___message0;
NullCheck(L_6);
uint8_t L_7 = L_6->get_m_receivedMessageType_9();
int32_t L_8 = V_0;
NullCheck(L_5);
NetConnection_QueueAck_m3101883724(L_5, L_7, L_8, /*hidden argument*/NULL);
int32_t L_9 = V_1;
V_2 = (bool)((((int32_t)((((int32_t)L_9) == ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_10 = V_2;
if (L_10)
{
goto IL_004d;
}
}
{
NetReliableSequencedReceiver_AdvanceWindow_m2796465932(__this, /*hidden argument*/NULL);
NetPeer_t1779390221 * L_11 = ((NetReceiverChannelBase_t908288882 *)__this)->get_m_peer_0();
NetIncomingMessage_t2014089816 * L_12 = ___message0;
NullCheck(L_11);
NetPeer_ReleaseMessage_m3520648965(L_11, L_12, /*hidden argument*/NULL);
goto IL_0117;
}
IL_004d:
{
int32_t L_13 = V_1;
V_2 = (bool)((((int32_t)((((int32_t)L_13) < ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_14 = V_2;
if (L_14)
{
goto IL_0095;
}
}
{
NetConnection_t3331492029 * L_15 = ((NetReceiverChannelBase_t908288882 *)__this)->get_m_connection_1();
NullCheck(L_15);
NetConnectionStatistics_t1235765202 * L_16 = L_15->get_m_statistics_14();
NullCheck(L_16);
NetConnectionStatistics_MessageDropped_m4117327218(L_16, /*hidden argument*/NULL);
NetPeer_t1779390221 * L_17 = ((NetReceiverChannelBase_t908288882 *)__this)->get_m_peer_0();
NetIncomingMessage_t2014089816 * L_18 = ___message0;
NullCheck(L_18);
int32_t L_19 = L_18->get_m_sequenceNumber_8();
int32_t L_20 = L_19;
Il2CppObject * L_21 = Box(Int32_t2071877448_il2cpp_TypeInfo_var, &L_20);
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_22 = String_Concat_m2000667605(NULL /*static, unused*/, _stringLiteral2279591503, L_21, _stringLiteral3496729934, /*hidden argument*/NULL);
NullCheck(L_17);
NetPeer_LogVerbose_m3434660420(L_17, L_22, /*hidden argument*/NULL);
goto IL_0117;
}
IL_0095:
{
int32_t L_23 = V_1;
int32_t L_24 = __this->get_m_windowSize_3();
V_2 = (bool)((((int32_t)((((int32_t)L_23) > ((int32_t)L_24))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_25 = V_2;
if (L_25)
{
goto IL_00f4;
}
}
{
NetConnection_t3331492029 * L_26 = ((NetReceiverChannelBase_t908288882 *)__this)->get_m_connection_1();
NullCheck(L_26);
NetConnectionStatistics_t1235765202 * L_27 = L_26->get_m_statistics_14();
NullCheck(L_27);
NetConnectionStatistics_MessageDropped_m4117327218(L_27, /*hidden argument*/NULL);
NetPeer_t1779390221 * L_28 = ((NetReceiverChannelBase_t908288882 *)__this)->get_m_peer_0();
V_3 = ((ObjectU5BU5D_t3614634134*)SZArrayNew(ObjectU5BU5D_t3614634134_il2cpp_TypeInfo_var, (uint32_t)4));
ObjectU5BU5D_t3614634134* L_29 = V_3;
NullCheck(L_29);
IL2CPP_ARRAY_BOUNDS_CHECK(L_29, 0);
ArrayElementTypeCheck (L_29, _stringLiteral1174327339);
(L_29)->SetAt(static_cast<il2cpp_array_size_t>(0), (Il2CppObject *)_stringLiteral1174327339);
ObjectU5BU5D_t3614634134* L_30 = V_3;
NetIncomingMessage_t2014089816 * L_31 = ___message0;
NullCheck(L_30);
IL2CPP_ARRAY_BOUNDS_CHECK(L_30, 1);
ArrayElementTypeCheck (L_30, L_31);
(L_30)->SetAt(static_cast<il2cpp_array_size_t>(1), (Il2CppObject *)L_31);
ObjectU5BU5D_t3614634134* L_32 = V_3;
NullCheck(L_32);
IL2CPP_ARRAY_BOUNDS_CHECK(L_32, 2);
ArrayElementTypeCheck (L_32, _stringLiteral1925410982);
(L_32)->SetAt(static_cast<il2cpp_array_size_t>(2), (Il2CppObject *)_stringLiteral1925410982);
ObjectU5BU5D_t3614634134* L_33 = V_3;
int32_t L_34 = __this->get_m_windowStart_2();
int32_t L_35 = L_34;
Il2CppObject * L_36 = Box(Int32_t2071877448_il2cpp_TypeInfo_var, &L_35);
NullCheck(L_33);
IL2CPP_ARRAY_BOUNDS_CHECK(L_33, 3);
ArrayElementTypeCheck (L_33, L_36);
(L_33)->SetAt(static_cast<il2cpp_array_size_t>(3), (Il2CppObject *)L_36);
ObjectU5BU5D_t3614634134* L_37 = V_3;
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_38 = String_Concat_m3881798623(NULL /*static, unused*/, L_37, /*hidden argument*/NULL);
NullCheck(L_28);
NetPeer_LogDebug_m2983960595(L_28, L_38, /*hidden argument*/NULL);
goto IL_0117;
}
IL_00f4:
{
int32_t L_39 = __this->get_m_windowStart_2();
int32_t L_40 = V_1;
__this->set_m_windowStart_2(((int32_t)((int32_t)((int32_t)((int32_t)L_39+(int32_t)L_40))%(int32_t)((int32_t)1024))));
NetPeer_t1779390221 * L_41 = ((NetReceiverChannelBase_t908288882 *)__this)->get_m_peer_0();
NetIncomingMessage_t2014089816 * L_42 = ___message0;
NullCheck(L_41);
NetPeer_ReleaseMessage_m3520648965(L_41, L_42, /*hidden argument*/NULL);
goto IL_0117;
}
IL_0117:
{
return;
}
}
// System.Void Lidgren.Network.NetReliableUnorderedReceiver::.ctor(Lidgren.Network.NetConnection,System.Int32)
extern Il2CppClass* NetBitVector_t1774780753_il2cpp_TypeInfo_var;
extern const uint32_t NetReliableUnorderedReceiver__ctor_m1507047812_MetadataUsageId;
extern "C" void NetReliableUnorderedReceiver__ctor_m1507047812 (NetReliableUnorderedReceiver_t3992686328 * __this, NetConnection_t3331492029 * ___connection0, int32_t ___windowSize1, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetReliableUnorderedReceiver__ctor_m1507047812_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
{
NetConnection_t3331492029 * L_0 = ___connection0;
NetReceiverChannelBase__ctor_m892231457(__this, L_0, /*hidden argument*/NULL);
int32_t L_1 = ___windowSize1;
__this->set_m_windowSize_3(L_1);
int32_t L_2 = ___windowSize1;
NetBitVector_t1774780753 * L_3 = (NetBitVector_t1774780753 *)il2cpp_codegen_object_new(NetBitVector_t1774780753_il2cpp_TypeInfo_var);
NetBitVector__ctor_m1517128273(L_3, L_2, /*hidden argument*/NULL);
__this->set_m_earlyReceived_4(L_3);
return;
}
}
// System.Void Lidgren.Network.NetReliableUnorderedReceiver::AdvanceWindow()
extern "C" void NetReliableUnorderedReceiver_AdvanceWindow_m832664157 (NetReliableUnorderedReceiver_t3992686328 * __this, const MethodInfo* method)
{
{
NetBitVector_t1774780753 * L_0 = __this->get_m_earlyReceived_4();
int32_t L_1 = __this->get_m_windowStart_2();
int32_t L_2 = __this->get_m_windowSize_3();
NullCheck(L_0);
NetBitVector_Set_m2669921130(L_0, ((int32_t)((int32_t)L_1%(int32_t)L_2)), (bool)0, /*hidden argument*/NULL);
int32_t L_3 = __this->get_m_windowStart_2();
__this->set_m_windowStart_2(((int32_t)((int32_t)((int32_t)((int32_t)L_3+(int32_t)1))%(int32_t)((int32_t)1024))));
return;
}
}
// System.Void Lidgren.Network.NetReliableUnorderedReceiver::ReceiveMessage(Lidgren.Network.NetIncomingMessage)
extern Il2CppClass* NetUtility_t3562260209_il2cpp_TypeInfo_var;
extern Il2CppClass* Int32_t2071877448_il2cpp_TypeInfo_var;
extern Il2CppClass* String_t_il2cpp_TypeInfo_var;
extern Il2CppClass* ObjectU5BU5D_t3614634134_il2cpp_TypeInfo_var;
extern Il2CppCodeGenString* _stringLiteral2279591503;
extern Il2CppCodeGenString* _stringLiteral2486397350;
extern Il2CppCodeGenString* _stringLiteral1174327339;
extern Il2CppCodeGenString* _stringLiteral1925410982;
extern const uint32_t NetReliableUnorderedReceiver_ReceiveMessage_m3956639720_MetadataUsageId;
extern "C" void NetReliableUnorderedReceiver_ReceiveMessage_m3956639720 (NetReliableUnorderedReceiver_t3992686328 * __this, NetIncomingMessage_t2014089816 * ___message0, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetReliableUnorderedReceiver_ReceiveMessage_m3956639720_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
int32_t V_0 = 0;
int32_t V_1 = 0;
bool V_2 = false;
ObjectU5BU5D_t3614634134* V_3 = NULL;
{
NetIncomingMessage_t2014089816 * L_0 = ___message0;
NullCheck(L_0);
int32_t L_1 = L_0->get_m_sequenceNumber_8();
int32_t L_2 = __this->get_m_windowStart_2();
IL2CPP_RUNTIME_CLASS_INIT(NetUtility_t3562260209_il2cpp_TypeInfo_var);
int32_t L_3 = NetUtility_RelativeSequenceNumber_m1713083748(NULL /*static, unused*/, L_1, L_2, /*hidden argument*/NULL);
V_0 = L_3;
NetConnection_t3331492029 * L_4 = ((NetReceiverChannelBase_t908288882 *)__this)->get_m_connection_1();
NetIncomingMessage_t2014089816 * L_5 = ___message0;
NullCheck(L_5);
uint8_t L_6 = L_5->get_m_receivedMessageType_9();
NetIncomingMessage_t2014089816 * L_7 = ___message0;
NullCheck(L_7);
int32_t L_8 = L_7->get_m_sequenceNumber_8();
NullCheck(L_4);
NetConnection_QueueAck_m3101883724(L_4, L_6, L_8, /*hidden argument*/NULL);
int32_t L_9 = V_0;
V_2 = (bool)((((int32_t)((((int32_t)L_9) == ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_10 = V_2;
if (L_10)
{
goto IL_0085;
}
}
{
NetReliableUnorderedReceiver_AdvanceWindow_m832664157(__this, /*hidden argument*/NULL);
NetPeer_t1779390221 * L_11 = ((NetReceiverChannelBase_t908288882 *)__this)->get_m_peer_0();
NetIncomingMessage_t2014089816 * L_12 = ___message0;
NullCheck(L_11);
NetPeer_ReleaseMessage_m3520648965(L_11, L_12, /*hidden argument*/NULL);
NetIncomingMessage_t2014089816 * L_13 = ___message0;
NullCheck(L_13);
int32_t L_14 = L_13->get_m_sequenceNumber_8();
V_1 = ((int32_t)((int32_t)((int32_t)((int32_t)L_14+(int32_t)1))%(int32_t)((int32_t)1024)));
goto IL_0069;
}
IL_005c:
{
NetReliableUnorderedReceiver_AdvanceWindow_m832664157(__this, /*hidden argument*/NULL);
int32_t L_15 = V_1;
V_1 = ((int32_t)((int32_t)L_15+(int32_t)1));
}
IL_0069:
{
NetBitVector_t1774780753 * L_16 = __this->get_m_earlyReceived_4();
int32_t L_17 = V_1;
int32_t L_18 = __this->get_m_windowSize_3();
NullCheck(L_16);
bool L_19 = NetBitVector_get_Bit_m3575907859(L_16, ((int32_t)((int32_t)L_17%(int32_t)L_18)), /*hidden argument*/NULL);
V_2 = L_19;
bool L_20 = V_2;
if (L_20)
{
goto IL_005c;
}
}
{
goto IL_01af;
}
IL_0085:
{
int32_t L_21 = V_0;
V_2 = (bool)((((int32_t)((((int32_t)L_21) < ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_22 = V_2;
if (L_22)
{
goto IL_00cd;
}
}
{
NetConnection_t3331492029 * L_23 = ((NetReceiverChannelBase_t908288882 *)__this)->get_m_connection_1();
NullCheck(L_23);
NetConnectionStatistics_t1235765202 * L_24 = L_23->get_m_statistics_14();
NullCheck(L_24);
NetConnectionStatistics_MessageDropped_m4117327218(L_24, /*hidden argument*/NULL);
NetPeer_t1779390221 * L_25 = ((NetReceiverChannelBase_t908288882 *)__this)->get_m_peer_0();
NetIncomingMessage_t2014089816 * L_26 = ___message0;
NullCheck(L_26);
int32_t L_27 = L_26->get_m_sequenceNumber_8();
int32_t L_28 = L_27;
Il2CppObject * L_29 = Box(Int32_t2071877448_il2cpp_TypeInfo_var, &L_28);
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_30 = String_Concat_m2000667605(NULL /*static, unused*/, _stringLiteral2279591503, L_29, _stringLiteral2486397350, /*hidden argument*/NULL);
NullCheck(L_25);
NetPeer_LogVerbose_m3434660420(L_25, L_30, /*hidden argument*/NULL);
goto IL_01af;
}
IL_00cd:
{
int32_t L_31 = V_0;
int32_t L_32 = __this->get_m_windowSize_3();
V_2 = (bool)((((int32_t)((((int32_t)L_31) > ((int32_t)L_32))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_33 = V_2;
if (L_33)
{
goto IL_012f;
}
}
{
NetConnection_t3331492029 * L_34 = ((NetReceiverChannelBase_t908288882 *)__this)->get_m_connection_1();
NullCheck(L_34);
NetConnectionStatistics_t1235765202 * L_35 = L_34->get_m_statistics_14();
NullCheck(L_35);
NetConnectionStatistics_MessageDropped_m4117327218(L_35, /*hidden argument*/NULL);
NetPeer_t1779390221 * L_36 = ((NetReceiverChannelBase_t908288882 *)__this)->get_m_peer_0();
V_3 = ((ObjectU5BU5D_t3614634134*)SZArrayNew(ObjectU5BU5D_t3614634134_il2cpp_TypeInfo_var, (uint32_t)4));
ObjectU5BU5D_t3614634134* L_37 = V_3;
NullCheck(L_37);
IL2CPP_ARRAY_BOUNDS_CHECK(L_37, 0);
ArrayElementTypeCheck (L_37, _stringLiteral1174327339);
(L_37)->SetAt(static_cast<il2cpp_array_size_t>(0), (Il2CppObject *)_stringLiteral1174327339);
ObjectU5BU5D_t3614634134* L_38 = V_3;
NetIncomingMessage_t2014089816 * L_39 = ___message0;
NullCheck(L_38);
IL2CPP_ARRAY_BOUNDS_CHECK(L_38, 1);
ArrayElementTypeCheck (L_38, L_39);
(L_38)->SetAt(static_cast<il2cpp_array_size_t>(1), (Il2CppObject *)L_39);
ObjectU5BU5D_t3614634134* L_40 = V_3;
NullCheck(L_40);
IL2CPP_ARRAY_BOUNDS_CHECK(L_40, 2);
ArrayElementTypeCheck (L_40, _stringLiteral1925410982);
(L_40)->SetAt(static_cast<il2cpp_array_size_t>(2), (Il2CppObject *)_stringLiteral1925410982);
ObjectU5BU5D_t3614634134* L_41 = V_3;
int32_t L_42 = __this->get_m_windowStart_2();
int32_t L_43 = L_42;
Il2CppObject * L_44 = Box(Int32_t2071877448_il2cpp_TypeInfo_var, &L_43);
NullCheck(L_41);
IL2CPP_ARRAY_BOUNDS_CHECK(L_41, 3);
ArrayElementTypeCheck (L_41, L_44);
(L_41)->SetAt(static_cast<il2cpp_array_size_t>(3), (Il2CppObject *)L_44);
ObjectU5BU5D_t3614634134* L_45 = V_3;
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_46 = String_Concat_m3881798623(NULL /*static, unused*/, L_45, /*hidden argument*/NULL);
NullCheck(L_36);
NetPeer_LogDebug_m2983960595(L_36, L_46, /*hidden argument*/NULL);
goto IL_01af;
}
IL_012f:
{
NetBitVector_t1774780753 * L_47 = __this->get_m_earlyReceived_4();
NetIncomingMessage_t2014089816 * L_48 = ___message0;
NullCheck(L_48);
int32_t L_49 = L_48->get_m_sequenceNumber_8();
int32_t L_50 = __this->get_m_windowSize_3();
NullCheck(L_47);
bool L_51 = NetBitVector_Get_m2410185427(L_47, ((int32_t)((int32_t)L_49%(int32_t)L_50)), /*hidden argument*/NULL);
V_2 = (bool)((((int32_t)L_51) == ((int32_t)0))? 1 : 0);
bool L_52 = V_2;
if (L_52)
{
goto IL_0188;
}
}
{
NetConnection_t3331492029 * L_53 = ((NetReceiverChannelBase_t908288882 *)__this)->get_m_connection_1();
NullCheck(L_53);
NetConnectionStatistics_t1235765202 * L_54 = L_53->get_m_statistics_14();
NullCheck(L_54);
NetConnectionStatistics_MessageDropped_m4117327218(L_54, /*hidden argument*/NULL);
NetPeer_t1779390221 * L_55 = ((NetReceiverChannelBase_t908288882 *)__this)->get_m_peer_0();
NetIncomingMessage_t2014089816 * L_56 = ___message0;
NullCheck(L_56);
int32_t L_57 = L_56->get_m_sequenceNumber_8();
int32_t L_58 = L_57;
Il2CppObject * L_59 = Box(Int32_t2071877448_il2cpp_TypeInfo_var, &L_58);
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_60 = String_Concat_m2000667605(NULL /*static, unused*/, _stringLiteral2279591503, L_59, _stringLiteral2486397350, /*hidden argument*/NULL);
NullCheck(L_55);
NetPeer_LogVerbose_m3434660420(L_55, L_60, /*hidden argument*/NULL);
goto IL_01af;
}
IL_0188:
{
NetBitVector_t1774780753 * L_61 = __this->get_m_earlyReceived_4();
NetIncomingMessage_t2014089816 * L_62 = ___message0;
NullCheck(L_62);
int32_t L_63 = L_62->get_m_sequenceNumber_8();
int32_t L_64 = __this->get_m_windowSize_3();
NullCheck(L_61);
NetBitVector_Set_m2669921130(L_61, ((int32_t)((int32_t)L_63%(int32_t)L_64)), (bool)1, /*hidden argument*/NULL);
NetPeer_t1779390221 * L_65 = ((NetReceiverChannelBase_t908288882 *)__this)->get_m_peer_0();
NetIncomingMessage_t2014089816 * L_66 = ___message0;
NullCheck(L_65);
NetPeer_ReleaseMessage_m3520648965(L_65, L_66, /*hidden argument*/NULL);
}
IL_01af:
{
return;
}
}
// System.Int32 Lidgren.Network.NetSenderChannelBase::get_QueuedSendsCount()
extern const MethodInfo* NetQueue_1_get_Count_m685192943_MethodInfo_var;
extern const uint32_t NetSenderChannelBase_get_QueuedSendsCount_m1530659097_MetadataUsageId;
extern "C" int32_t NetSenderChannelBase_get_QueuedSendsCount_m1530659097 (NetSenderChannelBase_t3096690204 * __this, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetSenderChannelBase_get_QueuedSendsCount_m1530659097_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
int32_t V_0 = 0;
{
NetQueue_1_t4233233666 * L_0 = __this->get_m_queuedSends_0();
NullCheck(L_0);
int32_t L_1 = NetQueue_1_get_Count_m685192943(L_0, /*hidden argument*/NetQueue_1_get_Count_m685192943_MethodInfo_var);
V_0 = L_1;
goto IL_000f;
}
IL_000f:
{
int32_t L_2 = V_0;
return L_2;
}
}
// System.Boolean Lidgren.Network.NetSenderChannelBase::NeedToSendMessages()
extern const MethodInfo* NetQueue_1_get_Count_m685192943_MethodInfo_var;
extern const uint32_t NetSenderChannelBase_NeedToSendMessages_m2902542338_MetadataUsageId;
extern "C" bool NetSenderChannelBase_NeedToSendMessages_m2902542338 (NetSenderChannelBase_t3096690204 * __this, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetSenderChannelBase_NeedToSendMessages_m2902542338_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
bool V_0 = false;
{
NetQueue_1_t4233233666 * L_0 = __this->get_m_queuedSends_0();
NullCheck(L_0);
int32_t L_1 = NetQueue_1_get_Count_m685192943(L_0, /*hidden argument*/NetQueue_1_get_Count_m685192943_MethodInfo_var);
V_0 = (bool)((((int32_t)L_1) > ((int32_t)0))? 1 : 0);
goto IL_0012;
}
IL_0012:
{
bool L_2 = V_0;
return L_2;
}
}
// System.Void Lidgren.Network.NetSenderChannelBase::.ctor()
extern "C" void NetSenderChannelBase__ctor_m1977648499 (NetSenderChannelBase_t3096690204 * __this, const MethodInfo* method)
{
{
Object__ctor_m2551263788(__this, /*hidden argument*/NULL);
return;
}
}
// System.Void Lidgren.Network.NetStoredReliableMessage::Reset()
extern "C" void NetStoredReliableMessage_Reset_m441337071 (NetStoredReliableMessage_t1576378473 * __this, const MethodInfo* method)
{
{
__this->set_NumSent_0(0);
__this->set_LastSent_1((0.0));
__this->set_Message_2((NetOutgoingMessage_t2016542980 *)NULL);
return;
}
}
extern "C" void NetStoredReliableMessage_Reset_m441337071_AdjustorThunk (Il2CppObject * __this, const MethodInfo* method)
{
NetStoredReliableMessage_t1576378473 * _thisAdjusted = reinterpret_cast<NetStoredReliableMessage_t1576378473 *>(__this + 1);
NetStoredReliableMessage_Reset_m441337071(_thisAdjusted, method);
}
// Conversion methods for marshalling of: Lidgren.Network.NetStoredReliableMessage
extern "C" void NetStoredReliableMessage_t1576378473_marshal_pinvoke(const NetStoredReliableMessage_t1576378473& unmarshaled, NetStoredReliableMessage_t1576378473_marshaled_pinvoke& marshaled)
{
Il2CppCodeGenException* ___Message_2Exception = il2cpp_codegen_get_marshal_directive_exception("Cannot marshal field 'Message' of type 'NetStoredReliableMessage': Reference type field marshaling is not supported.");
IL2CPP_RAISE_MANAGED_EXCEPTION(___Message_2Exception);
}
extern "C" void NetStoredReliableMessage_t1576378473_marshal_pinvoke_back(const NetStoredReliableMessage_t1576378473_marshaled_pinvoke& marshaled, NetStoredReliableMessage_t1576378473& unmarshaled)
{
Il2CppCodeGenException* ___Message_2Exception = il2cpp_codegen_get_marshal_directive_exception("Cannot marshal field 'Message' of type 'NetStoredReliableMessage': Reference type field marshaling is not supported.");
IL2CPP_RAISE_MANAGED_EXCEPTION(___Message_2Exception);
}
// Conversion method for clean up from marshalling of: Lidgren.Network.NetStoredReliableMessage
extern "C" void NetStoredReliableMessage_t1576378473_marshal_pinvoke_cleanup(NetStoredReliableMessage_t1576378473_marshaled_pinvoke& marshaled)
{
}
// Conversion methods for marshalling of: Lidgren.Network.NetStoredReliableMessage
extern "C" void NetStoredReliableMessage_t1576378473_marshal_com(const NetStoredReliableMessage_t1576378473& unmarshaled, NetStoredReliableMessage_t1576378473_marshaled_com& marshaled)
{
Il2CppCodeGenException* ___Message_2Exception = il2cpp_codegen_get_marshal_directive_exception("Cannot marshal field 'Message' of type 'NetStoredReliableMessage': Reference type field marshaling is not supported.");
IL2CPP_RAISE_MANAGED_EXCEPTION(___Message_2Exception);
}
extern "C" void NetStoredReliableMessage_t1576378473_marshal_com_back(const NetStoredReliableMessage_t1576378473_marshaled_com& marshaled, NetStoredReliableMessage_t1576378473& unmarshaled)
{
Il2CppCodeGenException* ___Message_2Exception = il2cpp_codegen_get_marshal_directive_exception("Cannot marshal field 'Message' of type 'NetStoredReliableMessage': Reference type field marshaling is not supported.");
IL2CPP_RAISE_MANAGED_EXCEPTION(___Message_2Exception);
}
// Conversion method for clean up from marshalling of: Lidgren.Network.NetStoredReliableMessage
extern "C" void NetStoredReliableMessage_t1576378473_marshal_com_cleanup(NetStoredReliableMessage_t1576378473_marshaled_com& marshaled)
{
}
// System.String Lidgren.Network.NetTime::ToReadable(System.Double)
extern Il2CppClass* TimeSpan_t3430258949_il2cpp_TypeInfo_var;
extern Il2CppClass* String_t_il2cpp_TypeInfo_var;
extern Il2CppCodeGenString* _stringLiteral3231012734;
extern Il2CppCodeGenString* _stringLiteral2665395774;
extern const uint32_t NetTime_ToReadable_m2326980775_MetadataUsageId;
extern "C" String_t* NetTime_ToReadable_m2326980775 (Il2CppObject * __this /* static, unused */, double ___seconds0, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetTime_ToReadable_m2326980775_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
String_t* V_0 = NULL;
bool V_1 = false;
TimeSpan_t3430258949 V_2;
memset(&V_2, 0, sizeof(V_2));
double V_3 = 0.0;
{
double L_0 = ___seconds0;
V_1 = (bool)((((int32_t)((((double)L_0) > ((double)(60.0)))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_1 = V_1;
if (L_1)
{
goto IL_002b;
}
}
{
double L_2 = ___seconds0;
IL2CPP_RUNTIME_CLASS_INIT(TimeSpan_t3430258949_il2cpp_TypeInfo_var);
TimeSpan_t3430258949 L_3 = TimeSpan_FromSeconds_m2861206200(NULL /*static, unused*/, L_2, /*hidden argument*/NULL);
V_2 = L_3;
String_t* L_4 = TimeSpan_ToString_m2947282901((&V_2), /*hidden argument*/NULL);
V_0 = L_4;
goto IL_0050;
}
IL_002b:
{
double L_5 = ___seconds0;
V_3 = ((double)((double)L_5*(double)(1000.0)));
String_t* L_6 = Double_ToString_m2210043919((&V_3), _stringLiteral3231012734, /*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_7 = String_Concat_m2596409543(NULL /*static, unused*/, L_6, _stringLiteral2665395774, /*hidden argument*/NULL);
V_0 = L_7;
goto IL_0050;
}
IL_0050:
{
String_t* L_8 = V_0;
return L_8;
}
}
// System.Double Lidgren.Network.NetTime::get_Now()
extern Il2CppClass* Stopwatch_t1380178105_il2cpp_TypeInfo_var;
extern Il2CppClass* NetTime_t3056501352_il2cpp_TypeInfo_var;
extern const uint32_t NetTime_get_Now_m1609702533_MetadataUsageId;
extern "C" double NetTime_get_Now_m1609702533 (Il2CppObject * __this /* static, unused */, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetTime_get_Now_m1609702533_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
double V_0 = 0.0;
{
IL2CPP_RUNTIME_CLASS_INIT(Stopwatch_t1380178105_il2cpp_TypeInfo_var);
int64_t L_0 = Stopwatch_GetTimestamp_m4156329811(NULL /*static, unused*/, /*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(NetTime_t3056501352_il2cpp_TypeInfo_var);
int64_t L_1 = ((NetTime_t3056501352_StaticFields*)NetTime_t3056501352_il2cpp_TypeInfo_var->static_fields)->get_s_timeInitialized_0();
double L_2 = ((NetTime_t3056501352_StaticFields*)NetTime_t3056501352_il2cpp_TypeInfo_var->static_fields)->get_s_dInvFreq_1();
V_0 = ((double)((double)(((double)((double)((int64_t)((int64_t)L_0-(int64_t)L_1)))))*(double)L_2));
goto IL_0016;
}
IL_0016:
{
double L_3 = V_0;
return L_3;
}
}
// System.Void Lidgren.Network.NetTime::.cctor()
extern Il2CppClass* Stopwatch_t1380178105_il2cpp_TypeInfo_var;
extern Il2CppClass* NetTime_t3056501352_il2cpp_TypeInfo_var;
extern const uint32_t NetTime__cctor_m2887513798_MetadataUsageId;
extern "C" void NetTime__cctor_m2887513798 (Il2CppObject * __this /* static, unused */, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetTime__cctor_m2887513798_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
{
IL2CPP_RUNTIME_CLASS_INIT(Stopwatch_t1380178105_il2cpp_TypeInfo_var);
int64_t L_0 = Stopwatch_GetTimestamp_m4156329811(NULL /*static, unused*/, /*hidden argument*/NULL);
((NetTime_t3056501352_StaticFields*)NetTime_t3056501352_il2cpp_TypeInfo_var->static_fields)->set_s_timeInitialized_0(L_0);
int64_t L_1 = ((Stopwatch_t1380178105_StaticFields*)Stopwatch_t1380178105_il2cpp_TypeInfo_var->static_fields)->get_Frequency_0();
((NetTime_t3056501352_StaticFields*)NetTime_t3056501352_il2cpp_TypeInfo_var->static_fields)->set_s_dInvFreq_1(((double)((double)(1.0)/(double)(((double)((double)L_1))))));
return;
}
}
// System.Void Lidgren.Network.NetUnreliableSenderChannel::.ctor(Lidgren.Network.NetConnection,System.Int32,Lidgren.Network.NetDeliveryMethod)
extern Il2CppClass* NetBitVector_t1774780753_il2cpp_TypeInfo_var;
extern Il2CppClass* NetQueue_1_t4233233666_il2cpp_TypeInfo_var;
extern const MethodInfo* NetQueue_1__ctor_m2411511422_MethodInfo_var;
extern const uint32_t NetUnreliableSenderChannel__ctor_m2332360361_MetadataUsageId;
extern "C" void NetUnreliableSenderChannel__ctor_m2332360361 (NetUnreliableSenderChannel_t1909769502 * __this, NetConnection_t3331492029 * ___connection0, int32_t ___windowSize1, uint8_t ___method2, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetUnreliableSenderChannel__ctor_m2332360361_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
bool V_0 = false;
int32_t G_B3_0 = 0;
{
NetSenderChannelBase__ctor_m1977648499(__this, /*hidden argument*/NULL);
NetConnection_t3331492029 * L_0 = ___connection0;
__this->set_m_connection_1(L_0);
int32_t L_1 = ___windowSize1;
__this->set_m_windowSize_3(L_1);
__this->set_m_windowStart_2(0);
__this->set_m_sendStart_4(0);
NetBitVector_t1774780753 * L_2 = (NetBitVector_t1774780753 *)il2cpp_codegen_object_new(NetBitVector_t1774780753_il2cpp_TypeInfo_var);
NetBitVector__ctor_m1517128273(L_2, ((int32_t)1024), /*hidden argument*/NULL);
__this->set_m_receivedAcks_6(L_2);
NetQueue_1_t4233233666 * L_3 = (NetQueue_1_t4233233666 *)il2cpp_codegen_object_new(NetQueue_1_t4233233666_il2cpp_TypeInfo_var);
NetQueue_1__ctor_m2411511422(L_3, 8, /*hidden argument*/NetQueue_1__ctor_m2411511422_MethodInfo_var);
((NetSenderChannelBase_t3096690204 *)__this)->set_m_queuedSends_0(L_3);
__this->set_m_doFlowControl_5((bool)1);
uint8_t L_4 = ___method2;
if ((!(((uint32_t)L_4) == ((uint32_t)1))))
{
goto IL_0060;
}
}
{
NetConnection_t3331492029 * L_5 = ___connection0;
NullCheck(L_5);
NetPeer_t1779390221 * L_6 = NetConnection_get_Peer_m784846870(L_5, /*hidden argument*/NULL);
NullCheck(L_6);
NetPeerConfiguration_t136603591 * L_7 = NetPeer_get_Configuration_m323836264(L_6, /*hidden argument*/NULL);
NullCheck(L_7);
bool L_8 = NetPeerConfiguration_get_SuppressUnreliableUnorderedAcks_m1255305261(L_7, /*hidden argument*/NULL);
G_B3_0 = ((((int32_t)L_8) == ((int32_t)0))? 1 : 0);
goto IL_0061;
}
IL_0060:
{
G_B3_0 = 1;
}
IL_0061:
{
V_0 = (bool)G_B3_0;
bool L_9 = V_0;
if (L_9)
{
goto IL_006d;
}
}
{
__this->set_m_doFlowControl_5((bool)0);
}
IL_006d:
{
return;
}
}
// System.Int32 Lidgren.Network.NetUnreliableSenderChannel::GetAllowedSends()
extern "C" int32_t NetUnreliableSenderChannel_GetAllowedSends_m4022653188 (NetUnreliableSenderChannel_t1909769502 * __this, const MethodInfo* method)
{
int32_t V_0 = 0;
int32_t V_1 = 0;
bool V_2 = false;
int32_t G_B5_0 = 0;
{
bool L_0 = __this->get_m_doFlowControl_5();
V_2 = L_0;
bool L_1 = V_2;
if (L_1)
{
goto IL_000f;
}
}
{
V_1 = 2;
goto IL_004f;
}
IL_000f:
{
int32_t L_2 = __this->get_m_windowSize_3();
int32_t L_3 = __this->get_m_sendStart_4();
int32_t L_4 = __this->get_m_windowStart_2();
int32_t L_5 = __this->get_m_windowSize_3();
V_0 = ((int32_t)((int32_t)L_2-(int32_t)((int32_t)((int32_t)((int32_t)((int32_t)((int32_t)((int32_t)L_3+(int32_t)((int32_t)1024)))-(int32_t)L_4))%(int32_t)L_5))));
int32_t L_6 = V_0;
if ((((int32_t)L_6) < ((int32_t)0)))
{
goto IL_0043;
}
}
{
int32_t L_7 = V_0;
int32_t L_8 = __this->get_m_windowSize_3();
G_B5_0 = ((((int32_t)((((int32_t)L_7) > ((int32_t)L_8))? 1 : 0)) == ((int32_t)0))? 1 : 0);
goto IL_0044;
}
IL_0043:
{
G_B5_0 = 0;
}
IL_0044:
{
NetException_Assert_m1426298558(NULL /*static, unused*/, (bool)G_B5_0, /*hidden argument*/NULL);
int32_t L_9 = V_0;
V_1 = L_9;
goto IL_004f;
}
IL_004f:
{
int32_t L_10 = V_1;
return L_10;
}
}
// System.Void Lidgren.Network.NetUnreliableSenderChannel::Reset()
extern const MethodInfo* NetQueue_1_Clear_m2534478962_MethodInfo_var;
extern const uint32_t NetUnreliableSenderChannel_Reset_m2705274180_MetadataUsageId;
extern "C" void NetUnreliableSenderChannel_Reset_m2705274180 (NetUnreliableSenderChannel_t1909769502 * __this, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetUnreliableSenderChannel_Reset_m2705274180_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
{
NetBitVector_t1774780753 * L_0 = __this->get_m_receivedAcks_6();
NullCheck(L_0);
NetBitVector_Clear_m3351354433(L_0, /*hidden argument*/NULL);
NetQueue_1_t4233233666 * L_1 = ((NetSenderChannelBase_t3096690204 *)__this)->get_m_queuedSends_0();
NullCheck(L_1);
NetQueue_1_Clear_m2534478962(L_1, /*hidden argument*/NetQueue_1_Clear_m2534478962_MethodInfo_var);
__this->set_m_windowStart_2(0);
__this->set_m_sendStart_4(0);
return;
}
}
// Lidgren.Network.NetSendResult Lidgren.Network.NetUnreliableSenderChannel::Enqueue(Lidgren.Network.NetOutgoingMessage)
extern const MethodInfo* NetQueue_1_get_Count_m685192943_MethodInfo_var;
extern const MethodInfo* NetQueue_1_Enqueue_m3616763713_MethodInfo_var;
extern const uint32_t NetUnreliableSenderChannel_Enqueue_m3305376402_MetadataUsageId;
extern "C" int32_t NetUnreliableSenderChannel_Enqueue_m3305376402 (NetUnreliableSenderChannel_t1909769502 * __this, NetOutgoingMessage_t2016542980 * ___message0, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetUnreliableSenderChannel_Enqueue_m3305376402_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
int32_t V_0 = 0;
int32_t V_1 = 0;
int32_t V_2 = 0;
bool V_3 = false;
int32_t G_B4_0 = 0;
int32_t G_B6_0 = 0;
{
NetQueue_1_t4233233666 * L_0 = ((NetSenderChannelBase_t3096690204 *)__this)->get_m_queuedSends_0();
NullCheck(L_0);
int32_t L_1 = NetQueue_1_get_Count_m685192943(L_0, /*hidden argument*/NetQueue_1_get_Count_m685192943_MethodInfo_var);
V_0 = ((int32_t)((int32_t)L_1+(int32_t)1));
int32_t L_2 = VirtFuncInvoker0< int32_t >::Invoke(4 /* System.Int32 Lidgren.Network.NetSenderChannelBase::GetAllowedSends() */, __this);
V_1 = L_2;
int32_t L_3 = V_0;
int32_t L_4 = V_1;
if ((((int32_t)L_3) > ((int32_t)L_4)))
{
goto IL_0049;
}
}
{
NetOutgoingMessage_t2016542980 * L_5 = ___message0;
NullCheck(L_5);
int32_t L_6 = NetBuffer_get_LengthBytes_m2765088638(L_5, /*hidden argument*/NULL);
NetConnection_t3331492029 * L_7 = __this->get_m_connection_1();
NullCheck(L_7);
int32_t L_8 = L_7->get_m_currentMTU_34();
if ((((int32_t)L_6) <= ((int32_t)L_8)))
{
goto IL_0045;
}
}
{
NetConnection_t3331492029 * L_9 = __this->get_m_connection_1();
NullCheck(L_9);
NetPeerConfiguration_t136603591 * L_10 = L_9->get_m_peerConfiguration_1();
NullCheck(L_10);
int32_t L_11 = NetPeerConfiguration_get_UnreliableSizeBehaviour_m2649350738(L_10, /*hidden argument*/NULL);
G_B4_0 = ((((int32_t)((((int32_t)L_11) == ((int32_t)2))? 1 : 0)) == ((int32_t)0))? 1 : 0);
goto IL_0046;
}
IL_0045:
{
G_B4_0 = 1;
}
IL_0046:
{
G_B6_0 = G_B4_0;
goto IL_004a;
}
IL_0049:
{
G_B6_0 = 0;
}
IL_004a:
{
V_3 = (bool)G_B6_0;
bool L_12 = V_3;
if (L_12)
{
goto IL_0054;
}
}
{
V_2 = 3;
goto IL_0076;
}
IL_0054:
{
NetQueue_1_t4233233666 * L_13 = ((NetSenderChannelBase_t3096690204 *)__this)->get_m_queuedSends_0();
NetOutgoingMessage_t2016542980 * L_14 = ___message0;
NullCheck(L_13);
NetQueue_1_Enqueue_m3616763713(L_13, L_14, /*hidden argument*/NetQueue_1_Enqueue_m3616763713_MethodInfo_var);
NetConnection_t3331492029 * L_15 = __this->get_m_connection_1();
NullCheck(L_15);
NetPeer_t1779390221 * L_16 = L_15->get_m_peer_0();
NullCheck(L_16);
L_16->set_m_needFlushSendQueue_20((bool)1);
V_2 = 1;
goto IL_0076;
}
IL_0076:
{
int32_t L_17 = V_2;
return L_17;
}
}
// System.Void Lidgren.Network.NetUnreliableSenderChannel::SendQueuedMessages(System.Double)
extern const MethodInfo* NetQueue_1_TryDequeue_m592441308_MethodInfo_var;
extern const MethodInfo* NetQueue_1_get_Count_m685192943_MethodInfo_var;
extern const uint32_t NetUnreliableSenderChannel_SendQueuedMessages_m1720590766_MetadataUsageId;
extern "C" void NetUnreliableSenderChannel_SendQueuedMessages_m1720590766 (NetUnreliableSenderChannel_t1909769502 * __this, double ___now0, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetUnreliableSenderChannel_SendQueuedMessages_m1720590766_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
int32_t V_0 = 0;
NetOutgoingMessage_t2016542980 * V_1 = NULL;
bool V_2 = false;
int32_t G_B9_0 = 0;
{
int32_t L_0 = VirtFuncInvoker0< int32_t >::Invoke(4 /* System.Int32 Lidgren.Network.NetSenderChannelBase::GetAllowedSends() */, __this);
V_0 = L_0;
int32_t L_1 = V_0;
V_2 = (bool)((((int32_t)((((int32_t)L_1) < ((int32_t)1))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_2 = V_2;
if (L_2)
{
goto IL_0015;
}
}
{
goto IL_0053;
}
IL_0015:
{
goto IL_0039;
}
IL_0017:
{
NetQueue_1_t4233233666 * L_3 = ((NetSenderChannelBase_t3096690204 *)__this)->get_m_queuedSends_0();
NullCheck(L_3);
bool L_4 = NetQueue_1_TryDequeue_m592441308(L_3, (&V_1), /*hidden argument*/NetQueue_1_TryDequeue_m592441308_MethodInfo_var);
V_2 = (bool)((((int32_t)L_4) == ((int32_t)0))? 1 : 0);
bool L_5 = V_2;
if (L_5)
{
goto IL_0034;
}
}
{
NetOutgoingMessage_t2016542980 * L_6 = V_1;
NetUnreliableSenderChannel_ExecuteSend_m3640853513(__this, L_6, /*hidden argument*/NULL);
}
IL_0034:
{
int32_t L_7 = V_0;
V_0 = ((int32_t)((int32_t)L_7-(int32_t)1));
}
IL_0039:
{
int32_t L_8 = V_0;
if ((((int32_t)L_8) <= ((int32_t)0)))
{
goto IL_004d;
}
}
{
NetQueue_1_t4233233666 * L_9 = ((NetSenderChannelBase_t3096690204 *)__this)->get_m_queuedSends_0();
NullCheck(L_9);
int32_t L_10 = NetQueue_1_get_Count_m685192943(L_9, /*hidden argument*/NetQueue_1_get_Count_m685192943_MethodInfo_var);
G_B9_0 = ((((int32_t)L_10) > ((int32_t)0))? 1 : 0);
goto IL_004e;
}
IL_004d:
{
G_B9_0 = 0;
}
IL_004e:
{
V_2 = (bool)G_B9_0;
bool L_11 = V_2;
if (L_11)
{
goto IL_0017;
}
}
IL_0053:
{
return;
}
}
// System.Void Lidgren.Network.NetUnreliableSenderChannel::ExecuteSend(Lidgren.Network.NetOutgoingMessage)
extern "C" void NetUnreliableSenderChannel_ExecuteSend_m3640853513 (NetUnreliableSenderChannel_t1909769502 * __this, NetOutgoingMessage_t2016542980 * ___message0, const MethodInfo* method)
{
int32_t V_0 = 0;
bool V_1 = false;
{
NetConnection_t3331492029 * L_0 = __this->get_m_connection_1();
NullCheck(L_0);
NetPeer_t1779390221 * L_1 = L_0->get_m_peer_0();
NullCheck(L_1);
NetPeer_VerifyNetworkThread_m4075953563(L_1, /*hidden argument*/NULL);
int32_t L_2 = __this->get_m_sendStart_4();
V_0 = L_2;
int32_t L_3 = __this->get_m_sendStart_4();
__this->set_m_sendStart_4(((int32_t)((int32_t)((int32_t)((int32_t)L_3+(int32_t)1))%(int32_t)((int32_t)1024))));
NetConnection_t3331492029 * L_4 = __this->get_m_connection_1();
NetOutgoingMessage_t2016542980 * L_5 = ___message0;
int32_t L_6 = V_0;
NullCheck(L_4);
NetConnection_QueueSendMessage_m496824802(L_4, L_5, L_6, /*hidden argument*/NULL);
NetOutgoingMessage_t2016542980 * L_7 = ___message0;
NullCheck(L_7);
int32_t L_8 = L_7->get_m_recyclingCount_7();
V_1 = (bool)((((int32_t)L_8) > ((int32_t)0))? 1 : 0);
bool L_9 = V_1;
if (L_9)
{
goto IL_005a;
}
}
{
NetConnection_t3331492029 * L_10 = __this->get_m_connection_1();
NullCheck(L_10);
NetPeer_t1779390221 * L_11 = L_10->get_m_peer_0();
NetOutgoingMessage_t2016542980 * L_12 = ___message0;
NullCheck(L_11);
NetPeer_Recycle_m2290156780(L_11, L_12, /*hidden argument*/NULL);
}
IL_005a:
{
goto IL_005c;
}
IL_005c:
{
return;
}
}
// System.Void Lidgren.Network.NetUnreliableSenderChannel::ReceiveAcknowledge(System.Double,System.Int32)
extern Il2CppClass* NetUtility_t3562260209_il2cpp_TypeInfo_var;
extern Il2CppCodeGenString* _stringLiteral1987345686;
extern const uint32_t NetUnreliableSenderChannel_ReceiveAcknowledge_m3887587101_MetadataUsageId;
extern "C" void NetUnreliableSenderChannel_ReceiveAcknowledge_m3887587101 (NetUnreliableSenderChannel_t1909769502 * __this, double ___now0, int32_t ___seqNr1, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetUnreliableSenderChannel_ReceiveAcknowledge_m3887587101_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
int32_t V_0 = 0;
bool V_1 = false;
{
bool L_0 = __this->get_m_doFlowControl_5();
V_1 = L_0;
bool L_1 = V_1;
if (L_1)
{
goto IL_0027;
}
}
{
NetConnection_t3331492029 * L_2 = __this->get_m_connection_1();
NullCheck(L_2);
NetPeer_t1779390221 * L_3 = L_2->get_m_peer_0();
NullCheck(L_3);
NetPeer_LogWarning_m3266657906(L_3, _stringLiteral1987345686, /*hidden argument*/NULL);
goto IL_00d2;
}
IL_0027:
{
int32_t L_4 = ___seqNr1;
int32_t L_5 = __this->get_m_windowStart_2();
IL2CPP_RUNTIME_CLASS_INIT(NetUtility_t3562260209_il2cpp_TypeInfo_var);
int32_t L_6 = NetUtility_RelativeSequenceNumber_m1713083748(NULL /*static, unused*/, L_4, L_5, /*hidden argument*/NULL);
V_0 = L_6;
int32_t L_7 = V_0;
V_1 = (bool)((((int32_t)((((int32_t)L_7) < ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_8 = V_1;
if (L_8)
{
goto IL_0045;
}
}
{
goto IL_00d2;
}
IL_0045:
{
int32_t L_9 = V_0;
V_1 = (bool)((((int32_t)((((int32_t)L_9) == ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_10 = V_1;
if (L_10)
{
goto IL_0089;
}
}
{
int32_t L_11 = ___seqNr1;
int32_t L_12 = __this->get_m_windowStart_2();
NetException_Assert_m1426298558(NULL /*static, unused*/, (bool)((((int32_t)L_11) == ((int32_t)L_12))? 1 : 0), /*hidden argument*/NULL);
NetBitVector_t1774780753 * L_13 = __this->get_m_receivedAcks_6();
int32_t L_14 = __this->get_m_windowStart_2();
NullCheck(L_13);
NetBitVector_set_Bit_m3149930918(L_13, L_14, (bool)0, /*hidden argument*/NULL);
int32_t L_15 = __this->get_m_windowStart_2();
__this->set_m_windowStart_2(((int32_t)((int32_t)((int32_t)((int32_t)L_15+(int32_t)1))%(int32_t)((int32_t)1024))));
goto IL_00d2;
}
IL_0089:
{
NetBitVector_t1774780753 * L_16 = __this->get_m_receivedAcks_6();
int32_t L_17 = ___seqNr1;
NullCheck(L_16);
NetBitVector_set_Bit_m3149930918(L_16, L_17, (bool)1, /*hidden argument*/NULL);
goto IL_00c2;
}
IL_0099:
{
NetBitVector_t1774780753 * L_18 = __this->get_m_receivedAcks_6();
int32_t L_19 = __this->get_m_windowStart_2();
NullCheck(L_18);
NetBitVector_set_Bit_m3149930918(L_18, L_19, (bool)0, /*hidden argument*/NULL);
int32_t L_20 = __this->get_m_windowStart_2();
__this->set_m_windowStart_2(((int32_t)((int32_t)((int32_t)((int32_t)L_20+(int32_t)1))%(int32_t)((int32_t)1024))));
}
IL_00c2:
{
int32_t L_21 = __this->get_m_windowStart_2();
int32_t L_22 = ___seqNr1;
V_1 = (bool)((((int32_t)((((int32_t)L_21) == ((int32_t)L_22))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_23 = V_1;
if (L_23)
{
goto IL_0099;
}
}
IL_00d2:
{
return;
}
}
// System.Void Lidgren.Network.NetUnreliableSequencedReceiver::.ctor(Lidgren.Network.NetConnection)
extern "C" void NetUnreliableSequencedReceiver__ctor_m3415245671 (NetUnreliableSequencedReceiver_t2497601560 * __this, NetConnection_t3331492029 * ___connection0, const MethodInfo* method)
{
{
__this->set_m_lastReceivedSequenceNumber_2((-1));
NetConnection_t3331492029 * L_0 = ___connection0;
NetReceiverChannelBase__ctor_m892231457(__this, L_0, /*hidden argument*/NULL);
return;
}
}
// System.Void Lidgren.Network.NetUnreliableSequencedReceiver::ReceiveMessage(Lidgren.Network.NetIncomingMessage)
extern Il2CppClass* NetUtility_t3562260209_il2cpp_TypeInfo_var;
extern Il2CppClass* Int32_t2071877448_il2cpp_TypeInfo_var;
extern Il2CppClass* String_t_il2cpp_TypeInfo_var;
extern Il2CppCodeGenString* _stringLiteral2279591503;
extern Il2CppCodeGenString* _stringLiteral2486397350;
extern const uint32_t NetUnreliableSequencedReceiver_ReceiveMessage_m1400670066_MetadataUsageId;
extern "C" void NetUnreliableSequencedReceiver_ReceiveMessage_m1400670066 (NetUnreliableSequencedReceiver_t2497601560 * __this, NetIncomingMessage_t2014089816 * ___msg0, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetUnreliableSequencedReceiver_ReceiveMessage_m1400670066_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
int32_t V_0 = 0;
int32_t V_1 = 0;
bool V_2 = false;
{
NetIncomingMessage_t2014089816 * L_0 = ___msg0;
NullCheck(L_0);
int32_t L_1 = L_0->get_m_sequenceNumber_8();
V_0 = L_1;
NetConnection_t3331492029 * L_2 = ((NetReceiverChannelBase_t908288882 *)__this)->get_m_connection_1();
NetIncomingMessage_t2014089816 * L_3 = ___msg0;
NullCheck(L_3);
uint8_t L_4 = L_3->get_m_receivedMessageType_9();
int32_t L_5 = V_0;
NullCheck(L_2);
NetConnection_QueueAck_m3101883724(L_2, L_4, L_5, /*hidden argument*/NULL);
int32_t L_6 = V_0;
int32_t L_7 = __this->get_m_lastReceivedSequenceNumber_2();
IL2CPP_RUNTIME_CLASS_INIT(NetUtility_t3562260209_il2cpp_TypeInfo_var);
int32_t L_8 = NetUtility_RelativeSequenceNumber_m1713083748(NULL /*static, unused*/, L_6, ((int32_t)((int32_t)L_7+(int32_t)1)), /*hidden argument*/NULL);
V_1 = L_8;
int32_t L_9 = V_1;
V_2 = (bool)((((int32_t)((((int32_t)L_9) < ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_10 = V_2;
if (L_10)
{
goto IL_006a;
}
}
{
NetConnection_t3331492029 * L_11 = ((NetReceiverChannelBase_t908288882 *)__this)->get_m_connection_1();
NullCheck(L_11);
NetConnectionStatistics_t1235765202 * L_12 = L_11->get_m_statistics_14();
NullCheck(L_12);
NetConnectionStatistics_MessageDropped_m4117327218(L_12, /*hidden argument*/NULL);
NetPeer_t1779390221 * L_13 = ((NetReceiverChannelBase_t908288882 *)__this)->get_m_peer_0();
int32_t L_14 = V_0;
int32_t L_15 = L_14;
Il2CppObject * L_16 = Box(Int32_t2071877448_il2cpp_TypeInfo_var, &L_15);
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_17 = String_Concat_m2000667605(NULL /*static, unused*/, _stringLiteral2279591503, L_16, _stringLiteral2486397350, /*hidden argument*/NULL);
NullCheck(L_13);
NetPeer_LogVerbose_m3434660420(L_13, L_17, /*hidden argument*/NULL);
goto IL_007e;
}
IL_006a:
{
int32_t L_18 = V_0;
__this->set_m_lastReceivedSequenceNumber_2(L_18);
NetPeer_t1779390221 * L_19 = ((NetReceiverChannelBase_t908288882 *)__this)->get_m_peer_0();
NetIncomingMessage_t2014089816 * L_20 = ___msg0;
NullCheck(L_19);
NetPeer_ReleaseMessage_m3520648965(L_19, L_20, /*hidden argument*/NULL);
}
IL_007e:
{
return;
}
}
// System.Void Lidgren.Network.NetUnreliableUnorderedReceiver::.ctor(Lidgren.Network.NetConnection)
extern "C" void NetUnreliableUnorderedReceiver__ctor_m3560667024 (NetUnreliableUnorderedReceiver_t3541921227 * __this, NetConnection_t3331492029 * ___connection0, const MethodInfo* method)
{
{
NetConnection_t3331492029 * L_0 = ___connection0;
NetReceiverChannelBase__ctor_m892231457(__this, L_0, /*hidden argument*/NULL);
NetConnection_t3331492029 * L_1 = ___connection0;
NullCheck(L_1);
NetPeer_t1779390221 * L_2 = NetConnection_get_Peer_m784846870(L_1, /*hidden argument*/NULL);
NullCheck(L_2);
NetPeerConfiguration_t136603591 * L_3 = NetPeer_get_Configuration_m323836264(L_2, /*hidden argument*/NULL);
NullCheck(L_3);
bool L_4 = NetPeerConfiguration_get_SuppressUnreliableUnorderedAcks_m1255305261(L_3, /*hidden argument*/NULL);
__this->set_m_doFlowControl_2((bool)((((int32_t)L_4) == ((int32_t)0))? 1 : 0));
return;
}
}
// System.Void Lidgren.Network.NetUnreliableUnorderedReceiver::ReceiveMessage(Lidgren.Network.NetIncomingMessage)
extern "C" void NetUnreliableUnorderedReceiver_ReceiveMessage_m3586422051 (NetUnreliableUnorderedReceiver_t3541921227 * __this, NetIncomingMessage_t2014089816 * ___msg0, const MethodInfo* method)
{
bool V_0 = false;
{
bool L_0 = __this->get_m_doFlowControl_2();
V_0 = (bool)((((int32_t)L_0) == ((int32_t)0))? 1 : 0);
bool L_1 = V_0;
if (L_1)
{
goto IL_0026;
}
}
{
NetConnection_t3331492029 * L_2 = ((NetReceiverChannelBase_t908288882 *)__this)->get_m_connection_1();
NetIncomingMessage_t2014089816 * L_3 = ___msg0;
NullCheck(L_3);
uint8_t L_4 = L_3->get_m_receivedMessageType_9();
NetIncomingMessage_t2014089816 * L_5 = ___msg0;
NullCheck(L_5);
int32_t L_6 = L_5->get_m_sequenceNumber_8();
NullCheck(L_2);
NetConnection_QueueAck_m3101883724(L_2, L_4, L_6, /*hidden argument*/NULL);
}
IL_0026:
{
NetPeer_t1779390221 * L_7 = ((NetReceiverChannelBase_t908288882 *)__this)->get_m_peer_0();
NetIncomingMessage_t2014089816 * L_8 = ___msg0;
NullCheck(L_7);
NetPeer_ReleaseMessage_m3520648965(L_7, L_8, /*hidden argument*/NULL);
return;
}
}
// System.Void Lidgren.Network.NetUPnP::.ctor(Lidgren.Network.NetPeer)
extern Il2CppClass* ManualResetEvent_t926074657_il2cpp_TypeInfo_var;
extern Il2CppCodeGenString* _stringLiteral371857150;
extern const uint32_t NetUPnP__ctor_m1248845477_MetadataUsageId;
extern "C" void NetUPnP__ctor_m1248845477 (NetUPnP_t2794379482 * __this, NetPeer_t1779390221 * ___peer0, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetUPnP__ctor_m1248845477_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
{
__this->set_m_serviceName_1(_stringLiteral371857150);
ManualResetEvent_t926074657 * L_0 = (ManualResetEvent_t926074657 *)il2cpp_codegen_object_new(ManualResetEvent_t926074657_il2cpp_TypeInfo_var);
ManualResetEvent__ctor_m3470249043(L_0, (bool)0, /*hidden argument*/NULL);
__this->set_m_discoveryComplete_3(L_0);
Object__ctor_m2551263788(__this, /*hidden argument*/NULL);
NetPeer_t1779390221 * L_1 = ___peer0;
__this->set_m_peer_2(L_1);
__this->set_m_discoveryResponseDeadline_4((-1.7976931348623157E+308));
return;
}
}
// System.Void Lidgren.Network.NetUPnP::Discover(Lidgren.Network.NetPeer)
extern Il2CppClass* NetTime_t3056501352_il2cpp_TypeInfo_var;
extern Il2CppClass* Encoding_t663144255_il2cpp_TypeInfo_var;
extern Il2CppClass* NetUtility_t3562260209_il2cpp_TypeInfo_var;
extern Il2CppClass* IPEndPoint_t2615413766_il2cpp_TypeInfo_var;
extern Il2CppCodeGenString* _stringLiteral2074731587;
extern Il2CppCodeGenString* _stringLiteral211677886;
extern const uint32_t NetUPnP_Discover_m2977051670_MetadataUsageId;
extern "C" void NetUPnP_Discover_m2977051670 (NetUPnP_t2794379482 * __this, NetPeer_t1779390221 * ___peer0, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetUPnP_Discover_m2977051670_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
String_t* V_0 = NULL;
ByteU5BU5D_t3397334013* V_1 = NULL;
{
V_0 = _stringLiteral2074731587;
IL2CPP_RUNTIME_CLASS_INIT(NetTime_t3056501352_il2cpp_TypeInfo_var);
double L_0 = NetTime_get_Now_m1609702533(NULL /*static, unused*/, /*hidden argument*/NULL);
__this->set_m_discoveryResponseDeadline_4(((double)((double)L_0+(double)(6.0))));
__this->set_m_status_5(0);
IL2CPP_RUNTIME_CLASS_INIT(Encoding_t663144255_il2cpp_TypeInfo_var);
Encoding_t663144255 * L_1 = Encoding_get_UTF8_m1752852937(NULL /*static, unused*/, /*hidden argument*/NULL);
String_t* L_2 = V_0;
NullCheck(L_1);
ByteU5BU5D_t3397334013* L_3 = VirtFuncInvoker1< ByteU5BU5D_t3397334013*, String_t* >::Invoke(10 /* System.Byte[] System.Text.Encoding::GetBytes(System.String) */, L_1, L_2);
V_1 = L_3;
NetPeer_t1779390221 * L_4 = __this->get_m_peer_2();
NullCheck(L_4);
NetPeer_LogDebug_m2983960595(L_4, _stringLiteral211677886, /*hidden argument*/NULL);
NetPeer_t1779390221 * L_5 = ___peer0;
NullCheck(L_5);
Socket_t3821512045 * L_6 = NetPeer_get_Socket_m1042619742(L_5, /*hidden argument*/NULL);
NullCheck(L_6);
Socket_SetSocketOption_m180008383(L_6, ((int32_t)65535), ((int32_t)32), (bool)1, /*hidden argument*/NULL);
NetPeer_t1779390221 * L_7 = ___peer0;
ByteU5BU5D_t3397334013* L_8 = V_1;
ByteU5BU5D_t3397334013* L_9 = V_1;
NullCheck(L_9);
IL2CPP_RUNTIME_CLASS_INIT(NetUtility_t3562260209_il2cpp_TypeInfo_var);
IPAddress_t1399971723 * L_10 = NetUtility_GetBroadcastAddress_m2689141683(NULL /*static, unused*/, /*hidden argument*/NULL);
IPEndPoint_t2615413766 * L_11 = (IPEndPoint_t2615413766 *)il2cpp_codegen_object_new(IPEndPoint_t2615413766_il2cpp_TypeInfo_var);
IPEndPoint__ctor_m3477723888(L_11, L_10, ((int32_t)1900), /*hidden argument*/NULL);
NullCheck(L_7);
NetPeer_RawSend_m737396087(L_7, L_8, 0, (((int32_t)((int32_t)(((Il2CppArray *)L_9)->max_length)))), L_11, /*hidden argument*/NULL);
NetPeer_t1779390221 * L_12 = ___peer0;
NullCheck(L_12);
Socket_t3821512045 * L_13 = NetPeer_get_Socket_m1042619742(L_12, /*hidden argument*/NULL);
NullCheck(L_13);
Socket_SetSocketOption_m180008383(L_13, ((int32_t)65535), ((int32_t)32), (bool)0, /*hidden argument*/NULL);
return;
}
}
// System.Void Lidgren.Network.NetUPnP::CheckForDiscoveryTimeout()
extern Il2CppClass* NetTime_t3056501352_il2cpp_TypeInfo_var;
extern Il2CppCodeGenString* _stringLiteral1372822028;
extern const uint32_t NetUPnP_CheckForDiscoveryTimeout_m1059646905_MetadataUsageId;
extern "C" void NetUPnP_CheckForDiscoveryTimeout_m1059646905 (NetUPnP_t2794379482 * __this, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetUPnP_CheckForDiscoveryTimeout_m1059646905_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
bool V_0 = false;
int32_t G_B3_0 = 0;
{
int32_t L_0 = __this->get_m_status_5();
if (L_0)
{
goto IL_001b;
}
}
{
IL2CPP_RUNTIME_CLASS_INIT(NetTime_t3056501352_il2cpp_TypeInfo_var);
double L_1 = NetTime_get_Now_m1609702533(NULL /*static, unused*/, /*hidden argument*/NULL);
double L_2 = __this->get_m_discoveryResponseDeadline_4();
G_B3_0 = ((((int32_t)((((double)L_1) < ((double)L_2))? 1 : 0)) == ((int32_t)0))? 1 : 0);
goto IL_001c;
}
IL_001b:
{
G_B3_0 = 0;
}
IL_001c:
{
V_0 = (bool)G_B3_0;
bool L_3 = V_0;
if (L_3)
{
goto IL_0023;
}
}
{
goto IL_003b;
}
IL_0023:
{
NetPeer_t1779390221 * L_4 = __this->get_m_peer_2();
NullCheck(L_4);
NetPeer_LogDebug_m2983960595(L_4, _stringLiteral1372822028, /*hidden argument*/NULL);
__this->set_m_status_5(1);
}
IL_003b:
{
return;
}
}
// System.Void Lidgren.Network.NetUPnP::ExtractServiceUrl(System.String)
extern Il2CppClass* XmlDocument_t3649534162_il2cpp_TypeInfo_var;
extern Il2CppClass* WebRequest_t1365124353_il2cpp_TypeInfo_var;
extern Il2CppClass* IDisposable_t2427283555_il2cpp_TypeInfo_var;
extern Il2CppClass* XmlNamespaceManager_t486731501_il2cpp_TypeInfo_var;
extern Il2CppClass* String_t_il2cpp_TypeInfo_var;
extern Il2CppCodeGenString* _stringLiteral3068682649;
extern Il2CppCodeGenString* _stringLiteral3430366403;
extern Il2CppCodeGenString* _stringLiteral2949535312;
extern Il2CppCodeGenString* _stringLiteral1219776091;
extern Il2CppCodeGenString* _stringLiteral937432703;
extern Il2CppCodeGenString* _stringLiteral2729541309;
extern Il2CppCodeGenString* _stringLiteral1735414183;
extern Il2CppCodeGenString* _stringLiteral2469705028;
extern Il2CppCodeGenString* _stringLiteral3824059609;
extern const uint32_t NetUPnP_ExtractServiceUrl_m1890440714_MetadataUsageId;
extern "C" void NetUPnP_ExtractServiceUrl_m1890440714 (NetUPnP_t2794379482 * __this, String_t* ___resp0, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetUPnP_ExtractServiceUrl_m1890440714_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
XmlDocument_t3649534162 * V_0 = NULL;
WebResponse_t1895226051 * V_1 = NULL;
XmlNamespaceManager_t486731501 * V_2 = NULL;
XmlNode_t616554813 * V_3 = NULL;
XmlNode_t616554813 * V_4 = NULL;
bool V_5 = false;
Exception_t1927440687 * __last_unhandled_exception = 0;
NO_UNUSED_WARNING (__last_unhandled_exception);
Exception_t1927440687 * __exception_local = 0;
NO_UNUSED_WARNING (__exception_local);
int32_t __leave_target = 0;
NO_UNUSED_WARNING (__leave_target);
{
XmlDocument_t3649534162 * L_0 = (XmlDocument_t3649534162 *)il2cpp_codegen_object_new(XmlDocument_t3649534162_il2cpp_TypeInfo_var);
XmlDocument__ctor_m3336214851(L_0, /*hidden argument*/NULL);
V_0 = L_0;
String_t* L_1 = ___resp0;
IL2CPP_RUNTIME_CLASS_INIT(WebRequest_t1365124353_il2cpp_TypeInfo_var);
WebRequest_t1365124353 * L_2 = WebRequest_Create_m274268363(NULL /*static, unused*/, L_1, /*hidden argument*/NULL);
NullCheck(L_2);
WebResponse_t1895226051 * L_3 = VirtFuncInvoker0< WebResponse_t1895226051 * >::Invoke(18 /* System.Net.WebResponse System.Net.WebRequest::GetResponse() */, L_2);
V_1 = L_3;
}
IL_0013:
try
{ // begin try (depth: 1)
XmlDocument_t3649534162 * L_4 = V_0;
WebResponse_t1895226051 * L_5 = V_1;
NullCheck(L_5);
Stream_t3255436806 * L_6 = VirtFuncInvoker0< Stream_t3255436806 * >::Invoke(9 /* System.IO.Stream System.Net.WebResponse::GetResponseStream() */, L_5);
NullCheck(L_4);
VirtActionInvoker1< Stream_t3255436806 * >::Invoke(56 /* System.Void System.Xml.XmlDocument::Load(System.IO.Stream) */, L_4, L_6);
IL2CPP_LEAVE(0x34, FINALLY_0022);
} // end try (depth: 1)
catch(Il2CppExceptionWrapper& e)
{
__last_unhandled_exception = (Exception_t1927440687 *)e.ex;
goto FINALLY_0022;
}
FINALLY_0022:
{ // begin finally (depth: 1)
{
WebResponse_t1895226051 * L_7 = V_1;
V_5 = (bool)((((Il2CppObject*)(WebResponse_t1895226051 *)L_7) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0);
bool L_8 = V_5;
if (L_8)
{
goto IL_0033;
}
}
IL_002c:
{
WebResponse_t1895226051 * L_9 = V_1;
NullCheck(L_9);
InterfaceActionInvoker0::Invoke(0 /* System.Void System.IDisposable::Dispose() */, IDisposable_t2427283555_il2cpp_TypeInfo_var, L_9);
}
IL_0033:
{
IL2CPP_END_FINALLY(34)
}
} // end finally (depth: 1)
IL2CPP_CLEANUP(34)
{
IL2CPP_JUMP_TBL(0x34, IL_0034)
IL2CPP_RETHROW_IF_UNHANDLED(Exception_t1927440687 *)
}
IL_0034:
{
XmlDocument_t3649534162 * L_10 = V_0;
NullCheck(L_10);
XmlNameTable_t1345805268 * L_11 = XmlDocument_get_NameTable_m2493009838(L_10, /*hidden argument*/NULL);
XmlNamespaceManager_t486731501 * L_12 = (XmlNamespaceManager_t486731501 *)il2cpp_codegen_object_new(XmlNamespaceManager_t486731501_il2cpp_TypeInfo_var);
XmlNamespaceManager__ctor_m3164566160(L_12, L_11, /*hidden argument*/NULL);
V_2 = L_12;
XmlNamespaceManager_t486731501 * L_13 = V_2;
NullCheck(L_13);
VirtActionInvoker2< String_t*, String_t* >::Invoke(8 /* System.Void System.Xml.XmlNamespaceManager::AddNamespace(System.String,System.String) */, L_13, _stringLiteral3068682649, _stringLiteral3430366403);
XmlDocument_t3649534162 * L_14 = V_0;
XmlNamespaceManager_t486731501 * L_15 = V_2;
NullCheck(L_14);
XmlNode_t616554813 * L_16 = XmlNode_SelectSingleNode_m1274657031(L_14, _stringLiteral2949535312, L_15, /*hidden argument*/NULL);
V_3 = L_16;
XmlNode_t616554813 * L_17 = V_3;
NullCheck(L_17);
String_t* L_18 = VirtFuncInvoker0< String_t* >::Invoke(25 /* System.String System.Xml.XmlNode::get_Value() */, L_17);
NullCheck(L_18);
bool L_19 = String_Contains_m4017059963(L_18, _stringLiteral1219776091, /*hidden argument*/NULL);
V_5 = L_19;
bool L_20 = V_5;
if (L_20)
{
goto IL_007a;
}
}
{
goto IL_0123;
}
IL_007a:
{
__this->set_m_serviceName_1(_stringLiteral937432703);
XmlDocument_t3649534162 * L_21 = V_0;
String_t* L_22 = __this->get_m_serviceName_1();
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_23 = String_Concat_m612901809(NULL /*static, unused*/, _stringLiteral2729541309, L_22, _stringLiteral1735414183, /*hidden argument*/NULL);
XmlNamespaceManager_t486731501 * L_24 = V_2;
NullCheck(L_21);
XmlNode_t616554813 * L_25 = XmlNode_SelectSingleNode_m1274657031(L_21, L_23, L_24, /*hidden argument*/NULL);
V_4 = L_25;
XmlNode_t616554813 * L_26 = V_4;
V_5 = (bool)((((int32_t)((((Il2CppObject*)(XmlNode_t616554813 *)L_26) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_27 = V_5;
if (L_27)
{
goto IL_00ec;
}
}
{
__this->set_m_serviceName_1(_stringLiteral2469705028);
XmlDocument_t3649534162 * L_28 = V_0;
String_t* L_29 = __this->get_m_serviceName_1();
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_30 = String_Concat_m612901809(NULL /*static, unused*/, _stringLiteral2729541309, L_29, _stringLiteral1735414183, /*hidden argument*/NULL);
XmlNamespaceManager_t486731501 * L_31 = V_2;
NullCheck(L_28);
XmlNode_t616554813 * L_32 = XmlNode_SelectSingleNode_m1274657031(L_28, L_30, L_31, /*hidden argument*/NULL);
V_4 = L_32;
XmlNode_t616554813 * L_33 = V_4;
V_5 = (bool)((((int32_t)((((Il2CppObject*)(XmlNode_t616554813 *)L_33) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_34 = V_5;
if (L_34)
{
goto IL_00eb;
}
}
{
goto IL_0123;
}
IL_00eb:
{
}
IL_00ec:
{
String_t* L_35 = ___resp0;
XmlNode_t616554813 * L_36 = V_4;
NullCheck(L_36);
String_t* L_37 = VirtFuncInvoker0< String_t* >::Invoke(25 /* System.String System.Xml.XmlNode::get_Value() */, L_36);
String_t* L_38 = NetUPnP_CombineUrls_m1444389121(NULL /*static, unused*/, L_35, L_37, /*hidden argument*/NULL);
__this->set_m_serviceUrl_0(L_38);
NetPeer_t1779390221 * L_39 = __this->get_m_peer_2();
NullCheck(L_39);
NetPeer_LogDebug_m2983960595(L_39, _stringLiteral3824059609, /*hidden argument*/NULL);
__this->set_m_status_5(2);
ManualResetEvent_t926074657 * L_40 = __this->get_m_discoveryComplete_3();
NullCheck(L_40);
EventWaitHandle_Set_m2975776670(L_40, /*hidden argument*/NULL);
}
IL_0123:
{
return;
}
}
// System.String Lidgren.Network.NetUPnP::CombineUrls(System.String,System.String)
extern Il2CppClass* String_t_il2cpp_TypeInfo_var;
extern Il2CppCodeGenString* _stringLiteral4021508840;
extern Il2CppCodeGenString* _stringLiteral372029316;
extern Il2CppCodeGenString* _stringLiteral4169949010;
extern Il2CppCodeGenString* _stringLiteral371857150;
extern Il2CppCodeGenString* _stringLiteral372029315;
extern const uint32_t NetUPnP_CombineUrls_m1444389121_MetadataUsageId;
extern "C" String_t* NetUPnP_CombineUrls_m1444389121 (Il2CppObject * __this /* static, unused */, String_t* ___gatewayURL0, String_t* ___subURL1, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetUPnP_CombineUrls_m1444389121_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
int32_t V_0 = 0;
String_t* V_1 = NULL;
bool V_2 = false;
int32_t G_B3_0 = 0;
{
String_t* L_0 = ___subURL1;
NullCheck(L_0);
bool L_1 = String_Contains_m4017059963(L_0, _stringLiteral4021508840, /*hidden argument*/NULL);
if (L_1)
{
goto IL_001e;
}
}
{
String_t* L_2 = ___subURL1;
NullCheck(L_2);
bool L_3 = String_Contains_m4017059963(L_2, _stringLiteral372029316, /*hidden argument*/NULL);
G_B3_0 = ((((int32_t)L_3) == ((int32_t)0))? 1 : 0);
goto IL_001f;
}
IL_001e:
{
G_B3_0 = 0;
}
IL_001f:
{
V_2 = (bool)G_B3_0;
bool L_4 = V_2;
if (L_4)
{
goto IL_0028;
}
}
{
String_t* L_5 = ___subURL1;
V_1 = L_5;
goto IL_0067;
}
IL_0028:
{
String_t* L_6 = ___gatewayURL0;
NullCheck(L_6);
String_t* L_7 = String_Replace_m1941156251(L_6, _stringLiteral4169949010, _stringLiteral371857150, /*hidden argument*/NULL);
___gatewayURL0 = L_7;
String_t* L_8 = ___gatewayURL0;
NullCheck(L_8);
int32_t L_9 = String_IndexOf_m4251815737(L_8, _stringLiteral372029315, /*hidden argument*/NULL);
V_0 = L_9;
int32_t L_10 = V_0;
V_2 = (bool)((((int32_t)L_10) == ((int32_t)(-1)))? 1 : 0);
bool L_11 = V_2;
if (L_11)
{
goto IL_0058;
}
}
{
String_t* L_12 = ___gatewayURL0;
int32_t L_13 = V_0;
NullCheck(L_12);
String_t* L_14 = String_Substring_m12482732(L_12, 0, L_13, /*hidden argument*/NULL);
___gatewayURL0 = L_14;
}
IL_0058:
{
String_t* L_15 = ___gatewayURL0;
String_t* L_16 = ___subURL1;
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_17 = String_Concat_m612901809(NULL /*static, unused*/, _stringLiteral4169949010, L_15, L_16, /*hidden argument*/NULL);
V_1 = L_17;
goto IL_0067;
}
IL_0067:
{
String_t* L_18 = V_1;
return L_18;
}
}
// System.Net.IPAddress Lidgren.Network.NetUtility::GetCachedBroadcastAddress()
extern Il2CppClass* NetUtility_t3562260209_il2cpp_TypeInfo_var;
extern const uint32_t NetUtility_GetCachedBroadcastAddress_m1409773543_MetadataUsageId;
extern "C" IPAddress_t1399971723 * NetUtility_GetCachedBroadcastAddress_m1409773543 (Il2CppObject * __this /* static, unused */, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetUtility_GetCachedBroadcastAddress_m1409773543_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
IPAddress_t1399971723 * V_0 = NULL;
bool V_1 = false;
{
IL2CPP_RUNTIME_CLASS_INIT(NetUtility_t3562260209_il2cpp_TypeInfo_var);
IPAddress_t1399971723 * L_0 = ((NetUtility_t3562260209_StaticFields*)NetUtility_t3562260209_il2cpp_TypeInfo_var->static_fields)->get_s_broadcastAddress_1();
V_1 = (bool)((((int32_t)((((Il2CppObject*)(IPAddress_t1399971723 *)L_0) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_1 = V_1;
if (L_1)
{
goto IL_001a;
}
}
{
IL2CPP_RUNTIME_CLASS_INIT(NetUtility_t3562260209_il2cpp_TypeInfo_var);
IPAddress_t1399971723 * L_2 = NetUtility_GetBroadcastAddress_m2689141683(NULL /*static, unused*/, /*hidden argument*/NULL);
((NetUtility_t3562260209_StaticFields*)NetUtility_t3562260209_il2cpp_TypeInfo_var->static_fields)->set_s_broadcastAddress_1(L_2);
}
IL_001a:
{
IL2CPP_RUNTIME_CLASS_INIT(NetUtility_t3562260209_il2cpp_TypeInfo_var);
IPAddress_t1399971723 * L_3 = ((NetUtility_t3562260209_StaticFields*)NetUtility_t3562260209_il2cpp_TypeInfo_var->static_fields)->get_s_broadcastAddress_1();
V_0 = L_3;
goto IL_0022;
}
IL_0022:
{
IPAddress_t1399971723 * L_4 = V_0;
return L_4;
}
}
// System.Net.IPAddress Lidgren.Network.NetUtility::Resolve(System.String)
extern Il2CppClass* String_t_il2cpp_TypeInfo_var;
extern Il2CppClass* ArgumentException_t3259014390_il2cpp_TypeInfo_var;
extern Il2CppClass* IPAddress_t1399971723_il2cpp_TypeInfo_var;
extern Il2CppClass* Dns_t1335526197_il2cpp_TypeInfo_var;
extern Il2CppClass* SocketException_t1618573604_il2cpp_TypeInfo_var;
extern Il2CppCodeGenString* _stringLiteral1173154807;
extern Il2CppCodeGenString* _stringLiteral2667663716;
extern Il2CppCodeGenString* _stringLiteral4238725438;
extern const uint32_t NetUtility_Resolve_m1627662274_MetadataUsageId;
extern "C" IPAddress_t1399971723 * NetUtility_Resolve_m1627662274 (Il2CppObject * __this /* static, unused */, String_t* ___ipOrHost0, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetUtility_Resolve_m1627662274_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
IPAddress_t1399971723 * V_0 = NULL;
IPAddressU5BU5D_t4087230954* V_1 = NULL;
IPAddress_t1399971723 * V_2 = NULL;
SocketException_t1618573604 * V_3 = NULL;
IPAddress_t1399971723 * V_4 = NULL;
bool V_5 = false;
IPAddressU5BU5D_t4087230954* V_6 = NULL;
int32_t V_7 = 0;
Exception_t1927440687 * __last_unhandled_exception = 0;
NO_UNUSED_WARNING (__last_unhandled_exception);
Exception_t1927440687 * __exception_local = 0;
NO_UNUSED_WARNING (__exception_local);
int32_t __leave_target = 0;
NO_UNUSED_WARNING (__leave_target);
{
String_t* L_0 = ___ipOrHost0;
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
bool L_1 = String_IsNullOrEmpty_m2802126737(NULL /*static, unused*/, L_0, /*hidden argument*/NULL);
V_5 = (bool)((((int32_t)L_1) == ((int32_t)0))? 1 : 0);
bool L_2 = V_5;
if (L_2)
{
goto IL_0020;
}
}
{
ArgumentException_t3259014390 * L_3 = (ArgumentException_t3259014390 *)il2cpp_codegen_object_new(ArgumentException_t3259014390_il2cpp_TypeInfo_var);
ArgumentException__ctor_m544251339(L_3, _stringLiteral1173154807, _stringLiteral2667663716, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_3);
}
IL_0020:
{
String_t* L_4 = ___ipOrHost0;
NullCheck(L_4);
String_t* L_5 = String_Trim_m2668767713(L_4, /*hidden argument*/NULL);
___ipOrHost0 = L_5;
V_0 = (IPAddress_t1399971723 *)NULL;
String_t* L_6 = ___ipOrHost0;
IL2CPP_RUNTIME_CLASS_INIT(IPAddress_t1399971723_il2cpp_TypeInfo_var);
bool L_7 = IPAddress_TryParse_m2352368982(NULL /*static, unused*/, L_6, (&V_0), /*hidden argument*/NULL);
V_5 = (bool)((((int32_t)L_7) == ((int32_t)0))? 1 : 0);
bool L_8 = V_5;
if (L_8)
{
goto IL_0061;
}
}
{
IPAddress_t1399971723 * L_9 = V_0;
NullCheck(L_9);
int32_t L_10 = IPAddress_get_AddressFamily_m2727317531(L_9, /*hidden argument*/NULL);
V_5 = (bool)((((int32_t)((((int32_t)L_10) == ((int32_t)2))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_11 = V_5;
if (L_11)
{
goto IL_0056;
}
}
{
IPAddress_t1399971723 * L_12 = V_0;
V_4 = L_12;
goto IL_00dd;
}
IL_0056:
{
ArgumentException_t3259014390 * L_13 = (ArgumentException_t3259014390 *)il2cpp_codegen_object_new(ArgumentException_t3259014390_il2cpp_TypeInfo_var);
ArgumentException__ctor_m3739475201(L_13, _stringLiteral4238725438, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_13);
}
IL_0061:
try
{ // begin try (depth: 1)
{
String_t* L_14 = ___ipOrHost0;
IL2CPP_RUNTIME_CLASS_INIT(Dns_t1335526197_il2cpp_TypeInfo_var);
IPAddressU5BU5D_t4087230954* L_15 = Dns_GetHostAddresses_m1469938777(NULL /*static, unused*/, L_14, /*hidden argument*/NULL);
V_1 = L_15;
IPAddressU5BU5D_t4087230954* L_16 = V_1;
V_5 = (bool)((((int32_t)((((Il2CppObject*)(IPAddressU5BU5D_t4087230954*)L_16) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_17 = V_5;
if (L_17)
{
goto IL_007b;
}
}
IL_0076:
{
V_4 = (IPAddress_t1399971723 *)NULL;
goto IL_00dd;
}
IL_007b:
{
IPAddressU5BU5D_t4087230954* L_18 = V_1;
V_6 = L_18;
V_7 = 0;
goto IL_00a9;
}
IL_0084:
{
IPAddressU5BU5D_t4087230954* L_19 = V_6;
int32_t L_20 = V_7;
NullCheck(L_19);
IL2CPP_ARRAY_BOUNDS_CHECK(L_19, L_20);
int32_t L_21 = L_20;
IPAddress_t1399971723 * L_22 = (L_19)->GetAt(static_cast<il2cpp_array_size_t>(L_21));
V_2 = L_22;
IPAddress_t1399971723 * L_23 = V_2;
NullCheck(L_23);
int32_t L_24 = IPAddress_get_AddressFamily_m2727317531(L_23, /*hidden argument*/NULL);
V_5 = (bool)((((int32_t)((((int32_t)L_24) == ((int32_t)2))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_25 = V_5;
if (L_25)
{
goto IL_00a2;
}
}
IL_009d:
{
IPAddress_t1399971723 * L_26 = V_2;
V_4 = L_26;
goto IL_00dd;
}
IL_00a2:
{
int32_t L_27 = V_7;
V_7 = ((int32_t)((int32_t)L_27+(int32_t)1));
}
IL_00a9:
{
int32_t L_28 = V_7;
IPAddressU5BU5D_t4087230954* L_29 = V_6;
NullCheck(L_29);
V_5 = (bool)((((int32_t)L_28) < ((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_29)->max_length))))))? 1 : 0);
bool L_30 = V_5;
if (L_30)
{
goto IL_0084;
}
}
IL_00b7:
{
V_4 = (IPAddress_t1399971723 *)NULL;
goto IL_00dd;
}
} // end try (depth: 1)
catch(Il2CppExceptionWrapper& e)
{
__exception_local = (Exception_t1927440687 *)e.ex;
if(il2cpp_codegen_class_is_assignable_from (SocketException_t1618573604_il2cpp_TypeInfo_var, e.ex->object.klass))
goto CATCH_00bc;
throw e;
}
CATCH_00bc:
{ // begin catch(System.Net.Sockets.SocketException)
{
V_3 = ((SocketException_t1618573604 *)__exception_local);
SocketException_t1618573604 * L_31 = V_3;
NullCheck(L_31);
int32_t L_32 = SocketException_get_SocketErrorCode_m3898993591(L_31, /*hidden argument*/NULL);
V_5 = (bool)((((int32_t)((((int32_t)L_32) == ((int32_t)((int32_t)11001)))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_33 = V_5;
if (L_33)
{
goto IL_00da;
}
}
IL_00d4:
{
V_4 = (IPAddress_t1399971723 *)NULL;
goto IL_00dd;
}
IL_00da:
{
IL2CPP_RAISE_MANAGED_EXCEPTION(__exception_local);
}
} // end catch (depth: 1)
IL_00dd:
{
IPAddress_t1399971723 * L_34 = V_4;
return L_34;
}
}
// System.String Lidgren.Network.NetUtility::ToHexString(System.Int64)
extern Il2CppClass* BitConverter_t3195628829_il2cpp_TypeInfo_var;
extern Il2CppClass* NetUtility_t3562260209_il2cpp_TypeInfo_var;
extern const uint32_t NetUtility_ToHexString_m433916538_MetadataUsageId;
extern "C" String_t* NetUtility_ToHexString_m433916538 (Il2CppObject * __this /* static, unused */, int64_t ___data0, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetUtility_ToHexString_m433916538_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
String_t* V_0 = NULL;
{
int64_t L_0 = ___data0;
IL2CPP_RUNTIME_CLASS_INIT(BitConverter_t3195628829_il2cpp_TypeInfo_var);
ByteU5BU5D_t3397334013* L_1 = BitConverter_GetBytes_m2282078441(NULL /*static, unused*/, L_0, /*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(NetUtility_t3562260209_il2cpp_TypeInfo_var);
String_t* L_2 = NetUtility_ToHexString_m3804094867(NULL /*static, unused*/, L_1, /*hidden argument*/NULL);
V_0 = L_2;
goto IL_000f;
}
IL_000f:
{
String_t* L_3 = V_0;
return L_3;
}
}
// System.String Lidgren.Network.NetUtility::ToHexString(System.Byte[])
extern Il2CppClass* NetUtility_t3562260209_il2cpp_TypeInfo_var;
extern const uint32_t NetUtility_ToHexString_m3804094867_MetadataUsageId;
extern "C" String_t* NetUtility_ToHexString_m3804094867 (Il2CppObject * __this /* static, unused */, ByteU5BU5D_t3397334013* ___data0, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetUtility_ToHexString_m3804094867_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
String_t* V_0 = NULL;
{
ByteU5BU5D_t3397334013* L_0 = ___data0;
ByteU5BU5D_t3397334013* L_1 = ___data0;
NullCheck(L_1);
IL2CPP_RUNTIME_CLASS_INIT(NetUtility_t3562260209_il2cpp_TypeInfo_var);
String_t* L_2 = NetUtility_ToHexString_m2921421631(NULL /*static, unused*/, L_0, 0, (((int32_t)((int32_t)(((Il2CppArray *)L_1)->max_length)))), /*hidden argument*/NULL);
V_0 = L_2;
goto IL_000e;
}
IL_000e:
{
String_t* L_3 = V_0;
return L_3;
}
}
// System.String Lidgren.Network.NetUtility::ToHexString(System.Byte[],System.Int32,System.Int32)
extern Il2CppClass* CharU5BU5D_t1328083999_il2cpp_TypeInfo_var;
extern const uint32_t NetUtility_ToHexString_m2921421631_MetadataUsageId;
extern "C" String_t* NetUtility_ToHexString_m2921421631 (Il2CppObject * __this /* static, unused */, ByteU5BU5D_t3397334013* ___data0, int32_t ___offset1, int32_t ___length2, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetUtility_ToHexString_m2921421631_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
CharU5BU5D_t1328083999* V_0 = NULL;
uint8_t V_1 = 0x0;
int32_t V_2 = 0;
String_t* V_3 = NULL;
bool V_4 = false;
int32_t G_B3_0 = 0;
CharU5BU5D_t1328083999* G_B3_1 = NULL;
int32_t G_B2_0 = 0;
CharU5BU5D_t1328083999* G_B2_1 = NULL;
int32_t G_B4_0 = 0;
int32_t G_B4_1 = 0;
CharU5BU5D_t1328083999* G_B4_2 = NULL;
int32_t G_B6_0 = 0;
CharU5BU5D_t1328083999* G_B6_1 = NULL;
int32_t G_B5_0 = 0;
CharU5BU5D_t1328083999* G_B5_1 = NULL;
int32_t G_B7_0 = 0;
int32_t G_B7_1 = 0;
CharU5BU5D_t1328083999* G_B7_2 = NULL;
{
int32_t L_0 = ___length2;
V_0 = ((CharU5BU5D_t1328083999*)SZArrayNew(CharU5BU5D_t1328083999_il2cpp_TypeInfo_var, (uint32_t)((int32_t)((int32_t)L_0*(int32_t)2))));
V_2 = 0;
goto IL_0055;
}
IL_000e:
{
ByteU5BU5D_t3397334013* L_1 = ___data0;
int32_t L_2 = ___offset1;
int32_t L_3 = V_2;
NullCheck(L_1);
IL2CPP_ARRAY_BOUNDS_CHECK(L_1, ((int32_t)((int32_t)L_2+(int32_t)L_3)));
int32_t L_4 = ((int32_t)((int32_t)L_2+(int32_t)L_3));
uint8_t L_5 = (L_1)->GetAt(static_cast<il2cpp_array_size_t>(L_4));
V_1 = (((int32_t)((uint8_t)((int32_t)((int32_t)L_5>>(int32_t)4)))));
CharU5BU5D_t1328083999* L_6 = V_0;
int32_t L_7 = V_2;
uint8_t L_8 = V_1;
G_B2_0 = ((int32_t)((int32_t)L_7*(int32_t)2));
G_B2_1 = L_6;
if ((((int32_t)L_8) > ((int32_t)((int32_t)9))))
{
G_B3_0 = ((int32_t)((int32_t)L_7*(int32_t)2));
G_B3_1 = L_6;
goto IL_0027;
}
}
{
uint8_t L_9 = V_1;
G_B4_0 = ((int32_t)((int32_t)L_9+(int32_t)((int32_t)48)));
G_B4_1 = G_B2_0;
G_B4_2 = G_B2_1;
goto IL_002b;
}
IL_0027:
{
uint8_t L_10 = V_1;
G_B4_0 = ((int32_t)((int32_t)L_10+(int32_t)((int32_t)55)));
G_B4_1 = G_B3_0;
G_B4_2 = G_B3_1;
}
IL_002b:
{
NullCheck(G_B4_2);
IL2CPP_ARRAY_BOUNDS_CHECK(G_B4_2, G_B4_1);
(G_B4_2)->SetAt(static_cast<il2cpp_array_size_t>(G_B4_1), (Il2CppChar)(((int32_t)((uint16_t)G_B4_0))));
ByteU5BU5D_t3397334013* L_11 = ___data0;
int32_t L_12 = ___offset1;
int32_t L_13 = V_2;
NullCheck(L_11);
IL2CPP_ARRAY_BOUNDS_CHECK(L_11, ((int32_t)((int32_t)L_12+(int32_t)L_13)));
int32_t L_14 = ((int32_t)((int32_t)L_12+(int32_t)L_13));
uint8_t L_15 = (L_11)->GetAt(static_cast<il2cpp_array_size_t>(L_14));
V_1 = (((int32_t)((uint8_t)((int32_t)((int32_t)L_15&(int32_t)((int32_t)15))))));
CharU5BU5D_t1328083999* L_16 = V_0;
int32_t L_17 = V_2;
uint8_t L_18 = V_1;
G_B5_0 = ((int32_t)((int32_t)((int32_t)((int32_t)L_17*(int32_t)2))+(int32_t)1));
G_B5_1 = L_16;
if ((((int32_t)L_18) > ((int32_t)((int32_t)9))))
{
G_B6_0 = ((int32_t)((int32_t)((int32_t)((int32_t)L_17*(int32_t)2))+(int32_t)1));
G_B6_1 = L_16;
goto IL_0049;
}
}
{
uint8_t L_19 = V_1;
G_B7_0 = ((int32_t)((int32_t)L_19+(int32_t)((int32_t)48)));
G_B7_1 = G_B5_0;
G_B7_2 = G_B5_1;
goto IL_004d;
}
IL_0049:
{
uint8_t L_20 = V_1;
G_B7_0 = ((int32_t)((int32_t)L_20+(int32_t)((int32_t)55)));
G_B7_1 = G_B6_0;
G_B7_2 = G_B6_1;
}
IL_004d:
{
NullCheck(G_B7_2);
IL2CPP_ARRAY_BOUNDS_CHECK(G_B7_2, G_B7_1);
(G_B7_2)->SetAt(static_cast<il2cpp_array_size_t>(G_B7_1), (Il2CppChar)(((int32_t)((uint16_t)G_B7_0))));
int32_t L_21 = V_2;
V_2 = ((int32_t)((int32_t)L_21+(int32_t)1));
}
IL_0055:
{
int32_t L_22 = V_2;
int32_t L_23 = ___length2;
V_4 = (bool)((((int32_t)L_22) < ((int32_t)L_23))? 1 : 0);
bool L_24 = V_4;
if (L_24)
{
goto IL_000e;
}
}
{
CharU5BU5D_t1328083999* L_25 = V_0;
String_t* L_26 = String_CreateString_m3818307083(NULL, L_25, /*hidden argument*/NULL);
V_3 = L_26;
goto IL_0068;
}
IL_0068:
{
String_t* L_27 = V_3;
return L_27;
}
}
// System.Int32 Lidgren.Network.NetUtility::BytesToHoldBits(System.Int32)
extern "C" int32_t NetUtility_BytesToHoldBits_m1372162852 (Il2CppObject * __this /* static, unused */, int32_t ___numBits0, const MethodInfo* method)
{
int32_t V_0 = 0;
{
int32_t L_0 = ___numBits0;
V_0 = ((int32_t)((int32_t)((int32_t)((int32_t)L_0+(int32_t)7))/(int32_t)8));
goto IL_0009;
}
IL_0009:
{
int32_t L_1 = V_0;
return L_1;
}
}
// System.Int32 Lidgren.Network.NetUtility::RelativeSequenceNumber(System.Int32,System.Int32)
extern "C" int32_t NetUtility_RelativeSequenceNumber_m1713083748 (Il2CppObject * __this /* static, unused */, int32_t ___nr0, int32_t ___expected1, const MethodInfo* method)
{
int32_t V_0 = 0;
{
int32_t L_0 = ___nr0;
int32_t L_1 = ___expected1;
V_0 = ((int32_t)((int32_t)((int32_t)((int32_t)((int32_t)((int32_t)((int32_t)((int32_t)((int32_t)((int32_t)L_0-(int32_t)L_1))+(int32_t)((int32_t)1024)))+(int32_t)((int32_t)512)))%(int32_t)((int32_t)1024)))-(int32_t)((int32_t)512)));
goto IL_001f;
}
IL_001f:
{
int32_t L_2 = V_0;
return L_2;
}
}
// System.Int32 Lidgren.Network.NetUtility::GetWindowSize(Lidgren.Network.NetDeliveryMethod)
extern "C" int32_t NetUtility_GetWindowSize_m1637041950 (Il2CppObject * __this /* static, unused */, uint8_t ___method0, const MethodInfo* method)
{
int32_t V_0 = 0;
uint8_t V_1 = 0;
{
uint8_t L_0 = ___method0;
V_1 = L_0;
uint8_t L_1 = V_1;
if (L_1 == 0)
{
goto IL_002d;
}
if (L_1 == 1)
{
goto IL_0031;
}
if (L_1 == 2)
{
goto IL_0031;
}
}
{
uint8_t L_2 = V_1;
if (((int32_t)((int32_t)L_2-(int32_t)((int32_t)34))) == 0)
{
goto IL_003e;
}
if (((int32_t)((int32_t)L_2-(int32_t)((int32_t)34))) == 1)
{
goto IL_003e;
}
}
{
uint8_t L_3 = V_1;
if ((((int32_t)L_3) == ((int32_t)((int32_t)67))))
{
goto IL_0039;
}
}
{
goto IL_003e;
}
IL_002d:
{
V_0 = 0;
goto IL_0043;
}
IL_0031:
{
V_0 = ((int32_t)128);
goto IL_0043;
}
IL_0039:
{
V_0 = ((int32_t)64);
goto IL_0043;
}
IL_003e:
{
V_0 = ((int32_t)64);
goto IL_0043;
}
IL_0043:
{
int32_t L_4 = V_0;
return L_4;
}
}
// Lidgren.Network.NetDeliveryMethod Lidgren.Network.NetUtility::GetDeliveryMethod(Lidgren.Network.NetMessageType)
extern "C" uint8_t NetUtility_GetDeliveryMethod_m2383198164 (Il2CppObject * __this /* static, unused */, uint8_t ___mtp0, const MethodInfo* method)
{
uint8_t V_0 = 0;
bool V_1 = false;
{
uint8_t L_0 = ___mtp0;
V_1 = (bool)((((int32_t)L_0) < ((int32_t)((int32_t)67)))? 1 : 0);
bool L_1 = V_1;
if (L_1)
{
goto IL_000f;
}
}
{
V_0 = ((int32_t)67);
goto IL_003b;
}
IL_000f:
{
uint8_t L_2 = ___mtp0;
V_1 = (bool)((((int32_t)L_2) < ((int32_t)((int32_t)35)))? 1 : 0);
bool L_3 = V_1;
if (L_3)
{
goto IL_001d;
}
}
{
V_0 = ((int32_t)35);
goto IL_003b;
}
IL_001d:
{
uint8_t L_4 = ___mtp0;
V_1 = (bool)((((int32_t)L_4) < ((int32_t)((int32_t)34)))? 1 : 0);
bool L_5 = V_1;
if (L_5)
{
goto IL_002b;
}
}
{
V_0 = ((int32_t)34);
goto IL_003b;
}
IL_002b:
{
uint8_t L_6 = ___mtp0;
V_1 = (bool)((((int32_t)L_6) < ((int32_t)2))? 1 : 0);
bool L_7 = V_1;
if (L_7)
{
goto IL_0037;
}
}
{
V_0 = 2;
goto IL_003b;
}
IL_0037:
{
V_0 = 1;
goto IL_003b;
}
IL_003b:
{
uint8_t L_8 = V_0;
return L_8;
}
}
// System.Byte[] Lidgren.Network.NetUtility::ComputeSHAHash(System.Byte[])
extern Il2CppClass* NetUtility_t3562260209_il2cpp_TypeInfo_var;
extern const uint32_t NetUtility_ComputeSHAHash_m2577505156_MetadataUsageId;
extern "C" ByteU5BU5D_t3397334013* NetUtility_ComputeSHAHash_m2577505156 (Il2CppObject * __this /* static, unused */, ByteU5BU5D_t3397334013* ___bytes0, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetUtility_ComputeSHAHash_m2577505156_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
ByteU5BU5D_t3397334013* V_0 = NULL;
{
ByteU5BU5D_t3397334013* L_0 = ___bytes0;
ByteU5BU5D_t3397334013* L_1 = ___bytes0;
NullCheck(L_1);
IL2CPP_RUNTIME_CLASS_INIT(NetUtility_t3562260209_il2cpp_TypeInfo_var);
ByteU5BU5D_t3397334013* L_2 = NetUtility_ComputeSHAHash_m3941709570(NULL /*static, unused*/, L_0, 0, (((int32_t)((int32_t)(((Il2CppArray *)L_1)->max_length)))), /*hidden argument*/NULL);
V_0 = L_2;
goto IL_000e;
}
IL_000e:
{
ByteU5BU5D_t3397334013* L_3 = V_0;
return L_3;
}
}
// System.UInt64 Lidgren.Network.NetUtility::GetPlatformSeed(System.Int32)
extern Il2CppClass* Stopwatch_t1380178105_il2cpp_TypeInfo_var;
extern const uint32_t NetUtility_GetPlatformSeed_m3510865201_MetadataUsageId;
extern "C" uint64_t NetUtility_GetPlatformSeed_m3510865201 (Il2CppObject * __this /* static, unused */, int32_t ___seedInc0, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetUtility_GetPlatformSeed_m3510865201_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
uint64_t V_0 = 0;
uint64_t V_1 = 0;
{
IL2CPP_RUNTIME_CLASS_INIT(Stopwatch_t1380178105_il2cpp_TypeInfo_var);
int64_t L_0 = Stopwatch_GetTimestamp_m4156329811(NULL /*static, unused*/, /*hidden argument*/NULL);
V_0 = L_0;
uint64_t L_1 = V_0;
int64_t L_2 = Environment_get_WorkingSet_m3778626649(NULL /*static, unused*/, /*hidden argument*/NULL);
int32_t L_3 = ___seedInc0;
V_1 = ((int64_t)((int64_t)L_1^(int64_t)((int64_t)((int64_t)L_2+(int64_t)(((int64_t)((int64_t)L_3)))))));
goto IL_0014;
}
IL_0014:
{
uint64_t L_4 = V_1;
return L_4;
}
}
// System.Net.NetworkInformation.NetworkInterface Lidgren.Network.NetUtility::GetNetworkInterface()
extern Il2CppClass* NetworkInterface_t63927633_il2cpp_TypeInfo_var;
extern Il2CppClass* IEnumerator_1_t395310471_il2cpp_TypeInfo_var;
extern Il2CppClass* IEnumerator_t1466026749_il2cpp_TypeInfo_var;
extern Il2CppClass* IDisposable_t2427283555_il2cpp_TypeInfo_var;
extern const uint32_t NetUtility_GetNetworkInterface_m1628895093_MetadataUsageId;
extern "C" NetworkInterface_t63927633 * NetUtility_GetNetworkInterface_m1628895093 (Il2CppObject * __this /* static, unused */, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetUtility_GetNetworkInterface_m1628895093_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
IPGlobalProperties_t430107897 * V_0 = NULL;
NetworkInterfaceU5BU5D_t4157644364* V_1 = NULL;
NetworkInterface_t63927633 * V_2 = NULL;
NetworkInterface_t63927633 * V_3 = NULL;
IPInterfaceProperties_t3986609851 * V_4 = NULL;
UnicastIPAddressInformation_t2919786644 * V_5 = NULL;
NetworkInterface_t63927633 * V_6 = NULL;
bool V_7 = false;
NetworkInterfaceU5BU5D_t4157644364* V_8 = NULL;
int32_t V_9 = 0;
Il2CppObject* V_10 = NULL;
Exception_t1927440687 * __last_unhandled_exception = 0;
NO_UNUSED_WARNING (__last_unhandled_exception);
Exception_t1927440687 * __exception_local = 0;
NO_UNUSED_WARNING (__exception_local);
int32_t __leave_target = 0;
NO_UNUSED_WARNING (__leave_target);
int32_t G_B5_0 = 0;
int32_t G_B11_0 = 0;
int32_t G_B25_0 = 0;
{
IPGlobalProperties_t430107897 * L_0 = IPGlobalProperties_GetIPGlobalProperties_m3339074596(NULL /*static, unused*/, /*hidden argument*/NULL);
V_0 = L_0;
IPGlobalProperties_t430107897 * L_1 = V_0;
V_7 = (bool)((((int32_t)((((Il2CppObject*)(IPGlobalProperties_t430107897 *)L_1) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_2 = V_7;
if (L_2)
{
goto IL_001c;
}
}
{
V_6 = (NetworkInterface_t63927633 *)NULL;
goto IL_0140;
}
IL_001c:
{
IL2CPP_RUNTIME_CLASS_INIT(NetworkInterface_t63927633_il2cpp_TypeInfo_var);
NetworkInterfaceU5BU5D_t4157644364* L_3 = NetworkInterface_GetAllNetworkInterfaces_m3928187668(NULL /*static, unused*/, /*hidden argument*/NULL);
V_1 = L_3;
NetworkInterfaceU5BU5D_t4157644364* L_4 = V_1;
if (!L_4)
{
goto IL_0030;
}
}
{
NetworkInterfaceU5BU5D_t4157644364* L_5 = V_1;
NullCheck(L_5);
G_B5_0 = ((((int32_t)((((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_5)->max_length))))) < ((int32_t)1))? 1 : 0)) == ((int32_t)0))? 1 : 0);
goto IL_0031;
}
IL_0030:
{
G_B5_0 = 0;
}
IL_0031:
{
V_7 = (bool)G_B5_0;
bool L_6 = V_7;
if (L_6)
{
goto IL_0040;
}
}
{
V_6 = (NetworkInterface_t63927633 *)NULL;
goto IL_0140;
}
IL_0040:
{
V_2 = (NetworkInterface_t63927633 *)NULL;
NetworkInterfaceU5BU5D_t4157644364* L_7 = V_1;
V_8 = L_7;
V_9 = 0;
goto IL_012a;
}
IL_004e:
{
NetworkInterfaceU5BU5D_t4157644364* L_8 = V_8;
int32_t L_9 = V_9;
NullCheck(L_8);
IL2CPP_ARRAY_BOUNDS_CHECK(L_8, L_9);
int32_t L_10 = L_9;
NetworkInterface_t63927633 * L_11 = (L_8)->GetAt(static_cast<il2cpp_array_size_t>(L_10));
V_3 = L_11;
NetworkInterface_t63927633 * L_12 = V_3;
NullCheck(L_12);
int32_t L_13 = VirtFuncInvoker0< int32_t >::Invoke(7 /* System.Net.NetworkInformation.NetworkInterfaceType System.Net.NetworkInformation.NetworkInterface::get_NetworkInterfaceType() */, L_12);
if ((((int32_t)L_13) == ((int32_t)((int32_t)24))))
{
goto IL_006d;
}
}
{
NetworkInterface_t63927633 * L_14 = V_3;
NullCheck(L_14);
int32_t L_15 = VirtFuncInvoker0< int32_t >::Invoke(7 /* System.Net.NetworkInformation.NetworkInterfaceType System.Net.NetworkInformation.NetworkInterface::get_NetworkInterfaceType() */, L_14);
G_B11_0 = ((((int32_t)((((int32_t)L_15) == ((int32_t)1))? 1 : 0)) == ((int32_t)0))? 1 : 0);
goto IL_006e;
}
IL_006d:
{
G_B11_0 = 0;
}
IL_006e:
{
V_7 = (bool)G_B11_0;
bool L_16 = V_7;
if (L_16)
{
goto IL_007a;
}
}
{
goto IL_0124;
}
IL_007a:
{
NetworkInterface_t63927633 * L_17 = V_3;
NullCheck(L_17);
bool L_18 = VirtFuncInvoker1< bool, int32_t >::Invoke(6 /* System.Boolean System.Net.NetworkInformation.NetworkInterface::Supports(System.Net.NetworkInformation.NetworkInterfaceComponent) */, L_17, 0);
V_7 = L_18;
bool L_19 = V_7;
if (L_19)
{
goto IL_008c;
}
}
{
goto IL_0124;
}
IL_008c:
{
NetworkInterface_t63927633 * L_20 = V_2;
V_7 = (bool)((((int32_t)((((Il2CppObject*)(NetworkInterface_t63927633 *)L_20) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_21 = V_7;
if (L_21)
{
goto IL_009b;
}
}
{
NetworkInterface_t63927633 * L_22 = V_3;
V_2 = L_22;
}
IL_009b:
{
NetworkInterface_t63927633 * L_23 = V_3;
NullCheck(L_23);
int32_t L_24 = VirtFuncInvoker0< int32_t >::Invoke(8 /* System.Net.NetworkInformation.OperationalStatus System.Net.NetworkInformation.NetworkInterface::get_OperationalStatus() */, L_23);
V_7 = (bool)((((int32_t)L_24) == ((int32_t)1))? 1 : 0);
bool L_25 = V_7;
if (L_25)
{
goto IL_00ac;
}
}
{
goto IL_0124;
}
IL_00ac:
{
NetworkInterface_t63927633 * L_26 = V_3;
NullCheck(L_26);
IPInterfaceProperties_t3986609851 * L_27 = VirtFuncInvoker0< IPInterfaceProperties_t3986609851 * >::Invoke(4 /* System.Net.NetworkInformation.IPInterfaceProperties System.Net.NetworkInformation.NetworkInterface::GetIPProperties() */, L_26);
V_4 = L_27;
IPInterfaceProperties_t3986609851 * L_28 = V_4;
NullCheck(L_28);
UnicastIPAddressInformationCollection_t347163204 * L_29 = VirtFuncInvoker0< UnicastIPAddressInformationCollection_t347163204 * >::Invoke(4 /* System.Net.NetworkInformation.UnicastIPAddressInformationCollection System.Net.NetworkInformation.IPInterfaceProperties::get_UnicastAddresses() */, L_28);
NullCheck(L_29);
Il2CppObject* L_30 = VirtFuncInvoker0< Il2CppObject* >::Invoke(17 /* System.Collections.Generic.IEnumerator`1<System.Net.NetworkInformation.UnicastIPAddressInformation> System.Net.NetworkInformation.UnicastIPAddressInformationCollection::GetEnumerator() */, L_29);
V_10 = L_30;
}
IL_00c3:
try
{ // begin try (depth: 1)
{
goto IL_00ff;
}
IL_00c5:
{
Il2CppObject* L_31 = V_10;
NullCheck(L_31);
UnicastIPAddressInformation_t2919786644 * L_32 = InterfaceFuncInvoker0< UnicastIPAddressInformation_t2919786644 * >::Invoke(0 /* !0 System.Collections.Generic.IEnumerator`1<System.Net.NetworkInformation.UnicastIPAddressInformation>::get_Current() */, IEnumerator_1_t395310471_il2cpp_TypeInfo_var, L_31);
V_5 = L_32;
UnicastIPAddressInformation_t2919786644 * L_33 = V_5;
if (!L_33)
{
goto IL_00f0;
}
}
IL_00d3:
{
UnicastIPAddressInformation_t2919786644 * L_34 = V_5;
NullCheck(L_34);
IPAddress_t1399971723 * L_35 = VirtFuncInvoker0< IPAddress_t1399971723 * >::Invoke(4 /* System.Net.IPAddress System.Net.NetworkInformation.IPAddressInformation::get_Address() */, L_34);
if (!L_35)
{
goto IL_00f0;
}
}
IL_00dc:
{
UnicastIPAddressInformation_t2919786644 * L_36 = V_5;
NullCheck(L_36);
IPAddress_t1399971723 * L_37 = VirtFuncInvoker0< IPAddress_t1399971723 * >::Invoke(4 /* System.Net.IPAddress System.Net.NetworkInformation.IPAddressInformation::get_Address() */, L_36);
NullCheck(L_37);
int32_t L_38 = IPAddress_get_AddressFamily_m2727317531(L_37, /*hidden argument*/NULL);
G_B25_0 = ((((int32_t)((((int32_t)L_38) == ((int32_t)2))? 1 : 0)) == ((int32_t)0))? 1 : 0);
goto IL_00f1;
}
IL_00f0:
{
G_B25_0 = 1;
}
IL_00f1:
{
V_7 = (bool)G_B25_0;
bool L_39 = V_7;
if (L_39)
{
goto IL_00fe;
}
}
IL_00f8:
{
NetworkInterface_t63927633 * L_40 = V_3;
V_6 = L_40;
IL2CPP_LEAVE(0x140, FINALLY_010e);
}
IL_00fe:
{
}
IL_00ff:
{
Il2CppObject* L_41 = V_10;
NullCheck(L_41);
bool L_42 = InterfaceFuncInvoker0< bool >::Invoke(1 /* System.Boolean System.Collections.IEnumerator::MoveNext() */, IEnumerator_t1466026749_il2cpp_TypeInfo_var, L_41);
V_7 = L_42;
bool L_43 = V_7;
if (L_43)
{
goto IL_00c5;
}
}
IL_010c:
{
IL2CPP_LEAVE(0x122, FINALLY_010e);
}
} // end try (depth: 1)
catch(Il2CppExceptionWrapper& e)
{
__last_unhandled_exception = (Exception_t1927440687 *)e.ex;
goto FINALLY_010e;
}
FINALLY_010e:
{ // begin finally (depth: 1)
{
Il2CppObject* L_44 = V_10;
V_7 = (bool)((((Il2CppObject*)(Il2CppObject*)L_44) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0);
bool L_45 = V_7;
if (L_45)
{
goto IL_0121;
}
}
IL_0119:
{
Il2CppObject* L_46 = V_10;
NullCheck(L_46);
InterfaceActionInvoker0::Invoke(0 /* System.Void System.IDisposable::Dispose() */, IDisposable_t2427283555_il2cpp_TypeInfo_var, L_46);
}
IL_0121:
{
IL2CPP_END_FINALLY(270)
}
} // end finally (depth: 1)
IL2CPP_CLEANUP(270)
{
IL2CPP_JUMP_TBL(0x140, IL_0140)
IL2CPP_JUMP_TBL(0x122, IL_0122)
IL2CPP_RETHROW_IF_UNHANDLED(Exception_t1927440687 *)
}
IL_0122:
{
}
IL_0124:
{
int32_t L_47 = V_9;
V_9 = ((int32_t)((int32_t)L_47+(int32_t)1));
}
IL_012a:
{
int32_t L_48 = V_9;
NetworkInterfaceU5BU5D_t4157644364* L_49 = V_8;
NullCheck(L_49);
V_7 = (bool)((((int32_t)L_48) < ((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_49)->max_length))))))? 1 : 0);
bool L_50 = V_7;
if (L_50)
{
goto IL_004e;
}
}
{
NetworkInterface_t63927633 * L_51 = V_2;
V_6 = L_51;
goto IL_0140;
}
IL_0140:
{
NetworkInterface_t63927633 * L_52 = V_6;
return L_52;
}
}
// System.Byte[] Lidgren.Network.NetUtility::GetMacAddressBytes()
extern Il2CppClass* NetUtility_t3562260209_il2cpp_TypeInfo_var;
extern const uint32_t NetUtility_GetMacAddressBytes_m2783516176_MetadataUsageId;
extern "C" ByteU5BU5D_t3397334013* NetUtility_GetMacAddressBytes_m2783516176 (Il2CppObject * __this /* static, unused */, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetUtility_GetMacAddressBytes_m2783516176_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
NetworkInterface_t63927633 * V_0 = NULL;
ByteU5BU5D_t3397334013* V_1 = NULL;
bool V_2 = false;
{
IL2CPP_RUNTIME_CLASS_INIT(NetUtility_t3562260209_il2cpp_TypeInfo_var);
NetworkInterface_t63927633 * L_0 = NetUtility_GetNetworkInterface_m1628895093(NULL /*static, unused*/, /*hidden argument*/NULL);
V_0 = L_0;
NetworkInterface_t63927633 * L_1 = V_0;
V_2 = (bool)((((int32_t)((((Il2CppObject*)(NetworkInterface_t63927633 *)L_1) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_2 = V_2;
if (L_2)
{
goto IL_0016;
}
}
{
V_1 = (ByteU5BU5D_t3397334013*)NULL;
goto IL_0024;
}
IL_0016:
{
NetworkInterface_t63927633 * L_3 = V_0;
NullCheck(L_3);
PhysicalAddress_t1613893277 * L_4 = VirtFuncInvoker0< PhysicalAddress_t1613893277 * >::Invoke(5 /* System.Net.NetworkInformation.PhysicalAddress System.Net.NetworkInformation.NetworkInterface::GetPhysicalAddress() */, L_3);
NullCheck(L_4);
ByteU5BU5D_t3397334013* L_5 = PhysicalAddress_GetAddressBytes_m3545084778(L_4, /*hidden argument*/NULL);
V_1 = L_5;
goto IL_0024;
}
IL_0024:
{
ByteU5BU5D_t3397334013* L_6 = V_1;
return L_6;
}
}
// System.Net.IPAddress Lidgren.Network.NetUtility::GetBroadcastAddress()
extern Il2CppClass* NetUtility_t3562260209_il2cpp_TypeInfo_var;
extern Il2CppClass* IEnumerator_1_t395310471_il2cpp_TypeInfo_var;
extern Il2CppClass* ArgumentException_t3259014390_il2cpp_TypeInfo_var;
extern Il2CppClass* ByteU5BU5D_t3397334013_il2cpp_TypeInfo_var;
extern Il2CppClass* IPAddress_t1399971723_il2cpp_TypeInfo_var;
extern Il2CppClass* IEnumerator_t1466026749_il2cpp_TypeInfo_var;
extern Il2CppClass* IDisposable_t2427283555_il2cpp_TypeInfo_var;
extern Il2CppCodeGenString* _stringLiteral1780020358;
extern const uint32_t NetUtility_GetBroadcastAddress_m2689141683_MetadataUsageId;
extern "C" IPAddress_t1399971723 * NetUtility_GetBroadcastAddress_m2689141683 (Il2CppObject * __this /* static, unused */, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetUtility_GetBroadcastAddress_m2689141683_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
NetworkInterface_t63927633 * V_0 = NULL;
IPInterfaceProperties_t3986609851 * V_1 = NULL;
UnicastIPAddressInformation_t2919786644 * V_2 = NULL;
IPAddress_t1399971723 * V_3 = NULL;
ByteU5BU5D_t3397334013* V_4 = NULL;
ByteU5BU5D_t3397334013* V_5 = NULL;
ByteU5BU5D_t3397334013* V_6 = NULL;
int32_t V_7 = 0;
IPAddress_t1399971723 * V_8 = NULL;
bool V_9 = false;
Il2CppObject* V_10 = NULL;
Exception_t1927440687 * __last_unhandled_exception = 0;
NO_UNUSED_WARNING (__last_unhandled_exception);
Exception_t1927440687 * __exception_local = 0;
NO_UNUSED_WARNING (__exception_local);
int32_t __leave_target = 0;
NO_UNUSED_WARNING (__leave_target);
int32_t G_B8_0 = 0;
{
IL2CPP_RUNTIME_CLASS_INIT(NetUtility_t3562260209_il2cpp_TypeInfo_var);
NetworkInterface_t63927633 * L_0 = NetUtility_GetNetworkInterface_m1628895093(NULL /*static, unused*/, /*hidden argument*/NULL);
V_0 = L_0;
NetworkInterface_t63927633 * L_1 = V_0;
V_9 = (bool)((((int32_t)((((Il2CppObject*)(NetworkInterface_t63927633 *)L_1) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_2 = V_9;
if (L_2)
{
goto IL_001c;
}
}
{
V_8 = (IPAddress_t1399971723 *)NULL;
goto IL_0119;
}
IL_001c:
{
NetworkInterface_t63927633 * L_3 = V_0;
NullCheck(L_3);
IPInterfaceProperties_t3986609851 * L_4 = VirtFuncInvoker0< IPInterfaceProperties_t3986609851 * >::Invoke(4 /* System.Net.NetworkInformation.IPInterfaceProperties System.Net.NetworkInformation.NetworkInterface::GetIPProperties() */, L_3);
V_1 = L_4;
IPInterfaceProperties_t3986609851 * L_5 = V_1;
NullCheck(L_5);
UnicastIPAddressInformationCollection_t347163204 * L_6 = VirtFuncInvoker0< UnicastIPAddressInformationCollection_t347163204 * >::Invoke(4 /* System.Net.NetworkInformation.UnicastIPAddressInformationCollection System.Net.NetworkInformation.IPInterfaceProperties::get_UnicastAddresses() */, L_5);
NullCheck(L_6);
Il2CppObject* L_7 = VirtFuncInvoker0< Il2CppObject* >::Invoke(17 /* System.Collections.Generic.IEnumerator`1<System.Net.NetworkInformation.UnicastIPAddressInformation> System.Net.NetworkInformation.UnicastIPAddressInformationCollection::GetEnumerator() */, L_6);
V_10 = L_7;
}
IL_0031:
try
{ // begin try (depth: 1)
{
goto IL_00e9;
}
IL_0036:
{
Il2CppObject* L_8 = V_10;
NullCheck(L_8);
UnicastIPAddressInformation_t2919786644 * L_9 = InterfaceFuncInvoker0< UnicastIPAddressInformation_t2919786644 * >::Invoke(0 /* !0 System.Collections.Generic.IEnumerator`1<System.Net.NetworkInformation.UnicastIPAddressInformation>::get_Current() */, IEnumerator_1_t395310471_il2cpp_TypeInfo_var, L_8);
V_2 = L_9;
UnicastIPAddressInformation_t2919786644 * L_10 = V_2;
if (!L_10)
{
goto IL_005d;
}
}
IL_0042:
{
UnicastIPAddressInformation_t2919786644 * L_11 = V_2;
NullCheck(L_11);
IPAddress_t1399971723 * L_12 = VirtFuncInvoker0< IPAddress_t1399971723 * >::Invoke(4 /* System.Net.IPAddress System.Net.NetworkInformation.IPAddressInformation::get_Address() */, L_11);
if (!L_12)
{
goto IL_005d;
}
}
IL_004a:
{
UnicastIPAddressInformation_t2919786644 * L_13 = V_2;
NullCheck(L_13);
IPAddress_t1399971723 * L_14 = VirtFuncInvoker0< IPAddress_t1399971723 * >::Invoke(4 /* System.Net.IPAddress System.Net.NetworkInformation.IPAddressInformation::get_Address() */, L_13);
NullCheck(L_14);
int32_t L_15 = IPAddress_get_AddressFamily_m2727317531(L_14, /*hidden argument*/NULL);
G_B8_0 = ((((int32_t)((((int32_t)L_15) == ((int32_t)2))? 1 : 0)) == ((int32_t)0))? 1 : 0);
goto IL_005e;
}
IL_005d:
{
G_B8_0 = 1;
}
IL_005e:
{
V_9 = (bool)G_B8_0;
bool L_16 = V_9;
if (L_16)
{
goto IL_00e8;
}
}
IL_0068:
{
UnicastIPAddressInformation_t2919786644 * L_17 = V_2;
NullCheck(L_17);
IPAddress_t1399971723 * L_18 = VirtFuncInvoker0< IPAddress_t1399971723 * >::Invoke(5 /* System.Net.IPAddress System.Net.NetworkInformation.UnicastIPAddressInformation::get_IPv4Mask() */, L_17);
V_3 = L_18;
UnicastIPAddressInformation_t2919786644 * L_19 = V_2;
NullCheck(L_19);
IPAddress_t1399971723 * L_20 = VirtFuncInvoker0< IPAddress_t1399971723 * >::Invoke(4 /* System.Net.IPAddress System.Net.NetworkInformation.IPAddressInformation::get_Address() */, L_19);
NullCheck(L_20);
ByteU5BU5D_t3397334013* L_21 = IPAddress_GetAddressBytes_m3037024450(L_20, /*hidden argument*/NULL);
V_4 = L_21;
IPAddress_t1399971723 * L_22 = V_3;
NullCheck(L_22);
ByteU5BU5D_t3397334013* L_23 = IPAddress_GetAddressBytes_m3037024450(L_22, /*hidden argument*/NULL);
V_5 = L_23;
ByteU5BU5D_t3397334013* L_24 = V_4;
NullCheck(L_24);
ByteU5BU5D_t3397334013* L_25 = V_5;
NullCheck(L_25);
V_9 = (bool)((((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_24)->max_length))))) == ((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_25)->max_length))))))? 1 : 0);
bool L_26 = V_9;
if (L_26)
{
goto IL_00a0;
}
}
IL_0095:
{
ArgumentException_t3259014390 * L_27 = (ArgumentException_t3259014390 *)il2cpp_codegen_object_new(ArgumentException_t3259014390_il2cpp_TypeInfo_var);
ArgumentException__ctor_m3739475201(L_27, _stringLiteral1780020358, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_27);
}
IL_00a0:
{
ByteU5BU5D_t3397334013* L_28 = V_4;
NullCheck(L_28);
V_6 = ((ByteU5BU5D_t3397334013*)SZArrayNew(ByteU5BU5D_t3397334013_il2cpp_TypeInfo_var, (uint32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_28)->max_length))))));
V_7 = 0;
goto IL_00cf;
}
IL_00b0:
{
ByteU5BU5D_t3397334013* L_29 = V_6;
int32_t L_30 = V_7;
ByteU5BU5D_t3397334013* L_31 = V_4;
int32_t L_32 = V_7;
NullCheck(L_31);
IL2CPP_ARRAY_BOUNDS_CHECK(L_31, L_32);
int32_t L_33 = L_32;
uint8_t L_34 = (L_31)->GetAt(static_cast<il2cpp_array_size_t>(L_33));
ByteU5BU5D_t3397334013* L_35 = V_5;
int32_t L_36 = V_7;
NullCheck(L_35);
IL2CPP_ARRAY_BOUNDS_CHECK(L_35, L_36);
int32_t L_37 = L_36;
uint8_t L_38 = (L_35)->GetAt(static_cast<il2cpp_array_size_t>(L_37));
NullCheck(L_29);
IL2CPP_ARRAY_BOUNDS_CHECK(L_29, L_30);
(L_29)->SetAt(static_cast<il2cpp_array_size_t>(L_30), (uint8_t)(((int32_t)((uint8_t)((int32_t)((int32_t)L_34|(int32_t)((int32_t)((int32_t)L_38^(int32_t)((int32_t)255)))))))));
int32_t L_39 = V_7;
V_7 = ((int32_t)((int32_t)L_39+(int32_t)1));
}
IL_00cf:
{
int32_t L_40 = V_7;
ByteU5BU5D_t3397334013* L_41 = V_6;
NullCheck(L_41);
V_9 = (bool)((((int32_t)L_40) < ((int32_t)(((int32_t)((int32_t)(((Il2CppArray *)L_41)->max_length))))))? 1 : 0);
bool L_42 = V_9;
if (L_42)
{
goto IL_00b0;
}
}
IL_00dd:
{
ByteU5BU5D_t3397334013* L_43 = V_6;
IPAddress_t1399971723 * L_44 = (IPAddress_t1399971723 *)il2cpp_codegen_object_new(IPAddress_t1399971723_il2cpp_TypeInfo_var);
IPAddress__ctor_m1440892504(L_44, L_43, /*hidden argument*/NULL);
V_8 = L_44;
IL2CPP_LEAVE(0x119, FINALLY_00fb);
}
IL_00e8:
{
}
IL_00e9:
{
Il2CppObject* L_45 = V_10;
NullCheck(L_45);
bool L_46 = InterfaceFuncInvoker0< bool >::Invoke(1 /* System.Boolean System.Collections.IEnumerator::MoveNext() */, IEnumerator_t1466026749_il2cpp_TypeInfo_var, L_45);
V_9 = L_46;
bool L_47 = V_9;
if (L_47)
{
goto IL_0036;
}
}
IL_00f9:
{
IL2CPP_LEAVE(0x10F, FINALLY_00fb);
}
} // end try (depth: 1)
catch(Il2CppExceptionWrapper& e)
{
__last_unhandled_exception = (Exception_t1927440687 *)e.ex;
goto FINALLY_00fb;
}
FINALLY_00fb:
{ // begin finally (depth: 1)
{
Il2CppObject* L_48 = V_10;
V_9 = (bool)((((Il2CppObject*)(Il2CppObject*)L_48) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0);
bool L_49 = V_9;
if (L_49)
{
goto IL_010e;
}
}
IL_0106:
{
Il2CppObject* L_50 = V_10;
NullCheck(L_50);
InterfaceActionInvoker0::Invoke(0 /* System.Void System.IDisposable::Dispose() */, IDisposable_t2427283555_il2cpp_TypeInfo_var, L_50);
}
IL_010e:
{
IL2CPP_END_FINALLY(251)
}
} // end finally (depth: 1)
IL2CPP_CLEANUP(251)
{
IL2CPP_JUMP_TBL(0x119, IL_0119)
IL2CPP_JUMP_TBL(0x10F, IL_010f)
IL2CPP_RETHROW_IF_UNHANDLED(Exception_t1927440687 *)
}
IL_010f:
{
IL2CPP_RUNTIME_CLASS_INIT(IPAddress_t1399971723_il2cpp_TypeInfo_var);
IPAddress_t1399971723 * L_51 = ((IPAddress_t1399971723_StaticFields*)IPAddress_t1399971723_il2cpp_TypeInfo_var->static_fields)->get_Broadcast_5();
V_8 = L_51;
goto IL_0119;
}
IL_0119:
{
IPAddress_t1399971723 * L_52 = V_8;
return L_52;
}
}
// System.Void Lidgren.Network.NetUtility::Sleep(System.Int32)
extern Il2CppClass* Thread_t241561612_il2cpp_TypeInfo_var;
extern const uint32_t NetUtility_Sleep_m886463228_MetadataUsageId;
extern "C" void NetUtility_Sleep_m886463228 (Il2CppObject * __this /* static, unused */, int32_t ___milliseconds0, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetUtility_Sleep_m886463228_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
{
int32_t L_0 = ___milliseconds0;
IL2CPP_RUNTIME_CLASS_INIT(Thread_t241561612_il2cpp_TypeInfo_var);
Thread_Sleep_m1248422015(NULL /*static, unused*/, L_0, /*hidden argument*/NULL);
return;
}
}
// System.Net.IPAddress Lidgren.Network.NetUtility::CreateAddressFromBytes(System.Byte[])
extern Il2CppClass* IPAddress_t1399971723_il2cpp_TypeInfo_var;
extern const uint32_t NetUtility_CreateAddressFromBytes_m1989273768_MetadataUsageId;
extern "C" IPAddress_t1399971723 * NetUtility_CreateAddressFromBytes_m1989273768 (Il2CppObject * __this /* static, unused */, ByteU5BU5D_t3397334013* ___bytes0, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetUtility_CreateAddressFromBytes_m1989273768_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
IPAddress_t1399971723 * V_0 = NULL;
{
ByteU5BU5D_t3397334013* L_0 = ___bytes0;
IPAddress_t1399971723 * L_1 = (IPAddress_t1399971723 *)il2cpp_codegen_object_new(IPAddress_t1399971723_il2cpp_TypeInfo_var);
IPAddress__ctor_m1440892504(L_1, L_0, /*hidden argument*/NULL);
V_0 = L_1;
goto IL_000a;
}
IL_000a:
{
IPAddress_t1399971723 * L_2 = V_0;
return L_2;
}
}
// System.Byte[] Lidgren.Network.NetUtility::ComputeSHAHash(System.Byte[],System.Int32,System.Int32)
extern Il2CppClass* NetUtility_t3562260209_il2cpp_TypeInfo_var;
extern const uint32_t NetUtility_ComputeSHAHash_m3941709570_MetadataUsageId;
extern "C" ByteU5BU5D_t3397334013* NetUtility_ComputeSHAHash_m3941709570 (Il2CppObject * __this /* static, unused */, ByteU5BU5D_t3397334013* ___bytes0, int32_t ___offset1, int32_t ___count2, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetUtility_ComputeSHAHash_m3941709570_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
ByteU5BU5D_t3397334013* V_0 = NULL;
{
IL2CPP_RUNTIME_CLASS_INIT(NetUtility_t3562260209_il2cpp_TypeInfo_var);
SHA256_t582564463 * L_0 = ((NetUtility_t3562260209_StaticFields*)NetUtility_t3562260209_il2cpp_TypeInfo_var->static_fields)->get_s_sha_4();
ByteU5BU5D_t3397334013* L_1 = ___bytes0;
int32_t L_2 = ___offset1;
int32_t L_3 = ___count2;
NullCheck(L_0);
ByteU5BU5D_t3397334013* L_4 = HashAlgorithm_ComputeHash_m3945506296(L_0, L_1, L_2, L_3, /*hidden argument*/NULL);
V_0 = L_4;
goto IL_0011;
}
IL_0011:
{
ByteU5BU5D_t3397334013* L_5 = V_0;
return L_5;
}
}
// System.Void Lidgren.Network.NetUtility::.cctor()
extern Il2CppClass* Type_t_il2cpp_TypeInfo_var;
extern Il2CppClass* NetUtility_t3562260209_il2cpp_TypeInfo_var;
extern Il2CppClass* Stopwatch_t1380178105_il2cpp_TypeInfo_var;
extern Il2CppCodeGenString* _stringLiteral2740602285;
extern const uint32_t NetUtility__cctor_m1679246969_MetadataUsageId;
extern "C" void NetUtility__cctor_m1679246969 (Il2CppObject * __this /* static, unused */, const MethodInfo* method)
{
static bool s_Il2CppMethodIntialized;
if (!s_Il2CppMethodIntialized)
{
il2cpp_codegen_initialize_method (NetUtility__cctor_m1679246969_MetadataUsageId);
s_Il2CppMethodIntialized = true;
}
{
IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var);
Type_t * L_0 = il2cpp_codegen_get_type((Il2CppMethodPointer)&Type_GetType_m773255995, _stringLiteral2740602285, "Lidgren.Network, Version=2012.1.7.0, Culture=neutral, PublicKeyToken=null");
((NetUtility_t3562260209_StaticFields*)NetUtility_t3562260209_il2cpp_TypeInfo_var->static_fields)->set_IsMono_0((bool)((((int32_t)((((Il2CppObject*)(Type_t *)L_0) == ((Il2CppObject*)(Il2CppObject *)NULL))? 1 : 0)) == ((int32_t)0))? 1 : 0));
IL2CPP_RUNTIME_CLASS_INIT(Stopwatch_t1380178105_il2cpp_TypeInfo_var);
int64_t L_1 = Stopwatch_GetTimestamp_m4156329811(NULL /*static, unused*/, /*hidden argument*/NULL);
((NetUtility_t3562260209_StaticFields*)NetUtility_t3562260209_il2cpp_TypeInfo_var->static_fields)->set_s_timeInitialized_2(L_1);
int64_t L_2 = ((Stopwatch_t1380178105_StaticFields*)Stopwatch_t1380178105_il2cpp_TypeInfo_var->static_fields)->get_Frequency_0();
((NetUtility_t3562260209_StaticFields*)NetUtility_t3562260209_il2cpp_TypeInfo_var->static_fields)->set_s_dInvFreq_3(((double)((double)(1.0)/(double)(((double)((double)L_2))))));
SHA256_t582564463 * L_3 = SHA256_Create_m3464364143(NULL /*static, unused*/, /*hidden argument*/NULL);
((NetUtility_t3562260209_StaticFields*)NetUtility_t3562260209_il2cpp_TypeInfo_var->static_fields)->set_s_sha_4(L_3);
return;
}
}
// System.Void Lidgren.Network.ReceivedFragmentGroup::.ctor()
extern "C" void ReceivedFragmentGroup__ctor_m4190711617 (ReceivedFragmentGroup_t4108580702 * __this, const MethodInfo* method)
{
{
Object__ctor_m2551263788(__this, /*hidden argument*/NULL);
return;
}
}
// Conversion methods for marshalling of: Lidgren.Network.SingleUIntUnion
extern "C" void SingleUIntUnion_t3787661257_marshal_pinvoke(const SingleUIntUnion_t3787661257& unmarshaled, SingleUIntUnion_t3787661257_marshaled_pinvoke& marshaled)
{
marshaled.___SingleValue_0 = unmarshaled.get_SingleValue_0();
marshaled.___UIntValue_1 = unmarshaled.get_UIntValue_1();
}
extern "C" void SingleUIntUnion_t3787661257_marshal_pinvoke_back(const SingleUIntUnion_t3787661257_marshaled_pinvoke& marshaled, SingleUIntUnion_t3787661257& unmarshaled)
{
float unmarshaled_SingleValue_temp_0 = 0.0f;
unmarshaled_SingleValue_temp_0 = marshaled.___SingleValue_0;
unmarshaled.set_SingleValue_0(unmarshaled_SingleValue_temp_0);
uint32_t unmarshaled_UIntValue_temp_1 = 0;
unmarshaled_UIntValue_temp_1 = marshaled.___UIntValue_1;
unmarshaled.set_UIntValue_1(unmarshaled_UIntValue_temp_1);
}
// Conversion method for clean up from marshalling of: Lidgren.Network.SingleUIntUnion
extern "C" void SingleUIntUnion_t3787661257_marshal_pinvoke_cleanup(SingleUIntUnion_t3787661257_marshaled_pinvoke& marshaled)
{
}
// Conversion methods for marshalling of: Lidgren.Network.SingleUIntUnion
extern "C" void SingleUIntUnion_t3787661257_marshal_com(const SingleUIntUnion_t3787661257& unmarshaled, SingleUIntUnion_t3787661257_marshaled_com& marshaled)
{
marshaled.___SingleValue_0 = unmarshaled.get_SingleValue_0();
marshaled.___UIntValue_1 = unmarshaled.get_UIntValue_1();
}
extern "C" void SingleUIntUnion_t3787661257_marshal_com_back(const SingleUIntUnion_t3787661257_marshaled_com& marshaled, SingleUIntUnion_t3787661257& unmarshaled)
{
float unmarshaled_SingleValue_temp_0 = 0.0f;
unmarshaled_SingleValue_temp_0 = marshaled.___SingleValue_0;
unmarshaled.set_SingleValue_0(unmarshaled_SingleValue_temp_0);
uint32_t unmarshaled_UIntValue_temp_1 = 0;
unmarshaled_UIntValue_temp_1 = marshaled.___UIntValue_1;
unmarshaled.set_UIntValue_1(unmarshaled_UIntValue_temp_1);
}
// Conversion method for clean up from marshalling of: Lidgren.Network.SingleUIntUnion
extern "C" void SingleUIntUnion_t3787661257_marshal_com_cleanup(SingleUIntUnion_t3787661257_marshaled_com& marshaled)
{
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
|
8afdb4d04cc71a96e4312399a523dc9dcfd338c2 | a699a508742a0fd3c07901ab690cdeba2544a5d1 | /RailwayDetection/RWDSClient/LineList.cpp | 65bd323e83512844fbab3346531f77f42880f3e8 | [] | no_license | xiaomailong/railway-detection | 2bf92126bceaa9aebd193b570ca6cd5556faef5b | 62e998f5de86ee2b6282ea71b592bc55ee25fe14 | refs/heads/master | 2021-01-17T06:04:48.782266 | 2011-09-27T15:13:55 | 2011-09-27T15:13:55 | 42,157,845 | 0 | 1 | null | 2015-09-09T05:24:10 | 2015-09-09T05:24:09 | null | GB18030 | C++ | false | false | 11,800 | cpp | LineList.cpp | // LineList.cpp : 实现文件
//
#include "stdafx.h"
#include "RWDSClient.h"
#include "LineList.h"
#include "afxdialogex.h"
#include "DataService.h"
#include "CmdDefine.h"
// CLineList 对话框
IMPLEMENT_DYNAMIC(CLineList, CDialogEx)
CLineList::CLineList(CWnd* pParent /*=NULL*/)
: CDialogEx(CLineList::IDD, pParent)
{
m_CRWDSClientView = static_cast<CRWDSClientView*>(pParent);
}
CLineList::~CLineList()
{
}
void CLineList::DoDataExchange(CDataExchange* pDX)
{
CDialogEx::DoDataExchange(pDX);
DDX_Control(pDX, IDC_LINELIST, m_ListCtrl);
DDX_Control(pDX, IDC_LIST_ALLPOINT, m_ListAllPoint);
DDX_Control(pDX, IDC_LIST_SELETED, m_ListSelectedPoint);
}
BEGIN_MESSAGE_MAP(CLineList, CDialogEx)
ON_BN_CLICKED(IDC_BTN_LINEADD, &CLineList::OnBnClickedBtnLineadd)
ON_BN_CLICKED(IDC_BTN_LINEMODIFY, &CLineList::OnClickedBtnLinemodify)
ON_BN_CLICKED(IDC_BTN_LINEDELETE, &CLineList::OnClickedBtnLinedelete)
ON_BN_CLICKED(IDC_BTN_LINEOK, &CLineList::OnClickedBtnLineok)
ON_NOTIFY(LVN_ITEMCHANGED, IDC_LINELIST, &CLineList::OnLvnItemchangedLinelist)
ON_NOTIFY(NM_DBLCLK, IDC_LINELIST, &CLineList::OnNMDblclkLinelist)
ON_NOTIFY(LVN_ENDLABELEDIT, IDC_LINELIST, &CLineList::OnLvnEndlabeleditLinelist)
ON_BN_CLICKED(IDC_BTN_ADD1, &CLineList::OnBnClickedBtnAdd1)
ON_BN_CLICKED(IDC_BTN_REMOVE1, &CLineList::OnBnClickedBtnRemove1)
END_MESSAGE_MAP()
// CLineList 消息处理程序
BOOL CLineList::OnInitDialog()
{
CDialogEx::OnInitDialog();
// TODO: 在此添加额外的初始化
m_ListCtrl.SetExtendedStyle(LVS_EX_FULLROWSELECT|LVS_EX_GRIDLINES);
CRect clientRect;
m_ListCtrl.GetClientRect(&clientRect);
m_ListCtrl.InsertColumn(0, _T("路线名"), LVCFMT_LEFT, clientRect.Width()/4);
m_ListCtrl.InsertColumn(1, _T("路线编号"), LVCFMT_LEFT, clientRect.Width()/4);
m_ListCtrl.InsertColumn(2, _T("开始(KM)"), LVCFMT_LEFT, clientRect.Width()/4);
m_ListCtrl.InsertColumn(3, _T("结束(KM)"), LVCFMT_LEFT, clientRect.Width()/4);
//m_ListCtrl.InsertColumn(4, _T("终端"), LVCFMT_LEFT, clientRect.Width()/5);
int count = m_CRWDSClientView->m_CurrentOrg->iLine.size();
CString id;
CString name;
CString startKm;
CString endKm;
for (int i=0; i<count; i++)
{
id.Format(_T("%d"), m_CRWDSClientView->m_CurrentOrg->iLine[i]->iLineID);
name = m_CRWDSClientView->m_CurrentOrg->iLine[i]->iLineName;
if (m_CRWDSClientView->m_CurrentOrg->iLine[i]->iLineKmLonLat.size() > 0)
{
startKm.Format(_T("%.0f"), m_CRWDSClientView->m_CurrentOrg->iLine[i]->iLineKmLonLat[0]->iKM);
endKm.Format(_T("%.0f"), m_CRWDSClientView->m_CurrentOrg->iLine[i]->iLineKmLonLat[m_CRWDSClientView->m_CurrentOrg->iLine[i]->iLineKmLonLat.size()-1]->iKM);
}
else
{
startKm = _T("");
endKm = _T("");
}
m_ListCtrl.InsertItem(i, name);
m_ListCtrl.SetItemText(i, 1, id);
m_ListCtrl.SetItemText(i, 2, startKm);
m_ListCtrl.SetItemText(i, 3, endKm);
}
return TRUE; // return TRUE unless you set the focus to a control
// 异常: OCX 属性页应返回 FALSE
}
//void CLineList::StrLineKmToLineKm( CString aStrLine, RailLine& aRailLine, double& aKm )
//{//宝成线100公里转换成RailLine与Km格式
// aStrLine.Delete(aStrLine.GetLength()-StrKm.GetLength(), StrKm.GetLength());
// for (int i=0; i<RailLineNameCount; i++)
// {
// if(aStrLine.Find(RailLineName[i]) == 0)
// {
// aRailLine = static_cast<RailLine>(i);
// aStrLine.Delete(0, RailLineName[i].GetLength());
// aKm = _ttoi(aStrLine);
// break;
// }
// }
//}
void CLineList::OnBnClickedBtnLineadd()
{
// TODO: 在此添加控件通知处理程序代码
LineInfo* line = new LineInfo;
line->iLineID = 1;
line->iOrgID = m_CRWDSClientView->m_CurrentOrg->iOrgID;
line->iLineName = _T("线路");
line->iStartKm = m_CRWDSClientView->m_CurrentOrg->iMapPoint[0]->iKM;
line->iLineKmLonLat.push_back(m_CRWDSClientView->m_CurrentOrg->iMapPoint[0]);
line->iLineKmTime.push_back(0);
line->iStartNo = KFirstDay;
GetDlgItem(IDC_EDIT_LINEREMARK)->GetWindowText(line->iLineRemark);
m_CRWDSClientView->m_CurrentOrg->iLine.push_back(line);
SetOrgLine(m_CRWDSClientView->m_CurrentOrg->iOrgID, CMD_LINE_ADD, line);
CString id;
CString name;
CString startKm;
CString endKm;
int count = m_ListCtrl.GetItemCount();
id.Format(_T("%d"), line->iLineID);
startKm.Format(_T("%.2f"), line->iStartKm);
endKm.Format(_T("%.2f"), line->iLineKmLonLat[line->iLineKmLonLat.size()-1]->iKM);
name = line->iLineName;
m_ListCtrl.InsertItem(count, name);
m_ListCtrl.SetItemText(count, 1, id);
m_ListCtrl.SetItemText(count, 2, startKm);
m_ListCtrl.SetItemText(count, 3, endKm);
}
void CLineList::OnClickedBtnLinemodify()
{
// TODO: 在此添加控件通知处理程序代码
POSITION pos;
pos = m_ListCtrl.GetFirstSelectedItemPosition();
int select = m_ListCtrl.GetNextSelectedItem(pos);
if (select<0)
{
return;
}
LineInfo* line = m_CRWDSClientView->m_CurrentOrg->iLine[select];
GetDlgItem(IDC_EDIT_LINENAME)->GetWindowText(line->iLineName);
GetDlgItem(IDC_EDIT_LINEREMARK)->GetWindowText(line->iLineRemark);
AfxMessageBox(_T("修改成功"), MB_OK);
m_ListCtrl.SetItemText(select, 0, line->iLineName);
SetOrgLine(m_CRWDSClientView->m_CurrentOrg->iOrgID, CMD_LINE_MODIFY, line);
}
void CLineList::OnClickedBtnLinedelete()
{
// TODO: 在此添加控件通知处理程序代码
int select = m_ListCtrl.GetSelectionMark();
if (select < 0)
return;
LineInfo* line = m_CRWDSClientView->m_CurrentOrg->iLine[select];
m_CRWDSClientView->m_CurrentOrg->iLine.erase(m_CRWDSClientView->m_CurrentOrg->iLine.begin()+select);
m_ListCtrl.DeleteItem(select);
m_ListAllPoint.ResetContent();
m_ListSelectedPoint.ResetContent();
//清除员工设置的线
//StaffInfo* staff;
//for (size_t i=0; i<m_CRWDSClientView->m_CurrentOrg->iStaff.size(); i++)
//{
// staff = m_CRWDSClientView->m_CurrentOrg->iStaff[i];
// for (size_t j=0; j<staff->iArrangeLine.size(); j++)
// {
// if(line == staff->iArrangeLine[j])
// {
// staff->iArrangeLine.erase(staff->iArrangeLine.begin()+j);
// SetOrgStaff(m_CRWDSClientView->m_CurrentOrg->iOrgID, CMD_STAFF_MODIFY, staff);
// break;
// }
// }
//}
SetOrgLine(m_CRWDSClientView->m_CurrentOrg->iOrgID, CMD_LINE_DELETE, line);
delete line;
}
void CLineList::OnClickedBtnLineok()
{
// TODO: 在此添加控件通知处理程序代码
OnOK();
}
void CLineList::OnLvnItemchangedLinelist(NMHDR *pNMHDR, LRESULT *pResult)
{
LPNMLISTVIEW pNMLV = reinterpret_cast<LPNMLISTVIEW>(pNMHDR);
// TODO: 在此添加控件通知处理程序代码
// 得到项目索引
POSITION pos;
pos = m_ListCtrl.GetFirstSelectedItemPosition();
int select = m_ListCtrl.GetNextSelectedItem(pos);
if (select<0)
{
return;
}
CString str;
//GetDlgItem(IDC_EDIT_LINEREMARK)->SetWindowText(_T(""));
m_ListAllPoint.ResetContent();
m_ListSelectedPoint.ResetContent();
m_Selected.clear();
m_Unselected.clear();
LineInfo* line = m_CRWDSClientView->m_CurrentOrg->iLine[select];
GetDlgItem(IDC_EDIT_LINEREMARK)->SetWindowText(line->iLineRemark);
GetDlgItem(IDC_EDIT_LINENAME)->SetWindowText(line->iLineName);
str.Format(_T("%d"), line->iLineID);
GetDlgItem(IDC_EDIT_LINEID)->SetWindowText(str);
for (size_t i=0; i<m_CRWDSClientView->m_CurrentOrg->iMapPoint.size(); i++)
{//根据已选点与未选点加载界面
bool addSelect = FALSE;
for (size_t j=0; j<line->iLineKmLonLat.size(); j++)
{
if (m_CRWDSClientView->m_CurrentOrg->iMapPoint[i] == line->iLineKmLonLat[j])
{
addSelect = TRUE;
break;
}
}
ENCODERAILWAYFULLNAME(str, m_CRWDSClientView->m_CurrentOrg->iMapPoint[i]->iRailLine->iRailName,
m_CRWDSClientView->m_CurrentOrg->iMapPoint[i]->iKM,
m_CRWDSClientView->m_CurrentOrg->iMapPoint[i]->iDirect);
if (addSelect)
{
m_ListSelectedPoint.AddString(str);
m_Selected.push_back(m_CRWDSClientView->m_CurrentOrg->iMapPoint[i]);
}
else
{
m_ListAllPoint.AddString(str);
m_Unselected.push_back(m_CRWDSClientView->m_CurrentOrg->iMapPoint[i]);
}
}
*pResult = 0;
}
void CLineList::OnNMDblclkLinelist(NMHDR *pNMHDR, LRESULT *pResult)
{//双击listctrl编辑线路名
LPNMITEMACTIVATE pNMItemActivate = reinterpret_cast<LPNMITEMACTIVATE>(pNMHDR);
// TODO: 在此添加控件通知处理程序代码
//POSITION pos = m_ListCtrl.GetFirstSelectedItemPosition();
//int tIndex = m_ListCtrl.GetNextSelectedItem(pos);
//if ( tIndex >= 0 )
//{
// m_ListCtrl.SetFocus();
// CEdit* pEdit = m_ListCtrl.EditLabel( tIndex );
//}
*pResult = 0;
}
void CLineList::OnLvnEndlabeleditLinelist(NMHDR *pNMHDR, LRESULT *pResult)
{//完成线路名编辑
NMLVDISPINFO *pDispInfo = reinterpret_cast<NMLVDISPINFO*>(pNMHDR);
// TODO: 在此添加控件通知处理程序代码
//CString pName = pDispInfo->item.pszText;
//int tIndex = pDispInfo->item.iItem;
//m_ListCtrl.SetFocus();
//if( ( ! pName.IsEmpty() ) && tIndex >= 0 )
//{
// m_ListCtrl.SetItemText( tIndex, 0, pName);
//}
*pResult = 0;
}
void CLineList::OnBnClickedBtnAdd1()
{
// TODO: 在此添加控件通知处理程序代码
int index = m_ListAllPoint.GetCurSel();
if (index<0)
return;
MapPoint* point = m_Unselected[index];
m_Unselected.erase(m_Unselected.begin()+index);
m_Selected.push_back(point);
POSITION pos;
pos = m_ListCtrl.GetFirstSelectedItemPosition();
int select = m_ListCtrl.GetNextSelectedItem(pos);
if (select<0)
{
return;
}
LineInfo* line = m_CRWDSClientView->m_CurrentOrg->iLine[select];
line->iLineKmLonLat.push_back(point);
line->iLineKmTime.push_back(0);//为新加点设置时间
//SetOrgLine(m_CRWDSClientView->m_CurrentOrg->iOrgID, CMD_LINE_MODIFY, line);
CString str;
ENCODERAILWAYFULLNAME(str, point->iRailLine->iRailName, point->iKM, point->iDirect);
m_ListSelectedPoint.InsertString(m_ListSelectedPoint.GetCount(), str);
m_ListAllPoint.DeleteString(index);
str.Format(_T("%.0f"), line->iLineKmLonLat[0]->iKM);
m_ListCtrl.SetItemText(select, 2, str);
str.Format(_T("%.0f"), point->iKM);
m_ListCtrl.SetItemText(select, 3, str);
}
void CLineList::OnBnClickedBtnRemove1()
{
// TODO: 在此添加控件通知处理程序代码
int index = m_ListSelectedPoint.GetCurSel();
if (index<0)
return;
MapPoint* point = m_Selected[index];
m_Selected.erase(m_Selected.begin()+index);
m_Unselected.push_back(point);
POSITION pos;
pos = m_ListCtrl.GetFirstSelectedItemPosition();
int select = m_ListCtrl.GetNextSelectedItem(pos);
if (select<0)
{
return;
}
LineInfo* line = m_CRWDSClientView->m_CurrentOrg->iLine[select];
line->iLineKmLonLat.erase(line->iLineKmLonLat.begin()+index);
line->iLineKmTime.erase(line->iLineKmTime.begin()+index);
//SetOrgLine(m_CRWDSClientView->m_CurrentOrg->iOrgID, CMD_LINE_MODIFY, line);
CString str;
if (line->iLineKmLonLat.size() != 0)
{
str.Format(_T("%.0f"), line->iLineKmLonLat[0]->iKM);
m_ListCtrl.SetItemText(select, 2, str);
str.Format(_T("%.0f"), line->iLineKmLonLat[line->iLineKmLonLat.size()-1]->iKM);
m_ListCtrl.SetItemText(select, 3, str);
}
else
{
m_ListCtrl.SetItemText(select, 2, _T(""));
m_ListCtrl.SetItemText(select, 3, _T(""));
}
ENCODERAILWAYFULLNAME(str, point->iRailLine->iRailName, point->iKM, point->iDirect);
m_ListAllPoint.InsertString(m_ListAllPoint.GetCount(), str);
m_ListSelectedPoint.DeleteString(index);
}
|
b29d35db9b6ae5e9079b443be9b4daa199d5720a | febf32873cd46c5cd143f9bf878c43f0c0073825 | /Parallelogram.h | 94892770da9a748490a29971f086d40de31a9b9b | [] | no_license | natali1821/figures | 81d5265b99ee65c10f79e2980d89b59cc790ee56 | 5d1f55ece4721913f9e0a8121434bba14e42054c | refs/heads/master | 2023-03-22T06:56:52.690958 | 2021-03-15T15:35:49 | 2021-03-15T15:35:49 | 348,019,175 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 378 | h | Parallelogram.h | #ifndef PARALLELOGRAM_H_INCLUDED
#define PARALLELOGRAM_H_INCLUDED
#include "Figure.h"
class Parallelogram : public Figure {
public:
Parallelogram(double a, double b, double angle);
double calculateP() const override;
double calculateS() const override;
protected:
double _a, _b, _angle;
const double PI = 3.14159265;
};
#endif // PARALLELOGRAM_H_INCLUDED
|
6a77ecd7f1e60c6f94268d01de616b18f4ac3fa0 | df5423ea65e7679a80725a5b9f252caaf5289296 | /Q2.Anagrams_check.cpp | 8f57a48b2954a4a1aecd8baf07bb3adb3fa48349 | [] | no_license | abhyamgupta123/DSA-Assignment-questions | 6e696e8dab00892654137eb15d1ea57374e40bf4 | f5a578fa3bbd2c915c385c4ab70dbc51f01b74d3 | refs/heads/master | 2020-08-10T01:18:42.309764 | 2019-10-10T21:08:09 | 2019-10-10T21:08:09 | 214,220,140 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,637 | cpp | Q2.Anagrams_check.cpp | //assumption overhere is that you only giving the only one anagram pairs to be checked by the code.
#include <bits/stdc++.h>
using namespace std;
string st(string s1){ //this function converts the given string into all lower cases charachters.
string temp1;
int j=0;
while (s1[j]){
char ch = s1[j]; //declaring the single charchter.
ch=tolower(ch);
temp1=temp1+ch; //gradually making the new modified reuired string
j++;
}
return temp1;
}
int count(string s1, char c){ //this function counts the occurance of given word in the string.
int counter=0;
for (int i=0;i<s1.length();i++){
if (s1[i]==c){
counter++;
}
}
return counter;
}
void to_check(string a, string b){
bool flag=true;
a=st(a);
b=st(b);
int for_a;
int for_b;
int i=0;
while(a[i]){ //checking the charchters of original string charchter by charachter.
for_a=count(a,a[i]); //counting the occurance of given no. of letters in a
for_b=count(b,a[i]); //counting the occurance of given no. of letters in a
if (for_a!=for_b){
break;
flag=false;
}
else if (for_a==for_b){
i++;
}
}
if (flag==true){
cout<<"yes the given two words are anagram"<<endl;
}
else if (flag==false){
cout<<"no the given words are not anagram"<<endl;
}
}
int main(){
string s1;
string s2;
cout<<"enter the orignal string"<<endl;
cin>>s1;
cout<<"enter the string to be checked as anagram"<<endl;
cin>>s2;
to_check(s1,s2);
}
|
1c08d8c71a20c16f81725dcabcfaadf42d3cb7ef | 297497957c531d81ba286bc91253fbbb78b4d8be | /third_party/libwebrtc/modules/audio_processing/transient/wpd_tree.cc | 0408e4ae89bd3562ed22fda2044ecc377698fe70 | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | marco-c/gecko-dev-comments-removed | 7a9dd34045b07e6b22f0c636c0a836b9e639f9d3 | 61942784fb157763e65608e5a29b3729b0aa66fa | refs/heads/master | 2023-08-09T18:55:25.895853 | 2023-08-01T00:40:39 | 2023-08-01T00:40:39 | 211,297,481 | 0 | 0 | NOASSERTION | 2019-09-29T01:27:49 | 2019-09-27T10:44:24 | C++ | UTF-8 | C++ | false | false | 3,078 | cc | wpd_tree.cc |
#include "modules/audio_processing/transient/wpd_tree.h"
#include <string.h>
#include "modules/audio_processing/transient/wpd_node.h"
#include "rtc_base/checks.h"
namespace webrtc {
WPDTree::WPDTree(size_t data_length,
const float* high_pass_coefficients,
const float* low_pass_coefficients,
size_t coefficients_length,
int levels)
: data_length_(data_length),
levels_(levels),
num_nodes_((1 << (levels + 1)) - 1) {
RTC_DCHECK_GT(data_length, (static_cast<size_t>(1) << levels));
RTC_DCHECK(high_pass_coefficients);
RTC_DCHECK(low_pass_coefficients);
RTC_DCHECK_GT(levels, 0);
nodes_.reset(new std::unique_ptr<WPDNode>[num_nodes_ + 1]);
const float kRootCoefficient = 1.f;
nodes_[1].reset(new WPDNode(data_length, &kRootCoefficient, 1));
size_t index = 1;
size_t index_left_child = 0;
size_t index_right_child = 0;
int num_nodes_at_curr_level = 0;
for (int current_level = 0; current_level < levels; ++current_level) {
num_nodes_at_curr_level = 1 << current_level;
for (int i = 0; i < num_nodes_at_curr_level; ++i) {
index = (1 << current_level) + i;
index_left_child = index * 2;
index_right_child = index_left_child + 1;
nodes_[index_left_child].reset(new WPDNode(nodes_[index]->length() / 2,
low_pass_coefficients,
coefficients_length));
nodes_[index_right_child].reset(new WPDNode(nodes_[index]->length() / 2,
high_pass_coefficients,
coefficients_length));
}
}
}
WPDTree::~WPDTree() {}
WPDNode* WPDTree::NodeAt(int level, int index) {
if (level < 0 || level > levels_ || index < 0 || index >= 1 << level) {
return NULL;
}
return nodes_[(1 << level) + index].get();
}
int WPDTree::Update(const float* data, size_t data_length) {
if (!data || data_length != data_length_) {
return -1;
}
int update_result = nodes_[1]->set_data(data, data_length);
if (update_result != 0) {
return -1;
}
size_t index = 1;
size_t index_left_child = 0;
size_t index_right_child = 0;
int num_nodes_at_curr_level = 0;
for (int current_level = 0; current_level < levels_; ++current_level) {
num_nodes_at_curr_level = 1 << current_level;
for (int i = 0; i < num_nodes_at_curr_level; ++i) {
index = (1 << current_level) + i;
index_left_child = index * 2;
index_right_child = index_left_child + 1;
update_result = nodes_[index_left_child]->Update(nodes_[index]->data(),
nodes_[index]->length());
if (update_result != 0) {
return -1;
}
update_result = nodes_[index_right_child]->Update(
nodes_[index]->data(), nodes_[index]->length());
if (update_result != 0) {
return -1;
}
}
}
return 0;
}
}
|
6aca2af7f3235fe9cb0fa3ce456898f5bc7bdba6 | 9eafdefb2871414922546f51536aab94ae233ba7 | /src/qt/qwt/qwt_matrix_raster_data.h | d13a0acc78aa9e469cc1836dbfe3a897e6f0171f | [
"MIT"
] | permissive | dzimbeck/BitBay | e8efd61752e2427f601f3d32043b22e82fd88e35 | 8ac692d0b02bea2cec21b828de0d2606a02c67bd | refs/heads/master | 2022-02-03T22:24:58.728968 | 2022-01-04T14:22:37 | 2022-01-04T14:22:37 | 56,190,831 | 29 | 23 | MIT | 2018-10-04T10:44:09 | 2016-04-13T22:41:46 | C++ | UTF-8 | C++ | false | false | 2,121 | h | qwt_matrix_raster_data.h | /* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
* Qwt Widget Library
* Copyright (C) 1997 Josef Wilgen
* Copyright (C) 2002 Uwe Rathmann
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the Qwt License, Version 1.0
*****************************************************************************/
#ifndef QWT_MATRIX_RASTER_DATA_H
#define QWT_MATRIX_RASTER_DATA_H
#include "qwt_global.h"
#include "qwt_raster_data.h"
template <typename T> class QVector;
/*!
\brief A class representing a matrix of values as raster data
QwtMatrixRasterData implements an interface for a matrix of
equidistant values, that can be used by a QwtPlotRasterItem.
It implements a couple of resampling algorithms, to provide
values for positions, that or not on the value matrix.
*/
class QWT_EXPORT QwtMatrixRasterData: public QwtRasterData
{
public:
/*!
\brief Resampling algorithm
The default setting is NearestNeighbour;
*/
enum ResampleMode
{
/*!
Return the value from the matrix, that is nearest to the
the requested position.
*/
NearestNeighbour,
/*!
Interpolate the value from the distances and values of the
4 surrounding values in the matrix,
*/
BilinearInterpolation
};
QwtMatrixRasterData();
virtual ~QwtMatrixRasterData();
void setResampleMode(ResampleMode mode);
ResampleMode resampleMode() const;
void setInterval( Qt::Axis, const QwtInterval & );
virtual QwtInterval interval( Qt::Axis axis) const QWT_OVERRIDE QWT_FINAL;
void setValueMatrix( const QVector<double> &values, int numColumns );
const QVector<double> valueMatrix() const;
void setValue( int row, int col, double value );
int numColumns() const;
int numRows() const;
virtual QRectF pixelHint( const QRectF & ) const QWT_OVERRIDE;
virtual double value( double x, double y ) const QWT_OVERRIDE;
private:
void update();
class PrivateData;
PrivateData *d_data;
};
#endif
|
a1d6a1e0505c659e1debcbee9b241fd659821d7d | a5b56f286982ad0c162a2d61783d7378609d547b | /program1/program1.cpp | 89b7c194fc5ffc7597364833eb281000eccc18c6 | [] | no_license | alex-emily-justin-mckenzie/project01 | 3d7d26a37b7822393e9292547f877a8c2bcac1a4 | dc1469dae124472597b9bd130e44f3cc2b59c9ac | refs/heads/master | 2020-07-13T07:56:35.779388 | 2019-08-30T01:47:38 | 2019-08-30T01:47:38 | 205,039,099 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,144 | cpp | program1.cpp | // Justin Foster - Program 1
// August 28, 2019 - CS201
#include <iostream>
#include <string>
#include <ctime>
#include <cmath>
#include <cstdlib>
using namespace std;
//Declaration of functions
int diceRoll();
int playerTurn(int& playerScore); //Both of these functions using bass-by-reference to keep the score updated throughout turns
int cpuTurn(int& cpuScore);
int main()
{
srand(time(0)); //setting random time
int playerScore = 0;
int cpuScore = 0;
cout << "Did user roll first previous game? (Y)es or (N)o." << endl;
string choice;
cin >> choice;
while (!(choice == "Y" || "y" || "N" || "n"))
{
cout << "Please enter Y or N." << endl;
}
if (choice == "Y" || choice =="y")
{
while (playerScore < 50 || cpuScore < 50)
{
playerTurn(playerScore);
cpuTurn(cpuScore);
cout << "Current scores - You: " << playerScore << ". Computer: " << cpuScore << "." << endl;
if (playerScore >= 50 || cpuScore >= 50)
{
break;
}
}
}
if (choice == "n" || choice == "N")
{
while (playerScore < 50 || cpuScore < 50)
{
cpuTurn(cpuScore);
playerTurn(playerScore);
cout << "Current scores - You: " << playerScore << ". Computer: " << cpuScore << "." << endl;
if (playerScore >= 50 || cpuScore >= 50)
{
break;
}
}
}
if (playerScore >= 50)
{
cout << "Congratulations, you win! Score: " << playerScore << endl;
}
if (cpuScore >= 50)
{
cout << "You got beat by a computer! CPU score: " << cpuScore << endl;
}
}
//Definition of Functions
int diceRoll() //Function to roll the dice
{
int dice;
dice = 1 + rand() % 6;
return dice;
}
int playerTurn(int& playerScore)
{
int score = 0;
int pot = 0;
string rollOrHold;
cout << "Player turn. Would you like to (R)oll or (H)old?" << endl;
cin >> rollOrHold;
while (!(rollOrHold == "r" || "R" || "h" || "H"))
{
cout << "Please enter R or H." << endl;
cin >> rollOrHold;
}
do
{
int score = diceRoll(); //assigned function call to value
cout << "Dice roll: " << score;
if (score == 1)
{
pot = 0;
cout << " Bust! Pot set to zero. " << endl;
break;
}
else (score > 1);
{
pot += score;
cout << " Dice roll: " << score << " Player Score: " << playerScore << " Pot: " << pot << endl;
cout << "Player turn. Would you like to (R)oll or (H)old?" << endl;
cin >> rollOrHold;
}
} while (rollOrHold == "r" || rollOrHold == "R");
if(rollOrHold == "h" || rollOrHold == "H")
{
playerScore += pot;
cout << "Player score: " << playerScore << endl;
}
return playerScore;
}
int cpuTurn(int& cpuScore)
{
int score = 0;
int pot = 0;
cout << "Computer Turn. " << endl;
while (pot <= 20)
{
score = diceRoll();
if (score == 1)
{
cout << "Computer bust. " << endl;
break;
}
else (score > 1);
{
pot += score;
cout << "Dice roll: " << score << " Pot: " << pot << endl;
}
}
if (pot >= 20)
{
cpuScore += pot;
cout << "Computer score: " << cpuScore << endl;
}
return cpuScore;
} |
1d8304b86fe034caf282ec8d67139317c1aa7d10 | c12dc233139fc8aa95877e6081e671c4a972b091 | /RSTACK/IlcRSTACKDebugHit.h | a427414af8dee2d3bb48bf077bdd80b05afcd97d | [] | no_license | yanqicw/ORKA-ILCRoot | b4be984cb9f1991b0c174da7428366af4973ef84 | 6e66c4cbae6835586274a385bee9bed254a63976 | refs/heads/master | 2020-04-01T02:27:50.942859 | 2012-12-03T17:51:10 | 2012-12-03T17:51:10 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,317 | h | IlcRSTACKDebugHit.h | #ifndef ILCRSTACKHIT_H
#define ILCRSTACKHIT_H
/* 2012-2013 Infrastructure for Large Collider Experiment. *
* All rights reserved. *
* See cxx source for full Copyright notice */
/* $Id: IlcRSTACKebugHit.h 7865 2003-07-13 09:26:14Z hristov $ */
//_________________________________________________________________________
// Hits class for RSTACK
// A hit in RSTACK is the sum of all hits in a single crystal
//
//*-- Author: Maxime Volkov (RRC KI) & Yves Schutz (SUBATECH)
// --- ROOT system ---
#include <TLorentzVector.h>
// --- IlcRoot header files ---
#include "IlcHit.h"
// --- Standard library ---
class IlcRSTACKHit : public IlcHit {
friend ostream& operator << (ostream&, const IlcRSTACKHit&) ;
public:
IlcRSTACKHit() {
// default ctor
}
IlcRSTACKHit(const IlcRSTACKHit & hit) ;
IlcRSTACKHit(Int_t shunt, Int_t primary, Int_t tracknumber, Int_t id, Float_t *hits, Int_t pid, TLorentzVector p, Float_t *xy);
virtual ~IlcRSTACKHit(void) {
// dtor
}
Float_t GetEnergy(void) const {
// returns the energy loss for this hit
return fELOS ;
}
Int_t GetId(void) const {
// return the identificator of this his
return fId ;
}
Int_t GetPid(void) const {
// return the particle PDG code which initiates this hit
return fPid ;
}
Int_t GetPrimary(void) const {
// returns the primary particle id at the origine of this hit
return fPrimary ;
}
TLorentzVector GetMomentum() { return fMomentum; }
// momentum of the particle which initiated this hit
Bool_t operator == (IlcRSTACKHit const &rValue) const ;
IlcRSTACKHit operator + (const IlcRSTACKHit& rValue) ;
private:
Int_t fId ; // Absolute Id number of RSTACK Xtal or PPSD pad
Float_t fELOS ; // Energy deposited
Int_t fPid ; // type of the particle that initiates that hit
Int_t fPrimary ; // Primary particles at the origine of the hit
TLorentzVector fMomentum; // 4-momentum of the particle
ClassDef(IlcRSTACKHit,1) // Hit for RSTACK
} ;
//////////////////////////////////////////////////////////////////////////////
#endif // ILCRSTACKHIT_H
|
37b5180b80ec4ab223dee4c8bf380616cd591f16 | 665dc0007545cec787c36f05555b360a8fe9e604 | /test/test_ClikObject.cpp | 0ec5e678dcfe667dc1c12c8f62b982446d0cc11f | [] | no_license | hdp1213/pc_multinest | 439a20d82c5a537d83055afa0653d41bc64340a3 | 812bad29280e9088f9debeff4dae91356965d8dc | refs/heads/master | 2020-03-22T02:46:41.273764 | 2020-02-19T12:15:08 | 2020-02-19T12:15:08 | 139,392,488 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,159 | cpp | test_ClikObject.cpp | #include "ClikObject.hpp"
#include <iostream>
#include <stdexcept>
using namespace std;
int main(int argc, char const *argv[])
{
const string lo_l_clik_file = string(PLIK_LOW_L_FILE_DIR) \
+ "/lowl_SMW_70_dx11d_2014_10_03_v5c_Ap.clik/";
vector<param_t> lo_params = {A_planck};
ClikObject* lo_l_clik(0);
#ifdef LITE_HI_L
const std::string hi_l_clik_file = std::string(PLIK_HI_L_FILE_DIR) \
+ "/plik_lite_v18_TTTEEE.clik/";
#else
const std::string hi_l_clik_file = std::string(PLIK_HI_L_FILE_DIR) \
+ "/plik_dx11dr2_HM_v18_TTTEEE.clik/";
#endif
vector<param_t> hi_params = {
#ifndef LITE_HI_L
A_cib_217,
cib_index,
xi_sz_cib,
A_sz,
ps_A_100_100,
ps_A_143_143,
ps_A_143_217,
ps_A_217_217,
ksz_norm,
gal545_A_100,
gal545_A_143,
gal545_A_143_217,
gal545_A_217,
galf_EE_A_100,
galf_EE_A_100_143,
galf_EE_A_100_217,
galf_EE_A_143,
galf_EE_A_143_217,
galf_EE_A_217,
galf_EE_index,
galf_TE_A_100,
galf_TE_A_100_143,
galf_TE_A_100_217,
galf_TE_A_143,
galf_TE_A_143_217,
galf_TE_A_217,
galf_TE_index,
bleak_epsilon_0_0T_0E,
bleak_epsilon_1_0T_0E,
bleak_epsilon_2_0T_0E,
bleak_epsilon_3_0T_0E,
bleak_epsilon_4_0T_0E,
bleak_epsilon_0_0T_1E,
bleak_epsilon_1_0T_1E,
bleak_epsilon_2_0T_1E,
bleak_epsilon_3_0T_1E,
bleak_epsilon_4_0T_1E,
bleak_epsilon_0_0T_2E,
bleak_epsilon_1_0T_2E,
bleak_epsilon_2_0T_2E,
bleak_epsilon_3_0T_2E,
bleak_epsilon_4_0T_2E,
bleak_epsilon_0_1T_1E,
bleak_epsilon_1_1T_1E,
bleak_epsilon_2_1T_1E,
bleak_epsilon_3_1T_1E,
bleak_epsilon_4_1T_1E,
bleak_epsilon_0_1T_2E,
bleak_epsilon_1_1T_2E,
bleak_epsilon_2_1T_2E,
bleak_epsilon_3_1T_2E,
bleak_epsilon_4_1T_2E,
bleak_epsilon_0_2T_2E,
bleak_epsilon_1_2T_2E,
bleak_epsilon_2_2T_2E,
bleak_epsilon_3_2T_2E,
bleak_epsilon_4_2T_2E,
bleak_epsilon_0_0E_0E,
bleak_epsilon_1_0E_0E,
bleak_epsilon_2_0E_0E,
bleak_epsilon_3_0E_0E,
bleak_epsilon_4_0E_0E,
bleak_epsilon_0_0E_1E,
bleak_epsilon_1_0E_1E,
bleak_epsilon_2_0E_1E,
bleak_epsilon_3_0E_1E,
bleak_epsilon_4_0E_1E,
bleak_epsilon_0_0E_2E,
bleak_epsilon_1_0E_2E,
bleak_epsilon_2_0E_2E,
bleak_epsilon_3_0E_2E,
bleak_epsilon_4_0E_2E,
bleak_epsilon_0_1E_1E,
bleak_epsilon_1_1E_1E,
bleak_epsilon_2_1E_1E,
bleak_epsilon_3_1E_1E,
bleak_epsilon_4_1E_1E,
bleak_epsilon_0_1E_2E,
bleak_epsilon_1_1E_2E,
bleak_epsilon_2_1E_2E,
bleak_epsilon_3_1E_2E,
bleak_epsilon_4_1E_2E,
bleak_epsilon_0_2E_2E,
bleak_epsilon_1_2E_2E,
bleak_epsilon_2_2E_2E,
bleak_epsilon_3_2E_2E,
bleak_epsilon_4_2E_2E,
calib_100T,
calib_217T,
calib_100P,
calib_143P,
calib_217P,
A_pol,
#endif
A_planck
};
ClikObject* hi_l_clik(0);
try {
lo_l_clik = new ClikObject(lo_l_clik_file, lo_params);
hi_l_clik = new ClikObject(hi_l_clik_file, hi_params);
}
catch (exception& e) {
cerr << "[ERROR] " << e.what() << endl;
return -1;
}
delete lo_l_clik;
delete hi_l_clik;
return 0;
}
|
900e172f6540356503228605d2d193750bbe849e | e7df6d41d7e04dc1c4f4ed169bf530a8a89ff17c | /OpenSim/Tests/Wrapping/testMuscleLengthRegression.cpp | 4f3a17221aeb84790e3d9127a7ca2c35f11e6386 | [
"Apache-2.0"
] | permissive | opensim-org/opensim-core | 2ba11c815df3072166644af2f34770162d8fc467 | aeaaf93b052d598247dd7d7922fdf8f2f2f4c0bb | refs/heads/main | 2023-09-04T05:50:54.783630 | 2023-09-01T22:44:04 | 2023-09-01T22:44:04 | 20,775,600 | 701 | 328 | Apache-2.0 | 2023-09-14T17:45:19 | 2014-06-12T16:57:56 | C++ | UTF-8 | C++ | false | false | 4,534 | cpp | testMuscleLengthRegression.cpp | /* -------------------------------------------------------------------------- *
* OpenSim: testMuscleLengthRegression.cpp *
* -------------------------------------------------------------------------- *
* The OpenSim API is a toolkit for musculoskeletal modeling and simulation. *
* See http://opensim.stanford.edu and the NOTICE file for more information. *
* OpenSim is developed at Stanford University and supported by the US *
* National Institutes of Health (U54 GM072970, R24 HD065690) and by DARPA *
* through the Warrior Web program. *
* *
* Copyright (c) 2005-2023 Stanford University and the Authors *
* *
* Licensed under the Apache License, Version 2.0 (the "License"); you may *
* not use this file except in compliance with the License. You may obtain a *
* copy of the License at http://www.apache.org/licenses/LICENSE-2.0. *
* *
* Unless required by applicable law or agreed to in writing, software *
* distributed under the License is distributed on an "AS IS" BASIS, *
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
* See the License for the specific language governing permissions and *
* limitations under the License. *
* -------------------------------------------------------------------------- */
#include <OpenSim/OpenSim.h>
#include <OpenSim/Actuators/ModelOperators.h>
#include <SimTKcommon.h>
#define CATCH_CONFIG_MAIN
#include <OpenSim/Auxiliary/catch.hpp>
namespace {
using OpenSim::TimeSeriesTable;
TimeSeriesTable createMuscleLengthsTable(const OpenSim::Model& model,
const TimeSeriesTable& coordinates) {
auto statesTraj = OpenSim::StatesTrajectory::createFromStatesTable(
model, coordinates, true, true, true);
TimeSeriesTable lengths;
const auto& muscleSet = model.getMuscles();
for (const auto& state : statesTraj) {
model.realizePosition(state);
SimTK::RowVector lengthsRow(muscleSet.getSize());
for (int imuscle = 0; imuscle < muscleSet.getSize(); ++imuscle) {
const auto& muscle = muscleSet.get(imuscle);
const auto& geometryPath = muscle.getGeometryPath();
lengthsRow[imuscle] = geometryPath.getLength(state);
}
lengths.appendRow(state.getTime(), lengthsRow);
}
std::vector<std::string> labels;
for (int imuscle = 0; imuscle < muscleSet.getSize(); ++imuscle) {
const auto& muscle = muscleSet.get(imuscle);
const auto& path = muscle.getAbsolutePathString();
labels.push_back(path + "|length");
}
lengths.setColumnLabels(labels);
return lengths;
}
}
using namespace OpenSim;
TEST_CASE("Rajagopal2016, 18 muscles") {
Model model("subject_walk_armless_18musc.osim");
model.initSystem();
TableProcessor tableProcessor =
TableProcessor("subject_walk_armless_coordinates.mot") |
TabOpUseAbsoluteStateNames();
TimeSeriesTable coordinates =
tableProcessor.processAndConvertToRadians(model);
TimeSeriesTable lengths = createMuscleLengthsTable(model, coordinates);
TimeSeriesTable stdLengths(
"std_testMuscleLengthRegression_subject_walk_armless.sto");
CHECK(SimTK::Test::numericallyEqual(
lengths.getMatrix(), stdLengths.getMatrix(),
static_cast<int>(lengths.getNumColumns()), 1e-6));
}
TEST_CASE("Gait10dof18musc") {
Model model("walk_gait1018_subject01.osim");
model.initSystem();
TableProcessor tableProcessor =
TableProcessor("walk_gait1018_state_reference.mot") |
TabOpUseAbsoluteStateNames();
TimeSeriesTable coordinates =
tableProcessor.processAndConvertToRadians(model);
TimeSeriesTable lengths = createMuscleLengthsTable(model, coordinates);
TimeSeriesTable stdLengths(
"std_testMuscleLengthRegression_walk_gait1018.sto");
CHECK(SimTK::Test::numericallyEqual(
lengths.getMatrix(), stdLengths.getMatrix(),
static_cast<int>(lengths.getNumColumns()), 1e-6));
}
|
28ca98916a60127934cee2759d53a17a4f32679b | fdc86a784a21f0ff755f62d70256febefbc83416 | /mainwindow.cpp | a54fa203f11d7f3826ba3e6d47bdb76c332ba787 | [] | no_license | labstreaminglayer/App-Cognionics | ad3bf70dc1bdaa72573fd9933c51b49bad24e4df | 205066ccc2a112c2230e94df76ec020110ad5f84 | refs/heads/master | 2021-01-24T22:26:44.586971 | 2018-11-25T03:36:54 | 2018-11-25T03:36:54 | 123,280,592 | 3 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 10,347 | cpp | mainwindow.cpp | #include "mainwindow.h"
#include "ui_mainwindow.h"
#include <boost/property_tree/ptree.hpp>
#include <boost/property_tree/xml_parser.hpp>
#include <boost/algorithm/string.hpp>
#include <boost/lexical_cast.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/foreach.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
const int impedance_cycle_length = 4; // cycle length for the impedance signal
const int samples_per_chunk = 32; // the chunk granularity at which we transmit data into LSL
const double value_scale = 1000000.0/4294967296.0; // rescaling from 32-bit integers to microvolts
MainWindow::MainWindow(QWidget *parent, const std::string &config_file) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
// parse startup config file
load_config(config_file);
// make GUI connections
QObject::connect(ui->actionQuit, SIGNAL(triggered()), this, SLOT(close()));
QObject::connect(ui->linkButton, SIGNAL(clicked()), this, SLOT(link_cognionics()));
QObject::connect(ui->actionLoad_Configuration, SIGNAL(triggered()), this, SLOT(load_config_dialog()));
QObject::connect(ui->actionSave_Configuration, SIGNAL(triggered()), this, SLOT(save_config_dialog()));
}
void MainWindow::load_config_dialog() {
QString sel = QFileDialog::getOpenFileName(this,"Load Configuration File","","Configuration Files (*.cfg)");
if (!sel.isEmpty())
load_config(sel.toStdString());
}
void MainWindow::save_config_dialog() {
QString sel = QFileDialog::getSaveFileName(this,"Save Configuration File","","Configuration Files (*.cfg)");
if (!sel.isEmpty())
save_config(sel.toStdString());
}
void MainWindow::closeEvent(QCloseEvent *ev) {
if (reader_thread_)
ev->ignore();
}
void MainWindow::load_config(const std::string &filename) {
using boost::property_tree::ptree;
ptree pt;
// parse file
try {
read_xml(filename, pt);
} catch(std::exception &e) {
QMessageBox::information(this,"Error",(std::string("Cannot read config file: ")+= e.what()).c_str(),QMessageBox::Ok);
return;
}
// get config values
try {
ui->comPort->setValue(pt.get<int>("settings.comport",1));
ui->samplingRate->setValue(pt.get<int>("settings.samplingrate",250));
ui->channelCount->setValue(pt.get<int>("settings.channelcount",24));
ui->stripImpedance->setChecked(pt.get<bool>("settings.stripimpedance",false));
ui->channelLabels->clear();
BOOST_FOREACH(ptree::value_type &v, pt.get_child("channels.labels"))
ui->channelLabels->appendPlainText(v.second.data().c_str());
} catch(std::exception &) {
QMessageBox::information(this,"Error in Config File","Could not read out config parameters.",QMessageBox::Ok);
return;
}
}
void MainWindow::save_config(const std::string &filename) {
using boost::property_tree::ptree;
ptree pt;
// transfer UI content into property tree
try {
pt.put("settings.comport",ui->comPort->value());
pt.put("settings.samplingrate",ui->samplingRate->value());
pt.put("settings.channelcount",ui->channelCount->value());
pt.put("settings.stripimpedance",ui->stripImpedance->checkState() == Qt::Checked);
std::vector<std::string> channelLabels;
boost::algorithm::split(channelLabels,ui->channelLabels->toPlainText().toStdString(),boost::algorithm::is_any_of("\n"));
BOOST_FOREACH(std::string &v, channelLabels)
pt.add("channels.labels.label", v);
} catch(std::exception &e) {
QMessageBox::critical(this,"Error",(std::string("Could not prepare settings for saving: ")+=e.what()).c_str(),QMessageBox::Ok);
}
// write to disk
try {
write_xml(filename, pt);
} catch(std::exception &e) {
QMessageBox::critical(this,"Error",(std::string("Could not write to config file: ")+=e.what()).c_str(),QMessageBox::Ok);
}
}
// start/stop the cognionics connection
void MainWindow::link_cognionics() {
if (reader_thread_) {
// === perform unlink action ===
try {
stop_ = true;
reader_thread_->interrupt();
reader_thread_->join();
reader_thread_.reset();
} catch(std::exception &e) {
QMessageBox::critical(this,"Error",(std::string("Could not stop the background processing: ")+=e.what()).c_str(),QMessageBox::Ok);
return;
}
// indicate that we are now successfully unlinked
ui->linkButton->setText("Link");
} else {
// === perform link action ===
HANDLE hPort = NULL;
try {
// get the UI parameters...
int comPort = ui->comPort->value();
int samplingRate = ui->samplingRate->value();
int channelCount = ui->channelCount->value();
bool stripImpedance = ui->stripImpedance->checkState() == Qt::Checked;
std::vector<std::string> channelLabels;
boost::algorithm::split(channelLabels,ui->channelLabels->toPlainText().toStdString(),boost::algorithm::is_any_of("\n"));
if (channelLabels.size() != channelCount)
throw std::runtime_error("The number of channels labels does not match the channel count device setting.");
// try to open the serial port
std::string fname = "\\\\.\\COM" + boost::lexical_cast<std::string>(comPort);
hPort = CreateFileA(fname.c_str(),GENERIC_READ|GENERIC_WRITE,0,0,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,0);
if (hPort == INVALID_HANDLE_VALUE)
throw std::runtime_error("Could not open serial port. Please make sure that the device is paired (pairing code 0000) and that you have the right serial port number.");
//setup serial port parameters
DCB dcbSerialParams = {0};
if (!GetCommState(hPort, &dcbSerialParams))
QMessageBox::critical(this,"Error","Could not get COM port state.",QMessageBox::Ok);
dcbSerialParams.BaudRate=1500000;
dcbSerialParams.ByteSize=8;
dcbSerialParams.StopBits=ONESTOPBIT;
dcbSerialParams.Parity=NOPARITY;
if(!SetCommState(hPort, &dcbSerialParams))
QMessageBox::critical(this,"Error","Could not set baud rate.",QMessageBox::Ok);
// try to set timeouts
COMMTIMEOUTS timeouts = {0};
timeouts.ReadIntervalTimeout = 500;
timeouts.ReadTotalTimeoutConstant = 50;
timeouts.ReadTotalTimeoutMultiplier = 10;
timeouts.WriteTotalTimeoutConstant = 50;
timeouts.WriteTotalTimeoutMultiplier = 10;
if (!SetCommTimeouts(hPort,&timeouts))
QMessageBox::critical(this,"Error","Could not set COM port timeouts.",QMessageBox::Ok);
// start reading
stop_ = false;
reader_thread_.reset(new boost::thread(&MainWindow::read_thread,this,hPort,comPort,samplingRate,channelCount,channelLabels,stripImpedance));
}
catch(std::exception &e) {
if (hPort != INVALID_HANDLE_VALUE)
CloseHandle(hPort);
QMessageBox::critical(this,"Error",(std::string("Could not initialize the Cognionics interface: ")+=e.what()).c_str(),QMessageBox::Ok);
return;
}
// done, all successful
ui->linkButton->setText("Unlink");
}
}
// background data reader thread
void MainWindow::read_thread(HANDLE hPort, int comPort, int samplingRate, int channelCount, std::vector<std::string> channelLabels, bool stripImpedance) {
try {
// create streaminfo
lsl::stream_info info("Cognionics","EEG",channelCount,samplingRate,lsl::cf_float32,"Cognionics_C" + boost::lexical_cast<std::string>(comPort));
// append some meta-data
lsl::xml_element channels = info.desc().append_child("channels");
for (int k=0;k<channelLabels.size();k++) {
channels.append_child("channel")
.append_child_value("label",channelLabels[k].c_str())
.append_child_value("type","EEG")
.append_child_value("unit","microvolts");
}
info.desc().append_child("acquisition")
.append_child_value("manufacturer","Cognionics");
// make a new outlet
lsl::stream_outlet outlet(info,samples_per_chunk);
// reserve memory
std::vector<float> sample(channelCount);
// send impedance command
DWORD dwBytesWritten = 0;
unsigned char cmd_stripimp = 0x12;
unsigned char cmd_keepimp = 0x11;
if (stripImpedance)
WriteFile(hPort,(LPSTR)&cmd_stripimp,1,&dwBytesWritten,NULL);
else
WriteFile(hPort,(LPSTR)&cmd_keepimp,1,&dwBytesWritten,NULL);
unsigned char temp, cur_counter;
int msb, lsb2, lsb1;
unsigned long bytes_read;
int last_counter=0;
unsigned long sample_index=0;
int last_skip_index = 0;
int skipped_total=0;
std::vector<std::vector<float> > impedance_buffer(impedance_cycle_length,std::vector<float>(channelCount));
// scan for the sync byte to find the beginning of the next sample
temp = 0;
while (temp != 0xFF)
ReadFile(hPort,&temp,1,&bytes_read,NULL);
// enter transmission loop
while (!stop_) {
// receive sample counter value
ReadFile(hPort,&cur_counter,1,&bytes_read,NULL);
// determine how many samples were skipped (missed due to packet loss)
int samples_skipped = cur_counter-last_counter-1;
if (samples_skipped < 0)
samples_skipped += 128;
if (samples_skipped > 40 && sample_index>1500+last_skip_index)
last_skip_index = sample_index; // debug breakpoint
skipped_total += samples_skipped;
last_counter = cur_counter;
// insert dummy samples for every skipped sample
for (int k=0;k<samples_skipped;k++)
outlet.push_sample(impedance_buffer[sample_index++ % impedance_cycle_length]);
// receive next sample
for(int c=0; c < channelCount; c++) {
ReadFile(hPort,&temp,1,&bytes_read,NULL);
msb = temp;
ReadFile(hPort,&temp,1,&bytes_read,NULL);
lsb2 = temp;
ReadFile(hPort,&temp,1,&bytes_read,NULL);
lsb1 = temp;
sample[c] = (double)((msb<<24) | (lsb2<<17) | (lsb1<<10)) * value_scale;
}
// confirm that the sample is complete (i.e., sync byte is next)
ReadFile(hPort,&temp,1,&bytes_read,NULL);
if (temp == stripImpedance?0x11:0x10) {
// sample insert into impedance buffer and push into the outlet
impedance_buffer[sample_index++ % impedance_cycle_length] = sample;
outlet.push_sample(sample);
} else {
// the sample was lost, replace it by the contents of the impedance buffer
outlet.push_sample(impedance_buffer[sample_index++ % impedance_cycle_length]);
}
// ... and scan forward until we got the next sync byte
temp = 0;
while (temp != 0xFF)
ReadFile(hPort,&temp,1,&bytes_read,NULL);
}
}
catch(boost::thread_interrupted &e) {
// thread was interrupted: no error
}
catch(std::exception &e) {
// any other error
QMessageBox::critical(this,"Error",(std::string("Error during processing: ")+=e.what()).c_str(),QMessageBox::Ok);
}
CloseHandle(hPort);
}
MainWindow::~MainWindow() {
delete ui;
}
|
3f130b4e80b08f1f08752e7dd6dd729636ea0510 | 8a0f440ab4e2f94786114358609a39c0ccfc12c4 | /old/Particle.cpp | aed10d7d68167435b07393163a3fcec67088c3d0 | [] | no_license | michaelwilkie/Yoshis-Island2 | 8829bbe427db5107500ef97c6799d04cc99bad5b | f6856f8e1ecbb91242f51a12fc8e72def6f79e39 | refs/heads/master | 2018-11-24T00:58:59.683003 | 2018-10-30T20:56:35 | 2018-10-30T20:56:35 | 104,089,007 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 307 | cpp | Particle.cpp | /*#include "Particle.h"
Particle::Particle(int x, int y)
{
//Set offsets
mPosX = x - 5 + (rand() % 25);
mPosY = y - 5 + (rand() % 25);
}
void Particle::render()
{
//Show image
mTexture->render(mPosX, mPosY);
//Show shimmer
//Animate
mFrame++;
}
bool Particle::isDead()
{
return mFrame > 10;
}*/ |
16300c925cb1bc7cbac433609c4b962003512ede | 5fb996563e366c1a4f3eed41d932e719679a3e71 | /a20j ladders/Caesar's Legions.cpp | 35895ee7cfa11e2e7439d368e47a589d86e688ac | [] | no_license | rijusougata13/A2oj-solution | 3474a7d5c71ab296184a2249c489d398e2d714f1 | fd0da6c0c36fcf35397140b7fa5ddb7e42117bcd | refs/heads/master | 2023-01-02T12:04:38.115291 | 2020-10-31T08:42:04 | 2020-10-31T08:42:04 | 307,930,643 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 5,422 | cpp | Caesar's Legions.cpp | /*
░██████╗░█████╗░██╗░░░██╗░██████╗░░█████╗░████████╗░█████╗░
██╔════╝██╔══██╗██║░░░██║██╔════╝░██╔══██╗╚══██╔══╝██╔══██╗
╚█████╗░██║░░██║██║░░░██║██║░░██╗░███████║░░░██║░░░███████║
░╚═══██╗██║░░██║██║░░░██║██║░░╚██╗██╔══██║░░░██║░░░██╔══██║
██████╔╝╚█████╔╝╚██████╔╝╚██████╔╝██║░░██║░░░██║░░░██║░░██║
╚═════╝░░╚════╝░░╚═════╝░░╚═════╝░╚═╝░░╚═╝░░░╚═╝░░░╚═╝░░╚═╝
███████████████████████████
███████▀▀▀░░░░░░░▀▀▀███████
████▀░░░░░░░░░░░░░░░░░▀████
███│░░░░░░░░░░░░░░░░░░░│███
██▌│░░░░░░░░░░░░░░░░░░░│▐██
██░└┐░░░░░░░░░░░░░░░░░┌┘░██
██░░└┐░░░░░░░░░░░░░░░┌┘░░██
██░░┌┘▄▄▄▄▄░░░░░▄▄▄▄▄└┐░░██
██▌░│██████▌░░░▐██████│░▐██
███░│▐███▀▀░░▄░░▀▀███▌│░███
██▀─┘░░░░░░░▐█▌░░░░░░░└─▀██
██▄░░░▄▄▄▓░░▀█▀░░▓▄▄▄░░░▄██
████▄─┘██▌░░░░░░░▐██└─▄████
█████░░▐█─┬┬┬┬┬┬┬─█▌░░█████
████▌░░░▀┬┼┼┼┼┼┼┼┬▀░░░▐████
█████▄░░░└┴┴┴┴┴┴┴┘░░░▄█████
███████▄░░░░░░░░░░░▄███████
██████████▄▄▄▄▄▄▄██████████
███████████████████████████
*/
#include <bits/stdc++.h>
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <map>
#define ll long long
#define ul unsigned long long
#define modu 100000000
#define f(i,j, n) for (ll i = j; i < n; i++)
#define fo(i, j, n) for (ll i = j; i >=0; i--)
#define print(x) cout << x << endl
#define gi(x) scanf("%lld",&x)
#define gc(x) scanf("%s",&x)
#define all(o) (o).begin(), (o).end()
using namespace std;
void solve(void);
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
#ifndef ONLINE_JUDGE
// For getting input from input.txt file
freopen("input.txt", "r", stdin);
// Printing the Output to output.txt file
freopen("output.txt", "w", stdout);
#endif
long long t = 1;
// cin >> t;
while (t--)
solve();
#ifndef ONLINE_JUDGE
cout << "\nTime Elapsed: " << 1.0 * clock() / CLOCKS_PER_SEC << " sec\n";
#endif
return 0;
}
struct activity {
ll marks, essay;
};
bool activity_compare(activity s1, activity s2) {
if (s1.essay == s2.essay)
return s1.marks < s2.marks;
return s1.essay < s2.essay;
}
ll ncr(ll n, ll k)
{
ll res = 1;
if (k > n - k)
k = n - k;
for (ll i = 0; i < k; ++i) {
res *= (n - i);
res /= (i + 1);
}
return res;
}
ll max(ll a, ll b)
{
return (a > b) ? a : b;
}
ll min(ll a, ll b)
{
return (a < b) ? a : b;
}
ll k1, k2;
ll dp[101][101][11][11];
ll get( ll n1, ll n2, ll a, ll b) {
if (n1 + n2 == 0)return 1;
if (dp[n1][n2][a][b] != -1)return dp[n1][n2][a][b];
ll x = 0;
if (n1 > 0 && a > 0)
x = get( n1 - 1, n2, a - 1, k2);
ll y = 0;
if (n2 > 0 && b > 0)
y = get( n1, n2 - 1, k1, b - 1);
return dp[n1][n2][a][b] = ((x + y) % modu);
}
void solve(void)
{
ll n, m;
cin >> n >> m >> k1 >> k2;
f(i, 0, n + 1) {
f(j, 0, m + 1) {
f(k, 0, k1 + 1) {
f(l, 0, k2 + 1)
dp[i][j][k][l] = -1;
}
}
}
ll ans = get( n, m, k1, k2);
print(ans);
}
|
90ddbd204d4636e88dc3cde8af05246867092fad | aabbf50f01c8b0dc7631896a9d8220f032dde1dc | /beauty_test/iterator/iterator_category/bidirectional_iterator_tag.hpp | bbd6cc7b93f197264e65b359cb4b4a78735acef2 | [] | no_license | privateos/RewritingOfSTL | 24696f9ddd313d946614f24b249200001d73aabe | 0a507c2f8cd3d62d1ffd34a785c7db866b78f2d9 | refs/heads/master | 2022-04-04T05:26:35.120314 | 2020-01-27T10:54:22 | 2020-01-27T10:54:22 | 236,470,359 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 436 | hpp | bidirectional_iterator_tag.hpp |
#ifndef include___beauty__iterator__iterator_category___forward_iterator_tag_hpp
#define include___beauty__iterator__iterator_category___forward_iterator_tag_hpp
#include<./beauty/iterator/iterator_category/forward_iterator_tag.hpp>
#endif
namespace beauty{namespace iterator{namespace iterator_category{
struct bidirectional_iterator_tag:
public beauty::iterator::iterator_category::forward_iterator_tag{};
}
}
} |
83bef0f81f642457f270c94d6a09bbf8e9d4cfc2 | 73ac765d4f54b9184c4775d40bb054c58d55d1f4 | /code/skinnedmesh.hpp | cdfda34dc1d56f6e5c730d10a15d63dc9156abfc | [] | no_license | yixu34/RestlessMoon2 | b495accf9f7b73775387ddc5e22b82139bdb1394 | 7eeb9381dbbd1cf4a74530e19b0689d840b79ca1 | refs/heads/master | 2020-05-27T11:19:48.460066 | 2012-08-02T23:36:16 | 2012-08-02T23:36:16 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,576 | hpp | skinnedmesh.hpp | #ifndef SKINNEDMESH_HPP
#define SKINNEDMESH_HPP
#include <boost/shared_ptr.hpp>
#include <string>
#include <vector>
#include <d3dx9.h>
#include "resource.hpp"
#include "renderable.hpp"
#include "mesh.hpp"
#include "texture.hpp"
#include "effect.hpp"
#include "allocmeshhierarchy.hpp"
class SkinnedMesh;
typedef boost::shared_ptr<SkinnedMesh> SkinnedMeshPtr;
typedef ResourceCache<SkinnedMesh> SkinnedMeshCache;
extern SkinnedMeshCache skinnedMeshCache;
// This is the resource.
class SkinnedMesh : public Renderable, public Resource
{
public:
SkinnedMesh();
~SkinnedMesh();
void unload();
void timepass();
void render();
void renderSubset(int subset);
void renderFrames(int subset);
bool isStatic() const;
ID3DXMesh *getMeshData() const;
ID3DXAnimationController *getNewController() const;
private:
SkinnedMesh(const SkinnedMesh &other);
SkinnedMesh &operator=(const SkinnedMesh &other);
bool loadData(const std::string &filename);
void renderFrame(FRAME *frame, int subset);
void setupBoneMatrices(FRAME *frame, LPD3DXMATRIX parentMatrix);
void updateFrameMatrices(FRAME *frame, LPD3DXMATRIX parentMatrix);
MESHCONTAINER *m_pFirstMesh; // The first mesh in the hierarchy
LPD3DXFRAME m_pFrameRoot; // Frame hierarchy of the model
LPD3DXMATRIX m_pBoneMatrices; // Used when calculating the bone position
UINT m_uMaxBones; // The Max number of bones for the model
//Animation
LPD3DXANIMATIONCONTROLLER m_pAnimController;// Controller for the animations
};
#endif |
5945d323c61b53cc74fefa9af8b49cbc16c8d48c | 3d631872e5cd31da7b0e186e5a08a65980f2d04c | /Sokoban/source_code/ui/num_draw.cpp | 53be0c3104701d1caea7061c342ec87eb8c332d1 | [] | no_license | Philip-Teh/MyGame | 8fd2783dd50fd1b69b710d7eb1f48cdbefd34402 | 8ed2fa1a77ebeb7200463078a3654b11b9f02ca1 | refs/heads/master | 2022-10-12T17:36:44.966098 | 2020-06-15T05:04:38 | 2020-06-15T05:04:38 | 221,345,799 | 0 | 0 | null | null | null | null | SHIFT_JIS | C++ | false | false | 1,602 | cpp | num_draw.cpp | using namespace std;
void CNumDraw::Init(float sizeX, float sizeY)
{
mTexture = "asset/texture/number/number.png";
//ポインタ作成
mpNumber = make_unique<CNumber>();
mpNumber->Init(mTexture, sizeX, sizeY);
mDigit = NUMBER_DIGIT;
//描画最大数を計算
mCounterStop = 1;
for (int i = 0;i < mDigit;i++)
{
mCounterStop *= 10;
}
mCounterStop--;
}
void CNumDraw::InitGreen(float sizeX, float sizeY)
{
mTexture = "asset/texture/number/numbergreen.png";
//ポインタ作成
mpNumber = make_unique<CNumber>();
mpNumber->Init(mTexture, sizeX, sizeY);
mDigit = NUMBER_DIGIT;
//描画最大数を計算
mCounterStop = 1;
for (int i = 0; i < mDigit; i++)
{
mCounterStop *= 10;
}
mCounterStop--;
}
void CNumDraw::Uninit(void)
{
mpNumber->Uninit();
}
void CNumDraw::Draw(XMFLOAT3 position, int num)
{
//カウンターストップ(カンスト処理)
if (num >= mCounterStop)
num = mCounterStop;
if (num <= 0)
num = 0;
int digit = mpNumber->GetDigit(num);
//数値の右から描画
for (int i = 0;i < digit;i++)
{
mpNumber->Draw(XMFLOAT3(position.x - (float)NUMBER_WIDTH*i, position.y,position.z), num % 10);
num /= 10;
}
}
void CNumDraw::Draw(XMFLOAT3 position, int num,int tw,int th)
{
//カウンターストップ(カンスト処理)
if (num >= mCounterStop)
num = mCounterStop;
if (num <= 0)
num = 0;
int digit = mpNumber->GetDigit(num);
//数値の右から描画
for (int i = 0; i < digit; i++)
{
mpNumber->Draw(XMFLOAT3(position.x - (float)NUMBER_WIDTH * i, position.y, position.z), num % 10, tw, th);
num /= 10;
}
} |
2d08a1eefc3e7e614e7289106c567ce1c6f319d1 | cc744d590c6c8907912e75622a497db9f05fbb1b | /myMonitor.h | 24309c9f367beca721e66f22c30125e8aef5a74a | [] | no_license | opalkonrad/monitor_producer_consumer | 8a1f0e5d04a8b8ca5ae2e22a281aa219d3a8a889 | 259576a8904185db63343838072c259d1eac1967 | refs/heads/master | 2020-04-22T01:47:50.741278 | 2019-02-10T20:49:16 | 2019-02-10T20:49:16 | 170,025,367 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 404 | h | myMonitor.h | #include "monitor.h"
#define TABSIZE 10
struct Elements
{
int elems[TABSIZE];
bool isRead;
int length, first, last;
};
class MonitorAC : public Monitor
{
};
class MyMonitor : private Monitor
{
private:
MonitorAC monitor_ac;
Elements buff;
Condition empty, full, read;
void add(int id);
int get();
void print();
public:
MyMonitor();
void producer();
void consumer(int id);
}; |
9ae60ed6ed05155e344e998502dd6faa4ff7a014 | bdd9f3cdabe0c768641cf61855a6f24174735410 | /src/external/3rd/library/maya5/include/maya/MFnPartition.h | b20920f2dc24f3d9419be1323ec766d61f8ab178 | [] | no_license | SWG-Source/client-tools | 4452209136b376ab369b979e5c4a3464be28257b | 30ec3031184243154c3ba99cedffb2603d005343 | refs/heads/master | 2023-08-31T07:44:22.692402 | 2023-08-28T04:34:07 | 2023-08-28T04:34:07 | 159,086,319 | 15 | 47 | null | 2022-04-15T16:20:34 | 2018-11-25T23:57:31 | C++ | UTF-8 | C++ | false | false | 2,951 | h | MFnPartition.h |
#ifndef _MFnPartition
#define _MFnPartition
//
// *****************************************************************************
//
// Copyright (C) 1997-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MFnPartition
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MFnPartition)
//
// MFnPartition is the function partition that is used for manipulating
// partitions of objects. Partitions in Maya are dependency nodes, so it
// is possible for one partition to contain others.
//
// A partition is a list of dependency nodes and dag nodes. Partitions
// are useful for keeping track of lists of objects for many purposes such
// as selection or applying common rendering parameters. Partitions in
// Maya are also dependency nodes, so it is possible for one partition to
// contain others..
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MFnDependencyNode.h>
#include <maya/MString.h>
#include <maya/MObject.h>
// *****************************************************************************
// DECLARATIONS
class MObjectArray;
class MSelectionList;
class MDagPath;
// *****************************************************************************
// CLASS DECLARATION (MFnPartition)
/// Function Partition for Partitions of Objects
/**
Function partition for partitions of objects
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYA_EXPORT MFnPartition : public MFnDependencyNode
{
declareMFn(MFnPartition, MFnDependencyNode);
public:
///
enum Restriction {
///
kNone,
///
kVerticesOnly,
///
kEdgesOnly,
///
kFacetsOnly,
///
kEditPointsOnly,
///
kRenderableOnly
};
///
MObject create( bool isRenderPartition = false,
MStatus * ReturnStatus = NULL );
///
bool isRenderPartition( MStatus * ReturnStatus = NULL ) const;
///
MStatus addMember( const MObject &set );
///
MStatus removeMember( const MObject &set );
protected:
// No protected members
private:
// No private members
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MFnPartition */
|
03a10695d9faea9c0c6403f6a0a7e0503a902759 | db8dfd7ef00432842d187335ca6598341edc1922 | /escher/include/escher/tab_view_data_source.h | 62cf29921d3b6e7c5f8890381f767c60db81a74d | [] | no_license | EmilieNumworks/epsilon | a60746285ede5a603916e5dc9361a689926f0fbd | bb3baa7466f39f32b285f2d14b6dc1f28e22e7a5 | refs/heads/master | 2023-01-28T20:49:55.903580 | 2022-09-02T13:15:05 | 2022-09-02T13:15:05 | 102,631,554 | 1 | 0 | null | 2017-09-06T16:20:48 | 2017-09-06T16:20:48 | null | UTF-8 | C++ | false | false | 390 | h | tab_view_data_source.h | #ifndef ESCHER_TAB_VIEW_DATA_SOURCE_H
#define ESCHER_TAB_VIEW_DATA_SOURCE_H
extern "C" {
#include <stdint.h>
}
namespace Escher {
class TabViewDataSource {
public:
TabViewDataSource();
int activeTab() const;
int selectedTab() const;
void setSelectedTab(int index);
void setActiveTab(int index);
private:
int8_t m_activeChildIndex;
int8_t m_selectedChildIndex;
};
}
#endif
|
2cd281a012652d088ac8bda799358e1a54688b07 | 75aad4831e513b05b342849eb7ae7a4c24fa7178 | /src/parse_stream.cpp | 0d780dac0e3de4af4792b03f1ba3ed6197539db0 | [
"MIT"
] | permissive | aurtg/open-david | 6583897977f019be1dccad9c9690caf8a300feea | 26922b8b9f35ee749f44e56a599aa5e7136024e2 | refs/heads/master | 2020-03-28T02:55:14.792348 | 2018-12-28T00:34:23 | 2018-12-28T00:34:23 | 147,606,710 | 12 | 2 | null | null | null | null | UTF-8 | C++ | false | false | 3,607 | cpp | parse_stream.cpp | #include "./parse.h"
namespace dav
{
namespace parse
{
stream_t::stream_t(std::istream *is)
: m_is(is), m_row(1), m_column(1), m_readsize(0), m_filesize(0)
{
if (m_is != &std::cin)
m_filesize = dav::filesize(*is);
}
stream_t::stream_t(const filepath_t &path)
: m_row(1), m_column(1), m_readsize(0)
{
m_is_new.reset(new std::ifstream(path));
if (m_is_new->good())
{
m_is = m_is_new.get();
m_filesize = dav::filesize(*m_is);
}
else
throw exception_t(format("parse::stream_t cannot open \"%s\"", path.c_str()));
}
int stream_t::get()
{
size_t idx = m_readsize % SIZE_BUFFER;
if (m_buffer.length() - idx >= SIZE_BUFFER)
idx += SIZE_BUFFER;
assert(idx <= m_buffer.length());
if (idx < m_buffer.length())
{
++m_readsize;
return m_buffer.at(idx);
}
else
{
char c = m_is->get();
if (c != std::istream::traits_type::eof())
{
m_buffer.push_back(c);
++m_readsize;
if (m_buffer.length() >= SIZE_BUFFER * 2)
m_buffer = m_buffer.substr(SIZE_BUFFER);
}
return c;
}
}
void stream_t::unget()
{
--m_readsize;
}
char stream_t::get(const condition_t &f)
{
char c = get();
if (c != std::istream::traits_type::eof())
{
if (f(c))
{
if (c == '\n')
{
++m_row;
m_column = 1;
}
else
++m_column;
return c;
}
else
{
unget();
return 0;
}
}
else
return -1;
}
bool stream_t::peek(const condition_t &c) const
{
size_t idx = m_readsize % SIZE_BUFFER;
if (m_buffer.length() - idx >= SIZE_BUFFER)
idx += SIZE_BUFFER;
assert(idx <= m_buffer.length());
char ch = (idx < m_buffer.length()) ? m_buffer.at(idx) : static_cast<char>(m_is->peek());
return c(ch);
}
string_t stream_t::read(const formatter_t &f)
{
format_result_e past = FMT_READING;
string_t out;
auto pos = position();
char ch = get();
int n_endl = 0;
while (not bad(ch))
{
format_result_e res = f(out + ch);
switch (res)
{
case FMT_BAD:
switch (past)
{
case FMT_GOOD:
unget();
break;
default:
out = "";
restore(pos);
break;
}
goto END_READ;
default:
out += ch;
ch = get();
break;
}
past = res;
}
END_READ:
for (const auto &c : out)
{
if (c == '\n')
{
++m_row;
m_column = 1;
}
else
++m_column;
}
return out;
}
void stream_t::ignore(const condition_t &f)
{
char ch = get(f);
while (not bad(ch))
ch = get(f);
}
void stream_t::skip()
{
do ignore(space);
while (read(comment));
}
stream_t::stream_pos_t stream_t::position() const
{
return stream_pos_t(m_row, m_column, m_readsize);
}
void stream_t::restore(const stream_pos_t &pos)
{
size_t diff = m_readsize - std::get<2>(pos);
for (size_t i = 0; i < diff; ++i)
unget();
m_row = std::get<0>(pos);
m_column = std::get<1>(pos);
assert(m_readsize == std::get<2>(pos));
}
exception_t stream_t::exception(const string_t &str) const
{
return exception_t(str + format(" at line %d, column %d.", row(), column()));
}
}
}
|
be590a3f1974b3f1dbed9d168feaba5c288a0833 | 4d405f617444dd34e7cc95a940c4b5f75922fffe | /Source/DirectoryExplorerTreeViewItem.cpp | 6decea690155c266e86fb12d460e5a066a0f5dbb | [] | no_license | Jacob-Rose/SamplifyPlus-JUCE | 2818edcd12119f9d48d308a5568b540e89c9dfd8 | 14fc9a59dee51bdcc08f61bf8b55054ea47f9a7d | refs/heads/master | 2023-04-07T18:38:03.468624 | 2023-03-25T21:39:17 | 2023-03-25T21:39:17 | 170,420,927 | 4 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 6,112 | cpp | DirectoryExplorerTreeViewItem.cpp | #include "DirectoryExplorerTreeViewItem.h"
#include "SamplifyMainComponent.h"
#include "SamplifyProperties.h"
#include "SamplifyLookAndFeel.h"
using namespace samplify;
DirectoryExplorerTreeViewItem::DirectoryExplorerTreeViewItem(std::shared_ptr<SampleDirectory> dir)
{
mSampleDirectory = dir;
mSampleDirectory->addChangeListener(this);
mShouldUseFile = true;
}
DirectoryExplorerTreeViewItem::DirectoryExplorerTreeViewItem(String string)
{
mText = string;
mShouldUseFile = false;
}
DirectoryExplorerTreeViewItem::~DirectoryExplorerTreeViewItem()
{
int subItemCount = getNumSubItems();
for (int i = 0; i < subItemCount; i++)
{
removeSubItem(0, true);
}
}
bool DirectoryExplorerTreeViewItem::mightContainSubItems()
{
if (mShouldUseFile)
{
return mSampleDirectory->getFile().containsSubDirectories();
}
else
{
return true;
}
}
bool DirectoryExplorerTreeViewItem::isInterestedInFileDrag(const StringArray& files)
{
bool allDirs = true;
for (int i = 0; i < files.size(); i++)
{
allDirs = File(files[i]).isDirectory() && allDirs;
}
return allDirs;
}
void DirectoryExplorerTreeViewItem::filesDropped(const StringArray& files, int x, int y)
{
//todo handle adding directories
}
void samplify::DirectoryExplorerTreeViewItem::changeListenerCallback(ChangeBroadcaster* source)
{
repaintItem();
}
String DirectoryExplorerTreeViewItem::getName()
{
if (mShouldUseFile)
{
return mSampleDirectory->getFile().getFileName();
}
else
{
return mText;
}
}
void DirectoryExplorerTreeViewItem::paintItem(Graphics & g, int width, int height)
{
//check if not added yet, dont draw
if (getOwnerView() != nullptr)
{
Colour itemBackgroundColor;
Colour textColor;
if (isSelected())
{
itemBackgroundColor = getOwnerView()->getLookAndFeel().findColour(selectedBackgroundId);
}
else
{
itemBackgroundColor = getOwnerView()->getLookAndFeel().findColour(defaultBackgroundId);
}
//draw highlight
g.setColour(itemBackgroundColor);
g.fillRoundedRectangle(0, 0, width, height, 4.0f);
g.setColour(itemBackgroundColor.darker(0.2f));
g.drawRoundedRectangle(0, 0, width, height, 4.0f, 1.0f);
if (itemBackgroundColor.getPerceivedBrightness() > 0.5f)
{
textColor = Colours::black;
}
else
{
textColor = Colours::white;
}
if (mShouldUseFile)
{
Colour checkboxBackgroundColor;
switch (mSampleDirectory->getCheckStatus())
{
case CheckStatus::NotLoaded:
checkboxBackgroundColor = getOwnerView()->getLookAndFeel().findColour(checkboxNotLoadedBackgroundId);
break;
case CheckStatus::Mixed:
checkboxBackgroundColor = getOwnerView()->getLookAndFeel().findColour(checkboxMixedBackgroundId);
break;
case CheckStatus::Enabled:
checkboxBackgroundColor = getOwnerView()->getLookAndFeel().findColour(checkboxActiveBackgroundId);
break;
case CheckStatus::Disabled:
checkboxBackgroundColor = getOwnerView()->getLookAndFeel().findColour(checkboxDisabledBackgroundId);
break;
}
g.setFont(12);
float padding = 2.0f;
Rectangle<float> checkBoxRect = Rectangle<float>(padding, padding, height - (padding * 2), height - (padding * 2));
float checkBoxCornerWidth = 4.0f;
g.setColour(checkboxBackgroundColor);
g.fillRoundedRectangle(checkBoxRect, checkBoxCornerWidth);
if (mSampleDirectory->getCheckStatus() == CheckStatus::NotLoaded)
{
AppValues::getInstance().getDrawable("minus")->drawWithin(g, checkBoxRect.reduced(1.0f), RectanglePlacement::centred, 1.0f);
}
else if (mSampleDirectory->getCheckStatus() == CheckStatus::Enabled)
{
AppValues::getInstance().getDrawable("correct")->drawWithin(g, checkBoxRect.reduced(1.0f), RectanglePlacement::centred, 1.0f);
}
else if (mSampleDirectory->getCheckStatus() == CheckStatus::Mixed)
{
AppValues::getInstance().getDrawable("minus")->drawWithin(g, checkBoxRect.reduced(1.0f), RectanglePlacement::centred, 1.0f);
}
else //disabled
{
}
g.setColour(Colours::black);
g.drawRoundedRectangle(checkBoxRect, checkBoxCornerWidth, 1.0f);
}
//draw text no matter what
g.setColour(textColor);
juce::String text = getName();
g.drawText(text, height, 0, width, height, Justification::centredLeft, true);
}
}
void DirectoryExplorerTreeViewItem::paintOpenCloseButton(Graphics& g, const Rectangle<float>& area, Colour backgroundColour, bool isMouseOver)
{
//ignore background colour and isMouseOver
getOwnerView()->getLookAndFeel().drawTreeviewPlusMinusBox(g, area, getOwnerView()->getLookAndFeel().findColour(checkboxActiveBackgroundId), isOpen(), true);
}
void DirectoryExplorerTreeViewItem::itemOpennessChanged(bool isNowOpen)
{
if (isNowOpen)
{
if (getNumSubItems() == 0)
{
Array<File> files;
int childDirCount = mSampleDirectory->getChildDirectoryCount();
for (int i = 0; i < childDirCount; i++)
{
DirectoryExplorerTreeViewItem* item = new DirectoryExplorerTreeViewItem(mSampleDirectory->getChildDirectory(i));
addSubItem(item);
}
}
}
}
void DirectoryExplorerTreeViewItem::itemClicked(const MouseEvent& e)
{
if (getParentItem() != nullptr)
{
if (e.mods.isLeftButtonDown())
{
int itemHeight = getItemHeight();
int itemXPos = getItemPosition(false).getX();
int xPos = e.getMouseDownPosition().getX() - itemXPos;
if (xPos < itemHeight)
{
itemCheckCycled();
}
}
else if (e.mods.isRightButtonDown())
{
PopupMenu dirOptions;
dirOptions.addItem(1, "Select Exclusively");
int selection = dirOptions.show();
if (selection == 1)
{
if (DirectoryExplorerTreeViewItem* dirTVI = dynamic_cast<DirectoryExplorerTreeViewItem*>(getParentItem()))
{
dirTVI->mSampleDirectory->setCheckStatus(CheckStatus::Disabled);
}
mSampleDirectory->setCheckStatus(CheckStatus::Enabled);
}
}
}
}
void samplify::DirectoryExplorerTreeViewItem::refreshChildrenPaint()
{
repaintItem();
for (int i = 0; i < getNumSubItems(); i++)
{
((DirectoryExplorerTreeViewItem*)getSubItem(i))->refreshChildrenPaint();
}
}
void DirectoryExplorerTreeViewItem::itemCheckCycled()
{
mSampleDirectory->cycleCurrentCheck();
}
|
8ff1fc7a15396a64a518f7f47889eebec41cce15 | 548fb26a24715036dc453c2d333252ed4e107118 | /ACM-ZS/ACM1007.cpp | 7e77133d01fe9505f10d581d3abecda85961fbb0 | [] | no_license | Mereco/ACM-ZS | fa5295e8080a2435f62325fe3cdbdafa57a94459 | 3eedb5f812e0e2a1a2ae35abc3bf3d9c66fa04e5 | refs/heads/master | 2021-01-10T16:20:11.547427 | 2016-03-16T07:36:55 | 2016-03-16T07:36:55 | 54,010,537 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 160 | cpp | ACM1007.cpp | #include<iostream>
using namespace std;
int main()
{
int a=0,b=0,c=0,x=0,y=0;
cin>>x;
a=x/100;
b=(x%100)/10;
c=x%10;
y=a+c+b;
cout<<y<<endl;
return 0;
} |
b5e7aa5242bb8a76722ea12cc41d31acc93262c1 | 197c05e4546df7b95391105aef4a279f98a02932 | /cpp/stepik/cpp1/ex.2.7.10.cpp | 2e9709a4330c778d9e33765cf9894680fb046c17 | [] | no_license | sergey-pashaev/practice | c269c0f6f7495701f175c566d0942ab5d52f661a | e92ef5c17f0e89c274f89b7ad8f1326e526ce91c | refs/heads/master | 2023-02-18T20:42:14.503574 | 2023-02-13T18:01:13 | 2023-02-13T18:01:13 | 167,481,051 | 7 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 652 | cpp | ex.2.7.10.cpp | #include <cassert>
#include <cstddef>
#include <cstring>
#include <iomanip>
#include <iostream>
using namespace std;
void append(char* other_str, size_t other_size) {
char* str = new char[6];
strcpy(str, "Hello");
size_t size = strlen(str);
cout << str << '\n';
size_t new_size = size + other_size + 1;
char* buf = new char[new_size];
strncpy(buf, str, size);
strncpy(buf + size, other_str, other_size);
buf[new_size] = 0;
size = new_size;
delete[] str;
str = buf;
cout << buf << '\n';
}
int main() {
char* str = new char[12];
strcpy(str, "xxxHelloxxx");
append(str, strlen(str));
}
|
92110505e4ad4044e7a94513b581694339908450 | ee24ef7aaa7d4ab6a66c56e95953414306302df3 | /Cpp/SDK/AWL_Credits_parameters.h | 3eae93ae95859c28496977c32f62b3dfc61d089b | [] | no_license | zH4x-SDK/zAWL-SDK | bfc0573125d3398d892c85eac05a6575592db187 | 3d7001585dab120480e0d16fc24396f61a1d46c6 | refs/heads/main | 2023-07-15T11:05:51.834741 | 2021-08-31T15:10:19 | 2021-08-31T15:10:19 | 401,745,502 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,719 | h | AWL_Credits_parameters.h | #pragma once
// Name: AWL, Version: 4.24.3
/*!!DEFINE!!*/
/*!!HELPER_DEF!!*/
/*!!HELPER_INC!!*/
#ifdef _MSC_VER
#pragma pack(push, 0x01)
#endif
namespace CG
{
//---------------------------------------------------------------------------
// Parameters
//---------------------------------------------------------------------------
// Function AWL_Credits.AWL_Credits_C.OnMouseButtonDown
struct UAWL_Credits_C_OnMouseButtonDown_Params
{
};
// Function AWL_Credits.AWL_Credits_C.OnKeyDown
struct UAWL_Credits_C_OnKeyDown_Params
{
};
// Function AWL_Credits.AWL_Credits_C.Construct
struct UAWL_Credits_C_Construct_Params
{
};
// Function AWL_Credits.AWL_Credits_C.BndEvt__Button_125_K2Node_ComponentBoundEvent_0_OnButtonClickedEvent__DelegateSignature
struct UAWL_Credits_C_BndEvt__Button_125_K2Node_ComponentBoundEvent_0_OnButtonClickedEvent__DelegateSignature_Params
{
};
// Function AWL_Credits.AWL_Credits_C.Show
struct UAWL_Credits_C_Show_Params
{
};
// Function AWL_Credits.AWL_Credits_C.Close
struct UAWL_Credits_C_Close_Params
{
};
// Function AWL_Credits.AWL_Credits_C.BndEvt__Button_125_K2Node_ComponentBoundEvent_1_OnButtonHoverEvent__DelegateSignature
struct UAWL_Credits_C_BndEvt__Button_125_K2Node_ComponentBoundEvent_1_OnButtonHoverEvent__DelegateSignature_Params
{
};
// Function AWL_Credits.AWL_Credits_C.BndEvt__Button_125_K2Node_ComponentBoundEvent_2_OnButtonHoverEvent__DelegateSignature
struct UAWL_Credits_C_BndEvt__Button_125_K2Node_ComponentBoundEvent_2_OnButtonHoverEvent__DelegateSignature_Params
{
};
// Function AWL_Credits.AWL_Credits_C.ExecuteUbergraph_AWL_Credits
struct UAWL_Credits_C_ExecuteUbergraph_AWL_Credits_Params
{
};
}
#ifdef _MSC_VER
#pragma pack(pop)
#endif
|
d52481b02fc2d34e2ed4b3e4ae38cba292aa9f16 | 106c0808d4486332d5c4b4265101931b191ae13e | /GameEngineNew/RedObjectScript.h | f6a9fced0e600ed7dc9b3ace708118eae009e889 | [] | no_license | fnk0/MarcusGameEngine | 875caaf30939a3e55b1f3697995d5a4da8e5cec1 | d3a59c4ead708ca75c3f946d32be5fd66d37d732 | refs/heads/master | 2021-01-10T20:06:47.030745 | 2014-12-11T01:53:15 | 2014-12-11T01:53:15 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 378 | h | RedObjectScript.h | //
// Created by Marcus Gabilheri on 12/8/14.
// Copyright (c) 2014 Marcus Gabilheri. All rights reserved.
//
#ifndef __RedObjectScript_H_
#define __RedObjectScript_H_
#include "GameObjectScript.h"
class RedObjectScript : public GameObjectScript{
public:
private:
virtual void run() override;
virtual void doAction() override;
};
#endif //__RedObjectScript_H_
|
cec98b1b4916687e6b6887ccc8ff1ff01cb302c9 | a78d0875997780a4ba963fa9b21adce8505be9d7 | /randgen.cpp | eb17a713452c3d08c2453e851a7b309082bdb01f | [] | no_license | Fertasd/simulation | a8e62a46e1e8c45b2bc8277f9984baf074181b32 | 5e5d9f1a8451c63ac76d49cb05c1d5340ff35d4e | refs/heads/master | 2021-01-17T20:36:56.691845 | 2016-06-17T13:26:45 | 2016-06-17T13:26:45 | 60,847,652 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 641 | cpp | randgen.cpp | #include "randgen.h"
#include <cmath>
RandomGenerator::RandomGenerator(int32_t seed) : nd(0) /*initializes the generator from a given seed*/
{
ra[0] = static_cast<int32_t>(fmod(16807.0 * seed, 2147483647.0));
for (int32_t i = 1; i <= M; i++)
ra[i] = static_cast<int32_t>(fmod(16807.0 * ra[i - 1], 2147483647.0));
}
int32_t RandomGenerator::next()
{
return ++nd, ra[nd & M] = ra[(nd-A) & M] ^ ra[(nd-B) & M] ^ ra[(nd-C) & M] ^ ra[(nd-D) & M]; /*retrieves a random
number from the
generator*/
}
double RandomGenerator::nextNormal()
{
return static_cast<double>(next()) / RIMAX;
}
|
0ed7769b3575af9b8071fbe8849349ea8a9551d3 | f493371b734e0c8af53b8d124d4f0c0ace7a4e1d | /行为型模式/Context.cpp | 409a6a641a6d15faa5fa9126097f28347029d44d | [] | no_license | lazycoding/DesignPattern | 4d019ebbde9adc8c4399843517cf4857894f9cef | 4870f799e5747607a9259701fba10903e4e8a261 | refs/heads/master | 2021-01-22T11:55:22.996812 | 2014-02-27T06:02:36 | 2014-02-27T06:02:36 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 250 | cpp | Context.cpp | #include "Context.h"
#include "StateA.h"
using namespace std;
Context::Context() :current_state_(make_shared<StateA>()), time_(0)
{
}
Context::~Context()
{
}
void Context::Request()
{
if (current_state_)
{
current_state_->Request(this);
}
} |
c7a7208bbb564aa8922bd09ae7a8014dbbcb8a84 | c65cf5d6124b5e7a21ed47a0ab76055f8aea0499 | /src/BT_LevelList.h | 200e10e7ae874f00d629ddd1889495fd5b75ec9a | [] | no_license | ConnorMacDonell/Interview_Preparation_Solutions | 53c0fa462345b062d9d204839802b0d354e2cc3e | dc633bd80a17ea26df3d779da69d052c726be413 | refs/heads/master | 2020-05-05T13:01:55.957110 | 2019-06-24T06:03:46 | 2019-06-24T06:03:46 | 180,056,143 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 302 | h | BT_LevelList.h | /*
* LevelList.h
*
* Created on: Mar 19, 2019
* Author: Connor
*/
#include <vector>
#include <queue>
#include <list>
#include <utility>
#include "BT_Node.h"
#ifndef LEVELLIST_H_
#define LEVELLIST_H_
std::vector<std::list<bt_node*> > levelList(bt_node* root);
#endif /* LEVELLIST_H_ */
|
4e5574dba0251880e95f51a21777171a57607527 | f5d87ed79a91f17cdf2aee7bea7c15f5b5258c05 | /cuts/Message_Handler.h | 54bd442264d1e62579431316547efc5539fe55d6 | [] | no_license | SEDS/CUTS | a4449214a894e2b47bdea42090fa6cfc56befac8 | 0ad462fadcd3adefd91735aef6d87952022db2b7 | refs/heads/master | 2020-04-06T06:57:35.710601 | 2016-08-16T19:37:34 | 2016-08-16T19:37:34 | 25,653,522 | 0 | 3 | null | null | null | null | UTF-8 | C++ | false | false | 2,145 | h | Message_Handler.h | // -*- C++ -*-
//=============================================================================
/**
* @file Message_Handler.h
*
* $Id$
*
* @author James H. Hill
*/
//=============================================================================
#ifndef _CUTS_MESSAGE_HANDLER_H_
#define _CUTS_MESSAGE_HANDLER_H_
#include "cuts/config.h"
#include "cuts/CUTS_export.h"
//=============================================================================
/**
* @class CUTS_Message_Handler
*
* Interface for message handlers used in modeling environment
* backends.
*/
//=============================================================================
class CUTS_Export CUTS_Message_Handler
{
public:
/// Constructor.
CUTS_Message_Handler (void);
/// Destructor.
virtual ~CUTS_Message_Handler (void);
/// Generate a default message.
virtual void message (const char * msg) = 0;
/**
* Generate a warning mesage. This will also increment
* warning message counter.
*
* @param[in] msg Message to handle in C-string format.
*/
virtual void warning_message (const char * msg) = 0;
/**
* Generate a error mesage. This will also increment
* error message counter.
*
* @param[in] msg Message to handle in C-string format.
*/
virtual void error_message (const char * msg) = 0;
/**
* Get the number of generated error messages handled.
*
* @return Number of error messages.
*/
size_t error_message_count (void) const;
/**
* Get the number of generated warning messages handled.
*
* @return Number of warning messages.
*/
size_t warning_message_count (void) const;
private:
CUTS_Message_Handler (const CUTS_Message_Handler &);
const CUTS_Message_Handler & operator = (const CUTS_Message_Handler &);
/// Number of error messages generated.
size_t errors_;
/// Number of warning messages generated.
size_t warnings_;
};
#if defined (__CUTS_INLINE__)
#include "cuts/Message_Handler.inl"
#endif
#endif // !define _CUTS_MESSAGE_HANDLER_H_
|
eac1a4bfb0b9594af313a86873205cd54c1ff8b1 | 59acdae236217431b7eeaccb38e52f17bae10d45 | /Algorithms/plusMinus.cpp | 63002fb6de5ebd3dacaedc65ad85267230820e8e | [
"MIT"
] | permissive | Alex0Blackwell/c-cpp-DSA | 71dfe1015bfa2982eab1c0dfca9cb7c57285bae0 | eb5a4507603b8510abc18223fd99c454e8effc38 | refs/heads/master | 2023-02-18T13:16:25.295792 | 2021-01-13T17:52:58 | 2021-01-13T17:52:58 | 228,251,079 | 3 | 2 | MIT | 2020-10-02T06:27:29 | 2019-12-15T20:55:12 | C++ | UTF-8 | C++ | false | false | 1,636 | cpp | plusMinus.cpp | #include <bits/stdc++.h>
using namespace std;
vector < string > split_string(string);
// Complete the plusMinus function below.
void plusMinus(vector < int > arr) {
double len = arr.size();
double pos, neg, zero;
pos = neg = zero = 0.0;
for (int i = 0; i < arr.size(); i++) {
if (arr[i] == 0) {
zero++;
} else if (arr[i] % 2 == 0) {
pos++;
} else if (abs(arr[i] % 2 == 1)) {
neg++;
}
}
cout << pos / len << '\n';
cout << neg / len << '\n';
cout << zero / len << '\n';
return;
}
int main() {
int n;
cin >> n;
cin.ignore(numeric_limits < streamsize > ::max(), '\n');
string arr_temp_temp;
getline(cin, arr_temp_temp);
vector < string > arr_temp = split_string(arr_temp_temp);
vector < int > arr(n);
for (int i = 0; i < n; i++) {
int arr_item = stoi(arr_temp[i]);
arr[i] = arr_item;
}
plusMinus(arr);
return 0;
}
vector < string > split_string(string input_string) {
string::iterator new_end = unique(input_string.begin(), input_string.end(), [](const char & x,
const char & y) {
return x == y and x == ' ';
});
input_string.erase(new_end, input_string.end());
while (input_string[input_string.length() - 1] == ' ') {
input_string.pop_back();
}
vector < string > splits;
char delimiter = ' ';
size_t i = 0;
size_t pos = input_string.find(delimiter);
while (pos != string::npos) {
splits.push_back(input_string.substr(i, pos - i));
i = pos + 1;
pos = input_string.find(delimiter, i);
}
splits.push_back(input_string.substr(i, min(pos, input_string.length()) - i + 1));
return splits;
}
|
1750d00d2be21e256e105025bfbe657c5f64c8ae | 7e8ec48c8ca2bea1ea1da63288f6c9aee8a1849a | /Hw5and6/test.cc | 5738f380bb67e462a87d4c5f7a5673bb174f4b7a | [] | no_license | marikaswanberg/ComputerSystems | 33970a618e10313979dd43ab45ff076f57181be2 | 863e7e4df65b1524c16ab534c1d24ea06a931f5d | refs/heads/master | 2020-03-28T02:40:16.186542 | 2018-12-13T22:12:38 | 2018-12-13T22:12:38 | 147,588,392 | 0 | 1 | null | 2018-10-01T01:59:22 | 2018-09-05T22:51:18 | C | UTF-8 | C++ | false | false | 5,457 | cc | test.cc | /*
This file tests our Cache. We modified the tests to only use strings as
the values (as per the API specification)
*/
#include "cache.hh"
#define CATCH_CONFIG_MAIN
#include "catch2.hpp"
// // cache is empty upon initialization
// TEST_CASE("test_init_empty", "[space_used]"){
// Cache mycache(10);
// REQUIRE(mycache.space_used() == 0);
// }
// // memused increases properly when we set a new value
// TEST_CASE("test_inc_memused", "[space_used]"){
// Cache mycache2(100);
// std::string value = "marika";
// mycache2.set("hello", &value, sizeof(value));
// Cache::index_type size = mycache2.space_used();
// REQUIRE(size == sizeof(value));
// }
// //memused increases properly after multiple sets
// TEST_CASE("test_mult_inc_memused", "[space_used]"){
// Cache mycache(10);
// std::string first = "h";
// std::string second = "i";
// mycache.set("first", &first, sizeof(first));
// mycache.set("second", &second, sizeof(second));
// Cache::index_type size = mycache.space_used();
// REQUIRE(size == sizeof(first)+sizeof(second));
// }
// // memused decreases properly when we delete elements
// TEST_CASE("test_dec_memused", "[space_used]"){
// std::cout << "test_dec_memused" << std::endl;
// Cache mycache(100);
// std::string buf = "this will be deleted";
// mycache.set("hello", &buf, sizeof(buf));
// mycache.del("hello");
// Cache::index_type size = mycache.space_used();
// REQUIRE(size == 0);
// }
// // Get updates the valsize parameter we pass to it.
// TEST_CASE("test_get_valsize", "[get]"){
// std::cout << "test_get_valsize" << std::endl;
// Cache mycache(10);
// Cache::index_type size = 0;
// std::string value = "eitan";
// mycache.set("hello", &value, sizeof(value));
// mycache.get("hello", size);
// REQUIRE(size == sizeof(value));
// }
// need to test that the correct value for a value in the cache.
// // Get is grabbing the correct value.
// TEST_CASE("test_get_general", "[get]"){
// std::cout << "test_get_general" << std::endl;
// Cache mycache(10);
// Cache::index_type size = 0;
// std::string value = "rocks";
// mycache.set("computer systems", &value, sizeof(value));
// const std::string* val = static_cast<const std::string*>(mycache.get("computer systems", size));
// REQUIRE(*val == "rocks");
// }
// // When value not in cache, get returns nullptr.
// TEST_CASE("test_get_not_in_cache", "[get]"){
// std::cout << "test_get_not_in_cache" << std::endl;
// Cache mycache(10);
// Cache::index_type size = 0;
// Cache::val_type val = mycache.get("hello", size);
// REQUIRE(val == nullptr);
// }
// // Get does not return deleted values.
// TEST_CASE("test_get_deleted", "[get]"){
// std::cout << "test_get_deleted" << std::endl;
// Cache mycache(100);
// Cache::index_type size = 0;
// std::string to_delete = "this will be deleted!";
// mycache.set("test", &to_delete, 10);
// mycache.del("test");
// Cache::val_type val = mycache.get("test", size);
// REQUIRE(val == NULL);
// }
// //Can't get an element that has been evicted. (Run this test on a server with a memsize input of 32)
// TEST_CASE("test_get_evicted", "[get, evictor]"){
// std::cout << "test_get_evicted" << std::endl;
// std::string value = "2018";
// std::cout << "Run test_get_evicted on a server with memsize input: " << sizeof(value) << std::endl;
// Cache mycache(32); // only room for one string
// mycache.set("evicted", &value, sizeof(value));
// std::string value2 = "2019";
// mycache.set("evictor", &value2, sizeof(value2)); // overflow the cache
// Cache::index_type size = 1;
// Cache::val_type val = mycache.get("evicted", size); // this is the element that got evicted
// REQUIRE(val == NULL); // test that we can't get the value we just evicted
// }
// // Get function returns the correct value after key is modified
// TEST_CASE("test_get_modified", "[get]"){
// std::cout << "test_get_modified" << std::endl;
// Cache mycache(100);
// Cache::index_type size = 0;
// std::string val = "hello";
// std::string modify = "hi";
// mycache.set("test", &val, sizeof(val));
// mycache.set("test", &modify, sizeof(modify)); // change value for "test" key
// const std::string* changed = static_cast<const std::string*>(mycache.get("test", size));
// REQUIRE(size == sizeof(modify));
// REQUIRE(*changed == modify);
// }
// // Cache evicts two items when necessary
// // (This won't pass for client/server project. Strings are always 32 bytes so there's no need to evict 2 strings to add 1.)
// TEST_CASE("test_set_evict", "[evictor, set]"){
// std::cout << "test_set_evict" << std::endl;
// std::string first = "h";
// std::string second = "i";
// std::string third = "hello there!";
// Cache mycache(64);
// mycache.set("first", &first, sizeof(first));
// mycache.set("second", &second, sizeof(first));
// mycache.set("evictor", &third, sizeof(third)); // this will necessarily evict both regardless of the eviction policy
// Cache::index_type size = mycache.space_used();
// REQUIRE(size == sizeof(third));
// }
// //Tests that we cannot delete an item that is not in the cache.
// TEST_CASE("test_invalid_delete", "[del]"){
// std::cout << "test_invalid_delete" << std::endl;
// Cache mycache(100);
// std::string test = "a";
// mycache.set("test", &test, sizeof(test));
// mycache.del("not_test");
// REQUIRE(mycache.space_used() == sizeof(test));
// }
|
96e4e1d2420a125db79d2abb8ae1ab6f3333c374 | 03305ab34e0a379f7b7881b0dafd9b6b0365c8b7 | /main/Solid3Effect.h | d4f73b656072ee2074d488c642b1338f20f43614 | [
"Apache-2.0"
] | permissive | mreierson/neopixel-esp32-firmware | 2471dd69b22c783558f1265b5ac57cf2cde90f8e | cb9e235b5999319a5c0ff618ae8b35a5b5963aae | refs/heads/master | 2020-03-27T05:41:00.868580 | 2018-09-05T02:21:33 | 2018-09-05T02:21:33 | 146,039,461 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,070 | h | Solid3Effect.h | #ifndef SOLID3EFFECT_H
#define SOLID3EFFECT_H
#include "NeoPixelEffect.h"
class Solid3Effect : public NeoPixelEffect {
public:
virtual void init(NeoPixelStrip *strip, uint8_t numParams, uint8_t params[])
{
r0 = params[0]; g0 = params[1]; b0 = params[2];
r1 = params[3]; g1 = params[4]; b1 = params[5];
r2 = params[6]; g2 = params[7]; b2 = params[8];
delay_ = params[9];
index_ = 0;
}
virtual void step(NeoPixelStrip *strip)
{
for (size_t i = 0; i < strip->numPixels(); ++i) {
if ((i % 3) == 0) {
switch (index_) {
case 0:
strip->setPixelColor(i, r0, g0, b0);
break;
case 1:
strip->setPixelColor(i, r1, g1, b1);
break;
default:
strip->setPixelColor(i, r2, g2, b2);
}
} else if ((i % 3) == 1) {
switch (index_) {
case 0:
strip->setPixelColor(i, r1, g1, b1);
break;
case 1:
strip->setPixelColor(i, r2, g2, b2);
break;
default:
strip->setPixelColor(i, r0, g0, b0);
break;
}
} else {
switch (index_) {
case 0:
strip->setPixelColor(i, r2, g2, b2);
break;
case 1:
strip->setPixelColor(i, r0, g0, b0);
break;
default:
strip->setPixelColor(i, r1, g1, b1);
break;
}
}
}
strip->show();
if (delay_ > 0) {
index_ = index_ + 1;
index_ = (index_ % 3);
strip->delay(delay_);
}
}
private:
uint8_t r0, g0, b0;
uint8_t r1, g1, b1;
uint8_t r2, g2, b2;
uint8_t delay_;
int index_;
};
#endif
|
cd95cc5449d38def445760440bcb5bb3d7b30852 | 1c41663cf064206d51c9cf9a2165f65e60b03d2f | /test/other/cpp11.h | ab01121df2cfd5b0e8e7855aabb1ae9516dce91e | [] | no_license | kevin-chshen/C-11_exercise | f1c64f4c64f0bb5982f90a5ac8144b988a02b61b | 4dfa1fd622f19b9b1a31be870a4d9ca83e0a0a7d | refs/heads/master | 2023-08-23T10:27:07.328729 | 2021-10-17T13:17:28 | 2021-10-17T13:17:28 | 341,764,800 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 334 | h | cpp11.h | #pragma once
class cpp11
{
public:
void run();
private:
void LambdaFunc();
void SharedPtrFunc();
void AllocatorFunc();
void AttributesFunc();
void MoveFunc();
void ForwardFunc();
void ForwardFunc2();
void EmplaceFunc();
void IsSameFunc();
void ResultOfFunc();
void AnyFunc();
void ClassConstMemberFunc();
};
|
e3940ef2b01c18ebc67736aeed065be5c0d5388f | cfeac52f970e8901871bd02d9acb7de66b9fb6b4 | /generated/src/aws-cpp-sdk-ssm-contacts/include/aws/ssm-contacts/SSMContactsServiceClientModel.h | 9044c425b5eecaa5edd6c83f26f395e7fe8c3f27 | [
"Apache-2.0",
"MIT",
"JSON"
] | permissive | aws/aws-sdk-cpp | aff116ddf9ca2b41e45c47dba1c2b7754935c585 | 9a7606a6c98e13c759032c2e920c7c64a6a35264 | refs/heads/main | 2023-08-25T11:16:55.982089 | 2023-08-24T18:14:53 | 2023-08-24T18:14:53 | 35,440,404 | 1,681 | 1,133 | Apache-2.0 | 2023-09-12T15:59:33 | 2015-05-11T17:57:32 | null | UTF-8 | C++ | false | false | 22,716 | h | SSMContactsServiceClientModel.h | /**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
/* Generic header includes */
#include <aws/ssm-contacts/SSMContactsErrors.h>
#include <aws/core/client/GenericClientConfiguration.h>
#include <aws/core/client/AWSError.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/client/AsyncCallerContext.h>
#include <aws/core/http/HttpTypes.h>
#include <aws/ssm-contacts/SSMContactsEndpointProvider.h>
#include <future>
#include <functional>
/* End of generic header includes */
/* Service model headers required in SSMContactsClient header */
#include <aws/ssm-contacts/model/AcceptPageResult.h>
#include <aws/ssm-contacts/model/ActivateContactChannelResult.h>
#include <aws/ssm-contacts/model/CreateContactResult.h>
#include <aws/ssm-contacts/model/CreateContactChannelResult.h>
#include <aws/ssm-contacts/model/CreateRotationResult.h>
#include <aws/ssm-contacts/model/CreateRotationOverrideResult.h>
#include <aws/ssm-contacts/model/DeactivateContactChannelResult.h>
#include <aws/ssm-contacts/model/DeleteContactResult.h>
#include <aws/ssm-contacts/model/DeleteContactChannelResult.h>
#include <aws/ssm-contacts/model/DeleteRotationResult.h>
#include <aws/ssm-contacts/model/DeleteRotationOverrideResult.h>
#include <aws/ssm-contacts/model/DescribeEngagementResult.h>
#include <aws/ssm-contacts/model/DescribePageResult.h>
#include <aws/ssm-contacts/model/GetContactResult.h>
#include <aws/ssm-contacts/model/GetContactChannelResult.h>
#include <aws/ssm-contacts/model/GetContactPolicyResult.h>
#include <aws/ssm-contacts/model/GetRotationResult.h>
#include <aws/ssm-contacts/model/GetRotationOverrideResult.h>
#include <aws/ssm-contacts/model/ListContactChannelsResult.h>
#include <aws/ssm-contacts/model/ListContactsResult.h>
#include <aws/ssm-contacts/model/ListEngagementsResult.h>
#include <aws/ssm-contacts/model/ListPageReceiptsResult.h>
#include <aws/ssm-contacts/model/ListPageResolutionsResult.h>
#include <aws/ssm-contacts/model/ListPagesByContactResult.h>
#include <aws/ssm-contacts/model/ListPagesByEngagementResult.h>
#include <aws/ssm-contacts/model/ListPreviewRotationShiftsResult.h>
#include <aws/ssm-contacts/model/ListRotationOverridesResult.h>
#include <aws/ssm-contacts/model/ListRotationShiftsResult.h>
#include <aws/ssm-contacts/model/ListRotationsResult.h>
#include <aws/ssm-contacts/model/ListTagsForResourceResult.h>
#include <aws/ssm-contacts/model/PutContactPolicyResult.h>
#include <aws/ssm-contacts/model/SendActivationCodeResult.h>
#include <aws/ssm-contacts/model/StartEngagementResult.h>
#include <aws/ssm-contacts/model/StopEngagementResult.h>
#include <aws/ssm-contacts/model/TagResourceResult.h>
#include <aws/ssm-contacts/model/UntagResourceResult.h>
#include <aws/ssm-contacts/model/UpdateContactResult.h>
#include <aws/ssm-contacts/model/UpdateContactChannelResult.h>
#include <aws/ssm-contacts/model/UpdateRotationResult.h>
/* End of service model headers required in SSMContactsClient header */
namespace Aws
{
namespace Http
{
class HttpClient;
class HttpClientFactory;
} // namespace Http
namespace Utils
{
template< typename R, typename E> class Outcome;
namespace Threading
{
class Executor;
} // namespace Threading
} // namespace Utils
namespace Auth
{
class AWSCredentials;
class AWSCredentialsProvider;
} // namespace Auth
namespace Client
{
class RetryStrategy;
} // namespace Client
namespace SSMContacts
{
using SSMContactsClientConfiguration = Aws::Client::GenericClientConfiguration<false>;
using SSMContactsEndpointProviderBase = Aws::SSMContacts::Endpoint::SSMContactsEndpointProviderBase;
using SSMContactsEndpointProvider = Aws::SSMContacts::Endpoint::SSMContactsEndpointProvider;
namespace Model
{
/* Service model forward declarations required in SSMContactsClient header */
class AcceptPageRequest;
class ActivateContactChannelRequest;
class CreateContactRequest;
class CreateContactChannelRequest;
class CreateRotationRequest;
class CreateRotationOverrideRequest;
class DeactivateContactChannelRequest;
class DeleteContactRequest;
class DeleteContactChannelRequest;
class DeleteRotationRequest;
class DeleteRotationOverrideRequest;
class DescribeEngagementRequest;
class DescribePageRequest;
class GetContactRequest;
class GetContactChannelRequest;
class GetContactPolicyRequest;
class GetRotationRequest;
class GetRotationOverrideRequest;
class ListContactChannelsRequest;
class ListContactsRequest;
class ListEngagementsRequest;
class ListPageReceiptsRequest;
class ListPageResolutionsRequest;
class ListPagesByContactRequest;
class ListPagesByEngagementRequest;
class ListPreviewRotationShiftsRequest;
class ListRotationOverridesRequest;
class ListRotationShiftsRequest;
class ListRotationsRequest;
class ListTagsForResourceRequest;
class PutContactPolicyRequest;
class SendActivationCodeRequest;
class StartEngagementRequest;
class StopEngagementRequest;
class TagResourceRequest;
class UntagResourceRequest;
class UpdateContactRequest;
class UpdateContactChannelRequest;
class UpdateRotationRequest;
/* End of service model forward declarations required in SSMContactsClient header */
/* Service model Outcome class definitions */
typedef Aws::Utils::Outcome<AcceptPageResult, SSMContactsError> AcceptPageOutcome;
typedef Aws::Utils::Outcome<ActivateContactChannelResult, SSMContactsError> ActivateContactChannelOutcome;
typedef Aws::Utils::Outcome<CreateContactResult, SSMContactsError> CreateContactOutcome;
typedef Aws::Utils::Outcome<CreateContactChannelResult, SSMContactsError> CreateContactChannelOutcome;
typedef Aws::Utils::Outcome<CreateRotationResult, SSMContactsError> CreateRotationOutcome;
typedef Aws::Utils::Outcome<CreateRotationOverrideResult, SSMContactsError> CreateRotationOverrideOutcome;
typedef Aws::Utils::Outcome<DeactivateContactChannelResult, SSMContactsError> DeactivateContactChannelOutcome;
typedef Aws::Utils::Outcome<DeleteContactResult, SSMContactsError> DeleteContactOutcome;
typedef Aws::Utils::Outcome<DeleteContactChannelResult, SSMContactsError> DeleteContactChannelOutcome;
typedef Aws::Utils::Outcome<DeleteRotationResult, SSMContactsError> DeleteRotationOutcome;
typedef Aws::Utils::Outcome<DeleteRotationOverrideResult, SSMContactsError> DeleteRotationOverrideOutcome;
typedef Aws::Utils::Outcome<DescribeEngagementResult, SSMContactsError> DescribeEngagementOutcome;
typedef Aws::Utils::Outcome<DescribePageResult, SSMContactsError> DescribePageOutcome;
typedef Aws::Utils::Outcome<GetContactResult, SSMContactsError> GetContactOutcome;
typedef Aws::Utils::Outcome<GetContactChannelResult, SSMContactsError> GetContactChannelOutcome;
typedef Aws::Utils::Outcome<GetContactPolicyResult, SSMContactsError> GetContactPolicyOutcome;
typedef Aws::Utils::Outcome<GetRotationResult, SSMContactsError> GetRotationOutcome;
typedef Aws::Utils::Outcome<GetRotationOverrideResult, SSMContactsError> GetRotationOverrideOutcome;
typedef Aws::Utils::Outcome<ListContactChannelsResult, SSMContactsError> ListContactChannelsOutcome;
typedef Aws::Utils::Outcome<ListContactsResult, SSMContactsError> ListContactsOutcome;
typedef Aws::Utils::Outcome<ListEngagementsResult, SSMContactsError> ListEngagementsOutcome;
typedef Aws::Utils::Outcome<ListPageReceiptsResult, SSMContactsError> ListPageReceiptsOutcome;
typedef Aws::Utils::Outcome<ListPageResolutionsResult, SSMContactsError> ListPageResolutionsOutcome;
typedef Aws::Utils::Outcome<ListPagesByContactResult, SSMContactsError> ListPagesByContactOutcome;
typedef Aws::Utils::Outcome<ListPagesByEngagementResult, SSMContactsError> ListPagesByEngagementOutcome;
typedef Aws::Utils::Outcome<ListPreviewRotationShiftsResult, SSMContactsError> ListPreviewRotationShiftsOutcome;
typedef Aws::Utils::Outcome<ListRotationOverridesResult, SSMContactsError> ListRotationOverridesOutcome;
typedef Aws::Utils::Outcome<ListRotationShiftsResult, SSMContactsError> ListRotationShiftsOutcome;
typedef Aws::Utils::Outcome<ListRotationsResult, SSMContactsError> ListRotationsOutcome;
typedef Aws::Utils::Outcome<ListTagsForResourceResult, SSMContactsError> ListTagsForResourceOutcome;
typedef Aws::Utils::Outcome<PutContactPolicyResult, SSMContactsError> PutContactPolicyOutcome;
typedef Aws::Utils::Outcome<SendActivationCodeResult, SSMContactsError> SendActivationCodeOutcome;
typedef Aws::Utils::Outcome<StartEngagementResult, SSMContactsError> StartEngagementOutcome;
typedef Aws::Utils::Outcome<StopEngagementResult, SSMContactsError> StopEngagementOutcome;
typedef Aws::Utils::Outcome<TagResourceResult, SSMContactsError> TagResourceOutcome;
typedef Aws::Utils::Outcome<UntagResourceResult, SSMContactsError> UntagResourceOutcome;
typedef Aws::Utils::Outcome<UpdateContactResult, SSMContactsError> UpdateContactOutcome;
typedef Aws::Utils::Outcome<UpdateContactChannelResult, SSMContactsError> UpdateContactChannelOutcome;
typedef Aws::Utils::Outcome<UpdateRotationResult, SSMContactsError> UpdateRotationOutcome;
/* End of service model Outcome class definitions */
/* Service model Outcome callable definitions */
typedef std::future<AcceptPageOutcome> AcceptPageOutcomeCallable;
typedef std::future<ActivateContactChannelOutcome> ActivateContactChannelOutcomeCallable;
typedef std::future<CreateContactOutcome> CreateContactOutcomeCallable;
typedef std::future<CreateContactChannelOutcome> CreateContactChannelOutcomeCallable;
typedef std::future<CreateRotationOutcome> CreateRotationOutcomeCallable;
typedef std::future<CreateRotationOverrideOutcome> CreateRotationOverrideOutcomeCallable;
typedef std::future<DeactivateContactChannelOutcome> DeactivateContactChannelOutcomeCallable;
typedef std::future<DeleteContactOutcome> DeleteContactOutcomeCallable;
typedef std::future<DeleteContactChannelOutcome> DeleteContactChannelOutcomeCallable;
typedef std::future<DeleteRotationOutcome> DeleteRotationOutcomeCallable;
typedef std::future<DeleteRotationOverrideOutcome> DeleteRotationOverrideOutcomeCallable;
typedef std::future<DescribeEngagementOutcome> DescribeEngagementOutcomeCallable;
typedef std::future<DescribePageOutcome> DescribePageOutcomeCallable;
typedef std::future<GetContactOutcome> GetContactOutcomeCallable;
typedef std::future<GetContactChannelOutcome> GetContactChannelOutcomeCallable;
typedef std::future<GetContactPolicyOutcome> GetContactPolicyOutcomeCallable;
typedef std::future<GetRotationOutcome> GetRotationOutcomeCallable;
typedef std::future<GetRotationOverrideOutcome> GetRotationOverrideOutcomeCallable;
typedef std::future<ListContactChannelsOutcome> ListContactChannelsOutcomeCallable;
typedef std::future<ListContactsOutcome> ListContactsOutcomeCallable;
typedef std::future<ListEngagementsOutcome> ListEngagementsOutcomeCallable;
typedef std::future<ListPageReceiptsOutcome> ListPageReceiptsOutcomeCallable;
typedef std::future<ListPageResolutionsOutcome> ListPageResolutionsOutcomeCallable;
typedef std::future<ListPagesByContactOutcome> ListPagesByContactOutcomeCallable;
typedef std::future<ListPagesByEngagementOutcome> ListPagesByEngagementOutcomeCallable;
typedef std::future<ListPreviewRotationShiftsOutcome> ListPreviewRotationShiftsOutcomeCallable;
typedef std::future<ListRotationOverridesOutcome> ListRotationOverridesOutcomeCallable;
typedef std::future<ListRotationShiftsOutcome> ListRotationShiftsOutcomeCallable;
typedef std::future<ListRotationsOutcome> ListRotationsOutcomeCallable;
typedef std::future<ListTagsForResourceOutcome> ListTagsForResourceOutcomeCallable;
typedef std::future<PutContactPolicyOutcome> PutContactPolicyOutcomeCallable;
typedef std::future<SendActivationCodeOutcome> SendActivationCodeOutcomeCallable;
typedef std::future<StartEngagementOutcome> StartEngagementOutcomeCallable;
typedef std::future<StopEngagementOutcome> StopEngagementOutcomeCallable;
typedef std::future<TagResourceOutcome> TagResourceOutcomeCallable;
typedef std::future<UntagResourceOutcome> UntagResourceOutcomeCallable;
typedef std::future<UpdateContactOutcome> UpdateContactOutcomeCallable;
typedef std::future<UpdateContactChannelOutcome> UpdateContactChannelOutcomeCallable;
typedef std::future<UpdateRotationOutcome> UpdateRotationOutcomeCallable;
/* End of service model Outcome callable definitions */
} // namespace Model
class SSMContactsClient;
/* Service model async handlers definitions */
typedef std::function<void(const SSMContactsClient*, const Model::AcceptPageRequest&, const Model::AcceptPageOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > AcceptPageResponseReceivedHandler;
typedef std::function<void(const SSMContactsClient*, const Model::ActivateContactChannelRequest&, const Model::ActivateContactChannelOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > ActivateContactChannelResponseReceivedHandler;
typedef std::function<void(const SSMContactsClient*, const Model::CreateContactRequest&, const Model::CreateContactOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > CreateContactResponseReceivedHandler;
typedef std::function<void(const SSMContactsClient*, const Model::CreateContactChannelRequest&, const Model::CreateContactChannelOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > CreateContactChannelResponseReceivedHandler;
typedef std::function<void(const SSMContactsClient*, const Model::CreateRotationRequest&, const Model::CreateRotationOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > CreateRotationResponseReceivedHandler;
typedef std::function<void(const SSMContactsClient*, const Model::CreateRotationOverrideRequest&, const Model::CreateRotationOverrideOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > CreateRotationOverrideResponseReceivedHandler;
typedef std::function<void(const SSMContactsClient*, const Model::DeactivateContactChannelRequest&, const Model::DeactivateContactChannelOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > DeactivateContactChannelResponseReceivedHandler;
typedef std::function<void(const SSMContactsClient*, const Model::DeleteContactRequest&, const Model::DeleteContactOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > DeleteContactResponseReceivedHandler;
typedef std::function<void(const SSMContactsClient*, const Model::DeleteContactChannelRequest&, const Model::DeleteContactChannelOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > DeleteContactChannelResponseReceivedHandler;
typedef std::function<void(const SSMContactsClient*, const Model::DeleteRotationRequest&, const Model::DeleteRotationOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > DeleteRotationResponseReceivedHandler;
typedef std::function<void(const SSMContactsClient*, const Model::DeleteRotationOverrideRequest&, const Model::DeleteRotationOverrideOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > DeleteRotationOverrideResponseReceivedHandler;
typedef std::function<void(const SSMContactsClient*, const Model::DescribeEngagementRequest&, const Model::DescribeEngagementOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > DescribeEngagementResponseReceivedHandler;
typedef std::function<void(const SSMContactsClient*, const Model::DescribePageRequest&, const Model::DescribePageOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > DescribePageResponseReceivedHandler;
typedef std::function<void(const SSMContactsClient*, const Model::GetContactRequest&, const Model::GetContactOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > GetContactResponseReceivedHandler;
typedef std::function<void(const SSMContactsClient*, const Model::GetContactChannelRequest&, const Model::GetContactChannelOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > GetContactChannelResponseReceivedHandler;
typedef std::function<void(const SSMContactsClient*, const Model::GetContactPolicyRequest&, const Model::GetContactPolicyOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > GetContactPolicyResponseReceivedHandler;
typedef std::function<void(const SSMContactsClient*, const Model::GetRotationRequest&, const Model::GetRotationOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > GetRotationResponseReceivedHandler;
typedef std::function<void(const SSMContactsClient*, const Model::GetRotationOverrideRequest&, const Model::GetRotationOverrideOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > GetRotationOverrideResponseReceivedHandler;
typedef std::function<void(const SSMContactsClient*, const Model::ListContactChannelsRequest&, const Model::ListContactChannelsOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > ListContactChannelsResponseReceivedHandler;
typedef std::function<void(const SSMContactsClient*, const Model::ListContactsRequest&, const Model::ListContactsOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > ListContactsResponseReceivedHandler;
typedef std::function<void(const SSMContactsClient*, const Model::ListEngagementsRequest&, const Model::ListEngagementsOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > ListEngagementsResponseReceivedHandler;
typedef std::function<void(const SSMContactsClient*, const Model::ListPageReceiptsRequest&, const Model::ListPageReceiptsOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > ListPageReceiptsResponseReceivedHandler;
typedef std::function<void(const SSMContactsClient*, const Model::ListPageResolutionsRequest&, const Model::ListPageResolutionsOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > ListPageResolutionsResponseReceivedHandler;
typedef std::function<void(const SSMContactsClient*, const Model::ListPagesByContactRequest&, const Model::ListPagesByContactOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > ListPagesByContactResponseReceivedHandler;
typedef std::function<void(const SSMContactsClient*, const Model::ListPagesByEngagementRequest&, const Model::ListPagesByEngagementOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > ListPagesByEngagementResponseReceivedHandler;
typedef std::function<void(const SSMContactsClient*, const Model::ListPreviewRotationShiftsRequest&, const Model::ListPreviewRotationShiftsOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > ListPreviewRotationShiftsResponseReceivedHandler;
typedef std::function<void(const SSMContactsClient*, const Model::ListRotationOverridesRequest&, const Model::ListRotationOverridesOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > ListRotationOverridesResponseReceivedHandler;
typedef std::function<void(const SSMContactsClient*, const Model::ListRotationShiftsRequest&, const Model::ListRotationShiftsOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > ListRotationShiftsResponseReceivedHandler;
typedef std::function<void(const SSMContactsClient*, const Model::ListRotationsRequest&, const Model::ListRotationsOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > ListRotationsResponseReceivedHandler;
typedef std::function<void(const SSMContactsClient*, const Model::ListTagsForResourceRequest&, const Model::ListTagsForResourceOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > ListTagsForResourceResponseReceivedHandler;
typedef std::function<void(const SSMContactsClient*, const Model::PutContactPolicyRequest&, const Model::PutContactPolicyOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > PutContactPolicyResponseReceivedHandler;
typedef std::function<void(const SSMContactsClient*, const Model::SendActivationCodeRequest&, const Model::SendActivationCodeOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > SendActivationCodeResponseReceivedHandler;
typedef std::function<void(const SSMContactsClient*, const Model::StartEngagementRequest&, const Model::StartEngagementOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > StartEngagementResponseReceivedHandler;
typedef std::function<void(const SSMContactsClient*, const Model::StopEngagementRequest&, const Model::StopEngagementOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > StopEngagementResponseReceivedHandler;
typedef std::function<void(const SSMContactsClient*, const Model::TagResourceRequest&, const Model::TagResourceOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > TagResourceResponseReceivedHandler;
typedef std::function<void(const SSMContactsClient*, const Model::UntagResourceRequest&, const Model::UntagResourceOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > UntagResourceResponseReceivedHandler;
typedef std::function<void(const SSMContactsClient*, const Model::UpdateContactRequest&, const Model::UpdateContactOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > UpdateContactResponseReceivedHandler;
typedef std::function<void(const SSMContactsClient*, const Model::UpdateContactChannelRequest&, const Model::UpdateContactChannelOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > UpdateContactChannelResponseReceivedHandler;
typedef std::function<void(const SSMContactsClient*, const Model::UpdateRotationRequest&, const Model::UpdateRotationOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > UpdateRotationResponseReceivedHandler;
/* End of service model async handlers definitions */
} // namespace SSMContacts
} // namespace Aws
|
bc64fe2d4fda449984c7952b3afbe87fe198f73a | 4d2d1887c3d7d4cc3e201cafc6bd8b04ecfe4a08 | /Lab09/Dog.cpp | ea805bbc00d2a62f7838add84eec552203441252 | [] | no_license | mgorman7/cse20133 | 4aa52b7753c9f73de6344f4ab97021ee9fedd30c | b767549b97d036529cfb1520f6a0e115be4b2f8e | refs/heads/master | 2023-01-03T13:34:59.217833 | 2020-10-28T11:36:37 | 2020-10-28T11:36:37 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 718 | cpp | Dog.cpp | #include "Dog.h"
// Define the Dog constructor. A dog must have a name and an age.
// Remember, define the member's default constructors if not entered in the method,
// except for the happiness, which should be default at 100.
// All members must be defined in the order of the class.
// Define the method for SetOwner
// Give the dog to a new person by changing the name of the owner
// Define the method for HoursAwayFromHome.
// The method should decremement the private member happiness by the number of hours input.
// Define the method for Pet.
// The method should increment the private member happiness by the number of hours input.
// Print the Dog's Information
|
6a335ea8daba8194ff6347eb5d5af705a7567668 | 114d183f85e91502b4f87581521dcfa41a8152a0 | /include/eagine/units/unit/si/electrical_conductance.hpp | 4c0bb87da1368d49e3a752dba4137baf595dd64d | [
"BSL-1.0",
"GPL-3.0-only",
"GPL-1.0-or-later"
] | permissive | ford442/oglplu2 | 5544c888a11b9b2f92c3dd658c914403a6372604 | abf1e28d9bcd0d2348121e8640d9611a94112a83 | refs/heads/develop | 2023-07-28T03:56:59.431213 | 2021-09-01T05:40:48 | 2021-09-01T05:40:48 | 403,495,160 | 0 | 0 | BSL-1.0 | 2021-09-06T05:23:50 | 2021-09-06T05:21:38 | null | UTF-8 | C++ | false | false | 905 | hpp | electrical_conductance.hpp | /// @file
///
/// Copyright Matus Chochlik.
/// Distributed under the Boost Software License, Version 1.0.
/// See accompanying file LICENSE_1_0.txt or copy at
/// http://www.boost.org/LICENSE_1_0.txt
///
#ifndef EAGINE_UNITS_UNIT_SI_ELECTRICAL_CONDUCTANCE_HPP
#define EAGINE_UNITS_UNIT_SI_ELECTRICAL_CONDUCTANCE_HPP
#include "../../dim/electrical_conductance.hpp"
#include "common.hpp"
#include "electric_current.hpp"
#include "electric_tension.hpp"
namespace eagine::units {
// siemens
using siemens = unit<electrical_conductance, si>;
template <>
struct name_of<siemens> {
static constexpr const char mp_str[] = "siemens";
};
template <>
struct symbol_of<siemens> {
static constexpr const char mp_str[] = "S";
};
// derived
using millisiemens = make_scaled_unit_t<scales::milli, siemens>;
// TODO
} // namespace eagine::units
#endif // EAGINE_UNITS_UNIT_SI_ELECTRICAL_CONDUCTANCE_HPP
|
dd0150c628b91290106c6fe9a8cdbaa84aad1b85 | 74fc7c5d39baa6c30aa929e629ff60bf40500c61 | /test/unit-tests/cli/command_mock.h | e050bfa4ee9f2d1bc5597f2fa8881a7e1128997f | [
"BSD-3-Clause"
] | permissive | jhyunleehi/poseidonos | e472be680d0e85dc62f0e2c0d7356dbee74a3bd6 | 1d90e4320855d61742ff37af8c0148da579d95d4 | refs/heads/develop | 2023-07-13T03:37:29.754509 | 2021-08-23T15:26:08 | 2021-08-23T15:26:08 | 393,203,347 | 0 | 0 | BSD-3-Clause | 2021-08-20T00:04:14 | 2021-08-06T00:30:35 | C | UTF-8 | C++ | false | false | 370 | h | command_mock.h | #include <gmock/gmock.h>
#include <list>
#include <string>
#include <vector>
#include "src/cli/command.h"
namespace pos
{
class MockPosInfo : public PosInfo
{
public:
using PosInfo::PosInfo;
};
class MockCommand : public Command
{
public:
using Command::Command;
MOCK_METHOD(string, Execute, (json & doc, string rid), (override));
};
} // namespace pos
|
ea62e7b57ba70f2fc8189d0e52b2ddee314e8d6d | 634b0984484d2518ec9b9d363a7c08e190f57b80 | /model/src/Stats.cpp | 1be070642ca73c445c9d1bf9d2fda640988296a7 | [] | no_license | jozik/community-rx | faf37aa47163d02b77871b28ca48f36fed83b83b | 695aa0557bab057d72351c772714926997208496 | refs/heads/master | 2023-04-26T01:33:32.363255 | 2021-06-04T06:40:08 | 2021-06-04T06:40:08 | 268,900,558 | 3 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 8,185 | cpp | Stats.cpp | /*
* Stats.cpp
*
* Created on: Dec 15, 2017
* Author: nick
*/
#include "stddef.h"
#include <iostream>
#include "Stats.h"
namespace crx {
void make_beta_type(MPI_Datatype* beta_type) {
MPI_Datatype types[3] = {MPI_DOUBLE, MPI_UNSIGNED, MPI_INT};
int block_lengths[3] = {2, 1, 1};
MPI_Aint displacements[3];
displacements[0] = offsetof(BetaScore, tick);
displacements[1] = offsetof(BetaScore, person_id);
displacements[2] = offsetof(BetaScore, place_id);
MPI_Datatype tmp_type;
MPI_Type_create_struct(3, block_lengths, displacements, types, &tmp_type);
// See https://stackoverflow.com/questions/33618937/trouble-understanding-mpi-type-create-struct
MPI_Aint lb, extent;
MPI_Type_get_extent(tmp_type, &lb, &extent );
MPI_Type_create_resized(tmp_type, lb, extent, beta_type);
MPI_Type_commit(beta_type);
}
void write_beta_type(FileOut& out, BetaScore& score) {
out << score.tick << "," << score.person_id << "," << score.place_id
<< "," << score.beta << "\n";
}
void make_choice_type(MPI_Datatype* choice_type) {
size_t count = 10;
// tick,person_id,max_score,alpha,beta,gamma,delta,service_code,choice
MPI_Datatype types[count] = {MPI_DOUBLE, MPI_UNSIGNED, MPI_DOUBLE, MPI_DOUBLE,
MPI_DOUBLE, MPI_DOUBLE, MPI_DOUBLE, MPI_CHAR, MPI_UNSIGNED, MPI_INT};
int block_lengths[count] = {1, 1, 1, 1, 1, 1, 1, 4, 1, 1};
MPI_Aint displacements[count];
displacements[0] = offsetof(ChoiceEntry, tick);
displacements[1] = offsetof(ChoiceEntry, person_id);
displacements[2] = offsetof(ChoiceEntry, max_score);
displacements[3] = offsetof(ChoiceEntry, alpha);
displacements[4] = offsetof(ChoiceEntry, beta);
displacements[5] = offsetof(ChoiceEntry, gamma);
displacements[6] = offsetof(ChoiceEntry, delta);
displacements[7] = offsetof(ChoiceEntry, service_code);
displacements[8] = offsetof(ChoiceEntry, atus_code);
displacements[9] = offsetof(ChoiceEntry, choice);
MPI_Datatype tmp_type;
MPI_Type_create_struct(count, block_lengths, displacements, types, &tmp_type);
MPI_Aint lb, extent;
MPI_Type_get_extent(tmp_type, &lb, &extent );
MPI_Type_create_resized(tmp_type, lb, extent, choice_type);
MPI_Type_commit(choice_type);
}
// tick,person_id,max_score,alpha,beta,gamma,delta,service_code,choice";
void write_choice_type(FileOut& out, ChoiceEntry& entry) {
out << entry.tick << "," << entry.person_id << ",";
out << entry.max_score << "," << entry.alpha << "," << entry.beta;
out << "," << entry.gamma << "," << entry.delta;
out << "," << entry.service_code << "," << entry.atus_code << "," << entry.choice << "\n";
}
/*
* struct ResourceVisit {
double tick;
unsigned int person_id;
int place_id;
char service_code[4];
unsigned int atus_code;
};
*
*/
void make_resource_vist_type(MPI_Datatype* rv_type) {
MPI_Datatype types[6] = {MPI_DOUBLE, MPI_UNSIGNED, MPI_INT, MPI_CHAR, MPI_UNSIGNED, MPI_UNSIGNED};
int block_lengths[6] = {1, 1, 1, 4, 1, 1};
MPI_Aint displacements[6];
displacements[0] = offsetof(ResourceVisit, tick);
displacements[1] = offsetof(ResourceVisit, person_id);
displacements[2] = offsetof(ResourceVisit, place_id);
displacements[3] = offsetof(ResourceVisit, service_code);
displacements[4] = offsetof(ResourceVisit, atus_code);
displacements[5] = offsetof(ResourceVisit, schedule_id);
MPI_Datatype tmp_type;
MPI_Type_create_struct(6, block_lengths, displacements, types, &tmp_type);
MPI_Aint lb, extent;
MPI_Type_get_extent(tmp_type, &lb, &extent );
MPI_Type_create_resized(tmp_type, lb, extent, rv_type);
MPI_Type_commit(rv_type);
}
void write_resource_visit_type(FileOut& out, ResourceVisit& visit) {
out << visit.tick << "," << visit.person_id << "," << visit.place_id << ","
<< visit.service_code << "," << visit.atus_code << "," << visit.schedule_id << "\n";
}
void make_hrx_shared_event_type(MPI_Datatype* rv_type) {
size_t size = 4;
MPI_Datatype types[size] = {MPI_DOUBLE, MPI_UNSIGNED, MPI_UNSIGNED, MPI_INT};
int block_lengths[size] = {1, 1, 1, 1};
MPI_Aint displacements[size];
displacements[0] = offsetof(HRXSharedEvent, tick);
displacements[1] = offsetof(HRXSharedEvent, p1);
displacements[2] = offsetof(HRXSharedEvent, p2);
displacements[3] = offsetof(HRXSharedEvent, location);
MPI_Datatype tmp_type;
MPI_Type_create_struct(size, block_lengths, displacements, types, &tmp_type);
MPI_Aint lb, extent;
MPI_Type_get_extent(tmp_type, &lb, &extent );
MPI_Type_create_resized(tmp_type, lb, extent, rv_type);
MPI_Type_commit(rv_type);
}
void write_hrx_shared_event(FileOut& out, HRXSharedEvent& evt) {
out << evt.tick << "," << evt.p1 << "," << evt.p2 << "," <<
evt.location << "\n";
}
void make_hrx_received_event_type(MPI_Datatype* rv_type) {
size_t size = 4;
MPI_Datatype types[size] = {MPI_DOUBLE, MPI_UNSIGNED, MPI_INT, MPI_INT};
int block_lengths[size] = {1, 1, 1, 1};
MPI_Aint displacements[size];
displacements[0] = offsetof(HRXReceivedEvent, tick);
displacements[1] = offsetof(HRXReceivedEvent, p1);
displacements[2] = offsetof(HRXReceivedEvent, provider_type);
displacements[3] = offsetof(HRXReceivedEvent, location);
MPI_Datatype tmp_type;
MPI_Type_create_struct(size, block_lengths, displacements, types, &tmp_type);
MPI_Aint lb, extent;
MPI_Type_get_extent(tmp_type, &lb, &extent );
MPI_Type_create_resized(tmp_type, lb, extent, rv_type);
MPI_Type_commit(rv_type);
}
void write_hrx_received_event(FileOut& out, HRXReceivedEvent& evt) {
out << evt.tick << "," << evt.p1 << "," << evt.provider_type << "," <<
evt.location << "\n";
}
void make_hrx_tag_count_type(MPI_Datatype* rv_type) {
size_t size = 4;
MPI_Datatype types[size] = {MPI_DOUBLE, MPI_UNSIGNED, MPI_INT, MPI_UNSIGNED};
int block_lengths[size] = {1, 1, 1, 1};
MPI_Aint displacements[size];
displacements[0] = offsetof(HRXTagCount, tick);
displacements[1] = offsetof(HRXTagCount, p1);
displacements[2] = offsetof(HRXTagCount, tag_type);
displacements[3] = offsetof(HRXTagCount, count);
MPI_Datatype tmp_type;
MPI_Type_create_struct(size, block_lengths, displacements, types, &tmp_type);
MPI_Aint lb, extent;
MPI_Type_get_extent(tmp_type, &lb, &extent );
MPI_Type_create_resized(tmp_type, lb, extent, rv_type);
MPI_Type_commit(rv_type);
}
void write_hrx_tag_count(FileOut& out, HRXTagCount& htc) {
out << htc.tick << "," << htc.p1 << "," << htc.tag_type << "," <<
htc.count << "\n";
}
void make_dosing_event_type(MPI_Datatype* evt_type) {
int count = 10;
MPI_Datatype types[count] = { MPI_DOUBLE, MPI_UNSIGNED, MPI_INT, MPI_INT, MPI_INT, MPI_DOUBLE,
MPI_DOUBLE, MPI_DOUBLE, MPI_DOUBLE, MPI_INT};
int block_lengths[count] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
MPI_Aint displacements[count];
displacements[0] = offsetof(DosingEvent, tick);
displacements[1] = offsetof(DosingEvent, person_id);
displacements[2] = offsetof(DosingEvent, dosing_location);
displacements[3] = offsetof(DosingEvent, place_id);
displacements[4] = offsetof(DosingEvent, cause);
displacements[5] = offsetof(DosingEvent, dose);
displacements[6] = offsetof(DosingEvent, old_beta);
displacements[7] = offsetof(DosingEvent, new_beta);
displacements[8] = offsetof(DosingEvent, threshold);
displacements[9] = offsetof(DosingEvent, person_count);
MPI_Datatype tmp_type;
MPI_Type_create_struct(count, block_lengths, displacements, types, &tmp_type);
MPI_Aint lb, extent;
MPI_Type_get_extent(tmp_type, &lb, &extent);
MPI_Type_create_resized(tmp_type, lb, extent, evt_type);
MPI_Type_commit(evt_type);
}
void write_dosing_event(FileOut& out, DosingEvent& evt) {
out << evt.tick << "," << evt.person_id << "," << evt.dosing_location << "," << evt.place_id << ","
<< evt.cause << "," << evt.dose << "," << evt.old_beta << "," << evt.new_beta << ","
<< evt.threshold << "," << evt.person_count << "\n";
}
}
|
1f669b1ee874115b4d65d7e31fe92b1fa07748f7 | 9845786e887c1aab0dfaf0de56461db5880135a9 | /Project-1-Code/Token.h | 89e11237b369870ee5c46228f88bfb7b88cae145 | [] | no_license | julianacsmith/cs-236-lab-1 | b38c5f00547eec0f1bc49e07cce9a71448b624ee | 2bd671b42917e0e190bb22e6fbe74b7967a79d11 | refs/heads/master | 2023-08-17T05:45:33.855342 | 2021-09-16T01:47:28 | 2021-09-16T01:47:28 | 406,209,790 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,566 | h | Token.h | #ifndef TOKEN_H
#define TOKEN_H
#include <iostream>
#include <string>
enum class TokenType {
COLON,
COLON_DASH,
// TODO: add the other types of tokens
COMMA,
PERIOD,
Q_MARK,
LEFT_PAREN,
RIGHT_PAREN,
MULTIPLY,
ADD,
SCHEMES,
FACTS,
RULES,
QUERIES,
ID,
STRING,
COMMENT,
E_OF,
UNDEFINED
};
class Token
{
private:
// TODO: add member variables for information needed by Token
std::string value;
int lineNumber;
TokenType tType;
public:
Token(TokenType type, std::string description, int line);
// TODO: add other needed methods
std::string toString();
std::string typeToString(TokenType type){
switch (type) {
case TokenType::COLON:
return "COLON";
break;
case TokenType::COLON_DASH:
return "COLON_DASH";
break;
case TokenType::COMMA:
return "COMMA";
break;
case TokenType::PERIOD:
return "PERIOD";
break;
case TokenType::Q_MARK:
return "Q_MARK";
break;
case TokenType::LEFT_PAREN:
return "LEFT_PAREN";
break;
case TokenType::RIGHT_PAREN:
return "RIGHT_PAREN";
break;
case TokenType::MULTIPLY:
return "MULTIPLY";
break;
case TokenType::ADD:
return "ADD";
break;
case TokenType::SCHEMES:
return "SCHEMES";
break;
case TokenType::FACTS:
return "FACTS";
break;
case TokenType::RULES:
return "RULES";
break;
case TokenType::QUERIES:
return "QUERIES";
break;
case TokenType::ID:
return "ID";
break;
case TokenType::STRING:
return "STRING";
break;
case TokenType::COMMENT:
return "COMMENT";
break;
case TokenType::UNDEFINED:
return "UNDEFINED";
break;
case TokenType::E_OF:
return "EOF";
break;
}
return "ERROR";
}
};
#endif // TOKEN_H
|
3240fd63ae8b4def9f6b76b367b4c55eb0a64d13 | 21ed9af25866f12596884bbf4b93f5ba0d9adade | /ImageProcessing/CDownSampleDlg1.h | 5cb115f4d09ae41842b65e0b872fee6972e204cc | [] | no_license | CheolYongLee/Visual_Studio | 6dc7a7a80807837ea60f41ac20490a5d3967b1aa | f1a330681f39d19069a06e409a15da5d25ca812e | refs/heads/main | 2023-06-23T14:47:33.255186 | 2021-07-27T07:43:00 | 2021-07-27T07:43:00 | 375,936,696 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 457 | h | CDownSampleDlg1.h | #pragma once
// CDownSampleDlg1 대화 상자
class CDownSampleDlg1 : public CDialog
{
DECLARE_DYNAMIC(CDownSampleDlg1)
public:
CDownSampleDlg1(CWnd* pParent = nullptr); // 표준 생성자입니다.
virtual ~CDownSampleDlg1();
// 대화 상자 데이터입니다.
#ifdef AFX_DESIGN_TIME
enum { IDD = IDD_DIALOG1 };
#endif
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 지원입니다.
DECLARE_MESSAGE_MAP()
};
|
fc6934332177ea55ea81f3ca90dce18cce363c15 | c8aab3aac9305580d8b682bdabc0f3cb0d646583 | /build_isolated/cartographer/install/cartographer/mapping/proto/submap.pb.cc | 80040de17f320685e7c5cbb7025717a34ae2df99 | [] | no_license | yangliu111111111/cartographer | 9c27a0a93ef20d37c166d3f9d02cf2800cc21956 | 3bff0e53a56243e75519879fcbe8ebbe2b3e8fcb | refs/heads/master | 2023-02-21T00:18:34.507718 | 2021-01-12T05:29:21 | 2021-01-12T05:29:21 | 328,870,282 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | true | 43,351 | cc | submap.pb.cc | // Generated by the protocol buffer compiler. DO NOT EDIT!
// source: cartographer/mapping/proto/submap.proto
#include "cartographer/mapping/proto/submap.pb.h"
#include <algorithm>
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/stubs/port.h>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/wire_format_lite_inl.h>
#include <google/protobuf/descriptor.h>
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/reflection_ops.h>
#include <google/protobuf/wire_format.h>
// This is a temporary google only hack
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
#include "third_party/protobuf/version.h"
#endif
// @@protoc_insertion_point(includes)
namespace protobuf_cartographer_2fmapping_2fproto_2fgrid_5f2d_2eproto {
extern PROTOBUF_INTERNAL_EXPORT_protobuf_cartographer_2fmapping_2fproto_2fgrid_5f2d_2eproto ::google::protobuf::internal::SCCInfo<4> scc_info_Grid2D;
} // namespace protobuf_cartographer_2fmapping_2fproto_2fgrid_5f2d_2eproto
namespace protobuf_cartographer_2fmapping_2fproto_2fhybrid_5fgrid_2eproto {
extern PROTOBUF_INTERNAL_EXPORT_protobuf_cartographer_2fmapping_2fproto_2fhybrid_5fgrid_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_HybridGrid;
} // namespace protobuf_cartographer_2fmapping_2fproto_2fhybrid_5fgrid_2eproto
namespace protobuf_cartographer_2ftransform_2fproto_2ftransform_2eproto {
extern PROTOBUF_INTERNAL_EXPORT_protobuf_cartographer_2ftransform_2fproto_2ftransform_2eproto ::google::protobuf::internal::SCCInfo<2> scc_info_Rigid3d;
} // namespace protobuf_cartographer_2ftransform_2fproto_2ftransform_2eproto
namespace cartographer {
namespace mapping {
namespace proto {
class Submap2DDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<Submap2D>
_instance;
} _Submap2D_default_instance_;
class Submap3DDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<Submap3D>
_instance;
} _Submap3D_default_instance_;
} // namespace proto
} // namespace mapping
} // namespace cartographer
namespace protobuf_cartographer_2fmapping_2fproto_2fsubmap_2eproto {
static void InitDefaultsSubmap2D() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
{
void* ptr = &::cartographer::mapping::proto::_Submap2D_default_instance_;
new (ptr) ::cartographer::mapping::proto::Submap2D();
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
}
::cartographer::mapping::proto::Submap2D::InitAsDefaultInstance();
}
::google::protobuf::internal::SCCInfo<2> scc_info_Submap2D =
{{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsSubmap2D}, {
&protobuf_cartographer_2ftransform_2fproto_2ftransform_2eproto::scc_info_Rigid3d.base,
&protobuf_cartographer_2fmapping_2fproto_2fgrid_5f2d_2eproto::scc_info_Grid2D.base,}};
static void InitDefaultsSubmap3D() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
{
void* ptr = &::cartographer::mapping::proto::_Submap3D_default_instance_;
new (ptr) ::cartographer::mapping::proto::Submap3D();
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
}
::cartographer::mapping::proto::Submap3D::InitAsDefaultInstance();
}
::google::protobuf::internal::SCCInfo<2> scc_info_Submap3D =
{{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsSubmap3D}, {
&protobuf_cartographer_2ftransform_2fproto_2ftransform_2eproto::scc_info_Rigid3d.base,
&protobuf_cartographer_2fmapping_2fproto_2fhybrid_5fgrid_2eproto::scc_info_HybridGrid.base,}};
void InitDefaults() {
::google::protobuf::internal::InitSCC(&scc_info_Submap2D.base);
::google::protobuf::internal::InitSCC(&scc_info_Submap3D.base);
}
::google::protobuf::Metadata file_level_metadata[2];
const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
~0u, // no _has_bits_
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::cartographer::mapping::proto::Submap2D, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::cartographer::mapping::proto::Submap2D, local_pose_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::cartographer::mapping::proto::Submap2D, num_range_data_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::cartographer::mapping::proto::Submap2D, finished_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::cartographer::mapping::proto::Submap2D, grid_),
~0u, // no _has_bits_
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::cartographer::mapping::proto::Submap3D, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::cartographer::mapping::proto::Submap3D, local_pose_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::cartographer::mapping::proto::Submap3D, num_range_data_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::cartographer::mapping::proto::Submap3D, finished_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::cartographer::mapping::proto::Submap3D, high_resolution_hybrid_grid_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::cartographer::mapping::proto::Submap3D, low_resolution_hybrid_grid_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::cartographer::mapping::proto::Submap3D, rotational_scan_matcher_histogram_),
};
static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
{ 0, -1, sizeof(::cartographer::mapping::proto::Submap2D)},
{ 9, -1, sizeof(::cartographer::mapping::proto::Submap3D)},
};
static ::google::protobuf::Message const * const file_default_instances[] = {
reinterpret_cast<const ::google::protobuf::Message*>(&::cartographer::mapping::proto::_Submap2D_default_instance_),
reinterpret_cast<const ::google::protobuf::Message*>(&::cartographer::mapping::proto::_Submap3D_default_instance_),
};
void protobuf_AssignDescriptors() {
AddDescriptors();
AssignDescriptors(
"cartographer/mapping/proto/submap.proto", schemas, file_default_instances, TableStruct::offsets,
file_level_metadata, NULL, NULL);
}
void protobuf_AssignDescriptorsOnce() {
static ::google::protobuf::internal::once_flag once;
::google::protobuf::internal::call_once(once, protobuf_AssignDescriptors);
}
void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
void protobuf_RegisterTypes(const ::std::string&) {
protobuf_AssignDescriptorsOnce();
::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 2);
}
void AddDescriptorsImpl() {
InitDefaults();
static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
"\n\'cartographer/mapping/proto/submap.prot"
"o\022\032cartographer.mapping.proto\032(cartograp"
"her/mapping/proto/grid_2d.proto\032,cartogr"
"apher/mapping/proto/hybrid_grid.proto\032,c"
"artographer/transform/proto/transform.pr"
"oto\"\241\001\n\010Submap2D\0229\n\nlocal_pose\030\001 \001(\0132%.c"
"artographer.transform.proto.Rigid3d\022\026\n\016n"
"um_range_data\030\002 \001(\005\022\020\n\010finished\030\003 \001(\010\0220\n"
"\004grid\030\004 \001(\0132\".cartographer.mapping.proto"
".Grid2D\"\263\002\n\010Submap3D\0229\n\nlocal_pose\030\001 \001(\013"
"2%.cartographer.transform.proto.Rigid3d\022"
"\026\n\016num_range_data\030\002 \001(\005\022\020\n\010finished\030\003 \001("
"\010\022K\n\033high_resolution_hybrid_grid\030\004 \001(\0132&"
".cartographer.mapping.proto.HybridGrid\022J"
"\n\032low_resolution_hybrid_grid\030\005 \001(\0132&.car"
"tographer.mapping.proto.HybridGrid\022)\n!ro"
"tational_scan_matcher_histogram\030\006 \003(\002b\006p"
"roto3"
};
::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
descriptor, 685);
::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
"cartographer/mapping/proto/submap.proto", &protobuf_RegisterTypes);
::protobuf_cartographer_2fmapping_2fproto_2fgrid_5f2d_2eproto::AddDescriptors();
::protobuf_cartographer_2fmapping_2fproto_2fhybrid_5fgrid_2eproto::AddDescriptors();
::protobuf_cartographer_2ftransform_2fproto_2ftransform_2eproto::AddDescriptors();
}
void AddDescriptors() {
static ::google::protobuf::internal::once_flag once;
::google::protobuf::internal::call_once(once, AddDescriptorsImpl);
}
// Force AddDescriptors() to be called at dynamic initialization time.
struct StaticDescriptorInitializer {
StaticDescriptorInitializer() {
AddDescriptors();
}
} static_descriptor_initializer;
} // namespace protobuf_cartographer_2fmapping_2fproto_2fsubmap_2eproto
namespace cartographer {
namespace mapping {
namespace proto {
// ===================================================================
void Submap2D::InitAsDefaultInstance() {
::cartographer::mapping::proto::_Submap2D_default_instance_._instance.get_mutable()->local_pose_ = const_cast< ::cartographer::transform::proto::Rigid3d*>(
::cartographer::transform::proto::Rigid3d::internal_default_instance());
::cartographer::mapping::proto::_Submap2D_default_instance_._instance.get_mutable()->grid_ = const_cast< ::cartographer::mapping::proto::Grid2D*>(
::cartographer::mapping::proto::Grid2D::internal_default_instance());
}
void Submap2D::clear_local_pose() {
if (GetArenaNoVirtual() == NULL && local_pose_ != NULL) {
delete local_pose_;
}
local_pose_ = NULL;
}
void Submap2D::clear_grid() {
if (GetArenaNoVirtual() == NULL && grid_ != NULL) {
delete grid_;
}
grid_ = NULL;
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int Submap2D::kLocalPoseFieldNumber;
const int Submap2D::kNumRangeDataFieldNumber;
const int Submap2D::kFinishedFieldNumber;
const int Submap2D::kGridFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
Submap2D::Submap2D()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
::google::protobuf::internal::InitSCC(
&protobuf_cartographer_2fmapping_2fproto_2fsubmap_2eproto::scc_info_Submap2D.base);
SharedCtor();
// @@protoc_insertion_point(constructor:cartographer.mapping.proto.Submap2D)
}
Submap2D::Submap2D(const Submap2D& from)
: ::google::protobuf::Message(),
_internal_metadata_(NULL) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
if (from.has_local_pose()) {
local_pose_ = new ::cartographer::transform::proto::Rigid3d(*from.local_pose_);
} else {
local_pose_ = NULL;
}
if (from.has_grid()) {
grid_ = new ::cartographer::mapping::proto::Grid2D(*from.grid_);
} else {
grid_ = NULL;
}
::memcpy(&num_range_data_, &from.num_range_data_,
static_cast<size_t>(reinterpret_cast<char*>(&finished_) -
reinterpret_cast<char*>(&num_range_data_)) + sizeof(finished_));
// @@protoc_insertion_point(copy_constructor:cartographer.mapping.proto.Submap2D)
}
void Submap2D::SharedCtor() {
::memset(&local_pose_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&finished_) -
reinterpret_cast<char*>(&local_pose_)) + sizeof(finished_));
}
Submap2D::~Submap2D() {
// @@protoc_insertion_point(destructor:cartographer.mapping.proto.Submap2D)
SharedDtor();
}
void Submap2D::SharedDtor() {
if (this != internal_default_instance()) delete local_pose_;
if (this != internal_default_instance()) delete grid_;
}
void Submap2D::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* Submap2D::descriptor() {
::protobuf_cartographer_2fmapping_2fproto_2fsubmap_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_cartographer_2fmapping_2fproto_2fsubmap_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}
const Submap2D& Submap2D::default_instance() {
::google::protobuf::internal::InitSCC(&protobuf_cartographer_2fmapping_2fproto_2fsubmap_2eproto::scc_info_Submap2D.base);
return *internal_default_instance();
}
void Submap2D::Clear() {
// @@protoc_insertion_point(message_clear_start:cartographer.mapping.proto.Submap2D)
::google::protobuf::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
if (GetArenaNoVirtual() == NULL && local_pose_ != NULL) {
delete local_pose_;
}
local_pose_ = NULL;
if (GetArenaNoVirtual() == NULL && grid_ != NULL) {
delete grid_;
}
grid_ = NULL;
::memset(&num_range_data_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&finished_) -
reinterpret_cast<char*>(&num_range_data_)) + sizeof(finished_));
_internal_metadata_.Clear();
}
bool Submap2D::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:cartographer.mapping.proto.Submap2D)
for (;;) {
::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// .cartographer.transform.proto.Rigid3d local_pose = 1;
case 1: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
input, mutable_local_pose()));
} else {
goto handle_unusual;
}
break;
}
// int32 num_range_data = 2;
case 2: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &num_range_data_)));
} else {
goto handle_unusual;
}
break;
}
// bool finished = 3;
case 3: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
input, &finished_)));
} else {
goto handle_unusual;
}
break;
}
// .cartographer.mapping.proto.Grid2D grid = 4;
case 4: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
input, mutable_grid()));
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, _internal_metadata_.mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:cartographer.mapping.proto.Submap2D)
return true;
failure:
// @@protoc_insertion_point(parse_failure:cartographer.mapping.proto.Submap2D)
return false;
#undef DO_
}
void Submap2D::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:cartographer.mapping.proto.Submap2D)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// .cartographer.transform.proto.Rigid3d local_pose = 1;
if (this->has_local_pose()) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
1, this->_internal_local_pose(), output);
}
// int32 num_range_data = 2;
if (this->num_range_data() != 0) {
::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->num_range_data(), output);
}
// bool finished = 3;
if (this->finished() != 0) {
::google::protobuf::internal::WireFormatLite::WriteBool(3, this->finished(), output);
}
// .cartographer.mapping.proto.Grid2D grid = 4;
if (this->has_grid()) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
4, this->_internal_grid(), output);
}
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
}
// @@protoc_insertion_point(serialize_end:cartographer.mapping.proto.Submap2D)
}
::google::protobuf::uint8* Submap2D::InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const {
(void)deterministic; // Unused
// @@protoc_insertion_point(serialize_to_array_start:cartographer.mapping.proto.Submap2D)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// .cartographer.transform.proto.Rigid3d local_pose = 1;
if (this->has_local_pose()) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageToArray(
1, this->_internal_local_pose(), deterministic, target);
}
// int32 num_range_data = 2;
if (this->num_range_data() != 0) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->num_range_data(), target);
}
// bool finished = 3;
if (this->finished() != 0) {
target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(3, this->finished(), target);
}
// .cartographer.mapping.proto.Grid2D grid = 4;
if (this->has_grid()) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageToArray(
4, this->_internal_grid(), deterministic, target);
}
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
}
// @@protoc_insertion_point(serialize_to_array_end:cartographer.mapping.proto.Submap2D)
return target;
}
size_t Submap2D::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:cartographer.mapping.proto.Submap2D)
size_t total_size = 0;
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
}
// .cartographer.transform.proto.Rigid3d local_pose = 1;
if (this->has_local_pose()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSize(
*local_pose_);
}
// .cartographer.mapping.proto.Grid2D grid = 4;
if (this->has_grid()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSize(
*grid_);
}
// int32 num_range_data = 2;
if (this->num_range_data() != 0) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->num_range_data());
}
// bool finished = 3;
if (this->finished() != 0) {
total_size += 1 + 1;
}
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
SetCachedSize(cached_size);
return total_size;
}
void Submap2D::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:cartographer.mapping.proto.Submap2D)
GOOGLE_DCHECK_NE(&from, this);
const Submap2D* source =
::google::protobuf::internal::DynamicCastToGenerated<const Submap2D>(
&from);
if (source == NULL) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:cartographer.mapping.proto.Submap2D)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:cartographer.mapping.proto.Submap2D)
MergeFrom(*source);
}
}
void Submap2D::MergeFrom(const Submap2D& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:cartographer.mapping.proto.Submap2D)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
if (from.has_local_pose()) {
mutable_local_pose()->::cartographer::transform::proto::Rigid3d::MergeFrom(from.local_pose());
}
if (from.has_grid()) {
mutable_grid()->::cartographer::mapping::proto::Grid2D::MergeFrom(from.grid());
}
if (from.num_range_data() != 0) {
set_num_range_data(from.num_range_data());
}
if (from.finished() != 0) {
set_finished(from.finished());
}
}
void Submap2D::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:cartographer.mapping.proto.Submap2D)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void Submap2D::CopyFrom(const Submap2D& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:cartographer.mapping.proto.Submap2D)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool Submap2D::IsInitialized() const {
return true;
}
void Submap2D::Swap(Submap2D* other) {
if (other == this) return;
InternalSwap(other);
}
void Submap2D::InternalSwap(Submap2D* other) {
using std::swap;
swap(local_pose_, other->local_pose_);
swap(grid_, other->grid_);
swap(num_range_data_, other->num_range_data_);
swap(finished_, other->finished_);
_internal_metadata_.Swap(&other->_internal_metadata_);
}
::google::protobuf::Metadata Submap2D::GetMetadata() const {
protobuf_cartographer_2fmapping_2fproto_2fsubmap_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_cartographer_2fmapping_2fproto_2fsubmap_2eproto::file_level_metadata[kIndexInFileMessages];
}
// ===================================================================
void Submap3D::InitAsDefaultInstance() {
::cartographer::mapping::proto::_Submap3D_default_instance_._instance.get_mutable()->local_pose_ = const_cast< ::cartographer::transform::proto::Rigid3d*>(
::cartographer::transform::proto::Rigid3d::internal_default_instance());
::cartographer::mapping::proto::_Submap3D_default_instance_._instance.get_mutable()->high_resolution_hybrid_grid_ = const_cast< ::cartographer::mapping::proto::HybridGrid*>(
::cartographer::mapping::proto::HybridGrid::internal_default_instance());
::cartographer::mapping::proto::_Submap3D_default_instance_._instance.get_mutable()->low_resolution_hybrid_grid_ = const_cast< ::cartographer::mapping::proto::HybridGrid*>(
::cartographer::mapping::proto::HybridGrid::internal_default_instance());
}
void Submap3D::clear_local_pose() {
if (GetArenaNoVirtual() == NULL && local_pose_ != NULL) {
delete local_pose_;
}
local_pose_ = NULL;
}
void Submap3D::clear_high_resolution_hybrid_grid() {
if (GetArenaNoVirtual() == NULL && high_resolution_hybrid_grid_ != NULL) {
delete high_resolution_hybrid_grid_;
}
high_resolution_hybrid_grid_ = NULL;
}
void Submap3D::clear_low_resolution_hybrid_grid() {
if (GetArenaNoVirtual() == NULL && low_resolution_hybrid_grid_ != NULL) {
delete low_resolution_hybrid_grid_;
}
low_resolution_hybrid_grid_ = NULL;
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int Submap3D::kLocalPoseFieldNumber;
const int Submap3D::kNumRangeDataFieldNumber;
const int Submap3D::kFinishedFieldNumber;
const int Submap3D::kHighResolutionHybridGridFieldNumber;
const int Submap3D::kLowResolutionHybridGridFieldNumber;
const int Submap3D::kRotationalScanMatcherHistogramFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
Submap3D::Submap3D()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
::google::protobuf::internal::InitSCC(
&protobuf_cartographer_2fmapping_2fproto_2fsubmap_2eproto::scc_info_Submap3D.base);
SharedCtor();
// @@protoc_insertion_point(constructor:cartographer.mapping.proto.Submap3D)
}
Submap3D::Submap3D(const Submap3D& from)
: ::google::protobuf::Message(),
_internal_metadata_(NULL),
rotational_scan_matcher_histogram_(from.rotational_scan_matcher_histogram_) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
if (from.has_local_pose()) {
local_pose_ = new ::cartographer::transform::proto::Rigid3d(*from.local_pose_);
} else {
local_pose_ = NULL;
}
if (from.has_high_resolution_hybrid_grid()) {
high_resolution_hybrid_grid_ = new ::cartographer::mapping::proto::HybridGrid(*from.high_resolution_hybrid_grid_);
} else {
high_resolution_hybrid_grid_ = NULL;
}
if (from.has_low_resolution_hybrid_grid()) {
low_resolution_hybrid_grid_ = new ::cartographer::mapping::proto::HybridGrid(*from.low_resolution_hybrid_grid_);
} else {
low_resolution_hybrid_grid_ = NULL;
}
::memcpy(&num_range_data_, &from.num_range_data_,
static_cast<size_t>(reinterpret_cast<char*>(&finished_) -
reinterpret_cast<char*>(&num_range_data_)) + sizeof(finished_));
// @@protoc_insertion_point(copy_constructor:cartographer.mapping.proto.Submap3D)
}
void Submap3D::SharedCtor() {
::memset(&local_pose_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&finished_) -
reinterpret_cast<char*>(&local_pose_)) + sizeof(finished_));
}
Submap3D::~Submap3D() {
// @@protoc_insertion_point(destructor:cartographer.mapping.proto.Submap3D)
SharedDtor();
}
void Submap3D::SharedDtor() {
if (this != internal_default_instance()) delete local_pose_;
if (this != internal_default_instance()) delete high_resolution_hybrid_grid_;
if (this != internal_default_instance()) delete low_resolution_hybrid_grid_;
}
void Submap3D::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* Submap3D::descriptor() {
::protobuf_cartographer_2fmapping_2fproto_2fsubmap_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_cartographer_2fmapping_2fproto_2fsubmap_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}
const Submap3D& Submap3D::default_instance() {
::google::protobuf::internal::InitSCC(&protobuf_cartographer_2fmapping_2fproto_2fsubmap_2eproto::scc_info_Submap3D.base);
return *internal_default_instance();
}
void Submap3D::Clear() {
// @@protoc_insertion_point(message_clear_start:cartographer.mapping.proto.Submap3D)
::google::protobuf::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
rotational_scan_matcher_histogram_.Clear();
if (GetArenaNoVirtual() == NULL && local_pose_ != NULL) {
delete local_pose_;
}
local_pose_ = NULL;
if (GetArenaNoVirtual() == NULL && high_resolution_hybrid_grid_ != NULL) {
delete high_resolution_hybrid_grid_;
}
high_resolution_hybrid_grid_ = NULL;
if (GetArenaNoVirtual() == NULL && low_resolution_hybrid_grid_ != NULL) {
delete low_resolution_hybrid_grid_;
}
low_resolution_hybrid_grid_ = NULL;
::memset(&num_range_data_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&finished_) -
reinterpret_cast<char*>(&num_range_data_)) + sizeof(finished_));
_internal_metadata_.Clear();
}
bool Submap3D::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:cartographer.mapping.proto.Submap3D)
for (;;) {
::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// .cartographer.transform.proto.Rigid3d local_pose = 1;
case 1: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
input, mutable_local_pose()));
} else {
goto handle_unusual;
}
break;
}
// int32 num_range_data = 2;
case 2: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &num_range_data_)));
} else {
goto handle_unusual;
}
break;
}
// bool finished = 3;
case 3: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
input, &finished_)));
} else {
goto handle_unusual;
}
break;
}
// .cartographer.mapping.proto.HybridGrid high_resolution_hybrid_grid = 4;
case 4: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
input, mutable_high_resolution_hybrid_grid()));
} else {
goto handle_unusual;
}
break;
}
// .cartographer.mapping.proto.HybridGrid low_resolution_hybrid_grid = 5;
case 5: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
input, mutable_low_resolution_hybrid_grid()));
} else {
goto handle_unusual;
}
break;
}
// repeated float rotational_scan_matcher_histogram = 6;
case 6: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
input, this->mutable_rotational_scan_matcher_histogram())));
} else if (
static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(53u /* 53 & 0xFF */)) {
DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
1, 50u, input, this->mutable_rotational_scan_matcher_histogram())));
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, _internal_metadata_.mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:cartographer.mapping.proto.Submap3D)
return true;
failure:
// @@protoc_insertion_point(parse_failure:cartographer.mapping.proto.Submap3D)
return false;
#undef DO_
}
void Submap3D::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:cartographer.mapping.proto.Submap3D)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// .cartographer.transform.proto.Rigid3d local_pose = 1;
if (this->has_local_pose()) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
1, this->_internal_local_pose(), output);
}
// int32 num_range_data = 2;
if (this->num_range_data() != 0) {
::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->num_range_data(), output);
}
// bool finished = 3;
if (this->finished() != 0) {
::google::protobuf::internal::WireFormatLite::WriteBool(3, this->finished(), output);
}
// .cartographer.mapping.proto.HybridGrid high_resolution_hybrid_grid = 4;
if (this->has_high_resolution_hybrid_grid()) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
4, this->_internal_high_resolution_hybrid_grid(), output);
}
// .cartographer.mapping.proto.HybridGrid low_resolution_hybrid_grid = 5;
if (this->has_low_resolution_hybrid_grid()) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
5, this->_internal_low_resolution_hybrid_grid(), output);
}
// repeated float rotational_scan_matcher_histogram = 6;
if (this->rotational_scan_matcher_histogram_size() > 0) {
::google::protobuf::internal::WireFormatLite::WriteTag(6, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
_rotational_scan_matcher_histogram_cached_byte_size_));
::google::protobuf::internal::WireFormatLite::WriteFloatArray(
this->rotational_scan_matcher_histogram().data(), this->rotational_scan_matcher_histogram_size(), output);
}
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
}
// @@protoc_insertion_point(serialize_end:cartographer.mapping.proto.Submap3D)
}
::google::protobuf::uint8* Submap3D::InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const {
(void)deterministic; // Unused
// @@protoc_insertion_point(serialize_to_array_start:cartographer.mapping.proto.Submap3D)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// .cartographer.transform.proto.Rigid3d local_pose = 1;
if (this->has_local_pose()) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageToArray(
1, this->_internal_local_pose(), deterministic, target);
}
// int32 num_range_data = 2;
if (this->num_range_data() != 0) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->num_range_data(), target);
}
// bool finished = 3;
if (this->finished() != 0) {
target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(3, this->finished(), target);
}
// .cartographer.mapping.proto.HybridGrid high_resolution_hybrid_grid = 4;
if (this->has_high_resolution_hybrid_grid()) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageToArray(
4, this->_internal_high_resolution_hybrid_grid(), deterministic, target);
}
// .cartographer.mapping.proto.HybridGrid low_resolution_hybrid_grid = 5;
if (this->has_low_resolution_hybrid_grid()) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageToArray(
5, this->_internal_low_resolution_hybrid_grid(), deterministic, target);
}
// repeated float rotational_scan_matcher_histogram = 6;
if (this->rotational_scan_matcher_histogram_size() > 0) {
target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
6,
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
target);
target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
static_cast< ::google::protobuf::int32>(
_rotational_scan_matcher_histogram_cached_byte_size_), target);
target = ::google::protobuf::internal::WireFormatLite::
WriteFloatNoTagToArray(this->rotational_scan_matcher_histogram_, target);
}
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
}
// @@protoc_insertion_point(serialize_to_array_end:cartographer.mapping.proto.Submap3D)
return target;
}
size_t Submap3D::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:cartographer.mapping.proto.Submap3D)
size_t total_size = 0;
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
}
// repeated float rotational_scan_matcher_histogram = 6;
{
unsigned int count = static_cast<unsigned int>(this->rotational_scan_matcher_histogram_size());
size_t data_size = 4UL * count;
if (data_size > 0) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
static_cast< ::google::protobuf::int32>(data_size));
}
int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_rotational_scan_matcher_histogram_cached_byte_size_ = cached_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
total_size += data_size;
}
// .cartographer.transform.proto.Rigid3d local_pose = 1;
if (this->has_local_pose()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSize(
*local_pose_);
}
// .cartographer.mapping.proto.HybridGrid high_resolution_hybrid_grid = 4;
if (this->has_high_resolution_hybrid_grid()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSize(
*high_resolution_hybrid_grid_);
}
// .cartographer.mapping.proto.HybridGrid low_resolution_hybrid_grid = 5;
if (this->has_low_resolution_hybrid_grid()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSize(
*low_resolution_hybrid_grid_);
}
// int32 num_range_data = 2;
if (this->num_range_data() != 0) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->num_range_data());
}
// bool finished = 3;
if (this->finished() != 0) {
total_size += 1 + 1;
}
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
SetCachedSize(cached_size);
return total_size;
}
void Submap3D::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:cartographer.mapping.proto.Submap3D)
GOOGLE_DCHECK_NE(&from, this);
const Submap3D* source =
::google::protobuf::internal::DynamicCastToGenerated<const Submap3D>(
&from);
if (source == NULL) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:cartographer.mapping.proto.Submap3D)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:cartographer.mapping.proto.Submap3D)
MergeFrom(*source);
}
}
void Submap3D::MergeFrom(const Submap3D& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:cartographer.mapping.proto.Submap3D)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
rotational_scan_matcher_histogram_.MergeFrom(from.rotational_scan_matcher_histogram_);
if (from.has_local_pose()) {
mutable_local_pose()->::cartographer::transform::proto::Rigid3d::MergeFrom(from.local_pose());
}
if (from.has_high_resolution_hybrid_grid()) {
mutable_high_resolution_hybrid_grid()->::cartographer::mapping::proto::HybridGrid::MergeFrom(from.high_resolution_hybrid_grid());
}
if (from.has_low_resolution_hybrid_grid()) {
mutable_low_resolution_hybrid_grid()->::cartographer::mapping::proto::HybridGrid::MergeFrom(from.low_resolution_hybrid_grid());
}
if (from.num_range_data() != 0) {
set_num_range_data(from.num_range_data());
}
if (from.finished() != 0) {
set_finished(from.finished());
}
}
void Submap3D::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:cartographer.mapping.proto.Submap3D)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void Submap3D::CopyFrom(const Submap3D& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:cartographer.mapping.proto.Submap3D)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool Submap3D::IsInitialized() const {
return true;
}
void Submap3D::Swap(Submap3D* other) {
if (other == this) return;
InternalSwap(other);
}
void Submap3D::InternalSwap(Submap3D* other) {
using std::swap;
rotational_scan_matcher_histogram_.InternalSwap(&other->rotational_scan_matcher_histogram_);
swap(local_pose_, other->local_pose_);
swap(high_resolution_hybrid_grid_, other->high_resolution_hybrid_grid_);
swap(low_resolution_hybrid_grid_, other->low_resolution_hybrid_grid_);
swap(num_range_data_, other->num_range_data_);
swap(finished_, other->finished_);
_internal_metadata_.Swap(&other->_internal_metadata_);
}
::google::protobuf::Metadata Submap3D::GetMetadata() const {
protobuf_cartographer_2fmapping_2fproto_2fsubmap_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_cartographer_2fmapping_2fproto_2fsubmap_2eproto::file_level_metadata[kIndexInFileMessages];
}
// @@protoc_insertion_point(namespace_scope)
} // namespace proto
} // namespace mapping
} // namespace cartographer
namespace google {
namespace protobuf {
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::cartographer::mapping::proto::Submap2D* Arena::CreateMaybeMessage< ::cartographer::mapping::proto::Submap2D >(Arena* arena) {
return Arena::CreateInternal< ::cartographer::mapping::proto::Submap2D >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::cartographer::mapping::proto::Submap3D* Arena::CreateMaybeMessage< ::cartographer::mapping::proto::Submap3D >(Arena* arena) {
return Arena::CreateInternal< ::cartographer::mapping::proto::Submap3D >(arena);
}
} // namespace protobuf
} // namespace google
// @@protoc_insertion_point(global_scope)
|
08e7f2252f73fa116afd45363a766adf138adad0 | cfeac52f970e8901871bd02d9acb7de66b9fb6b4 | /generated/src/aws-cpp-sdk-mediatailor/include/aws/mediatailor/model/RelativePosition.h | 82724bb51c82b18b4844de625cef35db32e77260 | [
"Apache-2.0",
"MIT",
"JSON"
] | permissive | aws/aws-sdk-cpp | aff116ddf9ca2b41e45c47dba1c2b7754935c585 | 9a7606a6c98e13c759032c2e920c7c64a6a35264 | refs/heads/main | 2023-08-25T11:16:55.982089 | 2023-08-24T18:14:53 | 2023-08-24T18:14:53 | 35,440,404 | 1,681 | 1,133 | Apache-2.0 | 2023-09-12T15:59:33 | 2015-05-11T17:57:32 | null | UTF-8 | C++ | false | false | 698 | h | RelativePosition.h | /**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/mediatailor/MediaTailor_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
namespace Aws
{
namespace MediaTailor
{
namespace Model
{
enum class RelativePosition
{
NOT_SET,
BEFORE_PROGRAM,
AFTER_PROGRAM
};
namespace RelativePositionMapper
{
AWS_MEDIATAILOR_API RelativePosition GetRelativePositionForName(const Aws::String& name);
AWS_MEDIATAILOR_API Aws::String GetNameForRelativePosition(RelativePosition value);
} // namespace RelativePositionMapper
} // namespace Model
} // namespace MediaTailor
} // namespace Aws
|
9a525d308d7a314784024d67dc1b61c581ff14ab | f1d37e57d27b7e84b378bf48710f05cc23927d5b | /Roteiro4/Questao3/Funcionario.cpp | e9f721a052c861770bb6b03117f7e1029120ce32 | [] | no_license | RamalhoDev/Roteiros | cfe95a493c581a6a5bf4ae63497219f379670171 | a5c7871c6bbcef9709f5ea3c4bc1a4821896167a | refs/heads/master | 2020-03-16T03:26:19.434487 | 2018-05-23T17:33:48 | 2018-05-23T17:33:48 | 132,487,681 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,032 | cpp | Funcionario.cpp | #include "Funcionario.h"
#include <string>
using namespace std;
Funcionario::Funcionario(){
nome = "";
matricula = 0;
salario = 0;
}
Funcionario::Funcionario(const string &nome, int matricula, double salario){
this -> nome = nome;
this -> matricula = matricula;
this -> salario = salario;
}
void Funcionario::setNome(const string &nome){
this -> nome = nome;
}
void Funcionario::setMatricula(int matricula){
this -> matricula = matricula;
}
void Funcionario::setSalario(double salario){
this -> salario = salario;
}
string Funcionario::getNome(){
return nome;
}
double Funcionario::getSalario(){
return salario;
}
int Funcionario::getMatricula(){
return matricula;
}
Consultor::Consultor() : Funcionario(){}
Consultor::Consultor(const string &nome, int matricula, double salario) : Funcionario(nome, matricula, salario){}
double Consultor::getSalario(){
return salario+salario*0.1;
}
double Consultor::getSalario(float percentual){
return salario + salario*percentual;
}
|
759f4188d6218d62cc5305be206155993633a563 | 34c224c526a05835fbfedbe77c248db7d3dd8e94 | /adlib/test3.cc | 0559ff77ca16791608dbc177fc30c946425b76f1 | [
"BSL-1.0"
] | permissive | rbehrends/AdLib | 8a3ae4cad58e9d5d6de4fa43ba5f32deaf111322 | fb709cc7a116238e864a1cce4f1abd3297714574 | refs/heads/main | 2023-05-13T01:27:06.350880 | 2021-03-17T14:05:22 | 2021-06-02T05:53:51 | 373,054,395 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,071 | cc | test3.cc | #include "lib.h"
#include "set.h"
const char *data[] = {
"alpha",
"beta",
"gamma",
"delta",
"epsilon",
"zeta",
"eta",
"theta",
"iota",
"kappa",
"lambda",
"mu",
"nu",
"xi",
"omicron",
"pi",
"rho",
"sigma",
"tau",
"upsilon",
"phi",
"chi",
"psi",
"omega",
NULL,
};
const int n = 100000;
void Main() {
char buf[10];
StrSet *set = new StrSet();
for (int i = 0; i < n; i++) {
sprintf(buf, "%d", i);
set->add(new Str(buf));
}
Check(set->count() == n, "set initialization");
int miss = 0;
for (int i = 0; i < n; i++) {
sprintf(buf, "%d", i);
if (!set->contains(new Str(buf))) {
miss++;
}
}
Check(miss == 0, "contains()");
Check(set->count() == n, "count()");
Check(set->items()->len() == n, "items()");
set->remove(new Str("1234"));
Check(set->count() == n - 1, "single remove()");
for (int i = 0; i < n; i++) {
sprintf(buf, "%d", i);
set->remove(new Str(buf));
}
Check(set->count() == 0, "remove()");
StrList *arr1 = new StrList(NUMOF(data) - 1, data, CStrToStr);
StrList *arr2 = new StrList(data, (CStr) NULL, CStrToStr);
Check(arr1->eq(arr2), "array/string equality");
arr1 = arr1->subarr(10, arr1->len() - 10);
arr2->remove(0, 10);
Check(arr1->eq(arr2), "array ranges");
Str *str = S("alphalpha");
Check(str->substr(0, 5)->eq(str->substr(4, 5)), "substrings");
Check(str->find('a', 1) == 4 && str->find("alp", 1) == 4
&& str->find("alpha", 1) == 4 && str->find("alphx") < 0,
"string search");
Check(str->rfind('l') == 5 && str->rfind("alp") == 4
&& str->find("alx") == NOWHERE,
"reverse string search");
str = S("\x80 \x81 \xff abc");
Check(str->find(" \x81 ") == 1 && str->find("\x81 ") == 2
&& str->find("\xff abc") == 4 && str->find("\xff abd") < 0,
"string search (signed char)");
Check(S("here%sthere%sbe%sdragons")->replace_all(S("%s"), S(" "))
->eq("here there be dragons") &&
S("axbxc")->replace_count(1, S("x"), S("y"))->eq("aybxc"),
"string replacement");
}
|
e92da6d809789f444cf21e277d85aa366b0a50c2 | 3ef16236cc4566b03328552843b28adde7389612 | /chromeos/dbus/fwupd/fwupd_update.cc | 6cbda596966ec781f0fe12e4108d1dca8e971e53 | [
"BSD-3-Clause"
] | permissive | moteesh-in2tive/chromium | c5962834c8218ba607846ce59d0ba008be00fe2b | e1e495b29e1178a451f65980a6c4ae017c34dc94 | refs/heads/main | 2023-09-05T00:46:48.898998 | 2021-11-23T19:52:34 | 2021-11-23T19:52:34 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 686 | cc | fwupd_update.cc | // Copyright 2021 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chromeos/dbus/fwupd/fwupd_update.h"
namespace chromeos {
FwupdUpdate::FwupdUpdate() = default;
FwupdUpdate::FwupdUpdate(const std::string& version,
const std::string& description,
int priority)
: version(version), description(description), priority(priority) {}
FwupdUpdate::FwupdUpdate(FwupdUpdate&& other) = default;
FwupdUpdate& FwupdUpdate::operator=(FwupdUpdate&& other) = default;
FwupdUpdate::~FwupdUpdate() = default;
} // namespace chromeos
|
34d6a09f233ea56beb88d14700140c43962f8d60 | bf2c1226aecee49647e1351286af14d489ccb08a | /src/layers/layer.cc | e9fa1315550b92c3441c36be9480ffa00a2f9776 | [] | no_license | WheatBeer/nebula_inference | c684a4fdebce5fe905e285c9e539cb4aa7c12be7 | 46fa2eb6deb21e57d2c4266a97c2d9b16b24f12d | refs/heads/master | 2022-11-16T11:57:36.209236 | 2020-07-18T05:49:47 | 2020-07-18T05:49:47 | 273,401,601 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,019 | cc | layer.cc | #include <cstring>
#include <functional>
#include "layer.h"
namespace nebula {
layer_t::layer_t(network_t *m_network, layer_t *m_prev_layer, layer_type_t m_layer_type) :
layer_type(m_layer_type),
activation_type(activation_type_t::UNDEFINED_ACTIVATION),
input_height(1),
input_width(1),
input_channel(1),
input_size(1),
output_height(1),
output_width(1),
output_channel(1),
output_size(0),
output_data(NULL),
delta(NULL),
padding(0),
num_filters(1),
filter_size(1),
stride(1),
group(1),
prev_layer(m_prev_layer),
next_layer(NULL),
num_threads(1),
network(m_network) {
num_threads = network->num_threads;
if(m_prev_layer) { m_prev_layer->next_layer = this; }
}
// Activation function
void layer_t::activate() {
switch(activation_type) {
case activation_type_t::ELU_ACTIVATION: {
elu_activation(output_data, output_size * network->batch_size);
break;
}
case activation_type_t::HARDTAN_ACTIVATION: {
hardtan_activation(output_data, output_size * network->batch_size);
break;
}
case activation_type_t::LEAKY_ACTIVATION: {
leaky_activation(output_data, output_size * network->batch_size);
break;
}
case activation_type_t::LHTAN_ACTIVATION: {
lhtan_activation(output_data, output_size * network->batch_size);
break;
}
case activation_type_t::LINEAR_ACTIVATION: {
// Nothing to do
break;
}
case activation_type_t::LOGGY_ACTIVATION: {
loggy_activation(output_data, output_size * network->batch_size);
break;
}
case activation_type_t::LOGISTIC_ACTIVATION: {
logistic_activation(output_data, output_size * network->batch_size);
break;
}
case activation_type_t::PLSE_ACTIVATION: {
plse_activation(output_data, output_size * network->batch_size);
break;
}
case activation_type_t::RAMP_ACTIVATION: {
ramp_activation(output_data, output_size * network->batch_size);
break;
}
case activation_type_t::RELIE_ACTIVATION: {
relie_activation(output_data, output_size * network->batch_size);
break;
}
case activation_type_t::RELU_ACTIVATION: {
relu_activation(output_data, output_size * network->batch_size);
break;
}
case activation_type_t::STAIR_ACTIVATION: {
stair_activation(output_data, output_size * network->batch_size);
break;
}
case activation_type_t::TANH_ACTIVATION: {
tanh_activation(output_data, output_size * network->batch_size);
break;
}
default : {
std::cerr << "Error: undefined activation type." << std::endl;
exit(1);
}
}
}
} // namespace nebula
|
743af3a934110a4cc3e2cd9430b7cde64ade272c | 7c4292c562bb1cdeb8b4e5bc7f7dd80f33b2e37c | /src/rulecreator.cpp | 913eeff61dc1103e9d3f8c9e265c5269052f2b82 | [] | no_license | chinadog/rulecreator | 14844e7b6c55ae735bd36cd302c6d10346803054 | 2740134ba747a8e44f164c7380db5c02f8baf8bd | refs/heads/master | 2020-12-03T03:57:46.375534 | 2017-07-12T06:45:02 | 2017-07-12T06:45:02 | 95,787,638 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 11,637 | cpp | rulecreator.cpp | #include <QBoxLayout>
#include <QDateTime>
#include <QFileDialog>
#include <QMessageBox>
#include <QTabBar>
#include <Common/Resources>
#include <TRules/TRules>
#include <fstream>
#include "rulecreator.h"
#include <QDebug>
//===================================================================================================================//
// INFO WIDGET
//===================================================================================================================//
InfoWidget::InfoWidget(QWidget *parent) : QWidget(parent)
{
// init
QHBoxLayout* mainLay = new QHBoxLayout;
QVBoxLayout* lay = new QVBoxLayout;
QString fontSize = QString::number( font().pointSize()*1.2 );
QLabel* titleLabel = new QLabel("<p style='font-size:"+fontSize+"pt'>OPEN DOCUMENT</p>",this);
QLabel* textLabel = new QLabel("· File > New document (Ctrl + N)\n"
"· File > Open document (Ctrl + O)\n"
"· File > Open rule\n",this);
// set lay
lay->addStretch(1);
lay->addWidget(titleLabel);
lay->addWidget(textLabel);
lay->addStretch(1);
mainLay->addStretch(1);
mainLay->addLayout(lay);
mainLay->addStretch(1);
setLayout(mainLay);
// custom
textLabel->setObjectName("InfoSeparator");
titleLabel->setAlignment(Qt::AlignCenter);
}
//===================================================================================================================//
// RULE CREATOR
//===================================================================================================================//
//-----Конструкторы--------------------------------------------------------------------------------------------------//
RuleCreator::RuleCreator(const QString& configPath, QWidget *parent)
: QWidget(parent),
m_configPath(configPath)
{
initInterface();
initConnections();
setStartValues();
}
RuleCreator::~RuleCreator()
{
}
//-----Методы--------------------------------------------------------------------------------------------------------//
void RuleCreator::initInterface()
{
// Инициализация
QVBoxLayout* mainLay = new QVBoxLayout;
QVBoxLayout* bodyLay = new QVBoxLayout;
m_menuBar = new QMenuBar(this);
m_tabWidget = new TabWidget(this);
m_infoWidget = new InfoWidget(this);
// Меню
QMenu* fileMenu = new QMenu("File",this);
m_newAction = new QAction("New",fileMenu);
m_openAction = new QAction("Open",fileMenu);
m_openRuleAction = new QAction("Open rule",fileMenu);
m_closeAction = new QAction("Close",fileMenu);
QAction* saveAction = new QAction("Save",fileMenu);
m_saveAsAction = new QAction("Save as ...",fileMenu);
fileMenu->addAction(m_newAction);
fileMenu->addAction(m_openAction);
fileMenu->addAction(m_openRuleAction);
fileMenu->addAction(m_closeAction);
fileMenu->addSeparator();
fileMenu->addAction(saveAction);
fileMenu->addAction(m_saveAsAction);
QMenu* editMenu = new QMenu("Edit",this);
QAction* undoAction = new QAction("Undo",editMenu);
QAction* redoAction = new QAction("Redo",editMenu);
QAction* cutAction = new QAction("Cut",editMenu);
QAction* copyAction = new QAction("Copy",editMenu);
QAction* pasteAction = new QAction("Paste",editMenu);
editMenu->addAction(undoAction);
editMenu->addAction(redoAction);
editMenu->addSeparator();
editMenu->addAction(cutAction);
editMenu->addAction(copyAction);
editMenu->addAction(pasteAction);
QMenu* parseMenu = new QMenu("Parse",this);
m_parseAction = new QAction(tr("Parse"),parseMenu);
m_execAction = new QAction(tr("Exec"),parseMenu);
parseMenu->addAction(m_parseAction);
parseMenu->addAction(m_execAction);
QMenu* regexpMenu = new QMenu("Regexp",this);
m_regexpAction = new QAction(tr("Regexp"),regexpMenu);
regexpMenu->addAction(m_regexpAction);
QMenu* aboutMenu = new QMenu("About...",this);
m_aboutAction = new QAction(tr("About RuleCreator"),aboutMenu);
aboutMenu->addAction(m_aboutAction);
m_menuBar->addMenu(fileMenu);
m_menuBar->addMenu(editMenu);
m_menuBar->addMenu(parseMenu);
m_menuBar->addMenu(regexpMenu);
m_menuBar->addMenu(aboutMenu);
// Установка на слой
bodyLay->addWidget(m_infoWidget);
bodyLay->addWidget(m_tabWidget);
bodyLay->setContentsMargins(0,5,0,0);
bodyLay->setSpacing(0);
mainLay->addWidget(m_menuBar);
mainLay->addLayout(bodyLay);
mainLay->setContentsMargins(0,0,0,0);
mainLay->setSpacing(0);
setLayout(mainLay);
// Кастомизация
m_infoWidget->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding);
m_tabWidget->setTabsClosable(true);
m_tabWidget->setMovable(true);
m_tabWidget->setFocusPolicy(Qt::NoFocus);
m_tabWidget->setProperty("type","minimalize");
loadStyle( "dark" );
resize(500,350);
setWindowIcon(Resources::icon("/dark/rc.svg"));
}
void RuleCreator::initConnections()
{
connect(m_newAction,SIGNAL(triggered(bool)),this,SLOT(createNewTab()));
connect(m_openAction,SIGNAL(triggered(bool)),this,SLOT(openTab()));
connect(m_openRuleAction,SIGNAL(triggered(bool)),this,SLOT(openRuleTab()));
connect(m_closeAction,SIGNAL(triggered(bool)),this,SLOT(closeCurrentTab()));
connect(m_saveAsAction,SIGNAL(triggered(bool)),this,SLOT(saveCurrentTabAs()));
connect(m_parseAction,SIGNAL(triggered(bool)),this,SLOT(parseMessage()));
connect(m_execAction,SIGNAL(triggered(bool)),this,SLOT(execRule()));
connect(m_regexpAction,SIGNAL(triggered(bool)),this,SLOT(createRegexpTab()));
connect(m_aboutAction,SIGNAL(triggered(bool)),this,SLOT(showAboutDialog()));
connect(m_tabWidget,SIGNAL(currentChanged(int)),this,SLOT(updateMenu(int)));
connect(m_tabWidget,SIGNAL(tabCloseRequested(int)),this,SLOT(closeTab(int)));
}
void RuleCreator::setStartValues()
{
createNewTab();
}
RuleWidget* RuleCreator::createNewTab()
{
RuleWidget* newTab = new RuleWidget(this);
m_ruleTabs.push_back( newTab );
m_tabWidget->addTab( newTab, "New" );
m_tabWidget->setCurrentWidget( newTab );
if(m_tabWidget->count() > 0)
{
m_infoWidget->setVisible(false);
m_tabWidget->setVisible(true);
}
connect(newTab,SIGNAL(parseExeced()),this,SLOT(parseMessage()));
return newTab;
}
RegexpWidget *RuleCreator::createRegexpTab()
{
RegexpWidget* newTab = new RegexpWidget(this);
m_tabWidget->addTab( newTab, "Regexp" );
m_tabWidget->setCurrentWidget( newTab );
if(m_tabWidget->count() > 0)
{
m_infoWidget->setVisible(false);
m_tabWidget->setVisible(true);
}
return newTab;
}
void RuleCreator::openTab()
{
QString fileName = QFileDialog::getOpenFileName(this,
tr("Open MessageRule"), "",
tr("MessageRule (*.mrf);;All Files (*)"));
openTab(fileName);
}
void RuleCreator::openRuleTab()
{
QString fileName = QFileDialog::getOpenFileName(this,
tr("Open Rule"), "",
tr("Rule (*.rule);;All Files (*)"));
openTab(fileName);
}
void RuleCreator::openTab(const QString &fileName)
{
for(int i=0;i<m_ruleTabs.size();i++)
{
if(m_tabWidget->tabToolTip(i) == fileName)
{
m_tabWidget->setCurrentIndex(i);
return;
}
}
RuleWidget* currentTab = createNewTab();
std::ifstream f;
f.open(fileName.toStdString(), std::ios::in);
std::string str;
f.seekg(0, std::ios::end);
str.reserve(f.tellg());
f.seekg(0, std::ios::beg);
str.assign((std::istreambuf_iterator<char>(f)),
std::istreambuf_iterator<char>());
QString mrfString = QString::fromStdString(str);
currentTab->textToMrf(mrfString);
f.close();
QString tabName = fileName.right( fileName.size() - fileName.lastIndexOf('/') -1 );
m_tabWidget->setTabToolTip( m_tabWidget->currentIndex(), fileName );
m_tabWidget->setTabText( m_tabWidget->currentIndex(), tabName );
}
void RuleCreator::saveCurrentTabAs()
{
QString fileName = QFileDialog::getSaveFileName(this,
tr("Save this MessageRule"), "",
tr("MessageRule (*.mrf);;All Files (*)"));
RuleWidget* currentTab = static_cast<RuleWidget*>(m_tabWidget->currentWidget());
std::ofstream f;
f.open(fileName.toStdString(), std::ios::trunc);
f << currentTab->mrfToText().toStdString();
f.close();
}
void RuleCreator::closeCurrentTab()
{
closeTab( m_tabWidget->currentIndex() );
}
void RuleCreator::closeTab(int index)
{
m_tabWidget->removeTab(index);
if(m_tabWidget->count() == 0)
{
m_infoWidget->setVisible(true);
m_tabWidget->setVisible(false);
}
}
void RuleCreator::parseMessage()
{
RuleWidget* tab = static_cast<RuleWidget*>(m_tabWidget->currentWidget());
tab->parseMessage();
}
void RuleCreator::execRule()
{
RuleWidget* tab = static_cast<RuleWidget*>(m_tabWidget->currentWidget());
tab->execRule();
}
void RuleCreator::updateMenu(int index)
{
m_parseAction->setEnabled(false);
m_execAction->setEnabled(false);
if( dynamic_cast<RuleWidget*>(m_tabWidget->widget(index)) != 0 )
{
m_parseAction->setEnabled(true);
m_execAction->setEnabled(true);
}
}
void RuleCreator::showAboutDialog()
{
QString version = APP_VERSION;
QString revision = APP_REVISION;
QString date = APP_DATE;
QString qtVersion = QT_VERSION_STR;
QString dateStr = QDateTime::fromTime_t( date.toInt() ).toString("dd.MM.yyyy hh:mm:ss");
QString fontSize = QString::number( font().pointSize()*1.5 );
QString text = "<b style='font-size:"+fontSize+"pt'>RuleCreator "+version+"</b><br><br>"
"Based on Qt "+qtVersion+"<br><br>"
"From revision "+revision+"<br><br>"
"Built on "+dateStr+"<br><br>"
"Copyright 2016-2017 The Trifecta Ltd. All rights reserved.<br><br>"
"The software is provided \"as is\" and the author disclaims all warranties"
"with regard to this software including all implied warranties of"
"merchantability and fitness. in no event shall the author be liable for"
"any special, direct, indirect, or consequential damages or any damages"
"whatsoever resulting from loss of use, data or profits, whether in an"
"action of contract, negligence or other tortious action, arising out of"
"or in connection with the use or performance of this software.";
QMessageBox::about(this,"About RuleCreator",text);
}
void RuleCreator::loadStyle(const QString& name)
{
// Применение стилей ко всему приложению
QFile style;
QString path = RESOURCES_PATH;
path+="style/"+name+".qss";
style.setFileName(path);
if(style.open(QFile::ReadOnly))
{
TINFO() << "Style "<<path<<" [OK]";
QString qssStr = style.readAll();
qApp->setStyleSheet( Resources::style(name)+
qssStr.replace("$$PREFIX",RESOURCES_PATH) );
}
else
{
TWARNING() << "Style "<<path<<" [FAIL]";
}
}
|
113736fe4259a4aec10300595c9371de8655283c | 5ea21725bd5958fbfbb9434d8aad3e4b70f47f10 | /tests/Hexagon/Notifications/NotificationTest.cpp | 30f6ad56230b73ea6e9ddf5358c87e81bf615e07 | [] | no_license | MarkOates/hexagon | 38610a11bee4c57afb36690d3174da47d093d2bb | f103d717848c903dc24f1e6564fdad36d4fc1e23 | refs/heads/master | 2023-08-31T18:00:28.302024 | 2023-08-28T10:35:00 | 2023-08-28T10:35:00 | 147,267,150 | 0 | 0 | null | 2022-08-30T22:44:12 | 2018-09-04T00:36:30 | C++ | UTF-8 | C++ | false | false | 488 | cpp | NotificationTest.cpp |
#include <gtest/gtest.h>
#include <Hexagon/Notifications/Notification.hpp>
TEST(Hexagon_Notifications_NotificationTest, can_be_created_without_blowing_up)
{
Hexagon::Notifications::Notification notification;
}
TEST(Hexagon_Notifications_NotificationTest, body_text__has_a_getter__and_is_initialized_with_the_expected_value)
{
Hexagon::Notifications::Notification notification;
std::string expected_string = "";
EXPECT_EQ(expected_string, notification.get_body_text());
}
|
c084a8a6f592b1242cd1460638eae874e13a9ab4 | 373035950bdc8956cc0b74675aea2d1857263129 | /cpp/test-harness/ta3/harness-info-request-handler_test.cc | 777e85170f7abd827c4c8be3bd48a73ef2cdb776 | [
"BSD-2-Clause",
"BSD-3-Clause"
] | permissive | limkokholefork/SPARTA | 5d122cd2e920775d61a5404688aabbafa164f22e | 6eeb28b2dd147088b6e851876b36eeba3e700f16 | refs/heads/master | 2021-11-11T21:09:38.366985 | 2017-06-02T16:21:48 | 2017-06-02T16:21:48 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,845 | cc | harness-info-request-handler_test.cc | //*****************************************************************
// Copyright 2015 MIT Lincoln Laboratory
// Project: SPAR
// Authors: ni24039
// Description: Unit tests for HarnessInfoRequestHandler
//
// Modifications:
// Date Name Modification
// ---- ---- ------------
// 15 Nov 2012 ni24039 Original Version
//*****************************************************************
#define BOOST_TEST_MODULE HarnessInfoRequestHandlerTest
#include <boost/assign/list_of.hpp>
#include <string>
#include <vector>
#include "harness-info-request-handler.h"
#include "common/test-init.h"
#include "common/test-util.h"
#include "common/logging.h"
#include "common/util.h"
#include "baseline/common/numbered-command-receiver-fixture.h"
#include "baseline/common/extensible-ready-handler.h"
using boost::assign::list_of;
using namespace std;
BOOST_FIXTURE_TEST_CASE(HarnessInfoRequestHandlerWorks,
NumberedCommandReceiverFixture) {
FileHandleIStream from_handler(sut_stdout_read_fd);
FileHandleOStream to_handler(sut_stdin_write_fd);
string harness_id = "harness1";
size_t num_suts = 10;
auto hirh_factory =
[&] () { return HarnessInfoRequestHandlerFactory(&harness_id, &num_suts); };
command_extension->AddHandler("HARNESS_INFO", hirh_factory);
// This should block until the stream is written to.
string line;
getline(from_handler, line);
BOOST_CHECK_EQUAL(line, "READY");
line.clear();
to_handler << "COMMAND 0\n"
"HARNESS_INFO\n"
"ENDCOMMAND" << endl;
VerifyIStreamContents(list_of(string("RESULTS 0"))
(harness_id + " " + itoa(num_suts))
("ENDRESULTS")("READY"),
&from_handler);
}
|
3e8e9d09135f4b424401e3d8e27e8bb693eb2a57 | f5d011c82c49c6b754f7652e2f7b1ed308103621 | /firmware/Прочее/noisePerlin/noisePerlin.ino | f2e12e972b3430f24478d70481d5e0fa325d59b7 | [
"MIT"
] | permissive | BellARuss/FireFX | 5a92e26511bd55425c277bd5fdf28912e0a8fe9b | f9b0e087d48a69460ebca45acdd0df7b13cd3069 | refs/heads/master | 2023-08-07T19:44:39.505340 | 2021-09-09T16:07:36 | 2021-09-09T16:07:36 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 280 | ino | noisePerlin.ino | #include <FastLED.h>
#define SMOOTH_K 0.05 // коэффициент плавности огня
void setup() {
Serial.begin(9600);
}
float zoneValues = 0;
void loop() {
static int counter = 0;
Serial.println(inoise8(counter, counter));
counter += 15;
delay(100);
}
|
dcb0428d6888f80b95baf970f445f20c85ebb4d2 | f26da4e9f242ad9b3f17ba30bffb3e9eb2e9e6ba | /ParseTest/src/main.cpp | 1645591d1b9902be741818db7f1d7a27e4e73346 | [
"Zlib"
] | permissive | fallahn/tmxlite | cb33e9ad972e39fbc0824ff8078a4d058970291d | 2ac30553ceea838966829da22777cc31458db56d | refs/heads/master | 2023-07-23T00:35:40.190433 | 2023-07-13T10:10:48 | 2023-07-13T10:10:48 | 73,632,818 | 420 | 107 | NOASSERTION | 2023-07-13T10:10:50 | 2016-11-13T17:55:24 | C++ | UTF-8 | C++ | false | false | 7,107 | cpp | main.cpp | /*********************************************************************
Matt Marchant 2016 - 2023
http://trederia.blogspot.com
tmxlite - Zlib license.
This software is provided 'as-is', without any express or
implied warranty. In no event will the authors be held
liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute
it freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented;
you must not claim that you wrote the original software.
If you use this software in a product, an acknowledgment
in the product documentation would be appreciated but
is not required.
2. Altered source versions must be plainly marked as such,
and must not be misrepresented as being the original software.
3. This notice may not be removed or altered from any
source distribution.
*********************************************************************/
#include <tmxlite/Map.hpp>
#include <tmxlite/ObjectGroup.hpp>
#include <tmxlite/LayerGroup.hpp>
#include <tmxlite/TileLayer.hpp>
#include <iostream>
#include <array>
#include <string>
namespace
{
const std::array<std::string, 4u> LayerStrings =
{
std::string("Tile"),
std::string("Object"),
std::string("Image"),
std::string("Group"),
};
}
int main()
{
tmx::Map map;
if (map.load("maps/platform.tmx"))
{
std::cout << "Loaded Map version: " << map.getVersion().upper << ", " << map.getVersion().lower << std::endl;
if (map.isInfinite())
{
std::cout << "Map is infinite.\n";
}
else
{
std::cout << "Map Dimensions: " << map.getBounds() << std::endl;
}
const auto& mapProperties = map.getProperties();
std::cout << "Map class: " << map.getClass() << std::endl;
std::cout << "Map tileset has " << map.getTilesets().size() << " tilesets" << std::endl;
for (const auto& tileset : map.getTilesets())
{
std::cout << "Tileset: " << tileset.getName() << std::endl;
std::cout << "Tileset class: " << tileset.getClass() << std::endl;
}
std::cout << "Map has " << mapProperties.size() << " properties" << std::endl;
for (const auto& prop : mapProperties)
{
std::cout << "Found property: " << prop.getName() << std::endl;
std::cout << "Type: " << int(prop.getType()) << std::endl;
}
std::cout << std::endl;
const auto& layers = map.getLayers();
std::cout << "Map has " << layers.size() << " layers" << std::endl;
for (const auto& layer : layers)
{
std::cout << "Found Layer: " << layer->getName() << std::endl;
std::cout << "Layer Type: " << LayerStrings[static_cast<std::int32_t>(layer->getType())] << std::endl;
std::cout << "Layer Dimensions: " << layer->getSize() << std::endl;
std::cout << "Layer Tint: " << layer->getTintColour() << std::endl;
if (layer->getType() == tmx::Layer::Type::Group)
{
std::cout << "Checking sublayers" << std::endl;
const auto& sublayers = layer->getLayerAs<tmx::LayerGroup>().getLayers();
std::cout << "LayerGroup has " << sublayers.size() << " layers" << std::endl;
for (const auto& sublayer : sublayers)
{
std::cout << "Found Layer: " << sublayer->getName() << std::endl;
std::cout << "Sub-layer Type: " << LayerStrings[static_cast<std::int32_t>(sublayer->getType())] << std::endl;
std::cout << "Sub-layer Class: " << sublayer->getClass() << std::endl;
std::cout << "Sub-layer Dimensions: " << sublayer->getSize() << std::endl;
std::cout << "Sub-layer Tint: " << sublayer->getTintColour() << std::endl;
if (sublayer->getType() == tmx::Layer::Type::Object)
{
std::cout << sublayer->getName() << " has " << sublayer->getLayerAs<tmx::ObjectGroup>().getObjects().size() << " objects" << std::endl;
}
else if (sublayer->getType() == tmx::Layer::Type::Tile)
{
std::cout << sublayer->getName() << " has " << sublayer->getLayerAs<tmx::TileLayer>().getTiles().size() << " tiles" << std::endl;
}
}
}
if(layer->getType() == tmx::Layer::Type::Object)
{
const auto& objects = layer->getLayerAs<tmx::ObjectGroup>().getObjects();
std::cout << "Found " << objects.size() << " objects in layer" << std::endl;
for(const auto& object : objects)
{
std::cout << "Object " << object.getUID() << ", " << object.getName() << std::endl;
const auto& properties = object.getProperties();
std::cout << "Object has " << properties.size() << " properties" << std::endl;
for(const auto& prop : properties)
{
std::cout << "Found property: " << prop.getName() << std::endl;
std::cout << "Type: " << int(prop.getType()) << std::endl;
}
if (!object.getTilesetName().empty())
{
std::cout << "Object uses template tile set " << object.getTilesetName() << "\n";
}
}
}
if (layer->getType() == tmx::Layer::Type::Tile)
{
const auto& tiles = layer->getLayerAs<tmx::TileLayer>().getTiles();
if (tiles.empty())
{
const auto& chunks = layer->getLayerAs<tmx::TileLayer>().getChunks();
if (chunks.empty())
{
std::cout << "Layer has missing tile data\n";
}
else
{
std::cout << "Layer has " << chunks.size() << " tile chunks.\n";
}
}
else
{
std::cout << "Layer has " << tiles.size() << " tiles.\n";
}
}
const auto& properties = layer->getProperties();
std::cout << properties.size() << " Layer Properties:" << std::endl;
for (const auto& prop : properties)
{
std::cout << "Found property: " << prop.getName() << std::endl;
std::cout << "Type: " << int(prop.getType()) << std::endl;
}
}
}
else
{
std::cout << "Failed loading map" << std::endl;
}
#if defined(PAUSE_AT_END)
std::cout << std::endl << "Press return to quit..." <<std::endl;
std::cin.get();
#endif
return 0;
}
|
c4b1d06d733b29361800b259e10602cb90abe2d3 | 430e2e80ad87d0c845f925edcf4d2c07b4c61379 | /MS5/Error.h | 815849d0256d7c08d90cf05865c08e89406b882c | [
"Unlicense"
] | permissive | dtnguyen22/OOP244SFF | 92978a0b8627399a741a8b08a08c8662bdaa83c5 | 7a5e3eee5817f56b19f855818021317ce91c6b8d | refs/heads/master | 2022-01-18T19:00:19.449259 | 2019-08-01T02:54:37 | 2019-08-01T02:54:37 | 197,991,923 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 547 | h | Error.h | // Final Project Milestone 2 - Error Class
// Error.h
// DucTai Nguyen - 147942171 - dtnguyen22@myseneca.ca
/////////////////////////////////////////////////////////////////
#ifndef _AID_ERROR_H
#define _AID_ERROR_H
#include <iostream>
namespace aid {
class Error {
char* m_errorMessage;
public:
explicit Error(const char * errorMessage = nullptr);
~Error();
void clear();
bool isClear() const;
void message(const char* str);
const char* message() const;
};
std::ostream& operator<<(std::ostream& os, const Error& rhs);
}
#endif |
dcd9bdb98b78d8fb706e1e89ef8cb0af18738c7a | eff12a942ce4740dd582532a32ea8995081f0b49 | /p454.cpp | 87a5ff0feca4bd4f93dbf379b530f5220281a5e6 | [] | no_license | armmah/LeetcodeProblems | a58a5458268f0e876a042493080d5ab6cee6e45b | f828083c433e90f5697ce747bf9e56de14b6642c | refs/heads/master | 2021-01-02T10:25:24.803750 | 2020-03-10T17:30:16 | 2020-03-10T17:30:16 | 239,577,376 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,774 | cpp | p454.cpp | #include "LeetCodeProblem.h"
#include "Utility.h"
#include <vector>
#include <unordered_map>
// https://leetcode.com/problems/4sum-ii/submissions/
class p454 : public LeetCodeProblem {
// CPU 61%, MEM 32%
int fourSumCount(std::vector<int>& A, std::vector<int>& B, std::vector<int>& C, std::vector<int>& D) {
std::unordered_map<int, int> map;
// Build all possible combinations from A and B.
for(auto i : A)
for(auto j : B)
map[i + j]++;
int c = 0;
// Check for all possible combinations of C and D, if contained in map(Ai + Bj)
for(auto k : C)
for (auto l : D) {
auto s = 0 - k - l;
if (map[s] > 0) {
c += map[s];
}
}
return c;
}
int bruteForce(std::vector<int>& A, std::vector<int>& B, std::vector<int>& C, std::vector<int>& D) {
int c = 0;
for(auto i : A)
for(auto j : B)
for(auto k : C)
for (auto l : D) {
if (i + j + k + l == 0) {
std::cout<<" "<<i+j<<std::endl;
++c;
}
}
return c;
}
public:
void testCase() {
std::vector<int> A = {1, 2}, B = {-2, -1}, C = {-1, 2}, D = {0, 2};
Utility::print_assert(fourSumCount(A, B, C, D), bruteForce(A, B, C, D));
A = {5, -3}, B = {1, 2}, C = {-1, -2}, D = {-5, 3};
Utility::print_assert(fourSumCount(A, B, C, D), bruteForce(A, B, C, D));
A = {-1, -1}, B = {-1, 1}, C = {-1, 1}, D = {1, -1};
Utility::print_assert(fourSumCount(A, B, C, D), bruteForce(A, B, C, D));
}
}; |
5d45d61e2e23910991c7256b0605b0de5547fc51 | 8f72438d5f4ca7219df3ae7799c3282faab5e33e | /C++ Programming/05. Fifth Course/04 overView.cpp | b0bb622c78d71a03782bfc2a0ced9c8aeafb187f | [] | no_license | mdzobayer/Problem-Solving | 01eda863ef2f1e80aedcdc59bbaa48bcaeef9430 | a5b129b6817d9ec7648150f01325d9dcad282aed | refs/heads/master | 2022-08-15T22:04:18.161409 | 2022-08-08T11:46:00 | 2022-08-08T11:46:00 | 165,687,520 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 521 | cpp | 04 overView.cpp | #include <iostream>
using namespace std;
class Employee {
public:
void SetName(string name);
void SetEmpNo(int empno);
void SetExtension(int ext);
string GetName();
int GetEmpNo();
int GetExtension();
protected: // functions
private: // functions
public: // data (avoid wherever possible)
protected: // data (only used in class hierarchies & inheritance)
private: // data
string name;
int employeeNo;
int extension;
string name;
};
int main() {
return (0);
}
|
b294d86564fd0322d94f65c232ef7a43165adcdc | a30927331c2468581e21a11e50d8792c2d196e0c | /spoj/WiseAndMiser/misermap.cpp | 201f3f044b6fdc9a7a700714dd25cccd0bc6367b | [] | no_license | abhaymittal/Online-Judges | 8803e30fd37aa8890a3ffb7a84d22eb33c8ee4c1 | c9c2ed19cd303be2f1893e50ef2a3a01ec9fbce7 | refs/heads/master | 2021-01-20T09:13:35.843574 | 2017-01-10T19:04:42 | 2017-01-10T19:04:42 | 101,583,558 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 540 | cpp | misermap.cpp | #include<cstdio>
#include<algorithm>
#include<climits>
using namespace std;
int main() {
int N,M,K,temp, cost[102][102], minCost;
for(int i=1;i<102;i++) {
for(int j=0;j<102;j++) {
cost[i][j]=INT_MAX;
}
}
scanf("%d%d",&N,&M);
for(int i=1;i<=N;i++) {
for(int j=1;j<=M;j++) {
scanf("%d",&temp);
cost[i][j]=min(cost[i-1][j-1],min(cost[i-1][j],cost[i-1][j+1]))+temp;
}
}
minCost=INT_MAX;
for(int i=1;i<=M;i++) {
minCost=min(minCost,cost[N][i]);
}
printf("%d\n",minCost);
return 0;
}
|
60db72fd1aed2e3ced0fb6d349fb7421d3833177 | bf393f27196e613e0cbd1ffe66a885fddf92a62a | /core/securesocket.cpp | b9f7b591fbbc31c1c5177128f525bf3132cf1011 | [
"BSD-3-Clause"
] | permissive | Stykk-Gruppen/qTracker-Client | 3e84e80cbb5351674d1abc7d2ba5791f04603222 | 5d80fde660e7edd354020f9273fa54e6f73e99b2 | refs/heads/master | 2023-02-05T01:56:19.140757 | 2020-12-23T04:14:29 | 2020-12-23T04:14:29 | 239,994,442 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 16,638 | cpp | securesocket.cpp | #include "securesocket.h"
#include "config.cpp"
#include <iostream>
SecureSocket::SecureSocket(QObject *parent):QObject(parent)
{
}
SecureSocket::~SecureSocket()
{
if(out)
{
BIO_free(out);
}
if(web != NULL)
{
BIO_free_all(web);
}
if(NULL != ctx)
{
SSL_CTX_free(ctx);
}
}
/*std::vector<QString> createVector(QString[] arr, int length)
{
}*/
bool SecureSocket::sendFile(int code,int id,QString fileUrl)
{
QString fileUrlSubstring = fileUrl.mid(7);
QFile file(fileUrlSubstring);
if (!file.open(QIODevice::ReadOnly | QIODevice::Text))
{
qDebug() << "Failed to read file at: "<< fileUrlSubstring;
return false;
}
QByteArray bytes = file.readLine();
bool success = setup();
if(success)
{
QString message = "\n"+QString::number(id)+"\n"+QString::number(code)+"\n";
/*
// qDebug() <<"array size: "<< list.size();
//qDebug() <<"array size: "<< list.at(1);
for(int i=0;i<list.size();i++)
{
//qDebug() << "loop: "<<i<<" string: "<<list.at(i).toString();
message += list.at(i).toString()+"\n";
}*/
//qDebug() << "Message: " << message;
qDebug() << "bytes:\n" << bytes;
BIO_puts(web, bytes);
//QString message = QString::number(code)+"\n";
BIO_puts(web, message.toLocal8Bit());
//BIO_puts(out, "ResponseFromServer: \n");
int len = 0;
char buff[100] = {};
do {
/* https://www.openssl.org/docs/crypto/BIO_read.html */
len = BIO_read(web, buff, sizeof(buff));
//qDebug() << "\n len:" << len;
if(len > 0)
{
//BIO_write(out, buff, len);
//returns true if char is 1
if(out)
BIO_free(out);
if(web != NULL)
BIO_free_all(web);
if(NULL != ctx)
SSL_CTX_free(ctx);
return (int)buff[0]==49;
/*for(int x=0;x<100;x++){
qDebug() << buff[x];
}*/
}
/* BIO_should_retry returns TRUE unless there's an */
/* error. We expect an error when the server */
/* provides the response and closes the connection. */
} while (len > 0 || BIO_should_retry(web));
}
else
{
qDebug() << "Setup failed!\n";
}
}
bool SecureSocket::sendMessage(int code,QVariantList list)
{
bool success = setup();
if(success)
{
QString message = QString::number(code)+"\n";
char buff[100] = {};
// qDebug() <<"array size: "<< list.size();
//qDebug() <<"array size: "<< list.at(1);
for(int i=0;i<list.size();i++)
{
//qDebug() << "loop: "<<i<<" string: "<<list.at(i).toString();
message += list.at(i).toString()+"\n";
}
//qDebug() << "Message: " << message;
BIO_puts(web, message.toLocal8Bit().data());
//BIO_puts(out, "ResponseFromServer: \n");
int len = 0;
do {
/* https://www.openssl.org/docs/crypto/BIO_read.html */
len = BIO_read(web, buff, sizeof(buff));
//qDebug() << "\n len:" << len;
if(len > 0)
{
//BIO_write(out, buff, len);
//returns true if char is 1
if(out)
BIO_free(out);
if(web != NULL)
BIO_free_all(web);
if(NULL != ctx)
SSL_CTX_free(ctx);
return (int)buff[0]==49;
/*for(int x=0;x<100;x++){
qDebug() << buff[x];
}*/
}
/* BIO_should_retry returns TRUE unless there's an */
/* error. We expect an error when the server */
/* provides the response and closes the connection. */
} while (len > 0 || BIO_should_retry(web));
}
else
{
qDebug() << "Setup failed!\n";
}
}
bool SecureSocket::setup()
{
long res = 1;
unsigned long ssl_err = 0;
// do {
/* Internal function that wraps the OpenSSL init's */
/* Cannot fail because no OpenSSL function fails ??? */
init_openssl_library();
/* https://www.openssl.org/docs/ssl/SSL_CTX_new.html */
const SSL_METHOD* method = SSLv23_method();
ssl_err = ERR_get_error();
if(!(NULL != method))
{
print_error_string(ssl_err, "SSLv23_method");
return false;
}
/* http://www.openssl.org/docs/ssl/ctx_new.html */
ctx = SSL_CTX_new(method);
/* ctx = SSL_CTX_new(TLSv1_method()); */
ssl_err = ERR_get_error();
if(!(ctx != NULL))
{
print_error_string(ssl_err, "SSL_CTX_new");
return false;
}
/* https://www.openssl.org/docs/ssl/ctx_set_verify.html */
//SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER, SecureSocket::verify_callback);
/* Cannot fail ??? */
/* https://www.openssl.org/docs/ssl/ctx_set_verify.html */
//SSL_CTX_set_verify_depth(ctx, 5);
/* Cannot fail ??? */
/* Remove the most egregious. Because SSLv2 and SSLv3 have been */
/* removed, a TLSv1.0 handshake is used. The client accepts TLSv1.0 */
/* and above. An added benefit of TLS 1.0 and above are TLS */
/* extensions like Server Name Indicatior (SNI). */
//const long flags = SSL_OP_ALL | SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3 | SSL_OP_NO_COMPRESSION;
//long old_opts = SSL_CTX_set_options(ctx, flags);
/* http://www.openssl.org/docs/ssl/SSL_CTX_load_verify_locations.html */
// res = SSL_CTX_load_verify_locations(ctx, "fullchain.pem", NULL);
// ssl_err = ERR_get_error();
//if(!(1 == res))
//{
/* Non-fatal, but something else will probably break later */
// print_error_string(ssl_err, "SSL_CTX_load_verify_locations");
/* break; */
//}
/* https://www.openssl.org/docs/crypto/BIO_f_ssl.html */
web = BIO_new_ssl_connect(ctx);
ssl_err = ERR_get_error();
if(!(web != NULL))
{
print_error_string(ssl_err, "BIO_new_ssl_connect");
return false;
}
/* https://www.openssl.org/docs/crypto/BIO_s_connect.html */
QString connectionAddress = socketHostName+":"+socketPort;
res = BIO_set_conn_hostname(web, connectionAddress.toLocal8Bit().data());
ssl_err = ERR_get_error();
if(!(1 == res))
{
print_error_string(ssl_err, "BIO_set_conn_hostname");
return false;
}
/* https://www.openssl.org/docs/crypto/BIO_f_ssl.html */
/* This copies an internal pointer. No need to free. */
BIO_get_ssl(web, &ssl);
ssl_err = ERR_get_error();
if(!(ssl != NULL))
{
print_error_string(ssl_err, "BIO_get_ssl");
return false;
}
/* https://www.openssl.org/docs/ssl/ssl.html#DEALING_WITH_PROTOCOL_CONTEXTS */
/* https://www.openssl.org/docs/ssl/SSL_CTX_set_cipher_list.html */
res = SSL_set_cipher_list(ssl, PREFERRED_CIPHERS);
ssl_err = ERR_get_error();
if(!(1 == res))
{
print_error_string(ssl_err, "SSL_set_cipher_list");
return false;
}
/* No documentation. See the source code for tls.h and s_client.c */
res = SSL_set_tlsext_host_name(ssl, socketHostName.toLocal8Bit().data());
ssl_err = ERR_get_error();
if(!(1 == res))
{
/* Non-fatal, but who knows what cert might be served by an SNI server */
/* (We know its the default site's cert in Apache and IIS...) */
print_error_string(ssl_err, "SSL_set_tlsext_host_name");
return false;
}
/* https://www.openssl.org/docs/crypto/BIO_s_file.html */
out = BIO_new_fp(stdout, BIO_NOCLOSE);
ssl_err = ERR_get_error();
if(!(NULL != out))
{
print_error_string(ssl_err, "BIO_new_fp");
return false;
}
/* https://www.openssl.org/docs/crypto/BIO_s_connect.html */
res = BIO_do_connect(web);
ssl_err = ERR_get_error();
if(!(1 == res))
{
print_error_string(ssl_err, "BIO_do_connect");
return false;
}
/* https://www.openssl.org/docs/crypto/BIO_f_ssl.html */
res = BIO_do_handshake(web);
ssl_err = ERR_get_error();
if(!(1 == res))
{
print_error_string(ssl_err, "BIO_do_handshake");
return false;
}
/**************************************************************************************/
/**************************************************************************************/
/* You need to perform X509 verification here. There are two documents that provide */
/* guidance on the gyrations. First is RFC 5280, and second is RFC 6125. Two other */
/* documents of interest are: */
/* Baseline Certificate Requirements: */
/* https://www.cabforum.org/Baseline_Requirements_V1_1_6.pdf */
/* Extended Validation Certificate Requirements: */
/* https://www.cabforum.org/Guidelines_v1_4_3.pdf */
/* */
/* Here are the minimum steps you should perform: */
/* 1. Call SSL_get_peer_certificate and ensure the certificate is non-NULL. It */
/* should never be NULL because Anonymous Diffie-Hellman (ADH) is not allowed. */
/* 2. Call SSL_get_verify_result and ensure it returns X509_V_OK. This return value */
/* depends upon your verify_callback if you provided one. If not, the library */
/* default validation is fine (and you should not need to change it). */
/* 3. Verify either the CN or the SAN matches the host you attempted to connect to. */
/* Note Well (N.B.): OpenSSL prior to version 1.1.0 did *NOT* perform hostname */
/* verification. If you are using OpenSSL 0.9.8 or 1.0.1, then you will need */
/* to perform hostname verification yourself. The code to get you started on */
/* hostname verification is provided in print_cn_name and print_san_name. Be */
/* sure you are sensitive to ccTLDs (don't navively transform the hostname */
/* string). http://publicsuffix.org/ might be helpful. */
/* */
/* If all three checks succeed, then you have a chance at a secure connection. But */
/* its only a chance, and you should either pin your certificates (to remove DNS, */
/* CA, and Web Hosters from the equation) or implement a Trust-On-First-Use (TOFU) */
/* scheme like Perspectives or SSH. But before you TOFU, you still have to make */
/* the customary checks to ensure the certifcate passes the sniff test. */
/* */
/* Happy certificate validation hunting! */
/**************************************************************************************/
/**************************************************************************************/
/* Step 1: verify a server certifcate was presented during negotiation */
/* https://www.openssl.org/docs/ssl/SSL_get_peer_certificate.html */
X509* cert = SSL_get_peer_certificate(ssl);
if(cert) { X509_free(cert); } /* Free immediately */
if(NULL == cert)
{
/* Hack a code for print_error_string. */
print_error_string(X509_V_ERR_APPLICATION_VERIFICATION, "SSL_get_peer_certificate");
return false;
// break; /* failed */
}
/* Step 2: verify the result of chain verifcation */
/* http://www.openssl.org/docs/ssl/SSL_get_verify_result.html */
/* Error codes: http://www.openssl.org/docs/apps/verify.html */
// res = SSL_get_verify_result(ssl);
//if(!(X509_V_OK == res))
//{
/* Hack a code into print_error_string. */
// print_error_string((unsigned long)res, "SSL_get_verify_results");
//printf("Step 2 error");
//break; /* failed */
//}
/* Step 3: hostname verifcation. */
/* An exercise left to the reader. */
/**************************************************************************************/
/**************************************************************************************/
/* Now, we can finally start reading and writing to the BIO... */
/**************************************************************************************/
/**************************************************************************************/
/* https://www.openssl.org/docs/crypto/BIO_read.html */
/* BIO_should_retry returns TRUE unless there's an */
/* error. We expect an error when the server */
/* provides the response and closes the connection. */
/*BIO_puts(out, "\nFetching: \n\n");
// } while (0);
/* if(out)
BIO_free(out);
if(web != NULL)
BIO_free_all(web);
if(NULL != ctx)
SSL_CTX_free(ctx);*/
return true;
}
int SecureSocket::verify_callback(int preverify, X509_STORE_CTX* x509_ctx)
{
/* For error codes, see http://www.openssl.org/docs/apps/verify.html */
//int depth = X509_STORE_CTX_get_error_depth(x509_ctx);
int err = X509_STORE_CTX_get_error(x509_ctx);
//X509* cert = X509_STORE_CTX_get_current_cert(x509_ctx);
//X509_NAME* iname = cert ? X509_get_issuer_name(cert) : NULL;
//X509_NAME* sname = cert ? X509_get_subject_name(cert) : NULL;
//fprintf(stdout, "verify_callback (depth=%d)(preverify=%d)\n", depth, preverify);
/* Issuer is the authority we trust that warrants nothing useful */
//print_cn_name("Issuer (cn)", iname);
/* Subject is who the certificate is issued to by the authority */
//print_cn_name("Subject (cn)", sname);
if(preverify == 0)
{
if(err == X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY)
fprintf(stdout, " Error = X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY\n");
else if(err == X509_V_ERR_CERT_UNTRUSTED)
fprintf(stdout, " Error = X509_V_ERR_CERT_UNTRUSTED\n");
else if(err == X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN)
fprintf(stdout, " Error = X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN\n");
else if(err == X509_V_ERR_CERT_NOT_YET_VALID)
fprintf(stdout, " Error = X509_V_ERR_CERT_NOT_YET_VALID\n");
else if(err == X509_V_ERR_CERT_HAS_EXPIRED)
fprintf(stdout, " Error = X509_V_ERR_CERT_HAS_EXPIRED\n");
else if(err == X509_V_OK)
fprintf(stdout, " Error = X509_V_OK\n");
else
fprintf(stdout, " Error = %d\n", err);
}
#if !defined(NDEBUG)
return 1;
#else
return preverify;
#endif
}
void SecureSocket::print_error_string(unsigned long err, const char* const label)
{
const char* const str = ERR_reason_error_string(err);
if(str)
fprintf(stderr, "%s\n", str);
else
fprintf(stderr, "%s failed: %lu (0x%lx)\n", label, err, err);
}
void SecureSocket::init_openssl_library(void)
{
/* https://www.openssl.org/docs/ssl/SSL_library_init.html */
(void)SSL_library_init();
/* Cannot fail (always returns success) ??? */
/* https://www.openssl.org/docs/crypto/ERR_load_crypto_strings.html */
SSL_load_error_strings();
/* Cannot fail ??? */
/* SSL_load_error_strings loads both libssl and libcrypto strings */
/* ERR_load_crypto_strings(); */
/* Cannot fail ??? */
/* OpenSSL_config may or may not be called internally, based on */
/* some #defines and internal gyrations. Explicitly call it */
/* *IF* you need something from openssl.cfg, such as a */
/* dynamically configured ENGINE. */
OPENSSL_config(NULL);
/* Cannot fail ??? */
/* Include <openssl/opensslconf.h> to get this define */
//#if defined (OPENSSL_THREADS)
/* TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO */
/* https://www.openssl.org/docs/crypto/threads.html */
//fprintf(stdout, "Warning: thread locking is not implemented\n");
//#endif
}
|
7bd402d6b9e8824cd62e6fdb2f39672bf3532b88 | dd80a584130ef1a0333429ba76c1cee0eb40df73 | /external/chromium/chrome/browser/extensions/isolated_app_apitest.cc | bc9e2211aeff525deb10914d6e7e58cbc75c678d | [
"BSD-3-Clause",
"MIT"
] | permissive | karunmatharu/Android-4.4-Pay-by-Data | 466f4e169ede13c5835424c78e8c30ce58f885c1 | fcb778e92d4aad525ef7a995660580f948d40bc9 | refs/heads/master | 2021-03-24T13:33:01.721868 | 2017-02-18T17:48:49 | 2017-02-18T17:48:49 | 81,847,777 | 0 | 2 | MIT | 2020-03-09T00:02:12 | 2017-02-13T16:47:00 | null | UTF-8 | C++ | false | false | 6,019 | cc | isolated_app_apitest.cc | // Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/utf_string_conversions.h"
#include "chrome/browser/automation/automation_util.h"
#include "chrome/browser/extensions/extension_apitest.h"
#include "chrome/browser/extensions/extension_host.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/test/ui_test_utils.h"
#include "content/browser/renderer_host/browser_render_process_host.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "net/base/mock_host_resolver.h"
namespace {
class IsolatedAppApiTest : public ExtensionApiTest {
public:
// Returns whether the given tab's current URL has the given cookie.
bool WARN_UNUSED_RESULT HasCookie(TabContents* contents, std::string cookie) {
int value_size;
std::string actual_cookie;
automation_util::GetCookies(contents->GetURL(), contents, &value_size,
&actual_cookie);
return actual_cookie.find(cookie) != std::string::npos;
}
const Extension* GetInstalledApp(TabContents* contents) {
return static_cast<BrowserRenderProcessHost*>(
contents->render_view_host()->process())->installed_app();
}
};
} // namespace
// Tests that cookies set within an isolated app are not visible to normal
// pages or other apps.
IN_PROC_BROWSER_TEST_F(IsolatedAppApiTest, CookieIsolation) {
CommandLine::ForCurrentProcess()->AppendSwitch(
switches::kDisablePopupBlocking);
CommandLine::ForCurrentProcess()->AppendSwitch(
switches::kEnableExperimentalAppManifests);
host_resolver()->AddRule("*", "127.0.0.1");
ASSERT_TRUE(test_server()->Start());
ASSERT_TRUE(LoadExtension(test_data_dir_.AppendASCII("isolated_apps/app1")));
ASSERT_TRUE(LoadExtension(test_data_dir_.AppendASCII("isolated_apps/app2")));
// The app under test acts on URLs whose host is "localhost",
// so the URLs we navigate to must have host "localhost".
GURL base_url = test_server()->GetURL(
"files/extensions/api_test/isolated_apps/");
GURL::Replacements replace_host;
std::string host_str("localhost"); // Must stay in scope with replace_host.
replace_host.SetHostStr(host_str);
base_url = base_url.ReplaceComponents(replace_host);
browser()->NewTab();
ui_test_utils::NavigateToURL(browser(), base_url.Resolve("app1/main.html"));
browser()->NewTab();
ui_test_utils::NavigateToURL(browser(), base_url.Resolve("app2/main.html"));
browser()->NewTab();
ui_test_utils::NavigateToURL(browser(),
base_url.Resolve("non_app/main.html"));
// Ensure first two tabs have installed apps.
TabContents* tab1 = browser()->GetTabContentsAt(1);
TabContents* tab2 = browser()->GetTabContentsAt(2);
TabContents* tab3 = browser()->GetTabContentsAt(3);
ASSERT_TRUE(GetInstalledApp(tab1));
ASSERT_TRUE(GetInstalledApp(tab2));
ASSERT_TRUE(!GetInstalledApp(tab3));
// Check that each tab sees its own cookie.
ASSERT_TRUE(HasCookie(tab1, "app1=3"));
ASSERT_TRUE(HasCookie(tab2, "app2=4"));
ASSERT_TRUE(HasCookie(tab3, "normalPage=5"));
// Check that app1 tab cannot see the other cookies.
ASSERT_FALSE(HasCookie(tab1, "app2"));
ASSERT_FALSE(HasCookie(tab1, "normalPage"));
// Check that app2 tab cannot see the other cookies.
ASSERT_FALSE(HasCookie(tab2, "app1"));
ASSERT_FALSE(HasCookie(tab2, "normalPage"));
// Check that normal tab cannot see the other cookies.
ASSERT_FALSE(HasCookie(tab3, "app1"));
ASSERT_FALSE(HasCookie(tab3, "app2"));
// Check that the non_app iframe cookie is associated with app1 and not the
// normal tab. (For now, iframes are always rendered in their parent
// process, even if they aren't in the app manifest.)
ASSERT_TRUE(HasCookie(tab1, "nonAppFrame=6"));
ASSERT_FALSE(HasCookie(tab3, "nonAppFrame"));
}
// Without the --enable-experimental-app-manifests flag, all the tabs
// should see each others' cookies.
IN_PROC_BROWSER_TEST_F(IsolatedAppApiTest, CookieIsolationRequiresFlag) {
CommandLine::ForCurrentProcess()->AppendSwitch(
switches::kDisablePopupBlocking);
host_resolver()->AddRule("*", "127.0.0.1");
ASSERT_TRUE(test_server()->Start());
ASSERT_TRUE(LoadExtension(test_data_dir_.AppendASCII("isolated_apps/app1")));
ASSERT_TRUE(LoadExtension(test_data_dir_.AppendASCII("isolated_apps/app2")));
// The app under test acts on URLs whose host is "localhost",
// so the URLs we navigate to must have host "localhost".
GURL base_url = test_server()->GetURL(
"files/extensions/api_test/isolated_apps/");
GURL::Replacements replace_host;
std::string host_str("localhost"); // Must stay in scope with replace_host.
replace_host.SetHostStr(host_str);
base_url = base_url.ReplaceComponents(replace_host);
browser()->NewTab();
ui_test_utils::NavigateToURL(browser(), base_url.Resolve("app1/main.html"));
browser()->NewTab();
ui_test_utils::NavigateToURL(browser(), base_url.Resolve("app2/main.html"));
browser()->NewTab();
ui_test_utils::NavigateToURL(browser(),
base_url.Resolve("non_app/main.html"));
// Check that tabs see each others' cookies.
ASSERT_TRUE(HasCookie(browser()->GetTabContentsAt(1), "app2=4"));
ASSERT_TRUE(HasCookie(browser()->GetTabContentsAt(1), "normalPage=5"));
ASSERT_TRUE(HasCookie(browser()->GetTabContentsAt(1), "nonAppFrame=6"));
ASSERT_TRUE(HasCookie(browser()->GetTabContentsAt(2), "app1=3"));
ASSERT_TRUE(HasCookie(browser()->GetTabContentsAt(2), "normalPage=5"));
ASSERT_TRUE(HasCookie(browser()->GetTabContentsAt(2), "nonAppFrame=6"));
ASSERT_TRUE(HasCookie(browser()->GetTabContentsAt(3), "app1=3"));
ASSERT_TRUE(HasCookie(browser()->GetTabContentsAt(3), "app2=4"));
ASSERT_TRUE(HasCookie(browser()->GetTabContentsAt(3), "nonAppFrame=6"));
}
|
86d8c6218808261ad79419d6143e3facae501d29 | db1667adf524535b2f0f8bac49751f41b3b58240 | /prog4/func.cpp | 05c97e79c3502ba671b9582ff434b1828c7b82cb | [] | no_license | mcspohrer/163-Data-Structures | 493e79f1f020510c89247940b7f5067730eb4d6e | 8aa8ef626bf122b8d2b4cd63c821ac8646d779b2 | refs/heads/main | 2023-03-21T11:54:11.851784 | 2021-03-16T18:45:37 | 2021-03-16T18:45:37 | 348,456,671 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 12,906 | cpp | func.cpp | //Matthew Spohrer
//PSU ID 958566579
//CS163 prog 4
#include "prog4.h"
using namespace std;
//reads in the data from the external data file then stores it on the BST
int read(table & BST)
{
ifstream file_in;
file_in.open("website.txt");
char array[SIZE];
int file= 0;
info * temp = new info;
if (!file_in) return 0;
file_in.get(array, SIZE, '|');
file_in.ignore(100, '|');
if (temp->topic) delete [] temp->topic;
temp->topic = new char[strlen(array)+1];
strcpy(temp->topic, array);
while(file_in && !file_in.eof()) {
if (file_in.peek() == '|') file_in.ignore();
else {
file_in.get(array, SIZE, '|');
file_in.ignore(100, '|');
if (temp->keyword) delete [] temp->keyword;
temp->keyword = new char[strlen(array)+1];
strcpy(temp->keyword, array);
};
if (file_in.peek() == '|') file_in.ignore();
else {
file_in.get(array, SIZE, '|');
file_in.ignore(100, '|');
if (temp->URL) delete [] temp->URL;
temp->URL = new char[strlen(array)+1];
strcpy(temp->URL, array);
};
if (file_in.peek() == '|') file_in.ignore();
else {
file_in.get(array, SIZE, '|');
file_in.ignore(100, '|');
if (temp->summary) delete [] temp->summary;
temp->summary = new char[strlen(array)+1];
strcpy(temp->summary, array);
};
if (file_in.peek() == '|') file_in.ignore();
else {
file_in.get(array, SIZE, '|');
file_in.ignore(100, '|');
if (temp->review) delete [] temp->review;
temp->review = new char[strlen(array)+1];
strcpy(temp->review, array);
};
file_in >> temp->rating;
file_in.ignore(100, '\n');
file = BST.add(*temp);
if (file_in.peek() == '|') file_in.ignore();
else {
file_in.get(array, SIZE, '|');
file_in.ignore(100, '|');
if (temp->topic) delete [] temp->topic;
temp->topic = new char[strlen(array)+1];
strcpy(temp->topic, array);
};
}
file_in.close();
file_in.clear();
delete temp;
return file;
}
//private member function which deletes the topics of the user's choice
int table::remove_topic(node *& root, char * topic)
{
if (!root) return -4;
remove_topic(root->left, topic);
remove_node_topic(root, topic);
//if (!root) return -4;
remove_topic(root->right, topic);
remove_node_topic(root, topic);
return 0;
}
//wrapper that calls the private member function to delete all websites with a matching topic.
int table::remove_topic(char * topic)
{
if (!root) return -4;
return remove_node_topic(root, topic);
}
//gets the topic of the websites to delete from the client. passed it to the member functions in control of deleteing.
int get_topic(table & BST)
{
int num = 0;
char array[SIZE];
char * temp_topic = NULL;
cout << "\n\nWhat is the topic of the websites you would like to delete?\n";
cin.get(array, SIZE, '\n'); cin.ignore(100, '\n');
if (temp_topic) delete [] temp_topic;
temp_topic = new char[strlen(array)+1];
strcpy(temp_topic, array);
num = BST.remove_topic(temp_topic);
if (temp_topic) delete temp_topic;
temp_topic = NULL;
return num;
}
//removes all websites with a particular topic
int table::remove_node_topic(node *& temp, char * key)
{
node * hold = NULL;
if (!temp) return -4;
if ((!temp->left)&&(!temp->right)&&(strcmp(temp->data.topic, key) == 0)) {
delete temp;
temp = NULL;
return 1;
} else if ((!temp->right) &&(temp->left)&&(strcmp(temp->data.topic, key) ==0)) {
hold = temp->left;
temp->left = NULL;
delete temp;
temp = hold;
return remove_node_topic(temp, key);
} else if ((temp->right)&&(!temp->left)&&(strcmp(temp->data.topic, key) == 0)){
hold = temp->right;
temp->right = NULL;
delete temp;
temp = hold;
return remove_node_topic(temp, key);
} else {
node * current = temp->right;
if((current)&&(!current->left)&&(strcmp(temp->data.topic, key) == 0)){
temp->data.copy(current->data);
temp->right = current->right;
current->right = NULL;
delete current;
current = NULL;
return remove_node_topic(temp, key);
} else if((strcmp(temp->data.topic, key) == 0)){
node * prev = NULL;
while (current->left) {
prev = current;
current = current->left;
}
temp->data.copy(current->data);
prev->left = current->right;
current->right = NULL;
delete current;
current = NULL;
return remove_node_topic(temp, key);
}
}
return remove_node_topic(temp->left, key) + remove_node_topic(temp->right, key);
}
//recursively traverses BST to find a website with a specific keyword
int table::remove_node(node *& temp, char * key)
{
node * hold = NULL;
if (!temp) return -3;
if(!temp->left && !temp->right && strcmp(temp->data.keyword, key) == 0) {
delete temp;
temp = NULL;
} else if (!temp->right && temp->left && strcmp(temp->data.keyword, key) ==0 ) {
hold = temp->left;
temp->left = NULL;
delete temp;
temp = hold;
} else if (temp->right && !temp->left && strcmp(temp->data.keyword, key) == 0) {
hold = temp->right;
temp->right = NULL;
delete temp;
temp = hold;
} else {
node * current = temp->right;
if (current && !current->left && strcmp(temp->data.keyword, key) == 0) {
temp->data.copy(current->data);
temp->right = current->right;
current->right = NULL;
delete current;
current = NULL;
} else if (strcmp(temp->data.keyword, key) == 0) {
node * prev = NULL;
while (current->left) {
prev = current;
current = current->left;
}
temp->data.copy(current->data);
prev->left = current->right;
current->right = NULL;
delete current;
current = NULL;
}
}
if (temp && strcmp(key, temp->data.keyword) < 0) remove_node(temp->left, key);
else if (temp && strcmp(key, temp->data.keyword) > 0) remove_node(temp->right, key);
return 1;
}
//wrapper to call the provate mem func that deletes the appropriate node
int table::remove_key(char * key)
{
return remove_node(root, key);
}
//gets the keyword of the website the client would like to delete
int get_key(table & BST)
{
char * key = NULL;
char temp[SIZE];
int num = 0;
cout << "\n\nWhat is the keyword of the website you would like deleted?\n";
cin.get(temp, SIZE, '\n'); cin.ignore(100, '\n');
if (key) delete [] key;
key = new char[strlen(temp)+1];
strcpy(key, temp);
num = BST.remove_key(key);
if (key) delete key;
key = NULL;
return num;
}
//displays the information for a single website, using the reetrieve function
int display_one(table & BST)
{
char array[SIZE];
info my_info;
int suc = 0;
cout << "\n\nWhat is the keyword of the website you would like to look up?\n";
cin.get(array, SIZE, '\n'); cin.ignore(100,'\n');
if (my_info.keyword) delete [] my_info.keyword;
my_info.keyword = new char[strlen(array) +1];
strcpy(my_info.keyword, array);
suc = BST.retrieve(my_info);
if (suc == 1) {
cout << "\nKeyword: " << my_info.keyword << "\nTopic: " << my_info.topic << "\nURL: " << my_info.URL << "\nSummary: " << my_info.summary
<< "\nReview: " <<my_info.review << "\nRating: " << my_info.rating << endl << endl;
}
//delete my_info;
return suc;
}
//wrapper to pass root to the retrieve member function
int table::retrieve(info & my_info)
{
return retrieve(root, my_info);
}
//retrieves a specific by keyword website node
int table::retrieve(node *& root, info & my_info)
{
if (!root) return -3;
if (strcmp(root->data.keyword, my_info.keyword) == 0) my_info.copy(root->data);
if (strcmp(my_info.keyword, root->data.keyword) < 0) retrieve(root->left, my_info);
else if (strcmp(my_info.keyword, root->data.keyword) > 0) retrieve(root->right, my_info);
return 1;
}
//displays all the data in sorted order
int table::display(node * root)
{
if (!root) return -2;
display(root->left);
cout << "\nKeyword: " << root->data.keyword << "\nTopic: " << root->data.topic << "\nURL: " << root->data.URL << "\nSummary: " << root->data.summary
<< "\nReview: " <<root->data.review << "\nRating: " << root->data.rating << endl << endl;
display(root->right);
return 1;
}
//wrapper to call the display function
int table::display()
{
cout << "\n\n\nHere is a list of the websites you have entered, sorted by the keyword entered:\n";
return display(root);
}
//allows for a deep copy of the information
int info::copy(info & to_copy)
{
if (topic) delete [] topic;
if (keyword) delete [] keyword;
if (URL) delete [] URL;
if (summary) delete [] summary;
if (review) delete [] review;
if (to_copy.topic) {
topic = new char[strlen(to_copy.topic)+1];
strcpy(topic, to_copy.topic);
}
if (to_copy.keyword) {
keyword = new char[strlen(to_copy.keyword)+1];
strcpy(keyword, to_copy.keyword);
}
if (to_copy.URL) {
URL = new char[strlen(to_copy.URL)+1];
strcpy(URL, to_copy.URL);
}
if (to_copy.summary) {
summary = new char[strlen(to_copy.summary)+1];
strcpy(summary, to_copy.summary);
}
if (to_copy.review) {
review = new char[strlen(to_copy.review)+1];
strcpy(review, to_copy.review);
}
if (to_copy.rating) rating = to_copy.rating;
return 1;
}
//adds the new website to the BST
int table::add(node *& root, info * to_add)
{
if (!root) {
root = new node;
root->data.copy(*to_add);
return 1;
}
if (strcmp(to_add->keyword, root->data.keyword) == 0) return -1;
if (strcmp(to_add->keyword, root->data.keyword) < 0 ) return add(root->left, to_add);
else if (strcmp(to_add->keyword, root->data.keyword) > 0) return add(root->right, to_add);
return 1;
}
//wrapper to call the private member function to add
int table::add(info & to_add)
{
return add(root, &to_add);
}
//gets the information for a new website to be inserted from the client
int get_new(table & BST)
{
info to_add;
char temp[SIZE], ans = 'y';
do {
cout << "\n\nWhat is the topic of the website to be added?\n";
cin.get(temp, SIZE, '\n'); cin.ignore(150, '\n');
to_add.topic = new char[strlen(temp)+1];
strcpy(to_add.topic, temp);
cout << "\n\nWhat is the keyword of the website to be added?\n";
cin.get(temp, SIZE, '\n'); cin.ignore(150, '\n');
to_add.keyword = new char[strlen(temp)+1];
strcpy(to_add.keyword, temp);
cout << "\n\nWhat is the URL of the website to be added?\n";
cin.get(temp, SIZE, '\n'); cin.ignore(150, '\n');
to_add.URL = new char[strlen(temp)+1];
strcpy(to_add.URL, temp);
cout << "\n\nWhat is the summary of the website to be added?\n";
cin.get(temp, SIZE, '\n'); cin.ignore(150, '\n');
to_add.summary = new char[strlen(temp)+1];
strcpy(to_add.summary, temp);
cout << "\n\nWhat is the review of the website to be added?\n";
cin.get(temp, SIZE, '\n'); cin.ignore(150, '\n');
to_add.review = new char[strlen(temp)+1];
strcpy(to_add.review, temp);
cout << "\n\nWhat is the rating of the website (1-5, 1 means you almost quit internetting because "
<< "of this site and 5 being the best, restoring your faith in the internet)\n";
cin >> to_add.rating; cin.ignore(150, '\n');
cout << "\n\nYou have entered:\n" << to_add.topic << endl << to_add.keyword<< endl
<< to_add.URL << endl << to_add.summary << endl << to_add.review << endl << to_add.rating;
cout << "\n\nIs this information correct? y or n\n";
cin >> ans; cin.ignore(150, '\n');
ans = tolower(ans);
} while (ans!= 'y');
return BST.add(to_add);
}
//asks and returns what the user would like to use the program four
int get_choice()
{
int choice = 0;
do {
cout <<"\n\nWelcome to the biggest and bestest(hopefully) program this side of the mighty Mississip! Please enter what you would like to do today (integers only):\n\n\n"
<<"1)Enter a new website\n2)Remove all websites with the topic of your choosing\n3)Remove a specific website of your choosing, found by the keyword\n"
<<"4)Display all the websites, sorted by their keywords\n5)Display a single website's information, looked up by the keyword\n9)Exit the program\n";
cin >> choice; cin.ignore(100, '\n');
if (choice != 1 && choice != 2 && choice != 3 && choice != 4 && choice !=5 && choice != 9) cout << "\n\nYou think you're so cool trying to break this program?!?! Try again you jerk!\n\n";
} while (choice != 1 && choice != 2 && choice != 3 && choice != 4 && choice !=5 && choice != 9);
return choice;
}
//destructor for table class
table::~table()
{
if (root) delete root;
root = NULL;
}
//destructor for node
node::~node()
{
if (right) delete right;
right = NULL;
if (left) delete left;
left = NULL;
}
//constructor for node
node::node()
{
right = NULL;
left = NULL;
}
//constructor for the table class
table::table()
{
root = NULL;
}
//destructor for the info struct
info::~info()
{
if (topic) delete [] topic;
topic = NULL;
if (keyword) delete [] keyword;
keyword = NULL;
if (URL) delete [] URL;
URL = NULL;
if (summary) delete [] summary;
summary = NULL;
if (review) delete [] review;
review = NULL;
//rating = '\0';
}
//constructor for the info struct
info::info()
{
topic = NULL;
keyword = NULL;
URL = NULL;
summary = NULL;
review = NULL;
rating = 0;
}
|
27bcd203bf917105f2086521a92700000aba8526 | 8a87f5b889a9ce7d81421515f06d9c9cbf6ce64a | /3rdParty/boost/1.78.0/libs/geometry/doc/src/examples/algorithms/length.cpp | 71693bcf69b31ece8597cc9a029a5dd3e6e9540a | [
"BSL-1.0",
"Apache-2.0",
"BSD-3-Clause",
"ICU",
"Zlib",
"GPL-1.0-or-later",
"OpenSSL",
"ISC",
"LicenseRef-scancode-gutenberg-2020",
"MIT",
"GPL-2.0-only",
"CC0-1.0",
"LicenseRef-scancode-autoconf-simple-exception",
"LicenseRef-scancode-pcre",
"Bison-exception-2.2",
"LicenseRef-scancode-public-domain",
"JSON",
"BSD-2-Clause",
"LicenseRef-scancode-unknown-license-reference",
"Unlicense",
"BSD-4-Clause",
"Python-2.0",
"LGPL-2.1-or-later"
] | permissive | arangodb/arangodb | 0980625e76c56a2449d90dcb8d8f2c485e28a83b | 43c40535cee37fc7349a21793dc33b1833735af5 | refs/heads/devel | 2023-08-31T09:34:47.451950 | 2023-08-31T07:25:02 | 2023-08-31T07:25:02 | 2,649,214 | 13,385 | 982 | Apache-2.0 | 2023-09-14T17:02:16 | 2011-10-26T06:42:00 | C++ | UTF-8 | C++ | false | false | 974 | cpp | length.cpp | // Boost.Geometry (aka GGL, Generic Geometry Library)
// QuickBook Example
// Copyright (c) 2011-2012 Barend Gehrels, Amsterdam, the Netherlands.
// Use, modification and distribution is subject to the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//[length
//` The following simple example shows the calculation of the length of a linestring containing three points
#include <iostream>
#include <boost/geometry.hpp>
#include <boost/geometry/geometries/linestring.hpp>
#include <boost/geometry/geometries/point_xy.hpp>
int main()
{
using namespace boost::geometry;
model::linestring<model::d2::point_xy<double> > line;
read_wkt("linestring(0 0,1 1,4 8,3 2)", line);
std::cout << "linestring length is "
<< length(line)
<< " units" << std::endl;
return 0;
}
//]
//[length_output
/*`
Output:
[pre
linestring length is 15.1127 units
]
*/
//]
|
b16219375df5f098b08a5877c91ecbf0a1b4b778 | 518c1ea218366df02c9d04c08a9944742a94339a | /COCI/COCI-2015-216-Round#1/KARTE.cpp | 2836703069eb1412aacfa8fd958609b1bc566991 | [] | no_license | jhonber/Programming-Contest | 5b670d0e96263926e5d467c7b7c2434328c53c83 | c2aa60acd3ac55f9e58a610ac037b31f52236ad4 | refs/heads/master | 2021-01-24T12:52:39.569485 | 2020-03-13T01:24:32 | 2020-03-13T01:24:32 | 16,530,134 | 6 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 485 | cpp | KARTE.cpp | #include<bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
int n = s.size();
map<char, int> mapa;
set<string> st;
for (int i = 0; i < n; i += 3) {
string sub = s.substr(i, 3);
if (st.count(sub) > 0) {
cout << "GRESKA" << endl;
return 0;
}
st.insert(sub);
char p = sub[0];
mapa[p] ++;
}
cout << 13 - mapa['P'] << " " << 13 - mapa['K']
<< " " << 13 - mapa['H'] << " " << 13 - mapa['T'] << endl;
return 0;
}
|
fac975d14046c4d2974fff2190100b890967bcf8 | f958418bcc7d64378fe92c58b92c3bb1493af46c | /1008.cpp | 8815074e1068bf0ae34cc72edd7c0bff1dc7c9a3 | [] | no_license | yuyuyi/PAT-Basic-Level- | 60f616c5dd3f087017b9ec6404d0ce75befbc73d | 543f93b5ab39196066f97b77c26ea9e8b0ccf0b3 | refs/heads/master | 2022-09-29T17:30:23.212863 | 2020-05-30T12:28:21 | 2020-05-30T12:28:21 | 268,074,881 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 418 | cpp | 1008.cpp | #include<iostream>
#include<algorithm>
#include<string>
#include<vector>
using namespace std;
int main()
{
int num[100];
int n,m;
cin >> n >> m;
for(int i=0;i<n;i++)
{
cin >> num[i];
}
int k;
int z=n;
if(m!=0 && n-m>0) k = n-m;
else if(n-m <0)
{
while(n-m <0)
{
n+=z;
}
k=n-m;
}
else k =0;
for(int i=0;i<z-1;i++)
{
cout << num[k]<< " ";
k++;
if(k>z-1)k=0;
}
cout << num[k];
}
|
e7d1ab41953453f74598f512eefa1dc0c40c5325 | bbe83cf58ea0451d6c03212592e42ac0b0706fea | /image_reprojection_plugins/test/random.hpp | 0fccfd9990b7aa354719ddfe90fa0d479ebd4853 | [
"MIT"
] | permissive | Arslan-Z/image_reprojection | 0539571580f4c71494c2b4cd33c3dfe275ad39cf | 7398c49619f7132ab95d8b9accce90a241d6507a | refs/heads/master | 2023-08-15T03:14:44.005829 | 2021-10-02T11:50:04 | 2021-10-02T11:50:04 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,698 | hpp | random.hpp | #ifndef IMAGE_REPROJECTION_PLUGINS_TEST_RANDOM_HPP
#define IMAGE_REPROJECTION_PLUGINS_TEST_RANDOM_HPP
#include <geometry_msgs/Point.h>
#include <opencv2/core/core.hpp>
// the global random number generator
static cv::RNG g_rng(std::time(NULL));
// generate random value between a and b
static inline double randomValue(const double a, const double b) { return g_rng.uniform(a, b); }
// generate random value between a and b, except zero
static inline double randomNonZeroValue(const double a, const double b) {
while (true) {
const double value(randomValue(a, b));
if (value != 0.) {
return value;
}
}
}
// generate random pixel coordinate in given region
static inline cv::Vec2f randomPixel(const cv::Rect_<float> ®ion) {
return cv::Vec2f(randomValue(region.x, region.x + region.width),
randomValue(region.y, region.y + region.height));
}
// generate random point, each element is between a and b
static inline cv::Vec3f randomPoint(const double a, const double b) {
return cv::Vec3f(randomValue(a, b), randomValue(a, b), randomValue(a, b));
}
// generate random point whose norm is not zero, each element is between a and b
static inline cv::Vec3f randomNonZeroPoint(const double a, const double b) {
while (true) {
const cv::Vec3f point(randomPoint(a, b));
for (int i = 0; i < 3; ++i) {
if (point[i] != 0) {
return point;
}
}
}
}
// generate set of pixels by using randomPixel()
static inline cv::Mat randomPixels(const cv::Size &size, const cv::Rect_<float> ®ion) {
cv::Mat pixels(size, CV_32FC2);
for (int x = 0; x < size.width; ++x) {
for (int y = 0; y < size.height; ++y) {
pixels.at<cv::Vec2f>(y, x) = randomPixel(region);
}
}
return pixels;
}
// generate set of points by using randomPoint()
static inline cv::Mat randomPoints(const cv::Size &size, const double a, const double b) {
cv::Mat points(size, CV_32FC3);
for (int x = 0; x < size.width; ++x) {
for (int y = 0; y < size.height; ++y) {
points.at<cv::Vec3f>(y, x) = randomPoint(a, b);
}
}
return points;
}
// generate set of points by using randomNonZeroPoint()
static inline cv::Mat randomNonZeroPoints(const cv::Size &size, const double a, const double b) {
cv::Mat points(size, CV_32FC3);
for (int x = 0; x < size.width; ++x) {
for (int y = 0; y < size.height; ++y) {
points.at<cv::Vec3f>(y, x) = randomNonZeroPoint(a, b);
}
}
return points;
}
// cv::Vec3f to geometry_msgs::Point
static inline geometry_msgs::Point toPointMsg(const cv::Vec3f &point) {
geometry_msgs::Point msg;
msg.x = point[0];
msg.y = point[1];
msg.z = point[2];
return msg;
}
#endif |
e7035a6d8045adeed5bb7e5a58468ab4e4a77d92 | 154ffb7c5e31d36757dd3c7db80bb254ce19581b | /CNodo.cpp | 3a071aabfdfaeece174a681d9f3a47535eb7a351 | [] | no_license | Orlando-BP/Serialization-of-different-objects-in-a-list | 39a98357d14d6c0bcc83e0af71f95fe35c3ddcbf | 200b4a35279e2bad9fa3f51b3636ad330dcfff6b | refs/heads/main | 2023-08-11T02:48:01.020311 | 2021-09-30T02:02:25 | 2021-09-30T02:02:25 | 411,889,869 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 543 | cpp | CNodo.cpp | #include "CNodo.h"
#include "CSerializable.h"
void CNodo::InsertarAdelante(CSerializable* nd) {
CNodo* PNuevo = nullptr;
PNuevo = new CNodo;
PNuevo->Psig = this->Psig;
PNuevo->Pant = this;
this->Psig->Pant = PNuevo;
this->Psig = PNuevo;
PNuevo->Dato = nd;
}
CSerializable* CNodo::EliminarSiguiente() {
CNodo* PEliminar = nullptr;
PEliminar = this->Psig;
CSerializable* dato = this->Psig->Dato;
PEliminar->Psig->Pant = this;
this->Psig = PEliminar->Psig;
delete PEliminar;
return dato;
} |
8490ab4b83ea53ca001a5ceeff5c20460d528fe5 | bf276c6108d219d29bab60ccfcefdde4d9c1b65d | /kernel/src/python/py_bs_log.cpp | f8cc02429d991d6a4208a39300bebb696e634128 | [] | no_license | brbr520/bluesky | 4a66be03337a4bbae013489495a9a072ce308692 | a69bda4bf10364a32d9ae2557e6ab4ef5b7ee21a | refs/heads/master | 2021-01-23T22:06:19.260739 | 2013-04-27T12:53:17 | 2013-04-27T12:53:17 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 5,904 | cpp | py_bs_log.cpp | // This file is part of BlueSky
//
// BlueSky is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public License
// as published by the Free Software Foundation; either version 3
// of the License, or (at your option) any later version.
//
// BlueSky is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with BlueSky; if not, see <http://www.gnu.org/licenses/>.
#include "py_bs_log.h"
#include "py_bs_exports.h"
#include "py_bs_object_base.h"
#include "bs_kernel.h"
#include <bs_exception.h>
#include <boost/python/call_method.hpp>
#include <boost/python/enum.hpp>
using namespace boost::python;
namespace blue_sky {
namespace python {
py_bs_log::py_bs_log()
: //py_bs_messaging(sp_log(new bs_log(give_log::Instance())))
l(BS_KERNEL.get_log ())
{}
//py_bs_channel *py_bs_log::get(const std::string &name_) const {
// return new py_bs_channel(l[name_]);
//}
//
//const sp_channel& py_bs_log::operator[](const std::string &name_) const {
// return l[name_];
//}
py_bs_channel py_bs_log::add_channel(const py_bs_channel &ch) {
return py_bs_channel(l.add_channel(ch.c));
}
bool py_bs_log::rem_channel(const std::string &ch_name) {
return l.rem_channel(ch_name);
}
void stream_wrapper::write(const std::string &str) const {
boost::python::call_method<void>(obj.ptr(), "write", str);
}
// void py_stream::write(const std::string &str) const {
// try {
// if (override f = this->get_override("write"))
// f(str);
// else
// BSERROR << "Function write does not exists, or is not correct!" << bs_end;
// }
// catch(...) {
// throw bs_exception("py_stream","May be member function \"void write(const std::string&) const\" is not overriden!");
// }
// }
py_bs_channel::py_bs_channel(const std::string &a) : c(new bs_channel(a)),auto_newline(true) {}
py_bs_channel::py_bs_channel(const sp_channel &s) : c(s),auto_newline(true) {}
void py_bs_channel::write(const char *str) const {
locked_channel (c, __FILE__, __LINE__) << str << bs_end;
}
bool py_bs_channel::attach(const py_stream &s) const {
return c.lock()->attach(s.spstream);
}
bool py_bs_channel::detach(const py_stream &s) const {
return c.lock()->detach(s.spstream);
}
std::string py_bs_channel::get_name() const {
return c.lock()->get_name();
}
void py_bs_channel::set_output_time() const {
c.lock()->set_output_time();
}
py_thread_log::py_thread_log() : l(BS_KERNEL.get_tlog ()) {}
py_bs_channel py_thread_log::add_log_channel(const std::string &name) {
return py_bs_channel(l.add_log_channel(name));
}
bool py_thread_log::add_log_stream(const std::string &ch_name, const py_stream &pstream) {
return l.add_log_stream(ch_name,pstream.spstream);
}
bool py_thread_log::rem_log_channel(const std::string &ch_name) {
return l.rem_log_channel(ch_name);
}
bool py_thread_log::rem_log_stream(const std::string &ch_name, const py_stream &pstream) {
return l.rem_log_stream(ch_name,pstream.spstream);
}
//const py_bs_channel *py_thread_log::get(const std::string &ch_name) const {
// return new py_bs_channel(l[ch_name]);
//}
//const sp_channel &py_thread_log::operator[](const std::string &ch_name) const {
// return l[ch_name];
//}
bool py_bs_log::subscribe(int signal_code, const python_slot& slot) const {
return l.subscribe(signal_code,slot.spslot);
}
bool py_bs_log::unsubscribe(int signal_code, const python_slot& slot) const {
return l.unsubscribe(signal_code,slot.spslot);
}
ulong py_bs_log::num_slots(int signal_code) const {
return l.num_slots(signal_code);
}
bool py_bs_log::fire_signal(int signal_code, const py_objbase* param) const {
return l.fire_signal(signal_code,param->sp);
}
std::vector< int > py_bs_log::get_signal_list() const {
return l.get_signal_list();
}
//std::list< std::string > py_bs_log::get_ch_list() const {
// return l.channel_list();
//}
void py_export_log() {
class_<py_bs_log, /*bases<py_bs_messaging>,*/ noncopyable>("log")
.def("add_channel",&py_bs_log::add_channel)
.def("rem_channel",&py_bs_log::rem_channel)
//.def("get",&py_bs_log::get, return_value_policy<manage_new_object>())
.def("subscribe",&py_bs_log::subscribe)
.def("unsubscribe",&py_bs_log::unsubscribe)
.def("num_slots",&py_bs_log::num_slots)
.def("fire_signal",&py_bs_log::fire_signal)
.def("get_signal_list",&py_bs_log::get_signal_list)
//.def("get_ch_list",&py_bs_log::get_ch_list)
;
class_<py_thread_log, noncopyable>("thread_log")
.def("add_log_channel",&py_thread_log::add_log_channel)
.def("rem_log_channel",&py_thread_log::rem_log_channel)
.def("add_log_stream",&py_thread_log::add_log_stream)
.def("rem_log_stream",&py_thread_log::rem_log_stream)
//.def("get",&py_thread_log::get, return_value_policy<manage_new_object>())
;
//class_<py_stream, noncopyable>("stream")
//.def("write",pure_virtual(&bs_stream::write));
class_<stream_wrapper, noncopyable>("stream", init<const std::string &, const boost::python::object&>())
.def("write", &stream_wrapper::write);
class_<py_stream, noncopyable>("wstream", init<const std::string &, const boost::python::object&>());
class_<py_bs_channel>("channel", init <const std::string &> ())
.def(init<std::string>())
.def("attach",&py_bs_channel::attach)
.def("detach",&py_bs_channel::detach)
.def("get_name",&py_bs_channel::get_name)
.def("write",&py_bs_channel::write)
.def("set_output_time",&py_bs_channel::set_output_time)
;
enum_<bs_log::signal_codes>("log_signal_codes")
.value("log_channel_added",bs_log::log_channel_added)
.value("log_channel_removed",bs_log::log_channel_removed)
.export_values();
}
} //namespace blue_sky::python
} //namespace blue_sky
|
0d164c5cb76a65dc762b0a2b3dc782cfce38f0e7 | 31cd6780df183837a242fcb7df18b530b6d090e6 | /arduino/bus/Bus.h | afdfc9726cc340201a22ad4f01a4a96cacaf2483 | [] | no_license | ttmdear/repository | 22ecb44e5e9232188156f9e6edc4e6687e9133af | 52706275152246c973801a8308bb9312957b1887 | refs/heads/master | 2023-08-17T23:33:47.688660 | 2023-08-16T17:24:51 | 2023-08-16T17:24:51 | 229,145,298 | 0 | 0 | null | 2023-07-23T00:51:34 | 2019-12-19T21:58:28 | Makefile | UTF-8 | C++ | false | false | 1,279 | h | Bus.h | #ifndef LIGHT_GARDEN_CONTROLLER_BUS_H
#define LIGHT_GARDEN_CONTROLLER_BUS_H
#include <Arduino.h>
#define STATE_IDLE 0
#define STATE_READ 1
#define STATE_TRANSMIT 2
#define SIG_TIME 200
class Bus {
private:
char state = 0;
unsigned long time = 0;
unsigned long transmitTime;
unsigned long transmitBitAt;
char transmitBitNo;
char transmitByteNo;
char transmitByteNoEnd;
char transmitBytes[10];
bool bit;
unsigned long bitAt;
unsigned long bitTime;
unsigned char bitNo;
char byteBuffer = 0b00000000;
char messageNo = 0;
char messages[10][10];
char messagesNo = 0;
unsigned char messagesFreeNo = 1;
unsigned char messagesReadNo = 0;
char busPin;
char statePin;
void processIdle();
void processRead();
void processTransmit();
void transmit(char bytee);
bool readBus();
bool readState();
public:
// 0 REQ_ADDR 234 - R (request address)
// B ADDR 234 - A (akc message)
// 345 UP 244 345 345 - A (akc message)
// 0 ACT
// 0 A 234 - A (akc message)
// 01 ............... 1
Bus(char busPin, char statePin);
void setup();
void process();
void transmit(String addr, String cmd, String params);
};
#endif //LIGHT_GARDEN_CONTROLLER_BUS_H
|
7576de2fae3c63d0ad64c56547574594b5c9080b | ce4800790395bfc62ec582413a768c55e781e5b8 | /leetcode/1402. Reducing Dishes.h | d6f03e93898141200e723f54cfa4294943836905 | [] | no_license | apel13/cpp-training | 5168bebcb7df3d9f4924f751622eeeae56628b96 | a9103f83f20138c63064871d9964d67e56b1ecf4 | refs/heads/main | 2023-03-17T12:52:54.858106 | 2021-03-07T19:31:32 | 2021-03-07T19:31:32 | 319,043,563 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,048 | h | 1402. Reducing Dishes.h | //
// Created by apel on 29.12.2020.
//
#ifndef CPP_TRAINING_1402_REDUCING_DISHES_H
#define CPP_TRAINING_1402_REDUCING_DISHES_H
// problem:
// https://leetcode.com/problems/reducing-dishes/
class Solution {
public:
int maxSatisfaction(vector<int>& satisfaction) {
int n = satisfaction.size();
std::sort(satisfaction.begin(), satisfaction.end());
auto lzp = std::find_if(satisfaction.begin(), satisfaction.end(), [](int &i) {
return i > -1;
});
int el_idx = std::distance(satisfaction.begin(), lzp);
int res = 0;
int num = 0;
int sum = 0;
for (int i = el_idx; i < n; ++i) {
res += ++num * satisfaction[i];
sum += satisfaction[i];
}
while (--el_idx > -1) {
if (satisfaction[el_idx] + sum > 0) {
res += sum + satisfaction[el_idx];
sum += satisfaction[el_idx];
} else break;
}
return res;
}
};
#endif //CPP_TRAINING_1402_REDUCING_DISHES_H
|
647d732dd46c979a95659fa8509602acefae8a48 | 2f2c0d04dbe3b9e40a5c2a012c0e5dfd4b3b514a | /Fibo.cpp | 52e9c21c86e2f47a75ea02f8ba73b2188a25f2a6 | [] | no_license | kksiom/20210720_codingtest | 01ac1474817d407c3d6829ee4ce465a5c09300a3 | 63996ea9820ac20d65c4f56138c69ad7a04a298c | refs/heads/master | 2023-06-21T00:25:15.556030 | 2021-07-25T06:27:18 | 2021-07-25T06:27:18 | 387,780,220 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 313 | cpp | Fibo.cpp | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
vector<int> dt(100, 0);
int fibo(int x){
int result =0;
if (dt[x]!=0)
return dt[x];
dt[x] = fibo(x-2)+fibo(x-1);
return dt[x];
}
int main(){
dt[1] = dt[2]=1;
int result = fibo(40);
cout << result <<endl;
return 0;
} |
8f8e78c4442a036dd99453b4413e233e0ccbc4b9 | 9411845e7ea1f914982d2fd18b35832d3eefc388 | /Bones.Engine/DirectionalLightShadowMap.hpp | 5d89d93f4f1d1771c3ba554c4e7aa8f46133b54a | [] | no_license | luka712/bones | d7a7022aead03731da7754c10bb794ad64e5dee8 | 04a20127f45150a53ead4146093354ffc3f2033b | refs/heads/master | 2023-03-19T20:50:42.948779 | 2021-03-11T23:13:37 | 2021-03-11T23:13:37 | 320,836,548 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,951 | hpp | DirectionalLightShadowMap.hpp | //#pragma once
//
//#include <iostream>
//#include <string>
//#include "BaseTexture.hpp"
//#include "core_types.h"
//#include "DirectionalShadowShader.hpp"
//
//using namespace std;
//using namespace Bones::Shader;
//using namespace Bones::Textures;
//
//namespace Bones
//{
// namespace Shadow
// {
// struct ShadowMapFrameBufferError : public exception
// {
// string m_error;
//
// ShadowMapFrameBufferError(const string& status)
// {
// m_error = "Unable to create framebuffer object. Status: " + status;
// }
//
// const char* what() const throw ()
// {
// return m_error.c_str();
// }
// };
//
// /// <summary>
// /// Shadow map. OpenGL_ES_3, OPENGL_4
// /// </summary>
// class DirectionalLightShadowMap
// {
// protected:
// bool m_initialized = false;
// DirectionalShadowShader* m_shader;
// GLuint m_FBO, m_shadowMap;
// unsigned int m_shadowWidth, m_shadowHeight;
//
// public:
// DirectionalLightShadowMap();
// DirectionalLightShadowMap(unsigned int sizeInPixels);
//
// inline DirectionalShadowShader& GetShader() const noexcept { return *m_shader; }
// const GLuint GetShadowMap() const noexcept { return m_shadowMap; }
// const GLuint GetShadowWidth() const noexcept { return m_shadowWidth; }
// const GLuint GetShadowHeight() const noexcept { return m_shadowHeight; }
//
// void Initialize();
//
// void BindFramebuffer();
//
// /// <summary>
// /// Read shadow map into texture unit offset by amount.
// /// </summary>
// /// <param name="textureUnit">The texture unit to read into.</param>
// /// <param name="offset">The offset.</param>
// void Read(GLTextureUnit textureUnit, unsigned int offset);
//
// /// <summary>
// /// Read shadow map into texture unit.
// /// </summary>
// /// <param name="textureUnit">The texture unit to read to.</param>
// void Read(GLTextureUnit textureUnit);
//
// ~DirectionalLightShadowMap();
//
// };
//
// }
//}
//
|
2af43e1ce5552547e25b3daf4a2b11050abdd45a | abc890e58719c78d41bb5661bae1fa9eedbc4124 | /cdfb.cpp | 3db78dc7b4841d3bebd7ef99cd4e81ead65bb905 | [] | no_license | MHaq23/CC_Solutions-Codechef-Codeforces- | 2d8337dbddda088a66114dd9f07271d05ee895cf | f8b5cf1310c4892d627267766478fc375582fbe4 | refs/heads/master | 2021-01-02T18:36:47.403032 | 2020-02-11T11:45:13 | 2020-02-11T11:45:13 | 239,746,342 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 640 | cpp | cdfb.cpp | #include<bits/stdc++.h>
using namespace std ;
#define int long long
signed main(){
int t;
cin>>t;
while(t--)
{
int n;
cin>>n;
string s,s1="",s0="";
cin>>s;
int _front=0,_back=0,max_dist=0;
for(int i=0;i<n;i++)
{
s1+="1",s0+="0";
}
if(s==s1)
{cout<<2*n<<endl;continue;}
if(s==s0)
{cout<<n<<endl;continue;}
for(int i=0;i<n;i++)
{
if(s[i]=='1')
_front=i;
}
for(int i=n-1;i>=0;i--)
{
if(s[i]=='1')
_back=i;
}
max_dist=max(_front,n-1-_back);
cout<<2*(max_dist+1)<<endl;
}
return 0 ;
}
|
60e6e46e0419fbb6ff0c514411dca5d6f9fd6bc8 | 4f74100af8077e8ddf6ccfee577d4c2715a2ee64 | /lib/SDL2/include/SDL2/unique_resource.h | dd7febb1dfbf06d59f7823b50094e9ef15e9b22e | [
"BSL-1.0"
] | permissive | KABoissonneault/OpenMM3 | cd4f7a640c3137d4e616cccbc9073165e07703d5 | b1b543392f5233104b99dc72b3c6ec0cf3c47b6a | refs/heads/main | 2023-04-15T16:55:09.775005 | 2021-05-03T20:09:24 | 2021-05-03T20:09:24 | 363,252,126 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 814 | h | unique_resource.h | #pragma once
#include <memory>
struct SDL_Window;
struct SDL_Renderer;
struct SDL_Texture;
struct SDL_Surface;
namespace omm::sdl
{
struct window_delete
{
void operator()(SDL_Window* p) const noexcept;
};
struct renderer_delete
{
void operator()(SDL_Renderer* p) const noexcept;
};
struct texture_delete
{
void operator()(SDL_Texture* p) const noexcept;
};
struct surface_delete
{
void operator()(SDL_Surface* p) const noexcept;
};
using unique_window = std::unique_ptr<SDL_Window, window_delete>;
using unique_renderer = std::unique_ptr<SDL_Renderer, renderer_delete>;
using unique_texture = std::unique_ptr<SDL_Texture, texture_delete>;
using unique_surface = std::unique_ptr<SDL_Surface, surface_delete>;
} |
eb018a52048437e25b8d529c58f9f4949485de14 | a5e00504919bb338910de4cc5c3c3c4afb71e8c6 | /CodeForces/contest/1301/c.cpp | e4748799a419e8a6d97de38b4205633c0f10a1d9 | [] | no_license | samuel21119/Cpp | f55333a6e012e020dd45b54d8fff59a339d0f808 | 056a6570bd28dd795f66f31c82537c79eb57cc72 | refs/heads/master | 2023-01-05T15:14:55.357393 | 2020-10-20T23:32:20 | 2020-10-20T23:32:20 | 168,485,083 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 799 | cpp | c.cpp | /*************************************************************************
> File Name: c.cpp
> Author: Samuel
> Mail: enminghuang21119@gmail.com
> Created Time: Fri Feb 14 11:21:30 2020
*************************************************************************/
#include <bits/stdc++.h>
typedef long long ll;
using namespace std;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
int t;
cin >> t;
while (t--) {
ll n, m;
cin >> n >> m;
if (m == 0) {
cout << "0\n";
continue;
}
ll d = n - m;
m++;
ll t1 = d % m;
ll t2 = m - t1;
ll t3 = (n - m + 1) / m;
cout << (n * (n + 1) / 2 - t2 * t3 * (t3 + 1) / 2) - t1 * (t3 + 1) * (t3 + 2) / 2 << '\n';
}
return 0;
}
|
a90e3e65e698c4bb33ea5003e845b80429fef770 | 29ba22c4fe73a3f5c6c13ae6ba4bb493fd2f957c | /utility.cpp | 45d23de9990db3589e66b769a74a4d79d04b1b8e | [] | no_license | mingchengzack/2D-Drawing-System | 6681ac0a023a4951252c87838888b8c2cf53a2cd | 78ea4ea27c8e23434f21ba5e218bd8e51b7074ff | refs/heads/master | 2020-04-11T15:13:00.111927 | 2019-10-10T19:37:12 | 2019-10-10T19:37:12 | 161,883,815 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 503 | cpp | utility.cpp | #include <cstdlib>
#include <cmath>
#include <fstream>
#include <iostream>
#include "utility.h"
using namespace std;
//rounding function
int rd(const float a) { return int(a + 0.5); }
//turn pixel(x,y) to (r, g, b) value
void MakePix(int x, int y, float r, float g, float b)
{
//if it is inside the window
if (x >= 0 && x < 200 && y >= 0 && y < 200)
{
PixelBuffer[600 * y + x * 3] = r;
PixelBuffer[600 * y + x * 3 + 1] = g;
PixelBuffer[600 * y + x * 3 + 2] = b;
}
}
|
8e065e147df3dc475e4472c7910678b271d84c9c | f55f34c95fc3d28b818565bf8f20f5ee99ebf97f | /VoxwellEngine/Biomes/Mountains.h | d5d5c64868f9448a6309a2ae0baaaaa4064c2dd1 | [] | no_license | gtier/VoxwellEngine | 2ac5c8d54f332d16e8780e89f5749a05f1f66c6f | 551de7b04cbd35fa29cecdb632a7d46c93c0157e | refs/heads/master | 2023-08-22T11:51:53.341222 | 2021-09-09T19:22:06 | 2021-09-09T19:22:06 | 404,835,601 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 551 | h | Mountains.h | //
// Created by Griffin Dunaif on 3/17/21.
//
#ifndef FINAL_PROJECT_MOUNTAINS_H
#define FINAL_PROJECT_MOUNTAINS_H
#include "../ves.h"
#include "../Biome.h"
#include "BiomePreset.h"
#include "../PerlinNoise/PerlinNoise.hpp"
using namespace glm;
class Mountains : BiomePreset {
public:
Mountains(glm::ivec3 location, glm::ivec3 chunk_dim, glm::ivec2 biome_dim);
static bool biome_func(glm::ivec3 v_world_space_location);
static siv::PerlinNoise perlin;
void render(VoxwellEngine& engine);
};
#endif //FINAL_PROJECT_MOUNTAINS_H
|
539b8d8464783e4e749b6a77d1dd5a45b4af9847 | 80ebe41d667deb94da96585525e4b4f4638476cd | /BattleCityApp/BattleCityApp/check_threads_funcs.cpp | cc6b299f8671e3940c480f5f64e910675363bb0e | [] | no_license | HelgeID/BattleCityApp | 0a1f6a4ff4ebc00424923eaf843ecfadd291d215 | c9d74b1a6816d031ffd55c93410eb91ccc5a66e6 | refs/heads/master | 2020-06-28T22:41:40.067080 | 2019-07-31T08:00:00 | 2019-10-13T20:19:27 | 199,274,849 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,500 | cpp | check_threads_funcs.cpp | //FINAL
#include "check_threads.h"
#include "field.h"
bool ThreadsCheck::isCloseThread() const
{
auto status = future.wait_for(std::chrono::milliseconds(0));
return (status == std::future_status::ready);
}
bool ManagerThreads::isThreads(std::vector<ThreadsCheck*>& vecThsCheck)
{
if (!vecThsCheck.size())
return false;
mtx.lock();
for (auto it = vecThsCheck.begin(); it != vecThsCheck.end(); ++it) {
if ((*it)->isCloseThread()) {
vecThsCheck.erase(it);
break;
}
}
mtx.unlock();
if (!vecThsCheck.size())
return false;
return true;
}
void ManagerThreads::indicateTread(std::vector<ThreadsCheck*>& vecThsCheck, std::thread::id id)
{
if (!vecThsCheck.size())
return;
mtx.lock();
for (auto it = vecThsCheck.rbegin(); it != vecThsCheck.rend(); ++it) {
if ((*it)->id == id) {
(*it)->takePromise().set_value(true);
break;
}
}
mtx.unlock();
return;
}
void ManagerThreads::startControlThreads()
{
//running the Manager to control open threads
std::packaged_task<void()> task([&] {
sf::sleep(sf::milliseconds(1500));
bool isThreadsFlag(false);
while (!level_finish || isThreadsFlag) {
std::this_thread::sleep_for(std::chrono::seconds(1));
isThreadsFlag = isThreads(vecThsCheck);
if (!no_close)
level_finish = true;
}
//std::cerr << "exit control threads" << std::endl;
level_exit = true;
});
auto future = task.get_future();
std::unique_ptr<std::thread> thread(new std::thread(std::move(task)));
thread->detach();
return;
}
|
63df4bc18d0db3c797175605d17cf9bd22d8f298 | a9f6090a8e11cbc4b9ce2f655438367a381922db | /src/Jeu/Etat.cpp | cb030f9336b21c23eedc1bd793bec1ff59ff03af | [] | no_license | gitter-badger/CPP-AK-ME-DDZ | 6219207ea4aa20f30323b5f05b0056f20eb049fd | 4c147705b1fe91a7a684d63504e9e8833ffa39f2 | refs/heads/master | 2021-01-23T21:43:42.650629 | 2015-01-30T20:51:56 | 2015-01-30T20:51:56 | 30,090,357 | 0 | 0 | null | 2015-01-30T20:55:51 | 2015-01-30T20:55:51 | null | UTF-8 | C++ | false | false | 212 | cpp | Etat.cpp | /*
* Etat.cpp
*
* Created on: 27 janv. 2015
* Author: Amin
*/
#include "Etat.h"
Etat::Etat() {
// TODO Auto-generated constructor stub
}
Etat::~Etat() {
// TODO Auto-generated destructor stub
}
|
bf705d50369f97e843e00b3723ecfd859057b944 | 45e170edfd7b4448d356ae1c7f7f832889dc9348 | /uebung6/toh.cpp | 95190051ef7d5e0445cd1a3df05185cdd77eea49 | [] | no_license | Boffmann/PT2 | 53ebe61b52e1725db32e00f61cb2854ba4c5cd64 | 04277f14f033c5be95ea1b08c4bac9bc3e95ee6b | refs/heads/master | 2021-01-16T23:07:13.376967 | 2015-07-11T18:51:27 | 2015-07-11T18:51:27 | 34,122,367 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 5,901 | cpp | toh.cpp |
#include <cassert>
#include <iostream>
#include <string>
#include <cstddef>
#include <vector>
#include <cstring>
#include <cmath>
static const auto N = 5;
//static const auto N = 4;
auto A = std::vector<int>();
auto B = std::vector<int>();
auto C = std::vector<int>();
void print()
{
#ifdef _WIN32
std::system("cls");
#else
std::system("clear");
#endif
//TODO 6.2
//print state
for(int i = N-1; i >= 0; --i)
{
std::cout << " ";
int index;
if(i < A.size())
index = A.at(i);
else index = 0;
for(int j = 0; j < (N * 2 - index * 2) / 2; j++) {
std::cout << " ";
}
for(int j = 0; j < index * 2; j++) {
std::cout << "_";
}
for(int j = 0; j < (N * 2 - index * 2) / 2; j++) {
std::cout << " ";
}
std::cout << " ";
//index;
if(i < B.size())
index = B.at(i);
else index = 0;
for(int j = 0; j < (N * 2 - index * 2) / 2; j++) {
std::cout << " ";
}
for(int j = 0; j < index * 2; j++) {
std::cout << "_";
}
for(int j = 0; j < (N * 2 - index * 2) / 2; j++) {
std::cout << " ";
}
std::cout << " ";
//index;
if(i < C.size())
index = C.at(i);
else index = 0;
for(int j = 0; j < (N * 2 - index * 2) / 2; j++) {
std::cout << " ";
}
for(int j = 0; j < index * 2; j++) {
std::cout << "_";
}
for(int j = 0; j < (N * 2 - index * 2) / 2; j++) {
std::cout << " ";
}
std::cout << std::endl;
}
}
void ToH(int n, int a, int b, int c, int & moves)
{
int element;
//TODO 6.2
//Implement Towers of Hanoi and print
if(n==1) {
char from = (char)('A'+a);
char to = (char)('A'+c);
std::cout << "Move " << from << " -> " << to << std::endl;
if(from == 'A' && to == 'B') {
auto it = A.end();
auto it2 = B.end();
auto insert = B.begin();
element = *(it-1);
if(B.size() == 0) {
A.pop_back();
B.push_back(element);
//B.insert(insert, element);
} else if(element < *(it2-1)) {
A.pop_back();
B.push_back(element);
//B.insert(insert, element);
}
}
//von b nach a
else if(from == 'B' && to == 'A') {
auto it = B.end();
auto it2 = A.end();
auto insert = A.begin();
element = *(it-1);
if(A.size() == 0) {
B.pop_back();
A.push_back(element);
//A.insert(insert, element);
}
else if(element < *(it2-1)) {
B.pop_back();
A.push_back(element);
//A.insert(insert, element);
}
}
//von a nach c
else if(from == 'A' && to == 'C') {
auto it = A.end();
auto it2 = C.end();
auto insert = C.begin();
element = *(it-1);
if(C.size() == 0) {
A.pop_back();
C.push_back(element);
//C.insert(insert, element);
}
else if(element < *(it2-1)) {
A.pop_back();
C.push_back(element);
//C.insert(insert, element);
}
}
//von c nach a
else if(from == 'C' && to == 'A') {
auto it = C.end();
auto it2 = A.end();
auto insert = A.begin();
element = *(it-1);
if(A.size() == 0) {
C.pop_back();
A.push_back(element);
//A.insert(insert, element);
}
else if(element < *(it2-1)) {
C.pop_back();
A.push_back(element);
//A.insert(insert, element);
}
}
//von b nach c
else if(from == 'B' && to == 'C') {
auto it = B.end();
auto it2 = C.end();
auto insert = C.begin();
element = *(it-1);
if(C.size() == 0) {
B.pop_back();
C.push_back(element);
//C.insert(insert, element);
}
else if(element < *(it2-1)) {
B.pop_back();
C.push_back(element);
//C.insert(insert, element);
}
}
//von c nach b
else if(from == 'C' && to == 'B') {
auto it = C.end();
auto it2 = B.end();
auto insert = B.begin();
element = *(it-1);
if(B.size() == 0) {
C.pop_back();
B.push_back(element);
//B.insert(insert, element);
}
else if(element < *(it2-1)) {
C.pop_back();
B.push_back(element);
//B.insert(insert, element);
}
}
getchar();
print();
} else {
moves++;
ToH(n-1, a, c, b, moves);
ToH(1, a, b, c, moves);
ToH(n-1, b, a, c, moves);
}
}
int main(int argc, char ** argv)
{
int moves = 0;
for (int i = N; i > 0; --i)
A.push_back(i);
print();
getchar();
ToH(N, 0, 1, 2, moves);
std::cout << "minimal number of moves: " << moves << std::endl;
getchar();
return 0;
}
|
c9de0f43c205fe66d7ba95f7794c718258fec00a | 22be20ebaab75b3fe0a4c0f8e799dc5b8da5fbaf | /Lab3/Lab3/Arrive.cpp | 7eacbe5c7d690379f3ba76d50a4a799abd5b30c6 | [] | no_license | AllexisAlvarico/AI-Labs | cfbeabbb209f03eb75cc8d00a4cc7ba69b970d05 | 58e38dad0abb91b78539601bf0543c35c640d9b0 | refs/heads/master | 2023-09-02T17:31:47.941639 | 2021-11-19T10:24:41 | 2021-11-19T10:24:41 | 412,156,033 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,717 | cpp | Arrive.cpp | #include "Arrive.h"
Arrive::Arrive()
{
setupSprite();
}
void Arrive::setupSprite()
{
if (!m_texture.loadFromFile("ASSETS\\IMAGES\\enemyArrive.png")) {
std::cout << "Error enemy's texture not found!" << std::endl; // Error on texture
}
m_texture.setSmooth(true);
m_sprite.setTexture(m_texture);
m_sprite.setPosition(m_position);
m_sprite.setOrigin(130.0f, 121.5f);
m_sprite.setScale(sf::Vector2f(0.3f, 0.3f));
}
void Arrive::render(sf::RenderWindow& t_window)
{
t_window.draw(m_sprite);
}
void Arrive::update(sf::Time t_deltaTime, MyVector3 t_playerPos)
{
Steering m_steering = getSteering(t_playerPos);
m_position = m_position + m_steering.m_linear;
m_sprite.setPosition(m_position);
m_sprite.setRotation(m_steering.m_rotation);
//std::cout << "position x:" + std::to_string(m_steering.m_linear.x) + "y: " + std::to_string(m_steering.m_linear.y) << std::endl;
}
Steering Arrive::getSteering(MyVector3 t_targetPos)
{
Steering m_steering;
m_steering.m_linear = t_targetPos - m_position;
float distance = m_steering.m_linear.length();
if (distance < m_slowRadius) {
m_steering.m_linear.normalise();
m_steering.m_rotation = getRotation(m_steering.m_linear);
m_steering.m_linear * m_maxSpeed* (distance / m_slowRadius);
}
else if (distance > m_slowRadius)
{
m_steering.m_linear.normalise();
m_steering.m_rotation = getRotation(m_steering.m_linear);
m_steering.m_linear * m_maxSpeed;
}
else
{
m_steering.m_linear* m_maxSpeed * (distance / m_slowRadius);
}
return m_steering;
}
double Arrive::getRotation(MyVector3 t_vector)
{
return RadianToDegrees((atan2f(t_vector.y, t_vector.x)));
}
double Arrive::RadianToDegrees(float t_radian)
{
return t_radian * (180.0f / PI);
}
|
f40028667c3faa5427e595163bd1a212f6405b47 | 11d76a0f99bf8515c0e4a58e141ab180b2e6ea78 | /newpropertydialog.cpp | a4cffae9f64dee92c0cd076460d3e6e2fe7e4eae | [] | no_license | frl1317/UIEdit | 698d36fe06a5230694b6baabbf86affc626b9a5d | 5cd599eabacdd92d50bfee346620e5557c70c2ba | refs/heads/master | 2020-12-25T19:14:47.660741 | 2014-03-27T08:11:47 | 2014-03-27T08:11:47 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 494 | cpp | newpropertydialog.cpp | #include "newpropertydialog.h"
#include "ui_newpropertydialog.h"
#include "view.h"
NewPropertyDialog::NewPropertyDialog(View *view):
ui(new Ui::NewPropertyDialog)
{
ui->setupUi(this);
QVBoxLayout *l = (QVBoxLayout *)layout();
//l->addWidget( &browser, -1, Qt::AlignVCenter);
l->addWidget(ui->buttonBox);
//browser.showClassPropertyTemplate(view->getClassName());
//PropertyWidget::getInstance()->show
}
NewPropertyDialog::~NewPropertyDialog()
{
delete ui;
}
|
93277395a1643fc9c1817111d8e3eb3956f07b71 | 5ca2f162f0d3a3d63cb6e014c4146e75f4e063d3 | /4.1.cpp | 2d21ae234245de2a983be4101d8251a850406dba | [] | no_license | escape0707/cplusplus-primer-exercises | 126b437b3d258a902cbe4e78367925e2420b3dc2 | 2d4905769ea54bb15137ea7e6c590a2109428a1b | refs/heads/master | 2021-07-07T18:03:13.034296 | 2020-11-07T11:53:49 | 2020-11-07T11:53:49 | 202,526,516 | 0 | 0 | null | 2019-10-15T08:22:22 | 2019-08-15T11:06:50 | C++ | UTF-8 | C++ | false | false | 394 | cpp | 4.1.cpp | #include <cstddef>
#include <cstring>
#include <iostream>
#include <iterator>
#include <string>
#include <vector>
using std::begin, std::end, std::cbegin, std::cend;
using std::cin, std::cout, std::endl;
using std::size_t, std::ptrdiff_t;
using std::string;
using std::strlen, std::strcmp, std::strcat, std::strcpy;
using std::vector;
int main() {
cout << 5 + 10 * 20 / 2 << endl; // 105
}
|
689d0c2bf3331b65be460d2684a3c7ae9b6d280c | bda32ed222d39dc25dffc63111d31af719ead2f2 | /Day - 0/Aryan-Singh-Chauhan.cpp | 4f103e7d228783d652460458b2d2ee8a8e509af1 | [] | no_license | UtkarshBhardwaj123/Commit-Ur-Code | 20a15fd6115f3c8cee32854054e962ad14a845ac | 029d04e05c6e5237703e46c99f4eb178d492836f | refs/heads/main | 2023-08-28T08:35:50.259567 | 2021-10-17T18:53:39 | 2021-10-17T18:53:39 | 415,533,097 | 0 | 0 | null | 2021-10-11T03:20:54 | 2021-10-10T08:54:49 | Java | UTF-8 | C++ | false | false | 632 | cpp | Aryan-Singh-Chauhan.cpp | // chauhan739's boilerplate for competetive programming
// press F9 to compile
#include <bits/stdc++.h>
typedef long long int ll;
typedef unsigned int ui;
typedef unsigned long long int ul;
using namespace std;
int main(){
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif
ios_base::sync_with_stdio(false);
cin.tie(NULL);
ui test;
cin >> test;
while(test--){
int n;
cin >> n;
while(n != 1){
cout << n << " ";
if(n % 2) n = (n * 3) + 1;
else n /= 2;
}
cout << n << "\n";
}
return 0;
}
|
c7dfa6bf8fecbb38abc351d29e240ed54afd3d27 | 7ad3607feeff61b51fb8a3c101691e1e99671138 | /Number Theory/Multiple occurrence.cpp | 9b4c4fa3cde1aef750229e686ba7a4b68717c48e | [] | no_license | Md-Johaer-Plabon/Hackerearth-Solution | 15c0662ef860798b5ce06272d07edc843c3cf75a | 36743c23cea0b67ccf541dce276132453c9f0d9b | refs/heads/main | 2023-02-21T10:22:59.722264 | 2021-01-18T08:10:51 | 2021-01-18T08:10:51 | 329,932,989 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 561 | cpp | Multiple occurrence.cpp | #include <bits/stdc++.h>
using namespace std;
#define ll long long
int main() {
ios::sync_with_stdio(0);
cin.tie(0),cout.tie(0);
map<int,pair<int,int> >mp;
map<int,pair<int,int> >::iterator it;
int t;
cin>>t;
while(t--){
mp.clear();
ll n,x;
cin>>n;
for(int i=1;i<=n;i++){
cin>>x;
if(mp[x].first==0)
mp[x].first=i;
else
mp[x].second=i;
}
ll sum=0;
for(it=mp.begin();it!=mp.end();it++) {
if(it->second.second==0)continue;
sum+=(it->second.second-it->second.first);
}
cout<<sum<<endl;
}
return 0;
}
|
0c7a01fdb610474e99e6db3c52246f19c9bee528 | b831b6968b4450f5db6ce79603a7fe015e0da979 | /day05/ex02/RobotomyRequestForm.hpp | 9e88338cd7d72db3903c9130385b92028b7d830e | [] | no_license | RinatNur/CPP_Module | 486927b782b27da8d461805a7803af454ff1ef5a | d7ebf39392e8586ce93960bf3f6a2c2bb9a591e5 | refs/heads/master | 2023-04-02T09:23:31.701456 | 2021-04-03T16:50:25 | 2021-04-03T16:50:25 | 339,352,078 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 570 | hpp | RobotomyRequestForm.hpp | //
// Created by Rinat Nurutdinow on 3/23/21.
//
#ifndef DAY05_ROBOTOMYREQUESTFORM_HPP
#define DAY05_ROBOTOMYREQUESTFORM_HPP
#include <iostream>
#include <string>
#include "Form.hpp"
class RobotomyRequestForm : public Form {
private:
std::string szTarget_;
public:
RobotomyRequestForm(const std::string& szTarget);
RobotomyRequestForm(const RobotomyRequestForm&);
RobotomyRequestForm& operator=(const RobotomyRequestForm&);
virtual ~RobotomyRequestForm();
void executeAction(const Bureaucrat& bureaucrat) const;
};
#endif //DAY05_ROBOTOMYREQUESTFORM_HPP
|
7e9afcb182eb7d2c1981c4b4430c520f92f26a96 | 366e085423920b0d9845ba1574bff3158f84e43f | /Projects/Yac/Yac/Core/Text/Line.h | 501158b7ba86cbb9d45d7b8770eb35a56d633089 | [] | no_license | dSyncro/Yac | e652511684f1586ebd29b578117b34ca8741f30e | 31223462f4bad4cd79a3e4c7074297a4b5520a56 | refs/heads/master | 2023-06-22T12:03:20.593667 | 2021-07-23T15:51:33 | 2021-07-23T15:51:33 | 226,870,484 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 754 | h | Line.h | #pragma once
#include "TextSpan.h"
#include <string>
namespace Yac {
struct Line final {
public:
Line(const std::string& text, TextSpan span)
: _text(text), _span(span) { }
char operator [](UIntT index) const { return _text[index]; }
const std::string& getText() const noexcept { return _text; }
const TextSpan& getSpan() const noexcept { return _span; }
UIntT getStart() const noexcept { return _span.getStart(); }
UIntT getLength() const noexcept { return _span.getLength(); }
UIntT getEnd() const noexcept { return _span.getEnd(); }
std::string getSubstring(UIntT start = 0, UIntT length = 0xFFFFFFFF) const noexcept
{
return _text.substr(start, length);
}
private:
std::string _text;
TextSpan _span;
};
} |
908e51ae00c51649ad9946547cc1d343a6e08d64 | cb7e7486374cc995045d003c6c08be405364498e | /src/qpid/broker/Lvq.cpp | 34f080c57f877f4cbb966d8b86241c27da1ce0ba | [
"Apache-2.0"
] | permissive | apache/qpid-cpp | f7e05f2d2fa0e90988634cfe309a58b74a42d50d | 1077fe6b2a2e0db9921e8cf10ec3a4ce19d64fad | refs/heads/main | 2023-08-29T05:27:02.237085 | 2023-04-17T10:03:01 | 2023-04-17T10:03:01 | 62,698,709 | 86 | 81 | Apache-2.0 | 2023-04-17T10:03:02 | 2016-07-06T07:00:07 | C++ | UTF-8 | C++ | false | false | 2,217 | cpp | Lvq.cpp | /*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
#include "Lvq.h"
#include "MessageMap.h"
#include "qpid/sys/Monitor.h"
namespace qpid {
namespace broker {
Lvq::Lvq(const std::string& n, std::auto_ptr<MessageMap> m, const QueueSettings& s, MessageStore* const ms, management::Manageable* p, Broker* b)
: Queue(n, s, ms, p, b), messageMap(*m)
{
messages = m;
}
void Lvq::push(Message& message, bool isRecovery)
{
QueueListeners::NotificationSet copy;
Message old;
bool removed;
{
qpid::sys::Mutex::ScopedLock locker(messageLock);
message.setSequence(++sequence);
interceptors.publish(message);
removed = messageMap.update(message, old);
listeners.populate(copy);
observeEnqueue(message, locker);
if (removed) {
if (mgmtObject) {
mgmtObject->inc_acquires();
mgmtObject->inc_discardsLvq();
if (brokerMgmtObject) {
brokerMgmtObject->inc_acquires();
brokerMgmtObject->inc_discardsLvq();
}
}
observeDequeue(old, locker, 0/*can't be empty, so no need to check autodelete*/);
}
}
copy.notify();
if (removed) {
if (isRecovery) pendingDequeues.push_back(old);
else if (old.isPersistent())
dequeueFromStore(old.getPersistentContext());//do outside of lock
}
}
}} // namespace qpid::broker
|
ef98f7833c81656044773ee3147ac400aec412b5 | 23c84c283f0dd2ffe6811e85d5924102a05d7ed1 | /UVa/V110/11059 - Maximum Product.cpp | e42048645a1537a6f3fd46f47fbc2fbbbb4dbfc3 | [] | no_license | HJackH/OnlineJudges | efaaaf35fabeb5393a3fefac9a19e3c89a535b3b | 1e5bfc7ad13cc171e16d562a4cac0bcdc92bbce2 | refs/heads/master | 2022-07-08T21:31:37.960165 | 2022-06-22T07:01:57 | 2022-06-22T07:01:57 | 245,434,136 | 4 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 548 | cpp | 11059 - Maximum Product.cpp | #include <bits/stdc++.h>
using namespace std;
const int MAXN = 18 + 5;
int n;
long long a[MAXN];
int main() {
int kase = 0;
while (cin >> n) {
for (int i = 0; i < n; i++) {
cin >> a[i];
}
long long ans = 0;
for (int i = 0; i < n; i++) {
long long tmp = 1;
for (int j = i; j < n; j++) {
tmp *= a[j];
ans = max(ans, tmp);
}
}
cout << "Case #" << ++kase << ": The maximum product is " << ans << ".\n\n";
}
} |
5609467be4048461ecd836869f771f043a556eac | 9a93d6d697164ccd4386ce455fb7824217a68667 | /Diff_enum_and_enum_class.cpp | c2be26047a3d3608e894bd75a067839562145465 | [
"MIT"
] | permissive | MaajidKhan/DesignPatterns_In_cpp | 6f2a7edcc2a03658b15998691fa6f3538dd94fc2 | d40a65cf76c5a927b5527a63b3ffc3da6ed3956f | refs/heads/main | 2023-05-30T20:18:18.378945 | 2021-06-06T13:39:47 | 2021-06-06T13:39:47 | 324,754,349 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,688 | cpp | Diff_enum_and_enum_class.cpp | #include <iostream>
using namespace std;
int main() {
// plain Enum
enum Color1{ red, green, blue };
Color1 c1 = red;
switch(c1)
{
case red :
cout << "red" << endl; break;
case green :
cout << "green" << endl; break;
case blue :
cout << "blue" << endl; break;
}
/*
Difference 2:
int green = 100;
// This won't compile because green variable
has already been declared in the enum. This is the disadvantage
of a simple enum. This won't be an issue with enum class because
the objects there are assigned with class scope.
*/
enum class Color3 { red, green, blue, orange }; // gets compiled
/*
Difference 3:
enum Color4 {red, green, violet}; //This won't get compiled
*/
/////////////////////////////////////////////
// class Enum
enum class Color2 { red, green, blue };
Color2 c2 = Color2::red; //Difference 1: for class Enum, you always have to assign the object with scope
switch(c2)
{
case Color2::red :
cout << "red" << endl; break;
case Color2::green :
cout << "green" << endl; break;
case Color2::blue :
cout << "blue" << endl; break;
}
/*Difference 4
In simple enum, the values are implicitly assigned integer values to it.
Ex:
enum Color5{ red, green, blue };
red will be 0, green will be 1 and blue will be 2.
The same doesn't work for enum class Color5{ red, green, blue };
This is the reason, enum class were introduced.
*/
/*Difference 5:
enum Color8{ red, green, blue };
enum People { good, bad };
int main() {
if(red == good ) {
cout << "True" << endl; //This will get compiled and print True
}
This shouldn't compile, but gets compiled and prints "True" as well.
*/
return 0;
}
|
554237229ea10b1d1a777301886da57442c306a3 | 4d39cde46cc7a7e82c590179cb2ffdf94f753169 | /include/export.h | e744c348bf9eafcb1669ca09ffc80787c4f60aa5 | [] | no_license | tomtzook/pe | 5ccead95627ba2617219fd4afe81c6bafb4d54c7 | 411598d89c1bab7c3f2e8b9f695767d483cea11d | refs/heads/master | 2023-07-19T06:15:58.998284 | 2021-09-07T15:32:49 | 2021-09-07T15:32:49 | 403,682,713 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,634 | h | export.h | #pragma once
#include <iterator>
#include "winnt_def.h"
#include "section.h"
namespace pe {
class ExportedNamesTable {
public:
using name_type = const char*;
using ordinal_type = export_ordinal_t;
class iterator;
struct entry {
public:
entry(const entry& entry);
entry& operator=(const entry& other);
name_type name() const;
ordinal_type ordinal() const;
ordinal_type baisedOrdinal() const;
private:
entry(const ImageExportDirectory* directory,
name_type name, ordinal_type ordinal);
const ImageExportDirectory* m_directory;
name_type m_name;
ordinal_type m_ordinal;
friend iterator;
};
class iterator {
public:
using value_type = entry;
using reference = entry;
using pointer = entry;
using iterator_category = std::bidirectional_iterator_tag;
iterator(const ImageExportDirectory* directory, const Section& section,
const rva_t* namePointerPtr, const export_ordinal_t* ordinalTablePtr);
iterator& operator++();
iterator& operator--();
reference operator*();
pointer operator->();
bool operator==(const iterator& rhs);
bool operator!=(const iterator& rhs);
private:
const ImageExportDirectory* m_directory;
const Section& m_section;
const rva_t* m_namePointerPtr;
const export_ordinal_t* m_ordinalTablePtr;
};
ExportedNamesTable(const ImageExportDirectory* directory, Section section);
size_t count() const;
iterator begin() const;
iterator end() const;
entry operator[](name_type name) const;
entry operator[](ordinal_type ordinal) const;
private:
const ImageExportDirectory* m_directory;
Section m_section;
};
class ExportTable {
public:
class iterator;
struct entry {
public:
entry(const entry& entry);
entry& operator=(const entry& other);
rva_t rva() const;
export_ordinal_t ordinal() const;
export_ordinal_t baisedOrdinal() const;
private:
entry(const ImageExportDirectory* directory,
rva_t rva, export_ordinal_t ordinal);
const ImageExportDirectory* m_directory;
rva_t m_rva;
export_ordinal_t m_ordinal;
friend iterator;
};
class iterator {
public:
using value_type = entry;
using reference = entry;
using pointer = entry;
using iterator_category = std::bidirectional_iterator_tag;
iterator(const ImageExportDirectory* directory, const Section& section,
const rva_t* namePointerPtr, export_ordinal_t currentOrdinal);
iterator& operator++();
iterator& operator--();
reference operator*();
pointer operator->();
bool operator==(const iterator& rhs);
bool operator!=(const iterator& rhs);
private:
const ImageExportDirectory* m_directory;
const Section& m_section;
const rva_t* m_addressTablePtr;
export_ordinal_t m_currentOrdinal;
};
ExportTable(const ImageExportDirectory* directory, Section section);
const char* imageName() const;
export_ordinal_t toUnbaised(export_ordinal_t baisedOrdinal) const;
rva_t operator[](export_ordinal_t ordinal) const;
size_t count() const;
iterator begin() const;
iterator end() const;
const ExportedNamesTable& names() const;
private:
const ImageExportDirectory* m_directory;
Section m_section;
ExportedNamesTable m_namesTable;
};
}
|
81df4a69cea98f8ac4a65fb1b4e71b07e61a29ed | 65deabfadbc675929f17e280156597f92cf2480d | /laughing-pancake_tools/UIGenerator/UIGenerator/bin/Debug/combo.cpp | 4f7ce1a7512ac9d8576fe1b2538e6b4a0ced0129 | [] | no_license | Frogp/laughing-pancake | ab4121bd3ce59d96ebbb81d62d4b040ed3838938 | bf102cf2ddfdfbdf1e9e7b5af586882924ca4213 | refs/heads/master | 2021-05-04T02:41:05.858104 | 2016-07-21T17:52:22 | 2016-07-21T17:52:22 | 55,394,402 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 931 | cpp | combo.cpp | /// <summary>
/// 디자이너 지원에 필요한 메서드입니다.
/// 이 메서드의 내용을 코드 편집기로 수정하지 마십시오.
/// </summary>
#include "combo.h"
#include "cocostudio/CCSSceneReaderext.h"
#include "cocostudio/CocoStudio.h"
USING_NS_CC;
using namespace cocostudio;
using namespace cocos2d;
using namespace ui;
combo::combo()
{
root = GUIReader::shareReader()->widgetFromJsonFile("combo.json");
InitPage();
}
combo::combo(Widget* _root)
{
root = _root;
InitPage();
}
void combo::InitPage()
{
combo_ani = cocostudio::ActionManagerEx::getInstance()->getActionByName("combo.json", "combo_ani");
combo_ani->retain();
combo_anifunc = CCCallFunc::create(this, callfunc_selector(combo::combo_anifuncEnd));
combo_anifunc->retain();
combo_text= static_cast<cocos2d::ui::TextBMFont *>(root->getChildByTag("312"));
combo_text->retain();
}
void combo::combo_anifuncEnd()
{
combo_ani->stop();
}
|
d11a97d228d7a8e3a5a7c65205fe3ea2684c8615 | c93abb5a3d88dbc9a55bd449ad50ae9e39d971a1 | /MiniTreeFormat/MTFormat/src/MTVertex.cc | 23d6b249173da8a06c7329d6e7b9ec11e75fdd37 | [] | no_license | fhoehle/NTupleFWKIPHC | 883fba9bbb79a9351d0fe818ac35660f071b7d45 | 03c379461b02efa484f9d428f650e3a83e9490b7 | refs/heads/master | 2020-08-05T00:52:23.238768 | 2013-05-21T23:12:54 | 2013-05-21T23:12:54 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 308 | cc | MTVertex.cc | #include "../interface/MTVertex.h"
using namespace TopTree;
using namespace std;
//using namespace edm;
//using namespace reco;
MTVertex::MTVertex ()
{
}
MTVertex::~MTVertex ()
{
}
void
MTVertex::Reset ()
{
p3Err.SetXYZ (0.0, 0.0, 0.0);
}
void MTVertex::DumpExtended(std::ostream & os){
Dump(os);
}
|
f9b6686cd99b171318b41c147942aa74b127d7d6 | 9838ecc040260b8403456df421746c4fee531b73 | /inc/algorithms.h | f570e5fa0ddde1b1a00dddf5c5aadc55ecf81597 | [] | no_license | rishabhjain08/Workflow-Systems | 27d97354d5b0229a8b160a738f2517730cd44716 | a8278a9fd80ac7dece37204751e35e500c1ab7fb | refs/heads/master | 2021-01-20T15:36:13.729765 | 2011-11-14T18:34:46 | 2011-11-14T18:34:46 | 2,774,200 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,970 | h | algorithms.h | #ifndef ALGORITHMS_H
#define ALGORITHMS_H
#include <stdio.h>
#include <vector>
#include <string>
#include <queue>
#include <stdlib.h>
#include <queue>
#include <math.h>
#include <iostream>
#include <fstream>
#include <sstream>
#define TEMP 10
#define CONFIRMED 20
#define UNMET 5
using namespace std;
//extern vector<Request *> requests;
//extern vector<Room *> rooms;
class Room;
class User;
class Request;
class Institute;
class Operator;
class Time;
bool isAvailable(Request *, Room *);
int encode(bool[]);
void print(vector<Room * >);
void print(Institute *);
int unbook(Request *, Room *);
int book(Request *, Room *);
int populate(vector<Request *>, vector<Room *>);
vector<string> &split_(const string &, char, vector<string> &);
vector<string> split_(const string &, char );
class Time{
public:
int hours;
int minutes;
bool operator< (const Time& other){
if (hours < other.hours){
return true;
}
else if (hours == other.hours){
if (minutes < other.minutes){
return true;
}
}
return false;
}
bool operator> (const Time& other){
if (hours > other.hours){
return true;
}
else if (hours == other.hours){
if (minutes > other.minutes){
return true;
}
}
return false;
}
bool operator== (const Time& other){
return hours == other.hours && minutes == other.minutes;
}
bool operator>= (const Time& other){
return *this > other || *this == other;
}
bool operator<= (const Time& other){
return *this < other || *this == other;
}
Time(int hours, int minutes){
this->hours = hours;
this->minutes = minutes;
}
Time(){
}
};
class User{
public:
string username;
string completename;
int userID;
int priority;
string pass;
User(int userID, string username, string pass, string completename, int priority){
this->userID = userID;
this->username = username;
this->completename = completename;
this->priority = priority;
this->pass = pass;
}
};
class Operator{
public:
int operatorID;
string name;
int contact;
Request * bookedTo;
Operator(int operatorID, string name, int contact){
this->operatorID = operatorID;
this->name = name;
this->contact = contact;
}
};
class Request{
public:
int requestID;
int userID;
int requestroomID;
int requirements;
int numM;
int status;
Time starttime, endtime;
string date;
vector<Room *> candidates;
Operator * oper;
Room * room;
Request(int requestID, int userID, int requirements, int numM){
this->requestID = requestID;
this->userID = userID;
this->requirements = requirements;
this->numM = numM;
this->requestroomID = 0;
this->status = UNMET;
}
void print(){
cout<<"requestID is : "<<requestID<<endl;
cout<<"userID is : "<<userID<<endl;
cout<<"requestroomID is : "<<requestroomID<<endl;
cout<<"requirements is : "<<requirements<<endl;
cout<<"numM is : "<<numM<<endl;
cout<<"starttime is : "<<starttime.hours<<":"<<starttime.minutes<<endl;
cout<<"endtime is : "<<endtime.hours<<":"<<endtime.minutes<<endl;
cout<<"date is : "<<date<<endl;
}
};
class Room{
public:
string name;
int roomID;
vector<Request *> bookings;
int resources; // Bits to represent individual requirements
Room(int roomID, string name, int resources){
this->roomID = roomID;
this->name = name;
this->resources = resources;
}
Room(int roomID, string name, bool resources[]){
this->roomID = roomID;
this->name = name;
this->resources = encode(resources);
}
};
#endif |
f9a1a9f4757d00b1184670eec7c24ec1ef529eb8 | a0d97e57842892f29e77fb477441f86078d3a356 | /sources/layers/movelayerundocommand.cpp | 8941d30943586722f9ec18b18aa0bfbd473361c1 | [] | no_license | ymahinc/MyTypon | 89cac5385edeed2d171392e2160b62bf6ed2fd7f | 5fa2548d2cfa909575797474c66361772c9ce397 | refs/heads/master | 2020-04-27T21:03:20.178564 | 2019-03-09T10:56:12 | 2019-03-09T10:56:12 | 174,682,329 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 637 | cpp | movelayerundocommand.cpp | #include "movelayerundocommand.h"
#include <QDebug>
MoveLayerUndoCommand::MoveLayerUndoCommand(LayersStack *stack, Layer *layer, bool up)
: m_stack(stack), m_layer(layer), m_up(up){
if ( up )
setText(QObject::tr("Move %1 layer up").arg(layer->name()));
else
setText(QObject::tr("Move %1 layer down").arg(layer->name()));
}
void MoveLayerUndoCommand::undo(){
if ( m_up )
m_stack->moveLayerDown(m_layer);
else
m_stack->moveLayerUp(m_layer);
}
void MoveLayerUndoCommand::redo(){
if ( m_up )
m_stack->moveLayerUp(m_layer);
else
m_stack->moveLayerDown(m_layer);
}
|
f731dbe9ce708f7342c73c6500cb9f250f823414 | bf38282baabbff7996de206ba817489b3c965739 | /Old Sketches/Original_Controller/Original_Controller.ino | 6cf7d9cebc56f44c81cb8a2a2b27f56c500ab348 | [] | no_license | TeamWhizzard/EECE-281-Project-1 | bffdf7551fa243503d5dc82e72d0cf32b628280a | d15fc7dd8999a5fcc84d23266b005486f0f360c2 | refs/heads/master | 2020-05-18T14:07:20.088833 | 2015-03-15T06:49:19 | 2015-03-15T06:49:19 | 31,488,683 | 2 | 0 | null | 2015-03-10T02:33:38 | 2015-03-01T06:17:33 | C++ | UTF-8 | C++ | false | false | 15,821 | ino | Original_Controller.ino | #include <LiquidCrystal.h> //For LCD functionality
#include <Wire.h> //For Gyro/Accell functionality
#include <Math.h> //For calculating angles (arctan function)
#include "WhizzardTone.h" //For playing Pacman music
//LCD Constants
b#define RS_PIN 4
#define E_PIN 7
#define D4_PIN 8
#define D5_PIN 9
#define D6_PIN 10
#define D7_PIN 11
// block character
#define BLOCK 0xFF
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(RS_PIN, E_PIN, D4_PIN, D5_PIN, D6_PIN, D7_PIN);
// Pacman Tone Variables
// Variables to relate songs to a number
const int songTheme = 0;
const int songMunch = 1;
const int songDeath = 2;
const int SIXTYFOURTH = 35; // length of sixty-fourth note in ms
const int NS = 0; // note space - rest
//The appropriate tones to be played for the theme
const int theme_melody[] = {
// measure one
NOTE_B4, NOTE_B4, NOTE_B4, NS,
NOTE_B5, NOTE_B5, NOTE_B5, NS,
NOTE_FS5, NOTE_FS5, NOTE_FS5, NS,
NOTE_DS5, NOTE_DS5, NOTE_DS5, NS,
NOTE_B5, NS,
NOTE_FS5, NOTE_FS5, NOTE_FS5, NOTE_FS5, NOTE_FS5, NS,
NOTE_DS5, NOTE_DS5, NOTE_DS5, NOTE_DS5,
NOTE_DS5, NOTE_DS5, NOTE_DS5, NS,
NOTE_C5, NOTE_C5, NOTE_C5, NS,
NOTE_C6, NOTE_C6, NOTE_C6, NS,
NOTE_G5, NOTE_G5, NOTE_G5, NS,
NOTE_E5, NOTE_E5, NOTE_E5, NS,
NOTE_C6, NS,
NOTE_G5, NOTE_G5, NOTE_G5, NOTE_G5, NOTE_G5, NS,
NOTE_E5, NOTE_E5, NOTE_E5, NOTE_E5,
NOTE_E5, NOTE_E5, NOTE_E5, NS,
// measure two
NOTE_B4, NOTE_B4, NOTE_B4, NS,
NOTE_B5, NOTE_B5, NOTE_B5, NS,
NOTE_FS5, NOTE_FS5, NOTE_FS5, NS,
NOTE_DS5, NOTE_DS5, NOTE_DS5, NS,
NOTE_B5, NS,
NOTE_FS5, NOTE_FS5, NOTE_FS5, NOTE_FS5, NOTE_FS5, NS,
NOTE_DS5, NOTE_DS5, NOTE_DS5, NOTE_DS5,
NOTE_DS5, NOTE_DS5, NOTE_DS5, NS,
NOTE_DS5, NS,
NOTE_E5, NS,
NOTE_F5, NOTE_F5, NOTE_F5, NS,
NOTE_F5, NS,
NOTE_FS5, NS,
NOTE_G5, NOTE_G5, NOTE_G5, NS,
NOTE_G5, NS,
NOTE_GS5, NS,
NOTE_A5, NOTE_A5, NOTE_A5, NS,
NOTE_B5, NOTE_B5, NOTE_B5, NOTE_B5,
NOTE_B5, NOTE_B5, NOTE_B5, NS
};
//The appropriate bass to be played for the theme
const int theme_bass[] = {
// measure one
NOTE_B2, NOTE_B2, NOTE_B2, NOTE_B2,
NOTE_B2, NOTE_B2, NOTE_B2, NOTE_B2,
NOTE_B2, NOTE_B2, NOTE_B2, NS,
NOTE_B3, NOTE_B3, NOTE_B3, NS,
NOTE_B2, NOTE_B2, NOTE_B2, NOTE_B2,
NOTE_B2, NOTE_B2, NOTE_B2, NOTE_B2,
NOTE_B2, NOTE_B2, NOTE_B2, NS,
NOTE_B3, NOTE_B3, NOTE_B3, NS,
NOTE_C3, NOTE_C3, NOTE_C3, NOTE_C3,
NOTE_C3, NOTE_C3, NOTE_C3, NOTE_C3,
NOTE_C3, NOTE_C3, NOTE_C3, NS,
NOTE_C4, NOTE_C4, NOTE_C4, NS,
NOTE_C3, NOTE_C3, NOTE_C3, NOTE_C3,
NOTE_C3, NOTE_C3, NOTE_C3, NOTE_C3,
NOTE_C3, NOTE_C3, NOTE_C3, NS,
NOTE_C4, NOTE_C4, NOTE_C4, NS,
// measure two
NOTE_B2, NOTE_B2, NOTE_B2, NOTE_B2,
NOTE_B2, NOTE_B2, NOTE_B2, NOTE_B2,
NOTE_B2, NOTE_B2, NOTE_B2, NS,
NOTE_B3, NOTE_B3, NOTE_B3, NS,
NOTE_B2, NOTE_B2, NOTE_B2, NOTE_B2,
NOTE_B2, NOTE_B2, NOTE_B2, NOTE_B2,
NOTE_B2, NOTE_B2, NOTE_B2, NS,
NOTE_B3, NOTE_B3, NOTE_B3, NS,
NOTE_FS3, NOTE_FS3, NOTE_FS3, NOTE_FS3,
NOTE_FS3, NOTE_FS3, NOTE_FS3, NS,
NOTE_GS3, NOTE_GS3, NOTE_GS3, NOTE_GS3,
NOTE_GS3, NOTE_GS3, NOTE_GS3, NS,
NOTE_AS3, NOTE_AS3, NOTE_AS3, NOTE_AS3,
NOTE_AS3, NOTE_AS3, NOTE_AS3, NS,
NOTE_B3, NOTE_B3, NOTE_B3, NOTE_B3,
NOTE_B3, NOTE_B3, NOTE_B3, NS
};
// Initalize the Tone objects to be used for treble and bass
Tone treble;
Tone bass;
// Assign buzzer pins
const int pinPiezoTreble = 5;
const int pinPiezoBass = 6;
// MP6050 Gyro/Accell Tracking Variables
const int MPU = 0x68; // I2C address of the MPU-6050
const int readDelay = 150; //Delay to read new acceleration/angular velocity values
const int FORWARD_THRESHOLD = -8600; //Acceleration (scaled) threshold value to speed up
const int BACKWARD_THRESHOLD = 10000; //Accereration (scaled) threshold value to slow down
const int STOP_THRESHOLD = 21000;
const int COUNT_ROTATE_THRESHOLD = 125; //Threshold of gyro rotation before counting it(due to hovering values at rest)
const int RIGHT_END_BOUNDARY = 90; //End of degree boundary to indicate turning right
const int RIGHT_START_BOUNDARY = 30; //Start of degree boundary indicate turning right
const int LEFT_START_BOUNDARY = -30; //Start of degree boundary to indicate turning left
const int LEFT_END_BOUNDARY = -90; //End of degree boundary to indicate turning left
const int FORWARD_END_BOUNDARY = 90; //End of degree boundary to indicate forward
const int FORWARD_START_BOUNDARY = 27; //Start of degree boundary indicate forward
const int STOP_START_BOUNDARY = -27; //Start of degree boundary to indicate stop
const int STOP_END_BOUNDARY = -90; //End of degree boundary to indicate stop
const int FS_ZERO_GYRO_SCALE = 131; //Scale factor of angular velocity readings
const int RADIAN_TO_DEGREES = 180 / PI;
const int alpha = 0.92; //Complimentary filter coefficient
float totalDegrees, gyroDegrees, totalSpeedDegrees, gyroSpeedDegrees, xTilt, yTilt, zTilt; //Variables to keep track of filter, gyro, and accel angle measurements
int AcXOffset = 0; int AcYOffset = 0; int AcZOffset = 1860; //Offset to normalize accell readings to 0 (except AcZ -> gravity=16384)
int GyXOffset = -110; int GyYOffset = -140; int GyZOffset = -54; //Offset to normalize gyro readings to 0
int16_t AcX, AcY, AcZ, GyX, GyY, GyZ, Tmp; //Raw readings from the MP6050
//enumeration to cleanly maintain state of controller
enum controlTurnState {
left,
center,
right
};
enum controlSpeedState {
forward,
middle,
stopped
};
controlTurnState turnState = center;
controlSpeedState speedState = middle;
// LCD Custom Characters
byte slices[6][8] = {
{B00000, B00000, B00000, B00000, B00000, B00000, B00000, B00000},
{B10000, B10000, B10000, B10000, B10000, B10000, B10000, B10000},
{B11000, B11000, B11000, B11000, B11000, B11000, B11000, B11000},
{B11100, B11100, B11100, B11100, B11100, B11100, B11100, B11100},
{B11110, B11110, B11110, B11110, B11110, B11110, B11110, B11110},
{B11111, B11111, B11111, B11111, B11111, B11111, B11111, B11111}
};
void setup() {
Serial.begin(9600);
Wire.begin();
Wire.beginTransmission(MPU);
Wire.write(0x6B); // PWR_MGMT_1 register
Wire.write(0); // set to zero (wakes up the MPU-6050)
Wire.endTransmission(true);
lcd.begin(16, 2);
lcd.home();
lcd.clear();
for (int i = 0; i < 6; i++) { // Create custom LCD characters
lcd.createChar(i, slices[i]);
}
treble.begin(pinPiezoTreble);
bass.begin(pinPiezoBass);
//playSong(songTheme);
delay(500); // semi-needed delay because the robot will start moving after.
Serial.println("C");
}
// Pacman music!
// Opening theme song on button push
// Play Death when robot runs into a wall
// Play Munch when starts going in particular direction
void playSong (int song) {
if (song == songTheme) {
int numNotes = sizeof(theme_melody) / sizeof(int);
for (int note = 0; note < numNotes; note++) {
treble.play(theme_melody[note]);
bass.play(theme_bass[note]);
delay(SIXTYFOURTH);
treble.stop();
bass.stop();
}
}
//To be added if needed later (for munching and dying)
else if (song == songMunch) {}
else { // song == songDeath
}
}
//Updates all acceleration and angular velocity readings
void readAll() {
Wire.beginTransmission(MPU);
Wire.write(0x3B); // starting with register 0x3B (ACCEL_XOUT_H)
Wire.endTransmission(false);
Wire.requestFrom(MPU, 14, true); // request a total of 14 registers
AcX = Wire.read() << 8 | Wire.read() + AcXOffset; // // 0x3B (ACCEL_XOUT_H) & 0x3C (ACCEL_XOUT_L)
AcY = Wire.read() << 8 | Wire.read() + AcYOffset; // // 0x3D (ACCEL_YOUT_H) & 0x3E (ACCEL_YOUT_L)
AcZ = Wire.read() << 8 | Wire.read() + AcZOffset; // 0x3F (ACCEL_ZOUT_H) & 0x40 (ACCEL_ZOUT_L)
Tmp = Wire.read() << 8 | Wire.read(); // 0x41 (TEMP_OUT_H) & 0x42 (TEMP_OUT_L)
GyX = Wire.read() << 8 | Wire.read() + GyXOffset; // 0x43 (GYRO_XOUT_H) & 0x44 (GYRO_XOUT_L)
GyY = Wire.read() << 8 | Wire.read() + GyYOffset; // 0x45 (GYRO_YOUT_H) & 0x46 (GYRO_YOUT_L)
GyZ = Wire.read() << 8 | Wire.read() + GyZOffset; // 0x47 (GYRO_ZOUT_H) & 0x48 (GYRO_ZOUT_L)
}
//Prints all the acceleration and angular velocity readings
void printAll() {
//Print out the acceleration values for the x, y, z axises (scaled by a factor of G in m/s^2)
Serial.print("AcX = "); Serial.print(AcX);
Serial.print(" | AcY = "); Serial.print(AcY);
Serial.print(" | AcZ = "); Serial.print(AcZ);
//equation for temperature in degrees C from datasheet
Serial.print(" | Tmp = "); Serial.print(Tmp / 340.00 + 36.53);
//Print out the angular velocity values about the x, y, z axises (scaled by a factor in degrees/second)
Serial.print(" | GyX = "); Serial.print(GyX);
Serial.print(" | GyY = "); Serial.print(GyY);
Serial.print(" | GyZ = "); Serial.println(GyZ);
}
//Measures the degrees rotated, where center is defined as the point of system initalization.
//Tilting the controller about its x axis is what contributes to the left/right/center control
void countRotate() {
readAll(); //Update all accel/gyro values
float time = millis();
while (abs(GyY) >= COUNT_ROTATE_THRESHOLD) { //Only loop (count degrees) when the controller is moving
checkTurnControl();
checkSpeedControl();
gyroDegrees = totalDegrees; //Set gyro angle to last measured filter angle
gyroSpeedDegrees = totalSpeedDegrees;
delay(readDelay); //Delay for the given duration inbetween reads
float GyYdps = GyY / FS_ZERO_GYRO_SCALE; //Convert gyro measurement to degrees per second
float GyXdps = GyX / FS_ZERO_GYRO_SCALE;
processTilt(); //Acquire the degree angle from the accellerometer
float currDegrees = GyYdps * (millis() - time) / 1000; //Perform approximate integration by multiplying degree per second with the delay
float currSpeedDegrees = GyXdps * (millis() - time) / 1000;
time = millis(); //Time the new duration right after initial sum calculated
gyroDegrees += currDegrees; //Iteratively sum the current degrees into total degrees
gyroSpeedDegrees += currSpeedDegrees;
totalDegrees = calcFilterAngle(gyroDegrees, xTilt); //Calculate the filter angle
totalSpeedDegrees = calcFilterAngle(gyroSpeedDegrees, yTilt);
//Serial.print("Degrees per Second: "); //Print out the dps reading
//Serial.println(GyYdps);
//Serial.print("Total Degrees turned: "); //Print out total degrees turned so far
//Serial.println(totalDegrees);
readAll();
}
}
void checkSpeedControl() {
//Tilting controller back stops robot
if (totalSpeedDegrees >= STOP_END_BOUNDARY && totalSpeedDegrees <= STOP_START_BOUNDARY && speedState != stopped && turnState == center) {
Serial.println("S");
speedState = stopped;
}
if (totalSpeedDegrees > STOP_START_BOUNDARY && totalSpeedDegrees < FORWARD_END_BOUNDARY && speedState != stopped) {
//Serial.print("F");
//speedState = forward;
}
if (totalSpeedDegrees >= FORWARD_START_BOUNDARY && totalSpeedDegrees <= FORWARD_END_BOUNDARY && speedState != forward) {
Serial.println("F");
speedState = forward;
}
}
//Checks the motion control(accell or degree position) of the controller, and make the robot turn or move accordingly.
void checkTurnControl() {
//In the left boundary zone? Turn robot left while controller in left zone
if (totalDegrees >= RIGHT_START_BOUNDARY && totalDegrees <= RIGHT_END_BOUNDARY && turnState != right) {
Serial.println("R");
turnState = right;
speedState = forward;
}
//In the center boundary zone? Center the robot while controller in center zone
else if (totalDegrees > LEFT_START_BOUNDARY && totalDegrees < RIGHT_START_BOUNDARY && turnState != center) {
Serial.println("C");
turnState = center;
speedState = forward;
}
//In the right boundary zone? Turn robot right while controller in right zone.
else if (totalDegrees >= LEFT_END_BOUNDARY && totalDegrees <= LEFT_START_BOUNDARY && turnState != left) {
Serial.println("L");
turnState = left;
speedState = forward;
}
}
//Calibrates the offsets of the accell/gyro readings to normalize their values to 0 or G (for AcZ)
void calibrateError() {
float sumAcXDiff, sumAcYDiff, sumAcZDiff, sumGyXDiff, sumGyYDiff, sumGyZDiff = 0; //Sum of offsets to be divided by reading count to obtain average later
float i;
for (i = 0; i < 100; i++) { //Increase i to take more readings as needed
readAll();
printAll();
sumAcXDiff += 0 - AcX; sumAcYDiff += 0 - AcY; sumAcZDiff += 16384 - AcZ; //Sum up accell offsets
sumGyXDiff += 0 - GyX; sumGyYDiff += 0 - GyY; sumGyZDiff += 0 - GyZ; //Sum up gyro offsets
delay(readDelay);
}
AcXOffset = sumAcXDiff / (i); AcYOffset = sumAcYDiff / (i); AcZOffset = sumAcZDiff / (i); //Average all accell offset measurements
GyXOffset = sumGyXDiff / (i); GyYOffset = sumGyYDiff / (i); GyZOffset = sumGyZDiff / (i); //Average all gyro offset measurements
Serial.println(AcXOffset); Serial.println(AcYOffset); Serial.println(AcZOffset); //Print out offsets for debugging purposes
Serial.println(GyXOffset); Serial.println(GyYOffset); Serial.println(GyZOffset);
}
//Calculate angle(about x axis) via accelerometer readings
void processTilt() {
xTilt = atan2(AcX, sqrt(pow(AcY, 2) + pow(AcZ, 2))) * RADIAN_TO_DEGREES;
yTilt = atan2(AcY, sqrt(pow(AcX, 2) + pow(AcZ, 2))) * RADIAN_TO_DEGREES;
//zTilt = atan2(sqrt(pow(AcX, 2)+ pow(AcY, 2)),AcZ) * RADIAN_TO_DEGREES;
//Serial.print("X Tilt = "); Serial.print(xTilt);
//Serial.print(" | Y Tilt = "); Serial.print(yTilt);
// Serial.print(" | Z Tilt = "); Serial.println(zTilt);
//Serial.println("-----");
}
//Perform the complimentary filter to the gyro and accell angle for the best angle result
int calcFilterAngle(float gyroAngle, float acelAngle) {
return alpha * gyroAngle + (1 - alpha) * acelAngle;
}
// LCD FUNCTIONS
void clearLine(int line) {
lcd.setCursor(0, line);
lcd.print(" ");
delay(20);
lcd.setCursor(0, line);
}
void lcdPrintSpeed(int val) {
if (val >= 100)
lcd.print(val);
else if (val < 100 && val >= 10) {
lcd.print(" ");
lcd.print(val);
}
else {
lcd.print(" ");
lcd.print(val);
}
}
void lcdEncoderVal(int num) {
lcd.print("+");
lcd.print(num);
}
void lcdDisplay(int left, int right, int encoder) {
lcd.setCursor(0, 0);
lcd.print("L:");
lcdPrintSpeed(left);
if (encoder < 0)
lcdEncoderVal(abs(encoder));
else
lcd.print(" ");
lcd.setCursor(8, 0);
lcd.print("R:");
lcdPrintSpeed(right);
if (encoder > 0)
lcdEncoderVal(encoder);
else
lcd.print(" ");
}
void lcdMotorSpeedGraph(int left, int right) {
clearLine(1);
if (left < 0) {
if (left <= 10) {
while (left >= 5) {
lcd.print(BLOCK);
left -= 5;
}
}
lcd.write(byte(left));
}
lcd.setCursor(8, 1);
if (right < 0) {
if (right <= 10) {
while (right >= 5) {
lcd.print(BLOCK);
left -= 5;
}
}
lcd.write(byte(right));
}
}
void lcdRefresh(int left, int right, int encoder) {
lcdDisplay(left, right, encoder);
lcdMotorSpeedGraph(left / 10, right / 10);
delay(100);
}
void updateLCD() {
while (Serial.available() > 0) {
int rightMotor;
int leftMotor;
int rightEncoder;
int leftEncoder;
rightMotor = Serial.parseInt();
leftMotor = Serial.parseInt();
rightEncoder = Serial.parseInt();
leftEncoder = Serial.parseInt();
int encoderDelta = rightEncoder - leftEncoder;
lcdRefresh(leftMotor, rightMotor, encoderDelta);
}
}
void loop() {
countRotate(); //While the controller is moving, record total degrees that the controller turned
updateLCD(); //Checks if there is serial data passed to the controller and prints onto the LCD(fairly fast, won't interrupt angle measuring)
checkTurnControl();
checkSpeedControl();
//readAll();
//processTilt();
//printAll(); //Print accellerometer/gyroscope reading values
//delay(readDelay);
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.