blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 3 264 | content_id stringlengths 40 40 | detected_licenses listlengths 0 85 | license_type stringclasses 2
values | repo_name stringlengths 5 140 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 986
values | visit_date timestamp[us] | revision_date timestamp[us] | committer_date timestamp[us] | github_id int64 3.89k 681M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 23
values | gha_event_created_at timestamp[us] | gha_created_at timestamp[us] | gha_language stringclasses 145
values | src_encoding stringclasses 34
values | language stringclasses 1
value | is_vendor bool 1
class | is_generated bool 2
classes | length_bytes int64 3 10.4M | extension stringclasses 122
values | content stringlengths 3 10.4M | authors listlengths 1 1 | author_id stringlengths 0 158 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7e2fd5fe7b4c53610b8cdcf9db027abce6755ccb | fac63a64d8c4e3c41c8eda6c651ae0da256c8dde | /Shadow/Shadow/main.cpp | 1251817df28f9952ac59a8dfea0fc2476a3bb760 | [] | no_license | SweeneyChoi/ShadowMapping | 129965677bffa9b67e66636c3c3f6ac642d59ce7 | 53367892b9b9cfdd84a243a5e6b5ab69dfa10f7c | refs/heads/master | 2021-04-06T12:29:44.060274 | 2018-03-10T10:30:46 | 2018-03-10T10:30:46 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 12,779 | cpp | #include <glad/glad.h>
#include <GLFW/glfw3.h>
#include "stb_image.h"
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>
#include "Shader.h"
#include "Camera.h"
#include "Model.h"
#include <iostream>
void framebuffer_size_callback(GLFWwindow* window, int width, int height);
void mouse_callback(GLFWwindow* window, double xpos, double ypos);
void scroll_callback(GLFWwindow* window, double xoffset, double yoffset);
void processInput(GLFWwindow *window);
unsigned int loadTexture(const char *path);
void RenderScene(Shader &shader);
void RenderQuad();
void RenderCube();
const unsigned int SCR_WIDTH = 1280;
const unsigned int SCR_HEIGHT = 720;
Camera camera(glm::vec3(0.0f, 0.0f, 3.0f));
float lastX = (float)SCR_WIDTH / 2.0;
float lastY = (float)SCR_HEIGHT / 2.0;
bool firstMouse = true;
float deltaTime = 0.0f;
float lastFrame = 0.0f;
unsigned int planeVAO;
int main()
{
glfwInit();
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 4);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
#ifdef __APPLE__
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
#endif
GLFWwindow* window = glfwCreateWindow(SCR_WIDTH, SCR_HEIGHT, "ShadowMap", NULL, NULL);
if (window == NULL)
{
std::cout << "Failed to create GLFW window" << std::endl;
glfwTerminate();
return -1;
}
glfwMakeContextCurrent(window);
glfwSetFramebufferSizeCallback(window, framebuffer_size_callback);
glfwSetCursorPosCallback(window, mouse_callback);
glfwSetScrollCallback(window, scroll_callback);
glfwSetInputMode(window, GLFW_CURSOR, GLFW_CURSOR_DISABLED);
if (!gladLoadGLLoader((GLADloadproc)glfwGetProcAddress))
{
std::cout << "Failed to initialize GLAD" << std::endl;
return -1;
}
glEnable(GL_DEPTH_TEST);
glEnable(GL_CULL_FACE);
Shader simpleDepthShader("shadow_mapping_depth_vShader.glsl", "shadow_mapping_depth_fShader.glsl");
Shader debugQuadShader("debug_quad_vShader.glsl", "debug_quad_fShader.glsl");
Shader shadowShader("shadow_map_vShader.glsl", "shadow_map_fShader.glsl");
shadowShader.use();
shadowShader.setInt("diffuseTexture", 0);
shadowShader.setInt("shadowMap", 1);
float planeVertices[] = {
25.0f, -0.5f, 25.0f, 0.0f, 1.0f, 0.0f, 25.0f, 0.0f,
-25.0f, -0.5f, -25.0f, 0.0f, 1.0f, 0.0f, 0.0f, 25.0f,
-25.0f, -0.5f, 25.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f,
25.0f, -0.5f, 25.0f, 0.0f, 1.0f, 0.0f, 25.0f, 0.0f,
25.0f, -0.5f, -25.0f, 0.0f, 1.0f, 0.0f, 25.0f, 25.0f,
-25.0f, -0.5f, -25.0f, 0.0f, 1.0f, 0.0f, 0.0f, 25.0f
};
unsigned int planeVBO;
glGenVertexArrays(1, &planeVAO);
glGenBuffers(1, &planeVBO);
glBindVertexArray(planeVAO);
glBindBuffer(GL_ARRAY_BUFFER, planeVBO);
glBufferData(GL_ARRAY_BUFFER, sizeof(planeVertices), &planeVertices, GL_STATIC_DRAW);
glEnableVertexAttribArray(0);
glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 8 * sizeof(float), (void*)0);
glEnableVertexAttribArray(1);
glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, 8 * sizeof(float), (void*)(3 * sizeof(float)));
glEnableVertexAttribArray(2);
glVertexAttribPointer(2, 2, GL_FLOAT, GL_FALSE, 8 * sizeof(float), (void*)(6 * sizeof(float)));
glBindVertexArray(0);
glm::vec3 lightPos(-2.0f, 4.0f, -1.0f);
unsigned int woodTexture = loadTexture("wood.png");
unsigned int depthMapFBO;
glGenFramebuffers(1, &depthMapFBO);
const unsigned int SHADOW_WIDTH = 1024, SHADOW_HEIGHT = 1024;
unsigned int depthMap;
glGenTextures(1, &depthMap);
glBindTexture(GL_TEXTURE_2D, depthMap);
glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT, SHADOW_WIDTH, SHADOW_HEIGHT, 0, GL_DEPTH_COMPONENT, GL_FLOAT, NULL);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER);
float borderColor[] = { 1.0, 1.0, 1.0, 1.0 };
glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_BORDER_COLOR, borderColor);
glBindFramebuffer(GL_FRAMEBUFFER, depthMapFBO);
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_TEXTURE_2D, depthMap, 0);
glDrawBuffer(GL_NONE);
glReadBuffer(GL_NONE);
glBindFramebuffer(GL_FRAMEBUFFER, 0);
while (!glfwWindowShouldClose(window))
{
float currentFrame = glfwGetTime();
deltaTime = currentFrame - lastFrame;
lastFrame = currentFrame;
processInput(window);
//lightPos.x = sin(glfwGetTime()) * 3.0f;
//lightPos.z = cos(glfwGetTime()) * 2.0f;
//lightPos.y = 5.0 + cos(glfwGetTime()) * 1.0f;
glm::mat4 lightProjection, lightView;
glm::mat4 lightSpaceMatrix;
float near_plane = 1.0f, far_plane = 7.5f;
lightProjection = glm::ortho(-10.0f, 10.0f, -10.0f, 10.0f, near_plane, far_plane);
lightView = glm::lookAt(lightPos, glm::vec3(0.0f), glm::vec3(0.0, 1.0, 0.0));
lightSpaceMatrix = lightProjection * lightView;
simpleDepthShader.use();
simpleDepthShader.setMat4("lightSpaceMatrix", lightSpaceMatrix);
glClearColor(0.1f, 0.1f, 0.1f, 1.0f);
glViewport(0, 0, SHADOW_WIDTH, SHADOW_HEIGHT);
glBindFramebuffer(GL_FRAMEBUFFER, depthMapFBO);
glClear(GL_DEPTH_BUFFER_BIT);
RenderScene(simpleDepthShader);
glBindFramebuffer(GL_FRAMEBUFFER, 0);
glViewport(0, 0, SCR_WIDTH, SCR_HEIGHT);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
shadowShader.use();
glm::mat4 projection = glm::perspective(camera.Zoom, (float)SCR_WIDTH / (float)SCR_HEIGHT, 0.1f, 100.0f);
glm::mat4 view = camera.GetViewMatrix();
shadowShader.setMat4("projection", projection);
shadowShader.setMat4("view", view);
shadowShader.setVec3("lightPos", lightPos);
shadowShader.setVec3("viewPos", camera.Position);
shadowShader.setMat4("lightSpaceMatrix", lightSpaceMatrix);
glActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_2D, woodTexture);
glActiveTexture(GL_TEXTURE1);
glBindTexture(GL_TEXTURE_2D, depthMap);
RenderScene(shadowShader);
debugQuadShader.use();
glActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_2D, depthMap);
//RenderQuad();
glfwSwapBuffers(window);
glfwPollEvents();
}
glfwTerminate();
return 0;
}
void processInput(GLFWwindow *window)
{
if (glfwGetKey(window, GLFW_KEY_ESCAPE) == GLFW_PRESS)
glfwSetWindowShouldClose(window, true);
if (glfwGetKey(window, GLFW_KEY_W) == GLFW_PRESS)
camera.ProcessKeyboard(FORWARD, deltaTime);
if (glfwGetKey(window, GLFW_KEY_S) == GLFW_PRESS)
camera.ProcessKeyboard(BACKWARD, deltaTime);
if (glfwGetKey(window, GLFW_KEY_A) == GLFW_PRESS)
camera.ProcessKeyboard(LEFT, deltaTime);
if (glfwGetKey(window, GLFW_KEY_D) == GLFW_PRESS)
camera.ProcessKeyboard(RIGHT, deltaTime);
}
void framebuffer_size_callback(GLFWwindow* window, int width, int height)
{
glViewport(0, 0, width, height);
}
void mouse_callback(GLFWwindow* window, double xpos, double ypos)
{
if (firstMouse)
{
lastX = xpos;
lastY = ypos;
firstMouse = false;
}
float xoffset = xpos - lastX;
float yoffset = lastY - ypos;
lastX = xpos;
lastY = ypos;
camera.ProcessMouseMovement(xoffset, yoffset);
}
void scroll_callback(GLFWwindow* window, double xoffset, double yoffset)
{
camera.ProcessMouseScroll(yoffset);
}
unsigned int loadTexture(char const * path)
{
unsigned int textureID;
glGenTextures(1, &textureID);
int width, height, nrComponents;
unsigned char *data = stbi_load(path, &width, &height, &nrComponents, 0);
if (data)
{
GLenum format;
if (nrComponents == 1)
format = GL_RED;
else if (nrComponents == 3)
format = GL_RGB;
else if (nrComponents == 4)
format = GL_RGBA;
glBindTexture(GL_TEXTURE_2D, textureID);
glTexImage2D(GL_TEXTURE_2D, 0, format, width, height, 0, format, GL_UNSIGNED_BYTE, data);
glGenerateMipmap(GL_TEXTURE_2D);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
stbi_image_free(data);
}
else
{
std::cout << "Texture failed to load at path: " << path << std::endl;
stbi_image_free(data);
}
return textureID;
}
void RenderScene(Shader &shader)
{
glm::mat4 model;
shader.setMat4("model", model);
glBindVertexArray(planeVAO);
glDrawArrays(GL_TRIANGLES, 0, 6);
glBindVertexArray(0);
model = glm::mat4();
model = glm::translate(model, glm::vec3(0.0f, 1.5f, 0.0));
shader.setMat4("model", model);
RenderCube();
model = glm::mat4();
model = glm::translate(model, glm::vec3(2.0f, 0.0f, 1.0));
shader.setMat4("model", model);
RenderCube();
model = glm::mat4();
model = glm::translate(model, glm::vec3(-1.0f, 0.0f, 2.0));
model = glm::rotate(model, 60.0f, glm::normalize(glm::vec3(1.0, 0.0, 1.0)));
model = glm::scale(model, glm::vec3(0.5));
shader.setMat4("model", model);
RenderCube();
}
unsigned int quadVAO = 0;
unsigned int quadVBO = 0;
void RenderQuad()
{
if (quadVAO == 0)
{
float quadVertices[] = {
-1.0f, 1.0f, 0.0f, 0.0f, 1.0f,
-1.0f, -1.0f, 0.0f, 0.0f, 0.0f,
1.0f, 1.0f, 0.0f, 1.0f, 1.0f,
1.0f, -1.0f, 0.0f, 1.0f, 0.0f,
};
glGenVertexArrays(1, &quadVAO);
glGenBuffers(1, &quadVBO);
glBindVertexArray(quadVAO);
glBindBuffer(GL_ARRAY_BUFFER, quadVBO);
glBufferData(GL_ARRAY_BUFFER, sizeof(quadVertices), &quadVertices, GL_STATIC_DRAW);
glEnableVertexAttribArray(0);
glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 5 * sizeof(float), (void*)0);
glEnableVertexAttribArray(1);
glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, 5 * sizeof(float), (void*)(3 * sizeof(float)));
}
glBindVertexArray(quadVAO);
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
glBindVertexArray(0);
}
unsigned int cubeVAO = 0;
unsigned int cubeVBO = 0;
void RenderCube()
{
if (cubeVAO == 0)
{
float vertices[] = {
-0.5f, -0.5f, -0.5f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f,
0.5f, 0.5f, -0.5f, 0.0f, 0.0f, -1.0f, 1.0f, 1.0f,
0.5f, -0.5f, -0.5f, 0.0f, 0.0f, -1.0f, 1.0f, 0.0f,
0.5f, 0.5f, -0.5f, 0.0f, 0.0f, -1.0f, 1.0f, 1.0f,
-0.5f, -0.5f, -0.5f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f,
-0.5f, 0.5f, -0.5f, 0.0f, 0.0f, -1.0f, 0.0f, 1.0f,
-0.5f, -0.5f, 0.5f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f,
0.5f, -0.5f, 0.5f, 0.0f, 0.0f, 1.0f, 1.0f, 0.0f,
0.5f, 0.5f, 0.5f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f,
0.5f, 0.5f, 0.5f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f,
-0.5f, 0.5f, 0.5f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f,
-0.5f, -0.5f, 0.5f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f,
-0.5f, 0.5f, 0.5f, -1.0f, 0.0f, 0.0f, 1.0f, 0.0f,
-0.5f, 0.5f, -0.5f, -1.0f, 0.0f, 0.0f, 1.0f, 1.0f,
-0.5f, -0.5f, -0.5f, -1.0f, 0.0f, 0.0f, 0.0f, 1.0f,
-0.5f, -0.5f, -0.5f, -1.0f, 0.0f, 0.0f, 0.0f, 1.0f,
-0.5f, -0.5f, 0.5f, -1.0f, 0.0f, 0.0f, 0.0f, 0.0f,
-0.5f, 0.5f, 0.5f, -1.0f, 0.0f, 0.0f, 1.0f, 0.0f,
// Right face
0.5f, 0.5f, 0.5f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f,
0.5f, -0.5f, -0.5f, 1.0f, 0.0f, 0.0f, 0.0f, 1.0f,
0.5f, 0.5f, -0.5f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f,
0.5f, -0.5f, -0.5f, 1.0f, 0.0f, 0.0f, 0.0f, 1.0f,
0.5f, 0.5f, 0.5f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f,
0.5f, -0.5f, 0.5f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f,
// Bottom face
-0.5f, -0.5f, -0.5f, 0.0f, -1.0f, 0.0f, 0.0f, 1.0f,
0.5f, -0.5f, -0.5f, 0.0f, -1.0f, 0.0f, 1.0f, 1.0f,
0.5f, -0.5f, 0.5f, 0.0f, -1.0f, 0.0f, 1.0f, 0.0f,
0.5f, -0.5f, 0.5f, 0.0f, -1.0f, 0.0f, 1.0f, 0.0f,
-0.5f, -0.5f, 0.5f, 0.0f, -1.0f, 0.0f, 0.0f, 0.0f,
-0.5f, -0.5f, -0.5f, 0.0f, -1.0f, 0.0f, 0.0f, 1.0f,
// Top face
-0.5f, 0.5f, -0.5f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f,
0.5f, 0.5f, 0.5f, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f,
0.5f, 0.5f, -0.5f, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f,
0.5f, 0.5f, 0.5f, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f,
-0.5f, 0.5f, -0.5f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f,
-0.5f, 0.5f, 0.5f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f
};
glGenVertexArrays(1, &cubeVAO);
glGenBuffers(1, &cubeVBO);
glBindBuffer(GL_ARRAY_BUFFER, cubeVBO);
glBufferData(GL_ARRAY_BUFFER, sizeof(vertices), vertices, GL_STATIC_DRAW);
glBindVertexArray(cubeVAO);
glEnableVertexAttribArray(0);
glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 8 * sizeof(float), (void*)0);
glEnableVertexAttribArray(1);
glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, 8 * sizeof(float), (void*)(3 * sizeof(float)));
glEnableVertexAttribArray(2);
glVertexAttribPointer(2, 2, GL_FLOAT, GL_FALSE, 8 * sizeof(float), (void*)(6 * sizeof(float)));
glBindBuffer(GL_ARRAY_BUFFER, 0);
glBindVertexArray(0);
}
glBindVertexArray(cubeVAO);
glDrawArrays(GL_TRIANGLES, 0, 36);
glBindVertexArray(0);
}
| [
"caitianxin001@163.com"
] | caitianxin001@163.com |
e83c503c390bbfce7dec0304760ee4925031ef72 | 1d218b5b336936a8e611dc8924c88012585fe822 | /Temp/StagingArea/Data/il2cppOutput/Bulk_Mono.Security_0.cpp | 222ee51c098d5de8ca18f55eff41408abd944d2e | [] | no_license | DWesterdijk/TerrainDestruction | 515bdcef67c9e49f73aad6b5cb5286ff05f9c4a4 | f916af9034693dc7388cbbde7c50ae0c64420025 | refs/heads/master | 2022-03-10T19:20:21.548445 | 2018-10-10T14:21:42 | 2018-10-10T14:21:42 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,807,367 | 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>
#include <stdint.h>
#include "il2cpp-class-internals.h"
#include "codegen/il2cpp-codegen.h"
#include "il2cpp-object-internals.h"
template <typename T1>
struct VirtActionInvoker1
{
typedef void (*Action)(void*, T1, const RuntimeMethod*);
static inline void Invoke (Il2CppMethodSlot slot, RuntimeObject* obj, T1 p1)
{
const VirtualInvokeData& invokeData = il2cpp_codegen_get_virtual_invoke_data(slot, obj);
((Action)invokeData.methodPtr)(obj, p1, invokeData.method);
}
};
template <typename R, typename T1>
struct VirtFuncInvoker1
{
typedef R (*Func)(void*, T1, const RuntimeMethod*);
static inline R Invoke (Il2CppMethodSlot slot, RuntimeObject* obj, T1 p1)
{
const VirtualInvokeData& invokeData = il2cpp_codegen_get_virtual_invoke_data(slot, obj);
return ((Func)invokeData.methodPtr)(obj, p1, invokeData.method);
}
};
template <typename R, typename T1, typename T2>
struct VirtFuncInvoker2
{
typedef R (*Func)(void*, T1, T2, const RuntimeMethod*);
static inline R Invoke (Il2CppMethodSlot slot, RuntimeObject* obj, T1 p1, T2 p2)
{
const VirtualInvokeData& invokeData = il2cpp_codegen_get_virtual_invoke_data(slot, obj);
return ((Func)invokeData.methodPtr)(obj, p1, p2, invokeData.method);
}
};
template <typename R>
struct VirtFuncInvoker0
{
typedef R (*Func)(void*, const RuntimeMethod*);
static inline R Invoke (Il2CppMethodSlot slot, RuntimeObject* obj)
{
const VirtualInvokeData& invokeData = il2cpp_codegen_get_virtual_invoke_data(slot, obj);
return ((Func)invokeData.methodPtr)(obj, invokeData.method);
}
};
struct VirtActionInvoker0
{
typedef void (*Action)(void*, const RuntimeMethod*);
static inline void Invoke (Il2CppMethodSlot slot, RuntimeObject* obj)
{
const VirtualInvokeData& invokeData = il2cpp_codegen_get_virtual_invoke_data(slot, obj);
((Action)invokeData.methodPtr)(obj, invokeData.method);
}
};
template <typename T1, typename T2, typename T3>
struct VirtActionInvoker3
{
typedef void (*Action)(void*, T1, T2, T3, const RuntimeMethod*);
static inline void Invoke (Il2CppMethodSlot slot, RuntimeObject* obj, T1 p1, T2 p2, T3 p3)
{
const VirtualInvokeData& invokeData = il2cpp_codegen_get_virtual_invoke_data(slot, obj);
((Action)invokeData.methodPtr)(obj, p1, p2, p3, invokeData.method);
}
};
template <typename T1, typename T2>
struct VirtActionInvoker2
{
typedef void (*Action)(void*, T1, T2, const RuntimeMethod*);
static inline void Invoke (Il2CppMethodSlot slot, RuntimeObject* obj, T1 p1, T2 p2)
{
const VirtualInvokeData& invokeData = il2cpp_codegen_get_virtual_invoke_data(slot, obj);
((Action)invokeData.methodPtr)(obj, p1, p2, invokeData.method);
}
};
template <typename R, typename T1, typename T2, typename T3, typename T4>
struct VirtFuncInvoker4
{
typedef R (*Func)(void*, T1, T2, T3, T4, const RuntimeMethod*);
static inline R Invoke (Il2CppMethodSlot slot, RuntimeObject* obj, T1 p1, T2 p2, T3 p3, T4 p4)
{
const VirtualInvokeData& invokeData = il2cpp_codegen_get_virtual_invoke_data(slot, obj);
return ((Func)invokeData.methodPtr)(obj, p1, p2, p3, p4, invokeData.method);
}
};
template <typename R, typename T1, typename T2, typename T3>
struct VirtFuncInvoker3
{
typedef R (*Func)(void*, T1, T2, T3, const RuntimeMethod*);
static inline R Invoke (Il2CppMethodSlot slot, RuntimeObject* obj, T1 p1, T2 p2, T3 p3)
{
const VirtualInvokeData& invokeData = il2cpp_codegen_get_virtual_invoke_data(slot, obj);
return ((Func)invokeData.methodPtr)(obj, p1, p2, p3, invokeData.method);
}
};
template <typename R, typename T1, typename T2, typename T3, typename T4, typename T5>
struct VirtFuncInvoker5
{
typedef R (*Func)(void*, T1, T2, T3, T4, T5, const RuntimeMethod*);
static inline R Invoke (Il2CppMethodSlot slot, RuntimeObject* obj, T1 p1, T2 p2, T3 p3, T4 p4, T5 p5)
{
const VirtualInvokeData& invokeData = il2cpp_codegen_get_virtual_invoke_data(slot, obj);
return ((Func)invokeData.methodPtr)(obj, p1, p2, p3, p4, p5, invokeData.method);
}
};
template <typename R, typename T1, typename T2>
struct GenericVirtFuncInvoker2
{
typedef R (*Func)(void*, T1, T2, const RuntimeMethod*);
static inline R Invoke (const RuntimeMethod* method, RuntimeObject* obj, T1 p1, T2 p2)
{
VirtualInvokeData invokeData;
il2cpp_codegen_get_generic_virtual_invoke_data(method, obj, &invokeData);
return ((Func)invokeData.methodPtr)(obj, p1, p2, invokeData.method);
}
};
template <typename R, typename T1>
struct GenericVirtFuncInvoker1
{
typedef R (*Func)(void*, T1, const RuntimeMethod*);
static inline R Invoke (const RuntimeMethod* method, RuntimeObject* obj, T1 p1)
{
VirtualInvokeData invokeData;
il2cpp_codegen_get_generic_virtual_invoke_data(method, obj, &invokeData);
return ((Func)invokeData.methodPtr)(obj, p1, invokeData.method);
}
};
template <typename T1, typename T2>
struct GenericVirtActionInvoker2
{
typedef void (*Action)(void*, T1, T2, const RuntimeMethod*);
static inline void Invoke (const RuntimeMethod* method, RuntimeObject* obj, T1 p1, T2 p2)
{
VirtualInvokeData invokeData;
il2cpp_codegen_get_generic_virtual_invoke_data(method, obj, &invokeData);
((Action)invokeData.methodPtr)(obj, p1, p2, invokeData.method);
}
};
template <typename T1>
struct GenericVirtActionInvoker1
{
typedef void (*Action)(void*, T1, const RuntimeMethod*);
static inline void Invoke (const RuntimeMethod* method, RuntimeObject* obj, T1 p1)
{
VirtualInvokeData invokeData;
il2cpp_codegen_get_generic_virtual_invoke_data(method, obj, &invokeData);
((Action)invokeData.methodPtr)(obj, p1, invokeData.method);
}
};
template <typename R, typename T1, typename T2, typename T3, typename T4>
struct GenericVirtFuncInvoker4
{
typedef R (*Func)(void*, T1, T2, T3, T4, const RuntimeMethod*);
static inline R Invoke (const RuntimeMethod* method, RuntimeObject* obj, T1 p1, T2 p2, T3 p3, T4 p4)
{
VirtualInvokeData invokeData;
il2cpp_codegen_get_generic_virtual_invoke_data(method, obj, &invokeData);
return ((Func)invokeData.methodPtr)(obj, p1, p2, p3, p4, invokeData.method);
}
};
template <typename R, typename T1, typename T2, typename T3>
struct GenericVirtFuncInvoker3
{
typedef R (*Func)(void*, T1, T2, T3, const RuntimeMethod*);
static inline R Invoke (const RuntimeMethod* method, RuntimeObject* obj, T1 p1, T2 p2, T3 p3)
{
VirtualInvokeData invokeData;
il2cpp_codegen_get_generic_virtual_invoke_data(method, obj, &invokeData);
return ((Func)invokeData.methodPtr)(obj, p1, p2, p3, invokeData.method);
}
};
template <typename R>
struct GenericVirtFuncInvoker0
{
typedef R (*Func)(void*, const RuntimeMethod*);
static inline R Invoke (const RuntimeMethod* method, RuntimeObject* obj)
{
VirtualInvokeData invokeData;
il2cpp_codegen_get_generic_virtual_invoke_data(method, obj, &invokeData);
return ((Func)invokeData.methodPtr)(obj, invokeData.method);
}
};
template <typename R, typename T1, typename T2>
struct InterfaceFuncInvoker2
{
typedef R (*Func)(void*, T1, T2, const RuntimeMethod*);
static inline R Invoke (Il2CppMethodSlot slot, RuntimeClass* declaringInterface, RuntimeObject* obj, T1 p1, T2 p2)
{
const VirtualInvokeData& invokeData = il2cpp_codegen_get_interface_invoke_data(slot, obj, declaringInterface);
return ((Func)invokeData.methodPtr)(obj, p1, p2, invokeData.method);
}
};
template <typename R, typename T1>
struct InterfaceFuncInvoker1
{
typedef R (*Func)(void*, T1, const RuntimeMethod*);
static inline R Invoke (Il2CppMethodSlot slot, RuntimeClass* declaringInterface, RuntimeObject* obj, T1 p1)
{
const VirtualInvokeData& invokeData = il2cpp_codegen_get_interface_invoke_data(slot, obj, declaringInterface);
return ((Func)invokeData.methodPtr)(obj, p1, invokeData.method);
}
};
template <typename R>
struct InterfaceFuncInvoker0
{
typedef R (*Func)(void*, const RuntimeMethod*);
static inline R Invoke (Il2CppMethodSlot slot, RuntimeClass* declaringInterface, RuntimeObject* obj)
{
const VirtualInvokeData& invokeData = il2cpp_codegen_get_interface_invoke_data(slot, obj, declaringInterface);
return ((Func)invokeData.methodPtr)(obj, invokeData.method);
}
};
struct InterfaceActionInvoker0
{
typedef void (*Action)(void*, const RuntimeMethod*);
static inline void Invoke (Il2CppMethodSlot slot, RuntimeClass* declaringInterface, RuntimeObject* obj)
{
const VirtualInvokeData& invokeData = il2cpp_codegen_get_interface_invoke_data(slot, obj, declaringInterface);
((Action)invokeData.methodPtr)(obj, invokeData.method);
}
};
template <typename T1, typename T2>
struct InterfaceActionInvoker2
{
typedef void (*Action)(void*, T1, T2, const RuntimeMethod*);
static inline void Invoke (Il2CppMethodSlot slot, RuntimeClass* declaringInterface, RuntimeObject* obj, T1 p1, T2 p2)
{
const VirtualInvokeData& invokeData = il2cpp_codegen_get_interface_invoke_data(slot, obj, declaringInterface);
((Action)invokeData.methodPtr)(obj, p1, p2, invokeData.method);
}
};
template <typename T1>
struct InterfaceActionInvoker1
{
typedef void (*Action)(void*, T1, const RuntimeMethod*);
static inline void Invoke (Il2CppMethodSlot slot, RuntimeClass* declaringInterface, RuntimeObject* obj, T1 p1)
{
const VirtualInvokeData& invokeData = il2cpp_codegen_get_interface_invoke_data(slot, obj, declaringInterface);
((Action)invokeData.methodPtr)(obj, p1, invokeData.method);
}
};
template <typename R, typename T1, typename T2, typename T3, typename T4>
struct InterfaceFuncInvoker4
{
typedef R (*Func)(void*, T1, T2, T3, T4, const RuntimeMethod*);
static inline R Invoke (Il2CppMethodSlot slot, RuntimeClass* declaringInterface, RuntimeObject* obj, T1 p1, T2 p2, T3 p3, T4 p4)
{
const VirtualInvokeData& invokeData = il2cpp_codegen_get_interface_invoke_data(slot, obj, declaringInterface);
return ((Func)invokeData.methodPtr)(obj, p1, p2, p3, p4, invokeData.method);
}
};
template <typename R, typename T1, typename T2, typename T3>
struct InterfaceFuncInvoker3
{
typedef R (*Func)(void*, T1, T2, T3, const RuntimeMethod*);
static inline R Invoke (Il2CppMethodSlot slot, RuntimeClass* declaringInterface, RuntimeObject* obj, T1 p1, T2 p2, T3 p3)
{
const VirtualInvokeData& invokeData = il2cpp_codegen_get_interface_invoke_data(slot, obj, declaringInterface);
return ((Func)invokeData.methodPtr)(obj, p1, p2, p3, invokeData.method);
}
};
template <typename R, typename T1, typename T2, typename T3, typename T4, typename T5>
struct InterfaceFuncInvoker5
{
typedef R (*Func)(void*, T1, T2, T3, T4, T5, const RuntimeMethod*);
static inline R Invoke (Il2CppMethodSlot slot, RuntimeClass* declaringInterface, RuntimeObject* obj, T1 p1, T2 p2, T3 p3, T4 p4, T5 p5)
{
const VirtualInvokeData& invokeData = il2cpp_codegen_get_interface_invoke_data(slot, obj, declaringInterface);
return ((Func)invokeData.methodPtr)(obj, p1, p2, p3, p4, p5, invokeData.method);
}
};
template <typename R, typename T1, typename T2>
struct GenericInterfaceFuncInvoker2
{
typedef R (*Func)(void*, T1, T2, const RuntimeMethod*);
static inline R Invoke (const RuntimeMethod* method, RuntimeObject* obj, T1 p1, T2 p2)
{
VirtualInvokeData invokeData;
il2cpp_codegen_get_generic_interface_invoke_data(method, obj, &invokeData);
return ((Func)invokeData.methodPtr)(obj, p1, p2, invokeData.method);
}
};
template <typename R, typename T1>
struct GenericInterfaceFuncInvoker1
{
typedef R (*Func)(void*, T1, const RuntimeMethod*);
static inline R Invoke (const RuntimeMethod* method, RuntimeObject* obj, T1 p1)
{
VirtualInvokeData invokeData;
il2cpp_codegen_get_generic_interface_invoke_data(method, obj, &invokeData);
return ((Func)invokeData.methodPtr)(obj, p1, invokeData.method);
}
};
template <typename T1, typename T2>
struct GenericInterfaceActionInvoker2
{
typedef void (*Action)(void*, T1, T2, const RuntimeMethod*);
static inline void Invoke (const RuntimeMethod* method, RuntimeObject* obj, T1 p1, T2 p2)
{
VirtualInvokeData invokeData;
il2cpp_codegen_get_generic_interface_invoke_data(method, obj, &invokeData);
((Action)invokeData.methodPtr)(obj, p1, p2, invokeData.method);
}
};
template <typename T1>
struct GenericInterfaceActionInvoker1
{
typedef void (*Action)(void*, T1, const RuntimeMethod*);
static inline void Invoke (const RuntimeMethod* method, RuntimeObject* obj, T1 p1)
{
VirtualInvokeData invokeData;
il2cpp_codegen_get_generic_interface_invoke_data(method, obj, &invokeData);
((Action)invokeData.methodPtr)(obj, p1, invokeData.method);
}
};
template <typename R, typename T1, typename T2, typename T3, typename T4>
struct GenericInterfaceFuncInvoker4
{
typedef R (*Func)(void*, T1, T2, T3, T4, const RuntimeMethod*);
static inline R Invoke (const RuntimeMethod* method, RuntimeObject* obj, T1 p1, T2 p2, T3 p3, T4 p4)
{
VirtualInvokeData invokeData;
il2cpp_codegen_get_generic_interface_invoke_data(method, obj, &invokeData);
return ((Func)invokeData.methodPtr)(obj, p1, p2, p3, p4, invokeData.method);
}
};
template <typename R, typename T1, typename T2, typename T3>
struct GenericInterfaceFuncInvoker3
{
typedef R (*Func)(void*, T1, T2, T3, const RuntimeMethod*);
static inline R Invoke (const RuntimeMethod* method, RuntimeObject* obj, T1 p1, T2 p2, T3 p3)
{
VirtualInvokeData invokeData;
il2cpp_codegen_get_generic_interface_invoke_data(method, obj, &invokeData);
return ((Func)invokeData.methodPtr)(obj, p1, p2, p3, invokeData.method);
}
};
template <typename R>
struct GenericInterfaceFuncInvoker0
{
typedef R (*Func)(void*, const RuntimeMethod*);
static inline R Invoke (const RuntimeMethod* method, RuntimeObject* obj)
{
VirtualInvokeData invokeData;
il2cpp_codegen_get_generic_interface_invoke_data(method, obj, &invokeData);
return ((Func)invokeData.methodPtr)(obj, invokeData.method);
}
};
// Microsoft.Win32.SafeHandles.SafeWaitHandle
struct SafeWaitHandle_t1972936122;
// Mono.Globalization.Unicode.SimpleCollator
struct SimpleCollator_t2877834729;
// Mono.Math.BigInteger
struct BigInteger_t2902905090;
// Mono.Math.BigInteger/ModulusRing
struct ModulusRing_t596511505;
// Mono.Math.BigInteger[]
struct BigIntegerU5BU5D_t2349952477;
// Mono.Math.Prime.Generator.PrimeGeneratorBase
struct PrimeGeneratorBase_t446028867;
// Mono.Math.Prime.Generator.SequentialSearchPrimeGeneratorBase
struct SequentialSearchPrimeGeneratorBase_t2996090509;
// Mono.Math.Prime.PrimalityTest
struct PrimalityTest_t1539325944;
// Mono.Security.ASN1
struct ASN1_t2114160833;
// Mono.Security.Cryptography.ARC4Managed
struct ARC4Managed_t2641858452;
// Mono.Security.Cryptography.HMAC
struct HMAC_t3689525210;
// Mono.Security.Cryptography.KeyPairPersistence
struct KeyPairPersistence_t2094547461;
// Mono.Security.Cryptography.MD2
struct MD2_t1561046427;
// Mono.Security.Cryptography.MD2Managed
struct MD2Managed_t1377101535;
// Mono.Security.Cryptography.MD4
struct MD4_t1560915355;
// Mono.Security.Cryptography.MD4Managed
struct MD4Managed_t957540063;
// Mono.Security.Cryptography.MD5SHA1
struct MD5SHA1_t723838944;
// Mono.Security.Cryptography.PKCS8/EncryptedPrivateKeyInfo
struct EncryptedPrivateKeyInfo_t862116836;
// Mono.Security.Cryptography.PKCS8/PrivateKeyInfo
struct PrivateKeyInfo_t668027993;
// Mono.Security.Cryptography.RC4
struct RC4_t2752556436;
// Mono.Security.Cryptography.RSAManaged
struct RSAManaged_t1757093819;
// Mono.Security.Cryptography.RSAManaged
struct RSAManaged_t1757093820;
// Mono.Security.Cryptography.RSAManaged/KeyGeneratedEventHandler
struct KeyGeneratedEventHandler_t3064139578;
// Mono.Security.PKCS7/ContentInfo
struct ContentInfo_t3218159896;
// Mono.Security.PKCS7/EncryptedData
struct EncryptedData_t3577548733;
// Mono.Security.Protocol.Tls.Alert
struct Alert_t4059934885;
// Mono.Security.Protocol.Tls.CertificateSelectionCallback
struct CertificateSelectionCallback_t3743405224;
// Mono.Security.Protocol.Tls.CertificateValidationCallback
struct CertificateValidationCallback_t4091668218;
// Mono.Security.Protocol.Tls.CertificateValidationCallback2
struct CertificateValidationCallback2_t1842476440;
// Mono.Security.Protocol.Tls.CipherSuite
struct CipherSuite_t3414744575;
// Mono.Security.Protocol.Tls.CipherSuiteCollection
struct CipherSuiteCollection_t1129639304;
// Mono.Security.Protocol.Tls.ClientContext
struct ClientContext_t2797401965;
// Mono.Security.Protocol.Tls.ClientRecordProtocol
struct ClientRecordProtocol_t2031137796;
// Mono.Security.Protocol.Tls.ClientSessionInfo
struct ClientSessionInfo_t1775821398;
// Mono.Security.Protocol.Tls.Context
struct Context_t3971234707;
// Mono.Security.Protocol.Tls.Handshake.Client.TlsClientCertificate
struct TlsClientCertificate_t3519510577;
// Mono.Security.Protocol.Tls.Handshake.Client.TlsClientCertificateVerify
struct TlsClientCertificateVerify_t1824902654;
// Mono.Security.Protocol.Tls.Handshake.Client.TlsClientFinished
struct TlsClientFinished_t2486981163;
// Mono.Security.Protocol.Tls.Handshake.Client.TlsClientHello
struct TlsClientHello_t97965998;
// Mono.Security.Protocol.Tls.Handshake.Client.TlsClientKeyExchange
struct TlsClientKeyExchange_t643923608;
// Mono.Security.Protocol.Tls.Handshake.Client.TlsServerCertificate
struct TlsServerCertificate_t2716496392;
// Mono.Security.Protocol.Tls.Handshake.Client.TlsServerCertificateRequest
struct TlsServerCertificateRequest_t3690397592;
// Mono.Security.Protocol.Tls.Handshake.Client.TlsServerFinished
struct TlsServerFinished_t3860330041;
// Mono.Security.Protocol.Tls.Handshake.Client.TlsServerHello
struct TlsServerHello_t3343859594;
// Mono.Security.Protocol.Tls.Handshake.Client.TlsServerHelloDone
struct TlsServerHelloDone_t1850379324;
// Mono.Security.Protocol.Tls.Handshake.Client.TlsServerKeyExchange
struct TlsServerKeyExchange_t699469151;
// Mono.Security.Protocol.Tls.Handshake.ClientCertificateType[]
struct ClientCertificateTypeU5BU5D_t4253920197;
// Mono.Security.Protocol.Tls.Handshake.HandshakeMessage
struct HandshakeMessage_t3696583168;
// Mono.Security.Protocol.Tls.HttpsClientStream
struct HttpsClientStream_t1160552561;
// Mono.Security.Protocol.Tls.PrivateKeySelectionCallback
struct PrivateKeySelectionCallback_t3240194217;
// Mono.Security.Protocol.Tls.RSASslSignatureDeformatter
struct RSASslSignatureDeformatter_t3558097625;
// Mono.Security.Protocol.Tls.RSASslSignatureFormatter
struct RSASslSignatureFormatter_t2709678514;
// Mono.Security.Protocol.Tls.RecordProtocol
struct RecordProtocol_t3759049701;
// Mono.Security.Protocol.Tls.RecordProtocol/ReceiveRecordAsyncResult
struct ReceiveRecordAsyncResult_t3680907657;
// Mono.Security.Protocol.Tls.RecordProtocol/SendRecordAsyncResult
struct SendRecordAsyncResult_t3718352467;
// Mono.Security.Protocol.Tls.SecurityParameters
struct SecurityParameters_t2199972650;
// Mono.Security.Protocol.Tls.SslCipherSuite
struct SslCipherSuite_t1981645747;
// Mono.Security.Protocol.Tls.SslClientStream
struct SslClientStream_t3914624661;
// Mono.Security.Protocol.Tls.SslHandshakeHash
struct SslHandshakeHash_t2107581772;
// Mono.Security.Protocol.Tls.SslStreamBase
struct SslStreamBase_t1667413407;
// Mono.Security.Protocol.Tls.TlsCipherSuite
struct TlsCipherSuite_t1545013223;
// Mono.Security.Protocol.Tls.TlsClientSettings
struct TlsClientSettings_t2486039503;
// Mono.Security.Protocol.Tls.TlsException
struct TlsException_t3534743363;
// Mono.Security.Protocol.Tls.TlsServerSettings
struct TlsServerSettings_t4144396432;
// Mono.Security.Protocol.Tls.TlsStream
struct TlsStream_t2365453965;
// Mono.Security.Protocol.Tls.ValidationResult
struct ValidationResult_t3834298736;
// Mono.Security.X509.Extensions.ExtendedKeyUsageExtension
struct ExtendedKeyUsageExtension_t3929363080;
// Mono.Security.X509.Extensions.GeneralNames
struct GeneralNames_t2702294159;
// Mono.Security.X509.Extensions.KeyUsageExtension
struct KeyUsageExtension_t1795615912;
// Mono.Security.X509.Extensions.NetscapeCertTypeExtension
struct NetscapeCertTypeExtension_t1524296876;
// Mono.Security.X509.Extensions.SubjectAltNameExtension
struct SubjectAltNameExtension_t1536937677;
// Mono.Security.X509.X509Certificate
struct X509Certificate_t489243024;
// Mono.Security.X509.X509Certificate
struct X509Certificate_t489243025;
// Mono.Security.X509.X509CertificateCollection
struct X509CertificateCollection_t1542168550;
// Mono.Security.X509.X509Chain
struct X509Chain_t863783600;
// Mono.Security.X509.X509Extension
struct X509Extension_t3173393653;
// Mono.Security.X509.X509ExtensionCollection
struct X509ExtensionCollection_t609554709;
// System.ArgumentException
struct ArgumentException_t132251570;
// System.ArgumentNullException
struct ArgumentNullException_t1615371798;
// System.ArgumentOutOfRangeException
struct ArgumentOutOfRangeException_t777629997;
// System.ArithmeticException
struct ArithmeticException_t4283546778;
// System.AsyncCallback
struct AsyncCallback_t3962456242;
// System.Byte
struct Byte_t1134296376;
// System.Byte[,]
struct ByteU5BU2CU5D_t4116647658;
// System.Byte[]
struct ByteU5BU5D_t4116647657;
// System.Char[]
struct CharU5BU5D_t3528271667;
// System.Collections.ArrayList
struct ArrayList_t2718874744;
// System.Collections.CollectionBase
struct CollectionBase_t2727926298;
// System.Collections.Generic.Dictionary`2/Transform`1<System.String,System.Int32,System.Collections.DictionaryEntry>
struct Transform_1_t3530625384;
// System.Collections.Generic.Dictionary`2<System.Object,System.Int32>
struct Dictionary_2_t3384741;
// System.Collections.Generic.Dictionary`2<System.String,System.Int32>
struct Dictionary_2_t2736202052;
// System.Collections.Generic.IEqualityComparer`1<System.String>
struct IEqualityComparer_1_t3954782707;
// System.Collections.Generic.Link[]
struct LinkU5BU5D_t964245573;
// System.Collections.Hashtable
struct Hashtable_t1853889766;
// System.Collections.Hashtable/HashKeys
struct HashKeys_t1568156503;
// System.Collections.Hashtable/HashValues
struct HashValues_t618387445;
// System.Collections.Hashtable/Slot[]
struct SlotU5BU5D_t2994659099;
// System.Collections.IComparer
struct IComparer_t1540313114;
// System.Collections.IDictionary
struct IDictionary_t1363984059;
// System.Collections.IEnumerator
struct IEnumerator_t1853284238;
// System.Collections.IEqualityComparer
struct IEqualityComparer_t1493878338;
// System.Collections.IHashCodeProvider
struct IHashCodeProvider_t267601189;
// System.Collections.Specialized.HybridDictionary
struct HybridDictionary_t4070033136;
// System.Delegate
struct Delegate_t1188392813;
// System.DelegateData
struct DelegateData_t1677132599;
// System.Double
struct Double_t594665363;
// System.EventArgs
struct EventArgs_t3591816995;
// System.Exception
struct Exception_t;
// System.FormatException
struct FormatException_t154580423;
// System.Globalization.Calendar
struct Calendar_t1661121569;
// System.Globalization.Calendar[]
struct CalendarU5BU5D_t3985046076;
// System.Globalization.CompareInfo
struct CompareInfo_t1092934962;
// System.Globalization.CultureInfo
struct CultureInfo_t4157843068;
// System.Globalization.DateTimeFormatInfo
struct DateTimeFormatInfo_t2405853701;
// System.Globalization.NumberFormatInfo
struct NumberFormatInfo_t435877138;
// System.Globalization.TextInfo
struct TextInfo_t3810425522;
// System.IAsyncResult
struct IAsyncResult_t767004451;
// System.IFormatProvider
struct IFormatProvider_t2518567562;
// System.IO.IOException
struct IOException_t4088381929;
// System.IO.MemoryStream
struct MemoryStream_t94973147;
// System.IO.Stream
struct Stream_t1273022909;
// System.IndexOutOfRangeException
struct IndexOutOfRangeException_t1578797820;
// System.Int32
struct Int32_t2950945753;
// System.Int32[]
struct Int32U5BU5D_t385246372;
// System.IntPtr[]
struct IntPtrU5BU5D_t4013366056;
// System.InvalidOperationException
struct InvalidOperationException_t56020091;
// System.Net.HttpWebRequest
struct HttpWebRequest_t1669436515;
// System.Net.ICertificatePolicy
struct ICertificatePolicy_t2970473191;
// System.Net.IWebProxy
struct IWebProxy_t688979836;
// System.Net.Security.RemoteCertificateValidationCallback
struct RemoteCertificateValidationCallback_t3014364904;
// System.Net.ServicePoint
struct ServicePoint_t2786966844;
// System.Net.WebHeaderCollection
struct WebHeaderCollection_t1942268960;
// System.NotSupportedException
struct NotSupportedException_t1314879016;
// System.ObjectDisposedException
struct ObjectDisposedException_t21392786;
// System.Object[]
struct ObjectU5BU5D_t2843939325;
// System.Reflection.Assembly
struct Assembly_t;
// System.Reflection.MemberFilter
struct MemberFilter_t426314064;
// System.Reflection.MethodInfo
struct MethodInfo_t;
// System.Runtime.Remoting.ServerIdentity
struct ServerIdentity_t2342208608;
// System.Runtime.Serialization.SerializationInfo
struct SerializationInfo_t950877179;
// System.Security.Cryptography.AsymmetricAlgorithm
struct AsymmetricAlgorithm_t932037087;
// System.Security.Cryptography.AsymmetricSignatureDeformatter
struct AsymmetricSignatureDeformatter_t2681190756;
// System.Security.Cryptography.AsymmetricSignatureFormatter
struct AsymmetricSignatureFormatter_t3486936014;
// System.Security.Cryptography.CryptographicException
struct CryptographicException_t248831461;
// System.Security.Cryptography.CryptographicUnexpectedOperationException
struct CryptographicUnexpectedOperationException_t2790575154;
// System.Security.Cryptography.CspParameters
struct CspParameters_t239852639;
// System.Security.Cryptography.DES
struct DES_t821106792;
// System.Security.Cryptography.DSA
struct DSA_t2386879874;
// System.Security.Cryptography.HashAlgorithm
struct HashAlgorithm_t1432317219;
// System.Security.Cryptography.ICryptoTransform
struct ICryptoTransform_t2733259762;
// System.Security.Cryptography.KeySizes
struct KeySizes_t85027896;
// System.Security.Cryptography.KeySizes[]
struct KeySizesU5BU5D_t722666473;
// System.Security.Cryptography.KeyedHashAlgorithm
struct KeyedHashAlgorithm_t112861511;
// System.Security.Cryptography.MD5
struct MD5_t3177620429;
// System.Security.Cryptography.Oid
struct Oid_t3552120260;
// System.Security.Cryptography.RC2
struct RC2_t3167825714;
// System.Security.Cryptography.RSA
struct RSA_t2385438082;
// System.Security.Cryptography.RSACryptoServiceProvider
struct RSACryptoServiceProvider_t2683512874;
// System.Security.Cryptography.RSAPKCS1KeyExchangeFormatter
struct RSAPKCS1KeyExchangeFormatter_t2761096101;
// System.Security.Cryptography.RandomNumberGenerator
struct RandomNumberGenerator_t386037858;
// System.Security.Cryptography.Rijndael
struct Rijndael_t2986313634;
// System.Security.Cryptography.SHA1
struct SHA1_t1803193667;
// System.Security.Cryptography.SymmetricAlgorithm
struct SymmetricAlgorithm_t4254223087;
// System.Security.Cryptography.TripleDES
struct TripleDES_t92303514;
// System.Security.Cryptography.X509Certificates.PublicKey
struct PublicKey_t3779582684;
// System.Security.Cryptography.X509Certificates.X500DistinguishedName
struct X500DistinguishedName_t875709727;
// System.Security.Cryptography.X509Certificates.X509Certificate
struct X509Certificate_t713131622;
// System.Security.Cryptography.X509Certificates.X509Certificate2
struct X509Certificate2_t714049126;
// System.Security.Cryptography.X509Certificates.X509Certificate2Collection
struct X509Certificate2Collection_t2111161276;
// System.Security.Cryptography.X509Certificates.X509CertificateCollection
struct X509CertificateCollection_t3399372417;
// System.Security.Cryptography.X509Certificates.X509CertificateCollection/X509CertificateEnumerator
struct X509CertificateEnumerator_t855273292;
// System.Security.Cryptography.X509Certificates.X509Certificate[]
struct X509CertificateU5BU5D_t3145106755;
// System.Security.Cryptography.X509Certificates.X509Chain
struct X509Chain_t194917408;
// System.Security.Cryptography.X509Certificates.X509ChainElement
struct X509ChainElement_t1464056338;
// System.Security.Cryptography.X509Certificates.X509ChainElementCollection
struct X509ChainElementCollection_t3110968994;
// System.Security.Cryptography.X509Certificates.X509ChainPolicy
struct X509ChainPolicy_t2426922870;
// System.Security.Cryptography.X509Certificates.X509ChainStatus[]
struct X509ChainStatusU5BU5D_t2685945535;
// System.Security.Cryptography.X509Certificates.X509ExtensionCollection
struct X509ExtensionCollection_t1350454579;
// System.Security.Cryptography.X509Certificates.X509Store
struct X509Store_t2922691911;
// System.String
struct String_t;
// System.String[]
struct StringU5BU5D_t1281789340;
// System.Text.DecoderFallback
struct DecoderFallback_t3123823036;
// System.Text.EncoderFallback
struct EncoderFallback_t1188251036;
// System.Text.Encoding
struct Encoding_t1523322056;
// System.Text.RegularExpressions.Capture
struct Capture_t2232016050;
// System.Text.RegularExpressions.CaptureCollection
struct CaptureCollection_t1760593541;
// System.Text.RegularExpressions.FactoryCache
struct FactoryCache_t2327118887;
// System.Text.RegularExpressions.Group
struct Group_t2468205786;
// System.Text.RegularExpressions.GroupCollection
struct GroupCollection_t69770484;
// System.Text.RegularExpressions.Group[]
struct GroupU5BU5D_t1880820351;
// System.Text.RegularExpressions.IMachine
struct IMachine_t2106687985;
// System.Text.RegularExpressions.IMachineFactory
struct IMachineFactory_t1209798546;
// System.Text.RegularExpressions.Match
struct Match_t3408321083;
// System.Text.RegularExpressions.MatchCollection
struct MatchCollection_t1395363720;
// System.Text.RegularExpressions.Regex
struct Regex_t3657309853;
// System.Text.StringBuilder
struct StringBuilder_t;
// System.Threading.EventWaitHandle
struct EventWaitHandle_t777845177;
// System.Threading.ManualResetEvent
struct ManualResetEvent_t451242010;
// System.Threading.WaitHandle
struct WaitHandle_t1743403487;
// System.Type
struct Type_t;
// System.Type[]
struct TypeU5BU5D_t3940880105;
// System.UInt16
struct UInt16_t2177724958;
// System.UInt32[]
struct UInt32U5BU5D_t2770800703;
// System.Uri
struct Uri_t100236324;
// System.Uri/UriScheme[]
struct UriSchemeU5BU5D_t2082808316;
// System.UriParser
struct UriParser_t3890150400;
// System.Version
struct Version_t3456873960;
// System.Void
struct Void_t1185182177;
extern RuntimeClass* ARC4Managed_t2641858452_il2cpp_TypeInfo_var;
extern RuntimeClass* ASN1_t2114160833_il2cpp_TypeInfo_var;
extern RuntimeClass* Alert_t4059934885_il2cpp_TypeInfo_var;
extern RuntimeClass* ArgumentException_t132251570_il2cpp_TypeInfo_var;
extern RuntimeClass* ArgumentNullException_t1615371798_il2cpp_TypeInfo_var;
extern RuntimeClass* ArgumentOutOfRangeException_t777629997_il2cpp_TypeInfo_var;
extern RuntimeClass* ArithmeticException_t4283546778_il2cpp_TypeInfo_var;
extern RuntimeClass* ArrayList_t2718874744_il2cpp_TypeInfo_var;
extern RuntimeClass* AsyncCallback_t3962456242_il2cpp_TypeInfo_var;
extern RuntimeClass* BigIntegerU5BU5D_t2349952477_il2cpp_TypeInfo_var;
extern RuntimeClass* BigInteger_t2902905090_il2cpp_TypeInfo_var;
extern RuntimeClass* BitConverter_t3118986983_il2cpp_TypeInfo_var;
extern RuntimeClass* ByteU5BU5DU5BU5D_t457913172_il2cpp_TypeInfo_var;
extern RuntimeClass* ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var;
extern RuntimeClass* CertificateSelectionCallback_t3743405224_il2cpp_TypeInfo_var;
extern RuntimeClass* CertificateValidationCallback2_t1842476440_il2cpp_TypeInfo_var;
extern RuntimeClass* CertificateValidationCallback_t4091668218_il2cpp_TypeInfo_var;
extern RuntimeClass* Char_t3634460470_il2cpp_TypeInfo_var;
extern RuntimeClass* CipherSuiteCollection_t1129639304_il2cpp_TypeInfo_var;
extern RuntimeClass* CipherSuite_t3414744575_il2cpp_TypeInfo_var;
extern RuntimeClass* ClientCertificateTypeU5BU5D_t4253920197_il2cpp_TypeInfo_var;
extern RuntimeClass* ClientContext_t2797401965_il2cpp_TypeInfo_var;
extern RuntimeClass* ClientRecordProtocol_t2031137796_il2cpp_TypeInfo_var;
extern RuntimeClass* ClientSessionCache_t2353595803_il2cpp_TypeInfo_var;
extern RuntimeClass* ClientSessionInfo_t1775821398_il2cpp_TypeInfo_var;
extern RuntimeClass* ConfidenceFactor_t2516000286_il2cpp_TypeInfo_var;
extern RuntimeClass* ContentInfo_t3218159896_il2cpp_TypeInfo_var;
extern RuntimeClass* ContentType_t2602934270_il2cpp_TypeInfo_var;
extern RuntimeClass* Convert_t2465617642_il2cpp_TypeInfo_var;
extern RuntimeClass* CryptoConfig_t4201145714_il2cpp_TypeInfo_var;
extern RuntimeClass* CryptographicException_t248831461_il2cpp_TypeInfo_var;
extern RuntimeClass* CryptographicUnexpectedOperationException_t2790575154_il2cpp_TypeInfo_var;
extern RuntimeClass* CspParameters_t239852639_il2cpp_TypeInfo_var;
extern RuntimeClass* CultureInfo_t4157843068_il2cpp_TypeInfo_var;
extern RuntimeClass* DES_t821106792_il2cpp_TypeInfo_var;
extern RuntimeClass* DateTime_t3738529785_il2cpp_TypeInfo_var;
extern RuntimeClass* Dictionary_2_t2736202052_il2cpp_TypeInfo_var;
extern RuntimeClass* Encoding_t1523322056_il2cpp_TypeInfo_var;
extern RuntimeClass* Enum_t4135868527_il2cpp_TypeInfo_var;
extern RuntimeClass* Exception_t_il2cpp_TypeInfo_var;
extern RuntimeClass* ExtendedKeyUsageExtension_t3929363080_il2cpp_TypeInfo_var;
extern RuntimeClass* FormatException_t154580423_il2cpp_TypeInfo_var;
extern RuntimeClass* HMAC_t3689525210_il2cpp_TypeInfo_var;
extern RuntimeClass* HandshakeType_t3062346172_il2cpp_TypeInfo_var;
extern RuntimeClass* Hashtable_t1853889766_il2cpp_TypeInfo_var;
extern RuntimeClass* HttpsClientStream_t1160552561_il2cpp_TypeInfo_var;
extern RuntimeClass* IAsyncResult_t767004451_il2cpp_TypeInfo_var;
extern RuntimeClass* ICertificatePolicy_t2970473191_il2cpp_TypeInfo_var;
extern RuntimeClass* ICryptoTransform_t2733259762_il2cpp_TypeInfo_var;
extern RuntimeClass* IDisposable_t3640265483_il2cpp_TypeInfo_var;
extern RuntimeClass* IEnumerable_t1941168011_il2cpp_TypeInfo_var;
extern RuntimeClass* IEnumerator_t1853284238_il2cpp_TypeInfo_var;
extern RuntimeClass* IOException_t4088381929_il2cpp_TypeInfo_var;
extern RuntimeClass* IndexOutOfRangeException_t1578797820_il2cpp_TypeInfo_var;
extern RuntimeClass* Int32U5BU5D_t385246372_il2cpp_TypeInfo_var;
extern RuntimeClass* Int32_t2950945753_il2cpp_TypeInfo_var;
extern RuntimeClass* Int64_t3736567304_il2cpp_TypeInfo_var;
extern RuntimeClass* InvalidOperationException_t56020091_il2cpp_TypeInfo_var;
extern RuntimeClass* KeyBuilder_t2049230355_il2cpp_TypeInfo_var;
extern RuntimeClass* KeySizesU5BU5D_t722666473_il2cpp_TypeInfo_var;
extern RuntimeClass* KeySizes_t85027896_il2cpp_TypeInfo_var;
extern RuntimeClass* KeyUsageExtension_t1795615912_il2cpp_TypeInfo_var;
extern RuntimeClass* MD2Managed_t1377101535_il2cpp_TypeInfo_var;
extern RuntimeClass* MD2_t1561046427_il2cpp_TypeInfo_var;
extern RuntimeClass* MD4Managed_t957540063_il2cpp_TypeInfo_var;
extern RuntimeClass* MD4_t1560915355_il2cpp_TypeInfo_var;
extern RuntimeClass* MD5SHA1_t723838944_il2cpp_TypeInfo_var;
extern RuntimeClass* ManualResetEvent_t451242010_il2cpp_TypeInfo_var;
extern RuntimeClass* ModulusRing_t596511505_il2cpp_TypeInfo_var;
extern RuntimeClass* NetscapeCertTypeExtension_t1524296876_il2cpp_TypeInfo_var;
extern RuntimeClass* NotImplementedException_t3489357830_il2cpp_TypeInfo_var;
extern RuntimeClass* NotSupportedException_t1314879016_il2cpp_TypeInfo_var;
extern RuntimeClass* ObjectDisposedException_t21392786_il2cpp_TypeInfo_var;
extern RuntimeClass* ObjectU5BU5D_t2843939325_il2cpp_TypeInfo_var;
extern RuntimeClass* PKCS1_t1505584677_il2cpp_TypeInfo_var;
extern RuntimeClass* PrimalityTest_t1539325944_il2cpp_TypeInfo_var;
extern RuntimeClass* PrivateKeySelectionCallback_t3240194217_il2cpp_TypeInfo_var;
extern RuntimeClass* RC4_t2752556436_il2cpp_TypeInfo_var;
extern RuntimeClass* RSACryptoServiceProvider_t2683512874_il2cpp_TypeInfo_var;
extern RuntimeClass* RSAManaged_t1757093820_il2cpp_TypeInfo_var;
extern RuntimeClass* RSAPKCS1KeyExchangeFormatter_t2761096101_il2cpp_TypeInfo_var;
extern RuntimeClass* RSASslSignatureDeformatter_t3558097625_il2cpp_TypeInfo_var;
extern RuntimeClass* RSASslSignatureFormatter_t2709678514_il2cpp_TypeInfo_var;
extern RuntimeClass* RSA_t2385438082_il2cpp_TypeInfo_var;
extern RuntimeClass* ReceiveRecordAsyncResult_t3680907657_il2cpp_TypeInfo_var;
extern RuntimeClass* RecordProtocol_t3759049701_il2cpp_TypeInfo_var;
extern RuntimeClass* Regex_t3657309853_il2cpp_TypeInfo_var;
extern RuntimeClass* RuntimeObject_il2cpp_TypeInfo_var;
extern RuntimeClass* SecurityParameters_t2199972650_il2cpp_TypeInfo_var;
extern RuntimeClass* SendRecordAsyncResult_t3718352467_il2cpp_TypeInfo_var;
extern RuntimeClass* SequentialSearchPrimeGeneratorBase_t2996090509_il2cpp_TypeInfo_var;
extern RuntimeClass* ServerContext_t3848440993_il2cpp_TypeInfo_var;
extern RuntimeClass* ServicePointManager_t170559685_il2cpp_TypeInfo_var;
extern RuntimeClass* SslCipherSuite_t1981645747_il2cpp_TypeInfo_var;
extern RuntimeClass* SslHandshakeHash_t2107581772_il2cpp_TypeInfo_var;
extern RuntimeClass* SslStreamBase_t1667413407_il2cpp_TypeInfo_var;
extern RuntimeClass* StringBuilder_t_il2cpp_TypeInfo_var;
extern RuntimeClass* StringU5BU5D_t1281789340_il2cpp_TypeInfo_var;
extern RuntimeClass* String_t_il2cpp_TypeInfo_var;
extern RuntimeClass* SubjectAltNameExtension_t1536937677_il2cpp_TypeInfo_var;
extern RuntimeClass* TlsCipherSuite_t1545013223_il2cpp_TypeInfo_var;
extern RuntimeClass* TlsClientCertificateVerify_t1824902654_il2cpp_TypeInfo_var;
extern RuntimeClass* TlsClientCertificate_t3519510577_il2cpp_TypeInfo_var;
extern RuntimeClass* TlsClientFinished_t2486981163_il2cpp_TypeInfo_var;
extern RuntimeClass* TlsClientHello_t97965998_il2cpp_TypeInfo_var;
extern RuntimeClass* TlsClientKeyExchange_t643923608_il2cpp_TypeInfo_var;
extern RuntimeClass* TlsClientSettings_t2486039503_il2cpp_TypeInfo_var;
extern RuntimeClass* TlsException_t3534743363_il2cpp_TypeInfo_var;
extern RuntimeClass* TlsServerCertificateRequest_t3690397592_il2cpp_TypeInfo_var;
extern RuntimeClass* TlsServerCertificate_t2716496392_il2cpp_TypeInfo_var;
extern RuntimeClass* TlsServerFinished_t3860330041_il2cpp_TypeInfo_var;
extern RuntimeClass* TlsServerHelloDone_t1850379324_il2cpp_TypeInfo_var;
extern RuntimeClass* TlsServerHello_t3343859594_il2cpp_TypeInfo_var;
extern RuntimeClass* TlsServerKeyExchange_t699469151_il2cpp_TypeInfo_var;
extern RuntimeClass* TlsServerSettings_t4144396432_il2cpp_TypeInfo_var;
extern RuntimeClass* TlsStream_t2365453965_il2cpp_TypeInfo_var;
extern RuntimeClass* Type_t_il2cpp_TypeInfo_var;
extern RuntimeClass* UInt32U5BU5D_t2770800703_il2cpp_TypeInfo_var;
extern RuntimeClass* UInt32_t2560061978_il2cpp_TypeInfo_var;
extern RuntimeClass* X509Certificate2_t714049126_il2cpp_TypeInfo_var;
extern RuntimeClass* X509CertificateCollection_t1542168550_il2cpp_TypeInfo_var;
extern RuntimeClass* X509CertificateCollection_t3399372417_il2cpp_TypeInfo_var;
extern RuntimeClass* X509CertificateU5BU5D_t3145106755_il2cpp_TypeInfo_var;
extern RuntimeClass* X509Certificate_t489243025_il2cpp_TypeInfo_var;
extern RuntimeClass* X509Certificate_t713131622_il2cpp_TypeInfo_var;
extern RuntimeClass* X509Chain_t194917408_il2cpp_TypeInfo_var;
extern RuntimeClass* X509Chain_t863783600_il2cpp_TypeInfo_var;
extern RuntimeField* U3CPrivateImplementationDetailsU3E_t3057255363____U24U24fieldU2D0_0_FieldInfo_var;
extern RuntimeField* U3CPrivateImplementationDetailsU3E_t3057255363____U24U24fieldU2D21_13_FieldInfo_var;
extern RuntimeField* U3CPrivateImplementationDetailsU3E_t3057255363____U24U24fieldU2D22_14_FieldInfo_var;
extern RuntimeField* U3CPrivateImplementationDetailsU3E_t3057255363____U24U24fieldU2D5_1_FieldInfo_var;
extern RuntimeField* U3CPrivateImplementationDetailsU3E_t3057255363____U24U24fieldU2D6_2_FieldInfo_var;
extern RuntimeField* U3CPrivateImplementationDetailsU3E_t3057255363____U24U24fieldU2D7_3_FieldInfo_var;
extern RuntimeField* U3CPrivateImplementationDetailsU3E_t3057255363____U24U24fieldU2D8_4_FieldInfo_var;
extern RuntimeField* U3CPrivateImplementationDetailsU3E_t3057255363____U24U24fieldU2D9_5_FieldInfo_var;
extern String_t* _stringLiteral1004423982;
extern String_t* _stringLiteral1004423984;
extern String_t* _stringLiteral1063943309;
extern String_t* _stringLiteral1082126080;
extern String_t* _stringLiteral1110256105;
extern String_t* _stringLiteral1110505755;
extern String_t* _stringLiteral1111651387;
extern String_t* _stringLiteral1114683495;
extern String_t* _stringLiteral1133397176;
extern String_t* _stringLiteral1144609714;
extern String_t* _stringLiteral116715971;
extern String_t* _stringLiteral1174641524;
extern String_t* _stringLiteral1189022210;
extern String_t* _stringLiteral1209813982;
extern String_t* _stringLiteral123659953;
extern String_t* _stringLiteral1238132549;
extern String_t* _stringLiteral127985362;
extern String_t* _stringLiteral1280642964;
extern String_t* _stringLiteral1282074326;
extern String_t* _stringLiteral1285239904;
extern String_t* _stringLiteral1306161608;
extern String_t* _stringLiteral1361554341;
extern String_t* _stringLiteral1381488752;
extern String_t* _stringLiteral1386761008;
extern String_t* _stringLiteral1410188538;
extern String_t* _stringLiteral1441813354;
extern String_t* _stringLiteral1506186219;
extern String_t* _stringLiteral1510332022;
extern String_t* _stringLiteral151588389;
extern String_t* _stringLiteral1561769044;
extern String_t* _stringLiteral1565675654;
extern String_t* _stringLiteral1601143795;
extern String_t* _stringLiteral1609408204;
extern String_t* _stringLiteral1749648451;
extern String_t* _stringLiteral1813429223;
extern String_t* _stringLiteral1827055184;
extern String_t* _stringLiteral1827280598;
extern String_t* _stringLiteral1867853257;
extern String_t* _stringLiteral1889458120;
extern String_t* _stringLiteral1916825080;
extern String_t* _stringLiteral1918070264;
extern String_t* _stringLiteral1918135800;
extern String_t* _stringLiteral1927525029;
extern String_t* _stringLiteral193405814;
extern String_t* _stringLiteral1938928454;
extern String_t* _stringLiteral1940067499;
extern String_t* _stringLiteral1948411844;
extern String_t* _stringLiteral1968993200;
extern String_t* _stringLiteral197188615;
extern String_t* _stringLiteral2000707595;
extern String_t* _stringLiteral2024143041;
extern String_t* _stringLiteral2047228403;
extern String_t* _stringLiteral2053830539;
extern String_t* _stringLiteral2103170127;
extern String_t* _stringLiteral2105469118;
extern String_t* _stringLiteral2167393519;
extern String_t* _stringLiteral2186307263;
extern String_t* _stringLiteral2188206873;
extern String_t* _stringLiteral2198012883;
extern String_t* _stringLiteral2217280364;
extern String_t* _stringLiteral2231488616;
extern String_t* _stringLiteral2252787185;
extern String_t* _stringLiteral2295937935;
extern String_t* _stringLiteral2330884088;
extern String_t* _stringLiteral2368775859;
extern String_t* _stringLiteral2375729243;
extern String_t* _stringLiteral2383840146;
extern String_t* _stringLiteral243541289;
extern String_t* _stringLiteral2449489188;
extern String_t* _stringLiteral2471616411;
extern String_t* _stringLiteral2479900804;
extern String_t* _stringLiteral2514902888;
extern String_t* _stringLiteral251636811;
extern String_t* _stringLiteral2581649682;
extern String_t* _stringLiteral2597607271;
extern String_t* _stringLiteral264464451;
extern String_t* _stringLiteral2728941485;
extern String_t* _stringLiteral2787816553;
extern String_t* _stringLiteral2791101299;
extern String_t* _stringLiteral2791739702;
extern String_t* _stringLiteral2861664389;
extern String_t* _stringLiteral2898472053;
extern String_t* _stringLiteral2921622622;
extern String_t* _stringLiteral2927991799;
extern String_t* _stringLiteral2971046163;
extern String_t* _stringLiteral2973183703;
extern String_t* _stringLiteral2975569484;
extern String_t* _stringLiteral3005829114;
extern String_t* _stringLiteral3013462727;
extern String_t* _stringLiteral3016771816;
extern String_t* _stringLiteral3023545426;
extern String_t* _stringLiteral3034282783;
extern String_t* _stringLiteral3055172879;
extern String_t* _stringLiteral3073595182;
extern String_t* _stringLiteral3085174530;
extern String_t* _stringLiteral3087219758;
extern String_t* _stringLiteral3100627678;
extern String_t* _stringLiteral3133584213;
extern String_t* _stringLiteral3146387881;
extern String_t* _stringLiteral3149331255;
extern String_t* _stringLiteral3152351657;
extern String_t* _stringLiteral3152468735;
extern String_t* _stringLiteral3170101360;
extern String_t* _stringLiteral3202607819;
extern String_t* _stringLiteral3252161509;
extern String_t* _stringLiteral3266464951;
extern String_t* _stringLiteral3295482658;
extern String_t* _stringLiteral3316324514;
extern String_t* _stringLiteral3346400495;
extern String_t* _stringLiteral3387223069;
extern String_t* _stringLiteral340085282;
extern String_t* _stringLiteral3409069272;
extern String_t* _stringLiteral3430462705;
extern String_t* _stringLiteral3451435000;
extern String_t* _stringLiteral3451565966;
extern String_t* _stringLiteral3452024719;
extern String_t* _stringLiteral3452614530;
extern String_t* _stringLiteral3452614543;
extern String_t* _stringLiteral3452614544;
extern String_t* _stringLiteral3452614623;
extern String_t* _stringLiteral3455564074;
extern String_t* _stringLiteral3456677854;
extern String_t* _stringLiteral3486530047;
extern String_t* _stringLiteral3493618073;
extern String_t* _stringLiteral3499506080;
extern String_t* _stringLiteral3519915121;
extern String_t* _stringLiteral3535070725;
extern String_t* _stringLiteral3592288577;
extern String_t* _stringLiteral3622179847;
extern String_t* _stringLiteral3746471772;
extern String_t* _stringLiteral3757118627;
extern String_t* _stringLiteral3786540042;
extern String_t* _stringLiteral3830216635;
extern String_t* _stringLiteral3839139460;
extern String_t* _stringLiteral3860822773;
extern String_t* _stringLiteral3860840281;
extern String_t* _stringLiteral3895113801;
extern String_t* _stringLiteral3906129098;
extern String_t* _stringLiteral3971508554;
extern String_t* _stringLiteral4008398740;
extern String_t* _stringLiteral4059074779;
extern String_t* _stringLiteral4107337270;
extern String_t* _stringLiteral4133402427;
extern String_t* _stringLiteral417504526;
extern String_t* _stringLiteral4195570472;
extern String_t* _stringLiteral4201447376;
extern String_t* _stringLiteral423468302;
extern String_t* _stringLiteral4242423987;
extern String_t* _stringLiteral4284309600;
extern String_t* _stringLiteral438779933;
extern String_t* _stringLiteral470035263;
extern String_t* _stringLiteral475316319;
extern String_t* _stringLiteral476027131;
extern String_t* _stringLiteral491063406;
extern String_t* _stringLiteral532208778;
extern String_t* _stringLiteral54796683;
extern String_t* _stringLiteral548517185;
extern String_t* _stringLiteral582970462;
extern String_t* _stringLiteral587613957;
extern String_t* _stringLiteral63249541;
extern String_t* _stringLiteral75338978;
extern String_t* _stringLiteral82125824;
extern String_t* _stringLiteral825954302;
extern String_t* _stringLiteral907065636;
extern String_t* _stringLiteral924502160;
extern String_t* _stringLiteral939428175;
extern String_t* _stringLiteral945956019;
extern String_t* _stringLiteral951479879;
extern String_t* _stringLiteral961554175;
extern String_t* _stringLiteral969659244;
extern const RuntimeMethod* ARC4Managed_CheckInput_m1562172012_RuntimeMethod_var;
extern const RuntimeMethod* ARC4Managed_TransformBlock_m1687647868_RuntimeMethod_var;
extern const RuntimeMethod* ASN1Convert_FromOid_m3844102704_RuntimeMethod_var;
extern const RuntimeMethod* ASN1Convert_ToDateTime_m1246060840_RuntimeMethod_var;
extern const RuntimeMethod* ASN1Convert_ToInt32_m1017403318_RuntimeMethod_var;
extern const RuntimeMethod* ASN1Convert_ToOid_m3847701408_RuntimeMethod_var;
extern const RuntimeMethod* ASN1__ctor_m1638893325_RuntimeMethod_var;
extern const RuntimeMethod* BigInteger_TestBit_m2798226118_RuntimeMethod_var;
extern const RuntimeMethod* BigInteger_ToString_m1181683046_RuntimeMethod_var;
extern const RuntimeMethod* BigInteger_op_Implicit_m2547142909_RuntimeMethod_var;
extern const RuntimeMethod* BigInteger_op_Multiply_m3683746602_RuntimeMethod_var;
extern const RuntimeMethod* BigInteger_op_Subtraction_m4245834512_RuntimeMethod_var;
extern const RuntimeMethod* CipherSuiteCollection_Add_m2046232751_RuntimeMethod_var;
extern const RuntimeMethod* CipherSuiteFactory_GetSupportedCiphers_m3260014148_RuntimeMethod_var;
extern const RuntimeMethod* CipherSuite_Write_m1172814058_RuntimeMethod_var;
extern const RuntimeMethod* CipherSuite_Write_m1841735015_RuntimeMethod_var;
extern const RuntimeMethod* ClientRecordProtocol_createClientHandshakeMessage_m3325677558_RuntimeMethod_var;
extern const RuntimeMethod* ClientRecordProtocol_createServerHandshakeMessage_m2804371400_RuntimeMethod_var;
extern const RuntimeMethod* ClientSessionInfo_CheckDisposed_m1172439856_RuntimeMethod_var;
extern const RuntimeMethod* ContentInfo__ctor_m3397951412_RuntimeMethod_var;
extern const RuntimeMethod* Context_ChangeProtocol_m2412635871_RuntimeMethod_var;
extern const RuntimeMethod* Context_DecodeProtocolCode_m2249547310_RuntimeMethod_var;
extern const RuntimeMethod* Context_get_Protocol_m1078422015_RuntimeMethod_var;
extern const RuntimeMethod* Context_get_SecurityProtocol_m3228286292_RuntimeMethod_var;
extern const RuntimeMethod* Dictionary_2_Add_m282647386_RuntimeMethod_var;
extern const RuntimeMethod* Dictionary_2_TryGetValue_m1013208020_RuntimeMethod_var;
extern const RuntimeMethod* Dictionary_2__ctor_m2392909825_RuntimeMethod_var;
extern const RuntimeMethod* EncryptedData__ctor_m4001546383_RuntimeMethod_var;
extern const RuntimeMethod* EncryptedPrivateKeyInfo_Decode_m3008916518_RuntimeMethod_var;
extern const RuntimeMethod* HMAC_set_Key_m3535779141_RuntimeMethod_var;
extern const RuntimeMethod* HandshakeMessage_Process_m810828609_RuntimeMethod_var;
extern const RuntimeMethod* HttpsClientStream_U3CHttpsClientStreamU3Em__0_m2058474197_RuntimeMethod_var;
extern const RuntimeMethod* HttpsClientStream_U3CHttpsClientStreamU3Em__1_m1202173386_RuntimeMethod_var;
extern const RuntimeMethod* Kernel_LeftShift_m4140742987_RuntimeMethod_var;
extern const RuntimeMethod* Kernel_RightShift_m3246168448_RuntimeMethod_var;
extern const RuntimeMethod* Kernel_modInverse_m652700340_RuntimeMethod_var;
extern const RuntimeMethod* MD5SHA1_CreateSignature_m3583449066_RuntimeMethod_var;
extern const RuntimeMethod* MD5SHA1_VerifySignature_m915115209_RuntimeMethod_var;
extern const RuntimeMethod* ModulusRing_BarrettReduction_m3024442734_RuntimeMethod_var;
extern const RuntimeMethod* ModulusRing_Difference_m3686091506_RuntimeMethod_var;
extern const RuntimeMethod* PKCS1_Encode_v15_m2077073129_RuntimeMethod_var;
extern const RuntimeMethod* PrimalityTests_GetSPPRounds_m2558073743_RuntimeMethod_var;
extern const RuntimeMethod* PrimalityTests_RabinMillerTest_m2544317101_RuntimeMethod_var;
extern const RuntimeMethod* PrivateKeyInfo_DecodeDSA_m2335813142_RuntimeMethod_var;
extern const RuntimeMethod* PrivateKeyInfo_DecodeRSA_m4129124827_RuntimeMethod_var;
extern const RuntimeMethod* PrivateKeyInfo_Decode_m986145117_RuntimeMethod_var;
extern const RuntimeMethod* RSAManaged_DecryptValue_m1804388365_RuntimeMethod_var;
extern const RuntimeMethod* RSAManaged_EncryptValue_m4149543654_RuntimeMethod_var;
extern const RuntimeMethod* RSAManaged_ExportParameters_m1754454264_RuntimeMethod_var;
extern const RuntimeMethod* RSAManaged_ImportParameters_m1117427048_RuntimeMethod_var;
extern const RuntimeMethod* RSAManaged_ToXmlString_m2369501989_RuntimeMethod_var;
extern const RuntimeMethod* RSASslSignatureDeformatter_SetKey_m2204705853_RuntimeMethod_var;
extern const RuntimeMethod* RSASslSignatureDeformatter_VerifySignature_m1061897602_RuntimeMethod_var;
extern const RuntimeMethod* RSASslSignatureFormatter_CreateSignature_m2614788251_RuntimeMethod_var;
extern const RuntimeMethod* RSASslSignatureFormatter_SetKey_m979790541_RuntimeMethod_var;
extern const RuntimeMethod* RecordProtocol_BeginReceiveRecord_m295321170_RuntimeMethod_var;
extern const RuntimeMethod* RecordProtocol_BeginSendRecord_m3926976520_RuntimeMethod_var;
extern const RuntimeMethod* RecordProtocol_EncodeRecord_m3312835762_RuntimeMethod_var;
extern const RuntimeMethod* RecordProtocol_EndReceiveRecord_m1872541318_RuntimeMethod_var;
extern const RuntimeMethod* RecordProtocol_EndSendRecord_m4264777321_RuntimeMethod_var;
extern const RuntimeMethod* RecordProtocol_GetMessage_m2086135164_RuntimeMethod_var;
extern const RuntimeMethod* RecordProtocol_InternalReceiveRecordCallback_m1713318629_RuntimeMethod_var;
extern const RuntimeMethod* RecordProtocol_InternalSendRecordCallback_m682661965_RuntimeMethod_var;
extern const RuntimeMethod* RecordProtocol_ProcessAlert_m1036912531_RuntimeMethod_var;
extern const RuntimeMethod* RecordProtocol_ProcessCipherSpecV2Buffer_m487045483_RuntimeMethod_var;
extern const RuntimeMethod* RecordProtocol_ReadClientHelloV2_m4052496367_RuntimeMethod_var;
extern const RuntimeMethod* RecordProtocol_ReadRecordBuffer_m180543381_RuntimeMethod_var;
extern const RuntimeMethod* RecordProtocol_ReadStandardRecordBuffer_m3738063864_RuntimeMethod_var;
extern const RuntimeMethod* RecordProtocol_decryptRecordFragment_m66623237_RuntimeMethod_var;
extern const RuntimeMethod* SslClientStream_OnBeginNegotiateHandshake_m3734240069_RuntimeMethod_var;
extern const RuntimeMethod* SslClientStream_SafeReceiveRecord_m2217679740_RuntimeMethod_var;
extern const RuntimeMethod* SslClientStream__ctor_m3351906728_RuntimeMethod_var;
extern const RuntimeMethod* TlsClientCertificateVerify_ProcessAsSsl3_m1125097704_RuntimeMethod_var;
extern const RuntimeMethod* TlsClientCertificateVerify_ProcessAsTls1_m1051495755_RuntimeMethod_var;
extern const RuntimeMethod* TlsServerCertificate_validateCertificates_m4242999387_RuntimeMethod_var;
extern const RuntimeMethod* TlsServerFinished_ProcessAsSsl3_m2791932180_RuntimeMethod_var;
extern const RuntimeMethod* TlsServerFinished_ProcessAsTls1_m173877572_RuntimeMethod_var;
extern const RuntimeMethod* TlsServerHello_ProcessAsTls1_m3844152353_RuntimeMethod_var;
extern const RuntimeMethod* TlsServerHello_processProtocol_m3969427189_RuntimeMethod_var;
extern const RuntimeMethod* TlsServerKeyExchange_verifySignature_m3412856769_RuntimeMethod_var;
extern const RuntimeType* ContentType_t2602934270_0_0_0_var;
extern const RuntimeType* Int32_t2950945753_0_0_0_var;
extern const uint32_t ARC4Managed_CheckInput_m1562172012_MetadataUsageId;
extern const uint32_t ARC4Managed_GenerateIV_m2029637723_MetadataUsageId;
extern const uint32_t ARC4Managed_TransformBlock_m1687647868_MetadataUsageId;
extern const uint32_t ARC4Managed_TransformFinalBlock_m2223084380_MetadataUsageId;
extern const uint32_t ARC4Managed__ctor_m2553537404_MetadataUsageId;
extern const uint32_t ARC4Managed_get_Key_m2476146969_MetadataUsageId;
extern const uint32_t ARC4Managed_set_Key_m859266296_MetadataUsageId;
extern const uint32_t ASN1Convert_FromInt32_m1154451899_MetadataUsageId;
extern const uint32_t ASN1Convert_FromOid_m3844102704_MetadataUsageId;
extern const uint32_t ASN1Convert_ToDateTime_m1246060840_MetadataUsageId;
extern const uint32_t ASN1Convert_ToInt32_m1017403318_MetadataUsageId;
extern const uint32_t ASN1Convert_ToOid_m3847701408_MetadataUsageId;
extern const uint32_t ASN1_Add_m2431139999_MetadataUsageId;
extern const uint32_t ASN1_DecodeTLV_m3927350254_MetadataUsageId;
extern const uint32_t ASN1_Decode_m1245286596_MetadataUsageId;
extern const uint32_t ASN1_Element_m4088315026_MetadataUsageId;
extern const uint32_t ASN1_GetBytes_m1968380955_MetadataUsageId;
extern const uint32_t ASN1_ToString_m45458043_MetadataUsageId;
extern const uint32_t ASN1__ctor_m1638893325_MetadataUsageId;
extern const uint32_t ASN1_get_Item_m2255075813_MetadataUsageId;
extern const uint32_t ASN1_get_Value_m63296490_MetadataUsageId;
extern const uint32_t ASN1_set_Value_m647861841_MetadataUsageId;
extern const uint32_t Alert_GetAlertMessage_m1942367141_MetadataUsageId;
extern const uint32_t BigInteger_Equals_m63093403_MetadataUsageId;
extern const uint32_t BigInteger_GeneratePseudoPrime_m2547138838_MetadataUsageId;
extern const uint32_t BigInteger_GenerateRandom_m1790382084_MetadataUsageId;
extern const uint32_t BigInteger_GenerateRandom_m3872771375_MetadataUsageId;
extern const uint32_t BigInteger_GetBytes_m1259701831_MetadataUsageId;
extern const uint32_t BigInteger_LowestSetBit_m1199244228_MetadataUsageId;
extern const uint32_t BigInteger_ModPow_m3776562770_MetadataUsageId;
extern const uint32_t BigInteger_TestBit_m2798226118_MetadataUsageId;
extern const uint32_t BigInteger_ToString_m1181683046_MetadataUsageId;
extern const uint32_t BigInteger_ToString_m3260066955_MetadataUsageId;
extern const uint32_t BigInteger__cctor_m102257529_MetadataUsageId;
extern const uint32_t BigInteger__ctor_m2108826647_MetadataUsageId;
extern const uint32_t BigInteger__ctor_m2474659844_MetadataUsageId;
extern const uint32_t BigInteger__ctor_m2601366464_MetadataUsageId;
extern const uint32_t BigInteger__ctor_m2644482640_MetadataUsageId;
extern const uint32_t BigInteger__ctor_m3473491062_MetadataUsageId;
extern const uint32_t BigInteger_get_Rng_m3283260184_MetadataUsageId;
extern const uint32_t BigInteger_op_Addition_m1114527046_MetadataUsageId;
extern const uint32_t BigInteger_op_Equality_m1194739960_MetadataUsageId;
extern const uint32_t BigInteger_op_Implicit_m2547142909_MetadataUsageId;
extern const uint32_t BigInteger_op_Implicit_m3414367033_MetadataUsageId;
extern const uint32_t BigInteger_op_Inequality_m2697143438_MetadataUsageId;
extern const uint32_t BigInteger_op_Multiply_m3683746602_MetadataUsageId;
extern const uint32_t BigInteger_op_Subtraction_m4245834512_MetadataUsageId;
extern const uint32_t BitConverterLE_GetUIntBytes_m795219058_MetadataUsageId;
extern const uint32_t CipherSuiteCollection_Add_m2046232751_MetadataUsageId;
extern const uint32_t CipherSuiteCollection_IndexOf_m2232557119_MetadataUsageId;
extern const uint32_t CipherSuiteCollection_IndexOf_m2770510321_MetadataUsageId;
extern const uint32_t CipherSuiteCollection_System_Collections_IList_Add_m1178326810_MetadataUsageId;
extern const uint32_t CipherSuiteCollection_System_Collections_IList_Contains_m1220133031_MetadataUsageId;
extern const uint32_t CipherSuiteCollection_System_Collections_IList_IndexOf_m1361500977_MetadataUsageId;
extern const uint32_t CipherSuiteCollection_System_Collections_IList_Insert_m1567261820_MetadataUsageId;
extern const uint32_t CipherSuiteCollection_System_Collections_IList_Remove_m2463347416_MetadataUsageId;
extern const uint32_t CipherSuiteCollection_System_Collections_IList_set_Item_m904255570_MetadataUsageId;
extern const uint32_t CipherSuiteCollection__ctor_m384434353_MetadataUsageId;
extern const uint32_t CipherSuiteCollection_cultureAwareCompare_m2072548979_MetadataUsageId;
extern const uint32_t CipherSuiteCollection_get_Item_m2791953484_MetadataUsageId;
extern const uint32_t CipherSuiteCollection_get_Item_m3790183696_MetadataUsageId;
extern const uint32_t CipherSuiteCollection_get_Item_m4188309062_MetadataUsageId;
extern const uint32_t CipherSuiteFactory_GetSsl3SupportedCiphers_m3757358569_MetadataUsageId;
extern const uint32_t CipherSuiteFactory_GetSupportedCiphers_m3260014148_MetadataUsageId;
extern const uint32_t CipherSuiteFactory_GetTls1SupportedCiphers_m3691819504_MetadataUsageId;
extern const uint32_t CipherSuite_CreatePremasterSecret_m4264566459_MetadataUsageId;
extern const uint32_t CipherSuite_DecryptRecord_m1495386860_MetadataUsageId;
extern const uint32_t CipherSuite_EncryptRecord_m4196378593_MetadataUsageId;
extern const uint32_t CipherSuite_Expand_m2729769226_MetadataUsageId;
extern const uint32_t CipherSuite_PRF_m2801806009_MetadataUsageId;
extern const uint32_t CipherSuite_Write_m1172814058_MetadataUsageId;
extern const uint32_t CipherSuite_Write_m1841735015_MetadataUsageId;
extern const uint32_t CipherSuite__cctor_m3668442490_MetadataUsageId;
extern const uint32_t CipherSuite_createDecryptionCipher_m1176259509_MetadataUsageId;
extern const uint32_t CipherSuite_createEncryptionCipher_m2533565116_MetadataUsageId;
extern const uint32_t CipherSuite_get_HashAlgorithmName_m3758129154_MetadataUsageId;
extern const uint32_t ClientRecordProtocol_ProcessHandshakeMessage_m1002991731_MetadataUsageId;
extern const uint32_t ClientRecordProtocol__ctor_m2839844778_MetadataUsageId;
extern const uint32_t ClientRecordProtocol_createClientHandshakeMessage_m3325677558_MetadataUsageId;
extern const uint32_t ClientRecordProtocol_createServerHandshakeMessage_m2804371400_MetadataUsageId;
extern const uint32_t ClientSessionCache_Add_m964342678_MetadataUsageId;
extern const uint32_t ClientSessionCache_FromContext_m343076119_MetadataUsageId;
extern const uint32_t ClientSessionCache_FromHost_m273325760_MetadataUsageId;
extern const uint32_t ClientSessionCache_SetContextFromCache_m3781380849_MetadataUsageId;
extern const uint32_t ClientSessionCache_SetContextInCache_m2875733100_MetadataUsageId;
extern const uint32_t ClientSessionCache__cctor_m1380704214_MetadataUsageId;
extern const uint32_t ClientSessionInfo_CheckDisposed_m1172439856_MetadataUsageId;
extern const uint32_t ClientSessionInfo_Dispose_m3253728296_MetadataUsageId;
extern const uint32_t ClientSessionInfo_GetContext_m1679628259_MetadataUsageId;
extern const uint32_t ClientSessionInfo_KeepAlive_m1020179566_MetadataUsageId;
extern const uint32_t ClientSessionInfo_SetContext_m2115875186_MetadataUsageId;
extern const uint32_t ClientSessionInfo__cctor_m1143076802_MetadataUsageId;
extern const uint32_t ClientSessionInfo_get_Valid_m1260893789_MetadataUsageId;
extern const uint32_t ContentInfo_GetASN1_m2535172199_MetadataUsageId;
extern const uint32_t ContentInfo__ctor_m1955840786_MetadataUsageId;
extern const uint32_t ContentInfo__ctor_m2928874476_MetadataUsageId;
extern const uint32_t ContentInfo__ctor_m3397951412_MetadataUsageId;
extern const uint32_t Context_ChangeProtocol_m2412635871_MetadataUsageId;
extern const uint32_t Context_Clear_m2678836033_MetadataUsageId;
extern const uint32_t Context_DecodeProtocolCode_m2249547310_MetadataUsageId;
extern const uint32_t Context_GetSecureRandomBytes_m3676009387_MetadataUsageId;
extern const uint32_t Context_GetUnixTime_m3811151335_MetadataUsageId;
extern const uint32_t Context__ctor_m1288667393_MetadataUsageId;
extern const uint32_t Context_get_Current_m2853615040_MetadataUsageId;
extern const uint32_t Context_get_Negotiating_m2044579817_MetadataUsageId;
extern const uint32_t Context_get_Protocol_m1078422015_MetadataUsageId;
extern const uint32_t Context_get_SecurityProtocol_m3228286292_MetadataUsageId;
extern const uint32_t CryptoConvert_ToHex_m4034982758_MetadataUsageId;
extern const uint32_t EncryptedData__ctor_m4001546383_MetadataUsageId;
extern const uint32_t EncryptedData_get_EncryptedContent_m3205649670_MetadataUsageId;
extern const uint32_t EncryptedPrivateKeyInfo_Decode_m3008916518_MetadataUsageId;
extern const uint32_t EncryptedPrivateKeyInfo_get_EncryptedData_m491452551_MetadataUsageId;
extern const uint32_t EncryptedPrivateKeyInfo_get_Salt_m1261804721_MetadataUsageId;
extern const uint32_t HMAC_HashFinal_m1453827676_MetadataUsageId;
extern const uint32_t HMAC__ctor_m775015853_MetadataUsageId;
extern const uint32_t HMAC_get_Key_m1410673610_MetadataUsageId;
extern const uint32_t HMAC_initializePad_m59014980_MetadataUsageId;
extern const uint32_t HMAC_set_Key_m3535779141_MetadataUsageId;
extern const uint32_t HandshakeMessage_EncodeMessage_m3919107786_MetadataUsageId;
extern const uint32_t HandshakeMessage_Process_m810828609_MetadataUsageId;
extern const uint32_t HttpsClientStream_RaiseServerCertificateValidation_m3782467213_MetadataUsageId;
extern const uint32_t HttpsClientStream_U3CHttpsClientStreamU3Em__1_m1202173386_MetadataUsageId;
extern const uint32_t HttpsClientStream__ctor_m3125726871_MetadataUsageId;
extern const uint32_t Kernel_AddSameSign_m3267067385_MetadataUsageId;
extern const uint32_t Kernel_DwordDivMod_m1540317819_MetadataUsageId;
extern const uint32_t Kernel_LeftShift_m4140742987_MetadataUsageId;
extern const uint32_t Kernel_RightShift_m3246168448_MetadataUsageId;
extern const uint32_t Kernel_Subtract_m846005223_MetadataUsageId;
extern const uint32_t Kernel_modInverse_m4048046181_MetadataUsageId;
extern const uint32_t Kernel_modInverse_m652700340_MetadataUsageId;
extern const uint32_t Kernel_multiByteDivide_m450694282_MetadataUsageId;
extern const uint32_t KeyBuilder_Key_m1482371611_MetadataUsageId;
extern const uint32_t KeyBuilder_get_Rng_m983065666_MetadataUsageId;
extern const uint32_t MD2Managed_HashFinal_m808964912_MetadataUsageId;
extern const uint32_t MD2Managed_MD2Transform_m3143426291_MetadataUsageId;
extern const uint32_t MD2Managed_Padding_m1334210368_MetadataUsageId;
extern const uint32_t MD2Managed__cctor_m1915574725_MetadataUsageId;
extern const uint32_t MD2Managed__ctor_m3243422744_MetadataUsageId;
extern const uint32_t MD2_Create_m1292792200_MetadataUsageId;
extern const uint32_t MD2_Create_m3511476020_MetadataUsageId;
extern const uint32_t MD4Managed_HashFinal_m3850238392_MetadataUsageId;
extern const uint32_t MD4Managed_Padding_m3091724296_MetadataUsageId;
extern const uint32_t MD4Managed__ctor_m2284724408_MetadataUsageId;
extern const uint32_t MD4_Create_m1588482044_MetadataUsageId;
extern const uint32_t MD4_Create_m4111026039_MetadataUsageId;
extern const uint32_t MD5SHA1_CreateSignature_m3583449066_MetadataUsageId;
extern const uint32_t MD5SHA1_HashFinal_m4115488658_MetadataUsageId;
extern const uint32_t MD5SHA1_VerifySignature_m915115209_MetadataUsageId;
extern const uint32_t ModulusRing_BarrettReduction_m3024442734_MetadataUsageId;
extern const uint32_t ModulusRing_Difference_m3686091506_MetadataUsageId;
extern const uint32_t ModulusRing_Multiply_m1975391470_MetadataUsageId;
extern const uint32_t ModulusRing_Pow_m1124248336_MetadataUsageId;
extern const uint32_t ModulusRing_Pow_m729002192_MetadataUsageId;
extern const uint32_t ModulusRing__ctor_m2420310199_MetadataUsageId;
extern const uint32_t PKCS1_Encode_v15_m2077073129_MetadataUsageId;
extern const uint32_t PKCS1_I2OSP_m2559784711_MetadataUsageId;
extern const uint32_t PKCS1_OS2IP_m1443067185_MetadataUsageId;
extern const uint32_t PKCS1_Sign_v15_m3459793192_MetadataUsageId;
extern const uint32_t PKCS1_Verify_v15_m400093581_MetadataUsageId;
extern const uint32_t PKCS1_Verify_v15_m4192025173_MetadataUsageId;
extern const uint32_t PKCS1__cctor_m2848504824_MetadataUsageId;
extern const uint32_t PrimalityTest_BeginInvoke_m742423211_MetadataUsageId;
extern const uint32_t PrimalityTests_GetSPPRounds_m2558073743_MetadataUsageId;
extern const uint32_t PrimalityTests_RabinMillerTest_m2544317101_MetadataUsageId;
extern const uint32_t PrimeGeneratorBase_get_PrimalityTest_m2487240563_MetadataUsageId;
extern const uint32_t PrivateKeyInfo_DecodeDSA_m2335813142_MetadataUsageId;
extern const uint32_t PrivateKeyInfo_DecodeRSA_m4129124827_MetadataUsageId;
extern const uint32_t PrivateKeyInfo_Decode_m986145117_MetadataUsageId;
extern const uint32_t PrivateKeyInfo_Normalize_m2274647848_MetadataUsageId;
extern const uint32_t PrivateKeyInfo_RemoveLeadingZero_m3592760008_MetadataUsageId;
extern const uint32_t PrivateKeyInfo__ctor_m3331475997_MetadataUsageId;
extern const uint32_t PrivateKeyInfo_get_PrivateKey_m3647771102_MetadataUsageId;
extern const uint32_t RC4__cctor_m362546962_MetadataUsageId;
extern const uint32_t RC4__ctor_m3531760091_MetadataUsageId;
extern const uint32_t RC4_get_IV_m2290186270_MetadataUsageId;
extern const uint32_t RSAManaged_DecryptValue_m1804388365_MetadataUsageId;
extern const uint32_t RSAManaged_Dispose_m2347279430_MetadataUsageId;
extern const uint32_t RSAManaged_EncryptValue_m4149543654_MetadataUsageId;
extern const uint32_t RSAManaged_ExportParameters_m1754454264_MetadataUsageId;
extern const uint32_t RSAManaged_GenerateKeyPair_m2364618953_MetadataUsageId;
extern const uint32_t RSAManaged_GetPaddedValue_m2182626630_MetadataUsageId;
extern const uint32_t RSAManaged_ImportParameters_m1117427048_MetadataUsageId;
extern const uint32_t RSAManaged_ToXmlString_m2369501989_MetadataUsageId;
extern const uint32_t RSAManaged__ctor_m350841446_MetadataUsageId;
extern const uint32_t RSAManaged_get_PublicOnly_m405847294_MetadataUsageId;
extern const uint32_t RSASslSignatureDeformatter_SetHashAlgorithm_m895570787_MetadataUsageId;
extern const uint32_t RSASslSignatureDeformatter_SetKey_m2204705853_MetadataUsageId;
extern const uint32_t RSASslSignatureDeformatter_VerifySignature_m1061897602_MetadataUsageId;
extern const uint32_t RSASslSignatureFormatter_CreateSignature_m2614788251_MetadataUsageId;
extern const uint32_t RSASslSignatureFormatter_SetHashAlgorithm_m3864232300_MetadataUsageId;
extern const uint32_t RSASslSignatureFormatter_SetKey_m979790541_MetadataUsageId;
extern const uint32_t ReceiveRecordAsyncResult__ctor_m277637112_MetadataUsageId;
extern const uint32_t ReceiveRecordAsyncResult_get_AsyncWaitHandle_m1781023438_MetadataUsageId;
extern const uint32_t RecordProtocol_BeginReceiveRecord_m295321170_MetadataUsageId;
extern const uint32_t RecordProtocol_BeginSendRecord_m3926976520_MetadataUsageId;
extern const uint32_t RecordProtocol_BeginSendRecord_m615249746_MetadataUsageId;
extern const uint32_t RecordProtocol_EncodeRecord_m3312835762_MetadataUsageId;
extern const uint32_t RecordProtocol_EndReceiveRecord_m1872541318_MetadataUsageId;
extern const uint32_t RecordProtocol_EndSendRecord_m4264777321_MetadataUsageId;
extern const uint32_t RecordProtocol_GetMessage_m2086135164_MetadataUsageId;
extern const uint32_t RecordProtocol_InternalReceiveRecordCallback_m1713318629_MetadataUsageId;
extern const uint32_t RecordProtocol_InternalSendRecordCallback_m682661965_MetadataUsageId;
extern const uint32_t RecordProtocol_MapV2CipherCode_m4087331414_MetadataUsageId;
extern const uint32_t RecordProtocol_ProcessAlert_m1036912531_MetadataUsageId;
extern const uint32_t RecordProtocol_ProcessChangeCipherSpec_m15839975_MetadataUsageId;
extern const uint32_t RecordProtocol_ProcessCipherSpecV2Buffer_m487045483_MetadataUsageId;
extern const uint32_t RecordProtocol_ReadClientHelloV2_m4052496367_MetadataUsageId;
extern const uint32_t RecordProtocol_ReadRecordBuffer_m180543381_MetadataUsageId;
extern const uint32_t RecordProtocol_ReadStandardRecordBuffer_m3738063864_MetadataUsageId;
extern const uint32_t RecordProtocol_SendAlert_m1931708341_MetadataUsageId;
extern const uint32_t RecordProtocol_SendAlert_m2670098001_MetadataUsageId;
extern const uint32_t RecordProtocol_SendAlert_m3736432480_MetadataUsageId;
extern const uint32_t RecordProtocol_SendChangeCipherSpec_m464005157_MetadataUsageId;
extern const uint32_t RecordProtocol__cctor_m1280873827_MetadataUsageId;
extern const uint32_t RecordProtocol_decryptRecordFragment_m66623237_MetadataUsageId;
extern const uint32_t RecordProtocol_encryptRecordFragment_m710101985_MetadataUsageId;
extern const uint32_t SendRecordAsyncResult__ctor_m425551707_MetadataUsageId;
extern const uint32_t SendRecordAsyncResult_get_AsyncWaitHandle_m1466641472_MetadataUsageId;
extern const uint32_t SequentialSearchPrimeGeneratorBase_GenerateNewPrime_m2891860459_MetadataUsageId;
extern const uint32_t SequentialSearchPrimeGeneratorBase_GenerateSearchBase_m1918143664_MetadataUsageId;
extern const uint32_t SslCipherSuite_ComputeClientRecordMAC_m3756410489_MetadataUsageId;
extern const uint32_t SslCipherSuite_ComputeKeys_m661027754_MetadataUsageId;
extern const uint32_t SslCipherSuite_ComputeMasterSecret_m3963626850_MetadataUsageId;
extern const uint32_t SslCipherSuite_ComputeServerRecordMAC_m1297079805_MetadataUsageId;
extern const uint32_t SslCipherSuite__ctor_m1470082018_MetadataUsageId;
extern const uint32_t SslCipherSuite_prf_m922878400_MetadataUsageId;
extern const uint32_t SslClientStream_OnBeginNegotiateHandshake_m3734240069_MetadataUsageId;
extern const uint32_t SslClientStream_OnNegotiateHandshakeCallback_m4211921295_MetadataUsageId;
extern const uint32_t SslClientStream_SafeReceiveRecord_m2217679740_MetadataUsageId;
extern const uint32_t SslClientStream__ctor_m3351906728_MetadataUsageId;
extern const uint32_t SslClientStream__ctor_m3478574780_MetadataUsageId;
extern const uint32_t SslClientStream__ctor_m4190306291_MetadataUsageId;
extern const uint32_t SslClientStream_add_ClientCertSelection_m1387948363_MetadataUsageId;
extern const uint32_t SslClientStream_add_PrivateKeySelection_m1663125063_MetadataUsageId;
extern const uint32_t SslClientStream_add_ServerCertValidation2_m3943665702_MetadataUsageId;
extern const uint32_t SslClientStream_add_ServerCertValidation_m2218216724_MetadataUsageId;
extern const uint32_t SslClientStream_remove_ClientCertSelection_m24681826_MetadataUsageId;
extern const uint32_t SslClientStream_remove_PrivateKeySelection_m3637735463_MetadataUsageId;
extern const uint32_t SslClientStream_remove_ServerCertValidation2_m4151895043_MetadataUsageId;
extern const uint32_t SslClientStream_remove_ServerCertValidation_m1143339871_MetadataUsageId;
extern const uint32_t TlsClientCertificateVerify_ProcessAsSsl3_m1125097704_MetadataUsageId;
extern const uint32_t TlsClientCertificateVerify_ProcessAsTls1_m1051495755_MetadataUsageId;
extern const uint32_t TlsClientCertificateVerify_getClientCertRSA_m1205662940_MetadataUsageId;
extern const uint32_t TlsClientCertificateVerify_getUnsignedBigInteger_m3003216819_MetadataUsageId;
extern const uint32_t TlsClientCertificate_FindParentCertificate_m3844441401_MetadataUsageId;
extern const uint32_t TlsClientCertificate_GetClientCertificate_m566867090_MetadataUsageId;
extern const uint32_t TlsClientCertificate_SendCertificates_m1965594186_MetadataUsageId;
extern const uint32_t TlsClientFinished_ProcessAsSsl3_m3094597606_MetadataUsageId;
extern const uint32_t TlsClientFinished_ProcessAsTls1_m2429863130_MetadataUsageId;
extern const uint32_t TlsClientFinished__cctor_m1023921005_MetadataUsageId;
extern const uint32_t TlsClientHello_ProcessAsTls1_m2549285167_MetadataUsageId;
extern const uint32_t TlsClientHello_Update_m3773127362_MetadataUsageId;
extern const uint32_t TlsClientKeyExchange_ProcessCommon_m2327374157_MetadataUsageId;
extern const uint32_t TlsServerCertificateRequest_ProcessAsTls1_m3214041063_MetadataUsageId;
extern const uint32_t TlsServerCertificate_Match_m2996121276_MetadataUsageId;
extern const uint32_t TlsServerCertificate_ProcessAsTls1_m819212276_MetadataUsageId;
extern const uint32_t TlsServerCertificate_checkCertificateUsage_m2152016773_MetadataUsageId;
extern const uint32_t TlsServerCertificate_checkDomainName_m2543190336_MetadataUsageId;
extern const uint32_t TlsServerCertificate_checkServerIdentity_m2801575130_MetadataUsageId;
extern const uint32_t TlsServerCertificate_validateCertificates_m4242999387_MetadataUsageId;
extern const uint32_t TlsServerFinished_ProcessAsSsl3_m2791932180_MetadataUsageId;
extern const uint32_t TlsServerFinished_ProcessAsTls1_m173877572_MetadataUsageId;
extern const uint32_t TlsServerFinished__cctor_m3102699406_MetadataUsageId;
extern const uint32_t TlsServerHello_ProcessAsTls1_m3844152353_MetadataUsageId;
extern const uint32_t TlsServerHello_Update_m3935081401_MetadataUsageId;
extern const uint32_t TlsServerHello_processProtocol_m3969427189_MetadataUsageId;
extern const uint32_t TlsServerKeyExchange_verifySignature_m3412856769_MetadataUsageId;
struct BigIntegerU5BU5D_t2349952477;
struct ClientCertificateTypeU5BU5D_t4253920197;
struct ByteU5BU5D_t4116647657;
struct ByteU5BU5DU5BU5D_t457913172;
struct Int32U5BU5D_t385246372;
struct ObjectU5BU5D_t2843939325;
struct KeySizesU5BU5D_t722666473;
struct X509CertificateU5BU5D_t3145106755;
struct StringU5BU5D_t1281789340;
struct UInt32U5BU5D_t2770800703;
#ifndef U3CMODULEU3E_T692745527_H
#define U3CMODULEU3E_T692745527_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// <Module>
struct U3CModuleU3E_t692745527
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // U3CMODULEU3E_T692745527_H
#ifndef RUNTIMEOBJECT_H
#define RUNTIMEOBJECT_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Object
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // RUNTIMEOBJECT_H
#ifndef LOCALE_T4128636109_H
#define LOCALE_T4128636109_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Locale
struct Locale_t4128636109 : public RuntimeObject
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // LOCALE_T4128636109_H
#ifndef BIGINTEGER_T2902905090_H
#define BIGINTEGER_T2902905090_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Math.BigInteger
struct BigInteger_t2902905090 : public RuntimeObject
{
public:
// System.UInt32 Mono.Math.BigInteger::length
uint32_t ___length_0;
// System.UInt32[] Mono.Math.BigInteger::data
UInt32U5BU5D_t2770800703* ___data_1;
public:
inline static int32_t get_offset_of_length_0() { return static_cast<int32_t>(offsetof(BigInteger_t2902905090, ___length_0)); }
inline uint32_t get_length_0() const { return ___length_0; }
inline uint32_t* get_address_of_length_0() { return &___length_0; }
inline void set_length_0(uint32_t value)
{
___length_0 = value;
}
inline static int32_t get_offset_of_data_1() { return static_cast<int32_t>(offsetof(BigInteger_t2902905090, ___data_1)); }
inline UInt32U5BU5D_t2770800703* get_data_1() const { return ___data_1; }
inline UInt32U5BU5D_t2770800703** get_address_of_data_1() { return &___data_1; }
inline void set_data_1(UInt32U5BU5D_t2770800703* value)
{
___data_1 = value;
Il2CppCodeGenWriteBarrier((&___data_1), value);
}
};
struct BigInteger_t2902905090_StaticFields
{
public:
// System.UInt32[] Mono.Math.BigInteger::smallPrimes
UInt32U5BU5D_t2770800703* ___smallPrimes_2;
// System.Security.Cryptography.RandomNumberGenerator Mono.Math.BigInteger::rng
RandomNumberGenerator_t386037858 * ___rng_3;
public:
inline static int32_t get_offset_of_smallPrimes_2() { return static_cast<int32_t>(offsetof(BigInteger_t2902905090_StaticFields, ___smallPrimes_2)); }
inline UInt32U5BU5D_t2770800703* get_smallPrimes_2() const { return ___smallPrimes_2; }
inline UInt32U5BU5D_t2770800703** get_address_of_smallPrimes_2() { return &___smallPrimes_2; }
inline void set_smallPrimes_2(UInt32U5BU5D_t2770800703* value)
{
___smallPrimes_2 = value;
Il2CppCodeGenWriteBarrier((&___smallPrimes_2), value);
}
inline static int32_t get_offset_of_rng_3() { return static_cast<int32_t>(offsetof(BigInteger_t2902905090_StaticFields, ___rng_3)); }
inline RandomNumberGenerator_t386037858 * get_rng_3() const { return ___rng_3; }
inline RandomNumberGenerator_t386037858 ** get_address_of_rng_3() { return &___rng_3; }
inline void set_rng_3(RandomNumberGenerator_t386037858 * value)
{
___rng_3 = value;
Il2CppCodeGenWriteBarrier((&___rng_3), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // BIGINTEGER_T2902905090_H
#ifndef KERNEL_T1402667220_H
#define KERNEL_T1402667220_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Math.BigInteger/Kernel
struct Kernel_t1402667220 : public RuntimeObject
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // KERNEL_T1402667220_H
#ifndef MODULUSRING_T596511505_H
#define MODULUSRING_T596511505_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Math.BigInteger/ModulusRing
struct ModulusRing_t596511505 : public RuntimeObject
{
public:
// Mono.Math.BigInteger Mono.Math.BigInteger/ModulusRing::mod
BigInteger_t2902905090 * ___mod_0;
// Mono.Math.BigInteger Mono.Math.BigInteger/ModulusRing::constant
BigInteger_t2902905090 * ___constant_1;
public:
inline static int32_t get_offset_of_mod_0() { return static_cast<int32_t>(offsetof(ModulusRing_t596511505, ___mod_0)); }
inline BigInteger_t2902905090 * get_mod_0() const { return ___mod_0; }
inline BigInteger_t2902905090 ** get_address_of_mod_0() { return &___mod_0; }
inline void set_mod_0(BigInteger_t2902905090 * value)
{
___mod_0 = value;
Il2CppCodeGenWriteBarrier((&___mod_0), value);
}
inline static int32_t get_offset_of_constant_1() { return static_cast<int32_t>(offsetof(ModulusRing_t596511505, ___constant_1)); }
inline BigInteger_t2902905090 * get_constant_1() const { return ___constant_1; }
inline BigInteger_t2902905090 ** get_address_of_constant_1() { return &___constant_1; }
inline void set_constant_1(BigInteger_t2902905090 * value)
{
___constant_1 = value;
Il2CppCodeGenWriteBarrier((&___constant_1), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // MODULUSRING_T596511505_H
#ifndef PRIMEGENERATORBASE_T446028867_H
#define PRIMEGENERATORBASE_T446028867_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Math.Prime.Generator.PrimeGeneratorBase
struct PrimeGeneratorBase_t446028867 : public RuntimeObject
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // PRIMEGENERATORBASE_T446028867_H
#ifndef PRIMALITYTESTS_T1538473976_H
#define PRIMALITYTESTS_T1538473976_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Math.Prime.PrimalityTests
struct PrimalityTests_t1538473976 : public RuntimeObject
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // PRIMALITYTESTS_T1538473976_H
#ifndef ASN1_T2114160833_H
#define ASN1_T2114160833_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.ASN1
struct ASN1_t2114160833 : public RuntimeObject
{
public:
// System.Byte Mono.Security.ASN1::m_nTag
uint8_t ___m_nTag_0;
// System.Byte[] Mono.Security.ASN1::m_aValue
ByteU5BU5D_t4116647657* ___m_aValue_1;
// System.Collections.ArrayList Mono.Security.ASN1::elist
ArrayList_t2718874744 * ___elist_2;
public:
inline static int32_t get_offset_of_m_nTag_0() { return static_cast<int32_t>(offsetof(ASN1_t2114160833, ___m_nTag_0)); }
inline uint8_t get_m_nTag_0() const { return ___m_nTag_0; }
inline uint8_t* get_address_of_m_nTag_0() { return &___m_nTag_0; }
inline void set_m_nTag_0(uint8_t value)
{
___m_nTag_0 = value;
}
inline static int32_t get_offset_of_m_aValue_1() { return static_cast<int32_t>(offsetof(ASN1_t2114160833, ___m_aValue_1)); }
inline ByteU5BU5D_t4116647657* get_m_aValue_1() const { return ___m_aValue_1; }
inline ByteU5BU5D_t4116647657** get_address_of_m_aValue_1() { return &___m_aValue_1; }
inline void set_m_aValue_1(ByteU5BU5D_t4116647657* value)
{
___m_aValue_1 = value;
Il2CppCodeGenWriteBarrier((&___m_aValue_1), value);
}
inline static int32_t get_offset_of_elist_2() { return static_cast<int32_t>(offsetof(ASN1_t2114160833, ___elist_2)); }
inline ArrayList_t2718874744 * get_elist_2() const { return ___elist_2; }
inline ArrayList_t2718874744 ** get_address_of_elist_2() { return &___elist_2; }
inline void set_elist_2(ArrayList_t2718874744 * value)
{
___elist_2 = value;
Il2CppCodeGenWriteBarrier((&___elist_2), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // ASN1_T2114160833_H
#ifndef ASN1CONVERT_T2839890153_H
#define ASN1CONVERT_T2839890153_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.ASN1Convert
struct ASN1Convert_t2839890153 : public RuntimeObject
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // ASN1CONVERT_T2839890153_H
#ifndef BITCONVERTERLE_T2108532979_H
#define BITCONVERTERLE_T2108532979_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.BitConverterLE
struct BitConverterLE_t2108532979 : public RuntimeObject
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // BITCONVERTERLE_T2108532979_H
#ifndef CRYPTOCONVERT_T610933157_H
#define CRYPTOCONVERT_T610933157_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Cryptography.CryptoConvert
struct CryptoConvert_t610933157 : public RuntimeObject
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // CRYPTOCONVERT_T610933157_H
#ifndef KEYBUILDER_T2049230355_H
#define KEYBUILDER_T2049230355_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Cryptography.KeyBuilder
struct KeyBuilder_t2049230355 : public RuntimeObject
{
public:
public:
};
struct KeyBuilder_t2049230355_StaticFields
{
public:
// System.Security.Cryptography.RandomNumberGenerator Mono.Security.Cryptography.KeyBuilder::rng
RandomNumberGenerator_t386037858 * ___rng_0;
public:
inline static int32_t get_offset_of_rng_0() { return static_cast<int32_t>(offsetof(KeyBuilder_t2049230355_StaticFields, ___rng_0)); }
inline RandomNumberGenerator_t386037858 * get_rng_0() const { return ___rng_0; }
inline RandomNumberGenerator_t386037858 ** get_address_of_rng_0() { return &___rng_0; }
inline void set_rng_0(RandomNumberGenerator_t386037858 * value)
{
___rng_0 = value;
Il2CppCodeGenWriteBarrier((&___rng_0), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // KEYBUILDER_T2049230355_H
#ifndef PKCS1_T1505584677_H
#define PKCS1_T1505584677_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Cryptography.PKCS1
struct PKCS1_t1505584677 : public RuntimeObject
{
public:
public:
};
struct PKCS1_t1505584677_StaticFields
{
public:
// System.Byte[] Mono.Security.Cryptography.PKCS1::emptySHA1
ByteU5BU5D_t4116647657* ___emptySHA1_0;
// System.Byte[] Mono.Security.Cryptography.PKCS1::emptySHA256
ByteU5BU5D_t4116647657* ___emptySHA256_1;
// System.Byte[] Mono.Security.Cryptography.PKCS1::emptySHA384
ByteU5BU5D_t4116647657* ___emptySHA384_2;
// System.Byte[] Mono.Security.Cryptography.PKCS1::emptySHA512
ByteU5BU5D_t4116647657* ___emptySHA512_3;
public:
inline static int32_t get_offset_of_emptySHA1_0() { return static_cast<int32_t>(offsetof(PKCS1_t1505584677_StaticFields, ___emptySHA1_0)); }
inline ByteU5BU5D_t4116647657* get_emptySHA1_0() const { return ___emptySHA1_0; }
inline ByteU5BU5D_t4116647657** get_address_of_emptySHA1_0() { return &___emptySHA1_0; }
inline void set_emptySHA1_0(ByteU5BU5D_t4116647657* value)
{
___emptySHA1_0 = value;
Il2CppCodeGenWriteBarrier((&___emptySHA1_0), value);
}
inline static int32_t get_offset_of_emptySHA256_1() { return static_cast<int32_t>(offsetof(PKCS1_t1505584677_StaticFields, ___emptySHA256_1)); }
inline ByteU5BU5D_t4116647657* get_emptySHA256_1() const { return ___emptySHA256_1; }
inline ByteU5BU5D_t4116647657** get_address_of_emptySHA256_1() { return &___emptySHA256_1; }
inline void set_emptySHA256_1(ByteU5BU5D_t4116647657* value)
{
___emptySHA256_1 = value;
Il2CppCodeGenWriteBarrier((&___emptySHA256_1), value);
}
inline static int32_t get_offset_of_emptySHA384_2() { return static_cast<int32_t>(offsetof(PKCS1_t1505584677_StaticFields, ___emptySHA384_2)); }
inline ByteU5BU5D_t4116647657* get_emptySHA384_2() const { return ___emptySHA384_2; }
inline ByteU5BU5D_t4116647657** get_address_of_emptySHA384_2() { return &___emptySHA384_2; }
inline void set_emptySHA384_2(ByteU5BU5D_t4116647657* value)
{
___emptySHA384_2 = value;
Il2CppCodeGenWriteBarrier((&___emptySHA384_2), value);
}
inline static int32_t get_offset_of_emptySHA512_3() { return static_cast<int32_t>(offsetof(PKCS1_t1505584677_StaticFields, ___emptySHA512_3)); }
inline ByteU5BU5D_t4116647657* get_emptySHA512_3() const { return ___emptySHA512_3; }
inline ByteU5BU5D_t4116647657** get_address_of_emptySHA512_3() { return &___emptySHA512_3; }
inline void set_emptySHA512_3(ByteU5BU5D_t4116647657* value)
{
___emptySHA512_3 = value;
Il2CppCodeGenWriteBarrier((&___emptySHA512_3), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // PKCS1_T1505584677_H
#ifndef PKCS8_T696280613_H
#define PKCS8_T696280613_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Cryptography.PKCS8
struct PKCS8_t696280613 : public RuntimeObject
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // PKCS8_T696280613_H
#ifndef ENCRYPTEDPRIVATEKEYINFO_T862116836_H
#define ENCRYPTEDPRIVATEKEYINFO_T862116836_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Cryptography.PKCS8/EncryptedPrivateKeyInfo
struct EncryptedPrivateKeyInfo_t862116836 : public RuntimeObject
{
public:
// System.String Mono.Security.Cryptography.PKCS8/EncryptedPrivateKeyInfo::_algorithm
String_t* ____algorithm_0;
// System.Byte[] Mono.Security.Cryptography.PKCS8/EncryptedPrivateKeyInfo::_salt
ByteU5BU5D_t4116647657* ____salt_1;
// System.Int32 Mono.Security.Cryptography.PKCS8/EncryptedPrivateKeyInfo::_iterations
int32_t ____iterations_2;
// System.Byte[] Mono.Security.Cryptography.PKCS8/EncryptedPrivateKeyInfo::_data
ByteU5BU5D_t4116647657* ____data_3;
public:
inline static int32_t get_offset_of__algorithm_0() { return static_cast<int32_t>(offsetof(EncryptedPrivateKeyInfo_t862116836, ____algorithm_0)); }
inline String_t* get__algorithm_0() const { return ____algorithm_0; }
inline String_t** get_address_of__algorithm_0() { return &____algorithm_0; }
inline void set__algorithm_0(String_t* value)
{
____algorithm_0 = value;
Il2CppCodeGenWriteBarrier((&____algorithm_0), value);
}
inline static int32_t get_offset_of__salt_1() { return static_cast<int32_t>(offsetof(EncryptedPrivateKeyInfo_t862116836, ____salt_1)); }
inline ByteU5BU5D_t4116647657* get__salt_1() const { return ____salt_1; }
inline ByteU5BU5D_t4116647657** get_address_of__salt_1() { return &____salt_1; }
inline void set__salt_1(ByteU5BU5D_t4116647657* value)
{
____salt_1 = value;
Il2CppCodeGenWriteBarrier((&____salt_1), value);
}
inline static int32_t get_offset_of__iterations_2() { return static_cast<int32_t>(offsetof(EncryptedPrivateKeyInfo_t862116836, ____iterations_2)); }
inline int32_t get__iterations_2() const { return ____iterations_2; }
inline int32_t* get_address_of__iterations_2() { return &____iterations_2; }
inline void set__iterations_2(int32_t value)
{
____iterations_2 = value;
}
inline static int32_t get_offset_of__data_3() { return static_cast<int32_t>(offsetof(EncryptedPrivateKeyInfo_t862116836, ____data_3)); }
inline ByteU5BU5D_t4116647657* get__data_3() const { return ____data_3; }
inline ByteU5BU5D_t4116647657** get_address_of__data_3() { return &____data_3; }
inline void set__data_3(ByteU5BU5D_t4116647657* value)
{
____data_3 = value;
Il2CppCodeGenWriteBarrier((&____data_3), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // ENCRYPTEDPRIVATEKEYINFO_T862116836_H
#ifndef PRIVATEKEYINFO_T668027993_H
#define PRIVATEKEYINFO_T668027993_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Cryptography.PKCS8/PrivateKeyInfo
struct PrivateKeyInfo_t668027993 : public RuntimeObject
{
public:
// System.Int32 Mono.Security.Cryptography.PKCS8/PrivateKeyInfo::_version
int32_t ____version_0;
// System.String Mono.Security.Cryptography.PKCS8/PrivateKeyInfo::_algorithm
String_t* ____algorithm_1;
// System.Byte[] Mono.Security.Cryptography.PKCS8/PrivateKeyInfo::_key
ByteU5BU5D_t4116647657* ____key_2;
// System.Collections.ArrayList Mono.Security.Cryptography.PKCS8/PrivateKeyInfo::_list
ArrayList_t2718874744 * ____list_3;
public:
inline static int32_t get_offset_of__version_0() { return static_cast<int32_t>(offsetof(PrivateKeyInfo_t668027993, ____version_0)); }
inline int32_t get__version_0() const { return ____version_0; }
inline int32_t* get_address_of__version_0() { return &____version_0; }
inline void set__version_0(int32_t value)
{
____version_0 = value;
}
inline static int32_t get_offset_of__algorithm_1() { return static_cast<int32_t>(offsetof(PrivateKeyInfo_t668027993, ____algorithm_1)); }
inline String_t* get__algorithm_1() const { return ____algorithm_1; }
inline String_t** get_address_of__algorithm_1() { return &____algorithm_1; }
inline void set__algorithm_1(String_t* value)
{
____algorithm_1 = value;
Il2CppCodeGenWriteBarrier((&____algorithm_1), value);
}
inline static int32_t get_offset_of__key_2() { return static_cast<int32_t>(offsetof(PrivateKeyInfo_t668027993, ____key_2)); }
inline ByteU5BU5D_t4116647657* get__key_2() const { return ____key_2; }
inline ByteU5BU5D_t4116647657** get_address_of__key_2() { return &____key_2; }
inline void set__key_2(ByteU5BU5D_t4116647657* value)
{
____key_2 = value;
Il2CppCodeGenWriteBarrier((&____key_2), value);
}
inline static int32_t get_offset_of__list_3() { return static_cast<int32_t>(offsetof(PrivateKeyInfo_t668027993, ____list_3)); }
inline ArrayList_t2718874744 * get__list_3() const { return ____list_3; }
inline ArrayList_t2718874744 ** get_address_of__list_3() { return &____list_3; }
inline void set__list_3(ArrayList_t2718874744 * value)
{
____list_3 = value;
Il2CppCodeGenWriteBarrier((&____list_3), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // PRIVATEKEYINFO_T668027993_H
#ifndef PKCS7_T1860834339_H
#define PKCS7_T1860834339_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.PKCS7
struct PKCS7_t1860834339 : public RuntimeObject
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // PKCS7_T1860834339_H
#ifndef CONTENTINFO_T3218159896_H
#define CONTENTINFO_T3218159896_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.PKCS7/ContentInfo
struct ContentInfo_t3218159896 : public RuntimeObject
{
public:
// System.String Mono.Security.PKCS7/ContentInfo::contentType
String_t* ___contentType_0;
// Mono.Security.ASN1 Mono.Security.PKCS7/ContentInfo::content
ASN1_t2114160833 * ___content_1;
public:
inline static int32_t get_offset_of_contentType_0() { return static_cast<int32_t>(offsetof(ContentInfo_t3218159896, ___contentType_0)); }
inline String_t* get_contentType_0() const { return ___contentType_0; }
inline String_t** get_address_of_contentType_0() { return &___contentType_0; }
inline void set_contentType_0(String_t* value)
{
___contentType_0 = value;
Il2CppCodeGenWriteBarrier((&___contentType_0), value);
}
inline static int32_t get_offset_of_content_1() { return static_cast<int32_t>(offsetof(ContentInfo_t3218159896, ___content_1)); }
inline ASN1_t2114160833 * get_content_1() const { return ___content_1; }
inline ASN1_t2114160833 ** get_address_of_content_1() { return &___content_1; }
inline void set_content_1(ASN1_t2114160833 * value)
{
___content_1 = value;
Il2CppCodeGenWriteBarrier((&___content_1), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // CONTENTINFO_T3218159896_H
#ifndef ENCRYPTEDDATA_T3577548733_H
#define ENCRYPTEDDATA_T3577548733_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.PKCS7/EncryptedData
struct EncryptedData_t3577548733 : public RuntimeObject
{
public:
// System.Byte Mono.Security.PKCS7/EncryptedData::_version
uint8_t ____version_0;
// Mono.Security.PKCS7/ContentInfo Mono.Security.PKCS7/EncryptedData::_content
ContentInfo_t3218159896 * ____content_1;
// Mono.Security.PKCS7/ContentInfo Mono.Security.PKCS7/EncryptedData::_encryptionAlgorithm
ContentInfo_t3218159896 * ____encryptionAlgorithm_2;
// System.Byte[] Mono.Security.PKCS7/EncryptedData::_encrypted
ByteU5BU5D_t4116647657* ____encrypted_3;
public:
inline static int32_t get_offset_of__version_0() { return static_cast<int32_t>(offsetof(EncryptedData_t3577548733, ____version_0)); }
inline uint8_t get__version_0() const { return ____version_0; }
inline uint8_t* get_address_of__version_0() { return &____version_0; }
inline void set__version_0(uint8_t value)
{
____version_0 = value;
}
inline static int32_t get_offset_of__content_1() { return static_cast<int32_t>(offsetof(EncryptedData_t3577548733, ____content_1)); }
inline ContentInfo_t3218159896 * get__content_1() const { return ____content_1; }
inline ContentInfo_t3218159896 ** get_address_of__content_1() { return &____content_1; }
inline void set__content_1(ContentInfo_t3218159896 * value)
{
____content_1 = value;
Il2CppCodeGenWriteBarrier((&____content_1), value);
}
inline static int32_t get_offset_of__encryptionAlgorithm_2() { return static_cast<int32_t>(offsetof(EncryptedData_t3577548733, ____encryptionAlgorithm_2)); }
inline ContentInfo_t3218159896 * get__encryptionAlgorithm_2() const { return ____encryptionAlgorithm_2; }
inline ContentInfo_t3218159896 ** get_address_of__encryptionAlgorithm_2() { return &____encryptionAlgorithm_2; }
inline void set__encryptionAlgorithm_2(ContentInfo_t3218159896 * value)
{
____encryptionAlgorithm_2 = value;
Il2CppCodeGenWriteBarrier((&____encryptionAlgorithm_2), value);
}
inline static int32_t get_offset_of__encrypted_3() { return static_cast<int32_t>(offsetof(EncryptedData_t3577548733, ____encrypted_3)); }
inline ByteU5BU5D_t4116647657* get__encrypted_3() const { return ____encrypted_3; }
inline ByteU5BU5D_t4116647657** get_address_of__encrypted_3() { return &____encrypted_3; }
inline void set__encrypted_3(ByteU5BU5D_t4116647657* value)
{
____encrypted_3 = value;
Il2CppCodeGenWriteBarrier((&____encrypted_3), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // ENCRYPTEDDATA_T3577548733_H
#ifndef CIPHERSUITEFACTORY_T3316559455_H
#define CIPHERSUITEFACTORY_T3316559455_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Protocol.Tls.CipherSuiteFactory
struct CipherSuiteFactory_t3316559455 : public RuntimeObject
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // CIPHERSUITEFACTORY_T3316559455_H
#ifndef CLIENTSESSIONCACHE_T2353595803_H
#define CLIENTSESSIONCACHE_T2353595803_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Protocol.Tls.ClientSessionCache
struct ClientSessionCache_t2353595803 : public RuntimeObject
{
public:
public:
};
struct ClientSessionCache_t2353595803_StaticFields
{
public:
// System.Collections.Hashtable Mono.Security.Protocol.Tls.ClientSessionCache::cache
Hashtable_t1853889766 * ___cache_0;
// System.Object Mono.Security.Protocol.Tls.ClientSessionCache::locker
RuntimeObject * ___locker_1;
public:
inline static int32_t get_offset_of_cache_0() { return static_cast<int32_t>(offsetof(ClientSessionCache_t2353595803_StaticFields, ___cache_0)); }
inline Hashtable_t1853889766 * get_cache_0() const { return ___cache_0; }
inline Hashtable_t1853889766 ** get_address_of_cache_0() { return &___cache_0; }
inline void set_cache_0(Hashtable_t1853889766 * value)
{
___cache_0 = value;
Il2CppCodeGenWriteBarrier((&___cache_0), value);
}
inline static int32_t get_offset_of_locker_1() { return static_cast<int32_t>(offsetof(ClientSessionCache_t2353595803_StaticFields, ___locker_1)); }
inline RuntimeObject * get_locker_1() const { return ___locker_1; }
inline RuntimeObject ** get_address_of_locker_1() { return &___locker_1; }
inline void set_locker_1(RuntimeObject * value)
{
___locker_1 = value;
Il2CppCodeGenWriteBarrier((&___locker_1), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // CLIENTSESSIONCACHE_T2353595803_H
#ifndef RECORDPROTOCOL_T3759049701_H
#define RECORDPROTOCOL_T3759049701_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Protocol.Tls.RecordProtocol
struct RecordProtocol_t3759049701 : public RuntimeObject
{
public:
// System.IO.Stream Mono.Security.Protocol.Tls.RecordProtocol::innerStream
Stream_t1273022909 * ___innerStream_1;
// Mono.Security.Protocol.Tls.Context Mono.Security.Protocol.Tls.RecordProtocol::context
Context_t3971234707 * ___context_2;
public:
inline static int32_t get_offset_of_innerStream_1() { return static_cast<int32_t>(offsetof(RecordProtocol_t3759049701, ___innerStream_1)); }
inline Stream_t1273022909 * get_innerStream_1() const { return ___innerStream_1; }
inline Stream_t1273022909 ** get_address_of_innerStream_1() { return &___innerStream_1; }
inline void set_innerStream_1(Stream_t1273022909 * value)
{
___innerStream_1 = value;
Il2CppCodeGenWriteBarrier((&___innerStream_1), value);
}
inline static int32_t get_offset_of_context_2() { return static_cast<int32_t>(offsetof(RecordProtocol_t3759049701, ___context_2)); }
inline Context_t3971234707 * get_context_2() const { return ___context_2; }
inline Context_t3971234707 ** get_address_of_context_2() { return &___context_2; }
inline void set_context_2(Context_t3971234707 * value)
{
___context_2 = value;
Il2CppCodeGenWriteBarrier((&___context_2), value);
}
};
struct RecordProtocol_t3759049701_StaticFields
{
public:
// System.Threading.ManualResetEvent Mono.Security.Protocol.Tls.RecordProtocol::record_processing
ManualResetEvent_t451242010 * ___record_processing_0;
public:
inline static int32_t get_offset_of_record_processing_0() { return static_cast<int32_t>(offsetof(RecordProtocol_t3759049701_StaticFields, ___record_processing_0)); }
inline ManualResetEvent_t451242010 * get_record_processing_0() const { return ___record_processing_0; }
inline ManualResetEvent_t451242010 ** get_address_of_record_processing_0() { return &___record_processing_0; }
inline void set_record_processing_0(ManualResetEvent_t451242010 * value)
{
___record_processing_0 = value;
Il2CppCodeGenWriteBarrier((&___record_processing_0), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // RECORDPROTOCOL_T3759049701_H
#ifndef RECEIVERECORDASYNCRESULT_T3680907657_H
#define RECEIVERECORDASYNCRESULT_T3680907657_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Protocol.Tls.RecordProtocol/ReceiveRecordAsyncResult
struct ReceiveRecordAsyncResult_t3680907657 : public RuntimeObject
{
public:
// System.Object Mono.Security.Protocol.Tls.RecordProtocol/ReceiveRecordAsyncResult::locker
RuntimeObject * ___locker_0;
// System.AsyncCallback Mono.Security.Protocol.Tls.RecordProtocol/ReceiveRecordAsyncResult::_userCallback
AsyncCallback_t3962456242 * ____userCallback_1;
// System.Object Mono.Security.Protocol.Tls.RecordProtocol/ReceiveRecordAsyncResult::_userState
RuntimeObject * ____userState_2;
// System.Exception Mono.Security.Protocol.Tls.RecordProtocol/ReceiveRecordAsyncResult::_asyncException
Exception_t * ____asyncException_3;
// System.Threading.ManualResetEvent Mono.Security.Protocol.Tls.RecordProtocol/ReceiveRecordAsyncResult::handle
ManualResetEvent_t451242010 * ___handle_4;
// System.Byte[] Mono.Security.Protocol.Tls.RecordProtocol/ReceiveRecordAsyncResult::_resultingBuffer
ByteU5BU5D_t4116647657* ____resultingBuffer_5;
// System.IO.Stream Mono.Security.Protocol.Tls.RecordProtocol/ReceiveRecordAsyncResult::_record
Stream_t1273022909 * ____record_6;
// System.Boolean Mono.Security.Protocol.Tls.RecordProtocol/ReceiveRecordAsyncResult::completed
bool ___completed_7;
// System.Byte[] Mono.Security.Protocol.Tls.RecordProtocol/ReceiveRecordAsyncResult::_initialBuffer
ByteU5BU5D_t4116647657* ____initialBuffer_8;
public:
inline static int32_t get_offset_of_locker_0() { return static_cast<int32_t>(offsetof(ReceiveRecordAsyncResult_t3680907657, ___locker_0)); }
inline RuntimeObject * get_locker_0() const { return ___locker_0; }
inline RuntimeObject ** get_address_of_locker_0() { return &___locker_0; }
inline void set_locker_0(RuntimeObject * value)
{
___locker_0 = value;
Il2CppCodeGenWriteBarrier((&___locker_0), value);
}
inline static int32_t get_offset_of__userCallback_1() { return static_cast<int32_t>(offsetof(ReceiveRecordAsyncResult_t3680907657, ____userCallback_1)); }
inline AsyncCallback_t3962456242 * get__userCallback_1() const { return ____userCallback_1; }
inline AsyncCallback_t3962456242 ** get_address_of__userCallback_1() { return &____userCallback_1; }
inline void set__userCallback_1(AsyncCallback_t3962456242 * value)
{
____userCallback_1 = value;
Il2CppCodeGenWriteBarrier((&____userCallback_1), value);
}
inline static int32_t get_offset_of__userState_2() { return static_cast<int32_t>(offsetof(ReceiveRecordAsyncResult_t3680907657, ____userState_2)); }
inline RuntimeObject * get__userState_2() const { return ____userState_2; }
inline RuntimeObject ** get_address_of__userState_2() { return &____userState_2; }
inline void set__userState_2(RuntimeObject * value)
{
____userState_2 = value;
Il2CppCodeGenWriteBarrier((&____userState_2), value);
}
inline static int32_t get_offset_of__asyncException_3() { return static_cast<int32_t>(offsetof(ReceiveRecordAsyncResult_t3680907657, ____asyncException_3)); }
inline Exception_t * get__asyncException_3() const { return ____asyncException_3; }
inline Exception_t ** get_address_of__asyncException_3() { return &____asyncException_3; }
inline void set__asyncException_3(Exception_t * value)
{
____asyncException_3 = value;
Il2CppCodeGenWriteBarrier((&____asyncException_3), value);
}
inline static int32_t get_offset_of_handle_4() { return static_cast<int32_t>(offsetof(ReceiveRecordAsyncResult_t3680907657, ___handle_4)); }
inline ManualResetEvent_t451242010 * get_handle_4() const { return ___handle_4; }
inline ManualResetEvent_t451242010 ** get_address_of_handle_4() { return &___handle_4; }
inline void set_handle_4(ManualResetEvent_t451242010 * value)
{
___handle_4 = value;
Il2CppCodeGenWriteBarrier((&___handle_4), value);
}
inline static int32_t get_offset_of__resultingBuffer_5() { return static_cast<int32_t>(offsetof(ReceiveRecordAsyncResult_t3680907657, ____resultingBuffer_5)); }
inline ByteU5BU5D_t4116647657* get__resultingBuffer_5() const { return ____resultingBuffer_5; }
inline ByteU5BU5D_t4116647657** get_address_of__resultingBuffer_5() { return &____resultingBuffer_5; }
inline void set__resultingBuffer_5(ByteU5BU5D_t4116647657* value)
{
____resultingBuffer_5 = value;
Il2CppCodeGenWriteBarrier((&____resultingBuffer_5), value);
}
inline static int32_t get_offset_of__record_6() { return static_cast<int32_t>(offsetof(ReceiveRecordAsyncResult_t3680907657, ____record_6)); }
inline Stream_t1273022909 * get__record_6() const { return ____record_6; }
inline Stream_t1273022909 ** get_address_of__record_6() { return &____record_6; }
inline void set__record_6(Stream_t1273022909 * value)
{
____record_6 = value;
Il2CppCodeGenWriteBarrier((&____record_6), value);
}
inline static int32_t get_offset_of_completed_7() { return static_cast<int32_t>(offsetof(ReceiveRecordAsyncResult_t3680907657, ___completed_7)); }
inline bool get_completed_7() const { return ___completed_7; }
inline bool* get_address_of_completed_7() { return &___completed_7; }
inline void set_completed_7(bool value)
{
___completed_7 = value;
}
inline static int32_t get_offset_of__initialBuffer_8() { return static_cast<int32_t>(offsetof(ReceiveRecordAsyncResult_t3680907657, ____initialBuffer_8)); }
inline ByteU5BU5D_t4116647657* get__initialBuffer_8() const { return ____initialBuffer_8; }
inline ByteU5BU5D_t4116647657** get_address_of__initialBuffer_8() { return &____initialBuffer_8; }
inline void set__initialBuffer_8(ByteU5BU5D_t4116647657* value)
{
____initialBuffer_8 = value;
Il2CppCodeGenWriteBarrier((&____initialBuffer_8), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // RECEIVERECORDASYNCRESULT_T3680907657_H
#ifndef SENDRECORDASYNCRESULT_T3718352467_H
#define SENDRECORDASYNCRESULT_T3718352467_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Protocol.Tls.RecordProtocol/SendRecordAsyncResult
struct SendRecordAsyncResult_t3718352467 : public RuntimeObject
{
public:
// System.Object Mono.Security.Protocol.Tls.RecordProtocol/SendRecordAsyncResult::locker
RuntimeObject * ___locker_0;
// System.AsyncCallback Mono.Security.Protocol.Tls.RecordProtocol/SendRecordAsyncResult::_userCallback
AsyncCallback_t3962456242 * ____userCallback_1;
// System.Object Mono.Security.Protocol.Tls.RecordProtocol/SendRecordAsyncResult::_userState
RuntimeObject * ____userState_2;
// System.Exception Mono.Security.Protocol.Tls.RecordProtocol/SendRecordAsyncResult::_asyncException
Exception_t * ____asyncException_3;
// System.Threading.ManualResetEvent Mono.Security.Protocol.Tls.RecordProtocol/SendRecordAsyncResult::handle
ManualResetEvent_t451242010 * ___handle_4;
// Mono.Security.Protocol.Tls.Handshake.HandshakeMessage Mono.Security.Protocol.Tls.RecordProtocol/SendRecordAsyncResult::_message
HandshakeMessage_t3696583168 * ____message_5;
// System.Boolean Mono.Security.Protocol.Tls.RecordProtocol/SendRecordAsyncResult::completed
bool ___completed_6;
public:
inline static int32_t get_offset_of_locker_0() { return static_cast<int32_t>(offsetof(SendRecordAsyncResult_t3718352467, ___locker_0)); }
inline RuntimeObject * get_locker_0() const { return ___locker_0; }
inline RuntimeObject ** get_address_of_locker_0() { return &___locker_0; }
inline void set_locker_0(RuntimeObject * value)
{
___locker_0 = value;
Il2CppCodeGenWriteBarrier((&___locker_0), value);
}
inline static int32_t get_offset_of__userCallback_1() { return static_cast<int32_t>(offsetof(SendRecordAsyncResult_t3718352467, ____userCallback_1)); }
inline AsyncCallback_t3962456242 * get__userCallback_1() const { return ____userCallback_1; }
inline AsyncCallback_t3962456242 ** get_address_of__userCallback_1() { return &____userCallback_1; }
inline void set__userCallback_1(AsyncCallback_t3962456242 * value)
{
____userCallback_1 = value;
Il2CppCodeGenWriteBarrier((&____userCallback_1), value);
}
inline static int32_t get_offset_of__userState_2() { return static_cast<int32_t>(offsetof(SendRecordAsyncResult_t3718352467, ____userState_2)); }
inline RuntimeObject * get__userState_2() const { return ____userState_2; }
inline RuntimeObject ** get_address_of__userState_2() { return &____userState_2; }
inline void set__userState_2(RuntimeObject * value)
{
____userState_2 = value;
Il2CppCodeGenWriteBarrier((&____userState_2), value);
}
inline static int32_t get_offset_of__asyncException_3() { return static_cast<int32_t>(offsetof(SendRecordAsyncResult_t3718352467, ____asyncException_3)); }
inline Exception_t * get__asyncException_3() const { return ____asyncException_3; }
inline Exception_t ** get_address_of__asyncException_3() { return &____asyncException_3; }
inline void set__asyncException_3(Exception_t * value)
{
____asyncException_3 = value;
Il2CppCodeGenWriteBarrier((&____asyncException_3), value);
}
inline static int32_t get_offset_of_handle_4() { return static_cast<int32_t>(offsetof(SendRecordAsyncResult_t3718352467, ___handle_4)); }
inline ManualResetEvent_t451242010 * get_handle_4() const { return ___handle_4; }
inline ManualResetEvent_t451242010 ** get_address_of_handle_4() { return &___handle_4; }
inline void set_handle_4(ManualResetEvent_t451242010 * value)
{
___handle_4 = value;
Il2CppCodeGenWriteBarrier((&___handle_4), value);
}
inline static int32_t get_offset_of__message_5() { return static_cast<int32_t>(offsetof(SendRecordAsyncResult_t3718352467, ____message_5)); }
inline HandshakeMessage_t3696583168 * get__message_5() const { return ____message_5; }
inline HandshakeMessage_t3696583168 ** get_address_of__message_5() { return &____message_5; }
inline void set__message_5(HandshakeMessage_t3696583168 * value)
{
____message_5 = value;
Il2CppCodeGenWriteBarrier((&____message_5), value);
}
inline static int32_t get_offset_of_completed_6() { return static_cast<int32_t>(offsetof(SendRecordAsyncResult_t3718352467, ___completed_6)); }
inline bool get_completed_6() const { return ___completed_6; }
inline bool* get_address_of_completed_6() { return &___completed_6; }
inline void set_completed_6(bool value)
{
___completed_6 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // SENDRECORDASYNCRESULT_T3718352467_H
#ifndef SECURITYPARAMETERS_T2199972650_H
#define SECURITYPARAMETERS_T2199972650_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Protocol.Tls.SecurityParameters
struct SecurityParameters_t2199972650 : public RuntimeObject
{
public:
// Mono.Security.Protocol.Tls.CipherSuite Mono.Security.Protocol.Tls.SecurityParameters::cipher
CipherSuite_t3414744575 * ___cipher_0;
// System.Byte[] Mono.Security.Protocol.Tls.SecurityParameters::clientWriteMAC
ByteU5BU5D_t4116647657* ___clientWriteMAC_1;
// System.Byte[] Mono.Security.Protocol.Tls.SecurityParameters::serverWriteMAC
ByteU5BU5D_t4116647657* ___serverWriteMAC_2;
public:
inline static int32_t get_offset_of_cipher_0() { return static_cast<int32_t>(offsetof(SecurityParameters_t2199972650, ___cipher_0)); }
inline CipherSuite_t3414744575 * get_cipher_0() const { return ___cipher_0; }
inline CipherSuite_t3414744575 ** get_address_of_cipher_0() { return &___cipher_0; }
inline void set_cipher_0(CipherSuite_t3414744575 * value)
{
___cipher_0 = value;
Il2CppCodeGenWriteBarrier((&___cipher_0), value);
}
inline static int32_t get_offset_of_clientWriteMAC_1() { return static_cast<int32_t>(offsetof(SecurityParameters_t2199972650, ___clientWriteMAC_1)); }
inline ByteU5BU5D_t4116647657* get_clientWriteMAC_1() const { return ___clientWriteMAC_1; }
inline ByteU5BU5D_t4116647657** get_address_of_clientWriteMAC_1() { return &___clientWriteMAC_1; }
inline void set_clientWriteMAC_1(ByteU5BU5D_t4116647657* value)
{
___clientWriteMAC_1 = value;
Il2CppCodeGenWriteBarrier((&___clientWriteMAC_1), value);
}
inline static int32_t get_offset_of_serverWriteMAC_2() { return static_cast<int32_t>(offsetof(SecurityParameters_t2199972650, ___serverWriteMAC_2)); }
inline ByteU5BU5D_t4116647657* get_serverWriteMAC_2() const { return ___serverWriteMAC_2; }
inline ByteU5BU5D_t4116647657** get_address_of_serverWriteMAC_2() { return &___serverWriteMAC_2; }
inline void set_serverWriteMAC_2(ByteU5BU5D_t4116647657* value)
{
___serverWriteMAC_2 = value;
Il2CppCodeGenWriteBarrier((&___serverWriteMAC_2), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // SECURITYPARAMETERS_T2199972650_H
#ifndef TLSCLIENTSETTINGS_T2486039503_H
#define TLSCLIENTSETTINGS_T2486039503_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Protocol.Tls.TlsClientSettings
struct TlsClientSettings_t2486039503 : public RuntimeObject
{
public:
// System.String Mono.Security.Protocol.Tls.TlsClientSettings::targetHost
String_t* ___targetHost_0;
// System.Security.Cryptography.X509Certificates.X509CertificateCollection Mono.Security.Protocol.Tls.TlsClientSettings::certificates
X509CertificateCollection_t3399372417 * ___certificates_1;
// System.Security.Cryptography.X509Certificates.X509Certificate Mono.Security.Protocol.Tls.TlsClientSettings::clientCertificate
X509Certificate_t713131622 * ___clientCertificate_2;
// Mono.Security.Cryptography.RSAManaged Mono.Security.Protocol.Tls.TlsClientSettings::certificateRSA
RSAManaged_t1757093820 * ___certificateRSA_3;
public:
inline static int32_t get_offset_of_targetHost_0() { return static_cast<int32_t>(offsetof(TlsClientSettings_t2486039503, ___targetHost_0)); }
inline String_t* get_targetHost_0() const { return ___targetHost_0; }
inline String_t** get_address_of_targetHost_0() { return &___targetHost_0; }
inline void set_targetHost_0(String_t* value)
{
___targetHost_0 = value;
Il2CppCodeGenWriteBarrier((&___targetHost_0), value);
}
inline static int32_t get_offset_of_certificates_1() { return static_cast<int32_t>(offsetof(TlsClientSettings_t2486039503, ___certificates_1)); }
inline X509CertificateCollection_t3399372417 * get_certificates_1() const { return ___certificates_1; }
inline X509CertificateCollection_t3399372417 ** get_address_of_certificates_1() { return &___certificates_1; }
inline void set_certificates_1(X509CertificateCollection_t3399372417 * value)
{
___certificates_1 = value;
Il2CppCodeGenWriteBarrier((&___certificates_1), value);
}
inline static int32_t get_offset_of_clientCertificate_2() { return static_cast<int32_t>(offsetof(TlsClientSettings_t2486039503, ___clientCertificate_2)); }
inline X509Certificate_t713131622 * get_clientCertificate_2() const { return ___clientCertificate_2; }
inline X509Certificate_t713131622 ** get_address_of_clientCertificate_2() { return &___clientCertificate_2; }
inline void set_clientCertificate_2(X509Certificate_t713131622 * value)
{
___clientCertificate_2 = value;
Il2CppCodeGenWriteBarrier((&___clientCertificate_2), value);
}
inline static int32_t get_offset_of_certificateRSA_3() { return static_cast<int32_t>(offsetof(TlsClientSettings_t2486039503, ___certificateRSA_3)); }
inline RSAManaged_t1757093820 * get_certificateRSA_3() const { return ___certificateRSA_3; }
inline RSAManaged_t1757093820 ** get_address_of_certificateRSA_3() { return &___certificateRSA_3; }
inline void set_certificateRSA_3(RSAManaged_t1757093820 * value)
{
___certificateRSA_3 = value;
Il2CppCodeGenWriteBarrier((&___certificateRSA_3), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // TLSCLIENTSETTINGS_T2486039503_H
#ifndef VALIDATIONRESULT_T3834298736_H
#define VALIDATIONRESULT_T3834298736_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Protocol.Tls.ValidationResult
struct ValidationResult_t3834298736 : public RuntimeObject
{
public:
// System.Boolean Mono.Security.Protocol.Tls.ValidationResult::trusted
bool ___trusted_0;
// System.Int32 Mono.Security.Protocol.Tls.ValidationResult::error_code
int32_t ___error_code_1;
public:
inline static int32_t get_offset_of_trusted_0() { return static_cast<int32_t>(offsetof(ValidationResult_t3834298736, ___trusted_0)); }
inline bool get_trusted_0() const { return ___trusted_0; }
inline bool* get_address_of_trusted_0() { return &___trusted_0; }
inline void set_trusted_0(bool value)
{
___trusted_0 = value;
}
inline static int32_t get_offset_of_error_code_1() { return static_cast<int32_t>(offsetof(ValidationResult_t3834298736, ___error_code_1)); }
inline int32_t get_error_code_1() const { return ___error_code_1; }
inline int32_t* get_address_of_error_code_1() { return &___error_code_1; }
inline void set_error_code_1(int32_t value)
{
___error_code_1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // VALIDATIONRESULT_T3834298736_H
#ifndef X509EXTENSION_T3173393653_H
#define X509EXTENSION_T3173393653_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.X509.X509Extension
struct X509Extension_t3173393653 : public RuntimeObject
{
public:
// System.String Mono.Security.X509.X509Extension::extnOid
String_t* ___extnOid_0;
// System.Boolean Mono.Security.X509.X509Extension::extnCritical
bool ___extnCritical_1;
// Mono.Security.ASN1 Mono.Security.X509.X509Extension::extnValue
ASN1_t2114160833 * ___extnValue_2;
public:
inline static int32_t get_offset_of_extnOid_0() { return static_cast<int32_t>(offsetof(X509Extension_t3173393653, ___extnOid_0)); }
inline String_t* get_extnOid_0() const { return ___extnOid_0; }
inline String_t** get_address_of_extnOid_0() { return &___extnOid_0; }
inline void set_extnOid_0(String_t* value)
{
___extnOid_0 = value;
Il2CppCodeGenWriteBarrier((&___extnOid_0), value);
}
inline static int32_t get_offset_of_extnCritical_1() { return static_cast<int32_t>(offsetof(X509Extension_t3173393653, ___extnCritical_1)); }
inline bool get_extnCritical_1() const { return ___extnCritical_1; }
inline bool* get_address_of_extnCritical_1() { return &___extnCritical_1; }
inline void set_extnCritical_1(bool value)
{
___extnCritical_1 = value;
}
inline static int32_t get_offset_of_extnValue_2() { return static_cast<int32_t>(offsetof(X509Extension_t3173393653, ___extnValue_2)); }
inline ASN1_t2114160833 * get_extnValue_2() const { return ___extnValue_2; }
inline ASN1_t2114160833 ** get_address_of_extnValue_2() { return &___extnValue_2; }
inline void set_extnValue_2(ASN1_t2114160833 * value)
{
___extnValue_2 = value;
Il2CppCodeGenWriteBarrier((&___extnValue_2), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // X509EXTENSION_T3173393653_H
struct Il2CppArrayBounds;
#ifndef RUNTIMEARRAY_H
#define RUNTIMEARRAY_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Array
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // RUNTIMEARRAY_H
#ifndef BITCONVERTER_T3118986983_H
#define BITCONVERTER_T3118986983_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.BitConverter
struct BitConverter_t3118986983 : public RuntimeObject
{
public:
public:
};
struct BitConverter_t3118986983_StaticFields
{
public:
// System.Boolean System.BitConverter::SwappedWordsInDouble
bool ___SwappedWordsInDouble_0;
// System.Boolean System.BitConverter::IsLittleEndian
bool ___IsLittleEndian_1;
public:
inline static int32_t get_offset_of_SwappedWordsInDouble_0() { return static_cast<int32_t>(offsetof(BitConverter_t3118986983_StaticFields, ___SwappedWordsInDouble_0)); }
inline bool get_SwappedWordsInDouble_0() const { return ___SwappedWordsInDouble_0; }
inline bool* get_address_of_SwappedWordsInDouble_0() { return &___SwappedWordsInDouble_0; }
inline void set_SwappedWordsInDouble_0(bool value)
{
___SwappedWordsInDouble_0 = value;
}
inline static int32_t get_offset_of_IsLittleEndian_1() { return static_cast<int32_t>(offsetof(BitConverter_t3118986983_StaticFields, ___IsLittleEndian_1)); }
inline bool get_IsLittleEndian_1() const { return ___IsLittleEndian_1; }
inline bool* get_address_of_IsLittleEndian_1() { return &___IsLittleEndian_1; }
inline void set_IsLittleEndian_1(bool value)
{
___IsLittleEndian_1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // BITCONVERTER_T3118986983_H
#ifndef ARRAYLIST_T2718874744_H
#define ARRAYLIST_T2718874744_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Collections.ArrayList
struct ArrayList_t2718874744 : public RuntimeObject
{
public:
// System.Int32 System.Collections.ArrayList::_size
int32_t ____size_1;
// System.Object[] System.Collections.ArrayList::_items
ObjectU5BU5D_t2843939325* ____items_2;
// System.Int32 System.Collections.ArrayList::_version
int32_t ____version_3;
public:
inline static int32_t get_offset_of__size_1() { return static_cast<int32_t>(offsetof(ArrayList_t2718874744, ____size_1)); }
inline int32_t get__size_1() const { return ____size_1; }
inline int32_t* get_address_of__size_1() { return &____size_1; }
inline void set__size_1(int32_t value)
{
____size_1 = value;
}
inline static int32_t get_offset_of__items_2() { return static_cast<int32_t>(offsetof(ArrayList_t2718874744, ____items_2)); }
inline ObjectU5BU5D_t2843939325* get__items_2() const { return ____items_2; }
inline ObjectU5BU5D_t2843939325** get_address_of__items_2() { return &____items_2; }
inline void set__items_2(ObjectU5BU5D_t2843939325* value)
{
____items_2 = value;
Il2CppCodeGenWriteBarrier((&____items_2), value);
}
inline static int32_t get_offset_of__version_3() { return static_cast<int32_t>(offsetof(ArrayList_t2718874744, ____version_3)); }
inline int32_t get__version_3() const { return ____version_3; }
inline int32_t* get_address_of__version_3() { return &____version_3; }
inline void set__version_3(int32_t value)
{
____version_3 = value;
}
};
struct ArrayList_t2718874744_StaticFields
{
public:
// System.Object[] System.Collections.ArrayList::EmptyArray
ObjectU5BU5D_t2843939325* ___EmptyArray_4;
public:
inline static int32_t get_offset_of_EmptyArray_4() { return static_cast<int32_t>(offsetof(ArrayList_t2718874744_StaticFields, ___EmptyArray_4)); }
inline ObjectU5BU5D_t2843939325* get_EmptyArray_4() const { return ___EmptyArray_4; }
inline ObjectU5BU5D_t2843939325** get_address_of_EmptyArray_4() { return &___EmptyArray_4; }
inline void set_EmptyArray_4(ObjectU5BU5D_t2843939325* value)
{
___EmptyArray_4 = value;
Il2CppCodeGenWriteBarrier((&___EmptyArray_4), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // ARRAYLIST_T2718874744_H
#ifndef COLLECTIONBASE_T2727926298_H
#define COLLECTIONBASE_T2727926298_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Collections.CollectionBase
struct CollectionBase_t2727926298 : public RuntimeObject
{
public:
// System.Collections.ArrayList System.Collections.CollectionBase::list
ArrayList_t2718874744 * ___list_0;
public:
inline static int32_t get_offset_of_list_0() { return static_cast<int32_t>(offsetof(CollectionBase_t2727926298, ___list_0)); }
inline ArrayList_t2718874744 * get_list_0() const { return ___list_0; }
inline ArrayList_t2718874744 ** get_address_of_list_0() { return &___list_0; }
inline void set_list_0(ArrayList_t2718874744 * value)
{
___list_0 = value;
Il2CppCodeGenWriteBarrier((&___list_0), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // COLLECTIONBASE_T2727926298_H
#ifndef DICTIONARY_2_T2736202052_H
#define DICTIONARY_2_T2736202052_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Collections.Generic.Dictionary`2<System.String,System.Int32>
struct Dictionary_2_t2736202052 : public RuntimeObject
{
public:
// System.Int32[] System.Collections.Generic.Dictionary`2::table
Int32U5BU5D_t385246372* ___table_4;
// System.Collections.Generic.Link[] System.Collections.Generic.Dictionary`2::linkSlots
LinkU5BU5D_t964245573* ___linkSlots_5;
// TKey[] System.Collections.Generic.Dictionary`2::keySlots
StringU5BU5D_t1281789340* ___keySlots_6;
// TValue[] System.Collections.Generic.Dictionary`2::valueSlots
Int32U5BU5D_t385246372* ___valueSlots_7;
// System.Int32 System.Collections.Generic.Dictionary`2::touchedSlots
int32_t ___touchedSlots_8;
// System.Int32 System.Collections.Generic.Dictionary`2::emptySlot
int32_t ___emptySlot_9;
// System.Int32 System.Collections.Generic.Dictionary`2::count
int32_t ___count_10;
// System.Int32 System.Collections.Generic.Dictionary`2::threshold
int32_t ___threshold_11;
// System.Collections.Generic.IEqualityComparer`1<TKey> System.Collections.Generic.Dictionary`2::hcp
RuntimeObject* ___hcp_12;
// System.Runtime.Serialization.SerializationInfo System.Collections.Generic.Dictionary`2::serialization_info
SerializationInfo_t950877179 * ___serialization_info_13;
// System.Int32 System.Collections.Generic.Dictionary`2::generation
int32_t ___generation_14;
public:
inline static int32_t get_offset_of_table_4() { return static_cast<int32_t>(offsetof(Dictionary_2_t2736202052, ___table_4)); }
inline Int32U5BU5D_t385246372* get_table_4() const { return ___table_4; }
inline Int32U5BU5D_t385246372** get_address_of_table_4() { return &___table_4; }
inline void set_table_4(Int32U5BU5D_t385246372* value)
{
___table_4 = value;
Il2CppCodeGenWriteBarrier((&___table_4), value);
}
inline static int32_t get_offset_of_linkSlots_5() { return static_cast<int32_t>(offsetof(Dictionary_2_t2736202052, ___linkSlots_5)); }
inline LinkU5BU5D_t964245573* get_linkSlots_5() const { return ___linkSlots_5; }
inline LinkU5BU5D_t964245573** get_address_of_linkSlots_5() { return &___linkSlots_5; }
inline void set_linkSlots_5(LinkU5BU5D_t964245573* value)
{
___linkSlots_5 = value;
Il2CppCodeGenWriteBarrier((&___linkSlots_5), value);
}
inline static int32_t get_offset_of_keySlots_6() { return static_cast<int32_t>(offsetof(Dictionary_2_t2736202052, ___keySlots_6)); }
inline StringU5BU5D_t1281789340* get_keySlots_6() const { return ___keySlots_6; }
inline StringU5BU5D_t1281789340** get_address_of_keySlots_6() { return &___keySlots_6; }
inline void set_keySlots_6(StringU5BU5D_t1281789340* value)
{
___keySlots_6 = value;
Il2CppCodeGenWriteBarrier((&___keySlots_6), value);
}
inline static int32_t get_offset_of_valueSlots_7() { return static_cast<int32_t>(offsetof(Dictionary_2_t2736202052, ___valueSlots_7)); }
inline Int32U5BU5D_t385246372* get_valueSlots_7() const { return ___valueSlots_7; }
inline Int32U5BU5D_t385246372** get_address_of_valueSlots_7() { return &___valueSlots_7; }
inline void set_valueSlots_7(Int32U5BU5D_t385246372* value)
{
___valueSlots_7 = value;
Il2CppCodeGenWriteBarrier((&___valueSlots_7), value);
}
inline static int32_t get_offset_of_touchedSlots_8() { return static_cast<int32_t>(offsetof(Dictionary_2_t2736202052, ___touchedSlots_8)); }
inline int32_t get_touchedSlots_8() const { return ___touchedSlots_8; }
inline int32_t* get_address_of_touchedSlots_8() { return &___touchedSlots_8; }
inline void set_touchedSlots_8(int32_t value)
{
___touchedSlots_8 = value;
}
inline static int32_t get_offset_of_emptySlot_9() { return static_cast<int32_t>(offsetof(Dictionary_2_t2736202052, ___emptySlot_9)); }
inline int32_t get_emptySlot_9() const { return ___emptySlot_9; }
inline int32_t* get_address_of_emptySlot_9() { return &___emptySlot_9; }
inline void set_emptySlot_9(int32_t value)
{
___emptySlot_9 = value;
}
inline static int32_t get_offset_of_count_10() { return static_cast<int32_t>(offsetof(Dictionary_2_t2736202052, ___count_10)); }
inline int32_t get_count_10() const { return ___count_10; }
inline int32_t* get_address_of_count_10() { return &___count_10; }
inline void set_count_10(int32_t value)
{
___count_10 = value;
}
inline static int32_t get_offset_of_threshold_11() { return static_cast<int32_t>(offsetof(Dictionary_2_t2736202052, ___threshold_11)); }
inline int32_t get_threshold_11() const { return ___threshold_11; }
inline int32_t* get_address_of_threshold_11() { return &___threshold_11; }
inline void set_threshold_11(int32_t value)
{
___threshold_11 = value;
}
inline static int32_t get_offset_of_hcp_12() { return static_cast<int32_t>(offsetof(Dictionary_2_t2736202052, ___hcp_12)); }
inline RuntimeObject* get_hcp_12() const { return ___hcp_12; }
inline RuntimeObject** get_address_of_hcp_12() { return &___hcp_12; }
inline void set_hcp_12(RuntimeObject* value)
{
___hcp_12 = value;
Il2CppCodeGenWriteBarrier((&___hcp_12), value);
}
inline static int32_t get_offset_of_serialization_info_13() { return static_cast<int32_t>(offsetof(Dictionary_2_t2736202052, ___serialization_info_13)); }
inline SerializationInfo_t950877179 * get_serialization_info_13() const { return ___serialization_info_13; }
inline SerializationInfo_t950877179 ** get_address_of_serialization_info_13() { return &___serialization_info_13; }
inline void set_serialization_info_13(SerializationInfo_t950877179 * value)
{
___serialization_info_13 = value;
Il2CppCodeGenWriteBarrier((&___serialization_info_13), value);
}
inline static int32_t get_offset_of_generation_14() { return static_cast<int32_t>(offsetof(Dictionary_2_t2736202052, ___generation_14)); }
inline int32_t get_generation_14() const { return ___generation_14; }
inline int32_t* get_address_of_generation_14() { return &___generation_14; }
inline void set_generation_14(int32_t value)
{
___generation_14 = value;
}
};
struct Dictionary_2_t2736202052_StaticFields
{
public:
// System.Collections.Generic.Dictionary`2/Transform`1<TKey,TValue,System.Collections.DictionaryEntry> System.Collections.Generic.Dictionary`2::<>f__am$cacheB
Transform_1_t3530625384 * ___U3CU3Ef__amU24cacheB_15;
public:
inline static int32_t get_offset_of_U3CU3Ef__amU24cacheB_15() { return static_cast<int32_t>(offsetof(Dictionary_2_t2736202052_StaticFields, ___U3CU3Ef__amU24cacheB_15)); }
inline Transform_1_t3530625384 * get_U3CU3Ef__amU24cacheB_15() const { return ___U3CU3Ef__amU24cacheB_15; }
inline Transform_1_t3530625384 ** get_address_of_U3CU3Ef__amU24cacheB_15() { return &___U3CU3Ef__amU24cacheB_15; }
inline void set_U3CU3Ef__amU24cacheB_15(Transform_1_t3530625384 * value)
{
___U3CU3Ef__amU24cacheB_15 = value;
Il2CppCodeGenWriteBarrier((&___U3CU3Ef__amU24cacheB_15), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // DICTIONARY_2_T2736202052_H
#ifndef HASHTABLE_T1853889766_H
#define HASHTABLE_T1853889766_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Collections.Hashtable
struct Hashtable_t1853889766 : public RuntimeObject
{
public:
// System.Int32 System.Collections.Hashtable::inUse
int32_t ___inUse_1;
// System.Int32 System.Collections.Hashtable::modificationCount
int32_t ___modificationCount_2;
// System.Single System.Collections.Hashtable::loadFactor
float ___loadFactor_3;
// System.Collections.Hashtable/Slot[] System.Collections.Hashtable::table
SlotU5BU5D_t2994659099* ___table_4;
// System.Int32[] System.Collections.Hashtable::hashes
Int32U5BU5D_t385246372* ___hashes_5;
// System.Int32 System.Collections.Hashtable::threshold
int32_t ___threshold_6;
// System.Collections.Hashtable/HashKeys System.Collections.Hashtable::hashKeys
HashKeys_t1568156503 * ___hashKeys_7;
// System.Collections.Hashtable/HashValues System.Collections.Hashtable::hashValues
HashValues_t618387445 * ___hashValues_8;
// System.Collections.IHashCodeProvider System.Collections.Hashtable::hcpRef
RuntimeObject* ___hcpRef_9;
// System.Collections.IComparer System.Collections.Hashtable::comparerRef
RuntimeObject* ___comparerRef_10;
// System.Runtime.Serialization.SerializationInfo System.Collections.Hashtable::serializationInfo
SerializationInfo_t950877179 * ___serializationInfo_11;
// System.Collections.IEqualityComparer System.Collections.Hashtable::equalityComparer
RuntimeObject* ___equalityComparer_12;
public:
inline static int32_t get_offset_of_inUse_1() { return static_cast<int32_t>(offsetof(Hashtable_t1853889766, ___inUse_1)); }
inline int32_t get_inUse_1() const { return ___inUse_1; }
inline int32_t* get_address_of_inUse_1() { return &___inUse_1; }
inline void set_inUse_1(int32_t value)
{
___inUse_1 = value;
}
inline static int32_t get_offset_of_modificationCount_2() { return static_cast<int32_t>(offsetof(Hashtable_t1853889766, ___modificationCount_2)); }
inline int32_t get_modificationCount_2() const { return ___modificationCount_2; }
inline int32_t* get_address_of_modificationCount_2() { return &___modificationCount_2; }
inline void set_modificationCount_2(int32_t value)
{
___modificationCount_2 = value;
}
inline static int32_t get_offset_of_loadFactor_3() { return static_cast<int32_t>(offsetof(Hashtable_t1853889766, ___loadFactor_3)); }
inline float get_loadFactor_3() const { return ___loadFactor_3; }
inline float* get_address_of_loadFactor_3() { return &___loadFactor_3; }
inline void set_loadFactor_3(float value)
{
___loadFactor_3 = value;
}
inline static int32_t get_offset_of_table_4() { return static_cast<int32_t>(offsetof(Hashtable_t1853889766, ___table_4)); }
inline SlotU5BU5D_t2994659099* get_table_4() const { return ___table_4; }
inline SlotU5BU5D_t2994659099** get_address_of_table_4() { return &___table_4; }
inline void set_table_4(SlotU5BU5D_t2994659099* value)
{
___table_4 = value;
Il2CppCodeGenWriteBarrier((&___table_4), value);
}
inline static int32_t get_offset_of_hashes_5() { return static_cast<int32_t>(offsetof(Hashtable_t1853889766, ___hashes_5)); }
inline Int32U5BU5D_t385246372* get_hashes_5() const { return ___hashes_5; }
inline Int32U5BU5D_t385246372** get_address_of_hashes_5() { return &___hashes_5; }
inline void set_hashes_5(Int32U5BU5D_t385246372* value)
{
___hashes_5 = value;
Il2CppCodeGenWriteBarrier((&___hashes_5), value);
}
inline static int32_t get_offset_of_threshold_6() { return static_cast<int32_t>(offsetof(Hashtable_t1853889766, ___threshold_6)); }
inline int32_t get_threshold_6() const { return ___threshold_6; }
inline int32_t* get_address_of_threshold_6() { return &___threshold_6; }
inline void set_threshold_6(int32_t value)
{
___threshold_6 = value;
}
inline static int32_t get_offset_of_hashKeys_7() { return static_cast<int32_t>(offsetof(Hashtable_t1853889766, ___hashKeys_7)); }
inline HashKeys_t1568156503 * get_hashKeys_7() const { return ___hashKeys_7; }
inline HashKeys_t1568156503 ** get_address_of_hashKeys_7() { return &___hashKeys_7; }
inline void set_hashKeys_7(HashKeys_t1568156503 * value)
{
___hashKeys_7 = value;
Il2CppCodeGenWriteBarrier((&___hashKeys_7), value);
}
inline static int32_t get_offset_of_hashValues_8() { return static_cast<int32_t>(offsetof(Hashtable_t1853889766, ___hashValues_8)); }
inline HashValues_t618387445 * get_hashValues_8() const { return ___hashValues_8; }
inline HashValues_t618387445 ** get_address_of_hashValues_8() { return &___hashValues_8; }
inline void set_hashValues_8(HashValues_t618387445 * value)
{
___hashValues_8 = value;
Il2CppCodeGenWriteBarrier((&___hashValues_8), value);
}
inline static int32_t get_offset_of_hcpRef_9() { return static_cast<int32_t>(offsetof(Hashtable_t1853889766, ___hcpRef_9)); }
inline RuntimeObject* get_hcpRef_9() const { return ___hcpRef_9; }
inline RuntimeObject** get_address_of_hcpRef_9() { return &___hcpRef_9; }
inline void set_hcpRef_9(RuntimeObject* value)
{
___hcpRef_9 = value;
Il2CppCodeGenWriteBarrier((&___hcpRef_9), value);
}
inline static int32_t get_offset_of_comparerRef_10() { return static_cast<int32_t>(offsetof(Hashtable_t1853889766, ___comparerRef_10)); }
inline RuntimeObject* get_comparerRef_10() const { return ___comparerRef_10; }
inline RuntimeObject** get_address_of_comparerRef_10() { return &___comparerRef_10; }
inline void set_comparerRef_10(RuntimeObject* value)
{
___comparerRef_10 = value;
Il2CppCodeGenWriteBarrier((&___comparerRef_10), value);
}
inline static int32_t get_offset_of_serializationInfo_11() { return static_cast<int32_t>(offsetof(Hashtable_t1853889766, ___serializationInfo_11)); }
inline SerializationInfo_t950877179 * get_serializationInfo_11() const { return ___serializationInfo_11; }
inline SerializationInfo_t950877179 ** get_address_of_serializationInfo_11() { return &___serializationInfo_11; }
inline void set_serializationInfo_11(SerializationInfo_t950877179 * value)
{
___serializationInfo_11 = value;
Il2CppCodeGenWriteBarrier((&___serializationInfo_11), value);
}
inline static int32_t get_offset_of_equalityComparer_12() { return static_cast<int32_t>(offsetof(Hashtable_t1853889766, ___equalityComparer_12)); }
inline RuntimeObject* get_equalityComparer_12() const { return ___equalityComparer_12; }
inline RuntimeObject** get_address_of_equalityComparer_12() { return &___equalityComparer_12; }
inline void set_equalityComparer_12(RuntimeObject* value)
{
___equalityComparer_12 = value;
Il2CppCodeGenWriteBarrier((&___equalityComparer_12), value);
}
};
struct Hashtable_t1853889766_StaticFields
{
public:
// System.Int32[] System.Collections.Hashtable::primeTbl
Int32U5BU5D_t385246372* ___primeTbl_13;
public:
inline static int32_t get_offset_of_primeTbl_13() { return static_cast<int32_t>(offsetof(Hashtable_t1853889766_StaticFields, ___primeTbl_13)); }
inline Int32U5BU5D_t385246372* get_primeTbl_13() const { return ___primeTbl_13; }
inline Int32U5BU5D_t385246372** get_address_of_primeTbl_13() { return &___primeTbl_13; }
inline void set_primeTbl_13(Int32U5BU5D_t385246372* value)
{
___primeTbl_13 = value;
Il2CppCodeGenWriteBarrier((&___primeTbl_13), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // HASHTABLE_T1853889766_H
#ifndef EVENTARGS_T3591816995_H
#define EVENTARGS_T3591816995_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.EventArgs
struct EventArgs_t3591816995 : public RuntimeObject
{
public:
public:
};
struct EventArgs_t3591816995_StaticFields
{
public:
// System.EventArgs System.EventArgs::Empty
EventArgs_t3591816995 * ___Empty_0;
public:
inline static int32_t get_offset_of_Empty_0() { return static_cast<int32_t>(offsetof(EventArgs_t3591816995_StaticFields, ___Empty_0)); }
inline EventArgs_t3591816995 * get_Empty_0() const { return ___Empty_0; }
inline EventArgs_t3591816995 ** get_address_of_Empty_0() { return &___Empty_0; }
inline void set_Empty_0(EventArgs_t3591816995 * value)
{
___Empty_0 = value;
Il2CppCodeGenWriteBarrier((&___Empty_0), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // EVENTARGS_T3591816995_H
#ifndef EXCEPTION_T_H
#define EXCEPTION_T_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Exception
struct Exception_t : public RuntimeObject
{
public:
// System.IntPtr[] System.Exception::trace_ips
IntPtrU5BU5D_t4013366056* ___trace_ips_0;
// System.Exception System.Exception::inner_exception
Exception_t * ___inner_exception_1;
// System.String System.Exception::message
String_t* ___message_2;
// System.String System.Exception::help_link
String_t* ___help_link_3;
// System.String System.Exception::class_name
String_t* ___class_name_4;
// System.String System.Exception::stack_trace
String_t* ___stack_trace_5;
// System.String System.Exception::_remoteStackTraceString
String_t* ____remoteStackTraceString_6;
// System.Int32 System.Exception::remote_stack_index
int32_t ___remote_stack_index_7;
// System.Int32 System.Exception::hresult
int32_t ___hresult_8;
// System.String System.Exception::source
String_t* ___source_9;
// System.Collections.IDictionary System.Exception::_data
RuntimeObject* ____data_10;
public:
inline static int32_t get_offset_of_trace_ips_0() { return static_cast<int32_t>(offsetof(Exception_t, ___trace_ips_0)); }
inline IntPtrU5BU5D_t4013366056* get_trace_ips_0() const { return ___trace_ips_0; }
inline IntPtrU5BU5D_t4013366056** get_address_of_trace_ips_0() { return &___trace_ips_0; }
inline void set_trace_ips_0(IntPtrU5BU5D_t4013366056* value)
{
___trace_ips_0 = value;
Il2CppCodeGenWriteBarrier((&___trace_ips_0), value);
}
inline static int32_t get_offset_of_inner_exception_1() { return static_cast<int32_t>(offsetof(Exception_t, ___inner_exception_1)); }
inline Exception_t * get_inner_exception_1() const { return ___inner_exception_1; }
inline Exception_t ** get_address_of_inner_exception_1() { return &___inner_exception_1; }
inline void set_inner_exception_1(Exception_t * value)
{
___inner_exception_1 = value;
Il2CppCodeGenWriteBarrier((&___inner_exception_1), value);
}
inline static int32_t get_offset_of_message_2() { return static_cast<int32_t>(offsetof(Exception_t, ___message_2)); }
inline String_t* get_message_2() const { return ___message_2; }
inline String_t** get_address_of_message_2() { return &___message_2; }
inline void set_message_2(String_t* value)
{
___message_2 = value;
Il2CppCodeGenWriteBarrier((&___message_2), value);
}
inline static int32_t get_offset_of_help_link_3() { return static_cast<int32_t>(offsetof(Exception_t, ___help_link_3)); }
inline String_t* get_help_link_3() const { return ___help_link_3; }
inline String_t** get_address_of_help_link_3() { return &___help_link_3; }
inline void set_help_link_3(String_t* value)
{
___help_link_3 = value;
Il2CppCodeGenWriteBarrier((&___help_link_3), value);
}
inline static int32_t get_offset_of_class_name_4() { return static_cast<int32_t>(offsetof(Exception_t, ___class_name_4)); }
inline String_t* get_class_name_4() const { return ___class_name_4; }
inline String_t** get_address_of_class_name_4() { return &___class_name_4; }
inline void set_class_name_4(String_t* value)
{
___class_name_4 = value;
Il2CppCodeGenWriteBarrier((&___class_name_4), value);
}
inline static int32_t get_offset_of_stack_trace_5() { return static_cast<int32_t>(offsetof(Exception_t, ___stack_trace_5)); }
inline String_t* get_stack_trace_5() const { return ___stack_trace_5; }
inline String_t** get_address_of_stack_trace_5() { return &___stack_trace_5; }
inline void set_stack_trace_5(String_t* value)
{
___stack_trace_5 = value;
Il2CppCodeGenWriteBarrier((&___stack_trace_5), value);
}
inline static int32_t get_offset_of__remoteStackTraceString_6() { return static_cast<int32_t>(offsetof(Exception_t, ____remoteStackTraceString_6)); }
inline String_t* get__remoteStackTraceString_6() const { return ____remoteStackTraceString_6; }
inline String_t** get_address_of__remoteStackTraceString_6() { return &____remoteStackTraceString_6; }
inline void set__remoteStackTraceString_6(String_t* value)
{
____remoteStackTraceString_6 = value;
Il2CppCodeGenWriteBarrier((&____remoteStackTraceString_6), value);
}
inline static int32_t get_offset_of_remote_stack_index_7() { return static_cast<int32_t>(offsetof(Exception_t, ___remote_stack_index_7)); }
inline int32_t get_remote_stack_index_7() const { return ___remote_stack_index_7; }
inline int32_t* get_address_of_remote_stack_index_7() { return &___remote_stack_index_7; }
inline void set_remote_stack_index_7(int32_t value)
{
___remote_stack_index_7 = value;
}
inline static int32_t get_offset_of_hresult_8() { return static_cast<int32_t>(offsetof(Exception_t, ___hresult_8)); }
inline int32_t get_hresult_8() const { return ___hresult_8; }
inline int32_t* get_address_of_hresult_8() { return &___hresult_8; }
inline void set_hresult_8(int32_t value)
{
___hresult_8 = value;
}
inline static int32_t get_offset_of_source_9() { return static_cast<int32_t>(offsetof(Exception_t, ___source_9)); }
inline String_t* get_source_9() const { return ___source_9; }
inline String_t** get_address_of_source_9() { return &___source_9; }
inline void set_source_9(String_t* value)
{
___source_9 = value;
Il2CppCodeGenWriteBarrier((&___source_9), value);
}
inline static int32_t get_offset_of__data_10() { return static_cast<int32_t>(offsetof(Exception_t, ____data_10)); }
inline RuntimeObject* get__data_10() const { return ____data_10; }
inline RuntimeObject** get_address_of__data_10() { return &____data_10; }
inline void set__data_10(RuntimeObject* value)
{
____data_10 = value;
Il2CppCodeGenWriteBarrier((&____data_10), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // EXCEPTION_T_H
#ifndef COMPAREINFO_T1092934962_H
#define COMPAREINFO_T1092934962_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Globalization.CompareInfo
struct CompareInfo_t1092934962 : public RuntimeObject
{
public:
// System.Int32 System.Globalization.CompareInfo::culture
int32_t ___culture_1;
// System.String System.Globalization.CompareInfo::icu_name
String_t* ___icu_name_2;
// System.Int32 System.Globalization.CompareInfo::win32LCID
int32_t ___win32LCID_3;
// System.String System.Globalization.CompareInfo::m_name
String_t* ___m_name_4;
// Mono.Globalization.Unicode.SimpleCollator System.Globalization.CompareInfo::collator
SimpleCollator_t2877834729 * ___collator_5;
public:
inline static int32_t get_offset_of_culture_1() { return static_cast<int32_t>(offsetof(CompareInfo_t1092934962, ___culture_1)); }
inline int32_t get_culture_1() const { return ___culture_1; }
inline int32_t* get_address_of_culture_1() { return &___culture_1; }
inline void set_culture_1(int32_t value)
{
___culture_1 = value;
}
inline static int32_t get_offset_of_icu_name_2() { return static_cast<int32_t>(offsetof(CompareInfo_t1092934962, ___icu_name_2)); }
inline String_t* get_icu_name_2() const { return ___icu_name_2; }
inline String_t** get_address_of_icu_name_2() { return &___icu_name_2; }
inline void set_icu_name_2(String_t* value)
{
___icu_name_2 = value;
Il2CppCodeGenWriteBarrier((&___icu_name_2), value);
}
inline static int32_t get_offset_of_win32LCID_3() { return static_cast<int32_t>(offsetof(CompareInfo_t1092934962, ___win32LCID_3)); }
inline int32_t get_win32LCID_3() const { return ___win32LCID_3; }
inline int32_t* get_address_of_win32LCID_3() { return &___win32LCID_3; }
inline void set_win32LCID_3(int32_t value)
{
___win32LCID_3 = value;
}
inline static int32_t get_offset_of_m_name_4() { return static_cast<int32_t>(offsetof(CompareInfo_t1092934962, ___m_name_4)); }
inline String_t* get_m_name_4() const { return ___m_name_4; }
inline String_t** get_address_of_m_name_4() { return &___m_name_4; }
inline void set_m_name_4(String_t* value)
{
___m_name_4 = value;
Il2CppCodeGenWriteBarrier((&___m_name_4), value);
}
inline static int32_t get_offset_of_collator_5() { return static_cast<int32_t>(offsetof(CompareInfo_t1092934962, ___collator_5)); }
inline SimpleCollator_t2877834729 * get_collator_5() const { return ___collator_5; }
inline SimpleCollator_t2877834729 ** get_address_of_collator_5() { return &___collator_5; }
inline void set_collator_5(SimpleCollator_t2877834729 * value)
{
___collator_5 = value;
Il2CppCodeGenWriteBarrier((&___collator_5), value);
}
};
struct CompareInfo_t1092934962_StaticFields
{
public:
// System.Boolean System.Globalization.CompareInfo::useManagedCollation
bool ___useManagedCollation_0;
// System.Collections.Hashtable System.Globalization.CompareInfo::collators
Hashtable_t1853889766 * ___collators_6;
// System.Object System.Globalization.CompareInfo::monitor
RuntimeObject * ___monitor_7;
public:
inline static int32_t get_offset_of_useManagedCollation_0() { return static_cast<int32_t>(offsetof(CompareInfo_t1092934962_StaticFields, ___useManagedCollation_0)); }
inline bool get_useManagedCollation_0() const { return ___useManagedCollation_0; }
inline bool* get_address_of_useManagedCollation_0() { return &___useManagedCollation_0; }
inline void set_useManagedCollation_0(bool value)
{
___useManagedCollation_0 = value;
}
inline static int32_t get_offset_of_collators_6() { return static_cast<int32_t>(offsetof(CompareInfo_t1092934962_StaticFields, ___collators_6)); }
inline Hashtable_t1853889766 * get_collators_6() const { return ___collators_6; }
inline Hashtable_t1853889766 ** get_address_of_collators_6() { return &___collators_6; }
inline void set_collators_6(Hashtable_t1853889766 * value)
{
___collators_6 = value;
Il2CppCodeGenWriteBarrier((&___collators_6), value);
}
inline static int32_t get_offset_of_monitor_7() { return static_cast<int32_t>(offsetof(CompareInfo_t1092934962_StaticFields, ___monitor_7)); }
inline RuntimeObject * get_monitor_7() const { return ___monitor_7; }
inline RuntimeObject ** get_address_of_monitor_7() { return &___monitor_7; }
inline void set_monitor_7(RuntimeObject * value)
{
___monitor_7 = value;
Il2CppCodeGenWriteBarrier((&___monitor_7), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // COMPAREINFO_T1092934962_H
#ifndef CULTUREINFO_T4157843068_H
#define CULTUREINFO_T4157843068_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Globalization.CultureInfo
struct CultureInfo_t4157843068 : public RuntimeObject
{
public:
// System.Boolean System.Globalization.CultureInfo::m_isReadOnly
bool ___m_isReadOnly_7;
// System.Int32 System.Globalization.CultureInfo::cultureID
int32_t ___cultureID_8;
// System.Int32 System.Globalization.CultureInfo::parent_lcid
int32_t ___parent_lcid_9;
// System.Int32 System.Globalization.CultureInfo::specific_lcid
int32_t ___specific_lcid_10;
// System.Int32 System.Globalization.CultureInfo::datetime_index
int32_t ___datetime_index_11;
// System.Int32 System.Globalization.CultureInfo::number_index
int32_t ___number_index_12;
// System.Boolean System.Globalization.CultureInfo::m_useUserOverride
bool ___m_useUserOverride_13;
// System.Globalization.NumberFormatInfo modreq(System.Runtime.CompilerServices.IsVolatile) System.Globalization.CultureInfo::numInfo
NumberFormatInfo_t435877138 * ___numInfo_14;
// System.Globalization.DateTimeFormatInfo modreq(System.Runtime.CompilerServices.IsVolatile) System.Globalization.CultureInfo::dateTimeInfo
DateTimeFormatInfo_t2405853701 * ___dateTimeInfo_15;
// System.Globalization.TextInfo modreq(System.Runtime.CompilerServices.IsVolatile) System.Globalization.CultureInfo::textInfo
TextInfo_t3810425522 * ___textInfo_16;
// System.String System.Globalization.CultureInfo::m_name
String_t* ___m_name_17;
// System.String System.Globalization.CultureInfo::displayname
String_t* ___displayname_18;
// System.String System.Globalization.CultureInfo::englishname
String_t* ___englishname_19;
// System.String System.Globalization.CultureInfo::nativename
String_t* ___nativename_20;
// System.String System.Globalization.CultureInfo::iso3lang
String_t* ___iso3lang_21;
// System.String System.Globalization.CultureInfo::iso2lang
String_t* ___iso2lang_22;
// System.String System.Globalization.CultureInfo::icu_name
String_t* ___icu_name_23;
// System.String System.Globalization.CultureInfo::win3lang
String_t* ___win3lang_24;
// System.String System.Globalization.CultureInfo::territory
String_t* ___territory_25;
// System.Globalization.CompareInfo modreq(System.Runtime.CompilerServices.IsVolatile) System.Globalization.CultureInfo::compareInfo
CompareInfo_t1092934962 * ___compareInfo_26;
// System.Int32* System.Globalization.CultureInfo::calendar_data
int32_t* ___calendar_data_27;
// System.Void* System.Globalization.CultureInfo::textinfo_data
void* ___textinfo_data_28;
// System.Globalization.Calendar[] System.Globalization.CultureInfo::optional_calendars
CalendarU5BU5D_t3985046076* ___optional_calendars_29;
// System.Globalization.CultureInfo System.Globalization.CultureInfo::parent_culture
CultureInfo_t4157843068 * ___parent_culture_30;
// System.Int32 System.Globalization.CultureInfo::m_dataItem
int32_t ___m_dataItem_31;
// System.Globalization.Calendar System.Globalization.CultureInfo::calendar
Calendar_t1661121569 * ___calendar_32;
// System.Boolean System.Globalization.CultureInfo::constructed
bool ___constructed_33;
// System.Byte[] System.Globalization.CultureInfo::cached_serialized_form
ByteU5BU5D_t4116647657* ___cached_serialized_form_34;
public:
inline static int32_t get_offset_of_m_isReadOnly_7() { return static_cast<int32_t>(offsetof(CultureInfo_t4157843068, ___m_isReadOnly_7)); }
inline bool get_m_isReadOnly_7() const { return ___m_isReadOnly_7; }
inline bool* get_address_of_m_isReadOnly_7() { return &___m_isReadOnly_7; }
inline void set_m_isReadOnly_7(bool value)
{
___m_isReadOnly_7 = value;
}
inline static int32_t get_offset_of_cultureID_8() { return static_cast<int32_t>(offsetof(CultureInfo_t4157843068, ___cultureID_8)); }
inline int32_t get_cultureID_8() const { return ___cultureID_8; }
inline int32_t* get_address_of_cultureID_8() { return &___cultureID_8; }
inline void set_cultureID_8(int32_t value)
{
___cultureID_8 = value;
}
inline static int32_t get_offset_of_parent_lcid_9() { return static_cast<int32_t>(offsetof(CultureInfo_t4157843068, ___parent_lcid_9)); }
inline int32_t get_parent_lcid_9() const { return ___parent_lcid_9; }
inline int32_t* get_address_of_parent_lcid_9() { return &___parent_lcid_9; }
inline void set_parent_lcid_9(int32_t value)
{
___parent_lcid_9 = value;
}
inline static int32_t get_offset_of_specific_lcid_10() { return static_cast<int32_t>(offsetof(CultureInfo_t4157843068, ___specific_lcid_10)); }
inline int32_t get_specific_lcid_10() const { return ___specific_lcid_10; }
inline int32_t* get_address_of_specific_lcid_10() { return &___specific_lcid_10; }
inline void set_specific_lcid_10(int32_t value)
{
___specific_lcid_10 = value;
}
inline static int32_t get_offset_of_datetime_index_11() { return static_cast<int32_t>(offsetof(CultureInfo_t4157843068, ___datetime_index_11)); }
inline int32_t get_datetime_index_11() const { return ___datetime_index_11; }
inline int32_t* get_address_of_datetime_index_11() { return &___datetime_index_11; }
inline void set_datetime_index_11(int32_t value)
{
___datetime_index_11 = value;
}
inline static int32_t get_offset_of_number_index_12() { return static_cast<int32_t>(offsetof(CultureInfo_t4157843068, ___number_index_12)); }
inline int32_t get_number_index_12() const { return ___number_index_12; }
inline int32_t* get_address_of_number_index_12() { return &___number_index_12; }
inline void set_number_index_12(int32_t value)
{
___number_index_12 = value;
}
inline static int32_t get_offset_of_m_useUserOverride_13() { return static_cast<int32_t>(offsetof(CultureInfo_t4157843068, ___m_useUserOverride_13)); }
inline bool get_m_useUserOverride_13() const { return ___m_useUserOverride_13; }
inline bool* get_address_of_m_useUserOverride_13() { return &___m_useUserOverride_13; }
inline void set_m_useUserOverride_13(bool value)
{
___m_useUserOverride_13 = value;
}
inline static int32_t get_offset_of_numInfo_14() { return static_cast<int32_t>(offsetof(CultureInfo_t4157843068, ___numInfo_14)); }
inline NumberFormatInfo_t435877138 * get_numInfo_14() const { return ___numInfo_14; }
inline NumberFormatInfo_t435877138 ** get_address_of_numInfo_14() { return &___numInfo_14; }
inline void set_numInfo_14(NumberFormatInfo_t435877138 * value)
{
___numInfo_14 = value;
Il2CppCodeGenWriteBarrier((&___numInfo_14), value);
}
inline static int32_t get_offset_of_dateTimeInfo_15() { return static_cast<int32_t>(offsetof(CultureInfo_t4157843068, ___dateTimeInfo_15)); }
inline DateTimeFormatInfo_t2405853701 * get_dateTimeInfo_15() const { return ___dateTimeInfo_15; }
inline DateTimeFormatInfo_t2405853701 ** get_address_of_dateTimeInfo_15() { return &___dateTimeInfo_15; }
inline void set_dateTimeInfo_15(DateTimeFormatInfo_t2405853701 * value)
{
___dateTimeInfo_15 = value;
Il2CppCodeGenWriteBarrier((&___dateTimeInfo_15), value);
}
inline static int32_t get_offset_of_textInfo_16() { return static_cast<int32_t>(offsetof(CultureInfo_t4157843068, ___textInfo_16)); }
inline TextInfo_t3810425522 * get_textInfo_16() const { return ___textInfo_16; }
inline TextInfo_t3810425522 ** get_address_of_textInfo_16() { return &___textInfo_16; }
inline void set_textInfo_16(TextInfo_t3810425522 * value)
{
___textInfo_16 = value;
Il2CppCodeGenWriteBarrier((&___textInfo_16), value);
}
inline static int32_t get_offset_of_m_name_17() { return static_cast<int32_t>(offsetof(CultureInfo_t4157843068, ___m_name_17)); }
inline String_t* get_m_name_17() const { return ___m_name_17; }
inline String_t** get_address_of_m_name_17() { return &___m_name_17; }
inline void set_m_name_17(String_t* value)
{
___m_name_17 = value;
Il2CppCodeGenWriteBarrier((&___m_name_17), value);
}
inline static int32_t get_offset_of_displayname_18() { return static_cast<int32_t>(offsetof(CultureInfo_t4157843068, ___displayname_18)); }
inline String_t* get_displayname_18() const { return ___displayname_18; }
inline String_t** get_address_of_displayname_18() { return &___displayname_18; }
inline void set_displayname_18(String_t* value)
{
___displayname_18 = value;
Il2CppCodeGenWriteBarrier((&___displayname_18), value);
}
inline static int32_t get_offset_of_englishname_19() { return static_cast<int32_t>(offsetof(CultureInfo_t4157843068, ___englishname_19)); }
inline String_t* get_englishname_19() const { return ___englishname_19; }
inline String_t** get_address_of_englishname_19() { return &___englishname_19; }
inline void set_englishname_19(String_t* value)
{
___englishname_19 = value;
Il2CppCodeGenWriteBarrier((&___englishname_19), value);
}
inline static int32_t get_offset_of_nativename_20() { return static_cast<int32_t>(offsetof(CultureInfo_t4157843068, ___nativename_20)); }
inline String_t* get_nativename_20() const { return ___nativename_20; }
inline String_t** get_address_of_nativename_20() { return &___nativename_20; }
inline void set_nativename_20(String_t* value)
{
___nativename_20 = value;
Il2CppCodeGenWriteBarrier((&___nativename_20), value);
}
inline static int32_t get_offset_of_iso3lang_21() { return static_cast<int32_t>(offsetof(CultureInfo_t4157843068, ___iso3lang_21)); }
inline String_t* get_iso3lang_21() const { return ___iso3lang_21; }
inline String_t** get_address_of_iso3lang_21() { return &___iso3lang_21; }
inline void set_iso3lang_21(String_t* value)
{
___iso3lang_21 = value;
Il2CppCodeGenWriteBarrier((&___iso3lang_21), value);
}
inline static int32_t get_offset_of_iso2lang_22() { return static_cast<int32_t>(offsetof(CultureInfo_t4157843068, ___iso2lang_22)); }
inline String_t* get_iso2lang_22() const { return ___iso2lang_22; }
inline String_t** get_address_of_iso2lang_22() { return &___iso2lang_22; }
inline void set_iso2lang_22(String_t* value)
{
___iso2lang_22 = value;
Il2CppCodeGenWriteBarrier((&___iso2lang_22), value);
}
inline static int32_t get_offset_of_icu_name_23() { return static_cast<int32_t>(offsetof(CultureInfo_t4157843068, ___icu_name_23)); }
inline String_t* get_icu_name_23() const { return ___icu_name_23; }
inline String_t** get_address_of_icu_name_23() { return &___icu_name_23; }
inline void set_icu_name_23(String_t* value)
{
___icu_name_23 = value;
Il2CppCodeGenWriteBarrier((&___icu_name_23), value);
}
inline static int32_t get_offset_of_win3lang_24() { return static_cast<int32_t>(offsetof(CultureInfo_t4157843068, ___win3lang_24)); }
inline String_t* get_win3lang_24() const { return ___win3lang_24; }
inline String_t** get_address_of_win3lang_24() { return &___win3lang_24; }
inline void set_win3lang_24(String_t* value)
{
___win3lang_24 = value;
Il2CppCodeGenWriteBarrier((&___win3lang_24), value);
}
inline static int32_t get_offset_of_territory_25() { return static_cast<int32_t>(offsetof(CultureInfo_t4157843068, ___territory_25)); }
inline String_t* get_territory_25() const { return ___territory_25; }
inline String_t** get_address_of_territory_25() { return &___territory_25; }
inline void set_territory_25(String_t* value)
{
___territory_25 = value;
Il2CppCodeGenWriteBarrier((&___territory_25), value);
}
inline static int32_t get_offset_of_compareInfo_26() { return static_cast<int32_t>(offsetof(CultureInfo_t4157843068, ___compareInfo_26)); }
inline CompareInfo_t1092934962 * get_compareInfo_26() const { return ___compareInfo_26; }
inline CompareInfo_t1092934962 ** get_address_of_compareInfo_26() { return &___compareInfo_26; }
inline void set_compareInfo_26(CompareInfo_t1092934962 * value)
{
___compareInfo_26 = value;
Il2CppCodeGenWriteBarrier((&___compareInfo_26), value);
}
inline static int32_t get_offset_of_calendar_data_27() { return static_cast<int32_t>(offsetof(CultureInfo_t4157843068, ___calendar_data_27)); }
inline int32_t* get_calendar_data_27() const { return ___calendar_data_27; }
inline int32_t** get_address_of_calendar_data_27() { return &___calendar_data_27; }
inline void set_calendar_data_27(int32_t* value)
{
___calendar_data_27 = value;
}
inline static int32_t get_offset_of_textinfo_data_28() { return static_cast<int32_t>(offsetof(CultureInfo_t4157843068, ___textinfo_data_28)); }
inline void* get_textinfo_data_28() const { return ___textinfo_data_28; }
inline void** get_address_of_textinfo_data_28() { return &___textinfo_data_28; }
inline void set_textinfo_data_28(void* value)
{
___textinfo_data_28 = value;
}
inline static int32_t get_offset_of_optional_calendars_29() { return static_cast<int32_t>(offsetof(CultureInfo_t4157843068, ___optional_calendars_29)); }
inline CalendarU5BU5D_t3985046076* get_optional_calendars_29() const { return ___optional_calendars_29; }
inline CalendarU5BU5D_t3985046076** get_address_of_optional_calendars_29() { return &___optional_calendars_29; }
inline void set_optional_calendars_29(CalendarU5BU5D_t3985046076* value)
{
___optional_calendars_29 = value;
Il2CppCodeGenWriteBarrier((&___optional_calendars_29), value);
}
inline static int32_t get_offset_of_parent_culture_30() { return static_cast<int32_t>(offsetof(CultureInfo_t4157843068, ___parent_culture_30)); }
inline CultureInfo_t4157843068 * get_parent_culture_30() const { return ___parent_culture_30; }
inline CultureInfo_t4157843068 ** get_address_of_parent_culture_30() { return &___parent_culture_30; }
inline void set_parent_culture_30(CultureInfo_t4157843068 * value)
{
___parent_culture_30 = value;
Il2CppCodeGenWriteBarrier((&___parent_culture_30), value);
}
inline static int32_t get_offset_of_m_dataItem_31() { return static_cast<int32_t>(offsetof(CultureInfo_t4157843068, ___m_dataItem_31)); }
inline int32_t get_m_dataItem_31() const { return ___m_dataItem_31; }
inline int32_t* get_address_of_m_dataItem_31() { return &___m_dataItem_31; }
inline void set_m_dataItem_31(int32_t value)
{
___m_dataItem_31 = value;
}
inline static int32_t get_offset_of_calendar_32() { return static_cast<int32_t>(offsetof(CultureInfo_t4157843068, ___calendar_32)); }
inline Calendar_t1661121569 * get_calendar_32() const { return ___calendar_32; }
inline Calendar_t1661121569 ** get_address_of_calendar_32() { return &___calendar_32; }
inline void set_calendar_32(Calendar_t1661121569 * value)
{
___calendar_32 = value;
Il2CppCodeGenWriteBarrier((&___calendar_32), value);
}
inline static int32_t get_offset_of_constructed_33() { return static_cast<int32_t>(offsetof(CultureInfo_t4157843068, ___constructed_33)); }
inline bool get_constructed_33() const { return ___constructed_33; }
inline bool* get_address_of_constructed_33() { return &___constructed_33; }
inline void set_constructed_33(bool value)
{
___constructed_33 = value;
}
inline static int32_t get_offset_of_cached_serialized_form_34() { return static_cast<int32_t>(offsetof(CultureInfo_t4157843068, ___cached_serialized_form_34)); }
inline ByteU5BU5D_t4116647657* get_cached_serialized_form_34() const { return ___cached_serialized_form_34; }
inline ByteU5BU5D_t4116647657** get_address_of_cached_serialized_form_34() { return &___cached_serialized_form_34; }
inline void set_cached_serialized_form_34(ByteU5BU5D_t4116647657* value)
{
___cached_serialized_form_34 = value;
Il2CppCodeGenWriteBarrier((&___cached_serialized_form_34), value);
}
};
struct CultureInfo_t4157843068_StaticFields
{
public:
// System.Globalization.CultureInfo modreq(System.Runtime.CompilerServices.IsVolatile) System.Globalization.CultureInfo::invariant_culture_info
CultureInfo_t4157843068 * ___invariant_culture_info_4;
// System.Object System.Globalization.CultureInfo::shared_table_lock
RuntimeObject * ___shared_table_lock_5;
// System.Int32 System.Globalization.CultureInfo::BootstrapCultureID
int32_t ___BootstrapCultureID_6;
// System.String System.Globalization.CultureInfo::MSG_READONLY
String_t* ___MSG_READONLY_35;
// System.Collections.Hashtable System.Globalization.CultureInfo::shared_by_number
Hashtable_t1853889766 * ___shared_by_number_36;
// System.Collections.Hashtable System.Globalization.CultureInfo::shared_by_name
Hashtable_t1853889766 * ___shared_by_name_37;
// System.Collections.Generic.Dictionary`2<System.String,System.Int32> System.Globalization.CultureInfo::<>f__switch$map19
Dictionary_2_t2736202052 * ___U3CU3Ef__switchU24map19_38;
// System.Collections.Generic.Dictionary`2<System.String,System.Int32> System.Globalization.CultureInfo::<>f__switch$map1A
Dictionary_2_t2736202052 * ___U3CU3Ef__switchU24map1A_39;
public:
inline static int32_t get_offset_of_invariant_culture_info_4() { return static_cast<int32_t>(offsetof(CultureInfo_t4157843068_StaticFields, ___invariant_culture_info_4)); }
inline CultureInfo_t4157843068 * get_invariant_culture_info_4() const { return ___invariant_culture_info_4; }
inline CultureInfo_t4157843068 ** get_address_of_invariant_culture_info_4() { return &___invariant_culture_info_4; }
inline void set_invariant_culture_info_4(CultureInfo_t4157843068 * value)
{
___invariant_culture_info_4 = value;
Il2CppCodeGenWriteBarrier((&___invariant_culture_info_4), value);
}
inline static int32_t get_offset_of_shared_table_lock_5() { return static_cast<int32_t>(offsetof(CultureInfo_t4157843068_StaticFields, ___shared_table_lock_5)); }
inline RuntimeObject * get_shared_table_lock_5() const { return ___shared_table_lock_5; }
inline RuntimeObject ** get_address_of_shared_table_lock_5() { return &___shared_table_lock_5; }
inline void set_shared_table_lock_5(RuntimeObject * value)
{
___shared_table_lock_5 = value;
Il2CppCodeGenWriteBarrier((&___shared_table_lock_5), value);
}
inline static int32_t get_offset_of_BootstrapCultureID_6() { return static_cast<int32_t>(offsetof(CultureInfo_t4157843068_StaticFields, ___BootstrapCultureID_6)); }
inline int32_t get_BootstrapCultureID_6() const { return ___BootstrapCultureID_6; }
inline int32_t* get_address_of_BootstrapCultureID_6() { return &___BootstrapCultureID_6; }
inline void set_BootstrapCultureID_6(int32_t value)
{
___BootstrapCultureID_6 = value;
}
inline static int32_t get_offset_of_MSG_READONLY_35() { return static_cast<int32_t>(offsetof(CultureInfo_t4157843068_StaticFields, ___MSG_READONLY_35)); }
inline String_t* get_MSG_READONLY_35() const { return ___MSG_READONLY_35; }
inline String_t** get_address_of_MSG_READONLY_35() { return &___MSG_READONLY_35; }
inline void set_MSG_READONLY_35(String_t* value)
{
___MSG_READONLY_35 = value;
Il2CppCodeGenWriteBarrier((&___MSG_READONLY_35), value);
}
inline static int32_t get_offset_of_shared_by_number_36() { return static_cast<int32_t>(offsetof(CultureInfo_t4157843068_StaticFields, ___shared_by_number_36)); }
inline Hashtable_t1853889766 * get_shared_by_number_36() const { return ___shared_by_number_36; }
inline Hashtable_t1853889766 ** get_address_of_shared_by_number_36() { return &___shared_by_number_36; }
inline void set_shared_by_number_36(Hashtable_t1853889766 * value)
{
___shared_by_number_36 = value;
Il2CppCodeGenWriteBarrier((&___shared_by_number_36), value);
}
inline static int32_t get_offset_of_shared_by_name_37() { return static_cast<int32_t>(offsetof(CultureInfo_t4157843068_StaticFields, ___shared_by_name_37)); }
inline Hashtable_t1853889766 * get_shared_by_name_37() const { return ___shared_by_name_37; }
inline Hashtable_t1853889766 ** get_address_of_shared_by_name_37() { return &___shared_by_name_37; }
inline void set_shared_by_name_37(Hashtable_t1853889766 * value)
{
___shared_by_name_37 = value;
Il2CppCodeGenWriteBarrier((&___shared_by_name_37), value);
}
inline static int32_t get_offset_of_U3CU3Ef__switchU24map19_38() { return static_cast<int32_t>(offsetof(CultureInfo_t4157843068_StaticFields, ___U3CU3Ef__switchU24map19_38)); }
inline Dictionary_2_t2736202052 * get_U3CU3Ef__switchU24map19_38() const { return ___U3CU3Ef__switchU24map19_38; }
inline Dictionary_2_t2736202052 ** get_address_of_U3CU3Ef__switchU24map19_38() { return &___U3CU3Ef__switchU24map19_38; }
inline void set_U3CU3Ef__switchU24map19_38(Dictionary_2_t2736202052 * value)
{
___U3CU3Ef__switchU24map19_38 = value;
Il2CppCodeGenWriteBarrier((&___U3CU3Ef__switchU24map19_38), value);
}
inline static int32_t get_offset_of_U3CU3Ef__switchU24map1A_39() { return static_cast<int32_t>(offsetof(CultureInfo_t4157843068_StaticFields, ___U3CU3Ef__switchU24map1A_39)); }
inline Dictionary_2_t2736202052 * get_U3CU3Ef__switchU24map1A_39() const { return ___U3CU3Ef__switchU24map1A_39; }
inline Dictionary_2_t2736202052 ** get_address_of_U3CU3Ef__switchU24map1A_39() { return &___U3CU3Ef__switchU24map1A_39; }
inline void set_U3CU3Ef__switchU24map1A_39(Dictionary_2_t2736202052 * value)
{
___U3CU3Ef__switchU24map1A_39 = value;
Il2CppCodeGenWriteBarrier((&___U3CU3Ef__switchU24map1A_39), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // CULTUREINFO_T4157843068_H
#ifndef STREAM_T1273022909_H
#define STREAM_T1273022909_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.IO.Stream
struct Stream_t1273022909 : public RuntimeObject
{
public:
public:
};
struct Stream_t1273022909_StaticFields
{
public:
// System.IO.Stream System.IO.Stream::Null
Stream_t1273022909 * ___Null_0;
public:
inline static int32_t get_offset_of_Null_0() { return static_cast<int32_t>(offsetof(Stream_t1273022909_StaticFields, ___Null_0)); }
inline Stream_t1273022909 * get_Null_0() const { return ___Null_0; }
inline Stream_t1273022909 ** get_address_of_Null_0() { return &___Null_0; }
inline void set_Null_0(Stream_t1273022909 * value)
{
___Null_0 = value;
Il2CppCodeGenWriteBarrier((&___Null_0), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // STREAM_T1273022909_H
#ifndef MARSHALBYREFOBJECT_T2760389100_H
#define MARSHALBYREFOBJECT_T2760389100_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.MarshalByRefObject
struct MarshalByRefObject_t2760389100 : public RuntimeObject
{
public:
// System.Runtime.Remoting.ServerIdentity System.MarshalByRefObject::_identity
ServerIdentity_t2342208608 * ____identity_0;
public:
inline static int32_t get_offset_of__identity_0() { return static_cast<int32_t>(offsetof(MarshalByRefObject_t2760389100, ____identity_0)); }
inline ServerIdentity_t2342208608 * get__identity_0() const { return ____identity_0; }
inline ServerIdentity_t2342208608 ** get_address_of__identity_0() { return &____identity_0; }
inline void set__identity_0(ServerIdentity_t2342208608 * value)
{
____identity_0 = value;
Il2CppCodeGenWriteBarrier((&____identity_0), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // MARSHALBYREFOBJECT_T2760389100_H
#ifndef MEMBERINFO_T_H
#define MEMBERINFO_T_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Reflection.MemberInfo
struct MemberInfo_t : public RuntimeObject
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // MEMBERINFO_T_H
#ifndef ASYMMETRICALGORITHM_T932037087_H
#define ASYMMETRICALGORITHM_T932037087_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Security.Cryptography.AsymmetricAlgorithm
struct AsymmetricAlgorithm_t932037087 : public RuntimeObject
{
public:
// System.Int32 System.Security.Cryptography.AsymmetricAlgorithm::KeySizeValue
int32_t ___KeySizeValue_0;
// System.Security.Cryptography.KeySizes[] System.Security.Cryptography.AsymmetricAlgorithm::LegalKeySizesValue
KeySizesU5BU5D_t722666473* ___LegalKeySizesValue_1;
public:
inline static int32_t get_offset_of_KeySizeValue_0() { return static_cast<int32_t>(offsetof(AsymmetricAlgorithm_t932037087, ___KeySizeValue_0)); }
inline int32_t get_KeySizeValue_0() const { return ___KeySizeValue_0; }
inline int32_t* get_address_of_KeySizeValue_0() { return &___KeySizeValue_0; }
inline void set_KeySizeValue_0(int32_t value)
{
___KeySizeValue_0 = value;
}
inline static int32_t get_offset_of_LegalKeySizesValue_1() { return static_cast<int32_t>(offsetof(AsymmetricAlgorithm_t932037087, ___LegalKeySizesValue_1)); }
inline KeySizesU5BU5D_t722666473* get_LegalKeySizesValue_1() const { return ___LegalKeySizesValue_1; }
inline KeySizesU5BU5D_t722666473** get_address_of_LegalKeySizesValue_1() { return &___LegalKeySizesValue_1; }
inline void set_LegalKeySizesValue_1(KeySizesU5BU5D_t722666473* value)
{
___LegalKeySizesValue_1 = value;
Il2CppCodeGenWriteBarrier((&___LegalKeySizesValue_1), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // ASYMMETRICALGORITHM_T932037087_H
#ifndef ASYMMETRICKEYEXCHANGEFORMATTER_T937192061_H
#define ASYMMETRICKEYEXCHANGEFORMATTER_T937192061_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Security.Cryptography.AsymmetricKeyExchangeFormatter
struct AsymmetricKeyExchangeFormatter_t937192061 : public RuntimeObject
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // ASYMMETRICKEYEXCHANGEFORMATTER_T937192061_H
#ifndef ASYMMETRICSIGNATUREDEFORMATTER_T2681190756_H
#define ASYMMETRICSIGNATUREDEFORMATTER_T2681190756_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Security.Cryptography.AsymmetricSignatureDeformatter
struct AsymmetricSignatureDeformatter_t2681190756 : public RuntimeObject
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // ASYMMETRICSIGNATUREDEFORMATTER_T2681190756_H
#ifndef ASYMMETRICSIGNATUREFORMATTER_T3486936014_H
#define ASYMMETRICSIGNATUREFORMATTER_T3486936014_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Security.Cryptography.AsymmetricSignatureFormatter
struct AsymmetricSignatureFormatter_t3486936014 : public RuntimeObject
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // ASYMMETRICSIGNATUREFORMATTER_T3486936014_H
#ifndef HASHALGORITHM_T1432317219_H
#define HASHALGORITHM_T1432317219_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Security.Cryptography.HashAlgorithm
struct HashAlgorithm_t1432317219 : public RuntimeObject
{
public:
// System.Byte[] System.Security.Cryptography.HashAlgorithm::HashValue
ByteU5BU5D_t4116647657* ___HashValue_0;
// System.Int32 System.Security.Cryptography.HashAlgorithm::HashSizeValue
int32_t ___HashSizeValue_1;
// System.Int32 System.Security.Cryptography.HashAlgorithm::State
int32_t ___State_2;
// System.Boolean System.Security.Cryptography.HashAlgorithm::disposed
bool ___disposed_3;
public:
inline static int32_t get_offset_of_HashValue_0() { return static_cast<int32_t>(offsetof(HashAlgorithm_t1432317219, ___HashValue_0)); }
inline ByteU5BU5D_t4116647657* get_HashValue_0() const { return ___HashValue_0; }
inline ByteU5BU5D_t4116647657** get_address_of_HashValue_0() { return &___HashValue_0; }
inline void set_HashValue_0(ByteU5BU5D_t4116647657* value)
{
___HashValue_0 = value;
Il2CppCodeGenWriteBarrier((&___HashValue_0), value);
}
inline static int32_t get_offset_of_HashSizeValue_1() { return static_cast<int32_t>(offsetof(HashAlgorithm_t1432317219, ___HashSizeValue_1)); }
inline int32_t get_HashSizeValue_1() const { return ___HashSizeValue_1; }
inline int32_t* get_address_of_HashSizeValue_1() { return &___HashSizeValue_1; }
inline void set_HashSizeValue_1(int32_t value)
{
___HashSizeValue_1 = value;
}
inline static int32_t get_offset_of_State_2() { return static_cast<int32_t>(offsetof(HashAlgorithm_t1432317219, ___State_2)); }
inline int32_t get_State_2() const { return ___State_2; }
inline int32_t* get_address_of_State_2() { return &___State_2; }
inline void set_State_2(int32_t value)
{
___State_2 = value;
}
inline static int32_t get_offset_of_disposed_3() { return static_cast<int32_t>(offsetof(HashAlgorithm_t1432317219, ___disposed_3)); }
inline bool get_disposed_3() const { return ___disposed_3; }
inline bool* get_address_of_disposed_3() { return &___disposed_3; }
inline void set_disposed_3(bool value)
{
___disposed_3 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // HASHALGORITHM_T1432317219_H
#ifndef KEYSIZES_T85027896_H
#define KEYSIZES_T85027896_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Security.Cryptography.KeySizes
struct KeySizes_t85027896 : public RuntimeObject
{
public:
// System.Int32 System.Security.Cryptography.KeySizes::_maxSize
int32_t ____maxSize_0;
// System.Int32 System.Security.Cryptography.KeySizes::_minSize
int32_t ____minSize_1;
// System.Int32 System.Security.Cryptography.KeySizes::_skipSize
int32_t ____skipSize_2;
public:
inline static int32_t get_offset_of__maxSize_0() { return static_cast<int32_t>(offsetof(KeySizes_t85027896, ____maxSize_0)); }
inline int32_t get__maxSize_0() const { return ____maxSize_0; }
inline int32_t* get_address_of__maxSize_0() { return &____maxSize_0; }
inline void set__maxSize_0(int32_t value)
{
____maxSize_0 = value;
}
inline static int32_t get_offset_of__minSize_1() { return static_cast<int32_t>(offsetof(KeySizes_t85027896, ____minSize_1)); }
inline int32_t get__minSize_1() const { return ____minSize_1; }
inline int32_t* get_address_of__minSize_1() { return &____minSize_1; }
inline void set__minSize_1(int32_t value)
{
____minSize_1 = value;
}
inline static int32_t get_offset_of__skipSize_2() { return static_cast<int32_t>(offsetof(KeySizes_t85027896, ____skipSize_2)); }
inline int32_t get__skipSize_2() const { return ____skipSize_2; }
inline int32_t* get_address_of__skipSize_2() { return &____skipSize_2; }
inline void set__skipSize_2(int32_t value)
{
____skipSize_2 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // KEYSIZES_T85027896_H
#ifndef RANDOMNUMBERGENERATOR_T386037858_H
#define RANDOMNUMBERGENERATOR_T386037858_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Security.Cryptography.RandomNumberGenerator
struct RandomNumberGenerator_t386037858 : public RuntimeObject
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // RANDOMNUMBERGENERATOR_T386037858_H
#ifndef X509CERTIFICATE_T713131622_H
#define X509CERTIFICATE_T713131622_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Security.Cryptography.X509Certificates.X509Certificate
struct X509Certificate_t713131622 : public RuntimeObject
{
public:
// Mono.Security.X509.X509Certificate System.Security.Cryptography.X509Certificates.X509Certificate::x509
X509Certificate_t489243024 * ___x509_0;
// System.Boolean System.Security.Cryptography.X509Certificates.X509Certificate::hideDates
bool ___hideDates_1;
// System.Byte[] System.Security.Cryptography.X509Certificates.X509Certificate::cachedCertificateHash
ByteU5BU5D_t4116647657* ___cachedCertificateHash_2;
// System.String System.Security.Cryptography.X509Certificates.X509Certificate::issuer_name
String_t* ___issuer_name_3;
// System.String System.Security.Cryptography.X509Certificates.X509Certificate::subject_name
String_t* ___subject_name_4;
public:
inline static int32_t get_offset_of_x509_0() { return static_cast<int32_t>(offsetof(X509Certificate_t713131622, ___x509_0)); }
inline X509Certificate_t489243024 * get_x509_0() const { return ___x509_0; }
inline X509Certificate_t489243024 ** get_address_of_x509_0() { return &___x509_0; }
inline void set_x509_0(X509Certificate_t489243024 * value)
{
___x509_0 = value;
Il2CppCodeGenWriteBarrier((&___x509_0), value);
}
inline static int32_t get_offset_of_hideDates_1() { return static_cast<int32_t>(offsetof(X509Certificate_t713131622, ___hideDates_1)); }
inline bool get_hideDates_1() const { return ___hideDates_1; }
inline bool* get_address_of_hideDates_1() { return &___hideDates_1; }
inline void set_hideDates_1(bool value)
{
___hideDates_1 = value;
}
inline static int32_t get_offset_of_cachedCertificateHash_2() { return static_cast<int32_t>(offsetof(X509Certificate_t713131622, ___cachedCertificateHash_2)); }
inline ByteU5BU5D_t4116647657* get_cachedCertificateHash_2() const { return ___cachedCertificateHash_2; }
inline ByteU5BU5D_t4116647657** get_address_of_cachedCertificateHash_2() { return &___cachedCertificateHash_2; }
inline void set_cachedCertificateHash_2(ByteU5BU5D_t4116647657* value)
{
___cachedCertificateHash_2 = value;
Il2CppCodeGenWriteBarrier((&___cachedCertificateHash_2), value);
}
inline static int32_t get_offset_of_issuer_name_3() { return static_cast<int32_t>(offsetof(X509Certificate_t713131622, ___issuer_name_3)); }
inline String_t* get_issuer_name_3() const { return ___issuer_name_3; }
inline String_t** get_address_of_issuer_name_3() { return &___issuer_name_3; }
inline void set_issuer_name_3(String_t* value)
{
___issuer_name_3 = value;
Il2CppCodeGenWriteBarrier((&___issuer_name_3), value);
}
inline static int32_t get_offset_of_subject_name_4() { return static_cast<int32_t>(offsetof(X509Certificate_t713131622, ___subject_name_4)); }
inline String_t* get_subject_name_4() const { return ___subject_name_4; }
inline String_t** get_address_of_subject_name_4() { return &___subject_name_4; }
inline void set_subject_name_4(String_t* value)
{
___subject_name_4 = value;
Il2CppCodeGenWriteBarrier((&___subject_name_4), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // X509CERTIFICATE_T713131622_H
#ifndef X509CERTIFICATEENUMERATOR_T855273292_H
#define X509CERTIFICATEENUMERATOR_T855273292_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Security.Cryptography.X509Certificates.X509CertificateCollection/X509CertificateEnumerator
struct X509CertificateEnumerator_t855273292 : public RuntimeObject
{
public:
// System.Collections.IEnumerator System.Security.Cryptography.X509Certificates.X509CertificateCollection/X509CertificateEnumerator::enumerator
RuntimeObject* ___enumerator_0;
public:
inline static int32_t get_offset_of_enumerator_0() { return static_cast<int32_t>(offsetof(X509CertificateEnumerator_t855273292, ___enumerator_0)); }
inline RuntimeObject* get_enumerator_0() const { return ___enumerator_0; }
inline RuntimeObject** get_address_of_enumerator_0() { return &___enumerator_0; }
inline void set_enumerator_0(RuntimeObject* value)
{
___enumerator_0 = value;
Il2CppCodeGenWriteBarrier((&___enumerator_0), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // X509CERTIFICATEENUMERATOR_T855273292_H
#ifndef STRING_T_H
#define STRING_T_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.String
struct String_t : public RuntimeObject
{
public:
// System.Int32 System.String::length
int32_t ___length_0;
// System.Char System.String::start_char
Il2CppChar ___start_char_1;
public:
inline static int32_t get_offset_of_length_0() { return static_cast<int32_t>(offsetof(String_t, ___length_0)); }
inline int32_t get_length_0() const { return ___length_0; }
inline int32_t* get_address_of_length_0() { return &___length_0; }
inline void set_length_0(int32_t value)
{
___length_0 = value;
}
inline static int32_t get_offset_of_start_char_1() { return static_cast<int32_t>(offsetof(String_t, ___start_char_1)); }
inline Il2CppChar get_start_char_1() const { return ___start_char_1; }
inline Il2CppChar* get_address_of_start_char_1() { return &___start_char_1; }
inline void set_start_char_1(Il2CppChar value)
{
___start_char_1 = value;
}
};
struct String_t_StaticFields
{
public:
// System.String System.String::Empty
String_t* ___Empty_2;
// System.Char[] System.String::WhiteChars
CharU5BU5D_t3528271667* ___WhiteChars_3;
public:
inline static int32_t get_offset_of_Empty_2() { return static_cast<int32_t>(offsetof(String_t_StaticFields, ___Empty_2)); }
inline String_t* get_Empty_2() const { return ___Empty_2; }
inline String_t** get_address_of_Empty_2() { return &___Empty_2; }
inline void set_Empty_2(String_t* value)
{
___Empty_2 = value;
Il2CppCodeGenWriteBarrier((&___Empty_2), value);
}
inline static int32_t get_offset_of_WhiteChars_3() { return static_cast<int32_t>(offsetof(String_t_StaticFields, ___WhiteChars_3)); }
inline CharU5BU5D_t3528271667* get_WhiteChars_3() const { return ___WhiteChars_3; }
inline CharU5BU5D_t3528271667** get_address_of_WhiteChars_3() { return &___WhiteChars_3; }
inline void set_WhiteChars_3(CharU5BU5D_t3528271667* value)
{
___WhiteChars_3 = value;
Il2CppCodeGenWriteBarrier((&___WhiteChars_3), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // STRING_T_H
#ifndef ENCODING_T1523322056_H
#define ENCODING_T1523322056_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Text.Encoding
struct Encoding_t1523322056 : public RuntimeObject
{
public:
// System.Int32 System.Text.Encoding::codePage
int32_t ___codePage_0;
// System.Int32 System.Text.Encoding::windows_code_page
int32_t ___windows_code_page_1;
// System.Boolean System.Text.Encoding::is_readonly
bool ___is_readonly_2;
// System.Text.DecoderFallback System.Text.Encoding::decoder_fallback
DecoderFallback_t3123823036 * ___decoder_fallback_3;
// System.Text.EncoderFallback System.Text.Encoding::encoder_fallback
EncoderFallback_t1188251036 * ___encoder_fallback_4;
// System.String System.Text.Encoding::body_name
String_t* ___body_name_8;
// System.String System.Text.Encoding::encoding_name
String_t* ___encoding_name_9;
// System.String System.Text.Encoding::header_name
String_t* ___header_name_10;
// System.Boolean System.Text.Encoding::is_mail_news_display
bool ___is_mail_news_display_11;
// System.Boolean System.Text.Encoding::is_mail_news_save
bool ___is_mail_news_save_12;
// System.Boolean System.Text.Encoding::is_browser_save
bool ___is_browser_save_13;
// System.Boolean System.Text.Encoding::is_browser_display
bool ___is_browser_display_14;
// System.String System.Text.Encoding::web_name
String_t* ___web_name_15;
public:
inline static int32_t get_offset_of_codePage_0() { return static_cast<int32_t>(offsetof(Encoding_t1523322056, ___codePage_0)); }
inline int32_t get_codePage_0() const { return ___codePage_0; }
inline int32_t* get_address_of_codePage_0() { return &___codePage_0; }
inline void set_codePage_0(int32_t value)
{
___codePage_0 = value;
}
inline static int32_t get_offset_of_windows_code_page_1() { return static_cast<int32_t>(offsetof(Encoding_t1523322056, ___windows_code_page_1)); }
inline int32_t get_windows_code_page_1() const { return ___windows_code_page_1; }
inline int32_t* get_address_of_windows_code_page_1() { return &___windows_code_page_1; }
inline void set_windows_code_page_1(int32_t value)
{
___windows_code_page_1 = value;
}
inline static int32_t get_offset_of_is_readonly_2() { return static_cast<int32_t>(offsetof(Encoding_t1523322056, ___is_readonly_2)); }
inline bool get_is_readonly_2() const { return ___is_readonly_2; }
inline bool* get_address_of_is_readonly_2() { return &___is_readonly_2; }
inline void set_is_readonly_2(bool value)
{
___is_readonly_2 = value;
}
inline static int32_t get_offset_of_decoder_fallback_3() { return static_cast<int32_t>(offsetof(Encoding_t1523322056, ___decoder_fallback_3)); }
inline DecoderFallback_t3123823036 * get_decoder_fallback_3() const { return ___decoder_fallback_3; }
inline DecoderFallback_t3123823036 ** get_address_of_decoder_fallback_3() { return &___decoder_fallback_3; }
inline void set_decoder_fallback_3(DecoderFallback_t3123823036 * value)
{
___decoder_fallback_3 = value;
Il2CppCodeGenWriteBarrier((&___decoder_fallback_3), value);
}
inline static int32_t get_offset_of_encoder_fallback_4() { return static_cast<int32_t>(offsetof(Encoding_t1523322056, ___encoder_fallback_4)); }
inline EncoderFallback_t1188251036 * get_encoder_fallback_4() const { return ___encoder_fallback_4; }
inline EncoderFallback_t1188251036 ** get_address_of_encoder_fallback_4() { return &___encoder_fallback_4; }
inline void set_encoder_fallback_4(EncoderFallback_t1188251036 * value)
{
___encoder_fallback_4 = value;
Il2CppCodeGenWriteBarrier((&___encoder_fallback_4), value);
}
inline static int32_t get_offset_of_body_name_8() { return static_cast<int32_t>(offsetof(Encoding_t1523322056, ___body_name_8)); }
inline String_t* get_body_name_8() const { return ___body_name_8; }
inline String_t** get_address_of_body_name_8() { return &___body_name_8; }
inline void set_body_name_8(String_t* value)
{
___body_name_8 = value;
Il2CppCodeGenWriteBarrier((&___body_name_8), value);
}
inline static int32_t get_offset_of_encoding_name_9() { return static_cast<int32_t>(offsetof(Encoding_t1523322056, ___encoding_name_9)); }
inline String_t* get_encoding_name_9() const { return ___encoding_name_9; }
inline String_t** get_address_of_encoding_name_9() { return &___encoding_name_9; }
inline void set_encoding_name_9(String_t* value)
{
___encoding_name_9 = value;
Il2CppCodeGenWriteBarrier((&___encoding_name_9), value);
}
inline static int32_t get_offset_of_header_name_10() { return static_cast<int32_t>(offsetof(Encoding_t1523322056, ___header_name_10)); }
inline String_t* get_header_name_10() const { return ___header_name_10; }
inline String_t** get_address_of_header_name_10() { return &___header_name_10; }
inline void set_header_name_10(String_t* value)
{
___header_name_10 = value;
Il2CppCodeGenWriteBarrier((&___header_name_10), value);
}
inline static int32_t get_offset_of_is_mail_news_display_11() { return static_cast<int32_t>(offsetof(Encoding_t1523322056, ___is_mail_news_display_11)); }
inline bool get_is_mail_news_display_11() const { return ___is_mail_news_display_11; }
inline bool* get_address_of_is_mail_news_display_11() { return &___is_mail_news_display_11; }
inline void set_is_mail_news_display_11(bool value)
{
___is_mail_news_display_11 = value;
}
inline static int32_t get_offset_of_is_mail_news_save_12() { return static_cast<int32_t>(offsetof(Encoding_t1523322056, ___is_mail_news_save_12)); }
inline bool get_is_mail_news_save_12() const { return ___is_mail_news_save_12; }
inline bool* get_address_of_is_mail_news_save_12() { return &___is_mail_news_save_12; }
inline void set_is_mail_news_save_12(bool value)
{
___is_mail_news_save_12 = value;
}
inline static int32_t get_offset_of_is_browser_save_13() { return static_cast<int32_t>(offsetof(Encoding_t1523322056, ___is_browser_save_13)); }
inline bool get_is_browser_save_13() const { return ___is_browser_save_13; }
inline bool* get_address_of_is_browser_save_13() { return &___is_browser_save_13; }
inline void set_is_browser_save_13(bool value)
{
___is_browser_save_13 = value;
}
inline static int32_t get_offset_of_is_browser_display_14() { return static_cast<int32_t>(offsetof(Encoding_t1523322056, ___is_browser_display_14)); }
inline bool get_is_browser_display_14() const { return ___is_browser_display_14; }
inline bool* get_address_of_is_browser_display_14() { return &___is_browser_display_14; }
inline void set_is_browser_display_14(bool value)
{
___is_browser_display_14 = value;
}
inline static int32_t get_offset_of_web_name_15() { return static_cast<int32_t>(offsetof(Encoding_t1523322056, ___web_name_15)); }
inline String_t* get_web_name_15() const { return ___web_name_15; }
inline String_t** get_address_of_web_name_15() { return &___web_name_15; }
inline void set_web_name_15(String_t* value)
{
___web_name_15 = value;
Il2CppCodeGenWriteBarrier((&___web_name_15), value);
}
};
struct Encoding_t1523322056_StaticFields
{
public:
// System.Reflection.Assembly System.Text.Encoding::i18nAssembly
Assembly_t * ___i18nAssembly_5;
// System.Boolean System.Text.Encoding::i18nDisabled
bool ___i18nDisabled_6;
// System.Object[] System.Text.Encoding::encodings
ObjectU5BU5D_t2843939325* ___encodings_7;
// System.Text.Encoding modreq(System.Runtime.CompilerServices.IsVolatile) System.Text.Encoding::asciiEncoding
Encoding_t1523322056 * ___asciiEncoding_16;
// System.Text.Encoding modreq(System.Runtime.CompilerServices.IsVolatile) System.Text.Encoding::bigEndianEncoding
Encoding_t1523322056 * ___bigEndianEncoding_17;
// System.Text.Encoding modreq(System.Runtime.CompilerServices.IsVolatile) System.Text.Encoding::defaultEncoding
Encoding_t1523322056 * ___defaultEncoding_18;
// System.Text.Encoding modreq(System.Runtime.CompilerServices.IsVolatile) System.Text.Encoding::utf7Encoding
Encoding_t1523322056 * ___utf7Encoding_19;
// System.Text.Encoding modreq(System.Runtime.CompilerServices.IsVolatile) System.Text.Encoding::utf8EncodingWithMarkers
Encoding_t1523322056 * ___utf8EncodingWithMarkers_20;
// System.Text.Encoding modreq(System.Runtime.CompilerServices.IsVolatile) System.Text.Encoding::utf8EncodingWithoutMarkers
Encoding_t1523322056 * ___utf8EncodingWithoutMarkers_21;
// System.Text.Encoding modreq(System.Runtime.CompilerServices.IsVolatile) System.Text.Encoding::unicodeEncoding
Encoding_t1523322056 * ___unicodeEncoding_22;
// System.Text.Encoding modreq(System.Runtime.CompilerServices.IsVolatile) System.Text.Encoding::isoLatin1Encoding
Encoding_t1523322056 * ___isoLatin1Encoding_23;
// System.Text.Encoding modreq(System.Runtime.CompilerServices.IsVolatile) System.Text.Encoding::utf8EncodingUnsafe
Encoding_t1523322056 * ___utf8EncodingUnsafe_24;
// System.Text.Encoding modreq(System.Runtime.CompilerServices.IsVolatile) System.Text.Encoding::utf32Encoding
Encoding_t1523322056 * ___utf32Encoding_25;
// System.Text.Encoding modreq(System.Runtime.CompilerServices.IsVolatile) System.Text.Encoding::bigEndianUTF32Encoding
Encoding_t1523322056 * ___bigEndianUTF32Encoding_26;
// System.Object System.Text.Encoding::lockobj
RuntimeObject * ___lockobj_27;
public:
inline static int32_t get_offset_of_i18nAssembly_5() { return static_cast<int32_t>(offsetof(Encoding_t1523322056_StaticFields, ___i18nAssembly_5)); }
inline Assembly_t * get_i18nAssembly_5() const { return ___i18nAssembly_5; }
inline Assembly_t ** get_address_of_i18nAssembly_5() { return &___i18nAssembly_5; }
inline void set_i18nAssembly_5(Assembly_t * value)
{
___i18nAssembly_5 = value;
Il2CppCodeGenWriteBarrier((&___i18nAssembly_5), value);
}
inline static int32_t get_offset_of_i18nDisabled_6() { return static_cast<int32_t>(offsetof(Encoding_t1523322056_StaticFields, ___i18nDisabled_6)); }
inline bool get_i18nDisabled_6() const { return ___i18nDisabled_6; }
inline bool* get_address_of_i18nDisabled_6() { return &___i18nDisabled_6; }
inline void set_i18nDisabled_6(bool value)
{
___i18nDisabled_6 = value;
}
inline static int32_t get_offset_of_encodings_7() { return static_cast<int32_t>(offsetof(Encoding_t1523322056_StaticFields, ___encodings_7)); }
inline ObjectU5BU5D_t2843939325* get_encodings_7() const { return ___encodings_7; }
inline ObjectU5BU5D_t2843939325** get_address_of_encodings_7() { return &___encodings_7; }
inline void set_encodings_7(ObjectU5BU5D_t2843939325* value)
{
___encodings_7 = value;
Il2CppCodeGenWriteBarrier((&___encodings_7), value);
}
inline static int32_t get_offset_of_asciiEncoding_16() { return static_cast<int32_t>(offsetof(Encoding_t1523322056_StaticFields, ___asciiEncoding_16)); }
inline Encoding_t1523322056 * get_asciiEncoding_16() const { return ___asciiEncoding_16; }
inline Encoding_t1523322056 ** get_address_of_asciiEncoding_16() { return &___asciiEncoding_16; }
inline void set_asciiEncoding_16(Encoding_t1523322056 * value)
{
___asciiEncoding_16 = value;
Il2CppCodeGenWriteBarrier((&___asciiEncoding_16), value);
}
inline static int32_t get_offset_of_bigEndianEncoding_17() { return static_cast<int32_t>(offsetof(Encoding_t1523322056_StaticFields, ___bigEndianEncoding_17)); }
inline Encoding_t1523322056 * get_bigEndianEncoding_17() const { return ___bigEndianEncoding_17; }
inline Encoding_t1523322056 ** get_address_of_bigEndianEncoding_17() { return &___bigEndianEncoding_17; }
inline void set_bigEndianEncoding_17(Encoding_t1523322056 * value)
{
___bigEndianEncoding_17 = value;
Il2CppCodeGenWriteBarrier((&___bigEndianEncoding_17), value);
}
inline static int32_t get_offset_of_defaultEncoding_18() { return static_cast<int32_t>(offsetof(Encoding_t1523322056_StaticFields, ___defaultEncoding_18)); }
inline Encoding_t1523322056 * get_defaultEncoding_18() const { return ___defaultEncoding_18; }
inline Encoding_t1523322056 ** get_address_of_defaultEncoding_18() { return &___defaultEncoding_18; }
inline void set_defaultEncoding_18(Encoding_t1523322056 * value)
{
___defaultEncoding_18 = value;
Il2CppCodeGenWriteBarrier((&___defaultEncoding_18), value);
}
inline static int32_t get_offset_of_utf7Encoding_19() { return static_cast<int32_t>(offsetof(Encoding_t1523322056_StaticFields, ___utf7Encoding_19)); }
inline Encoding_t1523322056 * get_utf7Encoding_19() const { return ___utf7Encoding_19; }
inline Encoding_t1523322056 ** get_address_of_utf7Encoding_19() { return &___utf7Encoding_19; }
inline void set_utf7Encoding_19(Encoding_t1523322056 * value)
{
___utf7Encoding_19 = value;
Il2CppCodeGenWriteBarrier((&___utf7Encoding_19), value);
}
inline static int32_t get_offset_of_utf8EncodingWithMarkers_20() { return static_cast<int32_t>(offsetof(Encoding_t1523322056_StaticFields, ___utf8EncodingWithMarkers_20)); }
inline Encoding_t1523322056 * get_utf8EncodingWithMarkers_20() const { return ___utf8EncodingWithMarkers_20; }
inline Encoding_t1523322056 ** get_address_of_utf8EncodingWithMarkers_20() { return &___utf8EncodingWithMarkers_20; }
inline void set_utf8EncodingWithMarkers_20(Encoding_t1523322056 * value)
{
___utf8EncodingWithMarkers_20 = value;
Il2CppCodeGenWriteBarrier((&___utf8EncodingWithMarkers_20), value);
}
inline static int32_t get_offset_of_utf8EncodingWithoutMarkers_21() { return static_cast<int32_t>(offsetof(Encoding_t1523322056_StaticFields, ___utf8EncodingWithoutMarkers_21)); }
inline Encoding_t1523322056 * get_utf8EncodingWithoutMarkers_21() const { return ___utf8EncodingWithoutMarkers_21; }
inline Encoding_t1523322056 ** get_address_of_utf8EncodingWithoutMarkers_21() { return &___utf8EncodingWithoutMarkers_21; }
inline void set_utf8EncodingWithoutMarkers_21(Encoding_t1523322056 * value)
{
___utf8EncodingWithoutMarkers_21 = value;
Il2CppCodeGenWriteBarrier((&___utf8EncodingWithoutMarkers_21), value);
}
inline static int32_t get_offset_of_unicodeEncoding_22() { return static_cast<int32_t>(offsetof(Encoding_t1523322056_StaticFields, ___unicodeEncoding_22)); }
inline Encoding_t1523322056 * get_unicodeEncoding_22() const { return ___unicodeEncoding_22; }
inline Encoding_t1523322056 ** get_address_of_unicodeEncoding_22() { return &___unicodeEncoding_22; }
inline void set_unicodeEncoding_22(Encoding_t1523322056 * value)
{
___unicodeEncoding_22 = value;
Il2CppCodeGenWriteBarrier((&___unicodeEncoding_22), value);
}
inline static int32_t get_offset_of_isoLatin1Encoding_23() { return static_cast<int32_t>(offsetof(Encoding_t1523322056_StaticFields, ___isoLatin1Encoding_23)); }
inline Encoding_t1523322056 * get_isoLatin1Encoding_23() const { return ___isoLatin1Encoding_23; }
inline Encoding_t1523322056 ** get_address_of_isoLatin1Encoding_23() { return &___isoLatin1Encoding_23; }
inline void set_isoLatin1Encoding_23(Encoding_t1523322056 * value)
{
___isoLatin1Encoding_23 = value;
Il2CppCodeGenWriteBarrier((&___isoLatin1Encoding_23), value);
}
inline static int32_t get_offset_of_utf8EncodingUnsafe_24() { return static_cast<int32_t>(offsetof(Encoding_t1523322056_StaticFields, ___utf8EncodingUnsafe_24)); }
inline Encoding_t1523322056 * get_utf8EncodingUnsafe_24() const { return ___utf8EncodingUnsafe_24; }
inline Encoding_t1523322056 ** get_address_of_utf8EncodingUnsafe_24() { return &___utf8EncodingUnsafe_24; }
inline void set_utf8EncodingUnsafe_24(Encoding_t1523322056 * value)
{
___utf8EncodingUnsafe_24 = value;
Il2CppCodeGenWriteBarrier((&___utf8EncodingUnsafe_24), value);
}
inline static int32_t get_offset_of_utf32Encoding_25() { return static_cast<int32_t>(offsetof(Encoding_t1523322056_StaticFields, ___utf32Encoding_25)); }
inline Encoding_t1523322056 * get_utf32Encoding_25() const { return ___utf32Encoding_25; }
inline Encoding_t1523322056 ** get_address_of_utf32Encoding_25() { return &___utf32Encoding_25; }
inline void set_utf32Encoding_25(Encoding_t1523322056 * value)
{
___utf32Encoding_25 = value;
Il2CppCodeGenWriteBarrier((&___utf32Encoding_25), value);
}
inline static int32_t get_offset_of_bigEndianUTF32Encoding_26() { return static_cast<int32_t>(offsetof(Encoding_t1523322056_StaticFields, ___bigEndianUTF32Encoding_26)); }
inline Encoding_t1523322056 * get_bigEndianUTF32Encoding_26() const { return ___bigEndianUTF32Encoding_26; }
inline Encoding_t1523322056 ** get_address_of_bigEndianUTF32Encoding_26() { return &___bigEndianUTF32Encoding_26; }
inline void set_bigEndianUTF32Encoding_26(Encoding_t1523322056 * value)
{
___bigEndianUTF32Encoding_26 = value;
Il2CppCodeGenWriteBarrier((&___bigEndianUTF32Encoding_26), value);
}
inline static int32_t get_offset_of_lockobj_27() { return static_cast<int32_t>(offsetof(Encoding_t1523322056_StaticFields, ___lockobj_27)); }
inline RuntimeObject * get_lockobj_27() const { return ___lockobj_27; }
inline RuntimeObject ** get_address_of_lockobj_27() { return &___lockobj_27; }
inline void set_lockobj_27(RuntimeObject * value)
{
___lockobj_27 = value;
Il2CppCodeGenWriteBarrier((&___lockobj_27), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // ENCODING_T1523322056_H
#ifndef CAPTURE_T2232016050_H
#define CAPTURE_T2232016050_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Text.RegularExpressions.Capture
struct Capture_t2232016050 : public RuntimeObject
{
public:
// System.Int32 System.Text.RegularExpressions.Capture::index
int32_t ___index_0;
// System.Int32 System.Text.RegularExpressions.Capture::length
int32_t ___length_1;
// System.String System.Text.RegularExpressions.Capture::text
String_t* ___text_2;
public:
inline static int32_t get_offset_of_index_0() { return static_cast<int32_t>(offsetof(Capture_t2232016050, ___index_0)); }
inline int32_t get_index_0() const { return ___index_0; }
inline int32_t* get_address_of_index_0() { return &___index_0; }
inline void set_index_0(int32_t value)
{
___index_0 = value;
}
inline static int32_t get_offset_of_length_1() { return static_cast<int32_t>(offsetof(Capture_t2232016050, ___length_1)); }
inline int32_t get_length_1() const { return ___length_1; }
inline int32_t* get_address_of_length_1() { return &___length_1; }
inline void set_length_1(int32_t value)
{
___length_1 = value;
}
inline static int32_t get_offset_of_text_2() { return static_cast<int32_t>(offsetof(Capture_t2232016050, ___text_2)); }
inline String_t* get_text_2() const { return ___text_2; }
inline String_t** get_address_of_text_2() { return &___text_2; }
inline void set_text_2(String_t* value)
{
___text_2 = value;
Il2CppCodeGenWriteBarrier((&___text_2), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // CAPTURE_T2232016050_H
#ifndef GROUPCOLLECTION_T69770484_H
#define GROUPCOLLECTION_T69770484_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Text.RegularExpressions.GroupCollection
struct GroupCollection_t69770484 : public RuntimeObject
{
public:
// System.Text.RegularExpressions.Group[] System.Text.RegularExpressions.GroupCollection::list
GroupU5BU5D_t1880820351* ___list_0;
// System.Int32 System.Text.RegularExpressions.GroupCollection::gap
int32_t ___gap_1;
public:
inline static int32_t get_offset_of_list_0() { return static_cast<int32_t>(offsetof(GroupCollection_t69770484, ___list_0)); }
inline GroupU5BU5D_t1880820351* get_list_0() const { return ___list_0; }
inline GroupU5BU5D_t1880820351** get_address_of_list_0() { return &___list_0; }
inline void set_list_0(GroupU5BU5D_t1880820351* value)
{
___list_0 = value;
Il2CppCodeGenWriteBarrier((&___list_0), value);
}
inline static int32_t get_offset_of_gap_1() { return static_cast<int32_t>(offsetof(GroupCollection_t69770484, ___gap_1)); }
inline int32_t get_gap_1() const { return ___gap_1; }
inline int32_t* get_address_of_gap_1() { return &___gap_1; }
inline void set_gap_1(int32_t value)
{
___gap_1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // GROUPCOLLECTION_T69770484_H
#ifndef MATCHCOLLECTION_T1395363720_H
#define MATCHCOLLECTION_T1395363720_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Text.RegularExpressions.MatchCollection
struct MatchCollection_t1395363720 : public RuntimeObject
{
public:
// System.Text.RegularExpressions.Match System.Text.RegularExpressions.MatchCollection::current
Match_t3408321083 * ___current_0;
// System.Collections.ArrayList System.Text.RegularExpressions.MatchCollection::list
ArrayList_t2718874744 * ___list_1;
public:
inline static int32_t get_offset_of_current_0() { return static_cast<int32_t>(offsetof(MatchCollection_t1395363720, ___current_0)); }
inline Match_t3408321083 * get_current_0() const { return ___current_0; }
inline Match_t3408321083 ** get_address_of_current_0() { return &___current_0; }
inline void set_current_0(Match_t3408321083 * value)
{
___current_0 = value;
Il2CppCodeGenWriteBarrier((&___current_0), value);
}
inline static int32_t get_offset_of_list_1() { return static_cast<int32_t>(offsetof(MatchCollection_t1395363720, ___list_1)); }
inline ArrayList_t2718874744 * get_list_1() const { return ___list_1; }
inline ArrayList_t2718874744 ** get_address_of_list_1() { return &___list_1; }
inline void set_list_1(ArrayList_t2718874744 * value)
{
___list_1 = value;
Il2CppCodeGenWriteBarrier((&___list_1), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // MATCHCOLLECTION_T1395363720_H
#ifndef STRINGBUILDER_T_H
#define STRINGBUILDER_T_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Text.StringBuilder
struct StringBuilder_t : public RuntimeObject
{
public:
// System.Int32 System.Text.StringBuilder::_length
int32_t ____length_1;
// System.String System.Text.StringBuilder::_str
String_t* ____str_2;
// System.String System.Text.StringBuilder::_cached_str
String_t* ____cached_str_3;
// System.Int32 System.Text.StringBuilder::_maxCapacity
int32_t ____maxCapacity_4;
public:
inline static int32_t get_offset_of__length_1() { return static_cast<int32_t>(offsetof(StringBuilder_t, ____length_1)); }
inline int32_t get__length_1() const { return ____length_1; }
inline int32_t* get_address_of__length_1() { return &____length_1; }
inline void set__length_1(int32_t value)
{
____length_1 = value;
}
inline static int32_t get_offset_of__str_2() { return static_cast<int32_t>(offsetof(StringBuilder_t, ____str_2)); }
inline String_t* get__str_2() const { return ____str_2; }
inline String_t** get_address_of__str_2() { return &____str_2; }
inline void set__str_2(String_t* value)
{
____str_2 = value;
Il2CppCodeGenWriteBarrier((&____str_2), value);
}
inline static int32_t get_offset_of__cached_str_3() { return static_cast<int32_t>(offsetof(StringBuilder_t, ____cached_str_3)); }
inline String_t* get__cached_str_3() const { return ____cached_str_3; }
inline String_t** get_address_of__cached_str_3() { return &____cached_str_3; }
inline void set__cached_str_3(String_t* value)
{
____cached_str_3 = value;
Il2CppCodeGenWriteBarrier((&____cached_str_3), value);
}
inline static int32_t get_offset_of__maxCapacity_4() { return static_cast<int32_t>(offsetof(StringBuilder_t, ____maxCapacity_4)); }
inline int32_t get__maxCapacity_4() const { return ____maxCapacity_4; }
inline int32_t* get_address_of__maxCapacity_4() { return &____maxCapacity_4; }
inline void set__maxCapacity_4(int32_t value)
{
____maxCapacity_4 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // STRINGBUILDER_T_H
#ifndef URI_T100236324_H
#define URI_T100236324_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Uri
struct Uri_t100236324 : public RuntimeObject
{
public:
// System.Boolean System.Uri::isUnixFilePath
bool ___isUnixFilePath_0;
// System.String System.Uri::source
String_t* ___source_1;
// System.String System.Uri::scheme
String_t* ___scheme_2;
// System.String System.Uri::host
String_t* ___host_3;
// System.Int32 System.Uri::port
int32_t ___port_4;
// System.String System.Uri::path
String_t* ___path_5;
// System.String System.Uri::query
String_t* ___query_6;
// System.String System.Uri::fragment
String_t* ___fragment_7;
// System.String System.Uri::userinfo
String_t* ___userinfo_8;
// System.Boolean System.Uri::isUnc
bool ___isUnc_9;
// System.Boolean System.Uri::isOpaquePart
bool ___isOpaquePart_10;
// System.Boolean System.Uri::isAbsoluteUri
bool ___isAbsoluteUri_11;
// System.Boolean System.Uri::userEscaped
bool ___userEscaped_12;
// System.String System.Uri::cachedAbsoluteUri
String_t* ___cachedAbsoluteUri_13;
// System.String System.Uri::cachedToString
String_t* ___cachedToString_14;
// System.Int32 System.Uri::cachedHashCode
int32_t ___cachedHashCode_15;
// System.UriParser System.Uri::parser
UriParser_t3890150400 * ___parser_29;
public:
inline static int32_t get_offset_of_isUnixFilePath_0() { return static_cast<int32_t>(offsetof(Uri_t100236324, ___isUnixFilePath_0)); }
inline bool get_isUnixFilePath_0() const { return ___isUnixFilePath_0; }
inline bool* get_address_of_isUnixFilePath_0() { return &___isUnixFilePath_0; }
inline void set_isUnixFilePath_0(bool value)
{
___isUnixFilePath_0 = value;
}
inline static int32_t get_offset_of_source_1() { return static_cast<int32_t>(offsetof(Uri_t100236324, ___source_1)); }
inline String_t* get_source_1() const { return ___source_1; }
inline String_t** get_address_of_source_1() { return &___source_1; }
inline void set_source_1(String_t* value)
{
___source_1 = value;
Il2CppCodeGenWriteBarrier((&___source_1), value);
}
inline static int32_t get_offset_of_scheme_2() { return static_cast<int32_t>(offsetof(Uri_t100236324, ___scheme_2)); }
inline String_t* get_scheme_2() const { return ___scheme_2; }
inline String_t** get_address_of_scheme_2() { return &___scheme_2; }
inline void set_scheme_2(String_t* value)
{
___scheme_2 = value;
Il2CppCodeGenWriteBarrier((&___scheme_2), value);
}
inline static int32_t get_offset_of_host_3() { return static_cast<int32_t>(offsetof(Uri_t100236324, ___host_3)); }
inline String_t* get_host_3() const { return ___host_3; }
inline String_t** get_address_of_host_3() { return &___host_3; }
inline void set_host_3(String_t* value)
{
___host_3 = value;
Il2CppCodeGenWriteBarrier((&___host_3), value);
}
inline static int32_t get_offset_of_port_4() { return static_cast<int32_t>(offsetof(Uri_t100236324, ___port_4)); }
inline int32_t get_port_4() const { return ___port_4; }
inline int32_t* get_address_of_port_4() { return &___port_4; }
inline void set_port_4(int32_t value)
{
___port_4 = value;
}
inline static int32_t get_offset_of_path_5() { return static_cast<int32_t>(offsetof(Uri_t100236324, ___path_5)); }
inline String_t* get_path_5() const { return ___path_5; }
inline String_t** get_address_of_path_5() { return &___path_5; }
inline void set_path_5(String_t* value)
{
___path_5 = value;
Il2CppCodeGenWriteBarrier((&___path_5), value);
}
inline static int32_t get_offset_of_query_6() { return static_cast<int32_t>(offsetof(Uri_t100236324, ___query_6)); }
inline String_t* get_query_6() const { return ___query_6; }
inline String_t** get_address_of_query_6() { return &___query_6; }
inline void set_query_6(String_t* value)
{
___query_6 = value;
Il2CppCodeGenWriteBarrier((&___query_6), value);
}
inline static int32_t get_offset_of_fragment_7() { return static_cast<int32_t>(offsetof(Uri_t100236324, ___fragment_7)); }
inline String_t* get_fragment_7() const { return ___fragment_7; }
inline String_t** get_address_of_fragment_7() { return &___fragment_7; }
inline void set_fragment_7(String_t* value)
{
___fragment_7 = value;
Il2CppCodeGenWriteBarrier((&___fragment_7), value);
}
inline static int32_t get_offset_of_userinfo_8() { return static_cast<int32_t>(offsetof(Uri_t100236324, ___userinfo_8)); }
inline String_t* get_userinfo_8() const { return ___userinfo_8; }
inline String_t** get_address_of_userinfo_8() { return &___userinfo_8; }
inline void set_userinfo_8(String_t* value)
{
___userinfo_8 = value;
Il2CppCodeGenWriteBarrier((&___userinfo_8), value);
}
inline static int32_t get_offset_of_isUnc_9() { return static_cast<int32_t>(offsetof(Uri_t100236324, ___isUnc_9)); }
inline bool get_isUnc_9() const { return ___isUnc_9; }
inline bool* get_address_of_isUnc_9() { return &___isUnc_9; }
inline void set_isUnc_9(bool value)
{
___isUnc_9 = value;
}
inline static int32_t get_offset_of_isOpaquePart_10() { return static_cast<int32_t>(offsetof(Uri_t100236324, ___isOpaquePart_10)); }
inline bool get_isOpaquePart_10() const { return ___isOpaquePart_10; }
inline bool* get_address_of_isOpaquePart_10() { return &___isOpaquePart_10; }
inline void set_isOpaquePart_10(bool value)
{
___isOpaquePart_10 = value;
}
inline static int32_t get_offset_of_isAbsoluteUri_11() { return static_cast<int32_t>(offsetof(Uri_t100236324, ___isAbsoluteUri_11)); }
inline bool get_isAbsoluteUri_11() const { return ___isAbsoluteUri_11; }
inline bool* get_address_of_isAbsoluteUri_11() { return &___isAbsoluteUri_11; }
inline void set_isAbsoluteUri_11(bool value)
{
___isAbsoluteUri_11 = value;
}
inline static int32_t get_offset_of_userEscaped_12() { return static_cast<int32_t>(offsetof(Uri_t100236324, ___userEscaped_12)); }
inline bool get_userEscaped_12() const { return ___userEscaped_12; }
inline bool* get_address_of_userEscaped_12() { return &___userEscaped_12; }
inline void set_userEscaped_12(bool value)
{
___userEscaped_12 = value;
}
inline static int32_t get_offset_of_cachedAbsoluteUri_13() { return static_cast<int32_t>(offsetof(Uri_t100236324, ___cachedAbsoluteUri_13)); }
inline String_t* get_cachedAbsoluteUri_13() const { return ___cachedAbsoluteUri_13; }
inline String_t** get_address_of_cachedAbsoluteUri_13() { return &___cachedAbsoluteUri_13; }
inline void set_cachedAbsoluteUri_13(String_t* value)
{
___cachedAbsoluteUri_13 = value;
Il2CppCodeGenWriteBarrier((&___cachedAbsoluteUri_13), value);
}
inline static int32_t get_offset_of_cachedToString_14() { return static_cast<int32_t>(offsetof(Uri_t100236324, ___cachedToString_14)); }
inline String_t* get_cachedToString_14() const { return ___cachedToString_14; }
inline String_t** get_address_of_cachedToString_14() { return &___cachedToString_14; }
inline void set_cachedToString_14(String_t* value)
{
___cachedToString_14 = value;
Il2CppCodeGenWriteBarrier((&___cachedToString_14), value);
}
inline static int32_t get_offset_of_cachedHashCode_15() { return static_cast<int32_t>(offsetof(Uri_t100236324, ___cachedHashCode_15)); }
inline int32_t get_cachedHashCode_15() const { return ___cachedHashCode_15; }
inline int32_t* get_address_of_cachedHashCode_15() { return &___cachedHashCode_15; }
inline void set_cachedHashCode_15(int32_t value)
{
___cachedHashCode_15 = value;
}
inline static int32_t get_offset_of_parser_29() { return static_cast<int32_t>(offsetof(Uri_t100236324, ___parser_29)); }
inline UriParser_t3890150400 * get_parser_29() const { return ___parser_29; }
inline UriParser_t3890150400 ** get_address_of_parser_29() { return &___parser_29; }
inline void set_parser_29(UriParser_t3890150400 * value)
{
___parser_29 = value;
Il2CppCodeGenWriteBarrier((&___parser_29), value);
}
};
struct Uri_t100236324_StaticFields
{
public:
// System.String System.Uri::hexUpperChars
String_t* ___hexUpperChars_16;
// System.String System.Uri::SchemeDelimiter
String_t* ___SchemeDelimiter_17;
// System.String System.Uri::UriSchemeFile
String_t* ___UriSchemeFile_18;
// System.String System.Uri::UriSchemeFtp
String_t* ___UriSchemeFtp_19;
// System.String System.Uri::UriSchemeGopher
String_t* ___UriSchemeGopher_20;
// System.String System.Uri::UriSchemeHttp
String_t* ___UriSchemeHttp_21;
// System.String System.Uri::UriSchemeHttps
String_t* ___UriSchemeHttps_22;
// System.String System.Uri::UriSchemeMailto
String_t* ___UriSchemeMailto_23;
// System.String System.Uri::UriSchemeNews
String_t* ___UriSchemeNews_24;
// System.String System.Uri::UriSchemeNntp
String_t* ___UriSchemeNntp_25;
// System.String System.Uri::UriSchemeNetPipe
String_t* ___UriSchemeNetPipe_26;
// System.String System.Uri::UriSchemeNetTcp
String_t* ___UriSchemeNetTcp_27;
// System.Uri/UriScheme[] System.Uri::schemes
UriSchemeU5BU5D_t2082808316* ___schemes_28;
// System.Collections.Generic.Dictionary`2<System.String,System.Int32> System.Uri::<>f__switch$map14
Dictionary_2_t2736202052 * ___U3CU3Ef__switchU24map14_30;
// System.Collections.Generic.Dictionary`2<System.String,System.Int32> System.Uri::<>f__switch$map15
Dictionary_2_t2736202052 * ___U3CU3Ef__switchU24map15_31;
// System.Collections.Generic.Dictionary`2<System.String,System.Int32> System.Uri::<>f__switch$map16
Dictionary_2_t2736202052 * ___U3CU3Ef__switchU24map16_32;
public:
inline static int32_t get_offset_of_hexUpperChars_16() { return static_cast<int32_t>(offsetof(Uri_t100236324_StaticFields, ___hexUpperChars_16)); }
inline String_t* get_hexUpperChars_16() const { return ___hexUpperChars_16; }
inline String_t** get_address_of_hexUpperChars_16() { return &___hexUpperChars_16; }
inline void set_hexUpperChars_16(String_t* value)
{
___hexUpperChars_16 = value;
Il2CppCodeGenWriteBarrier((&___hexUpperChars_16), value);
}
inline static int32_t get_offset_of_SchemeDelimiter_17() { return static_cast<int32_t>(offsetof(Uri_t100236324_StaticFields, ___SchemeDelimiter_17)); }
inline String_t* get_SchemeDelimiter_17() const { return ___SchemeDelimiter_17; }
inline String_t** get_address_of_SchemeDelimiter_17() { return &___SchemeDelimiter_17; }
inline void set_SchemeDelimiter_17(String_t* value)
{
___SchemeDelimiter_17 = value;
Il2CppCodeGenWriteBarrier((&___SchemeDelimiter_17), value);
}
inline static int32_t get_offset_of_UriSchemeFile_18() { return static_cast<int32_t>(offsetof(Uri_t100236324_StaticFields, ___UriSchemeFile_18)); }
inline String_t* get_UriSchemeFile_18() const { return ___UriSchemeFile_18; }
inline String_t** get_address_of_UriSchemeFile_18() { return &___UriSchemeFile_18; }
inline void set_UriSchemeFile_18(String_t* value)
{
___UriSchemeFile_18 = value;
Il2CppCodeGenWriteBarrier((&___UriSchemeFile_18), value);
}
inline static int32_t get_offset_of_UriSchemeFtp_19() { return static_cast<int32_t>(offsetof(Uri_t100236324_StaticFields, ___UriSchemeFtp_19)); }
inline String_t* get_UriSchemeFtp_19() const { return ___UriSchemeFtp_19; }
inline String_t** get_address_of_UriSchemeFtp_19() { return &___UriSchemeFtp_19; }
inline void set_UriSchemeFtp_19(String_t* value)
{
___UriSchemeFtp_19 = value;
Il2CppCodeGenWriteBarrier((&___UriSchemeFtp_19), value);
}
inline static int32_t get_offset_of_UriSchemeGopher_20() { return static_cast<int32_t>(offsetof(Uri_t100236324_StaticFields, ___UriSchemeGopher_20)); }
inline String_t* get_UriSchemeGopher_20() const { return ___UriSchemeGopher_20; }
inline String_t** get_address_of_UriSchemeGopher_20() { return &___UriSchemeGopher_20; }
inline void set_UriSchemeGopher_20(String_t* value)
{
___UriSchemeGopher_20 = value;
Il2CppCodeGenWriteBarrier((&___UriSchemeGopher_20), value);
}
inline static int32_t get_offset_of_UriSchemeHttp_21() { return static_cast<int32_t>(offsetof(Uri_t100236324_StaticFields, ___UriSchemeHttp_21)); }
inline String_t* get_UriSchemeHttp_21() const { return ___UriSchemeHttp_21; }
inline String_t** get_address_of_UriSchemeHttp_21() { return &___UriSchemeHttp_21; }
inline void set_UriSchemeHttp_21(String_t* value)
{
___UriSchemeHttp_21 = value;
Il2CppCodeGenWriteBarrier((&___UriSchemeHttp_21), value);
}
inline static int32_t get_offset_of_UriSchemeHttps_22() { return static_cast<int32_t>(offsetof(Uri_t100236324_StaticFields, ___UriSchemeHttps_22)); }
inline String_t* get_UriSchemeHttps_22() const { return ___UriSchemeHttps_22; }
inline String_t** get_address_of_UriSchemeHttps_22() { return &___UriSchemeHttps_22; }
inline void set_UriSchemeHttps_22(String_t* value)
{
___UriSchemeHttps_22 = value;
Il2CppCodeGenWriteBarrier((&___UriSchemeHttps_22), value);
}
inline static int32_t get_offset_of_UriSchemeMailto_23() { return static_cast<int32_t>(offsetof(Uri_t100236324_StaticFields, ___UriSchemeMailto_23)); }
inline String_t* get_UriSchemeMailto_23() const { return ___UriSchemeMailto_23; }
inline String_t** get_address_of_UriSchemeMailto_23() { return &___UriSchemeMailto_23; }
inline void set_UriSchemeMailto_23(String_t* value)
{
___UriSchemeMailto_23 = value;
Il2CppCodeGenWriteBarrier((&___UriSchemeMailto_23), value);
}
inline static int32_t get_offset_of_UriSchemeNews_24() { return static_cast<int32_t>(offsetof(Uri_t100236324_StaticFields, ___UriSchemeNews_24)); }
inline String_t* get_UriSchemeNews_24() const { return ___UriSchemeNews_24; }
inline String_t** get_address_of_UriSchemeNews_24() { return &___UriSchemeNews_24; }
inline void set_UriSchemeNews_24(String_t* value)
{
___UriSchemeNews_24 = value;
Il2CppCodeGenWriteBarrier((&___UriSchemeNews_24), value);
}
inline static int32_t get_offset_of_UriSchemeNntp_25() { return static_cast<int32_t>(offsetof(Uri_t100236324_StaticFields, ___UriSchemeNntp_25)); }
inline String_t* get_UriSchemeNntp_25() const { return ___UriSchemeNntp_25; }
inline String_t** get_address_of_UriSchemeNntp_25() { return &___UriSchemeNntp_25; }
inline void set_UriSchemeNntp_25(String_t* value)
{
___UriSchemeNntp_25 = value;
Il2CppCodeGenWriteBarrier((&___UriSchemeNntp_25), value);
}
inline static int32_t get_offset_of_UriSchemeNetPipe_26() { return static_cast<int32_t>(offsetof(Uri_t100236324_StaticFields, ___UriSchemeNetPipe_26)); }
inline String_t* get_UriSchemeNetPipe_26() const { return ___UriSchemeNetPipe_26; }
inline String_t** get_address_of_UriSchemeNetPipe_26() { return &___UriSchemeNetPipe_26; }
inline void set_UriSchemeNetPipe_26(String_t* value)
{
___UriSchemeNetPipe_26 = value;
Il2CppCodeGenWriteBarrier((&___UriSchemeNetPipe_26), value);
}
inline static int32_t get_offset_of_UriSchemeNetTcp_27() { return static_cast<int32_t>(offsetof(Uri_t100236324_StaticFields, ___UriSchemeNetTcp_27)); }
inline String_t* get_UriSchemeNetTcp_27() const { return ___UriSchemeNetTcp_27; }
inline String_t** get_address_of_UriSchemeNetTcp_27() { return &___UriSchemeNetTcp_27; }
inline void set_UriSchemeNetTcp_27(String_t* value)
{
___UriSchemeNetTcp_27 = value;
Il2CppCodeGenWriteBarrier((&___UriSchemeNetTcp_27), value);
}
inline static int32_t get_offset_of_schemes_28() { return static_cast<int32_t>(offsetof(Uri_t100236324_StaticFields, ___schemes_28)); }
inline UriSchemeU5BU5D_t2082808316* get_schemes_28() const { return ___schemes_28; }
inline UriSchemeU5BU5D_t2082808316** get_address_of_schemes_28() { return &___schemes_28; }
inline void set_schemes_28(UriSchemeU5BU5D_t2082808316* value)
{
___schemes_28 = value;
Il2CppCodeGenWriteBarrier((&___schemes_28), value);
}
inline static int32_t get_offset_of_U3CU3Ef__switchU24map14_30() { return static_cast<int32_t>(offsetof(Uri_t100236324_StaticFields, ___U3CU3Ef__switchU24map14_30)); }
inline Dictionary_2_t2736202052 * get_U3CU3Ef__switchU24map14_30() const { return ___U3CU3Ef__switchU24map14_30; }
inline Dictionary_2_t2736202052 ** get_address_of_U3CU3Ef__switchU24map14_30() { return &___U3CU3Ef__switchU24map14_30; }
inline void set_U3CU3Ef__switchU24map14_30(Dictionary_2_t2736202052 * value)
{
___U3CU3Ef__switchU24map14_30 = value;
Il2CppCodeGenWriteBarrier((&___U3CU3Ef__switchU24map14_30), value);
}
inline static int32_t get_offset_of_U3CU3Ef__switchU24map15_31() { return static_cast<int32_t>(offsetof(Uri_t100236324_StaticFields, ___U3CU3Ef__switchU24map15_31)); }
inline Dictionary_2_t2736202052 * get_U3CU3Ef__switchU24map15_31() const { return ___U3CU3Ef__switchU24map15_31; }
inline Dictionary_2_t2736202052 ** get_address_of_U3CU3Ef__switchU24map15_31() { return &___U3CU3Ef__switchU24map15_31; }
inline void set_U3CU3Ef__switchU24map15_31(Dictionary_2_t2736202052 * value)
{
___U3CU3Ef__switchU24map15_31 = value;
Il2CppCodeGenWriteBarrier((&___U3CU3Ef__switchU24map15_31), value);
}
inline static int32_t get_offset_of_U3CU3Ef__switchU24map16_32() { return static_cast<int32_t>(offsetof(Uri_t100236324_StaticFields, ___U3CU3Ef__switchU24map16_32)); }
inline Dictionary_2_t2736202052 * get_U3CU3Ef__switchU24map16_32() const { return ___U3CU3Ef__switchU24map16_32; }
inline Dictionary_2_t2736202052 ** get_address_of_U3CU3Ef__switchU24map16_32() { return &___U3CU3Ef__switchU24map16_32; }
inline void set_U3CU3Ef__switchU24map16_32(Dictionary_2_t2736202052 * value)
{
___U3CU3Ef__switchU24map16_32 = value;
Il2CppCodeGenWriteBarrier((&___U3CU3Ef__switchU24map16_32), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // URI_T100236324_H
#ifndef VALUETYPE_T3640485471_H
#define VALUETYPE_T3640485471_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.ValueType
struct ValueType_t3640485471 : public RuntimeObject
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
// Native definition for P/Invoke marshalling of System.ValueType
struct ValueType_t3640485471_marshaled_pinvoke
{
};
// Native definition for COM marshalling of System.ValueType
struct ValueType_t3640485471_marshaled_com
{
};
#endif // VALUETYPE_T3640485471_H
#ifndef U24ARRAYTYPEU2412_T2490092598_H
#define U24ARRAYTYPEU2412_T2490092598_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// <PrivateImplementationDetails>/$ArrayType$12
struct U24ArrayTypeU2412_t2490092598
{
public:
union
{
struct
{
union
{
};
};
uint8_t U24ArrayTypeU2412_t2490092598__padding[12];
};
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // U24ARRAYTYPEU2412_T2490092598_H
#ifndef U24ARRAYTYPEU2416_T3254766645_H
#define U24ARRAYTYPEU2416_T3254766645_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// <PrivateImplementationDetails>/$ArrayType$16
struct U24ArrayTypeU2416_t3254766645
{
public:
union
{
struct
{
union
{
};
};
uint8_t U24ArrayTypeU2416_t3254766645__padding[16];
};
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // U24ARRAYTYPEU2416_T3254766645_H
#ifndef U24ARRAYTYPEU2420_T1704471046_H
#define U24ARRAYTYPEU2420_T1704471046_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// <PrivateImplementationDetails>/$ArrayType$20
struct U24ArrayTypeU2420_t1704471046
{
public:
union
{
struct
{
union
{
};
};
uint8_t U24ArrayTypeU2420_t1704471046__padding[20];
};
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // U24ARRAYTYPEU2420_T1704471046_H
#ifndef U24ARRAYTYPEU24256_T1929481983_H
#define U24ARRAYTYPEU24256_T1929481983_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// <PrivateImplementationDetails>/$ArrayType$256
struct U24ArrayTypeU24256_t1929481983
{
public:
union
{
struct
{
union
{
};
};
uint8_t U24ArrayTypeU24256_t1929481983__padding[256];
};
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // U24ARRAYTYPEU24256_T1929481983_H
#ifndef U24ARRAYTYPEU243132_T2732071529_H
#define U24ARRAYTYPEU243132_T2732071529_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// <PrivateImplementationDetails>/$ArrayType$3132
struct U24ArrayTypeU243132_t2732071529
{
public:
union
{
struct
{
union
{
};
};
uint8_t U24ArrayTypeU243132_t2732071529__padding[3132];
};
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // U24ARRAYTYPEU243132_T2732071529_H
#ifndef U24ARRAYTYPEU2432_T3652892011_H
#define U24ARRAYTYPEU2432_T3652892011_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// <PrivateImplementationDetails>/$ArrayType$32
struct U24ArrayTypeU2432_t3652892011
{
public:
union
{
struct
{
union
{
};
};
uint8_t U24ArrayTypeU2432_t3652892011__padding[32];
};
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // U24ARRAYTYPEU2432_T3652892011_H
#ifndef U24ARRAYTYPEU244_T1630999355_H
#define U24ARRAYTYPEU244_T1630999355_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// <PrivateImplementationDetails>/$ArrayType$4
struct U24ArrayTypeU244_t1630999355
{
public:
union
{
struct
{
union
{
};
};
uint8_t U24ArrayTypeU244_t1630999355__padding[4];
};
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // U24ARRAYTYPEU244_T1630999355_H
#ifndef U24ARRAYTYPEU2448_T1337922364_H
#define U24ARRAYTYPEU2448_T1337922364_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// <PrivateImplementationDetails>/$ArrayType$48
struct U24ArrayTypeU2448_t1337922364
{
public:
union
{
struct
{
union
{
};
};
uint8_t U24ArrayTypeU2448_t1337922364__padding[48];
};
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // U24ARRAYTYPEU2448_T1337922364_H
#ifndef U24ARRAYTYPEU2464_T499776626_H
#define U24ARRAYTYPEU2464_T499776626_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// <PrivateImplementationDetails>/$ArrayType$64
struct U24ArrayTypeU2464_t499776626
{
public:
union
{
struct
{
union
{
};
};
uint8_t U24ArrayTypeU2464_t499776626__padding[64];
};
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // U24ARRAYTYPEU2464_T499776626_H
#ifndef SEQUENTIALSEARCHPRIMEGENERATORBASE_T2996090509_H
#define SEQUENTIALSEARCHPRIMEGENERATORBASE_T2996090509_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Math.Prime.Generator.SequentialSearchPrimeGeneratorBase
struct SequentialSearchPrimeGeneratorBase_t2996090509 : public PrimeGeneratorBase_t446028867
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // SEQUENTIALSEARCHPRIMEGENERATORBASE_T2996090509_H
#ifndef MD2_T1561046427_H
#define MD2_T1561046427_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Cryptography.MD2
struct MD2_t1561046427 : public HashAlgorithm_t1432317219
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // MD2_T1561046427_H
#ifndef MD4_T1560915355_H
#define MD4_T1560915355_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Cryptography.MD4
struct MD4_t1560915355 : public HashAlgorithm_t1432317219
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // MD4_T1560915355_H
#ifndef MD5SHA1_T723838944_H
#define MD5SHA1_T723838944_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Cryptography.MD5SHA1
struct MD5SHA1_t723838944 : public HashAlgorithm_t1432317219
{
public:
// System.Security.Cryptography.HashAlgorithm Mono.Security.Cryptography.MD5SHA1::md5
HashAlgorithm_t1432317219 * ___md5_4;
// System.Security.Cryptography.HashAlgorithm Mono.Security.Cryptography.MD5SHA1::sha
HashAlgorithm_t1432317219 * ___sha_5;
// System.Boolean Mono.Security.Cryptography.MD5SHA1::hashing
bool ___hashing_6;
public:
inline static int32_t get_offset_of_md5_4() { return static_cast<int32_t>(offsetof(MD5SHA1_t723838944, ___md5_4)); }
inline HashAlgorithm_t1432317219 * get_md5_4() const { return ___md5_4; }
inline HashAlgorithm_t1432317219 ** get_address_of_md5_4() { return &___md5_4; }
inline void set_md5_4(HashAlgorithm_t1432317219 * value)
{
___md5_4 = value;
Il2CppCodeGenWriteBarrier((&___md5_4), value);
}
inline static int32_t get_offset_of_sha_5() { return static_cast<int32_t>(offsetof(MD5SHA1_t723838944, ___sha_5)); }
inline HashAlgorithm_t1432317219 * get_sha_5() const { return ___sha_5; }
inline HashAlgorithm_t1432317219 ** get_address_of_sha_5() { return &___sha_5; }
inline void set_sha_5(HashAlgorithm_t1432317219 * value)
{
___sha_5 = value;
Il2CppCodeGenWriteBarrier((&___sha_5), value);
}
inline static int32_t get_offset_of_hashing_6() { return static_cast<int32_t>(offsetof(MD5SHA1_t723838944, ___hashing_6)); }
inline bool get_hashing_6() const { return ___hashing_6; }
inline bool* get_address_of_hashing_6() { return &___hashing_6; }
inline void set_hashing_6(bool value)
{
___hashing_6 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // MD5SHA1_T723838944_H
#ifndef CLIENTRECORDPROTOCOL_T2031137796_H
#define CLIENTRECORDPROTOCOL_T2031137796_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Protocol.Tls.ClientRecordProtocol
struct ClientRecordProtocol_t2031137796 : public RecordProtocol_t3759049701
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // CLIENTRECORDPROTOCOL_T2031137796_H
#ifndef RSASSLSIGNATUREDEFORMATTER_T3558097625_H
#define RSASSLSIGNATUREDEFORMATTER_T3558097625_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Protocol.Tls.RSASslSignatureDeformatter
struct RSASslSignatureDeformatter_t3558097625 : public AsymmetricSignatureDeformatter_t2681190756
{
public:
// System.Security.Cryptography.RSA Mono.Security.Protocol.Tls.RSASslSignatureDeformatter::key
RSA_t2385438082 * ___key_0;
// System.Security.Cryptography.HashAlgorithm Mono.Security.Protocol.Tls.RSASslSignatureDeformatter::hash
HashAlgorithm_t1432317219 * ___hash_1;
public:
inline static int32_t get_offset_of_key_0() { return static_cast<int32_t>(offsetof(RSASslSignatureDeformatter_t3558097625, ___key_0)); }
inline RSA_t2385438082 * get_key_0() const { return ___key_0; }
inline RSA_t2385438082 ** get_address_of_key_0() { return &___key_0; }
inline void set_key_0(RSA_t2385438082 * value)
{
___key_0 = value;
Il2CppCodeGenWriteBarrier((&___key_0), value);
}
inline static int32_t get_offset_of_hash_1() { return static_cast<int32_t>(offsetof(RSASslSignatureDeformatter_t3558097625, ___hash_1)); }
inline HashAlgorithm_t1432317219 * get_hash_1() const { return ___hash_1; }
inline HashAlgorithm_t1432317219 ** get_address_of_hash_1() { return &___hash_1; }
inline void set_hash_1(HashAlgorithm_t1432317219 * value)
{
___hash_1 = value;
Il2CppCodeGenWriteBarrier((&___hash_1), value);
}
};
struct RSASslSignatureDeformatter_t3558097625_StaticFields
{
public:
// System.Collections.Generic.Dictionary`2<System.String,System.Int32> Mono.Security.Protocol.Tls.RSASslSignatureDeformatter::<>f__switch$map15
Dictionary_2_t2736202052 * ___U3CU3Ef__switchU24map15_2;
public:
inline static int32_t get_offset_of_U3CU3Ef__switchU24map15_2() { return static_cast<int32_t>(offsetof(RSASslSignatureDeformatter_t3558097625_StaticFields, ___U3CU3Ef__switchU24map15_2)); }
inline Dictionary_2_t2736202052 * get_U3CU3Ef__switchU24map15_2() const { return ___U3CU3Ef__switchU24map15_2; }
inline Dictionary_2_t2736202052 ** get_address_of_U3CU3Ef__switchU24map15_2() { return &___U3CU3Ef__switchU24map15_2; }
inline void set_U3CU3Ef__switchU24map15_2(Dictionary_2_t2736202052 * value)
{
___U3CU3Ef__switchU24map15_2 = value;
Il2CppCodeGenWriteBarrier((&___U3CU3Ef__switchU24map15_2), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // RSASSLSIGNATUREDEFORMATTER_T3558097625_H
#ifndef RSASSLSIGNATUREFORMATTER_T2709678514_H
#define RSASSLSIGNATUREFORMATTER_T2709678514_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Protocol.Tls.RSASslSignatureFormatter
struct RSASslSignatureFormatter_t2709678514 : public AsymmetricSignatureFormatter_t3486936014
{
public:
// System.Security.Cryptography.RSA Mono.Security.Protocol.Tls.RSASslSignatureFormatter::key
RSA_t2385438082 * ___key_0;
// System.Security.Cryptography.HashAlgorithm Mono.Security.Protocol.Tls.RSASslSignatureFormatter::hash
HashAlgorithm_t1432317219 * ___hash_1;
public:
inline static int32_t get_offset_of_key_0() { return static_cast<int32_t>(offsetof(RSASslSignatureFormatter_t2709678514, ___key_0)); }
inline RSA_t2385438082 * get_key_0() const { return ___key_0; }
inline RSA_t2385438082 ** get_address_of_key_0() { return &___key_0; }
inline void set_key_0(RSA_t2385438082 * value)
{
___key_0 = value;
Il2CppCodeGenWriteBarrier((&___key_0), value);
}
inline static int32_t get_offset_of_hash_1() { return static_cast<int32_t>(offsetof(RSASslSignatureFormatter_t2709678514, ___hash_1)); }
inline HashAlgorithm_t1432317219 * get_hash_1() const { return ___hash_1; }
inline HashAlgorithm_t1432317219 ** get_address_of_hash_1() { return &___hash_1; }
inline void set_hash_1(HashAlgorithm_t1432317219 * value)
{
___hash_1 = value;
Il2CppCodeGenWriteBarrier((&___hash_1), value);
}
};
struct RSASslSignatureFormatter_t2709678514_StaticFields
{
public:
// System.Collections.Generic.Dictionary`2<System.String,System.Int32> Mono.Security.Protocol.Tls.RSASslSignatureFormatter::<>f__switch$map16
Dictionary_2_t2736202052 * ___U3CU3Ef__switchU24map16_2;
public:
inline static int32_t get_offset_of_U3CU3Ef__switchU24map16_2() { return static_cast<int32_t>(offsetof(RSASslSignatureFormatter_t2709678514_StaticFields, ___U3CU3Ef__switchU24map16_2)); }
inline Dictionary_2_t2736202052 * get_U3CU3Ef__switchU24map16_2() const { return ___U3CU3Ef__switchU24map16_2; }
inline Dictionary_2_t2736202052 ** get_address_of_U3CU3Ef__switchU24map16_2() { return &___U3CU3Ef__switchU24map16_2; }
inline void set_U3CU3Ef__switchU24map16_2(Dictionary_2_t2736202052 * value)
{
___U3CU3Ef__switchU24map16_2 = value;
Il2CppCodeGenWriteBarrier((&___U3CU3Ef__switchU24map16_2), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // RSASSLSIGNATUREFORMATTER_T2709678514_H
#ifndef SSLHANDSHAKEHASH_T2107581772_H
#define SSLHANDSHAKEHASH_T2107581772_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Protocol.Tls.SslHandshakeHash
struct SslHandshakeHash_t2107581772 : public HashAlgorithm_t1432317219
{
public:
// System.Security.Cryptography.HashAlgorithm Mono.Security.Protocol.Tls.SslHandshakeHash::md5
HashAlgorithm_t1432317219 * ___md5_4;
// System.Security.Cryptography.HashAlgorithm Mono.Security.Protocol.Tls.SslHandshakeHash::sha
HashAlgorithm_t1432317219 * ___sha_5;
// System.Boolean Mono.Security.Protocol.Tls.SslHandshakeHash::hashing
bool ___hashing_6;
// System.Byte[] Mono.Security.Protocol.Tls.SslHandshakeHash::secret
ByteU5BU5D_t4116647657* ___secret_7;
// System.Byte[] Mono.Security.Protocol.Tls.SslHandshakeHash::innerPadMD5
ByteU5BU5D_t4116647657* ___innerPadMD5_8;
// System.Byte[] Mono.Security.Protocol.Tls.SslHandshakeHash::outerPadMD5
ByteU5BU5D_t4116647657* ___outerPadMD5_9;
// System.Byte[] Mono.Security.Protocol.Tls.SslHandshakeHash::innerPadSHA
ByteU5BU5D_t4116647657* ___innerPadSHA_10;
// System.Byte[] Mono.Security.Protocol.Tls.SslHandshakeHash::outerPadSHA
ByteU5BU5D_t4116647657* ___outerPadSHA_11;
public:
inline static int32_t get_offset_of_md5_4() { return static_cast<int32_t>(offsetof(SslHandshakeHash_t2107581772, ___md5_4)); }
inline HashAlgorithm_t1432317219 * get_md5_4() const { return ___md5_4; }
inline HashAlgorithm_t1432317219 ** get_address_of_md5_4() { return &___md5_4; }
inline void set_md5_4(HashAlgorithm_t1432317219 * value)
{
___md5_4 = value;
Il2CppCodeGenWriteBarrier((&___md5_4), value);
}
inline static int32_t get_offset_of_sha_5() { return static_cast<int32_t>(offsetof(SslHandshakeHash_t2107581772, ___sha_5)); }
inline HashAlgorithm_t1432317219 * get_sha_5() const { return ___sha_5; }
inline HashAlgorithm_t1432317219 ** get_address_of_sha_5() { return &___sha_5; }
inline void set_sha_5(HashAlgorithm_t1432317219 * value)
{
___sha_5 = value;
Il2CppCodeGenWriteBarrier((&___sha_5), value);
}
inline static int32_t get_offset_of_hashing_6() { return static_cast<int32_t>(offsetof(SslHandshakeHash_t2107581772, ___hashing_6)); }
inline bool get_hashing_6() const { return ___hashing_6; }
inline bool* get_address_of_hashing_6() { return &___hashing_6; }
inline void set_hashing_6(bool value)
{
___hashing_6 = value;
}
inline static int32_t get_offset_of_secret_7() { return static_cast<int32_t>(offsetof(SslHandshakeHash_t2107581772, ___secret_7)); }
inline ByteU5BU5D_t4116647657* get_secret_7() const { return ___secret_7; }
inline ByteU5BU5D_t4116647657** get_address_of_secret_7() { return &___secret_7; }
inline void set_secret_7(ByteU5BU5D_t4116647657* value)
{
___secret_7 = value;
Il2CppCodeGenWriteBarrier((&___secret_7), value);
}
inline static int32_t get_offset_of_innerPadMD5_8() { return static_cast<int32_t>(offsetof(SslHandshakeHash_t2107581772, ___innerPadMD5_8)); }
inline ByteU5BU5D_t4116647657* get_innerPadMD5_8() const { return ___innerPadMD5_8; }
inline ByteU5BU5D_t4116647657** get_address_of_innerPadMD5_8() { return &___innerPadMD5_8; }
inline void set_innerPadMD5_8(ByteU5BU5D_t4116647657* value)
{
___innerPadMD5_8 = value;
Il2CppCodeGenWriteBarrier((&___innerPadMD5_8), value);
}
inline static int32_t get_offset_of_outerPadMD5_9() { return static_cast<int32_t>(offsetof(SslHandshakeHash_t2107581772, ___outerPadMD5_9)); }
inline ByteU5BU5D_t4116647657* get_outerPadMD5_9() const { return ___outerPadMD5_9; }
inline ByteU5BU5D_t4116647657** get_address_of_outerPadMD5_9() { return &___outerPadMD5_9; }
inline void set_outerPadMD5_9(ByteU5BU5D_t4116647657* value)
{
___outerPadMD5_9 = value;
Il2CppCodeGenWriteBarrier((&___outerPadMD5_9), value);
}
inline static int32_t get_offset_of_innerPadSHA_10() { return static_cast<int32_t>(offsetof(SslHandshakeHash_t2107581772, ___innerPadSHA_10)); }
inline ByteU5BU5D_t4116647657* get_innerPadSHA_10() const { return ___innerPadSHA_10; }
inline ByteU5BU5D_t4116647657** get_address_of_innerPadSHA_10() { return &___innerPadSHA_10; }
inline void set_innerPadSHA_10(ByteU5BU5D_t4116647657* value)
{
___innerPadSHA_10 = value;
Il2CppCodeGenWriteBarrier((&___innerPadSHA_10), value);
}
inline static int32_t get_offset_of_outerPadSHA_11() { return static_cast<int32_t>(offsetof(SslHandshakeHash_t2107581772, ___outerPadSHA_11)); }
inline ByteU5BU5D_t4116647657* get_outerPadSHA_11() const { return ___outerPadSHA_11; }
inline ByteU5BU5D_t4116647657** get_address_of_outerPadSHA_11() { return &___outerPadSHA_11; }
inline void set_outerPadSHA_11(ByteU5BU5D_t4116647657* value)
{
___outerPadSHA_11 = value;
Il2CppCodeGenWriteBarrier((&___outerPadSHA_11), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // SSLHANDSHAKEHASH_T2107581772_H
#ifndef TLSEXCEPTION_T3534743363_H
#define TLSEXCEPTION_T3534743363_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Protocol.Tls.TlsException
struct TlsException_t3534743363 : public Exception_t
{
public:
// Mono.Security.Protocol.Tls.Alert Mono.Security.Protocol.Tls.TlsException::alert
Alert_t4059934885 * ___alert_11;
public:
inline static int32_t get_offset_of_alert_11() { return static_cast<int32_t>(offsetof(TlsException_t3534743363, ___alert_11)); }
inline Alert_t4059934885 * get_alert_11() const { return ___alert_11; }
inline Alert_t4059934885 ** get_address_of_alert_11() { return &___alert_11; }
inline void set_alert_11(Alert_t4059934885 * value)
{
___alert_11 = value;
Il2CppCodeGenWriteBarrier((&___alert_11), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // TLSEXCEPTION_T3534743363_H
#ifndef TLSSTREAM_T2365453965_H
#define TLSSTREAM_T2365453965_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Protocol.Tls.TlsStream
struct TlsStream_t2365453965 : public Stream_t1273022909
{
public:
// System.Boolean Mono.Security.Protocol.Tls.TlsStream::canRead
bool ___canRead_1;
// System.Boolean Mono.Security.Protocol.Tls.TlsStream::canWrite
bool ___canWrite_2;
// System.IO.MemoryStream Mono.Security.Protocol.Tls.TlsStream::buffer
MemoryStream_t94973147 * ___buffer_3;
// System.Byte[] Mono.Security.Protocol.Tls.TlsStream::temp
ByteU5BU5D_t4116647657* ___temp_4;
public:
inline static int32_t get_offset_of_canRead_1() { return static_cast<int32_t>(offsetof(TlsStream_t2365453965, ___canRead_1)); }
inline bool get_canRead_1() const { return ___canRead_1; }
inline bool* get_address_of_canRead_1() { return &___canRead_1; }
inline void set_canRead_1(bool value)
{
___canRead_1 = value;
}
inline static int32_t get_offset_of_canWrite_2() { return static_cast<int32_t>(offsetof(TlsStream_t2365453965, ___canWrite_2)); }
inline bool get_canWrite_2() const { return ___canWrite_2; }
inline bool* get_address_of_canWrite_2() { return &___canWrite_2; }
inline void set_canWrite_2(bool value)
{
___canWrite_2 = value;
}
inline static int32_t get_offset_of_buffer_3() { return static_cast<int32_t>(offsetof(TlsStream_t2365453965, ___buffer_3)); }
inline MemoryStream_t94973147 * get_buffer_3() const { return ___buffer_3; }
inline MemoryStream_t94973147 ** get_address_of_buffer_3() { return &___buffer_3; }
inline void set_buffer_3(MemoryStream_t94973147 * value)
{
___buffer_3 = value;
Il2CppCodeGenWriteBarrier((&___buffer_3), value);
}
inline static int32_t get_offset_of_temp_4() { return static_cast<int32_t>(offsetof(TlsStream_t2365453965, ___temp_4)); }
inline ByteU5BU5D_t4116647657* get_temp_4() const { return ___temp_4; }
inline ByteU5BU5D_t4116647657** get_address_of_temp_4() { return &___temp_4; }
inline void set_temp_4(ByteU5BU5D_t4116647657* value)
{
___temp_4 = value;
Il2CppCodeGenWriteBarrier((&___temp_4), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // TLSSTREAM_T2365453965_H
#ifndef EXTENDEDKEYUSAGEEXTENSION_T3929363080_H
#define EXTENDEDKEYUSAGEEXTENSION_T3929363080_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.X509.Extensions.ExtendedKeyUsageExtension
struct ExtendedKeyUsageExtension_t3929363080 : public X509Extension_t3173393653
{
public:
// System.Collections.ArrayList Mono.Security.X509.Extensions.ExtendedKeyUsageExtension::keyPurpose
ArrayList_t2718874744 * ___keyPurpose_3;
public:
inline static int32_t get_offset_of_keyPurpose_3() { return static_cast<int32_t>(offsetof(ExtendedKeyUsageExtension_t3929363080, ___keyPurpose_3)); }
inline ArrayList_t2718874744 * get_keyPurpose_3() const { return ___keyPurpose_3; }
inline ArrayList_t2718874744 ** get_address_of_keyPurpose_3() { return &___keyPurpose_3; }
inline void set_keyPurpose_3(ArrayList_t2718874744 * value)
{
___keyPurpose_3 = value;
Il2CppCodeGenWriteBarrier((&___keyPurpose_3), value);
}
};
struct ExtendedKeyUsageExtension_t3929363080_StaticFields
{
public:
// System.Collections.Generic.Dictionary`2<System.String,System.Int32> Mono.Security.X509.Extensions.ExtendedKeyUsageExtension::<>f__switch$map14
Dictionary_2_t2736202052 * ___U3CU3Ef__switchU24map14_4;
public:
inline static int32_t get_offset_of_U3CU3Ef__switchU24map14_4() { return static_cast<int32_t>(offsetof(ExtendedKeyUsageExtension_t3929363080_StaticFields, ___U3CU3Ef__switchU24map14_4)); }
inline Dictionary_2_t2736202052 * get_U3CU3Ef__switchU24map14_4() const { return ___U3CU3Ef__switchU24map14_4; }
inline Dictionary_2_t2736202052 ** get_address_of_U3CU3Ef__switchU24map14_4() { return &___U3CU3Ef__switchU24map14_4; }
inline void set_U3CU3Ef__switchU24map14_4(Dictionary_2_t2736202052 * value)
{
___U3CU3Ef__switchU24map14_4 = value;
Il2CppCodeGenWriteBarrier((&___U3CU3Ef__switchU24map14_4), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // EXTENDEDKEYUSAGEEXTENSION_T3929363080_H
#ifndef KEYUSAGEEXTENSION_T1795615912_H
#define KEYUSAGEEXTENSION_T1795615912_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.X509.Extensions.KeyUsageExtension
struct KeyUsageExtension_t1795615912 : public X509Extension_t3173393653
{
public:
// System.Int32 Mono.Security.X509.Extensions.KeyUsageExtension::kubits
int32_t ___kubits_3;
public:
inline static int32_t get_offset_of_kubits_3() { return static_cast<int32_t>(offsetof(KeyUsageExtension_t1795615912, ___kubits_3)); }
inline int32_t get_kubits_3() const { return ___kubits_3; }
inline int32_t* get_address_of_kubits_3() { return &___kubits_3; }
inline void set_kubits_3(int32_t value)
{
___kubits_3 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // KEYUSAGEEXTENSION_T1795615912_H
#ifndef NETSCAPECERTTYPEEXTENSION_T1524296876_H
#define NETSCAPECERTTYPEEXTENSION_T1524296876_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.X509.Extensions.NetscapeCertTypeExtension
struct NetscapeCertTypeExtension_t1524296876 : public X509Extension_t3173393653
{
public:
// System.Int32 Mono.Security.X509.Extensions.NetscapeCertTypeExtension::ctbits
int32_t ___ctbits_3;
public:
inline static int32_t get_offset_of_ctbits_3() { return static_cast<int32_t>(offsetof(NetscapeCertTypeExtension_t1524296876, ___ctbits_3)); }
inline int32_t get_ctbits_3() const { return ___ctbits_3; }
inline int32_t* get_address_of_ctbits_3() { return &___ctbits_3; }
inline void set_ctbits_3(int32_t value)
{
___ctbits_3 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // NETSCAPECERTTYPEEXTENSION_T1524296876_H
#ifndef SUBJECTALTNAMEEXTENSION_T1536937677_H
#define SUBJECTALTNAMEEXTENSION_T1536937677_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.X509.Extensions.SubjectAltNameExtension
struct SubjectAltNameExtension_t1536937677 : public X509Extension_t3173393653
{
public:
// Mono.Security.X509.Extensions.GeneralNames Mono.Security.X509.Extensions.SubjectAltNameExtension::_names
GeneralNames_t2702294159 * ____names_3;
public:
inline static int32_t get_offset_of__names_3() { return static_cast<int32_t>(offsetof(SubjectAltNameExtension_t1536937677, ____names_3)); }
inline GeneralNames_t2702294159 * get__names_3() const { return ____names_3; }
inline GeneralNames_t2702294159 ** get_address_of__names_3() { return &____names_3; }
inline void set__names_3(GeneralNames_t2702294159 * value)
{
____names_3 = value;
Il2CppCodeGenWriteBarrier((&____names_3), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // SUBJECTALTNAMEEXTENSION_T1536937677_H
#ifndef X509CERTIFICATECOLLECTION_T1542168550_H
#define X509CERTIFICATECOLLECTION_T1542168550_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.X509.X509CertificateCollection
struct X509CertificateCollection_t1542168550 : public CollectionBase_t2727926298
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // X509CERTIFICATECOLLECTION_T1542168550_H
#ifndef X509EXTENSIONCOLLECTION_T609554709_H
#define X509EXTENSIONCOLLECTION_T609554709_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.X509.X509ExtensionCollection
struct X509ExtensionCollection_t609554709 : public CollectionBase_t2727926298
{
public:
// System.Boolean Mono.Security.X509.X509ExtensionCollection::readOnly
bool ___readOnly_1;
public:
inline static int32_t get_offset_of_readOnly_1() { return static_cast<int32_t>(offsetof(X509ExtensionCollection_t609554709, ___readOnly_1)); }
inline bool get_readOnly_1() const { return ___readOnly_1; }
inline bool* get_address_of_readOnly_1() { return &___readOnly_1; }
inline void set_readOnly_1(bool value)
{
___readOnly_1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // X509EXTENSIONCOLLECTION_T609554709_H
#ifndef BOOLEAN_T97287965_H
#define BOOLEAN_T97287965_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Boolean
struct Boolean_t97287965
{
public:
// System.Boolean System.Boolean::m_value
bool ___m_value_2;
public:
inline static int32_t get_offset_of_m_value_2() { return static_cast<int32_t>(offsetof(Boolean_t97287965, ___m_value_2)); }
inline bool get_m_value_2() const { return ___m_value_2; }
inline bool* get_address_of_m_value_2() { return &___m_value_2; }
inline void set_m_value_2(bool value)
{
___m_value_2 = value;
}
};
struct Boolean_t97287965_StaticFields
{
public:
// System.String System.Boolean::FalseString
String_t* ___FalseString_0;
// System.String System.Boolean::TrueString
String_t* ___TrueString_1;
public:
inline static int32_t get_offset_of_FalseString_0() { return static_cast<int32_t>(offsetof(Boolean_t97287965_StaticFields, ___FalseString_0)); }
inline String_t* get_FalseString_0() const { return ___FalseString_0; }
inline String_t** get_address_of_FalseString_0() { return &___FalseString_0; }
inline void set_FalseString_0(String_t* value)
{
___FalseString_0 = value;
Il2CppCodeGenWriteBarrier((&___FalseString_0), value);
}
inline static int32_t get_offset_of_TrueString_1() { return static_cast<int32_t>(offsetof(Boolean_t97287965_StaticFields, ___TrueString_1)); }
inline String_t* get_TrueString_1() const { return ___TrueString_1; }
inline String_t** get_address_of_TrueString_1() { return &___TrueString_1; }
inline void set_TrueString_1(String_t* value)
{
___TrueString_1 = value;
Il2CppCodeGenWriteBarrier((&___TrueString_1), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // BOOLEAN_T97287965_H
#ifndef BYTE_T1134296376_H
#define BYTE_T1134296376_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Byte
struct Byte_t1134296376
{
public:
// System.Byte System.Byte::m_value
uint8_t ___m_value_2;
public:
inline static int32_t get_offset_of_m_value_2() { return static_cast<int32_t>(offsetof(Byte_t1134296376, ___m_value_2)); }
inline uint8_t get_m_value_2() const { return ___m_value_2; }
inline uint8_t* get_address_of_m_value_2() { return &___m_value_2; }
inline void set_m_value_2(uint8_t value)
{
___m_value_2 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // BYTE_T1134296376_H
#ifndef CHAR_T3634460470_H
#define CHAR_T3634460470_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Char
struct Char_t3634460470
{
public:
// System.Char System.Char::m_value
Il2CppChar ___m_value_2;
public:
inline static int32_t get_offset_of_m_value_2() { return static_cast<int32_t>(offsetof(Char_t3634460470, ___m_value_2)); }
inline Il2CppChar get_m_value_2() const { return ___m_value_2; }
inline Il2CppChar* get_address_of_m_value_2() { return &___m_value_2; }
inline void set_m_value_2(Il2CppChar value)
{
___m_value_2 = value;
}
};
struct Char_t3634460470_StaticFields
{
public:
// System.Byte* System.Char::category_data
uint8_t* ___category_data_3;
// System.Byte* System.Char::numeric_data
uint8_t* ___numeric_data_4;
// System.Double* System.Char::numeric_data_values
double* ___numeric_data_values_5;
// System.UInt16* System.Char::to_lower_data_low
uint16_t* ___to_lower_data_low_6;
// System.UInt16* System.Char::to_lower_data_high
uint16_t* ___to_lower_data_high_7;
// System.UInt16* System.Char::to_upper_data_low
uint16_t* ___to_upper_data_low_8;
// System.UInt16* System.Char::to_upper_data_high
uint16_t* ___to_upper_data_high_9;
public:
inline static int32_t get_offset_of_category_data_3() { return static_cast<int32_t>(offsetof(Char_t3634460470_StaticFields, ___category_data_3)); }
inline uint8_t* get_category_data_3() const { return ___category_data_3; }
inline uint8_t** get_address_of_category_data_3() { return &___category_data_3; }
inline void set_category_data_3(uint8_t* value)
{
___category_data_3 = value;
}
inline static int32_t get_offset_of_numeric_data_4() { return static_cast<int32_t>(offsetof(Char_t3634460470_StaticFields, ___numeric_data_4)); }
inline uint8_t* get_numeric_data_4() const { return ___numeric_data_4; }
inline uint8_t** get_address_of_numeric_data_4() { return &___numeric_data_4; }
inline void set_numeric_data_4(uint8_t* value)
{
___numeric_data_4 = value;
}
inline static int32_t get_offset_of_numeric_data_values_5() { return static_cast<int32_t>(offsetof(Char_t3634460470_StaticFields, ___numeric_data_values_5)); }
inline double* get_numeric_data_values_5() const { return ___numeric_data_values_5; }
inline double** get_address_of_numeric_data_values_5() { return &___numeric_data_values_5; }
inline void set_numeric_data_values_5(double* value)
{
___numeric_data_values_5 = value;
}
inline static int32_t get_offset_of_to_lower_data_low_6() { return static_cast<int32_t>(offsetof(Char_t3634460470_StaticFields, ___to_lower_data_low_6)); }
inline uint16_t* get_to_lower_data_low_6() const { return ___to_lower_data_low_6; }
inline uint16_t** get_address_of_to_lower_data_low_6() { return &___to_lower_data_low_6; }
inline void set_to_lower_data_low_6(uint16_t* value)
{
___to_lower_data_low_6 = value;
}
inline static int32_t get_offset_of_to_lower_data_high_7() { return static_cast<int32_t>(offsetof(Char_t3634460470_StaticFields, ___to_lower_data_high_7)); }
inline uint16_t* get_to_lower_data_high_7() const { return ___to_lower_data_high_7; }
inline uint16_t** get_address_of_to_lower_data_high_7() { return &___to_lower_data_high_7; }
inline void set_to_lower_data_high_7(uint16_t* value)
{
___to_lower_data_high_7 = value;
}
inline static int32_t get_offset_of_to_upper_data_low_8() { return static_cast<int32_t>(offsetof(Char_t3634460470_StaticFields, ___to_upper_data_low_8)); }
inline uint16_t* get_to_upper_data_low_8() const { return ___to_upper_data_low_8; }
inline uint16_t** get_address_of_to_upper_data_low_8() { return &___to_upper_data_low_8; }
inline void set_to_upper_data_low_8(uint16_t* value)
{
___to_upper_data_low_8 = value;
}
inline static int32_t get_offset_of_to_upper_data_high_9() { return static_cast<int32_t>(offsetof(Char_t3634460470_StaticFields, ___to_upper_data_high_9)); }
inline uint16_t* get_to_upper_data_high_9() const { return ___to_upper_data_high_9; }
inline uint16_t** get_address_of_to_upper_data_high_9() { return &___to_upper_data_high_9; }
inline void set_to_upper_data_high_9(uint16_t* value)
{
___to_upper_data_high_9 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // CHAR_T3634460470_H
#ifndef DOUBLE_T594665363_H
#define DOUBLE_T594665363_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Double
struct Double_t594665363
{
public:
// System.Double System.Double::m_value
double ___m_value_13;
public:
inline static int32_t get_offset_of_m_value_13() { return static_cast<int32_t>(offsetof(Double_t594665363, ___m_value_13)); }
inline double get_m_value_13() const { return ___m_value_13; }
inline double* get_address_of_m_value_13() { return &___m_value_13; }
inline void set_m_value_13(double value)
{
___m_value_13 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // DOUBLE_T594665363_H
#ifndef ENUM_T4135868527_H
#define ENUM_T4135868527_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Enum
struct Enum_t4135868527 : public ValueType_t3640485471
{
public:
public:
};
struct Enum_t4135868527_StaticFields
{
public:
// System.Char[] System.Enum::split_char
CharU5BU5D_t3528271667* ___split_char_0;
public:
inline static int32_t get_offset_of_split_char_0() { return static_cast<int32_t>(offsetof(Enum_t4135868527_StaticFields, ___split_char_0)); }
inline CharU5BU5D_t3528271667* get_split_char_0() const { return ___split_char_0; }
inline CharU5BU5D_t3528271667** get_address_of_split_char_0() { return &___split_char_0; }
inline void set_split_char_0(CharU5BU5D_t3528271667* value)
{
___split_char_0 = value;
Il2CppCodeGenWriteBarrier((&___split_char_0), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
// Native definition for P/Invoke marshalling of System.Enum
struct Enum_t4135868527_marshaled_pinvoke
{
};
// Native definition for COM marshalling of System.Enum
struct Enum_t4135868527_marshaled_com
{
};
#endif // ENUM_T4135868527_H
#ifndef MEMORYSTREAM_T94973147_H
#define MEMORYSTREAM_T94973147_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.IO.MemoryStream
struct MemoryStream_t94973147 : public Stream_t1273022909
{
public:
// System.Boolean System.IO.MemoryStream::canWrite
bool ___canWrite_1;
// System.Boolean System.IO.MemoryStream::allowGetBuffer
bool ___allowGetBuffer_2;
// System.Int32 System.IO.MemoryStream::capacity
int32_t ___capacity_3;
// System.Int32 System.IO.MemoryStream::length
int32_t ___length_4;
// System.Byte[] System.IO.MemoryStream::internalBuffer
ByteU5BU5D_t4116647657* ___internalBuffer_5;
// System.Int32 System.IO.MemoryStream::initialIndex
int32_t ___initialIndex_6;
// System.Boolean System.IO.MemoryStream::expandable
bool ___expandable_7;
// System.Boolean System.IO.MemoryStream::streamClosed
bool ___streamClosed_8;
// System.Int32 System.IO.MemoryStream::position
int32_t ___position_9;
// System.Int32 System.IO.MemoryStream::dirty_bytes
int32_t ___dirty_bytes_10;
public:
inline static int32_t get_offset_of_canWrite_1() { return static_cast<int32_t>(offsetof(MemoryStream_t94973147, ___canWrite_1)); }
inline bool get_canWrite_1() const { return ___canWrite_1; }
inline bool* get_address_of_canWrite_1() { return &___canWrite_1; }
inline void set_canWrite_1(bool value)
{
___canWrite_1 = value;
}
inline static int32_t get_offset_of_allowGetBuffer_2() { return static_cast<int32_t>(offsetof(MemoryStream_t94973147, ___allowGetBuffer_2)); }
inline bool get_allowGetBuffer_2() const { return ___allowGetBuffer_2; }
inline bool* get_address_of_allowGetBuffer_2() { return &___allowGetBuffer_2; }
inline void set_allowGetBuffer_2(bool value)
{
___allowGetBuffer_2 = value;
}
inline static int32_t get_offset_of_capacity_3() { return static_cast<int32_t>(offsetof(MemoryStream_t94973147, ___capacity_3)); }
inline int32_t get_capacity_3() const { return ___capacity_3; }
inline int32_t* get_address_of_capacity_3() { return &___capacity_3; }
inline void set_capacity_3(int32_t value)
{
___capacity_3 = value;
}
inline static int32_t get_offset_of_length_4() { return static_cast<int32_t>(offsetof(MemoryStream_t94973147, ___length_4)); }
inline int32_t get_length_4() const { return ___length_4; }
inline int32_t* get_address_of_length_4() { return &___length_4; }
inline void set_length_4(int32_t value)
{
___length_4 = value;
}
inline static int32_t get_offset_of_internalBuffer_5() { return static_cast<int32_t>(offsetof(MemoryStream_t94973147, ___internalBuffer_5)); }
inline ByteU5BU5D_t4116647657* get_internalBuffer_5() const { return ___internalBuffer_5; }
inline ByteU5BU5D_t4116647657** get_address_of_internalBuffer_5() { return &___internalBuffer_5; }
inline void set_internalBuffer_5(ByteU5BU5D_t4116647657* value)
{
___internalBuffer_5 = value;
Il2CppCodeGenWriteBarrier((&___internalBuffer_5), value);
}
inline static int32_t get_offset_of_initialIndex_6() { return static_cast<int32_t>(offsetof(MemoryStream_t94973147, ___initialIndex_6)); }
inline int32_t get_initialIndex_6() const { return ___initialIndex_6; }
inline int32_t* get_address_of_initialIndex_6() { return &___initialIndex_6; }
inline void set_initialIndex_6(int32_t value)
{
___initialIndex_6 = value;
}
inline static int32_t get_offset_of_expandable_7() { return static_cast<int32_t>(offsetof(MemoryStream_t94973147, ___expandable_7)); }
inline bool get_expandable_7() const { return ___expandable_7; }
inline bool* get_address_of_expandable_7() { return &___expandable_7; }
inline void set_expandable_7(bool value)
{
___expandable_7 = value;
}
inline static int32_t get_offset_of_streamClosed_8() { return static_cast<int32_t>(offsetof(MemoryStream_t94973147, ___streamClosed_8)); }
inline bool get_streamClosed_8() const { return ___streamClosed_8; }
inline bool* get_address_of_streamClosed_8() { return &___streamClosed_8; }
inline void set_streamClosed_8(bool value)
{
___streamClosed_8 = value;
}
inline static int32_t get_offset_of_position_9() { return static_cast<int32_t>(offsetof(MemoryStream_t94973147, ___position_9)); }
inline int32_t get_position_9() const { return ___position_9; }
inline int32_t* get_address_of_position_9() { return &___position_9; }
inline void set_position_9(int32_t value)
{
___position_9 = value;
}
inline static int32_t get_offset_of_dirty_bytes_10() { return static_cast<int32_t>(offsetof(MemoryStream_t94973147, ___dirty_bytes_10)); }
inline int32_t get_dirty_bytes_10() const { return ___dirty_bytes_10; }
inline int32_t* get_address_of_dirty_bytes_10() { return &___dirty_bytes_10; }
inline void set_dirty_bytes_10(int32_t value)
{
___dirty_bytes_10 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // MEMORYSTREAM_T94973147_H
#ifndef INT16_T2552820387_H
#define INT16_T2552820387_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Int16
struct Int16_t2552820387
{
public:
// System.Int16 System.Int16::m_value
int16_t ___m_value_0;
public:
inline static int32_t get_offset_of_m_value_0() { return static_cast<int32_t>(offsetof(Int16_t2552820387, ___m_value_0)); }
inline int16_t get_m_value_0() const { return ___m_value_0; }
inline int16_t* get_address_of_m_value_0() { return &___m_value_0; }
inline void set_m_value_0(int16_t value)
{
___m_value_0 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // INT16_T2552820387_H
#ifndef INT32_T2950945753_H
#define INT32_T2950945753_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Int32
struct Int32_t2950945753
{
public:
// System.Int32 System.Int32::m_value
int32_t ___m_value_2;
public:
inline static int32_t get_offset_of_m_value_2() { return static_cast<int32_t>(offsetof(Int32_t2950945753, ___m_value_2)); }
inline int32_t get_m_value_2() const { return ___m_value_2; }
inline int32_t* get_address_of_m_value_2() { return &___m_value_2; }
inline void set_m_value_2(int32_t value)
{
___m_value_2 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // INT32_T2950945753_H
#ifndef INT64_T3736567304_H
#define INT64_T3736567304_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Int64
struct Int64_t3736567304
{
public:
// System.Int64 System.Int64::m_value
int64_t ___m_value_0;
public:
inline static int32_t get_offset_of_m_value_0() { return static_cast<int32_t>(offsetof(Int64_t3736567304, ___m_value_0)); }
inline int64_t get_m_value_0() const { return ___m_value_0; }
inline int64_t* get_address_of_m_value_0() { return &___m_value_0; }
inline void set_m_value_0(int64_t value)
{
___m_value_0 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // INT64_T3736567304_H
#ifndef INTPTR_T_H
#define INTPTR_T_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.IntPtr
struct IntPtr_t
{
public:
// System.Void* System.IntPtr::m_value
void* ___m_value_0;
public:
inline static int32_t get_offset_of_m_value_0() { return static_cast<int32_t>(offsetof(IntPtr_t, ___m_value_0)); }
inline void* get_m_value_0() const { return ___m_value_0; }
inline void** get_address_of_m_value_0() { return &___m_value_0; }
inline void set_m_value_0(void* value)
{
___m_value_0 = value;
}
};
struct IntPtr_t_StaticFields
{
public:
// System.IntPtr System.IntPtr::Zero
intptr_t ___Zero_1;
public:
inline static int32_t get_offset_of_Zero_1() { return static_cast<int32_t>(offsetof(IntPtr_t_StaticFields, ___Zero_1)); }
inline intptr_t get_Zero_1() const { return ___Zero_1; }
inline intptr_t* get_address_of_Zero_1() { return &___Zero_1; }
inline void set_Zero_1(intptr_t value)
{
___Zero_1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // INTPTR_T_H
#ifndef DSA_T2386879874_H
#define DSA_T2386879874_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Security.Cryptography.DSA
struct DSA_t2386879874 : public AsymmetricAlgorithm_t932037087
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // DSA_T2386879874_H
#ifndef DSAPARAMETERS_T1885824122_H
#define DSAPARAMETERS_T1885824122_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Security.Cryptography.DSAParameters
struct DSAParameters_t1885824122
{
public:
// System.Int32 System.Security.Cryptography.DSAParameters::Counter
int32_t ___Counter_0;
// System.Byte[] System.Security.Cryptography.DSAParameters::G
ByteU5BU5D_t4116647657* ___G_1;
// System.Byte[] System.Security.Cryptography.DSAParameters::J
ByteU5BU5D_t4116647657* ___J_2;
// System.Byte[] System.Security.Cryptography.DSAParameters::P
ByteU5BU5D_t4116647657* ___P_3;
// System.Byte[] System.Security.Cryptography.DSAParameters::Q
ByteU5BU5D_t4116647657* ___Q_4;
// System.Byte[] System.Security.Cryptography.DSAParameters::Seed
ByteU5BU5D_t4116647657* ___Seed_5;
// System.Byte[] System.Security.Cryptography.DSAParameters::X
ByteU5BU5D_t4116647657* ___X_6;
// System.Byte[] System.Security.Cryptography.DSAParameters::Y
ByteU5BU5D_t4116647657* ___Y_7;
public:
inline static int32_t get_offset_of_Counter_0() { return static_cast<int32_t>(offsetof(DSAParameters_t1885824122, ___Counter_0)); }
inline int32_t get_Counter_0() const { return ___Counter_0; }
inline int32_t* get_address_of_Counter_0() { return &___Counter_0; }
inline void set_Counter_0(int32_t value)
{
___Counter_0 = value;
}
inline static int32_t get_offset_of_G_1() { return static_cast<int32_t>(offsetof(DSAParameters_t1885824122, ___G_1)); }
inline ByteU5BU5D_t4116647657* get_G_1() const { return ___G_1; }
inline ByteU5BU5D_t4116647657** get_address_of_G_1() { return &___G_1; }
inline void set_G_1(ByteU5BU5D_t4116647657* value)
{
___G_1 = value;
Il2CppCodeGenWriteBarrier((&___G_1), value);
}
inline static int32_t get_offset_of_J_2() { return static_cast<int32_t>(offsetof(DSAParameters_t1885824122, ___J_2)); }
inline ByteU5BU5D_t4116647657* get_J_2() const { return ___J_2; }
inline ByteU5BU5D_t4116647657** get_address_of_J_2() { return &___J_2; }
inline void set_J_2(ByteU5BU5D_t4116647657* value)
{
___J_2 = value;
Il2CppCodeGenWriteBarrier((&___J_2), value);
}
inline static int32_t get_offset_of_P_3() { return static_cast<int32_t>(offsetof(DSAParameters_t1885824122, ___P_3)); }
inline ByteU5BU5D_t4116647657* get_P_3() const { return ___P_3; }
inline ByteU5BU5D_t4116647657** get_address_of_P_3() { return &___P_3; }
inline void set_P_3(ByteU5BU5D_t4116647657* value)
{
___P_3 = value;
Il2CppCodeGenWriteBarrier((&___P_3), value);
}
inline static int32_t get_offset_of_Q_4() { return static_cast<int32_t>(offsetof(DSAParameters_t1885824122, ___Q_4)); }
inline ByteU5BU5D_t4116647657* get_Q_4() const { return ___Q_4; }
inline ByteU5BU5D_t4116647657** get_address_of_Q_4() { return &___Q_4; }
inline void set_Q_4(ByteU5BU5D_t4116647657* value)
{
___Q_4 = value;
Il2CppCodeGenWriteBarrier((&___Q_4), value);
}
inline static int32_t get_offset_of_Seed_5() { return static_cast<int32_t>(offsetof(DSAParameters_t1885824122, ___Seed_5)); }
inline ByteU5BU5D_t4116647657* get_Seed_5() const { return ___Seed_5; }
inline ByteU5BU5D_t4116647657** get_address_of_Seed_5() { return &___Seed_5; }
inline void set_Seed_5(ByteU5BU5D_t4116647657* value)
{
___Seed_5 = value;
Il2CppCodeGenWriteBarrier((&___Seed_5), value);
}
inline static int32_t get_offset_of_X_6() { return static_cast<int32_t>(offsetof(DSAParameters_t1885824122, ___X_6)); }
inline ByteU5BU5D_t4116647657* get_X_6() const { return ___X_6; }
inline ByteU5BU5D_t4116647657** get_address_of_X_6() { return &___X_6; }
inline void set_X_6(ByteU5BU5D_t4116647657* value)
{
___X_6 = value;
Il2CppCodeGenWriteBarrier((&___X_6), value);
}
inline static int32_t get_offset_of_Y_7() { return static_cast<int32_t>(offsetof(DSAParameters_t1885824122, ___Y_7)); }
inline ByteU5BU5D_t4116647657* get_Y_7() const { return ___Y_7; }
inline ByteU5BU5D_t4116647657** get_address_of_Y_7() { return &___Y_7; }
inline void set_Y_7(ByteU5BU5D_t4116647657* value)
{
___Y_7 = value;
Il2CppCodeGenWriteBarrier((&___Y_7), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
// Native definition for P/Invoke marshalling of System.Security.Cryptography.DSAParameters
struct DSAParameters_t1885824122_marshaled_pinvoke
{
int32_t ___Counter_0;
uint8_t* ___G_1;
uint8_t* ___J_2;
uint8_t* ___P_3;
uint8_t* ___Q_4;
uint8_t* ___Seed_5;
uint8_t* ___X_6;
uint8_t* ___Y_7;
};
// Native definition for COM marshalling of System.Security.Cryptography.DSAParameters
struct DSAParameters_t1885824122_marshaled_com
{
int32_t ___Counter_0;
uint8_t* ___G_1;
uint8_t* ___J_2;
uint8_t* ___P_3;
uint8_t* ___Q_4;
uint8_t* ___Seed_5;
uint8_t* ___X_6;
uint8_t* ___Y_7;
};
#endif // DSAPARAMETERS_T1885824122_H
#ifndef KEYEDHASHALGORITHM_T112861511_H
#define KEYEDHASHALGORITHM_T112861511_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Security.Cryptography.KeyedHashAlgorithm
struct KeyedHashAlgorithm_t112861511 : public HashAlgorithm_t1432317219
{
public:
// System.Byte[] System.Security.Cryptography.KeyedHashAlgorithm::KeyValue
ByteU5BU5D_t4116647657* ___KeyValue_4;
public:
inline static int32_t get_offset_of_KeyValue_4() { return static_cast<int32_t>(offsetof(KeyedHashAlgorithm_t112861511, ___KeyValue_4)); }
inline ByteU5BU5D_t4116647657* get_KeyValue_4() const { return ___KeyValue_4; }
inline ByteU5BU5D_t4116647657** get_address_of_KeyValue_4() { return &___KeyValue_4; }
inline void set_KeyValue_4(ByteU5BU5D_t4116647657* value)
{
___KeyValue_4 = value;
Il2CppCodeGenWriteBarrier((&___KeyValue_4), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // KEYEDHASHALGORITHM_T112861511_H
#ifndef MD5_T3177620429_H
#define MD5_T3177620429_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Security.Cryptography.MD5
struct MD5_t3177620429 : public HashAlgorithm_t1432317219
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // MD5_T3177620429_H
#ifndef RSA_T2385438082_H
#define RSA_T2385438082_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Security.Cryptography.RSA
struct RSA_t2385438082 : public AsymmetricAlgorithm_t932037087
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // RSA_T2385438082_H
#ifndef RSAPKCS1KEYEXCHANGEFORMATTER_T2761096101_H
#define RSAPKCS1KEYEXCHANGEFORMATTER_T2761096101_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Security.Cryptography.RSAPKCS1KeyExchangeFormatter
struct RSAPKCS1KeyExchangeFormatter_t2761096101 : public AsymmetricKeyExchangeFormatter_t937192061
{
public:
// System.Security.Cryptography.RSA System.Security.Cryptography.RSAPKCS1KeyExchangeFormatter::rsa
RSA_t2385438082 * ___rsa_0;
// System.Security.Cryptography.RandomNumberGenerator System.Security.Cryptography.RSAPKCS1KeyExchangeFormatter::random
RandomNumberGenerator_t386037858 * ___random_1;
public:
inline static int32_t get_offset_of_rsa_0() { return static_cast<int32_t>(offsetof(RSAPKCS1KeyExchangeFormatter_t2761096101, ___rsa_0)); }
inline RSA_t2385438082 * get_rsa_0() const { return ___rsa_0; }
inline RSA_t2385438082 ** get_address_of_rsa_0() { return &___rsa_0; }
inline void set_rsa_0(RSA_t2385438082 * value)
{
___rsa_0 = value;
Il2CppCodeGenWriteBarrier((&___rsa_0), value);
}
inline static int32_t get_offset_of_random_1() { return static_cast<int32_t>(offsetof(RSAPKCS1KeyExchangeFormatter_t2761096101, ___random_1)); }
inline RandomNumberGenerator_t386037858 * get_random_1() const { return ___random_1; }
inline RandomNumberGenerator_t386037858 ** get_address_of_random_1() { return &___random_1; }
inline void set_random_1(RandomNumberGenerator_t386037858 * value)
{
___random_1 = value;
Il2CppCodeGenWriteBarrier((&___random_1), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // RSAPKCS1KEYEXCHANGEFORMATTER_T2761096101_H
#ifndef RSAPARAMETERS_T1728406613_H
#define RSAPARAMETERS_T1728406613_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Security.Cryptography.RSAParameters
struct RSAParameters_t1728406613
{
public:
// System.Byte[] System.Security.Cryptography.RSAParameters::P
ByteU5BU5D_t4116647657* ___P_0;
// System.Byte[] System.Security.Cryptography.RSAParameters::Q
ByteU5BU5D_t4116647657* ___Q_1;
// System.Byte[] System.Security.Cryptography.RSAParameters::D
ByteU5BU5D_t4116647657* ___D_2;
// System.Byte[] System.Security.Cryptography.RSAParameters::DP
ByteU5BU5D_t4116647657* ___DP_3;
// System.Byte[] System.Security.Cryptography.RSAParameters::DQ
ByteU5BU5D_t4116647657* ___DQ_4;
// System.Byte[] System.Security.Cryptography.RSAParameters::InverseQ
ByteU5BU5D_t4116647657* ___InverseQ_5;
// System.Byte[] System.Security.Cryptography.RSAParameters::Modulus
ByteU5BU5D_t4116647657* ___Modulus_6;
// System.Byte[] System.Security.Cryptography.RSAParameters::Exponent
ByteU5BU5D_t4116647657* ___Exponent_7;
public:
inline static int32_t get_offset_of_P_0() { return static_cast<int32_t>(offsetof(RSAParameters_t1728406613, ___P_0)); }
inline ByteU5BU5D_t4116647657* get_P_0() const { return ___P_0; }
inline ByteU5BU5D_t4116647657** get_address_of_P_0() { return &___P_0; }
inline void set_P_0(ByteU5BU5D_t4116647657* value)
{
___P_0 = value;
Il2CppCodeGenWriteBarrier((&___P_0), value);
}
inline static int32_t get_offset_of_Q_1() { return static_cast<int32_t>(offsetof(RSAParameters_t1728406613, ___Q_1)); }
inline ByteU5BU5D_t4116647657* get_Q_1() const { return ___Q_1; }
inline ByteU5BU5D_t4116647657** get_address_of_Q_1() { return &___Q_1; }
inline void set_Q_1(ByteU5BU5D_t4116647657* value)
{
___Q_1 = value;
Il2CppCodeGenWriteBarrier((&___Q_1), value);
}
inline static int32_t get_offset_of_D_2() { return static_cast<int32_t>(offsetof(RSAParameters_t1728406613, ___D_2)); }
inline ByteU5BU5D_t4116647657* get_D_2() const { return ___D_2; }
inline ByteU5BU5D_t4116647657** get_address_of_D_2() { return &___D_2; }
inline void set_D_2(ByteU5BU5D_t4116647657* value)
{
___D_2 = value;
Il2CppCodeGenWriteBarrier((&___D_2), value);
}
inline static int32_t get_offset_of_DP_3() { return static_cast<int32_t>(offsetof(RSAParameters_t1728406613, ___DP_3)); }
inline ByteU5BU5D_t4116647657* get_DP_3() const { return ___DP_3; }
inline ByteU5BU5D_t4116647657** get_address_of_DP_3() { return &___DP_3; }
inline void set_DP_3(ByteU5BU5D_t4116647657* value)
{
___DP_3 = value;
Il2CppCodeGenWriteBarrier((&___DP_3), value);
}
inline static int32_t get_offset_of_DQ_4() { return static_cast<int32_t>(offsetof(RSAParameters_t1728406613, ___DQ_4)); }
inline ByteU5BU5D_t4116647657* get_DQ_4() const { return ___DQ_4; }
inline ByteU5BU5D_t4116647657** get_address_of_DQ_4() { return &___DQ_4; }
inline void set_DQ_4(ByteU5BU5D_t4116647657* value)
{
___DQ_4 = value;
Il2CppCodeGenWriteBarrier((&___DQ_4), value);
}
inline static int32_t get_offset_of_InverseQ_5() { return static_cast<int32_t>(offsetof(RSAParameters_t1728406613, ___InverseQ_5)); }
inline ByteU5BU5D_t4116647657* get_InverseQ_5() const { return ___InverseQ_5; }
inline ByteU5BU5D_t4116647657** get_address_of_InverseQ_5() { return &___InverseQ_5; }
inline void set_InverseQ_5(ByteU5BU5D_t4116647657* value)
{
___InverseQ_5 = value;
Il2CppCodeGenWriteBarrier((&___InverseQ_5), value);
}
inline static int32_t get_offset_of_Modulus_6() { return static_cast<int32_t>(offsetof(RSAParameters_t1728406613, ___Modulus_6)); }
inline ByteU5BU5D_t4116647657* get_Modulus_6() const { return ___Modulus_6; }
inline ByteU5BU5D_t4116647657** get_address_of_Modulus_6() { return &___Modulus_6; }
inline void set_Modulus_6(ByteU5BU5D_t4116647657* value)
{
___Modulus_6 = value;
Il2CppCodeGenWriteBarrier((&___Modulus_6), value);
}
inline static int32_t get_offset_of_Exponent_7() { return static_cast<int32_t>(offsetof(RSAParameters_t1728406613, ___Exponent_7)); }
inline ByteU5BU5D_t4116647657* get_Exponent_7() const { return ___Exponent_7; }
inline ByteU5BU5D_t4116647657** get_address_of_Exponent_7() { return &___Exponent_7; }
inline void set_Exponent_7(ByteU5BU5D_t4116647657* value)
{
___Exponent_7 = value;
Il2CppCodeGenWriteBarrier((&___Exponent_7), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
// Native definition for P/Invoke marshalling of System.Security.Cryptography.RSAParameters
struct RSAParameters_t1728406613_marshaled_pinvoke
{
uint8_t* ___P_0;
uint8_t* ___Q_1;
uint8_t* ___D_2;
uint8_t* ___DP_3;
uint8_t* ___DQ_4;
uint8_t* ___InverseQ_5;
uint8_t* ___Modulus_6;
uint8_t* ___Exponent_7;
};
// Native definition for COM marshalling of System.Security.Cryptography.RSAParameters
struct RSAParameters_t1728406613_marshaled_com
{
uint8_t* ___P_0;
uint8_t* ___Q_1;
uint8_t* ___D_2;
uint8_t* ___DP_3;
uint8_t* ___DQ_4;
uint8_t* ___InverseQ_5;
uint8_t* ___Modulus_6;
uint8_t* ___Exponent_7;
};
#endif // RSAPARAMETERS_T1728406613_H
#ifndef SHA1_T1803193667_H
#define SHA1_T1803193667_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Security.Cryptography.SHA1
struct SHA1_t1803193667 : public HashAlgorithm_t1432317219
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // SHA1_T1803193667_H
#ifndef X509CERTIFICATE2_T714049126_H
#define X509CERTIFICATE2_T714049126_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Security.Cryptography.X509Certificates.X509Certificate2
struct X509Certificate2_t714049126 : public X509Certificate_t713131622
{
public:
// System.Boolean System.Security.Cryptography.X509Certificates.X509Certificate2::_archived
bool ____archived_5;
// System.Security.Cryptography.X509Certificates.X509ExtensionCollection System.Security.Cryptography.X509Certificates.X509Certificate2::_extensions
X509ExtensionCollection_t1350454579 * ____extensions_6;
// System.String System.Security.Cryptography.X509Certificates.X509Certificate2::_name
String_t* ____name_7;
// System.String System.Security.Cryptography.X509Certificates.X509Certificate2::_serial
String_t* ____serial_8;
// System.Security.Cryptography.X509Certificates.PublicKey System.Security.Cryptography.X509Certificates.X509Certificate2::_publicKey
PublicKey_t3779582684 * ____publicKey_9;
// System.Security.Cryptography.X509Certificates.X500DistinguishedName System.Security.Cryptography.X509Certificates.X509Certificate2::issuer_name
X500DistinguishedName_t875709727 * ___issuer_name_10;
// System.Security.Cryptography.X509Certificates.X500DistinguishedName System.Security.Cryptography.X509Certificates.X509Certificate2::subject_name
X500DistinguishedName_t875709727 * ___subject_name_11;
// System.Security.Cryptography.Oid System.Security.Cryptography.X509Certificates.X509Certificate2::signature_algorithm
Oid_t3552120260 * ___signature_algorithm_12;
// Mono.Security.X509.X509Certificate System.Security.Cryptography.X509Certificates.X509Certificate2::_cert
X509Certificate_t489243025 * ____cert_13;
public:
inline static int32_t get_offset_of__archived_5() { return static_cast<int32_t>(offsetof(X509Certificate2_t714049126, ____archived_5)); }
inline bool get__archived_5() const { return ____archived_5; }
inline bool* get_address_of__archived_5() { return &____archived_5; }
inline void set__archived_5(bool value)
{
____archived_5 = value;
}
inline static int32_t get_offset_of__extensions_6() { return static_cast<int32_t>(offsetof(X509Certificate2_t714049126, ____extensions_6)); }
inline X509ExtensionCollection_t1350454579 * get__extensions_6() const { return ____extensions_6; }
inline X509ExtensionCollection_t1350454579 ** get_address_of__extensions_6() { return &____extensions_6; }
inline void set__extensions_6(X509ExtensionCollection_t1350454579 * value)
{
____extensions_6 = value;
Il2CppCodeGenWriteBarrier((&____extensions_6), value);
}
inline static int32_t get_offset_of__name_7() { return static_cast<int32_t>(offsetof(X509Certificate2_t714049126, ____name_7)); }
inline String_t* get__name_7() const { return ____name_7; }
inline String_t** get_address_of__name_7() { return &____name_7; }
inline void set__name_7(String_t* value)
{
____name_7 = value;
Il2CppCodeGenWriteBarrier((&____name_7), value);
}
inline static int32_t get_offset_of__serial_8() { return static_cast<int32_t>(offsetof(X509Certificate2_t714049126, ____serial_8)); }
inline String_t* get__serial_8() const { return ____serial_8; }
inline String_t** get_address_of__serial_8() { return &____serial_8; }
inline void set__serial_8(String_t* value)
{
____serial_8 = value;
Il2CppCodeGenWriteBarrier((&____serial_8), value);
}
inline static int32_t get_offset_of__publicKey_9() { return static_cast<int32_t>(offsetof(X509Certificate2_t714049126, ____publicKey_9)); }
inline PublicKey_t3779582684 * get__publicKey_9() const { return ____publicKey_9; }
inline PublicKey_t3779582684 ** get_address_of__publicKey_9() { return &____publicKey_9; }
inline void set__publicKey_9(PublicKey_t3779582684 * value)
{
____publicKey_9 = value;
Il2CppCodeGenWriteBarrier((&____publicKey_9), value);
}
inline static int32_t get_offset_of_issuer_name_10() { return static_cast<int32_t>(offsetof(X509Certificate2_t714049126, ___issuer_name_10)); }
inline X500DistinguishedName_t875709727 * get_issuer_name_10() const { return ___issuer_name_10; }
inline X500DistinguishedName_t875709727 ** get_address_of_issuer_name_10() { return &___issuer_name_10; }
inline void set_issuer_name_10(X500DistinguishedName_t875709727 * value)
{
___issuer_name_10 = value;
Il2CppCodeGenWriteBarrier((&___issuer_name_10), value);
}
inline static int32_t get_offset_of_subject_name_11() { return static_cast<int32_t>(offsetof(X509Certificate2_t714049126, ___subject_name_11)); }
inline X500DistinguishedName_t875709727 * get_subject_name_11() const { return ___subject_name_11; }
inline X500DistinguishedName_t875709727 ** get_address_of_subject_name_11() { return &___subject_name_11; }
inline void set_subject_name_11(X500DistinguishedName_t875709727 * value)
{
___subject_name_11 = value;
Il2CppCodeGenWriteBarrier((&___subject_name_11), value);
}
inline static int32_t get_offset_of_signature_algorithm_12() { return static_cast<int32_t>(offsetof(X509Certificate2_t714049126, ___signature_algorithm_12)); }
inline Oid_t3552120260 * get_signature_algorithm_12() const { return ___signature_algorithm_12; }
inline Oid_t3552120260 ** get_address_of_signature_algorithm_12() { return &___signature_algorithm_12; }
inline void set_signature_algorithm_12(Oid_t3552120260 * value)
{
___signature_algorithm_12 = value;
Il2CppCodeGenWriteBarrier((&___signature_algorithm_12), value);
}
inline static int32_t get_offset_of__cert_13() { return static_cast<int32_t>(offsetof(X509Certificate2_t714049126, ____cert_13)); }
inline X509Certificate_t489243025 * get__cert_13() const { return ____cert_13; }
inline X509Certificate_t489243025 ** get_address_of__cert_13() { return &____cert_13; }
inline void set__cert_13(X509Certificate_t489243025 * value)
{
____cert_13 = value;
Il2CppCodeGenWriteBarrier((&____cert_13), value);
}
};
struct X509Certificate2_t714049126_StaticFields
{
public:
// System.String System.Security.Cryptography.X509Certificates.X509Certificate2::empty_error
String_t* ___empty_error_14;
// System.Byte[] System.Security.Cryptography.X509Certificates.X509Certificate2::commonName
ByteU5BU5D_t4116647657* ___commonName_15;
// System.Byte[] System.Security.Cryptography.X509Certificates.X509Certificate2::email
ByteU5BU5D_t4116647657* ___email_16;
// System.Byte[] System.Security.Cryptography.X509Certificates.X509Certificate2::signedData
ByteU5BU5D_t4116647657* ___signedData_17;
public:
inline static int32_t get_offset_of_empty_error_14() { return static_cast<int32_t>(offsetof(X509Certificate2_t714049126_StaticFields, ___empty_error_14)); }
inline String_t* get_empty_error_14() const { return ___empty_error_14; }
inline String_t** get_address_of_empty_error_14() { return &___empty_error_14; }
inline void set_empty_error_14(String_t* value)
{
___empty_error_14 = value;
Il2CppCodeGenWriteBarrier((&___empty_error_14), value);
}
inline static int32_t get_offset_of_commonName_15() { return static_cast<int32_t>(offsetof(X509Certificate2_t714049126_StaticFields, ___commonName_15)); }
inline ByteU5BU5D_t4116647657* get_commonName_15() const { return ___commonName_15; }
inline ByteU5BU5D_t4116647657** get_address_of_commonName_15() { return &___commonName_15; }
inline void set_commonName_15(ByteU5BU5D_t4116647657* value)
{
___commonName_15 = value;
Il2CppCodeGenWriteBarrier((&___commonName_15), value);
}
inline static int32_t get_offset_of_email_16() { return static_cast<int32_t>(offsetof(X509Certificate2_t714049126_StaticFields, ___email_16)); }
inline ByteU5BU5D_t4116647657* get_email_16() const { return ___email_16; }
inline ByteU5BU5D_t4116647657** get_address_of_email_16() { return &___email_16; }
inline void set_email_16(ByteU5BU5D_t4116647657* value)
{
___email_16 = value;
Il2CppCodeGenWriteBarrier((&___email_16), value);
}
inline static int32_t get_offset_of_signedData_17() { return static_cast<int32_t>(offsetof(X509Certificate2_t714049126_StaticFields, ___signedData_17)); }
inline ByteU5BU5D_t4116647657* get_signedData_17() const { return ___signedData_17; }
inline ByteU5BU5D_t4116647657** get_address_of_signedData_17() { return &___signedData_17; }
inline void set_signedData_17(ByteU5BU5D_t4116647657* value)
{
___signedData_17 = value;
Il2CppCodeGenWriteBarrier((&___signedData_17), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // X509CERTIFICATE2_T714049126_H
#ifndef X509CERTIFICATECOLLECTION_T3399372417_H
#define X509CERTIFICATECOLLECTION_T3399372417_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Security.Cryptography.X509Certificates.X509CertificateCollection
struct X509CertificateCollection_t3399372417 : public CollectionBase_t2727926298
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // X509CERTIFICATECOLLECTION_T3399372417_H
#ifndef SYSTEMEXCEPTION_T176217640_H
#define SYSTEMEXCEPTION_T176217640_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.SystemException
struct SystemException_t176217640 : public Exception_t
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // SYSTEMEXCEPTION_T176217640_H
#ifndef GROUP_T2468205786_H
#define GROUP_T2468205786_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Text.RegularExpressions.Group
struct Group_t2468205786 : public Capture_t2232016050
{
public:
// System.Boolean System.Text.RegularExpressions.Group::success
bool ___success_4;
// System.Text.RegularExpressions.CaptureCollection System.Text.RegularExpressions.Group::captures
CaptureCollection_t1760593541 * ___captures_5;
public:
inline static int32_t get_offset_of_success_4() { return static_cast<int32_t>(offsetof(Group_t2468205786, ___success_4)); }
inline bool get_success_4() const { return ___success_4; }
inline bool* get_address_of_success_4() { return &___success_4; }
inline void set_success_4(bool value)
{
___success_4 = value;
}
inline static int32_t get_offset_of_captures_5() { return static_cast<int32_t>(offsetof(Group_t2468205786, ___captures_5)); }
inline CaptureCollection_t1760593541 * get_captures_5() const { return ___captures_5; }
inline CaptureCollection_t1760593541 ** get_address_of_captures_5() { return &___captures_5; }
inline void set_captures_5(CaptureCollection_t1760593541 * value)
{
___captures_5 = value;
Il2CppCodeGenWriteBarrier((&___captures_5), value);
}
};
struct Group_t2468205786_StaticFields
{
public:
// System.Text.RegularExpressions.Group System.Text.RegularExpressions.Group::Fail
Group_t2468205786 * ___Fail_3;
public:
inline static int32_t get_offset_of_Fail_3() { return static_cast<int32_t>(offsetof(Group_t2468205786_StaticFields, ___Fail_3)); }
inline Group_t2468205786 * get_Fail_3() const { return ___Fail_3; }
inline Group_t2468205786 ** get_address_of_Fail_3() { return &___Fail_3; }
inline void set_Fail_3(Group_t2468205786 * value)
{
___Fail_3 = value;
Il2CppCodeGenWriteBarrier((&___Fail_3), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // GROUP_T2468205786_H
#ifndef TIMESPAN_T881159249_H
#define TIMESPAN_T881159249_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.TimeSpan
struct TimeSpan_t881159249
{
public:
// System.Int64 System.TimeSpan::_ticks
int64_t ____ticks_3;
public:
inline static int32_t get_offset_of__ticks_3() { return static_cast<int32_t>(offsetof(TimeSpan_t881159249, ____ticks_3)); }
inline int64_t get__ticks_3() const { return ____ticks_3; }
inline int64_t* get_address_of__ticks_3() { return &____ticks_3; }
inline void set__ticks_3(int64_t value)
{
____ticks_3 = value;
}
};
struct TimeSpan_t881159249_StaticFields
{
public:
// System.TimeSpan System.TimeSpan::MaxValue
TimeSpan_t881159249 ___MaxValue_0;
// System.TimeSpan System.TimeSpan::MinValue
TimeSpan_t881159249 ___MinValue_1;
// System.TimeSpan System.TimeSpan::Zero
TimeSpan_t881159249 ___Zero_2;
public:
inline static int32_t get_offset_of_MaxValue_0() { return static_cast<int32_t>(offsetof(TimeSpan_t881159249_StaticFields, ___MaxValue_0)); }
inline TimeSpan_t881159249 get_MaxValue_0() const { return ___MaxValue_0; }
inline TimeSpan_t881159249 * get_address_of_MaxValue_0() { return &___MaxValue_0; }
inline void set_MaxValue_0(TimeSpan_t881159249 value)
{
___MaxValue_0 = value;
}
inline static int32_t get_offset_of_MinValue_1() { return static_cast<int32_t>(offsetof(TimeSpan_t881159249_StaticFields, ___MinValue_1)); }
inline TimeSpan_t881159249 get_MinValue_1() const { return ___MinValue_1; }
inline TimeSpan_t881159249 * get_address_of_MinValue_1() { return &___MinValue_1; }
inline void set_MinValue_1(TimeSpan_t881159249 value)
{
___MinValue_1 = value;
}
inline static int32_t get_offset_of_Zero_2() { return static_cast<int32_t>(offsetof(TimeSpan_t881159249_StaticFields, ___Zero_2)); }
inline TimeSpan_t881159249 get_Zero_2() const { return ___Zero_2; }
inline TimeSpan_t881159249 * get_address_of_Zero_2() { return &___Zero_2; }
inline void set_Zero_2(TimeSpan_t881159249 value)
{
___Zero_2 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // TIMESPAN_T881159249_H
#ifndef UINT32_T2560061978_H
#define UINT32_T2560061978_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.UInt32
struct UInt32_t2560061978
{
public:
// System.UInt32 System.UInt32::m_value
uint32_t ___m_value_2;
public:
inline static int32_t get_offset_of_m_value_2() { return static_cast<int32_t>(offsetof(UInt32_t2560061978, ___m_value_2)); }
inline uint32_t get_m_value_2() const { return ___m_value_2; }
inline uint32_t* get_address_of_m_value_2() { return &___m_value_2; }
inline void set_m_value_2(uint32_t value)
{
___m_value_2 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // UINT32_T2560061978_H
#ifndef UINT64_T4134040092_H
#define UINT64_T4134040092_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.UInt64
struct UInt64_t4134040092
{
public:
// System.UInt64 System.UInt64::m_value
uint64_t ___m_value_0;
public:
inline static int32_t get_offset_of_m_value_0() { return static_cast<int32_t>(offsetof(UInt64_t4134040092, ___m_value_0)); }
inline uint64_t get_m_value_0() const { return ___m_value_0; }
inline uint64_t* get_address_of_m_value_0() { return &___m_value_0; }
inline void set_m_value_0(uint64_t value)
{
___m_value_0 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // UINT64_T4134040092_H
#ifndef VOID_T1185182177_H
#define VOID_T1185182177_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void
struct Void_t1185182177
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // VOID_T1185182177_H
#ifndef U3CPRIVATEIMPLEMENTATIONDETAILSU3E_T3057255363_H
#define U3CPRIVATEIMPLEMENTATIONDETAILSU3E_T3057255363_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// <PrivateImplementationDetails>
struct U3CPrivateImplementationDetailsU3E_t3057255363 : public RuntimeObject
{
public:
public:
};
struct U3CPrivateImplementationDetailsU3E_t3057255363_StaticFields
{
public:
// <PrivateImplementationDetails>/$ArrayType$3132 <PrivateImplementationDetails>::$$field-0
U24ArrayTypeU243132_t2732071529 ___U24U24fieldU2D0_0;
// <PrivateImplementationDetails>/$ArrayType$256 <PrivateImplementationDetails>::$$field-5
U24ArrayTypeU24256_t1929481983 ___U24U24fieldU2D5_1;
// <PrivateImplementationDetails>/$ArrayType$20 <PrivateImplementationDetails>::$$field-6
U24ArrayTypeU2420_t1704471046 ___U24U24fieldU2D6_2;
// <PrivateImplementationDetails>/$ArrayType$32 <PrivateImplementationDetails>::$$field-7
U24ArrayTypeU2432_t3652892011 ___U24U24fieldU2D7_3;
// <PrivateImplementationDetails>/$ArrayType$48 <PrivateImplementationDetails>::$$field-8
U24ArrayTypeU2448_t1337922364 ___U24U24fieldU2D8_4;
// <PrivateImplementationDetails>/$ArrayType$64 <PrivateImplementationDetails>::$$field-9
U24ArrayTypeU2464_t499776626 ___U24U24fieldU2D9_5;
// <PrivateImplementationDetails>/$ArrayType$64 <PrivateImplementationDetails>::$$field-11
U24ArrayTypeU2464_t499776626 ___U24U24fieldU2D11_6;
// <PrivateImplementationDetails>/$ArrayType$64 <PrivateImplementationDetails>::$$field-12
U24ArrayTypeU2464_t499776626 ___U24U24fieldU2D12_7;
// <PrivateImplementationDetails>/$ArrayType$64 <PrivateImplementationDetails>::$$field-13
U24ArrayTypeU2464_t499776626 ___U24U24fieldU2D13_8;
// <PrivateImplementationDetails>/$ArrayType$12 <PrivateImplementationDetails>::$$field-14
U24ArrayTypeU2412_t2490092598 ___U24U24fieldU2D14_9;
// <PrivateImplementationDetails>/$ArrayType$12 <PrivateImplementationDetails>::$$field-15
U24ArrayTypeU2412_t2490092598 ___U24U24fieldU2D15_10;
// <PrivateImplementationDetails>/$ArrayType$12 <PrivateImplementationDetails>::$$field-16
U24ArrayTypeU2412_t2490092598 ___U24U24fieldU2D16_11;
// <PrivateImplementationDetails>/$ArrayType$16 <PrivateImplementationDetails>::$$field-17
U24ArrayTypeU2416_t3254766645 ___U24U24fieldU2D17_12;
// <PrivateImplementationDetails>/$ArrayType$4 <PrivateImplementationDetails>::$$field-21
U24ArrayTypeU244_t1630999355 ___U24U24fieldU2D21_13;
// <PrivateImplementationDetails>/$ArrayType$4 <PrivateImplementationDetails>::$$field-22
U24ArrayTypeU244_t1630999355 ___U24U24fieldU2D22_14;
public:
inline static int32_t get_offset_of_U24U24fieldU2D0_0() { return static_cast<int32_t>(offsetof(U3CPrivateImplementationDetailsU3E_t3057255363_StaticFields, ___U24U24fieldU2D0_0)); }
inline U24ArrayTypeU243132_t2732071529 get_U24U24fieldU2D0_0() const { return ___U24U24fieldU2D0_0; }
inline U24ArrayTypeU243132_t2732071529 * get_address_of_U24U24fieldU2D0_0() { return &___U24U24fieldU2D0_0; }
inline void set_U24U24fieldU2D0_0(U24ArrayTypeU243132_t2732071529 value)
{
___U24U24fieldU2D0_0 = value;
}
inline static int32_t get_offset_of_U24U24fieldU2D5_1() { return static_cast<int32_t>(offsetof(U3CPrivateImplementationDetailsU3E_t3057255363_StaticFields, ___U24U24fieldU2D5_1)); }
inline U24ArrayTypeU24256_t1929481983 get_U24U24fieldU2D5_1() const { return ___U24U24fieldU2D5_1; }
inline U24ArrayTypeU24256_t1929481983 * get_address_of_U24U24fieldU2D5_1() { return &___U24U24fieldU2D5_1; }
inline void set_U24U24fieldU2D5_1(U24ArrayTypeU24256_t1929481983 value)
{
___U24U24fieldU2D5_1 = value;
}
inline static int32_t get_offset_of_U24U24fieldU2D6_2() { return static_cast<int32_t>(offsetof(U3CPrivateImplementationDetailsU3E_t3057255363_StaticFields, ___U24U24fieldU2D6_2)); }
inline U24ArrayTypeU2420_t1704471046 get_U24U24fieldU2D6_2() const { return ___U24U24fieldU2D6_2; }
inline U24ArrayTypeU2420_t1704471046 * get_address_of_U24U24fieldU2D6_2() { return &___U24U24fieldU2D6_2; }
inline void set_U24U24fieldU2D6_2(U24ArrayTypeU2420_t1704471046 value)
{
___U24U24fieldU2D6_2 = value;
}
inline static int32_t get_offset_of_U24U24fieldU2D7_3() { return static_cast<int32_t>(offsetof(U3CPrivateImplementationDetailsU3E_t3057255363_StaticFields, ___U24U24fieldU2D7_3)); }
inline U24ArrayTypeU2432_t3652892011 get_U24U24fieldU2D7_3() const { return ___U24U24fieldU2D7_3; }
inline U24ArrayTypeU2432_t3652892011 * get_address_of_U24U24fieldU2D7_3() { return &___U24U24fieldU2D7_3; }
inline void set_U24U24fieldU2D7_3(U24ArrayTypeU2432_t3652892011 value)
{
___U24U24fieldU2D7_3 = value;
}
inline static int32_t get_offset_of_U24U24fieldU2D8_4() { return static_cast<int32_t>(offsetof(U3CPrivateImplementationDetailsU3E_t3057255363_StaticFields, ___U24U24fieldU2D8_4)); }
inline U24ArrayTypeU2448_t1337922364 get_U24U24fieldU2D8_4() const { return ___U24U24fieldU2D8_4; }
inline U24ArrayTypeU2448_t1337922364 * get_address_of_U24U24fieldU2D8_4() { return &___U24U24fieldU2D8_4; }
inline void set_U24U24fieldU2D8_4(U24ArrayTypeU2448_t1337922364 value)
{
___U24U24fieldU2D8_4 = value;
}
inline static int32_t get_offset_of_U24U24fieldU2D9_5() { return static_cast<int32_t>(offsetof(U3CPrivateImplementationDetailsU3E_t3057255363_StaticFields, ___U24U24fieldU2D9_5)); }
inline U24ArrayTypeU2464_t499776626 get_U24U24fieldU2D9_5() const { return ___U24U24fieldU2D9_5; }
inline U24ArrayTypeU2464_t499776626 * get_address_of_U24U24fieldU2D9_5() { return &___U24U24fieldU2D9_5; }
inline void set_U24U24fieldU2D9_5(U24ArrayTypeU2464_t499776626 value)
{
___U24U24fieldU2D9_5 = value;
}
inline static int32_t get_offset_of_U24U24fieldU2D11_6() { return static_cast<int32_t>(offsetof(U3CPrivateImplementationDetailsU3E_t3057255363_StaticFields, ___U24U24fieldU2D11_6)); }
inline U24ArrayTypeU2464_t499776626 get_U24U24fieldU2D11_6() const { return ___U24U24fieldU2D11_6; }
inline U24ArrayTypeU2464_t499776626 * get_address_of_U24U24fieldU2D11_6() { return &___U24U24fieldU2D11_6; }
inline void set_U24U24fieldU2D11_6(U24ArrayTypeU2464_t499776626 value)
{
___U24U24fieldU2D11_6 = value;
}
inline static int32_t get_offset_of_U24U24fieldU2D12_7() { return static_cast<int32_t>(offsetof(U3CPrivateImplementationDetailsU3E_t3057255363_StaticFields, ___U24U24fieldU2D12_7)); }
inline U24ArrayTypeU2464_t499776626 get_U24U24fieldU2D12_7() const { return ___U24U24fieldU2D12_7; }
inline U24ArrayTypeU2464_t499776626 * get_address_of_U24U24fieldU2D12_7() { return &___U24U24fieldU2D12_7; }
inline void set_U24U24fieldU2D12_7(U24ArrayTypeU2464_t499776626 value)
{
___U24U24fieldU2D12_7 = value;
}
inline static int32_t get_offset_of_U24U24fieldU2D13_8() { return static_cast<int32_t>(offsetof(U3CPrivateImplementationDetailsU3E_t3057255363_StaticFields, ___U24U24fieldU2D13_8)); }
inline U24ArrayTypeU2464_t499776626 get_U24U24fieldU2D13_8() const { return ___U24U24fieldU2D13_8; }
inline U24ArrayTypeU2464_t499776626 * get_address_of_U24U24fieldU2D13_8() { return &___U24U24fieldU2D13_8; }
inline void set_U24U24fieldU2D13_8(U24ArrayTypeU2464_t499776626 value)
{
___U24U24fieldU2D13_8 = value;
}
inline static int32_t get_offset_of_U24U24fieldU2D14_9() { return static_cast<int32_t>(offsetof(U3CPrivateImplementationDetailsU3E_t3057255363_StaticFields, ___U24U24fieldU2D14_9)); }
inline U24ArrayTypeU2412_t2490092598 get_U24U24fieldU2D14_9() const { return ___U24U24fieldU2D14_9; }
inline U24ArrayTypeU2412_t2490092598 * get_address_of_U24U24fieldU2D14_9() { return &___U24U24fieldU2D14_9; }
inline void set_U24U24fieldU2D14_9(U24ArrayTypeU2412_t2490092598 value)
{
___U24U24fieldU2D14_9 = value;
}
inline static int32_t get_offset_of_U24U24fieldU2D15_10() { return static_cast<int32_t>(offsetof(U3CPrivateImplementationDetailsU3E_t3057255363_StaticFields, ___U24U24fieldU2D15_10)); }
inline U24ArrayTypeU2412_t2490092598 get_U24U24fieldU2D15_10() const { return ___U24U24fieldU2D15_10; }
inline U24ArrayTypeU2412_t2490092598 * get_address_of_U24U24fieldU2D15_10() { return &___U24U24fieldU2D15_10; }
inline void set_U24U24fieldU2D15_10(U24ArrayTypeU2412_t2490092598 value)
{
___U24U24fieldU2D15_10 = value;
}
inline static int32_t get_offset_of_U24U24fieldU2D16_11() { return static_cast<int32_t>(offsetof(U3CPrivateImplementationDetailsU3E_t3057255363_StaticFields, ___U24U24fieldU2D16_11)); }
inline U24ArrayTypeU2412_t2490092598 get_U24U24fieldU2D16_11() const { return ___U24U24fieldU2D16_11; }
inline U24ArrayTypeU2412_t2490092598 * get_address_of_U24U24fieldU2D16_11() { return &___U24U24fieldU2D16_11; }
inline void set_U24U24fieldU2D16_11(U24ArrayTypeU2412_t2490092598 value)
{
___U24U24fieldU2D16_11 = value;
}
inline static int32_t get_offset_of_U24U24fieldU2D17_12() { return static_cast<int32_t>(offsetof(U3CPrivateImplementationDetailsU3E_t3057255363_StaticFields, ___U24U24fieldU2D17_12)); }
inline U24ArrayTypeU2416_t3254766645 get_U24U24fieldU2D17_12() const { return ___U24U24fieldU2D17_12; }
inline U24ArrayTypeU2416_t3254766645 * get_address_of_U24U24fieldU2D17_12() { return &___U24U24fieldU2D17_12; }
inline void set_U24U24fieldU2D17_12(U24ArrayTypeU2416_t3254766645 value)
{
___U24U24fieldU2D17_12 = value;
}
inline static int32_t get_offset_of_U24U24fieldU2D21_13() { return static_cast<int32_t>(offsetof(U3CPrivateImplementationDetailsU3E_t3057255363_StaticFields, ___U24U24fieldU2D21_13)); }
inline U24ArrayTypeU244_t1630999355 get_U24U24fieldU2D21_13() const { return ___U24U24fieldU2D21_13; }
inline U24ArrayTypeU244_t1630999355 * get_address_of_U24U24fieldU2D21_13() { return &___U24U24fieldU2D21_13; }
inline void set_U24U24fieldU2D21_13(U24ArrayTypeU244_t1630999355 value)
{
___U24U24fieldU2D21_13 = value;
}
inline static int32_t get_offset_of_U24U24fieldU2D22_14() { return static_cast<int32_t>(offsetof(U3CPrivateImplementationDetailsU3E_t3057255363_StaticFields, ___U24U24fieldU2D22_14)); }
inline U24ArrayTypeU244_t1630999355 get_U24U24fieldU2D22_14() const { return ___U24U24fieldU2D22_14; }
inline U24ArrayTypeU244_t1630999355 * get_address_of_U24U24fieldU2D22_14() { return &___U24U24fieldU2D22_14; }
inline void set_U24U24fieldU2D22_14(U24ArrayTypeU244_t1630999355 value)
{
___U24U24fieldU2D22_14 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // U3CPRIVATEIMPLEMENTATIONDETAILSU3E_T3057255363_H
#ifndef SIGN_T3338384039_H
#define SIGN_T3338384039_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Math.BigInteger/Sign
struct Sign_t3338384039
{
public:
// System.Int32 Mono.Math.BigInteger/Sign::value__
int32_t ___value___1;
public:
inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(Sign_t3338384039, ___value___1)); }
inline int32_t get_value___1() const { return ___value___1; }
inline int32_t* get_address_of_value___1() { return &___value___1; }
inline void set_value___1(int32_t value)
{
___value___1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // SIGN_T3338384039_H
#ifndef CONFIDENCEFACTOR_T2516000286_H
#define CONFIDENCEFACTOR_T2516000286_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Math.Prime.ConfidenceFactor
struct ConfidenceFactor_t2516000286
{
public:
// System.Int32 Mono.Math.Prime.ConfidenceFactor::value__
int32_t ___value___1;
public:
inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(ConfidenceFactor_t2516000286, ___value___1)); }
inline int32_t get_value___1() const { return ___value___1; }
inline int32_t* get_address_of_value___1() { return &___value___1; }
inline void set_value___1(int32_t value)
{
___value___1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // CONFIDENCEFACTOR_T2516000286_H
#ifndef HMAC_T3689525210_H
#define HMAC_T3689525210_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Cryptography.HMAC
struct HMAC_t3689525210 : public KeyedHashAlgorithm_t112861511
{
public:
// System.Security.Cryptography.HashAlgorithm Mono.Security.Cryptography.HMAC::hash
HashAlgorithm_t1432317219 * ___hash_5;
// System.Boolean Mono.Security.Cryptography.HMAC::hashing
bool ___hashing_6;
// System.Byte[] Mono.Security.Cryptography.HMAC::innerPad
ByteU5BU5D_t4116647657* ___innerPad_7;
// System.Byte[] Mono.Security.Cryptography.HMAC::outerPad
ByteU5BU5D_t4116647657* ___outerPad_8;
public:
inline static int32_t get_offset_of_hash_5() { return static_cast<int32_t>(offsetof(HMAC_t3689525210, ___hash_5)); }
inline HashAlgorithm_t1432317219 * get_hash_5() const { return ___hash_5; }
inline HashAlgorithm_t1432317219 ** get_address_of_hash_5() { return &___hash_5; }
inline void set_hash_5(HashAlgorithm_t1432317219 * value)
{
___hash_5 = value;
Il2CppCodeGenWriteBarrier((&___hash_5), value);
}
inline static int32_t get_offset_of_hashing_6() { return static_cast<int32_t>(offsetof(HMAC_t3689525210, ___hashing_6)); }
inline bool get_hashing_6() const { return ___hashing_6; }
inline bool* get_address_of_hashing_6() { return &___hashing_6; }
inline void set_hashing_6(bool value)
{
___hashing_6 = value;
}
inline static int32_t get_offset_of_innerPad_7() { return static_cast<int32_t>(offsetof(HMAC_t3689525210, ___innerPad_7)); }
inline ByteU5BU5D_t4116647657* get_innerPad_7() const { return ___innerPad_7; }
inline ByteU5BU5D_t4116647657** get_address_of_innerPad_7() { return &___innerPad_7; }
inline void set_innerPad_7(ByteU5BU5D_t4116647657* value)
{
___innerPad_7 = value;
Il2CppCodeGenWriteBarrier((&___innerPad_7), value);
}
inline static int32_t get_offset_of_outerPad_8() { return static_cast<int32_t>(offsetof(HMAC_t3689525210, ___outerPad_8)); }
inline ByteU5BU5D_t4116647657* get_outerPad_8() const { return ___outerPad_8; }
inline ByteU5BU5D_t4116647657** get_address_of_outerPad_8() { return &___outerPad_8; }
inline void set_outerPad_8(ByteU5BU5D_t4116647657* value)
{
___outerPad_8 = value;
Il2CppCodeGenWriteBarrier((&___outerPad_8), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // HMAC_T3689525210_H
#ifndef MD2MANAGED_T1377101535_H
#define MD2MANAGED_T1377101535_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Cryptography.MD2Managed
struct MD2Managed_t1377101535 : public MD2_t1561046427
{
public:
// System.Byte[] Mono.Security.Cryptography.MD2Managed::state
ByteU5BU5D_t4116647657* ___state_4;
// System.Byte[] Mono.Security.Cryptography.MD2Managed::checksum
ByteU5BU5D_t4116647657* ___checksum_5;
// System.Byte[] Mono.Security.Cryptography.MD2Managed::buffer
ByteU5BU5D_t4116647657* ___buffer_6;
// System.Int32 Mono.Security.Cryptography.MD2Managed::count
int32_t ___count_7;
// System.Byte[] Mono.Security.Cryptography.MD2Managed::x
ByteU5BU5D_t4116647657* ___x_8;
public:
inline static int32_t get_offset_of_state_4() { return static_cast<int32_t>(offsetof(MD2Managed_t1377101535, ___state_4)); }
inline ByteU5BU5D_t4116647657* get_state_4() const { return ___state_4; }
inline ByteU5BU5D_t4116647657** get_address_of_state_4() { return &___state_4; }
inline void set_state_4(ByteU5BU5D_t4116647657* value)
{
___state_4 = value;
Il2CppCodeGenWriteBarrier((&___state_4), value);
}
inline static int32_t get_offset_of_checksum_5() { return static_cast<int32_t>(offsetof(MD2Managed_t1377101535, ___checksum_5)); }
inline ByteU5BU5D_t4116647657* get_checksum_5() const { return ___checksum_5; }
inline ByteU5BU5D_t4116647657** get_address_of_checksum_5() { return &___checksum_5; }
inline void set_checksum_5(ByteU5BU5D_t4116647657* value)
{
___checksum_5 = value;
Il2CppCodeGenWriteBarrier((&___checksum_5), value);
}
inline static int32_t get_offset_of_buffer_6() { return static_cast<int32_t>(offsetof(MD2Managed_t1377101535, ___buffer_6)); }
inline ByteU5BU5D_t4116647657* get_buffer_6() const { return ___buffer_6; }
inline ByteU5BU5D_t4116647657** get_address_of_buffer_6() { return &___buffer_6; }
inline void set_buffer_6(ByteU5BU5D_t4116647657* value)
{
___buffer_6 = value;
Il2CppCodeGenWriteBarrier((&___buffer_6), value);
}
inline static int32_t get_offset_of_count_7() { return static_cast<int32_t>(offsetof(MD2Managed_t1377101535, ___count_7)); }
inline int32_t get_count_7() const { return ___count_7; }
inline int32_t* get_address_of_count_7() { return &___count_7; }
inline void set_count_7(int32_t value)
{
___count_7 = value;
}
inline static int32_t get_offset_of_x_8() { return static_cast<int32_t>(offsetof(MD2Managed_t1377101535, ___x_8)); }
inline ByteU5BU5D_t4116647657* get_x_8() const { return ___x_8; }
inline ByteU5BU5D_t4116647657** get_address_of_x_8() { return &___x_8; }
inline void set_x_8(ByteU5BU5D_t4116647657* value)
{
___x_8 = value;
Il2CppCodeGenWriteBarrier((&___x_8), value);
}
};
struct MD2Managed_t1377101535_StaticFields
{
public:
// System.Byte[] Mono.Security.Cryptography.MD2Managed::PI_SUBST
ByteU5BU5D_t4116647657* ___PI_SUBST_9;
public:
inline static int32_t get_offset_of_PI_SUBST_9() { return static_cast<int32_t>(offsetof(MD2Managed_t1377101535_StaticFields, ___PI_SUBST_9)); }
inline ByteU5BU5D_t4116647657* get_PI_SUBST_9() const { return ___PI_SUBST_9; }
inline ByteU5BU5D_t4116647657** get_address_of_PI_SUBST_9() { return &___PI_SUBST_9; }
inline void set_PI_SUBST_9(ByteU5BU5D_t4116647657* value)
{
___PI_SUBST_9 = value;
Il2CppCodeGenWriteBarrier((&___PI_SUBST_9), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // MD2MANAGED_T1377101535_H
#ifndef MD4MANAGED_T957540063_H
#define MD4MANAGED_T957540063_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Cryptography.MD4Managed
struct MD4Managed_t957540063 : public MD4_t1560915355
{
public:
// System.UInt32[] Mono.Security.Cryptography.MD4Managed::state
UInt32U5BU5D_t2770800703* ___state_4;
// System.Byte[] Mono.Security.Cryptography.MD4Managed::buffer
ByteU5BU5D_t4116647657* ___buffer_5;
// System.UInt32[] Mono.Security.Cryptography.MD4Managed::count
UInt32U5BU5D_t2770800703* ___count_6;
// System.UInt32[] Mono.Security.Cryptography.MD4Managed::x
UInt32U5BU5D_t2770800703* ___x_7;
// System.Byte[] Mono.Security.Cryptography.MD4Managed::digest
ByteU5BU5D_t4116647657* ___digest_8;
public:
inline static int32_t get_offset_of_state_4() { return static_cast<int32_t>(offsetof(MD4Managed_t957540063, ___state_4)); }
inline UInt32U5BU5D_t2770800703* get_state_4() const { return ___state_4; }
inline UInt32U5BU5D_t2770800703** get_address_of_state_4() { return &___state_4; }
inline void set_state_4(UInt32U5BU5D_t2770800703* value)
{
___state_4 = value;
Il2CppCodeGenWriteBarrier((&___state_4), value);
}
inline static int32_t get_offset_of_buffer_5() { return static_cast<int32_t>(offsetof(MD4Managed_t957540063, ___buffer_5)); }
inline ByteU5BU5D_t4116647657* get_buffer_5() const { return ___buffer_5; }
inline ByteU5BU5D_t4116647657** get_address_of_buffer_5() { return &___buffer_5; }
inline void set_buffer_5(ByteU5BU5D_t4116647657* value)
{
___buffer_5 = value;
Il2CppCodeGenWriteBarrier((&___buffer_5), value);
}
inline static int32_t get_offset_of_count_6() { return static_cast<int32_t>(offsetof(MD4Managed_t957540063, ___count_6)); }
inline UInt32U5BU5D_t2770800703* get_count_6() const { return ___count_6; }
inline UInt32U5BU5D_t2770800703** get_address_of_count_6() { return &___count_6; }
inline void set_count_6(UInt32U5BU5D_t2770800703* value)
{
___count_6 = value;
Il2CppCodeGenWriteBarrier((&___count_6), value);
}
inline static int32_t get_offset_of_x_7() { return static_cast<int32_t>(offsetof(MD4Managed_t957540063, ___x_7)); }
inline UInt32U5BU5D_t2770800703* get_x_7() const { return ___x_7; }
inline UInt32U5BU5D_t2770800703** get_address_of_x_7() { return &___x_7; }
inline void set_x_7(UInt32U5BU5D_t2770800703* value)
{
___x_7 = value;
Il2CppCodeGenWriteBarrier((&___x_7), value);
}
inline static int32_t get_offset_of_digest_8() { return static_cast<int32_t>(offsetof(MD4Managed_t957540063, ___digest_8)); }
inline ByteU5BU5D_t4116647657* get_digest_8() const { return ___digest_8; }
inline ByteU5BU5D_t4116647657** get_address_of_digest_8() { return &___digest_8; }
inline void set_digest_8(ByteU5BU5D_t4116647657* value)
{
___digest_8 = value;
Il2CppCodeGenWriteBarrier((&___digest_8), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // MD4MANAGED_T957540063_H
#ifndef RSAMANAGED_T1757093820_H
#define RSAMANAGED_T1757093820_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Cryptography.RSAManaged
struct RSAManaged_t1757093820 : public RSA_t2385438082
{
public:
// System.Boolean Mono.Security.Cryptography.RSAManaged::isCRTpossible
bool ___isCRTpossible_2;
// System.Boolean Mono.Security.Cryptography.RSAManaged::keyBlinding
bool ___keyBlinding_3;
// System.Boolean Mono.Security.Cryptography.RSAManaged::keypairGenerated
bool ___keypairGenerated_4;
// System.Boolean Mono.Security.Cryptography.RSAManaged::m_disposed
bool ___m_disposed_5;
// Mono.Math.BigInteger Mono.Security.Cryptography.RSAManaged::d
BigInteger_t2902905090 * ___d_6;
// Mono.Math.BigInteger Mono.Security.Cryptography.RSAManaged::p
BigInteger_t2902905090 * ___p_7;
// Mono.Math.BigInteger Mono.Security.Cryptography.RSAManaged::q
BigInteger_t2902905090 * ___q_8;
// Mono.Math.BigInteger Mono.Security.Cryptography.RSAManaged::dp
BigInteger_t2902905090 * ___dp_9;
// Mono.Math.BigInteger Mono.Security.Cryptography.RSAManaged::dq
BigInteger_t2902905090 * ___dq_10;
// Mono.Math.BigInteger Mono.Security.Cryptography.RSAManaged::qInv
BigInteger_t2902905090 * ___qInv_11;
// Mono.Math.BigInteger Mono.Security.Cryptography.RSAManaged::n
BigInteger_t2902905090 * ___n_12;
// Mono.Math.BigInteger Mono.Security.Cryptography.RSAManaged::e
BigInteger_t2902905090 * ___e_13;
// Mono.Security.Cryptography.RSAManaged/KeyGeneratedEventHandler Mono.Security.Cryptography.RSAManaged::KeyGenerated
KeyGeneratedEventHandler_t3064139578 * ___KeyGenerated_14;
public:
inline static int32_t get_offset_of_isCRTpossible_2() { return static_cast<int32_t>(offsetof(RSAManaged_t1757093820, ___isCRTpossible_2)); }
inline bool get_isCRTpossible_2() const { return ___isCRTpossible_2; }
inline bool* get_address_of_isCRTpossible_2() { return &___isCRTpossible_2; }
inline void set_isCRTpossible_2(bool value)
{
___isCRTpossible_2 = value;
}
inline static int32_t get_offset_of_keyBlinding_3() { return static_cast<int32_t>(offsetof(RSAManaged_t1757093820, ___keyBlinding_3)); }
inline bool get_keyBlinding_3() const { return ___keyBlinding_3; }
inline bool* get_address_of_keyBlinding_3() { return &___keyBlinding_3; }
inline void set_keyBlinding_3(bool value)
{
___keyBlinding_3 = value;
}
inline static int32_t get_offset_of_keypairGenerated_4() { return static_cast<int32_t>(offsetof(RSAManaged_t1757093820, ___keypairGenerated_4)); }
inline bool get_keypairGenerated_4() const { return ___keypairGenerated_4; }
inline bool* get_address_of_keypairGenerated_4() { return &___keypairGenerated_4; }
inline void set_keypairGenerated_4(bool value)
{
___keypairGenerated_4 = value;
}
inline static int32_t get_offset_of_m_disposed_5() { return static_cast<int32_t>(offsetof(RSAManaged_t1757093820, ___m_disposed_5)); }
inline bool get_m_disposed_5() const { return ___m_disposed_5; }
inline bool* get_address_of_m_disposed_5() { return &___m_disposed_5; }
inline void set_m_disposed_5(bool value)
{
___m_disposed_5 = value;
}
inline static int32_t get_offset_of_d_6() { return static_cast<int32_t>(offsetof(RSAManaged_t1757093820, ___d_6)); }
inline BigInteger_t2902905090 * get_d_6() const { return ___d_6; }
inline BigInteger_t2902905090 ** get_address_of_d_6() { return &___d_6; }
inline void set_d_6(BigInteger_t2902905090 * value)
{
___d_6 = value;
Il2CppCodeGenWriteBarrier((&___d_6), value);
}
inline static int32_t get_offset_of_p_7() { return static_cast<int32_t>(offsetof(RSAManaged_t1757093820, ___p_7)); }
inline BigInteger_t2902905090 * get_p_7() const { return ___p_7; }
inline BigInteger_t2902905090 ** get_address_of_p_7() { return &___p_7; }
inline void set_p_7(BigInteger_t2902905090 * value)
{
___p_7 = value;
Il2CppCodeGenWriteBarrier((&___p_7), value);
}
inline static int32_t get_offset_of_q_8() { return static_cast<int32_t>(offsetof(RSAManaged_t1757093820, ___q_8)); }
inline BigInteger_t2902905090 * get_q_8() const { return ___q_8; }
inline BigInteger_t2902905090 ** get_address_of_q_8() { return &___q_8; }
inline void set_q_8(BigInteger_t2902905090 * value)
{
___q_8 = value;
Il2CppCodeGenWriteBarrier((&___q_8), value);
}
inline static int32_t get_offset_of_dp_9() { return static_cast<int32_t>(offsetof(RSAManaged_t1757093820, ___dp_9)); }
inline BigInteger_t2902905090 * get_dp_9() const { return ___dp_9; }
inline BigInteger_t2902905090 ** get_address_of_dp_9() { return &___dp_9; }
inline void set_dp_9(BigInteger_t2902905090 * value)
{
___dp_9 = value;
Il2CppCodeGenWriteBarrier((&___dp_9), value);
}
inline static int32_t get_offset_of_dq_10() { return static_cast<int32_t>(offsetof(RSAManaged_t1757093820, ___dq_10)); }
inline BigInteger_t2902905090 * get_dq_10() const { return ___dq_10; }
inline BigInteger_t2902905090 ** get_address_of_dq_10() { return &___dq_10; }
inline void set_dq_10(BigInteger_t2902905090 * value)
{
___dq_10 = value;
Il2CppCodeGenWriteBarrier((&___dq_10), value);
}
inline static int32_t get_offset_of_qInv_11() { return static_cast<int32_t>(offsetof(RSAManaged_t1757093820, ___qInv_11)); }
inline BigInteger_t2902905090 * get_qInv_11() const { return ___qInv_11; }
inline BigInteger_t2902905090 ** get_address_of_qInv_11() { return &___qInv_11; }
inline void set_qInv_11(BigInteger_t2902905090 * value)
{
___qInv_11 = value;
Il2CppCodeGenWriteBarrier((&___qInv_11), value);
}
inline static int32_t get_offset_of_n_12() { return static_cast<int32_t>(offsetof(RSAManaged_t1757093820, ___n_12)); }
inline BigInteger_t2902905090 * get_n_12() const { return ___n_12; }
inline BigInteger_t2902905090 ** get_address_of_n_12() { return &___n_12; }
inline void set_n_12(BigInteger_t2902905090 * value)
{
___n_12 = value;
Il2CppCodeGenWriteBarrier((&___n_12), value);
}
inline static int32_t get_offset_of_e_13() { return static_cast<int32_t>(offsetof(RSAManaged_t1757093820, ___e_13)); }
inline BigInteger_t2902905090 * get_e_13() const { return ___e_13; }
inline BigInteger_t2902905090 ** get_address_of_e_13() { return &___e_13; }
inline void set_e_13(BigInteger_t2902905090 * value)
{
___e_13 = value;
Il2CppCodeGenWriteBarrier((&___e_13), value);
}
inline static int32_t get_offset_of_KeyGenerated_14() { return static_cast<int32_t>(offsetof(RSAManaged_t1757093820, ___KeyGenerated_14)); }
inline KeyGeneratedEventHandler_t3064139578 * get_KeyGenerated_14() const { return ___KeyGenerated_14; }
inline KeyGeneratedEventHandler_t3064139578 ** get_address_of_KeyGenerated_14() { return &___KeyGenerated_14; }
inline void set_KeyGenerated_14(KeyGeneratedEventHandler_t3064139578 * value)
{
___KeyGenerated_14 = value;
Il2CppCodeGenWriteBarrier((&___KeyGenerated_14), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // RSAMANAGED_T1757093820_H
#ifndef ALERTDESCRIPTION_T1549755611_H
#define ALERTDESCRIPTION_T1549755611_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Protocol.Tls.AlertDescription
struct AlertDescription_t1549755611
{
public:
// System.Byte Mono.Security.Protocol.Tls.AlertDescription::value__
uint8_t ___value___1;
public:
inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(AlertDescription_t1549755611, ___value___1)); }
inline uint8_t get_value___1() const { return ___value___1; }
inline uint8_t* get_address_of_value___1() { return &___value___1; }
inline void set_value___1(uint8_t value)
{
___value___1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // ALERTDESCRIPTION_T1549755611_H
#ifndef ALERTLEVEL_T2246417555_H
#define ALERTLEVEL_T2246417555_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Protocol.Tls.AlertLevel
struct AlertLevel_t2246417555
{
public:
// System.Byte Mono.Security.Protocol.Tls.AlertLevel::value__
uint8_t ___value___1;
public:
inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(AlertLevel_t2246417555, ___value___1)); }
inline uint8_t get_value___1() const { return ___value___1; }
inline uint8_t* get_address_of_value___1() { return &___value___1; }
inline void set_value___1(uint8_t value)
{
___value___1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // ALERTLEVEL_T2246417555_H
#ifndef CIPHERALGORITHMTYPE_T1174400495_H
#define CIPHERALGORITHMTYPE_T1174400495_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Protocol.Tls.CipherAlgorithmType
struct CipherAlgorithmType_t1174400495
{
public:
// System.Int32 Mono.Security.Protocol.Tls.CipherAlgorithmType::value__
int32_t ___value___1;
public:
inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(CipherAlgorithmType_t1174400495, ___value___1)); }
inline int32_t get_value___1() const { return ___value___1; }
inline int32_t* get_address_of_value___1() { return &___value___1; }
inline void set_value___1(int32_t value)
{
___value___1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // CIPHERALGORITHMTYPE_T1174400495_H
#ifndef CONTENTTYPE_T2602934270_H
#define CONTENTTYPE_T2602934270_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Protocol.Tls.ContentType
struct ContentType_t2602934270
{
public:
// System.Byte Mono.Security.Protocol.Tls.ContentType::value__
uint8_t ___value___1;
public:
inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(ContentType_t2602934270, ___value___1)); }
inline uint8_t get_value___1() const { return ___value___1; }
inline uint8_t* get_address_of_value___1() { return &___value___1; }
inline void set_value___1(uint8_t value)
{
___value___1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // CONTENTTYPE_T2602934270_H
#ifndef EXCHANGEALGORITHMTYPE_T1320888206_H
#define EXCHANGEALGORITHMTYPE_T1320888206_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Protocol.Tls.ExchangeAlgorithmType
struct ExchangeAlgorithmType_t1320888206
{
public:
// System.Int32 Mono.Security.Protocol.Tls.ExchangeAlgorithmType::value__
int32_t ___value___1;
public:
inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(ExchangeAlgorithmType_t1320888206, ___value___1)); }
inline int32_t get_value___1() const { return ___value___1; }
inline int32_t* get_address_of_value___1() { return &___value___1; }
inline void set_value___1(int32_t value)
{
___value___1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // EXCHANGEALGORITHMTYPE_T1320888206_H
#ifndef CLIENTCERTIFICATETYPE_T1004704908_H
#define CLIENTCERTIFICATETYPE_T1004704908_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Protocol.Tls.Handshake.ClientCertificateType
struct ClientCertificateType_t1004704908
{
public:
// System.Int32 Mono.Security.Protocol.Tls.Handshake.ClientCertificateType::value__
int32_t ___value___1;
public:
inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(ClientCertificateType_t1004704908, ___value___1)); }
inline int32_t get_value___1() const { return ___value___1; }
inline int32_t* get_address_of_value___1() { return &___value___1; }
inline void set_value___1(int32_t value)
{
___value___1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // CLIENTCERTIFICATETYPE_T1004704908_H
#ifndef HANDSHAKETYPE_T3062346172_H
#define HANDSHAKETYPE_T3062346172_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Protocol.Tls.Handshake.HandshakeType
struct HandshakeType_t3062346172
{
public:
// System.Byte Mono.Security.Protocol.Tls.Handshake.HandshakeType::value__
uint8_t ___value___1;
public:
inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(HandshakeType_t3062346172, ___value___1)); }
inline uint8_t get_value___1() const { return ___value___1; }
inline uint8_t* get_address_of_value___1() { return &___value___1; }
inline void set_value___1(uint8_t value)
{
___value___1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // HANDSHAKETYPE_T3062346172_H
#ifndef HANDSHAKESTATE_T756684113_H
#define HANDSHAKESTATE_T756684113_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Protocol.Tls.HandshakeState
struct HandshakeState_t756684113
{
public:
// System.Int32 Mono.Security.Protocol.Tls.HandshakeState::value__
int32_t ___value___1;
public:
inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(HandshakeState_t756684113, ___value___1)); }
inline int32_t get_value___1() const { return ___value___1; }
inline int32_t* get_address_of_value___1() { return &___value___1; }
inline void set_value___1(int32_t value)
{
___value___1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // HANDSHAKESTATE_T756684113_H
#ifndef HASHALGORITHMTYPE_T2376832258_H
#define HASHALGORITHMTYPE_T2376832258_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Protocol.Tls.HashAlgorithmType
struct HashAlgorithmType_t2376832258
{
public:
// System.Int32 Mono.Security.Protocol.Tls.HashAlgorithmType::value__
int32_t ___value___1;
public:
inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(HashAlgorithmType_t2376832258, ___value___1)); }
inline int32_t get_value___1() const { return ___value___1; }
inline int32_t* get_address_of_value___1() { return &___value___1; }
inline void set_value___1(int32_t value)
{
___value___1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // HASHALGORITHMTYPE_T2376832258_H
#ifndef SECURITYCOMPRESSIONTYPE_T4242483129_H
#define SECURITYCOMPRESSIONTYPE_T4242483129_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Protocol.Tls.SecurityCompressionType
struct SecurityCompressionType_t4242483129
{
public:
// System.Int32 Mono.Security.Protocol.Tls.SecurityCompressionType::value__
int32_t ___value___1;
public:
inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(SecurityCompressionType_t4242483129, ___value___1)); }
inline int32_t get_value___1() const { return ___value___1; }
inline int32_t* get_address_of_value___1() { return &___value___1; }
inline void set_value___1(int32_t value)
{
___value___1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // SECURITYCOMPRESSIONTYPE_T4242483129_H
#ifndef SECURITYPROTOCOLTYPE_T1513093309_H
#define SECURITYPROTOCOLTYPE_T1513093309_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Protocol.Tls.SecurityProtocolType
struct SecurityProtocolType_t1513093309
{
public:
// System.Int32 Mono.Security.Protocol.Tls.SecurityProtocolType::value__
int32_t ___value___1;
public:
inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(SecurityProtocolType_t1513093309, ___value___1)); }
inline int32_t get_value___1() const { return ___value___1; }
inline int32_t* get_address_of_value___1() { return &___value___1; }
inline void set_value___1(int32_t value)
{
___value___1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // SECURITYPROTOCOLTYPE_T1513093309_H
#ifndef SSLSTREAMBASE_T1667413407_H
#define SSLSTREAMBASE_T1667413407_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Protocol.Tls.SslStreamBase
struct SslStreamBase_t1667413407 : public Stream_t1273022909
{
public:
// System.IO.Stream Mono.Security.Protocol.Tls.SslStreamBase::innerStream
Stream_t1273022909 * ___innerStream_3;
// System.IO.MemoryStream Mono.Security.Protocol.Tls.SslStreamBase::inputBuffer
MemoryStream_t94973147 * ___inputBuffer_4;
// Mono.Security.Protocol.Tls.Context Mono.Security.Protocol.Tls.SslStreamBase::context
Context_t3971234707 * ___context_5;
// Mono.Security.Protocol.Tls.RecordProtocol Mono.Security.Protocol.Tls.SslStreamBase::protocol
RecordProtocol_t3759049701 * ___protocol_6;
// System.Boolean Mono.Security.Protocol.Tls.SslStreamBase::ownsStream
bool ___ownsStream_7;
// System.Boolean modreq(System.Runtime.CompilerServices.IsVolatile) Mono.Security.Protocol.Tls.SslStreamBase::disposed
bool ___disposed_8;
// System.Boolean Mono.Security.Protocol.Tls.SslStreamBase::checkCertRevocationStatus
bool ___checkCertRevocationStatus_9;
// System.Object Mono.Security.Protocol.Tls.SslStreamBase::negotiate
RuntimeObject * ___negotiate_10;
// System.Object Mono.Security.Protocol.Tls.SslStreamBase::read
RuntimeObject * ___read_11;
// System.Object Mono.Security.Protocol.Tls.SslStreamBase::write
RuntimeObject * ___write_12;
// System.Threading.ManualResetEvent Mono.Security.Protocol.Tls.SslStreamBase::negotiationComplete
ManualResetEvent_t451242010 * ___negotiationComplete_13;
// System.Byte[] Mono.Security.Protocol.Tls.SslStreamBase::recbuf
ByteU5BU5D_t4116647657* ___recbuf_14;
// System.IO.MemoryStream Mono.Security.Protocol.Tls.SslStreamBase::recordStream
MemoryStream_t94973147 * ___recordStream_15;
public:
inline static int32_t get_offset_of_innerStream_3() { return static_cast<int32_t>(offsetof(SslStreamBase_t1667413407, ___innerStream_3)); }
inline Stream_t1273022909 * get_innerStream_3() const { return ___innerStream_3; }
inline Stream_t1273022909 ** get_address_of_innerStream_3() { return &___innerStream_3; }
inline void set_innerStream_3(Stream_t1273022909 * value)
{
___innerStream_3 = value;
Il2CppCodeGenWriteBarrier((&___innerStream_3), value);
}
inline static int32_t get_offset_of_inputBuffer_4() { return static_cast<int32_t>(offsetof(SslStreamBase_t1667413407, ___inputBuffer_4)); }
inline MemoryStream_t94973147 * get_inputBuffer_4() const { return ___inputBuffer_4; }
inline MemoryStream_t94973147 ** get_address_of_inputBuffer_4() { return &___inputBuffer_4; }
inline void set_inputBuffer_4(MemoryStream_t94973147 * value)
{
___inputBuffer_4 = value;
Il2CppCodeGenWriteBarrier((&___inputBuffer_4), value);
}
inline static int32_t get_offset_of_context_5() { return static_cast<int32_t>(offsetof(SslStreamBase_t1667413407, ___context_5)); }
inline Context_t3971234707 * get_context_5() const { return ___context_5; }
inline Context_t3971234707 ** get_address_of_context_5() { return &___context_5; }
inline void set_context_5(Context_t3971234707 * value)
{
___context_5 = value;
Il2CppCodeGenWriteBarrier((&___context_5), value);
}
inline static int32_t get_offset_of_protocol_6() { return static_cast<int32_t>(offsetof(SslStreamBase_t1667413407, ___protocol_6)); }
inline RecordProtocol_t3759049701 * get_protocol_6() const { return ___protocol_6; }
inline RecordProtocol_t3759049701 ** get_address_of_protocol_6() { return &___protocol_6; }
inline void set_protocol_6(RecordProtocol_t3759049701 * value)
{
___protocol_6 = value;
Il2CppCodeGenWriteBarrier((&___protocol_6), value);
}
inline static int32_t get_offset_of_ownsStream_7() { return static_cast<int32_t>(offsetof(SslStreamBase_t1667413407, ___ownsStream_7)); }
inline bool get_ownsStream_7() const { return ___ownsStream_7; }
inline bool* get_address_of_ownsStream_7() { return &___ownsStream_7; }
inline void set_ownsStream_7(bool value)
{
___ownsStream_7 = value;
}
inline static int32_t get_offset_of_disposed_8() { return static_cast<int32_t>(offsetof(SslStreamBase_t1667413407, ___disposed_8)); }
inline bool get_disposed_8() const { return ___disposed_8; }
inline bool* get_address_of_disposed_8() { return &___disposed_8; }
inline void set_disposed_8(bool value)
{
___disposed_8 = value;
}
inline static int32_t get_offset_of_checkCertRevocationStatus_9() { return static_cast<int32_t>(offsetof(SslStreamBase_t1667413407, ___checkCertRevocationStatus_9)); }
inline bool get_checkCertRevocationStatus_9() const { return ___checkCertRevocationStatus_9; }
inline bool* get_address_of_checkCertRevocationStatus_9() { return &___checkCertRevocationStatus_9; }
inline void set_checkCertRevocationStatus_9(bool value)
{
___checkCertRevocationStatus_9 = value;
}
inline static int32_t get_offset_of_negotiate_10() { return static_cast<int32_t>(offsetof(SslStreamBase_t1667413407, ___negotiate_10)); }
inline RuntimeObject * get_negotiate_10() const { return ___negotiate_10; }
inline RuntimeObject ** get_address_of_negotiate_10() { return &___negotiate_10; }
inline void set_negotiate_10(RuntimeObject * value)
{
___negotiate_10 = value;
Il2CppCodeGenWriteBarrier((&___negotiate_10), value);
}
inline static int32_t get_offset_of_read_11() { return static_cast<int32_t>(offsetof(SslStreamBase_t1667413407, ___read_11)); }
inline RuntimeObject * get_read_11() const { return ___read_11; }
inline RuntimeObject ** get_address_of_read_11() { return &___read_11; }
inline void set_read_11(RuntimeObject * value)
{
___read_11 = value;
Il2CppCodeGenWriteBarrier((&___read_11), value);
}
inline static int32_t get_offset_of_write_12() { return static_cast<int32_t>(offsetof(SslStreamBase_t1667413407, ___write_12)); }
inline RuntimeObject * get_write_12() const { return ___write_12; }
inline RuntimeObject ** get_address_of_write_12() { return &___write_12; }
inline void set_write_12(RuntimeObject * value)
{
___write_12 = value;
Il2CppCodeGenWriteBarrier((&___write_12), value);
}
inline static int32_t get_offset_of_negotiationComplete_13() { return static_cast<int32_t>(offsetof(SslStreamBase_t1667413407, ___negotiationComplete_13)); }
inline ManualResetEvent_t451242010 * get_negotiationComplete_13() const { return ___negotiationComplete_13; }
inline ManualResetEvent_t451242010 ** get_address_of_negotiationComplete_13() { return &___negotiationComplete_13; }
inline void set_negotiationComplete_13(ManualResetEvent_t451242010 * value)
{
___negotiationComplete_13 = value;
Il2CppCodeGenWriteBarrier((&___negotiationComplete_13), value);
}
inline static int32_t get_offset_of_recbuf_14() { return static_cast<int32_t>(offsetof(SslStreamBase_t1667413407, ___recbuf_14)); }
inline ByteU5BU5D_t4116647657* get_recbuf_14() const { return ___recbuf_14; }
inline ByteU5BU5D_t4116647657** get_address_of_recbuf_14() { return &___recbuf_14; }
inline void set_recbuf_14(ByteU5BU5D_t4116647657* value)
{
___recbuf_14 = value;
Il2CppCodeGenWriteBarrier((&___recbuf_14), value);
}
inline static int32_t get_offset_of_recordStream_15() { return static_cast<int32_t>(offsetof(SslStreamBase_t1667413407, ___recordStream_15)); }
inline MemoryStream_t94973147 * get_recordStream_15() const { return ___recordStream_15; }
inline MemoryStream_t94973147 ** get_address_of_recordStream_15() { return &___recordStream_15; }
inline void set_recordStream_15(MemoryStream_t94973147 * value)
{
___recordStream_15 = value;
Il2CppCodeGenWriteBarrier((&___recordStream_15), value);
}
};
struct SslStreamBase_t1667413407_StaticFields
{
public:
// System.Threading.ManualResetEvent Mono.Security.Protocol.Tls.SslStreamBase::record_processing
ManualResetEvent_t451242010 * ___record_processing_2;
public:
inline static int32_t get_offset_of_record_processing_2() { return static_cast<int32_t>(offsetof(SslStreamBase_t1667413407_StaticFields, ___record_processing_2)); }
inline ManualResetEvent_t451242010 * get_record_processing_2() const { return ___record_processing_2; }
inline ManualResetEvent_t451242010 ** get_address_of_record_processing_2() { return &___record_processing_2; }
inline void set_record_processing_2(ManualResetEvent_t451242010 * value)
{
___record_processing_2 = value;
Il2CppCodeGenWriteBarrier((&___record_processing_2), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // SSLSTREAMBASE_T1667413407_H
#ifndef TLSSERVERSETTINGS_T4144396432_H
#define TLSSERVERSETTINGS_T4144396432_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Protocol.Tls.TlsServerSettings
struct TlsServerSettings_t4144396432 : public RuntimeObject
{
public:
// Mono.Security.X509.X509CertificateCollection Mono.Security.Protocol.Tls.TlsServerSettings::certificates
X509CertificateCollection_t1542168550 * ___certificates_0;
// System.Security.Cryptography.RSA Mono.Security.Protocol.Tls.TlsServerSettings::certificateRSA
RSA_t2385438082 * ___certificateRSA_1;
// System.Security.Cryptography.RSAParameters Mono.Security.Protocol.Tls.TlsServerSettings::rsaParameters
RSAParameters_t1728406613 ___rsaParameters_2;
// System.Byte[] Mono.Security.Protocol.Tls.TlsServerSettings::signedParams
ByteU5BU5D_t4116647657* ___signedParams_3;
// System.String[] Mono.Security.Protocol.Tls.TlsServerSettings::distinguisedNames
StringU5BU5D_t1281789340* ___distinguisedNames_4;
// System.Boolean Mono.Security.Protocol.Tls.TlsServerSettings::serverKeyExchange
bool ___serverKeyExchange_5;
// System.Boolean Mono.Security.Protocol.Tls.TlsServerSettings::certificateRequest
bool ___certificateRequest_6;
// Mono.Security.Protocol.Tls.Handshake.ClientCertificateType[] Mono.Security.Protocol.Tls.TlsServerSettings::certificateTypes
ClientCertificateTypeU5BU5D_t4253920197* ___certificateTypes_7;
public:
inline static int32_t get_offset_of_certificates_0() { return static_cast<int32_t>(offsetof(TlsServerSettings_t4144396432, ___certificates_0)); }
inline X509CertificateCollection_t1542168550 * get_certificates_0() const { return ___certificates_0; }
inline X509CertificateCollection_t1542168550 ** get_address_of_certificates_0() { return &___certificates_0; }
inline void set_certificates_0(X509CertificateCollection_t1542168550 * value)
{
___certificates_0 = value;
Il2CppCodeGenWriteBarrier((&___certificates_0), value);
}
inline static int32_t get_offset_of_certificateRSA_1() { return static_cast<int32_t>(offsetof(TlsServerSettings_t4144396432, ___certificateRSA_1)); }
inline RSA_t2385438082 * get_certificateRSA_1() const { return ___certificateRSA_1; }
inline RSA_t2385438082 ** get_address_of_certificateRSA_1() { return &___certificateRSA_1; }
inline void set_certificateRSA_1(RSA_t2385438082 * value)
{
___certificateRSA_1 = value;
Il2CppCodeGenWriteBarrier((&___certificateRSA_1), value);
}
inline static int32_t get_offset_of_rsaParameters_2() { return static_cast<int32_t>(offsetof(TlsServerSettings_t4144396432, ___rsaParameters_2)); }
inline RSAParameters_t1728406613 get_rsaParameters_2() const { return ___rsaParameters_2; }
inline RSAParameters_t1728406613 * get_address_of_rsaParameters_2() { return &___rsaParameters_2; }
inline void set_rsaParameters_2(RSAParameters_t1728406613 value)
{
___rsaParameters_2 = value;
}
inline static int32_t get_offset_of_signedParams_3() { return static_cast<int32_t>(offsetof(TlsServerSettings_t4144396432, ___signedParams_3)); }
inline ByteU5BU5D_t4116647657* get_signedParams_3() const { return ___signedParams_3; }
inline ByteU5BU5D_t4116647657** get_address_of_signedParams_3() { return &___signedParams_3; }
inline void set_signedParams_3(ByteU5BU5D_t4116647657* value)
{
___signedParams_3 = value;
Il2CppCodeGenWriteBarrier((&___signedParams_3), value);
}
inline static int32_t get_offset_of_distinguisedNames_4() { return static_cast<int32_t>(offsetof(TlsServerSettings_t4144396432, ___distinguisedNames_4)); }
inline StringU5BU5D_t1281789340* get_distinguisedNames_4() const { return ___distinguisedNames_4; }
inline StringU5BU5D_t1281789340** get_address_of_distinguisedNames_4() { return &___distinguisedNames_4; }
inline void set_distinguisedNames_4(StringU5BU5D_t1281789340* value)
{
___distinguisedNames_4 = value;
Il2CppCodeGenWriteBarrier((&___distinguisedNames_4), value);
}
inline static int32_t get_offset_of_serverKeyExchange_5() { return static_cast<int32_t>(offsetof(TlsServerSettings_t4144396432, ___serverKeyExchange_5)); }
inline bool get_serverKeyExchange_5() const { return ___serverKeyExchange_5; }
inline bool* get_address_of_serverKeyExchange_5() { return &___serverKeyExchange_5; }
inline void set_serverKeyExchange_5(bool value)
{
___serverKeyExchange_5 = value;
}
inline static int32_t get_offset_of_certificateRequest_6() { return static_cast<int32_t>(offsetof(TlsServerSettings_t4144396432, ___certificateRequest_6)); }
inline bool get_certificateRequest_6() const { return ___certificateRequest_6; }
inline bool* get_address_of_certificateRequest_6() { return &___certificateRequest_6; }
inline void set_certificateRequest_6(bool value)
{
___certificateRequest_6 = value;
}
inline static int32_t get_offset_of_certificateTypes_7() { return static_cast<int32_t>(offsetof(TlsServerSettings_t4144396432, ___certificateTypes_7)); }
inline ClientCertificateTypeU5BU5D_t4253920197* get_certificateTypes_7() const { return ___certificateTypes_7; }
inline ClientCertificateTypeU5BU5D_t4253920197** get_address_of_certificateTypes_7() { return &___certificateTypes_7; }
inline void set_certificateTypes_7(ClientCertificateTypeU5BU5D_t4253920197* value)
{
___certificateTypes_7 = value;
Il2CppCodeGenWriteBarrier((&___certificateTypes_7), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // TLSSERVERSETTINGS_T4144396432_H
#ifndef KEYUSAGES_T820456313_H
#define KEYUSAGES_T820456313_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.X509.Extensions.KeyUsages
struct KeyUsages_t820456313
{
public:
// System.Int32 Mono.Security.X509.Extensions.KeyUsages::value__
int32_t ___value___1;
public:
inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(KeyUsages_t820456313, ___value___1)); }
inline int32_t get_value___1() const { return ___value___1; }
inline int32_t* get_address_of_value___1() { return &___value___1; }
inline void set_value___1(int32_t value)
{
___value___1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // KEYUSAGES_T820456313_H
#ifndef CERTTYPES_T3317701015_H
#define CERTTYPES_T3317701015_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.X509.Extensions.NetscapeCertTypeExtension/CertTypes
struct CertTypes_t3317701015
{
public:
// System.Int32 Mono.Security.X509.Extensions.NetscapeCertTypeExtension/CertTypes::value__
int32_t ___value___1;
public:
inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(CertTypes_t3317701015, ___value___1)); }
inline int32_t get_value___1() const { return ___value___1; }
inline int32_t* get_address_of_value___1() { return &___value___1; }
inline void set_value___1(int32_t value)
{
___value___1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // CERTTYPES_T3317701015_H
#ifndef X509CHAINSTATUSFLAGS_T1831553602_H
#define X509CHAINSTATUSFLAGS_T1831553602_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.X509.X509ChainStatusFlags
struct X509ChainStatusFlags_t1831553602
{
public:
// System.Int32 Mono.Security.X509.X509ChainStatusFlags::value__
int32_t ___value___1;
public:
inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(X509ChainStatusFlags_t1831553602, ___value___1)); }
inline int32_t get_value___1() const { return ___value___1; }
inline int32_t* get_address_of_value___1() { return &___value___1; }
inline void set_value___1(int32_t value)
{
___value___1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // X509CHAINSTATUSFLAGS_T1831553602_H
#ifndef ARGUMENTEXCEPTION_T132251570_H
#define ARGUMENTEXCEPTION_T132251570_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.ArgumentException
struct ArgumentException_t132251570 : public SystemException_t176217640
{
public:
// System.String System.ArgumentException::param_name
String_t* ___param_name_12;
public:
inline static int32_t get_offset_of_param_name_12() { return static_cast<int32_t>(offsetof(ArgumentException_t132251570, ___param_name_12)); }
inline String_t* get_param_name_12() const { return ___param_name_12; }
inline String_t** get_address_of_param_name_12() { return &___param_name_12; }
inline void set_param_name_12(String_t* value)
{
___param_name_12 = value;
Il2CppCodeGenWriteBarrier((&___param_name_12), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // ARGUMENTEXCEPTION_T132251570_H
#ifndef ARITHMETICEXCEPTION_T4283546778_H
#define ARITHMETICEXCEPTION_T4283546778_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.ArithmeticException
struct ArithmeticException_t4283546778 : public SystemException_t176217640
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // ARITHMETICEXCEPTION_T4283546778_H
#ifndef DATETIMEKIND_T3468814247_H
#define DATETIMEKIND_T3468814247_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.DateTimeKind
struct DateTimeKind_t3468814247
{
public:
// System.Int32 System.DateTimeKind::value__
int32_t ___value___1;
public:
inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(DateTimeKind_t3468814247, ___value___1)); }
inline int32_t get_value___1() const { return ___value___1; }
inline int32_t* get_address_of_value___1() { return &___value___1; }
inline void set_value___1(int32_t value)
{
___value___1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // DATETIMEKIND_T3468814247_H
#ifndef DELEGATE_T1188392813_H
#define DELEGATE_T1188392813_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Delegate
struct Delegate_t1188392813 : public RuntimeObject
{
public:
// System.IntPtr System.Delegate::method_ptr
Il2CppMethodPointer ___method_ptr_0;
// System.IntPtr System.Delegate::invoke_impl
intptr_t ___invoke_impl_1;
// System.Object System.Delegate::m_target
RuntimeObject * ___m_target_2;
// System.IntPtr System.Delegate::method
intptr_t ___method_3;
// System.IntPtr System.Delegate::delegate_trampoline
intptr_t ___delegate_trampoline_4;
// System.IntPtr System.Delegate::method_code
intptr_t ___method_code_5;
// System.Reflection.MethodInfo System.Delegate::method_info
MethodInfo_t * ___method_info_6;
// System.Reflection.MethodInfo System.Delegate::original_method_info
MethodInfo_t * ___original_method_info_7;
// System.DelegateData System.Delegate::data
DelegateData_t1677132599 * ___data_8;
public:
inline static int32_t get_offset_of_method_ptr_0() { return static_cast<int32_t>(offsetof(Delegate_t1188392813, ___method_ptr_0)); }
inline Il2CppMethodPointer get_method_ptr_0() const { return ___method_ptr_0; }
inline Il2CppMethodPointer* get_address_of_method_ptr_0() { return &___method_ptr_0; }
inline void set_method_ptr_0(Il2CppMethodPointer value)
{
___method_ptr_0 = value;
}
inline static int32_t get_offset_of_invoke_impl_1() { return static_cast<int32_t>(offsetof(Delegate_t1188392813, ___invoke_impl_1)); }
inline intptr_t get_invoke_impl_1() const { return ___invoke_impl_1; }
inline intptr_t* get_address_of_invoke_impl_1() { return &___invoke_impl_1; }
inline void set_invoke_impl_1(intptr_t value)
{
___invoke_impl_1 = value;
}
inline static int32_t get_offset_of_m_target_2() { return static_cast<int32_t>(offsetof(Delegate_t1188392813, ___m_target_2)); }
inline RuntimeObject * get_m_target_2() const { return ___m_target_2; }
inline RuntimeObject ** get_address_of_m_target_2() { return &___m_target_2; }
inline void set_m_target_2(RuntimeObject * value)
{
___m_target_2 = value;
Il2CppCodeGenWriteBarrier((&___m_target_2), value);
}
inline static int32_t get_offset_of_method_3() { return static_cast<int32_t>(offsetof(Delegate_t1188392813, ___method_3)); }
inline intptr_t get_method_3() const { return ___method_3; }
inline intptr_t* get_address_of_method_3() { return &___method_3; }
inline void set_method_3(intptr_t value)
{
___method_3 = value;
}
inline static int32_t get_offset_of_delegate_trampoline_4() { return static_cast<int32_t>(offsetof(Delegate_t1188392813, ___delegate_trampoline_4)); }
inline intptr_t get_delegate_trampoline_4() const { return ___delegate_trampoline_4; }
inline intptr_t* get_address_of_delegate_trampoline_4() { return &___delegate_trampoline_4; }
inline void set_delegate_trampoline_4(intptr_t value)
{
___delegate_trampoline_4 = value;
}
inline static int32_t get_offset_of_method_code_5() { return static_cast<int32_t>(offsetof(Delegate_t1188392813, ___method_code_5)); }
inline intptr_t get_method_code_5() const { return ___method_code_5; }
inline intptr_t* get_address_of_method_code_5() { return &___method_code_5; }
inline void set_method_code_5(intptr_t value)
{
___method_code_5 = value;
}
inline static int32_t get_offset_of_method_info_6() { return static_cast<int32_t>(offsetof(Delegate_t1188392813, ___method_info_6)); }
inline MethodInfo_t * get_method_info_6() const { return ___method_info_6; }
inline MethodInfo_t ** get_address_of_method_info_6() { return &___method_info_6; }
inline void set_method_info_6(MethodInfo_t * value)
{
___method_info_6 = value;
Il2CppCodeGenWriteBarrier((&___method_info_6), value);
}
inline static int32_t get_offset_of_original_method_info_7() { return static_cast<int32_t>(offsetof(Delegate_t1188392813, ___original_method_info_7)); }
inline MethodInfo_t * get_original_method_info_7() const { return ___original_method_info_7; }
inline MethodInfo_t ** get_address_of_original_method_info_7() { return &___original_method_info_7; }
inline void set_original_method_info_7(MethodInfo_t * value)
{
___original_method_info_7 = value;
Il2CppCodeGenWriteBarrier((&___original_method_info_7), value);
}
inline static int32_t get_offset_of_data_8() { return static_cast<int32_t>(offsetof(Delegate_t1188392813, ___data_8)); }
inline DelegateData_t1677132599 * get_data_8() const { return ___data_8; }
inline DelegateData_t1677132599 ** get_address_of_data_8() { return &___data_8; }
inline void set_data_8(DelegateData_t1677132599 * value)
{
___data_8 = value;
Il2CppCodeGenWriteBarrier((&___data_8), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // DELEGATE_T1188392813_H
#ifndef FORMATEXCEPTION_T154580423_H
#define FORMATEXCEPTION_T154580423_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.FormatException
struct FormatException_t154580423 : public SystemException_t176217640
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // FORMATEXCEPTION_T154580423_H
#ifndef COMPAREOPTIONS_T4130014775_H
#define COMPAREOPTIONS_T4130014775_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Globalization.CompareOptions
struct CompareOptions_t4130014775
{
public:
// System.Int32 System.Globalization.CompareOptions::value__
int32_t ___value___1;
public:
inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(CompareOptions_t4130014775, ___value___1)); }
inline int32_t get_value___1() const { return ___value___1; }
inline int32_t* get_address_of_value___1() { return &___value___1; }
inline void set_value___1(int32_t value)
{
___value___1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // COMPAREOPTIONS_T4130014775_H
#ifndef DATETIMESTYLES_T840957420_H
#define DATETIMESTYLES_T840957420_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Globalization.DateTimeStyles
struct DateTimeStyles_t840957420
{
public:
// System.Int32 System.Globalization.DateTimeStyles::value__
int32_t ___value___1;
public:
inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(DateTimeStyles_t840957420, ___value___1)); }
inline int32_t get_value___1() const { return ___value___1; }
inline int32_t* get_address_of_value___1() { return &___value___1; }
inline void set_value___1(int32_t value)
{
___value___1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // DATETIMESTYLES_T840957420_H
#ifndef IOEXCEPTION_T4088381929_H
#define IOEXCEPTION_T4088381929_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.IO.IOException
struct IOException_t4088381929 : public SystemException_t176217640
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // IOEXCEPTION_T4088381929_H
#ifndef INDEXOUTOFRANGEEXCEPTION_T1578797820_H
#define INDEXOUTOFRANGEEXCEPTION_T1578797820_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.IndexOutOfRangeException
struct IndexOutOfRangeException_t1578797820 : public SystemException_t176217640
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // INDEXOUTOFRANGEEXCEPTION_T1578797820_H
#ifndef INVALIDOPERATIONEXCEPTION_T56020091_H
#define INVALIDOPERATIONEXCEPTION_T56020091_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.InvalidOperationException
struct InvalidOperationException_t56020091 : public SystemException_t176217640
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // INVALIDOPERATIONEXCEPTION_T56020091_H
#ifndef AUTHENTICATIONLEVEL_T1236753641_H
#define AUTHENTICATIONLEVEL_T1236753641_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Net.Security.AuthenticationLevel
struct AuthenticationLevel_t1236753641
{
public:
// System.Int32 System.Net.Security.AuthenticationLevel::value__
int32_t ___value___1;
public:
inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(AuthenticationLevel_t1236753641, ___value___1)); }
inline int32_t get_value___1() const { return ___value___1; }
inline int32_t* get_address_of_value___1() { return &___value___1; }
inline void set_value___1(int32_t value)
{
___value___1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // AUTHENTICATIONLEVEL_T1236753641_H
#ifndef SSLPOLICYERRORS_T2205227823_H
#define SSLPOLICYERRORS_T2205227823_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Net.Security.SslPolicyErrors
struct SslPolicyErrors_t2205227823
{
public:
// System.Int32 System.Net.Security.SslPolicyErrors::value__
int32_t ___value___1;
public:
inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(SslPolicyErrors_t2205227823, ___value___1)); }
inline int32_t get_value___1() const { return ___value___1; }
inline int32_t* get_address_of_value___1() { return &___value___1; }
inline void set_value___1(int32_t value)
{
___value___1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // SSLPOLICYERRORS_T2205227823_H
#ifndef SECURITYPROTOCOLTYPE_T2721465497_H
#define SECURITYPROTOCOLTYPE_T2721465497_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Net.SecurityProtocolType
struct SecurityProtocolType_t2721465497
{
public:
// System.Int32 System.Net.SecurityProtocolType::value__
int32_t ___value___1;
public:
inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(SecurityProtocolType_t2721465497, ___value___1)); }
inline int32_t get_value___1() const { return ___value___1; }
inline int32_t* get_address_of_value___1() { return &___value___1; }
inline void set_value___1(int32_t value)
{
___value___1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // SECURITYPROTOCOLTYPE_T2721465497_H
#ifndef NOTIMPLEMENTEDEXCEPTION_T3489357830_H
#define NOTIMPLEMENTEDEXCEPTION_T3489357830_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.NotImplementedException
struct NotImplementedException_t3489357830 : public SystemException_t176217640
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // NOTIMPLEMENTEDEXCEPTION_T3489357830_H
#ifndef NOTSUPPORTEDEXCEPTION_T1314879016_H
#define NOTSUPPORTEDEXCEPTION_T1314879016_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.NotSupportedException
struct NotSupportedException_t1314879016 : public SystemException_t176217640
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // NOTSUPPORTEDEXCEPTION_T1314879016_H
#ifndef BINDINGFLAGS_T2721792723_H
#define BINDINGFLAGS_T2721792723_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Reflection.BindingFlags
struct BindingFlags_t2721792723
{
public:
// System.Int32 System.Reflection.BindingFlags::value__
int32_t ___value___1;
public:
inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(BindingFlags_t2721792723, ___value___1)); }
inline int32_t get_value___1() const { return ___value___1; }
inline int32_t* get_address_of_value___1() { return &___value___1; }
inline void set_value___1(int32_t value)
{
___value___1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // BINDINGFLAGS_T2721792723_H
#ifndef RUNTIMEFIELDHANDLE_T1871169219_H
#define RUNTIMEFIELDHANDLE_T1871169219_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.RuntimeFieldHandle
struct RuntimeFieldHandle_t1871169219
{
public:
// System.IntPtr System.RuntimeFieldHandle::value
intptr_t ___value_0;
public:
inline static int32_t get_offset_of_value_0() { return static_cast<int32_t>(offsetof(RuntimeFieldHandle_t1871169219, ___value_0)); }
inline intptr_t get_value_0() const { return ___value_0; }
inline intptr_t* get_address_of_value_0() { return &___value_0; }
inline void set_value_0(intptr_t value)
{
___value_0 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // RUNTIMEFIELDHANDLE_T1871169219_H
#ifndef RUNTIMETYPEHANDLE_T3027515415_H
#define RUNTIMETYPEHANDLE_T3027515415_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.RuntimeTypeHandle
struct RuntimeTypeHandle_t3027515415
{
public:
// System.IntPtr System.RuntimeTypeHandle::value
intptr_t ___value_0;
public:
inline static int32_t get_offset_of_value_0() { return static_cast<int32_t>(offsetof(RuntimeTypeHandle_t3027515415, ___value_0)); }
inline intptr_t get_value_0() const { return ___value_0; }
inline intptr_t* get_address_of_value_0() { return &___value_0; }
inline void set_value_0(intptr_t value)
{
___value_0 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // RUNTIMETYPEHANDLE_T3027515415_H
#ifndef CIPHERMODE_T84635067_H
#define CIPHERMODE_T84635067_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Security.Cryptography.CipherMode
struct CipherMode_t84635067
{
public:
// System.Int32 System.Security.Cryptography.CipherMode::value__
int32_t ___value___1;
public:
inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(CipherMode_t84635067, ___value___1)); }
inline int32_t get_value___1() const { return ___value___1; }
inline int32_t* get_address_of_value___1() { return &___value___1; }
inline void set_value___1(int32_t value)
{
___value___1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // CIPHERMODE_T84635067_H
#ifndef CRYPTOGRAPHICEXCEPTION_T248831461_H
#define CRYPTOGRAPHICEXCEPTION_T248831461_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Security.Cryptography.CryptographicException
struct CryptographicException_t248831461 : public SystemException_t176217640
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // CRYPTOGRAPHICEXCEPTION_T248831461_H
#ifndef CSPPROVIDERFLAGS_T4094439141_H
#define CSPPROVIDERFLAGS_T4094439141_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Security.Cryptography.CspProviderFlags
struct CspProviderFlags_t4094439141
{
public:
// System.Int32 System.Security.Cryptography.CspProviderFlags::value__
int32_t ___value___1;
public:
inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(CspProviderFlags_t4094439141, ___value___1)); }
inline int32_t get_value___1() const { return ___value___1; }
inline int32_t* get_address_of_value___1() { return &___value___1; }
inline void set_value___1(int32_t value)
{
___value___1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // CSPPROVIDERFLAGS_T4094439141_H
#ifndef PADDINGMODE_T2546806710_H
#define PADDINGMODE_T2546806710_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Security.Cryptography.PaddingMode
struct PaddingMode_t2546806710
{
public:
// System.Int32 System.Security.Cryptography.PaddingMode::value__
int32_t ___value___1;
public:
inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(PaddingMode_t2546806710, ___value___1)); }
inline int32_t get_value___1() const { return ___value___1; }
inline int32_t* get_address_of_value___1() { return &___value___1; }
inline void set_value___1(int32_t value)
{
___value___1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // PADDINGMODE_T2546806710_H
#ifndef RSACRYPTOSERVICEPROVIDER_T2683512874_H
#define RSACRYPTOSERVICEPROVIDER_T2683512874_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Security.Cryptography.RSACryptoServiceProvider
struct RSACryptoServiceProvider_t2683512874 : public RSA_t2385438082
{
public:
// Mono.Security.Cryptography.KeyPairPersistence System.Security.Cryptography.RSACryptoServiceProvider::store
KeyPairPersistence_t2094547461 * ___store_2;
// System.Boolean System.Security.Cryptography.RSACryptoServiceProvider::persistKey
bool ___persistKey_3;
// System.Boolean System.Security.Cryptography.RSACryptoServiceProvider::persisted
bool ___persisted_4;
// System.Boolean System.Security.Cryptography.RSACryptoServiceProvider::privateKeyExportable
bool ___privateKeyExportable_5;
// System.Boolean System.Security.Cryptography.RSACryptoServiceProvider::m_disposed
bool ___m_disposed_6;
// Mono.Security.Cryptography.RSAManaged System.Security.Cryptography.RSACryptoServiceProvider::rsa
RSAManaged_t1757093819 * ___rsa_7;
public:
inline static int32_t get_offset_of_store_2() { return static_cast<int32_t>(offsetof(RSACryptoServiceProvider_t2683512874, ___store_2)); }
inline KeyPairPersistence_t2094547461 * get_store_2() const { return ___store_2; }
inline KeyPairPersistence_t2094547461 ** get_address_of_store_2() { return &___store_2; }
inline void set_store_2(KeyPairPersistence_t2094547461 * value)
{
___store_2 = value;
Il2CppCodeGenWriteBarrier((&___store_2), value);
}
inline static int32_t get_offset_of_persistKey_3() { return static_cast<int32_t>(offsetof(RSACryptoServiceProvider_t2683512874, ___persistKey_3)); }
inline bool get_persistKey_3() const { return ___persistKey_3; }
inline bool* get_address_of_persistKey_3() { return &___persistKey_3; }
inline void set_persistKey_3(bool value)
{
___persistKey_3 = value;
}
inline static int32_t get_offset_of_persisted_4() { return static_cast<int32_t>(offsetof(RSACryptoServiceProvider_t2683512874, ___persisted_4)); }
inline bool get_persisted_4() const { return ___persisted_4; }
inline bool* get_address_of_persisted_4() { return &___persisted_4; }
inline void set_persisted_4(bool value)
{
___persisted_4 = value;
}
inline static int32_t get_offset_of_privateKeyExportable_5() { return static_cast<int32_t>(offsetof(RSACryptoServiceProvider_t2683512874, ___privateKeyExportable_5)); }
inline bool get_privateKeyExportable_5() const { return ___privateKeyExportable_5; }
inline bool* get_address_of_privateKeyExportable_5() { return &___privateKeyExportable_5; }
inline void set_privateKeyExportable_5(bool value)
{
___privateKeyExportable_5 = value;
}
inline static int32_t get_offset_of_m_disposed_6() { return static_cast<int32_t>(offsetof(RSACryptoServiceProvider_t2683512874, ___m_disposed_6)); }
inline bool get_m_disposed_6() const { return ___m_disposed_6; }
inline bool* get_address_of_m_disposed_6() { return &___m_disposed_6; }
inline void set_m_disposed_6(bool value)
{
___m_disposed_6 = value;
}
inline static int32_t get_offset_of_rsa_7() { return static_cast<int32_t>(offsetof(RSACryptoServiceProvider_t2683512874, ___rsa_7)); }
inline RSAManaged_t1757093819 * get_rsa_7() const { return ___rsa_7; }
inline RSAManaged_t1757093819 ** get_address_of_rsa_7() { return &___rsa_7; }
inline void set_rsa_7(RSAManaged_t1757093819 * value)
{
___rsa_7 = value;
Il2CppCodeGenWriteBarrier((&___rsa_7), value);
}
};
struct RSACryptoServiceProvider_t2683512874_StaticFields
{
public:
// System.Boolean System.Security.Cryptography.RSACryptoServiceProvider::useMachineKeyStore
bool ___useMachineKeyStore_8;
public:
inline static int32_t get_offset_of_useMachineKeyStore_8() { return static_cast<int32_t>(offsetof(RSACryptoServiceProvider_t2683512874_StaticFields, ___useMachineKeyStore_8)); }
inline bool get_useMachineKeyStore_8() const { return ___useMachineKeyStore_8; }
inline bool* get_address_of_useMachineKeyStore_8() { return &___useMachineKeyStore_8; }
inline void set_useMachineKeyStore_8(bool value)
{
___useMachineKeyStore_8 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // RSACRYPTOSERVICEPROVIDER_T2683512874_H
#ifndef STORELOCATION_T2864310644_H
#define STORELOCATION_T2864310644_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Security.Cryptography.X509Certificates.StoreLocation
struct StoreLocation_t2864310644
{
public:
// System.Int32 System.Security.Cryptography.X509Certificates.StoreLocation::value__
int32_t ___value___1;
public:
inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(StoreLocation_t2864310644, ___value___1)); }
inline int32_t get_value___1() const { return ___value___1; }
inline int32_t* get_address_of_value___1() { return &___value___1; }
inline void set_value___1(int32_t value)
{
___value___1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // STORELOCATION_T2864310644_H
#ifndef MATCH_T3408321083_H
#define MATCH_T3408321083_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Text.RegularExpressions.Match
struct Match_t3408321083 : public Group_t2468205786
{
public:
// System.Text.RegularExpressions.Regex System.Text.RegularExpressions.Match::regex
Regex_t3657309853 * ___regex_6;
// System.Text.RegularExpressions.IMachine System.Text.RegularExpressions.Match::machine
RuntimeObject* ___machine_7;
// System.Int32 System.Text.RegularExpressions.Match::text_length
int32_t ___text_length_8;
// System.Text.RegularExpressions.GroupCollection System.Text.RegularExpressions.Match::groups
GroupCollection_t69770484 * ___groups_9;
public:
inline static int32_t get_offset_of_regex_6() { return static_cast<int32_t>(offsetof(Match_t3408321083, ___regex_6)); }
inline Regex_t3657309853 * get_regex_6() const { return ___regex_6; }
inline Regex_t3657309853 ** get_address_of_regex_6() { return &___regex_6; }
inline void set_regex_6(Regex_t3657309853 * value)
{
___regex_6 = value;
Il2CppCodeGenWriteBarrier((&___regex_6), value);
}
inline static int32_t get_offset_of_machine_7() { return static_cast<int32_t>(offsetof(Match_t3408321083, ___machine_7)); }
inline RuntimeObject* get_machine_7() const { return ___machine_7; }
inline RuntimeObject** get_address_of_machine_7() { return &___machine_7; }
inline void set_machine_7(RuntimeObject* value)
{
___machine_7 = value;
Il2CppCodeGenWriteBarrier((&___machine_7), value);
}
inline static int32_t get_offset_of_text_length_8() { return static_cast<int32_t>(offsetof(Match_t3408321083, ___text_length_8)); }
inline int32_t get_text_length_8() const { return ___text_length_8; }
inline int32_t* get_address_of_text_length_8() { return &___text_length_8; }
inline void set_text_length_8(int32_t value)
{
___text_length_8 = value;
}
inline static int32_t get_offset_of_groups_9() { return static_cast<int32_t>(offsetof(Match_t3408321083, ___groups_9)); }
inline GroupCollection_t69770484 * get_groups_9() const { return ___groups_9; }
inline GroupCollection_t69770484 ** get_address_of_groups_9() { return &___groups_9; }
inline void set_groups_9(GroupCollection_t69770484 * value)
{
___groups_9 = value;
Il2CppCodeGenWriteBarrier((&___groups_9), value);
}
};
struct Match_t3408321083_StaticFields
{
public:
// System.Text.RegularExpressions.Match System.Text.RegularExpressions.Match::empty
Match_t3408321083 * ___empty_10;
public:
inline static int32_t get_offset_of_empty_10() { return static_cast<int32_t>(offsetof(Match_t3408321083_StaticFields, ___empty_10)); }
inline Match_t3408321083 * get_empty_10() const { return ___empty_10; }
inline Match_t3408321083 ** get_address_of_empty_10() { return &___empty_10; }
inline void set_empty_10(Match_t3408321083 * value)
{
___empty_10 = value;
Il2CppCodeGenWriteBarrier((&___empty_10), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // MATCH_T3408321083_H
#ifndef REGEXOPTIONS_T92845595_H
#define REGEXOPTIONS_T92845595_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Text.RegularExpressions.RegexOptions
struct RegexOptions_t92845595
{
public:
// System.Int32 System.Text.RegularExpressions.RegexOptions::value__
int32_t ___value___1;
public:
inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(RegexOptions_t92845595, ___value___1)); }
inline int32_t get_value___1() const { return ___value___1; }
inline int32_t* get_address_of_value___1() { return &___value___1; }
inline void set_value___1(int32_t value)
{
___value___1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // REGEXOPTIONS_T92845595_H
#ifndef WAITHANDLE_T1743403487_H
#define WAITHANDLE_T1743403487_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Threading.WaitHandle
struct WaitHandle_t1743403487 : public MarshalByRefObject_t2760389100
{
public:
// Microsoft.Win32.SafeHandles.SafeWaitHandle System.Threading.WaitHandle::safe_wait_handle
SafeWaitHandle_t1972936122 * ___safe_wait_handle_2;
// System.Boolean System.Threading.WaitHandle::disposed
bool ___disposed_4;
public:
inline static int32_t get_offset_of_safe_wait_handle_2() { return static_cast<int32_t>(offsetof(WaitHandle_t1743403487, ___safe_wait_handle_2)); }
inline SafeWaitHandle_t1972936122 * get_safe_wait_handle_2() const { return ___safe_wait_handle_2; }
inline SafeWaitHandle_t1972936122 ** get_address_of_safe_wait_handle_2() { return &___safe_wait_handle_2; }
inline void set_safe_wait_handle_2(SafeWaitHandle_t1972936122 * value)
{
___safe_wait_handle_2 = value;
Il2CppCodeGenWriteBarrier((&___safe_wait_handle_2), value);
}
inline static int32_t get_offset_of_disposed_4() { return static_cast<int32_t>(offsetof(WaitHandle_t1743403487, ___disposed_4)); }
inline bool get_disposed_4() const { return ___disposed_4; }
inline bool* get_address_of_disposed_4() { return &___disposed_4; }
inline void set_disposed_4(bool value)
{
___disposed_4 = value;
}
};
struct WaitHandle_t1743403487_StaticFields
{
public:
// System.IntPtr System.Threading.WaitHandle::InvalidHandle
intptr_t ___InvalidHandle_3;
public:
inline static int32_t get_offset_of_InvalidHandle_3() { return static_cast<int32_t>(offsetof(WaitHandle_t1743403487_StaticFields, ___InvalidHandle_3)); }
inline intptr_t get_InvalidHandle_3() const { return ___InvalidHandle_3; }
inline intptr_t* get_address_of_InvalidHandle_3() { return &___InvalidHandle_3; }
inline void set_InvalidHandle_3(intptr_t value)
{
___InvalidHandle_3 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // WAITHANDLE_T1743403487_H
#ifndef ALERT_T4059934885_H
#define ALERT_T4059934885_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Protocol.Tls.Alert
struct Alert_t4059934885 : public RuntimeObject
{
public:
// Mono.Security.Protocol.Tls.AlertLevel Mono.Security.Protocol.Tls.Alert::level
uint8_t ___level_0;
// Mono.Security.Protocol.Tls.AlertDescription Mono.Security.Protocol.Tls.Alert::description
uint8_t ___description_1;
public:
inline static int32_t get_offset_of_level_0() { return static_cast<int32_t>(offsetof(Alert_t4059934885, ___level_0)); }
inline uint8_t get_level_0() const { return ___level_0; }
inline uint8_t* get_address_of_level_0() { return &___level_0; }
inline void set_level_0(uint8_t value)
{
___level_0 = value;
}
inline static int32_t get_offset_of_description_1() { return static_cast<int32_t>(offsetof(Alert_t4059934885, ___description_1)); }
inline uint8_t get_description_1() const { return ___description_1; }
inline uint8_t* get_address_of_description_1() { return &___description_1; }
inline void set_description_1(uint8_t value)
{
___description_1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // ALERT_T4059934885_H
#ifndef CIPHERSUITE_T3414744575_H
#define CIPHERSUITE_T3414744575_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Protocol.Tls.CipherSuite
struct CipherSuite_t3414744575 : public RuntimeObject
{
public:
// System.Int16 Mono.Security.Protocol.Tls.CipherSuite::code
int16_t ___code_1;
// System.String Mono.Security.Protocol.Tls.CipherSuite::name
String_t* ___name_2;
// Mono.Security.Protocol.Tls.CipherAlgorithmType Mono.Security.Protocol.Tls.CipherSuite::cipherAlgorithmType
int32_t ___cipherAlgorithmType_3;
// Mono.Security.Protocol.Tls.HashAlgorithmType Mono.Security.Protocol.Tls.CipherSuite::hashAlgorithmType
int32_t ___hashAlgorithmType_4;
// Mono.Security.Protocol.Tls.ExchangeAlgorithmType Mono.Security.Protocol.Tls.CipherSuite::exchangeAlgorithmType
int32_t ___exchangeAlgorithmType_5;
// System.Boolean Mono.Security.Protocol.Tls.CipherSuite::isExportable
bool ___isExportable_6;
// System.Security.Cryptography.CipherMode Mono.Security.Protocol.Tls.CipherSuite::cipherMode
int32_t ___cipherMode_7;
// System.Byte Mono.Security.Protocol.Tls.CipherSuite::keyMaterialSize
uint8_t ___keyMaterialSize_8;
// System.Int32 Mono.Security.Protocol.Tls.CipherSuite::keyBlockSize
int32_t ___keyBlockSize_9;
// System.Byte Mono.Security.Protocol.Tls.CipherSuite::expandedKeyMaterialSize
uint8_t ___expandedKeyMaterialSize_10;
// System.Int16 Mono.Security.Protocol.Tls.CipherSuite::effectiveKeyBits
int16_t ___effectiveKeyBits_11;
// System.Byte Mono.Security.Protocol.Tls.CipherSuite::ivSize
uint8_t ___ivSize_12;
// System.Byte Mono.Security.Protocol.Tls.CipherSuite::blockSize
uint8_t ___blockSize_13;
// Mono.Security.Protocol.Tls.Context Mono.Security.Protocol.Tls.CipherSuite::context
Context_t3971234707 * ___context_14;
// System.Security.Cryptography.SymmetricAlgorithm Mono.Security.Protocol.Tls.CipherSuite::encryptionAlgorithm
SymmetricAlgorithm_t4254223087 * ___encryptionAlgorithm_15;
// System.Security.Cryptography.ICryptoTransform Mono.Security.Protocol.Tls.CipherSuite::encryptionCipher
RuntimeObject* ___encryptionCipher_16;
// System.Security.Cryptography.SymmetricAlgorithm Mono.Security.Protocol.Tls.CipherSuite::decryptionAlgorithm
SymmetricAlgorithm_t4254223087 * ___decryptionAlgorithm_17;
// System.Security.Cryptography.ICryptoTransform Mono.Security.Protocol.Tls.CipherSuite::decryptionCipher
RuntimeObject* ___decryptionCipher_18;
// System.Security.Cryptography.KeyedHashAlgorithm Mono.Security.Protocol.Tls.CipherSuite::clientHMAC
KeyedHashAlgorithm_t112861511 * ___clientHMAC_19;
// System.Security.Cryptography.KeyedHashAlgorithm Mono.Security.Protocol.Tls.CipherSuite::serverHMAC
KeyedHashAlgorithm_t112861511 * ___serverHMAC_20;
public:
inline static int32_t get_offset_of_code_1() { return static_cast<int32_t>(offsetof(CipherSuite_t3414744575, ___code_1)); }
inline int16_t get_code_1() const { return ___code_1; }
inline int16_t* get_address_of_code_1() { return &___code_1; }
inline void set_code_1(int16_t value)
{
___code_1 = value;
}
inline static int32_t get_offset_of_name_2() { return static_cast<int32_t>(offsetof(CipherSuite_t3414744575, ___name_2)); }
inline String_t* get_name_2() const { return ___name_2; }
inline String_t** get_address_of_name_2() { return &___name_2; }
inline void set_name_2(String_t* value)
{
___name_2 = value;
Il2CppCodeGenWriteBarrier((&___name_2), value);
}
inline static int32_t get_offset_of_cipherAlgorithmType_3() { return static_cast<int32_t>(offsetof(CipherSuite_t3414744575, ___cipherAlgorithmType_3)); }
inline int32_t get_cipherAlgorithmType_3() const { return ___cipherAlgorithmType_3; }
inline int32_t* get_address_of_cipherAlgorithmType_3() { return &___cipherAlgorithmType_3; }
inline void set_cipherAlgorithmType_3(int32_t value)
{
___cipherAlgorithmType_3 = value;
}
inline static int32_t get_offset_of_hashAlgorithmType_4() { return static_cast<int32_t>(offsetof(CipherSuite_t3414744575, ___hashAlgorithmType_4)); }
inline int32_t get_hashAlgorithmType_4() const { return ___hashAlgorithmType_4; }
inline int32_t* get_address_of_hashAlgorithmType_4() { return &___hashAlgorithmType_4; }
inline void set_hashAlgorithmType_4(int32_t value)
{
___hashAlgorithmType_4 = value;
}
inline static int32_t get_offset_of_exchangeAlgorithmType_5() { return static_cast<int32_t>(offsetof(CipherSuite_t3414744575, ___exchangeAlgorithmType_5)); }
inline int32_t get_exchangeAlgorithmType_5() const { return ___exchangeAlgorithmType_5; }
inline int32_t* get_address_of_exchangeAlgorithmType_5() { return &___exchangeAlgorithmType_5; }
inline void set_exchangeAlgorithmType_5(int32_t value)
{
___exchangeAlgorithmType_5 = value;
}
inline static int32_t get_offset_of_isExportable_6() { return static_cast<int32_t>(offsetof(CipherSuite_t3414744575, ___isExportable_6)); }
inline bool get_isExportable_6() const { return ___isExportable_6; }
inline bool* get_address_of_isExportable_6() { return &___isExportable_6; }
inline void set_isExportable_6(bool value)
{
___isExportable_6 = value;
}
inline static int32_t get_offset_of_cipherMode_7() { return static_cast<int32_t>(offsetof(CipherSuite_t3414744575, ___cipherMode_7)); }
inline int32_t get_cipherMode_7() const { return ___cipherMode_7; }
inline int32_t* get_address_of_cipherMode_7() { return &___cipherMode_7; }
inline void set_cipherMode_7(int32_t value)
{
___cipherMode_7 = value;
}
inline static int32_t get_offset_of_keyMaterialSize_8() { return static_cast<int32_t>(offsetof(CipherSuite_t3414744575, ___keyMaterialSize_8)); }
inline uint8_t get_keyMaterialSize_8() const { return ___keyMaterialSize_8; }
inline uint8_t* get_address_of_keyMaterialSize_8() { return &___keyMaterialSize_8; }
inline void set_keyMaterialSize_8(uint8_t value)
{
___keyMaterialSize_8 = value;
}
inline static int32_t get_offset_of_keyBlockSize_9() { return static_cast<int32_t>(offsetof(CipherSuite_t3414744575, ___keyBlockSize_9)); }
inline int32_t get_keyBlockSize_9() const { return ___keyBlockSize_9; }
inline int32_t* get_address_of_keyBlockSize_9() { return &___keyBlockSize_9; }
inline void set_keyBlockSize_9(int32_t value)
{
___keyBlockSize_9 = value;
}
inline static int32_t get_offset_of_expandedKeyMaterialSize_10() { return static_cast<int32_t>(offsetof(CipherSuite_t3414744575, ___expandedKeyMaterialSize_10)); }
inline uint8_t get_expandedKeyMaterialSize_10() const { return ___expandedKeyMaterialSize_10; }
inline uint8_t* get_address_of_expandedKeyMaterialSize_10() { return &___expandedKeyMaterialSize_10; }
inline void set_expandedKeyMaterialSize_10(uint8_t value)
{
___expandedKeyMaterialSize_10 = value;
}
inline static int32_t get_offset_of_effectiveKeyBits_11() { return static_cast<int32_t>(offsetof(CipherSuite_t3414744575, ___effectiveKeyBits_11)); }
inline int16_t get_effectiveKeyBits_11() const { return ___effectiveKeyBits_11; }
inline int16_t* get_address_of_effectiveKeyBits_11() { return &___effectiveKeyBits_11; }
inline void set_effectiveKeyBits_11(int16_t value)
{
___effectiveKeyBits_11 = value;
}
inline static int32_t get_offset_of_ivSize_12() { return static_cast<int32_t>(offsetof(CipherSuite_t3414744575, ___ivSize_12)); }
inline uint8_t get_ivSize_12() const { return ___ivSize_12; }
inline uint8_t* get_address_of_ivSize_12() { return &___ivSize_12; }
inline void set_ivSize_12(uint8_t value)
{
___ivSize_12 = value;
}
inline static int32_t get_offset_of_blockSize_13() { return static_cast<int32_t>(offsetof(CipherSuite_t3414744575, ___blockSize_13)); }
inline uint8_t get_blockSize_13() const { return ___blockSize_13; }
inline uint8_t* get_address_of_blockSize_13() { return &___blockSize_13; }
inline void set_blockSize_13(uint8_t value)
{
___blockSize_13 = value;
}
inline static int32_t get_offset_of_context_14() { return static_cast<int32_t>(offsetof(CipherSuite_t3414744575, ___context_14)); }
inline Context_t3971234707 * get_context_14() const { return ___context_14; }
inline Context_t3971234707 ** get_address_of_context_14() { return &___context_14; }
inline void set_context_14(Context_t3971234707 * value)
{
___context_14 = value;
Il2CppCodeGenWriteBarrier((&___context_14), value);
}
inline static int32_t get_offset_of_encryptionAlgorithm_15() { return static_cast<int32_t>(offsetof(CipherSuite_t3414744575, ___encryptionAlgorithm_15)); }
inline SymmetricAlgorithm_t4254223087 * get_encryptionAlgorithm_15() const { return ___encryptionAlgorithm_15; }
inline SymmetricAlgorithm_t4254223087 ** get_address_of_encryptionAlgorithm_15() { return &___encryptionAlgorithm_15; }
inline void set_encryptionAlgorithm_15(SymmetricAlgorithm_t4254223087 * value)
{
___encryptionAlgorithm_15 = value;
Il2CppCodeGenWriteBarrier((&___encryptionAlgorithm_15), value);
}
inline static int32_t get_offset_of_encryptionCipher_16() { return static_cast<int32_t>(offsetof(CipherSuite_t3414744575, ___encryptionCipher_16)); }
inline RuntimeObject* get_encryptionCipher_16() const { return ___encryptionCipher_16; }
inline RuntimeObject** get_address_of_encryptionCipher_16() { return &___encryptionCipher_16; }
inline void set_encryptionCipher_16(RuntimeObject* value)
{
___encryptionCipher_16 = value;
Il2CppCodeGenWriteBarrier((&___encryptionCipher_16), value);
}
inline static int32_t get_offset_of_decryptionAlgorithm_17() { return static_cast<int32_t>(offsetof(CipherSuite_t3414744575, ___decryptionAlgorithm_17)); }
inline SymmetricAlgorithm_t4254223087 * get_decryptionAlgorithm_17() const { return ___decryptionAlgorithm_17; }
inline SymmetricAlgorithm_t4254223087 ** get_address_of_decryptionAlgorithm_17() { return &___decryptionAlgorithm_17; }
inline void set_decryptionAlgorithm_17(SymmetricAlgorithm_t4254223087 * value)
{
___decryptionAlgorithm_17 = value;
Il2CppCodeGenWriteBarrier((&___decryptionAlgorithm_17), value);
}
inline static int32_t get_offset_of_decryptionCipher_18() { return static_cast<int32_t>(offsetof(CipherSuite_t3414744575, ___decryptionCipher_18)); }
inline RuntimeObject* get_decryptionCipher_18() const { return ___decryptionCipher_18; }
inline RuntimeObject** get_address_of_decryptionCipher_18() { return &___decryptionCipher_18; }
inline void set_decryptionCipher_18(RuntimeObject* value)
{
___decryptionCipher_18 = value;
Il2CppCodeGenWriteBarrier((&___decryptionCipher_18), value);
}
inline static int32_t get_offset_of_clientHMAC_19() { return static_cast<int32_t>(offsetof(CipherSuite_t3414744575, ___clientHMAC_19)); }
inline KeyedHashAlgorithm_t112861511 * get_clientHMAC_19() const { return ___clientHMAC_19; }
inline KeyedHashAlgorithm_t112861511 ** get_address_of_clientHMAC_19() { return &___clientHMAC_19; }
inline void set_clientHMAC_19(KeyedHashAlgorithm_t112861511 * value)
{
___clientHMAC_19 = value;
Il2CppCodeGenWriteBarrier((&___clientHMAC_19), value);
}
inline static int32_t get_offset_of_serverHMAC_20() { return static_cast<int32_t>(offsetof(CipherSuite_t3414744575, ___serverHMAC_20)); }
inline KeyedHashAlgorithm_t112861511 * get_serverHMAC_20() const { return ___serverHMAC_20; }
inline KeyedHashAlgorithm_t112861511 ** get_address_of_serverHMAC_20() { return &___serverHMAC_20; }
inline void set_serverHMAC_20(KeyedHashAlgorithm_t112861511 * value)
{
___serverHMAC_20 = value;
Il2CppCodeGenWriteBarrier((&___serverHMAC_20), value);
}
};
struct CipherSuite_t3414744575_StaticFields
{
public:
// System.Byte[] Mono.Security.Protocol.Tls.CipherSuite::EmptyArray
ByteU5BU5D_t4116647657* ___EmptyArray_0;
public:
inline static int32_t get_offset_of_EmptyArray_0() { return static_cast<int32_t>(offsetof(CipherSuite_t3414744575_StaticFields, ___EmptyArray_0)); }
inline ByteU5BU5D_t4116647657* get_EmptyArray_0() const { return ___EmptyArray_0; }
inline ByteU5BU5D_t4116647657** get_address_of_EmptyArray_0() { return &___EmptyArray_0; }
inline void set_EmptyArray_0(ByteU5BU5D_t4116647657* value)
{
___EmptyArray_0 = value;
Il2CppCodeGenWriteBarrier((&___EmptyArray_0), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // CIPHERSUITE_T3414744575_H
#ifndef CIPHERSUITECOLLECTION_T1129639304_H
#define CIPHERSUITECOLLECTION_T1129639304_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Protocol.Tls.CipherSuiteCollection
struct CipherSuiteCollection_t1129639304 : public RuntimeObject
{
public:
// System.Collections.ArrayList Mono.Security.Protocol.Tls.CipherSuiteCollection::cipherSuites
ArrayList_t2718874744 * ___cipherSuites_0;
// Mono.Security.Protocol.Tls.SecurityProtocolType Mono.Security.Protocol.Tls.CipherSuiteCollection::protocol
int32_t ___protocol_1;
public:
inline static int32_t get_offset_of_cipherSuites_0() { return static_cast<int32_t>(offsetof(CipherSuiteCollection_t1129639304, ___cipherSuites_0)); }
inline ArrayList_t2718874744 * get_cipherSuites_0() const { return ___cipherSuites_0; }
inline ArrayList_t2718874744 ** get_address_of_cipherSuites_0() { return &___cipherSuites_0; }
inline void set_cipherSuites_0(ArrayList_t2718874744 * value)
{
___cipherSuites_0 = value;
Il2CppCodeGenWriteBarrier((&___cipherSuites_0), value);
}
inline static int32_t get_offset_of_protocol_1() { return static_cast<int32_t>(offsetof(CipherSuiteCollection_t1129639304, ___protocol_1)); }
inline int32_t get_protocol_1() const { return ___protocol_1; }
inline int32_t* get_address_of_protocol_1() { return &___protocol_1; }
inline void set_protocol_1(int32_t value)
{
___protocol_1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // CIPHERSUITECOLLECTION_T1129639304_H
#ifndef CONTEXT_T3971234707_H
#define CONTEXT_T3971234707_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Protocol.Tls.Context
struct Context_t3971234707 : public RuntimeObject
{
public:
// Mono.Security.Protocol.Tls.SecurityProtocolType Mono.Security.Protocol.Tls.Context::securityProtocol
int32_t ___securityProtocol_0;
// System.Byte[] Mono.Security.Protocol.Tls.Context::sessionId
ByteU5BU5D_t4116647657* ___sessionId_1;
// Mono.Security.Protocol.Tls.SecurityCompressionType Mono.Security.Protocol.Tls.Context::compressionMethod
int32_t ___compressionMethod_2;
// Mono.Security.Protocol.Tls.TlsServerSettings Mono.Security.Protocol.Tls.Context::serverSettings
TlsServerSettings_t4144396432 * ___serverSettings_3;
// Mono.Security.Protocol.Tls.TlsClientSettings Mono.Security.Protocol.Tls.Context::clientSettings
TlsClientSettings_t2486039503 * ___clientSettings_4;
// Mono.Security.Protocol.Tls.SecurityParameters Mono.Security.Protocol.Tls.Context::current
SecurityParameters_t2199972650 * ___current_5;
// Mono.Security.Protocol.Tls.SecurityParameters Mono.Security.Protocol.Tls.Context::negotiating
SecurityParameters_t2199972650 * ___negotiating_6;
// Mono.Security.Protocol.Tls.SecurityParameters Mono.Security.Protocol.Tls.Context::read
SecurityParameters_t2199972650 * ___read_7;
// Mono.Security.Protocol.Tls.SecurityParameters Mono.Security.Protocol.Tls.Context::write
SecurityParameters_t2199972650 * ___write_8;
// Mono.Security.Protocol.Tls.CipherSuiteCollection Mono.Security.Protocol.Tls.Context::supportedCiphers
CipherSuiteCollection_t1129639304 * ___supportedCiphers_9;
// Mono.Security.Protocol.Tls.Handshake.HandshakeType Mono.Security.Protocol.Tls.Context::lastHandshakeMsg
uint8_t ___lastHandshakeMsg_10;
// Mono.Security.Protocol.Tls.HandshakeState Mono.Security.Protocol.Tls.Context::handshakeState
int32_t ___handshakeState_11;
// System.Boolean Mono.Security.Protocol.Tls.Context::abbreviatedHandshake
bool ___abbreviatedHandshake_12;
// System.Boolean Mono.Security.Protocol.Tls.Context::receivedConnectionEnd
bool ___receivedConnectionEnd_13;
// System.Boolean Mono.Security.Protocol.Tls.Context::sentConnectionEnd
bool ___sentConnectionEnd_14;
// System.Boolean Mono.Security.Protocol.Tls.Context::protocolNegotiated
bool ___protocolNegotiated_15;
// System.UInt64 Mono.Security.Protocol.Tls.Context::writeSequenceNumber
uint64_t ___writeSequenceNumber_16;
// System.UInt64 Mono.Security.Protocol.Tls.Context::readSequenceNumber
uint64_t ___readSequenceNumber_17;
// System.Byte[] Mono.Security.Protocol.Tls.Context::clientRandom
ByteU5BU5D_t4116647657* ___clientRandom_18;
// System.Byte[] Mono.Security.Protocol.Tls.Context::serverRandom
ByteU5BU5D_t4116647657* ___serverRandom_19;
// System.Byte[] Mono.Security.Protocol.Tls.Context::randomCS
ByteU5BU5D_t4116647657* ___randomCS_20;
// System.Byte[] Mono.Security.Protocol.Tls.Context::randomSC
ByteU5BU5D_t4116647657* ___randomSC_21;
// System.Byte[] Mono.Security.Protocol.Tls.Context::masterSecret
ByteU5BU5D_t4116647657* ___masterSecret_22;
// System.Byte[] Mono.Security.Protocol.Tls.Context::clientWriteKey
ByteU5BU5D_t4116647657* ___clientWriteKey_23;
// System.Byte[] Mono.Security.Protocol.Tls.Context::serverWriteKey
ByteU5BU5D_t4116647657* ___serverWriteKey_24;
// System.Byte[] Mono.Security.Protocol.Tls.Context::clientWriteIV
ByteU5BU5D_t4116647657* ___clientWriteIV_25;
// System.Byte[] Mono.Security.Protocol.Tls.Context::serverWriteIV
ByteU5BU5D_t4116647657* ___serverWriteIV_26;
// Mono.Security.Protocol.Tls.TlsStream Mono.Security.Protocol.Tls.Context::handshakeMessages
TlsStream_t2365453965 * ___handshakeMessages_27;
// System.Security.Cryptography.RandomNumberGenerator Mono.Security.Protocol.Tls.Context::random
RandomNumberGenerator_t386037858 * ___random_28;
// Mono.Security.Protocol.Tls.RecordProtocol Mono.Security.Protocol.Tls.Context::recordProtocol
RecordProtocol_t3759049701 * ___recordProtocol_29;
public:
inline static int32_t get_offset_of_securityProtocol_0() { return static_cast<int32_t>(offsetof(Context_t3971234707, ___securityProtocol_0)); }
inline int32_t get_securityProtocol_0() const { return ___securityProtocol_0; }
inline int32_t* get_address_of_securityProtocol_0() { return &___securityProtocol_0; }
inline void set_securityProtocol_0(int32_t value)
{
___securityProtocol_0 = value;
}
inline static int32_t get_offset_of_sessionId_1() { return static_cast<int32_t>(offsetof(Context_t3971234707, ___sessionId_1)); }
inline ByteU5BU5D_t4116647657* get_sessionId_1() const { return ___sessionId_1; }
inline ByteU5BU5D_t4116647657** get_address_of_sessionId_1() { return &___sessionId_1; }
inline void set_sessionId_1(ByteU5BU5D_t4116647657* value)
{
___sessionId_1 = value;
Il2CppCodeGenWriteBarrier((&___sessionId_1), value);
}
inline static int32_t get_offset_of_compressionMethod_2() { return static_cast<int32_t>(offsetof(Context_t3971234707, ___compressionMethod_2)); }
inline int32_t get_compressionMethod_2() const { return ___compressionMethod_2; }
inline int32_t* get_address_of_compressionMethod_2() { return &___compressionMethod_2; }
inline void set_compressionMethod_2(int32_t value)
{
___compressionMethod_2 = value;
}
inline static int32_t get_offset_of_serverSettings_3() { return static_cast<int32_t>(offsetof(Context_t3971234707, ___serverSettings_3)); }
inline TlsServerSettings_t4144396432 * get_serverSettings_3() const { return ___serverSettings_3; }
inline TlsServerSettings_t4144396432 ** get_address_of_serverSettings_3() { return &___serverSettings_3; }
inline void set_serverSettings_3(TlsServerSettings_t4144396432 * value)
{
___serverSettings_3 = value;
Il2CppCodeGenWriteBarrier((&___serverSettings_3), value);
}
inline static int32_t get_offset_of_clientSettings_4() { return static_cast<int32_t>(offsetof(Context_t3971234707, ___clientSettings_4)); }
inline TlsClientSettings_t2486039503 * get_clientSettings_4() const { return ___clientSettings_4; }
inline TlsClientSettings_t2486039503 ** get_address_of_clientSettings_4() { return &___clientSettings_4; }
inline void set_clientSettings_4(TlsClientSettings_t2486039503 * value)
{
___clientSettings_4 = value;
Il2CppCodeGenWriteBarrier((&___clientSettings_4), value);
}
inline static int32_t get_offset_of_current_5() { return static_cast<int32_t>(offsetof(Context_t3971234707, ___current_5)); }
inline SecurityParameters_t2199972650 * get_current_5() const { return ___current_5; }
inline SecurityParameters_t2199972650 ** get_address_of_current_5() { return &___current_5; }
inline void set_current_5(SecurityParameters_t2199972650 * value)
{
___current_5 = value;
Il2CppCodeGenWriteBarrier((&___current_5), value);
}
inline static int32_t get_offset_of_negotiating_6() { return static_cast<int32_t>(offsetof(Context_t3971234707, ___negotiating_6)); }
inline SecurityParameters_t2199972650 * get_negotiating_6() const { return ___negotiating_6; }
inline SecurityParameters_t2199972650 ** get_address_of_negotiating_6() { return &___negotiating_6; }
inline void set_negotiating_6(SecurityParameters_t2199972650 * value)
{
___negotiating_6 = value;
Il2CppCodeGenWriteBarrier((&___negotiating_6), value);
}
inline static int32_t get_offset_of_read_7() { return static_cast<int32_t>(offsetof(Context_t3971234707, ___read_7)); }
inline SecurityParameters_t2199972650 * get_read_7() const { return ___read_7; }
inline SecurityParameters_t2199972650 ** get_address_of_read_7() { return &___read_7; }
inline void set_read_7(SecurityParameters_t2199972650 * value)
{
___read_7 = value;
Il2CppCodeGenWriteBarrier((&___read_7), value);
}
inline static int32_t get_offset_of_write_8() { return static_cast<int32_t>(offsetof(Context_t3971234707, ___write_8)); }
inline SecurityParameters_t2199972650 * get_write_8() const { return ___write_8; }
inline SecurityParameters_t2199972650 ** get_address_of_write_8() { return &___write_8; }
inline void set_write_8(SecurityParameters_t2199972650 * value)
{
___write_8 = value;
Il2CppCodeGenWriteBarrier((&___write_8), value);
}
inline static int32_t get_offset_of_supportedCiphers_9() { return static_cast<int32_t>(offsetof(Context_t3971234707, ___supportedCiphers_9)); }
inline CipherSuiteCollection_t1129639304 * get_supportedCiphers_9() const { return ___supportedCiphers_9; }
inline CipherSuiteCollection_t1129639304 ** get_address_of_supportedCiphers_9() { return &___supportedCiphers_9; }
inline void set_supportedCiphers_9(CipherSuiteCollection_t1129639304 * value)
{
___supportedCiphers_9 = value;
Il2CppCodeGenWriteBarrier((&___supportedCiphers_9), value);
}
inline static int32_t get_offset_of_lastHandshakeMsg_10() { return static_cast<int32_t>(offsetof(Context_t3971234707, ___lastHandshakeMsg_10)); }
inline uint8_t get_lastHandshakeMsg_10() const { return ___lastHandshakeMsg_10; }
inline uint8_t* get_address_of_lastHandshakeMsg_10() { return &___lastHandshakeMsg_10; }
inline void set_lastHandshakeMsg_10(uint8_t value)
{
___lastHandshakeMsg_10 = value;
}
inline static int32_t get_offset_of_handshakeState_11() { return static_cast<int32_t>(offsetof(Context_t3971234707, ___handshakeState_11)); }
inline int32_t get_handshakeState_11() const { return ___handshakeState_11; }
inline int32_t* get_address_of_handshakeState_11() { return &___handshakeState_11; }
inline void set_handshakeState_11(int32_t value)
{
___handshakeState_11 = value;
}
inline static int32_t get_offset_of_abbreviatedHandshake_12() { return static_cast<int32_t>(offsetof(Context_t3971234707, ___abbreviatedHandshake_12)); }
inline bool get_abbreviatedHandshake_12() const { return ___abbreviatedHandshake_12; }
inline bool* get_address_of_abbreviatedHandshake_12() { return &___abbreviatedHandshake_12; }
inline void set_abbreviatedHandshake_12(bool value)
{
___abbreviatedHandshake_12 = value;
}
inline static int32_t get_offset_of_receivedConnectionEnd_13() { return static_cast<int32_t>(offsetof(Context_t3971234707, ___receivedConnectionEnd_13)); }
inline bool get_receivedConnectionEnd_13() const { return ___receivedConnectionEnd_13; }
inline bool* get_address_of_receivedConnectionEnd_13() { return &___receivedConnectionEnd_13; }
inline void set_receivedConnectionEnd_13(bool value)
{
___receivedConnectionEnd_13 = value;
}
inline static int32_t get_offset_of_sentConnectionEnd_14() { return static_cast<int32_t>(offsetof(Context_t3971234707, ___sentConnectionEnd_14)); }
inline bool get_sentConnectionEnd_14() const { return ___sentConnectionEnd_14; }
inline bool* get_address_of_sentConnectionEnd_14() { return &___sentConnectionEnd_14; }
inline void set_sentConnectionEnd_14(bool value)
{
___sentConnectionEnd_14 = value;
}
inline static int32_t get_offset_of_protocolNegotiated_15() { return static_cast<int32_t>(offsetof(Context_t3971234707, ___protocolNegotiated_15)); }
inline bool get_protocolNegotiated_15() const { return ___protocolNegotiated_15; }
inline bool* get_address_of_protocolNegotiated_15() { return &___protocolNegotiated_15; }
inline void set_protocolNegotiated_15(bool value)
{
___protocolNegotiated_15 = value;
}
inline static int32_t get_offset_of_writeSequenceNumber_16() { return static_cast<int32_t>(offsetof(Context_t3971234707, ___writeSequenceNumber_16)); }
inline uint64_t get_writeSequenceNumber_16() const { return ___writeSequenceNumber_16; }
inline uint64_t* get_address_of_writeSequenceNumber_16() { return &___writeSequenceNumber_16; }
inline void set_writeSequenceNumber_16(uint64_t value)
{
___writeSequenceNumber_16 = value;
}
inline static int32_t get_offset_of_readSequenceNumber_17() { return static_cast<int32_t>(offsetof(Context_t3971234707, ___readSequenceNumber_17)); }
inline uint64_t get_readSequenceNumber_17() const { return ___readSequenceNumber_17; }
inline uint64_t* get_address_of_readSequenceNumber_17() { return &___readSequenceNumber_17; }
inline void set_readSequenceNumber_17(uint64_t value)
{
___readSequenceNumber_17 = value;
}
inline static int32_t get_offset_of_clientRandom_18() { return static_cast<int32_t>(offsetof(Context_t3971234707, ___clientRandom_18)); }
inline ByteU5BU5D_t4116647657* get_clientRandom_18() const { return ___clientRandom_18; }
inline ByteU5BU5D_t4116647657** get_address_of_clientRandom_18() { return &___clientRandom_18; }
inline void set_clientRandom_18(ByteU5BU5D_t4116647657* value)
{
___clientRandom_18 = value;
Il2CppCodeGenWriteBarrier((&___clientRandom_18), value);
}
inline static int32_t get_offset_of_serverRandom_19() { return static_cast<int32_t>(offsetof(Context_t3971234707, ___serverRandom_19)); }
inline ByteU5BU5D_t4116647657* get_serverRandom_19() const { return ___serverRandom_19; }
inline ByteU5BU5D_t4116647657** get_address_of_serverRandom_19() { return &___serverRandom_19; }
inline void set_serverRandom_19(ByteU5BU5D_t4116647657* value)
{
___serverRandom_19 = value;
Il2CppCodeGenWriteBarrier((&___serverRandom_19), value);
}
inline static int32_t get_offset_of_randomCS_20() { return static_cast<int32_t>(offsetof(Context_t3971234707, ___randomCS_20)); }
inline ByteU5BU5D_t4116647657* get_randomCS_20() const { return ___randomCS_20; }
inline ByteU5BU5D_t4116647657** get_address_of_randomCS_20() { return &___randomCS_20; }
inline void set_randomCS_20(ByteU5BU5D_t4116647657* value)
{
___randomCS_20 = value;
Il2CppCodeGenWriteBarrier((&___randomCS_20), value);
}
inline static int32_t get_offset_of_randomSC_21() { return static_cast<int32_t>(offsetof(Context_t3971234707, ___randomSC_21)); }
inline ByteU5BU5D_t4116647657* get_randomSC_21() const { return ___randomSC_21; }
inline ByteU5BU5D_t4116647657** get_address_of_randomSC_21() { return &___randomSC_21; }
inline void set_randomSC_21(ByteU5BU5D_t4116647657* value)
{
___randomSC_21 = value;
Il2CppCodeGenWriteBarrier((&___randomSC_21), value);
}
inline static int32_t get_offset_of_masterSecret_22() { return static_cast<int32_t>(offsetof(Context_t3971234707, ___masterSecret_22)); }
inline ByteU5BU5D_t4116647657* get_masterSecret_22() const { return ___masterSecret_22; }
inline ByteU5BU5D_t4116647657** get_address_of_masterSecret_22() { return &___masterSecret_22; }
inline void set_masterSecret_22(ByteU5BU5D_t4116647657* value)
{
___masterSecret_22 = value;
Il2CppCodeGenWriteBarrier((&___masterSecret_22), value);
}
inline static int32_t get_offset_of_clientWriteKey_23() { return static_cast<int32_t>(offsetof(Context_t3971234707, ___clientWriteKey_23)); }
inline ByteU5BU5D_t4116647657* get_clientWriteKey_23() const { return ___clientWriteKey_23; }
inline ByteU5BU5D_t4116647657** get_address_of_clientWriteKey_23() { return &___clientWriteKey_23; }
inline void set_clientWriteKey_23(ByteU5BU5D_t4116647657* value)
{
___clientWriteKey_23 = value;
Il2CppCodeGenWriteBarrier((&___clientWriteKey_23), value);
}
inline static int32_t get_offset_of_serverWriteKey_24() { return static_cast<int32_t>(offsetof(Context_t3971234707, ___serverWriteKey_24)); }
inline ByteU5BU5D_t4116647657* get_serverWriteKey_24() const { return ___serverWriteKey_24; }
inline ByteU5BU5D_t4116647657** get_address_of_serverWriteKey_24() { return &___serverWriteKey_24; }
inline void set_serverWriteKey_24(ByteU5BU5D_t4116647657* value)
{
___serverWriteKey_24 = value;
Il2CppCodeGenWriteBarrier((&___serverWriteKey_24), value);
}
inline static int32_t get_offset_of_clientWriteIV_25() { return static_cast<int32_t>(offsetof(Context_t3971234707, ___clientWriteIV_25)); }
inline ByteU5BU5D_t4116647657* get_clientWriteIV_25() const { return ___clientWriteIV_25; }
inline ByteU5BU5D_t4116647657** get_address_of_clientWriteIV_25() { return &___clientWriteIV_25; }
inline void set_clientWriteIV_25(ByteU5BU5D_t4116647657* value)
{
___clientWriteIV_25 = value;
Il2CppCodeGenWriteBarrier((&___clientWriteIV_25), value);
}
inline static int32_t get_offset_of_serverWriteIV_26() { return static_cast<int32_t>(offsetof(Context_t3971234707, ___serverWriteIV_26)); }
inline ByteU5BU5D_t4116647657* get_serverWriteIV_26() const { return ___serverWriteIV_26; }
inline ByteU5BU5D_t4116647657** get_address_of_serverWriteIV_26() { return &___serverWriteIV_26; }
inline void set_serverWriteIV_26(ByteU5BU5D_t4116647657* value)
{
___serverWriteIV_26 = value;
Il2CppCodeGenWriteBarrier((&___serverWriteIV_26), value);
}
inline static int32_t get_offset_of_handshakeMessages_27() { return static_cast<int32_t>(offsetof(Context_t3971234707, ___handshakeMessages_27)); }
inline TlsStream_t2365453965 * get_handshakeMessages_27() const { return ___handshakeMessages_27; }
inline TlsStream_t2365453965 ** get_address_of_handshakeMessages_27() { return &___handshakeMessages_27; }
inline void set_handshakeMessages_27(TlsStream_t2365453965 * value)
{
___handshakeMessages_27 = value;
Il2CppCodeGenWriteBarrier((&___handshakeMessages_27), value);
}
inline static int32_t get_offset_of_random_28() { return static_cast<int32_t>(offsetof(Context_t3971234707, ___random_28)); }
inline RandomNumberGenerator_t386037858 * get_random_28() const { return ___random_28; }
inline RandomNumberGenerator_t386037858 ** get_address_of_random_28() { return &___random_28; }
inline void set_random_28(RandomNumberGenerator_t386037858 * value)
{
___random_28 = value;
Il2CppCodeGenWriteBarrier((&___random_28), value);
}
inline static int32_t get_offset_of_recordProtocol_29() { return static_cast<int32_t>(offsetof(Context_t3971234707, ___recordProtocol_29)); }
inline RecordProtocol_t3759049701 * get_recordProtocol_29() const { return ___recordProtocol_29; }
inline RecordProtocol_t3759049701 ** get_address_of_recordProtocol_29() { return &___recordProtocol_29; }
inline void set_recordProtocol_29(RecordProtocol_t3759049701 * value)
{
___recordProtocol_29 = value;
Il2CppCodeGenWriteBarrier((&___recordProtocol_29), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // CONTEXT_T3971234707_H
#ifndef HANDSHAKEMESSAGE_T3696583168_H
#define HANDSHAKEMESSAGE_T3696583168_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Protocol.Tls.Handshake.HandshakeMessage
struct HandshakeMessage_t3696583168 : public TlsStream_t2365453965
{
public:
// Mono.Security.Protocol.Tls.Context Mono.Security.Protocol.Tls.Handshake.HandshakeMessage::context
Context_t3971234707 * ___context_5;
// Mono.Security.Protocol.Tls.Handshake.HandshakeType Mono.Security.Protocol.Tls.Handshake.HandshakeMessage::handshakeType
uint8_t ___handshakeType_6;
// Mono.Security.Protocol.Tls.ContentType Mono.Security.Protocol.Tls.Handshake.HandshakeMessage::contentType
uint8_t ___contentType_7;
// System.Byte[] Mono.Security.Protocol.Tls.Handshake.HandshakeMessage::cache
ByteU5BU5D_t4116647657* ___cache_8;
public:
inline static int32_t get_offset_of_context_5() { return static_cast<int32_t>(offsetof(HandshakeMessage_t3696583168, ___context_5)); }
inline Context_t3971234707 * get_context_5() const { return ___context_5; }
inline Context_t3971234707 ** get_address_of_context_5() { return &___context_5; }
inline void set_context_5(Context_t3971234707 * value)
{
___context_5 = value;
Il2CppCodeGenWriteBarrier((&___context_5), value);
}
inline static int32_t get_offset_of_handshakeType_6() { return static_cast<int32_t>(offsetof(HandshakeMessage_t3696583168, ___handshakeType_6)); }
inline uint8_t get_handshakeType_6() const { return ___handshakeType_6; }
inline uint8_t* get_address_of_handshakeType_6() { return &___handshakeType_6; }
inline void set_handshakeType_6(uint8_t value)
{
___handshakeType_6 = value;
}
inline static int32_t get_offset_of_contentType_7() { return static_cast<int32_t>(offsetof(HandshakeMessage_t3696583168, ___contentType_7)); }
inline uint8_t get_contentType_7() const { return ___contentType_7; }
inline uint8_t* get_address_of_contentType_7() { return &___contentType_7; }
inline void set_contentType_7(uint8_t value)
{
___contentType_7 = value;
}
inline static int32_t get_offset_of_cache_8() { return static_cast<int32_t>(offsetof(HandshakeMessage_t3696583168, ___cache_8)); }
inline ByteU5BU5D_t4116647657* get_cache_8() const { return ___cache_8; }
inline ByteU5BU5D_t4116647657** get_address_of_cache_8() { return &___cache_8; }
inline void set_cache_8(ByteU5BU5D_t4116647657* value)
{
___cache_8 = value;
Il2CppCodeGenWriteBarrier((&___cache_8), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // HANDSHAKEMESSAGE_T3696583168_H
#ifndef SSLCLIENTSTREAM_T3914624661_H
#define SSLCLIENTSTREAM_T3914624661_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Protocol.Tls.SslClientStream
struct SslClientStream_t3914624661 : public SslStreamBase_t1667413407
{
public:
// Mono.Security.Protocol.Tls.CertificateValidationCallback Mono.Security.Protocol.Tls.SslClientStream::ServerCertValidation
CertificateValidationCallback_t4091668218 * ___ServerCertValidation_16;
// Mono.Security.Protocol.Tls.CertificateSelectionCallback Mono.Security.Protocol.Tls.SslClientStream::ClientCertSelection
CertificateSelectionCallback_t3743405224 * ___ClientCertSelection_17;
// Mono.Security.Protocol.Tls.PrivateKeySelectionCallback Mono.Security.Protocol.Tls.SslClientStream::PrivateKeySelection
PrivateKeySelectionCallback_t3240194217 * ___PrivateKeySelection_18;
// Mono.Security.Protocol.Tls.CertificateValidationCallback2 Mono.Security.Protocol.Tls.SslClientStream::ServerCertValidation2
CertificateValidationCallback2_t1842476440 * ___ServerCertValidation2_19;
public:
inline static int32_t get_offset_of_ServerCertValidation_16() { return static_cast<int32_t>(offsetof(SslClientStream_t3914624661, ___ServerCertValidation_16)); }
inline CertificateValidationCallback_t4091668218 * get_ServerCertValidation_16() const { return ___ServerCertValidation_16; }
inline CertificateValidationCallback_t4091668218 ** get_address_of_ServerCertValidation_16() { return &___ServerCertValidation_16; }
inline void set_ServerCertValidation_16(CertificateValidationCallback_t4091668218 * value)
{
___ServerCertValidation_16 = value;
Il2CppCodeGenWriteBarrier((&___ServerCertValidation_16), value);
}
inline static int32_t get_offset_of_ClientCertSelection_17() { return static_cast<int32_t>(offsetof(SslClientStream_t3914624661, ___ClientCertSelection_17)); }
inline CertificateSelectionCallback_t3743405224 * get_ClientCertSelection_17() const { return ___ClientCertSelection_17; }
inline CertificateSelectionCallback_t3743405224 ** get_address_of_ClientCertSelection_17() { return &___ClientCertSelection_17; }
inline void set_ClientCertSelection_17(CertificateSelectionCallback_t3743405224 * value)
{
___ClientCertSelection_17 = value;
Il2CppCodeGenWriteBarrier((&___ClientCertSelection_17), value);
}
inline static int32_t get_offset_of_PrivateKeySelection_18() { return static_cast<int32_t>(offsetof(SslClientStream_t3914624661, ___PrivateKeySelection_18)); }
inline PrivateKeySelectionCallback_t3240194217 * get_PrivateKeySelection_18() const { return ___PrivateKeySelection_18; }
inline PrivateKeySelectionCallback_t3240194217 ** get_address_of_PrivateKeySelection_18() { return &___PrivateKeySelection_18; }
inline void set_PrivateKeySelection_18(PrivateKeySelectionCallback_t3240194217 * value)
{
___PrivateKeySelection_18 = value;
Il2CppCodeGenWriteBarrier((&___PrivateKeySelection_18), value);
}
inline static int32_t get_offset_of_ServerCertValidation2_19() { return static_cast<int32_t>(offsetof(SslClientStream_t3914624661, ___ServerCertValidation2_19)); }
inline CertificateValidationCallback2_t1842476440 * get_ServerCertValidation2_19() const { return ___ServerCertValidation2_19; }
inline CertificateValidationCallback2_t1842476440 ** get_address_of_ServerCertValidation2_19() { return &___ServerCertValidation2_19; }
inline void set_ServerCertValidation2_19(CertificateValidationCallback2_t1842476440 * value)
{
___ServerCertValidation2_19 = value;
Il2CppCodeGenWriteBarrier((&___ServerCertValidation2_19), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // SSLCLIENTSTREAM_T3914624661_H
#ifndef X509CHAIN_T863783600_H
#define X509CHAIN_T863783600_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.X509.X509Chain
struct X509Chain_t863783600 : public RuntimeObject
{
public:
// Mono.Security.X509.X509CertificateCollection Mono.Security.X509.X509Chain::roots
X509CertificateCollection_t1542168550 * ___roots_0;
// Mono.Security.X509.X509CertificateCollection Mono.Security.X509.X509Chain::certs
X509CertificateCollection_t1542168550 * ___certs_1;
// Mono.Security.X509.X509Certificate Mono.Security.X509.X509Chain::_root
X509Certificate_t489243025 * ____root_2;
// Mono.Security.X509.X509CertificateCollection Mono.Security.X509.X509Chain::_chain
X509CertificateCollection_t1542168550 * ____chain_3;
// Mono.Security.X509.X509ChainStatusFlags Mono.Security.X509.X509Chain::_status
int32_t ____status_4;
public:
inline static int32_t get_offset_of_roots_0() { return static_cast<int32_t>(offsetof(X509Chain_t863783600, ___roots_0)); }
inline X509CertificateCollection_t1542168550 * get_roots_0() const { return ___roots_0; }
inline X509CertificateCollection_t1542168550 ** get_address_of_roots_0() { return &___roots_0; }
inline void set_roots_0(X509CertificateCollection_t1542168550 * value)
{
___roots_0 = value;
Il2CppCodeGenWriteBarrier((&___roots_0), value);
}
inline static int32_t get_offset_of_certs_1() { return static_cast<int32_t>(offsetof(X509Chain_t863783600, ___certs_1)); }
inline X509CertificateCollection_t1542168550 * get_certs_1() const { return ___certs_1; }
inline X509CertificateCollection_t1542168550 ** get_address_of_certs_1() { return &___certs_1; }
inline void set_certs_1(X509CertificateCollection_t1542168550 * value)
{
___certs_1 = value;
Il2CppCodeGenWriteBarrier((&___certs_1), value);
}
inline static int32_t get_offset_of__root_2() { return static_cast<int32_t>(offsetof(X509Chain_t863783600, ____root_2)); }
inline X509Certificate_t489243025 * get__root_2() const { return ____root_2; }
inline X509Certificate_t489243025 ** get_address_of__root_2() { return &____root_2; }
inline void set__root_2(X509Certificate_t489243025 * value)
{
____root_2 = value;
Il2CppCodeGenWriteBarrier((&____root_2), value);
}
inline static int32_t get_offset_of__chain_3() { return static_cast<int32_t>(offsetof(X509Chain_t863783600, ____chain_3)); }
inline X509CertificateCollection_t1542168550 * get__chain_3() const { return ____chain_3; }
inline X509CertificateCollection_t1542168550 ** get_address_of__chain_3() { return &____chain_3; }
inline void set__chain_3(X509CertificateCollection_t1542168550 * value)
{
____chain_3 = value;
Il2CppCodeGenWriteBarrier((&____chain_3), value);
}
inline static int32_t get_offset_of__status_4() { return static_cast<int32_t>(offsetof(X509Chain_t863783600, ____status_4)); }
inline int32_t get__status_4() const { return ____status_4; }
inline int32_t* get_address_of__status_4() { return &____status_4; }
inline void set__status_4(int32_t value)
{
____status_4 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // X509CHAIN_T863783600_H
#ifndef ARGUMENTNULLEXCEPTION_T1615371798_H
#define ARGUMENTNULLEXCEPTION_T1615371798_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.ArgumentNullException
struct ArgumentNullException_t1615371798 : public ArgumentException_t132251570
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // ARGUMENTNULLEXCEPTION_T1615371798_H
#ifndef ARGUMENTOUTOFRANGEEXCEPTION_T777629997_H
#define ARGUMENTOUTOFRANGEEXCEPTION_T777629997_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.ArgumentOutOfRangeException
struct ArgumentOutOfRangeException_t777629997 : public ArgumentException_t132251570
{
public:
// System.Object System.ArgumentOutOfRangeException::actual_value
RuntimeObject * ___actual_value_13;
public:
inline static int32_t get_offset_of_actual_value_13() { return static_cast<int32_t>(offsetof(ArgumentOutOfRangeException_t777629997, ___actual_value_13)); }
inline RuntimeObject * get_actual_value_13() const { return ___actual_value_13; }
inline RuntimeObject ** get_address_of_actual_value_13() { return &___actual_value_13; }
inline void set_actual_value_13(RuntimeObject * value)
{
___actual_value_13 = value;
Il2CppCodeGenWriteBarrier((&___actual_value_13), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // ARGUMENTOUTOFRANGEEXCEPTION_T777629997_H
#ifndef DATETIME_T3738529785_H
#define DATETIME_T3738529785_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.DateTime
struct DateTime_t3738529785
{
public:
// System.TimeSpan System.DateTime::ticks
TimeSpan_t881159249 ___ticks_0;
// System.DateTimeKind System.DateTime::kind
int32_t ___kind_1;
public:
inline static int32_t get_offset_of_ticks_0() { return static_cast<int32_t>(offsetof(DateTime_t3738529785, ___ticks_0)); }
inline TimeSpan_t881159249 get_ticks_0() const { return ___ticks_0; }
inline TimeSpan_t881159249 * get_address_of_ticks_0() { return &___ticks_0; }
inline void set_ticks_0(TimeSpan_t881159249 value)
{
___ticks_0 = value;
}
inline static int32_t get_offset_of_kind_1() { return static_cast<int32_t>(offsetof(DateTime_t3738529785, ___kind_1)); }
inline int32_t get_kind_1() const { return ___kind_1; }
inline int32_t* get_address_of_kind_1() { return &___kind_1; }
inline void set_kind_1(int32_t value)
{
___kind_1 = value;
}
};
struct DateTime_t3738529785_StaticFields
{
public:
// System.DateTime System.DateTime::MaxValue
DateTime_t3738529785 ___MaxValue_2;
// System.DateTime System.DateTime::MinValue
DateTime_t3738529785 ___MinValue_3;
// System.String[] System.DateTime::ParseTimeFormats
StringU5BU5D_t1281789340* ___ParseTimeFormats_4;
// System.String[] System.DateTime::ParseYearDayMonthFormats
StringU5BU5D_t1281789340* ___ParseYearDayMonthFormats_5;
// System.String[] System.DateTime::ParseYearMonthDayFormats
StringU5BU5D_t1281789340* ___ParseYearMonthDayFormats_6;
// System.String[] System.DateTime::ParseDayMonthYearFormats
StringU5BU5D_t1281789340* ___ParseDayMonthYearFormats_7;
// System.String[] System.DateTime::ParseMonthDayYearFormats
StringU5BU5D_t1281789340* ___ParseMonthDayYearFormats_8;
// System.String[] System.DateTime::MonthDayShortFormats
StringU5BU5D_t1281789340* ___MonthDayShortFormats_9;
// System.String[] System.DateTime::DayMonthShortFormats
StringU5BU5D_t1281789340* ___DayMonthShortFormats_10;
// System.Int32[] System.DateTime::daysmonth
Int32U5BU5D_t385246372* ___daysmonth_11;
// System.Int32[] System.DateTime::daysmonthleap
Int32U5BU5D_t385246372* ___daysmonthleap_12;
// System.Object System.DateTime::to_local_time_span_object
RuntimeObject * ___to_local_time_span_object_13;
// System.Int64 System.DateTime::last_now
int64_t ___last_now_14;
public:
inline static int32_t get_offset_of_MaxValue_2() { return static_cast<int32_t>(offsetof(DateTime_t3738529785_StaticFields, ___MaxValue_2)); }
inline DateTime_t3738529785 get_MaxValue_2() const { return ___MaxValue_2; }
inline DateTime_t3738529785 * get_address_of_MaxValue_2() { return &___MaxValue_2; }
inline void set_MaxValue_2(DateTime_t3738529785 value)
{
___MaxValue_2 = value;
}
inline static int32_t get_offset_of_MinValue_3() { return static_cast<int32_t>(offsetof(DateTime_t3738529785_StaticFields, ___MinValue_3)); }
inline DateTime_t3738529785 get_MinValue_3() const { return ___MinValue_3; }
inline DateTime_t3738529785 * get_address_of_MinValue_3() { return &___MinValue_3; }
inline void set_MinValue_3(DateTime_t3738529785 value)
{
___MinValue_3 = value;
}
inline static int32_t get_offset_of_ParseTimeFormats_4() { return static_cast<int32_t>(offsetof(DateTime_t3738529785_StaticFields, ___ParseTimeFormats_4)); }
inline StringU5BU5D_t1281789340* get_ParseTimeFormats_4() const { return ___ParseTimeFormats_4; }
inline StringU5BU5D_t1281789340** get_address_of_ParseTimeFormats_4() { return &___ParseTimeFormats_4; }
inline void set_ParseTimeFormats_4(StringU5BU5D_t1281789340* value)
{
___ParseTimeFormats_4 = value;
Il2CppCodeGenWriteBarrier((&___ParseTimeFormats_4), value);
}
inline static int32_t get_offset_of_ParseYearDayMonthFormats_5() { return static_cast<int32_t>(offsetof(DateTime_t3738529785_StaticFields, ___ParseYearDayMonthFormats_5)); }
inline StringU5BU5D_t1281789340* get_ParseYearDayMonthFormats_5() const { return ___ParseYearDayMonthFormats_5; }
inline StringU5BU5D_t1281789340** get_address_of_ParseYearDayMonthFormats_5() { return &___ParseYearDayMonthFormats_5; }
inline void set_ParseYearDayMonthFormats_5(StringU5BU5D_t1281789340* value)
{
___ParseYearDayMonthFormats_5 = value;
Il2CppCodeGenWriteBarrier((&___ParseYearDayMonthFormats_5), value);
}
inline static int32_t get_offset_of_ParseYearMonthDayFormats_6() { return static_cast<int32_t>(offsetof(DateTime_t3738529785_StaticFields, ___ParseYearMonthDayFormats_6)); }
inline StringU5BU5D_t1281789340* get_ParseYearMonthDayFormats_6() const { return ___ParseYearMonthDayFormats_6; }
inline StringU5BU5D_t1281789340** get_address_of_ParseYearMonthDayFormats_6() { return &___ParseYearMonthDayFormats_6; }
inline void set_ParseYearMonthDayFormats_6(StringU5BU5D_t1281789340* value)
{
___ParseYearMonthDayFormats_6 = value;
Il2CppCodeGenWriteBarrier((&___ParseYearMonthDayFormats_6), value);
}
inline static int32_t get_offset_of_ParseDayMonthYearFormats_7() { return static_cast<int32_t>(offsetof(DateTime_t3738529785_StaticFields, ___ParseDayMonthYearFormats_7)); }
inline StringU5BU5D_t1281789340* get_ParseDayMonthYearFormats_7() const { return ___ParseDayMonthYearFormats_7; }
inline StringU5BU5D_t1281789340** get_address_of_ParseDayMonthYearFormats_7() { return &___ParseDayMonthYearFormats_7; }
inline void set_ParseDayMonthYearFormats_7(StringU5BU5D_t1281789340* value)
{
___ParseDayMonthYearFormats_7 = value;
Il2CppCodeGenWriteBarrier((&___ParseDayMonthYearFormats_7), value);
}
inline static int32_t get_offset_of_ParseMonthDayYearFormats_8() { return static_cast<int32_t>(offsetof(DateTime_t3738529785_StaticFields, ___ParseMonthDayYearFormats_8)); }
inline StringU5BU5D_t1281789340* get_ParseMonthDayYearFormats_8() const { return ___ParseMonthDayYearFormats_8; }
inline StringU5BU5D_t1281789340** get_address_of_ParseMonthDayYearFormats_8() { return &___ParseMonthDayYearFormats_8; }
inline void set_ParseMonthDayYearFormats_8(StringU5BU5D_t1281789340* value)
{
___ParseMonthDayYearFormats_8 = value;
Il2CppCodeGenWriteBarrier((&___ParseMonthDayYearFormats_8), value);
}
inline static int32_t get_offset_of_MonthDayShortFormats_9() { return static_cast<int32_t>(offsetof(DateTime_t3738529785_StaticFields, ___MonthDayShortFormats_9)); }
inline StringU5BU5D_t1281789340* get_MonthDayShortFormats_9() const { return ___MonthDayShortFormats_9; }
inline StringU5BU5D_t1281789340** get_address_of_MonthDayShortFormats_9() { return &___MonthDayShortFormats_9; }
inline void set_MonthDayShortFormats_9(StringU5BU5D_t1281789340* value)
{
___MonthDayShortFormats_9 = value;
Il2CppCodeGenWriteBarrier((&___MonthDayShortFormats_9), value);
}
inline static int32_t get_offset_of_DayMonthShortFormats_10() { return static_cast<int32_t>(offsetof(DateTime_t3738529785_StaticFields, ___DayMonthShortFormats_10)); }
inline StringU5BU5D_t1281789340* get_DayMonthShortFormats_10() const { return ___DayMonthShortFormats_10; }
inline StringU5BU5D_t1281789340** get_address_of_DayMonthShortFormats_10() { return &___DayMonthShortFormats_10; }
inline void set_DayMonthShortFormats_10(StringU5BU5D_t1281789340* value)
{
___DayMonthShortFormats_10 = value;
Il2CppCodeGenWriteBarrier((&___DayMonthShortFormats_10), value);
}
inline static int32_t get_offset_of_daysmonth_11() { return static_cast<int32_t>(offsetof(DateTime_t3738529785_StaticFields, ___daysmonth_11)); }
inline Int32U5BU5D_t385246372* get_daysmonth_11() const { return ___daysmonth_11; }
inline Int32U5BU5D_t385246372** get_address_of_daysmonth_11() { return &___daysmonth_11; }
inline void set_daysmonth_11(Int32U5BU5D_t385246372* value)
{
___daysmonth_11 = value;
Il2CppCodeGenWriteBarrier((&___daysmonth_11), value);
}
inline static int32_t get_offset_of_daysmonthleap_12() { return static_cast<int32_t>(offsetof(DateTime_t3738529785_StaticFields, ___daysmonthleap_12)); }
inline Int32U5BU5D_t385246372* get_daysmonthleap_12() const { return ___daysmonthleap_12; }
inline Int32U5BU5D_t385246372** get_address_of_daysmonthleap_12() { return &___daysmonthleap_12; }
inline void set_daysmonthleap_12(Int32U5BU5D_t385246372* value)
{
___daysmonthleap_12 = value;
Il2CppCodeGenWriteBarrier((&___daysmonthleap_12), value);
}
inline static int32_t get_offset_of_to_local_time_span_object_13() { return static_cast<int32_t>(offsetof(DateTime_t3738529785_StaticFields, ___to_local_time_span_object_13)); }
inline RuntimeObject * get_to_local_time_span_object_13() const { return ___to_local_time_span_object_13; }
inline RuntimeObject ** get_address_of_to_local_time_span_object_13() { return &___to_local_time_span_object_13; }
inline void set_to_local_time_span_object_13(RuntimeObject * value)
{
___to_local_time_span_object_13 = value;
Il2CppCodeGenWriteBarrier((&___to_local_time_span_object_13), value);
}
inline static int32_t get_offset_of_last_now_14() { return static_cast<int32_t>(offsetof(DateTime_t3738529785_StaticFields, ___last_now_14)); }
inline int64_t get_last_now_14() const { return ___last_now_14; }
inline int64_t* get_address_of_last_now_14() { return &___last_now_14; }
inline void set_last_now_14(int64_t value)
{
___last_now_14 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // DATETIME_T3738529785_H
#ifndef MULTICASTDELEGATE_T_H
#define MULTICASTDELEGATE_T_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.MulticastDelegate
struct MulticastDelegate_t : public Delegate_t1188392813
{
public:
// System.MulticastDelegate System.MulticastDelegate::prev
MulticastDelegate_t * ___prev_9;
// System.MulticastDelegate System.MulticastDelegate::kpm_next
MulticastDelegate_t * ___kpm_next_10;
public:
inline static int32_t get_offset_of_prev_9() { return static_cast<int32_t>(offsetof(MulticastDelegate_t, ___prev_9)); }
inline MulticastDelegate_t * get_prev_9() const { return ___prev_9; }
inline MulticastDelegate_t ** get_address_of_prev_9() { return &___prev_9; }
inline void set_prev_9(MulticastDelegate_t * value)
{
___prev_9 = value;
Il2CppCodeGenWriteBarrier((&___prev_9), value);
}
inline static int32_t get_offset_of_kpm_next_10() { return static_cast<int32_t>(offsetof(MulticastDelegate_t, ___kpm_next_10)); }
inline MulticastDelegate_t * get_kpm_next_10() const { return ___kpm_next_10; }
inline MulticastDelegate_t ** get_address_of_kpm_next_10() { return &___kpm_next_10; }
inline void set_kpm_next_10(MulticastDelegate_t * value)
{
___kpm_next_10 = value;
Il2CppCodeGenWriteBarrier((&___kpm_next_10), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // MULTICASTDELEGATE_T_H
#ifndef WEBREQUEST_T1939381076_H
#define WEBREQUEST_T1939381076_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Net.WebRequest
struct WebRequest_t1939381076 : public MarshalByRefObject_t2760389100
{
public:
// System.Net.Security.AuthenticationLevel System.Net.WebRequest::authentication_level
int32_t ___authentication_level_4;
public:
inline static int32_t get_offset_of_authentication_level_4() { return static_cast<int32_t>(offsetof(WebRequest_t1939381076, ___authentication_level_4)); }
inline int32_t get_authentication_level_4() const { return ___authentication_level_4; }
inline int32_t* get_address_of_authentication_level_4() { return &___authentication_level_4; }
inline void set_authentication_level_4(int32_t value)
{
___authentication_level_4 = value;
}
};
struct WebRequest_t1939381076_StaticFields
{
public:
// System.Collections.Specialized.HybridDictionary System.Net.WebRequest::prefixes
HybridDictionary_t4070033136 * ___prefixes_1;
// System.Boolean System.Net.WebRequest::isDefaultWebProxySet
bool ___isDefaultWebProxySet_2;
// System.Net.IWebProxy System.Net.WebRequest::defaultWebProxy
RuntimeObject* ___defaultWebProxy_3;
// System.Object System.Net.WebRequest::lockobj
RuntimeObject * ___lockobj_5;
public:
inline static int32_t get_offset_of_prefixes_1() { return static_cast<int32_t>(offsetof(WebRequest_t1939381076_StaticFields, ___prefixes_1)); }
inline HybridDictionary_t4070033136 * get_prefixes_1() const { return ___prefixes_1; }
inline HybridDictionary_t4070033136 ** get_address_of_prefixes_1() { return &___prefixes_1; }
inline void set_prefixes_1(HybridDictionary_t4070033136 * value)
{
___prefixes_1 = value;
Il2CppCodeGenWriteBarrier((&___prefixes_1), value);
}
inline static int32_t get_offset_of_isDefaultWebProxySet_2() { return static_cast<int32_t>(offsetof(WebRequest_t1939381076_StaticFields, ___isDefaultWebProxySet_2)); }
inline bool get_isDefaultWebProxySet_2() const { return ___isDefaultWebProxySet_2; }
inline bool* get_address_of_isDefaultWebProxySet_2() { return &___isDefaultWebProxySet_2; }
inline void set_isDefaultWebProxySet_2(bool value)
{
___isDefaultWebProxySet_2 = value;
}
inline static int32_t get_offset_of_defaultWebProxy_3() { return static_cast<int32_t>(offsetof(WebRequest_t1939381076_StaticFields, ___defaultWebProxy_3)); }
inline RuntimeObject* get_defaultWebProxy_3() const { return ___defaultWebProxy_3; }
inline RuntimeObject** get_address_of_defaultWebProxy_3() { return &___defaultWebProxy_3; }
inline void set_defaultWebProxy_3(RuntimeObject* value)
{
___defaultWebProxy_3 = value;
Il2CppCodeGenWriteBarrier((&___defaultWebProxy_3), value);
}
inline static int32_t get_offset_of_lockobj_5() { return static_cast<int32_t>(offsetof(WebRequest_t1939381076_StaticFields, ___lockobj_5)); }
inline RuntimeObject * get_lockobj_5() const { return ___lockobj_5; }
inline RuntimeObject ** get_address_of_lockobj_5() { return &___lockobj_5; }
inline void set_lockobj_5(RuntimeObject * value)
{
___lockobj_5 = value;
Il2CppCodeGenWriteBarrier((&___lockobj_5), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // WEBREQUEST_T1939381076_H
#ifndef OBJECTDISPOSEDEXCEPTION_T21392786_H
#define OBJECTDISPOSEDEXCEPTION_T21392786_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.ObjectDisposedException
struct ObjectDisposedException_t21392786 : public InvalidOperationException_t56020091
{
public:
// System.String System.ObjectDisposedException::obj_name
String_t* ___obj_name_12;
// System.String System.ObjectDisposedException::msg
String_t* ___msg_13;
public:
inline static int32_t get_offset_of_obj_name_12() { return static_cast<int32_t>(offsetof(ObjectDisposedException_t21392786, ___obj_name_12)); }
inline String_t* get_obj_name_12() const { return ___obj_name_12; }
inline String_t** get_address_of_obj_name_12() { return &___obj_name_12; }
inline void set_obj_name_12(String_t* value)
{
___obj_name_12 = value;
Il2CppCodeGenWriteBarrier((&___obj_name_12), value);
}
inline static int32_t get_offset_of_msg_13() { return static_cast<int32_t>(offsetof(ObjectDisposedException_t21392786, ___msg_13)); }
inline String_t* get_msg_13() const { return ___msg_13; }
inline String_t** get_address_of_msg_13() { return &___msg_13; }
inline void set_msg_13(String_t* value)
{
___msg_13 = value;
Il2CppCodeGenWriteBarrier((&___msg_13), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // OBJECTDISPOSEDEXCEPTION_T21392786_H
#ifndef CRYPTOGRAPHICUNEXPECTEDOPERATIONEXCEPTION_T2790575154_H
#define CRYPTOGRAPHICUNEXPECTEDOPERATIONEXCEPTION_T2790575154_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Security.Cryptography.CryptographicUnexpectedOperationException
struct CryptographicUnexpectedOperationException_t2790575154 : public CryptographicException_t248831461
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // CRYPTOGRAPHICUNEXPECTEDOPERATIONEXCEPTION_T2790575154_H
#ifndef CSPPARAMETERS_T239852639_H
#define CSPPARAMETERS_T239852639_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Security.Cryptography.CspParameters
struct CspParameters_t239852639 : public RuntimeObject
{
public:
// System.Security.Cryptography.CspProviderFlags System.Security.Cryptography.CspParameters::_Flags
int32_t ____Flags_0;
// System.String System.Security.Cryptography.CspParameters::KeyContainerName
String_t* ___KeyContainerName_1;
// System.Int32 System.Security.Cryptography.CspParameters::KeyNumber
int32_t ___KeyNumber_2;
// System.String System.Security.Cryptography.CspParameters::ProviderName
String_t* ___ProviderName_3;
// System.Int32 System.Security.Cryptography.CspParameters::ProviderType
int32_t ___ProviderType_4;
public:
inline static int32_t get_offset_of__Flags_0() { return static_cast<int32_t>(offsetof(CspParameters_t239852639, ____Flags_0)); }
inline int32_t get__Flags_0() const { return ____Flags_0; }
inline int32_t* get_address_of__Flags_0() { return &____Flags_0; }
inline void set__Flags_0(int32_t value)
{
____Flags_0 = value;
}
inline static int32_t get_offset_of_KeyContainerName_1() { return static_cast<int32_t>(offsetof(CspParameters_t239852639, ___KeyContainerName_1)); }
inline String_t* get_KeyContainerName_1() const { return ___KeyContainerName_1; }
inline String_t** get_address_of_KeyContainerName_1() { return &___KeyContainerName_1; }
inline void set_KeyContainerName_1(String_t* value)
{
___KeyContainerName_1 = value;
Il2CppCodeGenWriteBarrier((&___KeyContainerName_1), value);
}
inline static int32_t get_offset_of_KeyNumber_2() { return static_cast<int32_t>(offsetof(CspParameters_t239852639, ___KeyNumber_2)); }
inline int32_t get_KeyNumber_2() const { return ___KeyNumber_2; }
inline int32_t* get_address_of_KeyNumber_2() { return &___KeyNumber_2; }
inline void set_KeyNumber_2(int32_t value)
{
___KeyNumber_2 = value;
}
inline static int32_t get_offset_of_ProviderName_3() { return static_cast<int32_t>(offsetof(CspParameters_t239852639, ___ProviderName_3)); }
inline String_t* get_ProviderName_3() const { return ___ProviderName_3; }
inline String_t** get_address_of_ProviderName_3() { return &___ProviderName_3; }
inline void set_ProviderName_3(String_t* value)
{
___ProviderName_3 = value;
Il2CppCodeGenWriteBarrier((&___ProviderName_3), value);
}
inline static int32_t get_offset_of_ProviderType_4() { return static_cast<int32_t>(offsetof(CspParameters_t239852639, ___ProviderType_4)); }
inline int32_t get_ProviderType_4() const { return ___ProviderType_4; }
inline int32_t* get_address_of_ProviderType_4() { return &___ProviderType_4; }
inline void set_ProviderType_4(int32_t value)
{
___ProviderType_4 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // CSPPARAMETERS_T239852639_H
#ifndef SYMMETRICALGORITHM_T4254223087_H
#define SYMMETRICALGORITHM_T4254223087_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Security.Cryptography.SymmetricAlgorithm
struct SymmetricAlgorithm_t4254223087 : public RuntimeObject
{
public:
// System.Int32 System.Security.Cryptography.SymmetricAlgorithm::BlockSizeValue
int32_t ___BlockSizeValue_0;
// System.Byte[] System.Security.Cryptography.SymmetricAlgorithm::IVValue
ByteU5BU5D_t4116647657* ___IVValue_1;
// System.Int32 System.Security.Cryptography.SymmetricAlgorithm::KeySizeValue
int32_t ___KeySizeValue_2;
// System.Byte[] System.Security.Cryptography.SymmetricAlgorithm::KeyValue
ByteU5BU5D_t4116647657* ___KeyValue_3;
// System.Security.Cryptography.KeySizes[] System.Security.Cryptography.SymmetricAlgorithm::LegalBlockSizesValue
KeySizesU5BU5D_t722666473* ___LegalBlockSizesValue_4;
// System.Security.Cryptography.KeySizes[] System.Security.Cryptography.SymmetricAlgorithm::LegalKeySizesValue
KeySizesU5BU5D_t722666473* ___LegalKeySizesValue_5;
// System.Int32 System.Security.Cryptography.SymmetricAlgorithm::FeedbackSizeValue
int32_t ___FeedbackSizeValue_6;
// System.Security.Cryptography.CipherMode System.Security.Cryptography.SymmetricAlgorithm::ModeValue
int32_t ___ModeValue_7;
// System.Security.Cryptography.PaddingMode System.Security.Cryptography.SymmetricAlgorithm::PaddingValue
int32_t ___PaddingValue_8;
// System.Boolean System.Security.Cryptography.SymmetricAlgorithm::m_disposed
bool ___m_disposed_9;
public:
inline static int32_t get_offset_of_BlockSizeValue_0() { return static_cast<int32_t>(offsetof(SymmetricAlgorithm_t4254223087, ___BlockSizeValue_0)); }
inline int32_t get_BlockSizeValue_0() const { return ___BlockSizeValue_0; }
inline int32_t* get_address_of_BlockSizeValue_0() { return &___BlockSizeValue_0; }
inline void set_BlockSizeValue_0(int32_t value)
{
___BlockSizeValue_0 = value;
}
inline static int32_t get_offset_of_IVValue_1() { return static_cast<int32_t>(offsetof(SymmetricAlgorithm_t4254223087, ___IVValue_1)); }
inline ByteU5BU5D_t4116647657* get_IVValue_1() const { return ___IVValue_1; }
inline ByteU5BU5D_t4116647657** get_address_of_IVValue_1() { return &___IVValue_1; }
inline void set_IVValue_1(ByteU5BU5D_t4116647657* value)
{
___IVValue_1 = value;
Il2CppCodeGenWriteBarrier((&___IVValue_1), value);
}
inline static int32_t get_offset_of_KeySizeValue_2() { return static_cast<int32_t>(offsetof(SymmetricAlgorithm_t4254223087, ___KeySizeValue_2)); }
inline int32_t get_KeySizeValue_2() const { return ___KeySizeValue_2; }
inline int32_t* get_address_of_KeySizeValue_2() { return &___KeySizeValue_2; }
inline void set_KeySizeValue_2(int32_t value)
{
___KeySizeValue_2 = value;
}
inline static int32_t get_offset_of_KeyValue_3() { return static_cast<int32_t>(offsetof(SymmetricAlgorithm_t4254223087, ___KeyValue_3)); }
inline ByteU5BU5D_t4116647657* get_KeyValue_3() const { return ___KeyValue_3; }
inline ByteU5BU5D_t4116647657** get_address_of_KeyValue_3() { return &___KeyValue_3; }
inline void set_KeyValue_3(ByteU5BU5D_t4116647657* value)
{
___KeyValue_3 = value;
Il2CppCodeGenWriteBarrier((&___KeyValue_3), value);
}
inline static int32_t get_offset_of_LegalBlockSizesValue_4() { return static_cast<int32_t>(offsetof(SymmetricAlgorithm_t4254223087, ___LegalBlockSizesValue_4)); }
inline KeySizesU5BU5D_t722666473* get_LegalBlockSizesValue_4() const { return ___LegalBlockSizesValue_4; }
inline KeySizesU5BU5D_t722666473** get_address_of_LegalBlockSizesValue_4() { return &___LegalBlockSizesValue_4; }
inline void set_LegalBlockSizesValue_4(KeySizesU5BU5D_t722666473* value)
{
___LegalBlockSizesValue_4 = value;
Il2CppCodeGenWriteBarrier((&___LegalBlockSizesValue_4), value);
}
inline static int32_t get_offset_of_LegalKeySizesValue_5() { return static_cast<int32_t>(offsetof(SymmetricAlgorithm_t4254223087, ___LegalKeySizesValue_5)); }
inline KeySizesU5BU5D_t722666473* get_LegalKeySizesValue_5() const { return ___LegalKeySizesValue_5; }
inline KeySizesU5BU5D_t722666473** get_address_of_LegalKeySizesValue_5() { return &___LegalKeySizesValue_5; }
inline void set_LegalKeySizesValue_5(KeySizesU5BU5D_t722666473* value)
{
___LegalKeySizesValue_5 = value;
Il2CppCodeGenWriteBarrier((&___LegalKeySizesValue_5), value);
}
inline static int32_t get_offset_of_FeedbackSizeValue_6() { return static_cast<int32_t>(offsetof(SymmetricAlgorithm_t4254223087, ___FeedbackSizeValue_6)); }
inline int32_t get_FeedbackSizeValue_6() const { return ___FeedbackSizeValue_6; }
inline int32_t* get_address_of_FeedbackSizeValue_6() { return &___FeedbackSizeValue_6; }
inline void set_FeedbackSizeValue_6(int32_t value)
{
___FeedbackSizeValue_6 = value;
}
inline static int32_t get_offset_of_ModeValue_7() { return static_cast<int32_t>(offsetof(SymmetricAlgorithm_t4254223087, ___ModeValue_7)); }
inline int32_t get_ModeValue_7() const { return ___ModeValue_7; }
inline int32_t* get_address_of_ModeValue_7() { return &___ModeValue_7; }
inline void set_ModeValue_7(int32_t value)
{
___ModeValue_7 = value;
}
inline static int32_t get_offset_of_PaddingValue_8() { return static_cast<int32_t>(offsetof(SymmetricAlgorithm_t4254223087, ___PaddingValue_8)); }
inline int32_t get_PaddingValue_8() const { return ___PaddingValue_8; }
inline int32_t* get_address_of_PaddingValue_8() { return &___PaddingValue_8; }
inline void set_PaddingValue_8(int32_t value)
{
___PaddingValue_8 = value;
}
inline static int32_t get_offset_of_m_disposed_9() { return static_cast<int32_t>(offsetof(SymmetricAlgorithm_t4254223087, ___m_disposed_9)); }
inline bool get_m_disposed_9() const { return ___m_disposed_9; }
inline bool* get_address_of_m_disposed_9() { return &___m_disposed_9; }
inline void set_m_disposed_9(bool value)
{
___m_disposed_9 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // SYMMETRICALGORITHM_T4254223087_H
#ifndef X509CHAIN_T194917408_H
#define X509CHAIN_T194917408_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Security.Cryptography.X509Certificates.X509Chain
struct X509Chain_t194917408 : public RuntimeObject
{
public:
// System.Security.Cryptography.X509Certificates.StoreLocation System.Security.Cryptography.X509Certificates.X509Chain::location
int32_t ___location_0;
// System.Security.Cryptography.X509Certificates.X509ChainElementCollection System.Security.Cryptography.X509Certificates.X509Chain::elements
X509ChainElementCollection_t3110968994 * ___elements_1;
// System.Security.Cryptography.X509Certificates.X509ChainPolicy System.Security.Cryptography.X509Certificates.X509Chain::policy
X509ChainPolicy_t2426922870 * ___policy_2;
// System.Security.Cryptography.X509Certificates.X509ChainStatus[] System.Security.Cryptography.X509Certificates.X509Chain::status
X509ChainStatusU5BU5D_t2685945535* ___status_3;
// System.Int32 System.Security.Cryptography.X509Certificates.X509Chain::max_path_length
int32_t ___max_path_length_5;
// System.Security.Cryptography.X509Certificates.X500DistinguishedName System.Security.Cryptography.X509Certificates.X509Chain::working_issuer_name
X500DistinguishedName_t875709727 * ___working_issuer_name_6;
// System.Security.Cryptography.AsymmetricAlgorithm System.Security.Cryptography.X509Certificates.X509Chain::working_public_key
AsymmetricAlgorithm_t932037087 * ___working_public_key_7;
// System.Security.Cryptography.X509Certificates.X509ChainElement System.Security.Cryptography.X509Certificates.X509Chain::bce_restriction
X509ChainElement_t1464056338 * ___bce_restriction_8;
// System.Security.Cryptography.X509Certificates.X509Store System.Security.Cryptography.X509Certificates.X509Chain::roots
X509Store_t2922691911 * ___roots_9;
// System.Security.Cryptography.X509Certificates.X509Store System.Security.Cryptography.X509Certificates.X509Chain::cas
X509Store_t2922691911 * ___cas_10;
// System.Security.Cryptography.X509Certificates.X509Certificate2Collection System.Security.Cryptography.X509Certificates.X509Chain::collection
X509Certificate2Collection_t2111161276 * ___collection_11;
public:
inline static int32_t get_offset_of_location_0() { return static_cast<int32_t>(offsetof(X509Chain_t194917408, ___location_0)); }
inline int32_t get_location_0() const { return ___location_0; }
inline int32_t* get_address_of_location_0() { return &___location_0; }
inline void set_location_0(int32_t value)
{
___location_0 = value;
}
inline static int32_t get_offset_of_elements_1() { return static_cast<int32_t>(offsetof(X509Chain_t194917408, ___elements_1)); }
inline X509ChainElementCollection_t3110968994 * get_elements_1() const { return ___elements_1; }
inline X509ChainElementCollection_t3110968994 ** get_address_of_elements_1() { return &___elements_1; }
inline void set_elements_1(X509ChainElementCollection_t3110968994 * value)
{
___elements_1 = value;
Il2CppCodeGenWriteBarrier((&___elements_1), value);
}
inline static int32_t get_offset_of_policy_2() { return static_cast<int32_t>(offsetof(X509Chain_t194917408, ___policy_2)); }
inline X509ChainPolicy_t2426922870 * get_policy_2() const { return ___policy_2; }
inline X509ChainPolicy_t2426922870 ** get_address_of_policy_2() { return &___policy_2; }
inline void set_policy_2(X509ChainPolicy_t2426922870 * value)
{
___policy_2 = value;
Il2CppCodeGenWriteBarrier((&___policy_2), value);
}
inline static int32_t get_offset_of_status_3() { return static_cast<int32_t>(offsetof(X509Chain_t194917408, ___status_3)); }
inline X509ChainStatusU5BU5D_t2685945535* get_status_3() const { return ___status_3; }
inline X509ChainStatusU5BU5D_t2685945535** get_address_of_status_3() { return &___status_3; }
inline void set_status_3(X509ChainStatusU5BU5D_t2685945535* value)
{
___status_3 = value;
Il2CppCodeGenWriteBarrier((&___status_3), value);
}
inline static int32_t get_offset_of_max_path_length_5() { return static_cast<int32_t>(offsetof(X509Chain_t194917408, ___max_path_length_5)); }
inline int32_t get_max_path_length_5() const { return ___max_path_length_5; }
inline int32_t* get_address_of_max_path_length_5() { return &___max_path_length_5; }
inline void set_max_path_length_5(int32_t value)
{
___max_path_length_5 = value;
}
inline static int32_t get_offset_of_working_issuer_name_6() { return static_cast<int32_t>(offsetof(X509Chain_t194917408, ___working_issuer_name_6)); }
inline X500DistinguishedName_t875709727 * get_working_issuer_name_6() const { return ___working_issuer_name_6; }
inline X500DistinguishedName_t875709727 ** get_address_of_working_issuer_name_6() { return &___working_issuer_name_6; }
inline void set_working_issuer_name_6(X500DistinguishedName_t875709727 * value)
{
___working_issuer_name_6 = value;
Il2CppCodeGenWriteBarrier((&___working_issuer_name_6), value);
}
inline static int32_t get_offset_of_working_public_key_7() { return static_cast<int32_t>(offsetof(X509Chain_t194917408, ___working_public_key_7)); }
inline AsymmetricAlgorithm_t932037087 * get_working_public_key_7() const { return ___working_public_key_7; }
inline AsymmetricAlgorithm_t932037087 ** get_address_of_working_public_key_7() { return &___working_public_key_7; }
inline void set_working_public_key_7(AsymmetricAlgorithm_t932037087 * value)
{
___working_public_key_7 = value;
Il2CppCodeGenWriteBarrier((&___working_public_key_7), value);
}
inline static int32_t get_offset_of_bce_restriction_8() { return static_cast<int32_t>(offsetof(X509Chain_t194917408, ___bce_restriction_8)); }
inline X509ChainElement_t1464056338 * get_bce_restriction_8() const { return ___bce_restriction_8; }
inline X509ChainElement_t1464056338 ** get_address_of_bce_restriction_8() { return &___bce_restriction_8; }
inline void set_bce_restriction_8(X509ChainElement_t1464056338 * value)
{
___bce_restriction_8 = value;
Il2CppCodeGenWriteBarrier((&___bce_restriction_8), value);
}
inline static int32_t get_offset_of_roots_9() { return static_cast<int32_t>(offsetof(X509Chain_t194917408, ___roots_9)); }
inline X509Store_t2922691911 * get_roots_9() const { return ___roots_9; }
inline X509Store_t2922691911 ** get_address_of_roots_9() { return &___roots_9; }
inline void set_roots_9(X509Store_t2922691911 * value)
{
___roots_9 = value;
Il2CppCodeGenWriteBarrier((&___roots_9), value);
}
inline static int32_t get_offset_of_cas_10() { return static_cast<int32_t>(offsetof(X509Chain_t194917408, ___cas_10)); }
inline X509Store_t2922691911 * get_cas_10() const { return ___cas_10; }
inline X509Store_t2922691911 ** get_address_of_cas_10() { return &___cas_10; }
inline void set_cas_10(X509Store_t2922691911 * value)
{
___cas_10 = value;
Il2CppCodeGenWriteBarrier((&___cas_10), value);
}
inline static int32_t get_offset_of_collection_11() { return static_cast<int32_t>(offsetof(X509Chain_t194917408, ___collection_11)); }
inline X509Certificate2Collection_t2111161276 * get_collection_11() const { return ___collection_11; }
inline X509Certificate2Collection_t2111161276 ** get_address_of_collection_11() { return &___collection_11; }
inline void set_collection_11(X509Certificate2Collection_t2111161276 * value)
{
___collection_11 = value;
Il2CppCodeGenWriteBarrier((&___collection_11), value);
}
};
struct X509Chain_t194917408_StaticFields
{
public:
// System.Security.Cryptography.X509Certificates.X509ChainStatus[] System.Security.Cryptography.X509Certificates.X509Chain::Empty
X509ChainStatusU5BU5D_t2685945535* ___Empty_4;
// System.Collections.Generic.Dictionary`2<System.String,System.Int32> System.Security.Cryptography.X509Certificates.X509Chain::<>f__switch$mapB
Dictionary_2_t2736202052 * ___U3CU3Ef__switchU24mapB_12;
// System.Collections.Generic.Dictionary`2<System.String,System.Int32> System.Security.Cryptography.X509Certificates.X509Chain::<>f__switch$mapC
Dictionary_2_t2736202052 * ___U3CU3Ef__switchU24mapC_13;
// System.Collections.Generic.Dictionary`2<System.String,System.Int32> System.Security.Cryptography.X509Certificates.X509Chain::<>f__switch$mapD
Dictionary_2_t2736202052 * ___U3CU3Ef__switchU24mapD_14;
public:
inline static int32_t get_offset_of_Empty_4() { return static_cast<int32_t>(offsetof(X509Chain_t194917408_StaticFields, ___Empty_4)); }
inline X509ChainStatusU5BU5D_t2685945535* get_Empty_4() const { return ___Empty_4; }
inline X509ChainStatusU5BU5D_t2685945535** get_address_of_Empty_4() { return &___Empty_4; }
inline void set_Empty_4(X509ChainStatusU5BU5D_t2685945535* value)
{
___Empty_4 = value;
Il2CppCodeGenWriteBarrier((&___Empty_4), value);
}
inline static int32_t get_offset_of_U3CU3Ef__switchU24mapB_12() { return static_cast<int32_t>(offsetof(X509Chain_t194917408_StaticFields, ___U3CU3Ef__switchU24mapB_12)); }
inline Dictionary_2_t2736202052 * get_U3CU3Ef__switchU24mapB_12() const { return ___U3CU3Ef__switchU24mapB_12; }
inline Dictionary_2_t2736202052 ** get_address_of_U3CU3Ef__switchU24mapB_12() { return &___U3CU3Ef__switchU24mapB_12; }
inline void set_U3CU3Ef__switchU24mapB_12(Dictionary_2_t2736202052 * value)
{
___U3CU3Ef__switchU24mapB_12 = value;
Il2CppCodeGenWriteBarrier((&___U3CU3Ef__switchU24mapB_12), value);
}
inline static int32_t get_offset_of_U3CU3Ef__switchU24mapC_13() { return static_cast<int32_t>(offsetof(X509Chain_t194917408_StaticFields, ___U3CU3Ef__switchU24mapC_13)); }
inline Dictionary_2_t2736202052 * get_U3CU3Ef__switchU24mapC_13() const { return ___U3CU3Ef__switchU24mapC_13; }
inline Dictionary_2_t2736202052 ** get_address_of_U3CU3Ef__switchU24mapC_13() { return &___U3CU3Ef__switchU24mapC_13; }
inline void set_U3CU3Ef__switchU24mapC_13(Dictionary_2_t2736202052 * value)
{
___U3CU3Ef__switchU24mapC_13 = value;
Il2CppCodeGenWriteBarrier((&___U3CU3Ef__switchU24mapC_13), value);
}
inline static int32_t get_offset_of_U3CU3Ef__switchU24mapD_14() { return static_cast<int32_t>(offsetof(X509Chain_t194917408_StaticFields, ___U3CU3Ef__switchU24mapD_14)); }
inline Dictionary_2_t2736202052 * get_U3CU3Ef__switchU24mapD_14() const { return ___U3CU3Ef__switchU24mapD_14; }
inline Dictionary_2_t2736202052 ** get_address_of_U3CU3Ef__switchU24mapD_14() { return &___U3CU3Ef__switchU24mapD_14; }
inline void set_U3CU3Ef__switchU24mapD_14(Dictionary_2_t2736202052 * value)
{
___U3CU3Ef__switchU24mapD_14 = value;
Il2CppCodeGenWriteBarrier((&___U3CU3Ef__switchU24mapD_14), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // X509CHAIN_T194917408_H
#ifndef REGEX_T3657309853_H
#define REGEX_T3657309853_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Text.RegularExpressions.Regex
struct Regex_t3657309853 : public RuntimeObject
{
public:
// System.Text.RegularExpressions.IMachineFactory System.Text.RegularExpressions.Regex::machineFactory
RuntimeObject* ___machineFactory_1;
// System.Collections.IDictionary System.Text.RegularExpressions.Regex::mapping
RuntimeObject* ___mapping_2;
// System.Int32 System.Text.RegularExpressions.Regex::group_count
int32_t ___group_count_3;
// System.Int32 System.Text.RegularExpressions.Regex::gap
int32_t ___gap_4;
// System.String[] System.Text.RegularExpressions.Regex::group_names
StringU5BU5D_t1281789340* ___group_names_5;
// System.Int32[] System.Text.RegularExpressions.Regex::group_numbers
Int32U5BU5D_t385246372* ___group_numbers_6;
// System.String System.Text.RegularExpressions.Regex::pattern
String_t* ___pattern_7;
// System.Text.RegularExpressions.RegexOptions System.Text.RegularExpressions.Regex::roptions
int32_t ___roptions_8;
public:
inline static int32_t get_offset_of_machineFactory_1() { return static_cast<int32_t>(offsetof(Regex_t3657309853, ___machineFactory_1)); }
inline RuntimeObject* get_machineFactory_1() const { return ___machineFactory_1; }
inline RuntimeObject** get_address_of_machineFactory_1() { return &___machineFactory_1; }
inline void set_machineFactory_1(RuntimeObject* value)
{
___machineFactory_1 = value;
Il2CppCodeGenWriteBarrier((&___machineFactory_1), value);
}
inline static int32_t get_offset_of_mapping_2() { return static_cast<int32_t>(offsetof(Regex_t3657309853, ___mapping_2)); }
inline RuntimeObject* get_mapping_2() const { return ___mapping_2; }
inline RuntimeObject** get_address_of_mapping_2() { return &___mapping_2; }
inline void set_mapping_2(RuntimeObject* value)
{
___mapping_2 = value;
Il2CppCodeGenWriteBarrier((&___mapping_2), value);
}
inline static int32_t get_offset_of_group_count_3() { return static_cast<int32_t>(offsetof(Regex_t3657309853, ___group_count_3)); }
inline int32_t get_group_count_3() const { return ___group_count_3; }
inline int32_t* get_address_of_group_count_3() { return &___group_count_3; }
inline void set_group_count_3(int32_t value)
{
___group_count_3 = value;
}
inline static int32_t get_offset_of_gap_4() { return static_cast<int32_t>(offsetof(Regex_t3657309853, ___gap_4)); }
inline int32_t get_gap_4() const { return ___gap_4; }
inline int32_t* get_address_of_gap_4() { return &___gap_4; }
inline void set_gap_4(int32_t value)
{
___gap_4 = value;
}
inline static int32_t get_offset_of_group_names_5() { return static_cast<int32_t>(offsetof(Regex_t3657309853, ___group_names_5)); }
inline StringU5BU5D_t1281789340* get_group_names_5() const { return ___group_names_5; }
inline StringU5BU5D_t1281789340** get_address_of_group_names_5() { return &___group_names_5; }
inline void set_group_names_5(StringU5BU5D_t1281789340* value)
{
___group_names_5 = value;
Il2CppCodeGenWriteBarrier((&___group_names_5), value);
}
inline static int32_t get_offset_of_group_numbers_6() { return static_cast<int32_t>(offsetof(Regex_t3657309853, ___group_numbers_6)); }
inline Int32U5BU5D_t385246372* get_group_numbers_6() const { return ___group_numbers_6; }
inline Int32U5BU5D_t385246372** get_address_of_group_numbers_6() { return &___group_numbers_6; }
inline void set_group_numbers_6(Int32U5BU5D_t385246372* value)
{
___group_numbers_6 = value;
Il2CppCodeGenWriteBarrier((&___group_numbers_6), value);
}
inline static int32_t get_offset_of_pattern_7() { return static_cast<int32_t>(offsetof(Regex_t3657309853, ___pattern_7)); }
inline String_t* get_pattern_7() const { return ___pattern_7; }
inline String_t** get_address_of_pattern_7() { return &___pattern_7; }
inline void set_pattern_7(String_t* value)
{
___pattern_7 = value;
Il2CppCodeGenWriteBarrier((&___pattern_7), value);
}
inline static int32_t get_offset_of_roptions_8() { return static_cast<int32_t>(offsetof(Regex_t3657309853, ___roptions_8)); }
inline int32_t get_roptions_8() const { return ___roptions_8; }
inline int32_t* get_address_of_roptions_8() { return &___roptions_8; }
inline void set_roptions_8(int32_t value)
{
___roptions_8 = value;
}
};
struct Regex_t3657309853_StaticFields
{
public:
// System.Text.RegularExpressions.FactoryCache System.Text.RegularExpressions.Regex::cache
FactoryCache_t2327118887 * ___cache_0;
public:
inline static int32_t get_offset_of_cache_0() { return static_cast<int32_t>(offsetof(Regex_t3657309853_StaticFields, ___cache_0)); }
inline FactoryCache_t2327118887 * get_cache_0() const { return ___cache_0; }
inline FactoryCache_t2327118887 ** get_address_of_cache_0() { return &___cache_0; }
inline void set_cache_0(FactoryCache_t2327118887 * value)
{
___cache_0 = value;
Il2CppCodeGenWriteBarrier((&___cache_0), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // REGEX_T3657309853_H
#ifndef EVENTWAITHANDLE_T777845177_H
#define EVENTWAITHANDLE_T777845177_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Threading.EventWaitHandle
struct EventWaitHandle_t777845177 : public WaitHandle_t1743403487
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // EVENTWAITHANDLE_T777845177_H
#ifndef TYPE_T_H
#define TYPE_T_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Type
struct Type_t : public MemberInfo_t
{
public:
// System.RuntimeTypeHandle System.Type::_impl
RuntimeTypeHandle_t3027515415 ____impl_1;
public:
inline static int32_t get_offset_of__impl_1() { return static_cast<int32_t>(offsetof(Type_t, ____impl_1)); }
inline RuntimeTypeHandle_t3027515415 get__impl_1() const { return ____impl_1; }
inline RuntimeTypeHandle_t3027515415 * get_address_of__impl_1() { return &____impl_1; }
inline void set__impl_1(RuntimeTypeHandle_t3027515415 value)
{
____impl_1 = value;
}
};
struct Type_t_StaticFields
{
public:
// System.Char System.Type::Delimiter
Il2CppChar ___Delimiter_2;
// System.Type[] System.Type::EmptyTypes
TypeU5BU5D_t3940880105* ___EmptyTypes_3;
// System.Reflection.MemberFilter System.Type::FilterAttribute
MemberFilter_t426314064 * ___FilterAttribute_4;
// System.Reflection.MemberFilter System.Type::FilterName
MemberFilter_t426314064 * ___FilterName_5;
// System.Reflection.MemberFilter System.Type::FilterNameIgnoreCase
MemberFilter_t426314064 * ___FilterNameIgnoreCase_6;
// System.Object System.Type::Missing
RuntimeObject * ___Missing_7;
public:
inline static int32_t get_offset_of_Delimiter_2() { return static_cast<int32_t>(offsetof(Type_t_StaticFields, ___Delimiter_2)); }
inline Il2CppChar get_Delimiter_2() const { return ___Delimiter_2; }
inline Il2CppChar* get_address_of_Delimiter_2() { return &___Delimiter_2; }
inline void set_Delimiter_2(Il2CppChar value)
{
___Delimiter_2 = value;
}
inline static int32_t get_offset_of_EmptyTypes_3() { return static_cast<int32_t>(offsetof(Type_t_StaticFields, ___EmptyTypes_3)); }
inline TypeU5BU5D_t3940880105* get_EmptyTypes_3() const { return ___EmptyTypes_3; }
inline TypeU5BU5D_t3940880105** get_address_of_EmptyTypes_3() { return &___EmptyTypes_3; }
inline void set_EmptyTypes_3(TypeU5BU5D_t3940880105* value)
{
___EmptyTypes_3 = value;
Il2CppCodeGenWriteBarrier((&___EmptyTypes_3), value);
}
inline static int32_t get_offset_of_FilterAttribute_4() { return static_cast<int32_t>(offsetof(Type_t_StaticFields, ___FilterAttribute_4)); }
inline MemberFilter_t426314064 * get_FilterAttribute_4() const { return ___FilterAttribute_4; }
inline MemberFilter_t426314064 ** get_address_of_FilterAttribute_4() { return &___FilterAttribute_4; }
inline void set_FilterAttribute_4(MemberFilter_t426314064 * value)
{
___FilterAttribute_4 = value;
Il2CppCodeGenWriteBarrier((&___FilterAttribute_4), value);
}
inline static int32_t get_offset_of_FilterName_5() { return static_cast<int32_t>(offsetof(Type_t_StaticFields, ___FilterName_5)); }
inline MemberFilter_t426314064 * get_FilterName_5() const { return ___FilterName_5; }
inline MemberFilter_t426314064 ** get_address_of_FilterName_5() { return &___FilterName_5; }
inline void set_FilterName_5(MemberFilter_t426314064 * value)
{
___FilterName_5 = value;
Il2CppCodeGenWriteBarrier((&___FilterName_5), value);
}
inline static int32_t get_offset_of_FilterNameIgnoreCase_6() { return static_cast<int32_t>(offsetof(Type_t_StaticFields, ___FilterNameIgnoreCase_6)); }
inline MemberFilter_t426314064 * get_FilterNameIgnoreCase_6() const { return ___FilterNameIgnoreCase_6; }
inline MemberFilter_t426314064 ** get_address_of_FilterNameIgnoreCase_6() { return &___FilterNameIgnoreCase_6; }
inline void set_FilterNameIgnoreCase_6(MemberFilter_t426314064 * value)
{
___FilterNameIgnoreCase_6 = value;
Il2CppCodeGenWriteBarrier((&___FilterNameIgnoreCase_6), value);
}
inline static int32_t get_offset_of_Missing_7() { return static_cast<int32_t>(offsetof(Type_t_StaticFields, ___Missing_7)); }
inline RuntimeObject * get_Missing_7() const { return ___Missing_7; }
inline RuntimeObject ** get_address_of_Missing_7() { return &___Missing_7; }
inline void set_Missing_7(RuntimeObject * value)
{
___Missing_7 = value;
Il2CppCodeGenWriteBarrier((&___Missing_7), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // TYPE_T_H
#ifndef PRIMALITYTEST_T1539325944_H
#define PRIMALITYTEST_T1539325944_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Math.Prime.PrimalityTest
struct PrimalityTest_t1539325944 : public MulticastDelegate_t
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // PRIMALITYTEST_T1539325944_H
#ifndef RC4_T2752556436_H
#define RC4_T2752556436_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Cryptography.RC4
struct RC4_t2752556436 : public SymmetricAlgorithm_t4254223087
{
public:
public:
};
struct RC4_t2752556436_StaticFields
{
public:
// System.Security.Cryptography.KeySizes[] Mono.Security.Cryptography.RC4::s_legalBlockSizes
KeySizesU5BU5D_t722666473* ___s_legalBlockSizes_10;
// System.Security.Cryptography.KeySizes[] Mono.Security.Cryptography.RC4::s_legalKeySizes
KeySizesU5BU5D_t722666473* ___s_legalKeySizes_11;
public:
inline static int32_t get_offset_of_s_legalBlockSizes_10() { return static_cast<int32_t>(offsetof(RC4_t2752556436_StaticFields, ___s_legalBlockSizes_10)); }
inline KeySizesU5BU5D_t722666473* get_s_legalBlockSizes_10() const { return ___s_legalBlockSizes_10; }
inline KeySizesU5BU5D_t722666473** get_address_of_s_legalBlockSizes_10() { return &___s_legalBlockSizes_10; }
inline void set_s_legalBlockSizes_10(KeySizesU5BU5D_t722666473* value)
{
___s_legalBlockSizes_10 = value;
Il2CppCodeGenWriteBarrier((&___s_legalBlockSizes_10), value);
}
inline static int32_t get_offset_of_s_legalKeySizes_11() { return static_cast<int32_t>(offsetof(RC4_t2752556436_StaticFields, ___s_legalKeySizes_11)); }
inline KeySizesU5BU5D_t722666473* get_s_legalKeySizes_11() const { return ___s_legalKeySizes_11; }
inline KeySizesU5BU5D_t722666473** get_address_of_s_legalKeySizes_11() { return &___s_legalKeySizes_11; }
inline void set_s_legalKeySizes_11(KeySizesU5BU5D_t722666473* value)
{
___s_legalKeySizes_11 = value;
Il2CppCodeGenWriteBarrier((&___s_legalKeySizes_11), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // RC4_T2752556436_H
#ifndef KEYGENERATEDEVENTHANDLER_T3064139578_H
#define KEYGENERATEDEVENTHANDLER_T3064139578_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Cryptography.RSAManaged/KeyGeneratedEventHandler
struct KeyGeneratedEventHandler_t3064139578 : public MulticastDelegate_t
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // KEYGENERATEDEVENTHANDLER_T3064139578_H
#ifndef CERTIFICATESELECTIONCALLBACK_T3743405224_H
#define CERTIFICATESELECTIONCALLBACK_T3743405224_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Protocol.Tls.CertificateSelectionCallback
struct CertificateSelectionCallback_t3743405224 : public MulticastDelegate_t
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // CERTIFICATESELECTIONCALLBACK_T3743405224_H
#ifndef CERTIFICATEVALIDATIONCALLBACK_T4091668218_H
#define CERTIFICATEVALIDATIONCALLBACK_T4091668218_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Protocol.Tls.CertificateValidationCallback
struct CertificateValidationCallback_t4091668218 : public MulticastDelegate_t
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // CERTIFICATEVALIDATIONCALLBACK_T4091668218_H
#ifndef CERTIFICATEVALIDATIONCALLBACK2_T1842476440_H
#define CERTIFICATEVALIDATIONCALLBACK2_T1842476440_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Protocol.Tls.CertificateValidationCallback2
struct CertificateValidationCallback2_t1842476440 : public MulticastDelegate_t
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // CERTIFICATEVALIDATIONCALLBACK2_T1842476440_H
#ifndef CLIENTCONTEXT_T2797401965_H
#define CLIENTCONTEXT_T2797401965_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Protocol.Tls.ClientContext
struct ClientContext_t2797401965 : public Context_t3971234707
{
public:
// Mono.Security.Protocol.Tls.SslClientStream Mono.Security.Protocol.Tls.ClientContext::sslStream
SslClientStream_t3914624661 * ___sslStream_30;
// System.Int16 Mono.Security.Protocol.Tls.ClientContext::clientHelloProtocol
int16_t ___clientHelloProtocol_31;
public:
inline static int32_t get_offset_of_sslStream_30() { return static_cast<int32_t>(offsetof(ClientContext_t2797401965, ___sslStream_30)); }
inline SslClientStream_t3914624661 * get_sslStream_30() const { return ___sslStream_30; }
inline SslClientStream_t3914624661 ** get_address_of_sslStream_30() { return &___sslStream_30; }
inline void set_sslStream_30(SslClientStream_t3914624661 * value)
{
___sslStream_30 = value;
Il2CppCodeGenWriteBarrier((&___sslStream_30), value);
}
inline static int32_t get_offset_of_clientHelloProtocol_31() { return static_cast<int32_t>(offsetof(ClientContext_t2797401965, ___clientHelloProtocol_31)); }
inline int16_t get_clientHelloProtocol_31() const { return ___clientHelloProtocol_31; }
inline int16_t* get_address_of_clientHelloProtocol_31() { return &___clientHelloProtocol_31; }
inline void set_clientHelloProtocol_31(int16_t value)
{
___clientHelloProtocol_31 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // CLIENTCONTEXT_T2797401965_H
#ifndef CLIENTSESSIONINFO_T1775821398_H
#define CLIENTSESSIONINFO_T1775821398_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Protocol.Tls.ClientSessionInfo
struct ClientSessionInfo_t1775821398 : public RuntimeObject
{
public:
// System.Boolean Mono.Security.Protocol.Tls.ClientSessionInfo::disposed
bool ___disposed_1;
// System.DateTime Mono.Security.Protocol.Tls.ClientSessionInfo::validuntil
DateTime_t3738529785 ___validuntil_2;
// System.String Mono.Security.Protocol.Tls.ClientSessionInfo::host
String_t* ___host_3;
// System.Byte[] Mono.Security.Protocol.Tls.ClientSessionInfo::sid
ByteU5BU5D_t4116647657* ___sid_4;
// System.Byte[] Mono.Security.Protocol.Tls.ClientSessionInfo::masterSecret
ByteU5BU5D_t4116647657* ___masterSecret_5;
public:
inline static int32_t get_offset_of_disposed_1() { return static_cast<int32_t>(offsetof(ClientSessionInfo_t1775821398, ___disposed_1)); }
inline bool get_disposed_1() const { return ___disposed_1; }
inline bool* get_address_of_disposed_1() { return &___disposed_1; }
inline void set_disposed_1(bool value)
{
___disposed_1 = value;
}
inline static int32_t get_offset_of_validuntil_2() { return static_cast<int32_t>(offsetof(ClientSessionInfo_t1775821398, ___validuntil_2)); }
inline DateTime_t3738529785 get_validuntil_2() const { return ___validuntil_2; }
inline DateTime_t3738529785 * get_address_of_validuntil_2() { return &___validuntil_2; }
inline void set_validuntil_2(DateTime_t3738529785 value)
{
___validuntil_2 = value;
}
inline static int32_t get_offset_of_host_3() { return static_cast<int32_t>(offsetof(ClientSessionInfo_t1775821398, ___host_3)); }
inline String_t* get_host_3() const { return ___host_3; }
inline String_t** get_address_of_host_3() { return &___host_3; }
inline void set_host_3(String_t* value)
{
___host_3 = value;
Il2CppCodeGenWriteBarrier((&___host_3), value);
}
inline static int32_t get_offset_of_sid_4() { return static_cast<int32_t>(offsetof(ClientSessionInfo_t1775821398, ___sid_4)); }
inline ByteU5BU5D_t4116647657* get_sid_4() const { return ___sid_4; }
inline ByteU5BU5D_t4116647657** get_address_of_sid_4() { return &___sid_4; }
inline void set_sid_4(ByteU5BU5D_t4116647657* value)
{
___sid_4 = value;
Il2CppCodeGenWriteBarrier((&___sid_4), value);
}
inline static int32_t get_offset_of_masterSecret_5() { return static_cast<int32_t>(offsetof(ClientSessionInfo_t1775821398, ___masterSecret_5)); }
inline ByteU5BU5D_t4116647657* get_masterSecret_5() const { return ___masterSecret_5; }
inline ByteU5BU5D_t4116647657** get_address_of_masterSecret_5() { return &___masterSecret_5; }
inline void set_masterSecret_5(ByteU5BU5D_t4116647657* value)
{
___masterSecret_5 = value;
Il2CppCodeGenWriteBarrier((&___masterSecret_5), value);
}
};
struct ClientSessionInfo_t1775821398_StaticFields
{
public:
// System.Int32 Mono.Security.Protocol.Tls.ClientSessionInfo::ValidityInterval
int32_t ___ValidityInterval_0;
public:
inline static int32_t get_offset_of_ValidityInterval_0() { return static_cast<int32_t>(offsetof(ClientSessionInfo_t1775821398_StaticFields, ___ValidityInterval_0)); }
inline int32_t get_ValidityInterval_0() const { return ___ValidityInterval_0; }
inline int32_t* get_address_of_ValidityInterval_0() { return &___ValidityInterval_0; }
inline void set_ValidityInterval_0(int32_t value)
{
___ValidityInterval_0 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // CLIENTSESSIONINFO_T1775821398_H
#ifndef TLSCLIENTCERTIFICATE_T3519510577_H
#define TLSCLIENTCERTIFICATE_T3519510577_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Protocol.Tls.Handshake.Client.TlsClientCertificate
struct TlsClientCertificate_t3519510577 : public HandshakeMessage_t3696583168
{
public:
// System.Boolean Mono.Security.Protocol.Tls.Handshake.Client.TlsClientCertificate::clientCertSelected
bool ___clientCertSelected_9;
// System.Security.Cryptography.X509Certificates.X509Certificate Mono.Security.Protocol.Tls.Handshake.Client.TlsClientCertificate::clientCert
X509Certificate_t713131622 * ___clientCert_10;
public:
inline static int32_t get_offset_of_clientCertSelected_9() { return static_cast<int32_t>(offsetof(TlsClientCertificate_t3519510577, ___clientCertSelected_9)); }
inline bool get_clientCertSelected_9() const { return ___clientCertSelected_9; }
inline bool* get_address_of_clientCertSelected_9() { return &___clientCertSelected_9; }
inline void set_clientCertSelected_9(bool value)
{
___clientCertSelected_9 = value;
}
inline static int32_t get_offset_of_clientCert_10() { return static_cast<int32_t>(offsetof(TlsClientCertificate_t3519510577, ___clientCert_10)); }
inline X509Certificate_t713131622 * get_clientCert_10() const { return ___clientCert_10; }
inline X509Certificate_t713131622 ** get_address_of_clientCert_10() { return &___clientCert_10; }
inline void set_clientCert_10(X509Certificate_t713131622 * value)
{
___clientCert_10 = value;
Il2CppCodeGenWriteBarrier((&___clientCert_10), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // TLSCLIENTCERTIFICATE_T3519510577_H
#ifndef TLSCLIENTCERTIFICATEVERIFY_T1824902654_H
#define TLSCLIENTCERTIFICATEVERIFY_T1824902654_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Protocol.Tls.Handshake.Client.TlsClientCertificateVerify
struct TlsClientCertificateVerify_t1824902654 : public HandshakeMessage_t3696583168
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // TLSCLIENTCERTIFICATEVERIFY_T1824902654_H
#ifndef TLSCLIENTFINISHED_T2486981163_H
#define TLSCLIENTFINISHED_T2486981163_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Protocol.Tls.Handshake.Client.TlsClientFinished
struct TlsClientFinished_t2486981163 : public HandshakeMessage_t3696583168
{
public:
public:
};
struct TlsClientFinished_t2486981163_StaticFields
{
public:
// System.Byte[] Mono.Security.Protocol.Tls.Handshake.Client.TlsClientFinished::Ssl3Marker
ByteU5BU5D_t4116647657* ___Ssl3Marker_9;
public:
inline static int32_t get_offset_of_Ssl3Marker_9() { return static_cast<int32_t>(offsetof(TlsClientFinished_t2486981163_StaticFields, ___Ssl3Marker_9)); }
inline ByteU5BU5D_t4116647657* get_Ssl3Marker_9() const { return ___Ssl3Marker_9; }
inline ByteU5BU5D_t4116647657** get_address_of_Ssl3Marker_9() { return &___Ssl3Marker_9; }
inline void set_Ssl3Marker_9(ByteU5BU5D_t4116647657* value)
{
___Ssl3Marker_9 = value;
Il2CppCodeGenWriteBarrier((&___Ssl3Marker_9), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // TLSCLIENTFINISHED_T2486981163_H
#ifndef TLSCLIENTHELLO_T97965998_H
#define TLSCLIENTHELLO_T97965998_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Protocol.Tls.Handshake.Client.TlsClientHello
struct TlsClientHello_t97965998 : public HandshakeMessage_t3696583168
{
public:
// System.Byte[] Mono.Security.Protocol.Tls.Handshake.Client.TlsClientHello::random
ByteU5BU5D_t4116647657* ___random_9;
public:
inline static int32_t get_offset_of_random_9() { return static_cast<int32_t>(offsetof(TlsClientHello_t97965998, ___random_9)); }
inline ByteU5BU5D_t4116647657* get_random_9() const { return ___random_9; }
inline ByteU5BU5D_t4116647657** get_address_of_random_9() { return &___random_9; }
inline void set_random_9(ByteU5BU5D_t4116647657* value)
{
___random_9 = value;
Il2CppCodeGenWriteBarrier((&___random_9), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // TLSCLIENTHELLO_T97965998_H
#ifndef TLSCLIENTKEYEXCHANGE_T643923608_H
#define TLSCLIENTKEYEXCHANGE_T643923608_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Protocol.Tls.Handshake.Client.TlsClientKeyExchange
struct TlsClientKeyExchange_t643923608 : public HandshakeMessage_t3696583168
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // TLSCLIENTKEYEXCHANGE_T643923608_H
#ifndef TLSSERVERCERTIFICATE_T2716496392_H
#define TLSSERVERCERTIFICATE_T2716496392_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Protocol.Tls.Handshake.Client.TlsServerCertificate
struct TlsServerCertificate_t2716496392 : public HandshakeMessage_t3696583168
{
public:
// Mono.Security.X509.X509CertificateCollection Mono.Security.Protocol.Tls.Handshake.Client.TlsServerCertificate::certificates
X509CertificateCollection_t1542168550 * ___certificates_9;
public:
inline static int32_t get_offset_of_certificates_9() { return static_cast<int32_t>(offsetof(TlsServerCertificate_t2716496392, ___certificates_9)); }
inline X509CertificateCollection_t1542168550 * get_certificates_9() const { return ___certificates_9; }
inline X509CertificateCollection_t1542168550 ** get_address_of_certificates_9() { return &___certificates_9; }
inline void set_certificates_9(X509CertificateCollection_t1542168550 * value)
{
___certificates_9 = value;
Il2CppCodeGenWriteBarrier((&___certificates_9), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // TLSSERVERCERTIFICATE_T2716496392_H
#ifndef TLSSERVERCERTIFICATEREQUEST_T3690397592_H
#define TLSSERVERCERTIFICATEREQUEST_T3690397592_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Protocol.Tls.Handshake.Client.TlsServerCertificateRequest
struct TlsServerCertificateRequest_t3690397592 : public HandshakeMessage_t3696583168
{
public:
// Mono.Security.Protocol.Tls.Handshake.ClientCertificateType[] Mono.Security.Protocol.Tls.Handshake.Client.TlsServerCertificateRequest::certificateTypes
ClientCertificateTypeU5BU5D_t4253920197* ___certificateTypes_9;
// System.String[] Mono.Security.Protocol.Tls.Handshake.Client.TlsServerCertificateRequest::distinguisedNames
StringU5BU5D_t1281789340* ___distinguisedNames_10;
public:
inline static int32_t get_offset_of_certificateTypes_9() { return static_cast<int32_t>(offsetof(TlsServerCertificateRequest_t3690397592, ___certificateTypes_9)); }
inline ClientCertificateTypeU5BU5D_t4253920197* get_certificateTypes_9() const { return ___certificateTypes_9; }
inline ClientCertificateTypeU5BU5D_t4253920197** get_address_of_certificateTypes_9() { return &___certificateTypes_9; }
inline void set_certificateTypes_9(ClientCertificateTypeU5BU5D_t4253920197* value)
{
___certificateTypes_9 = value;
Il2CppCodeGenWriteBarrier((&___certificateTypes_9), value);
}
inline static int32_t get_offset_of_distinguisedNames_10() { return static_cast<int32_t>(offsetof(TlsServerCertificateRequest_t3690397592, ___distinguisedNames_10)); }
inline StringU5BU5D_t1281789340* get_distinguisedNames_10() const { return ___distinguisedNames_10; }
inline StringU5BU5D_t1281789340** get_address_of_distinguisedNames_10() { return &___distinguisedNames_10; }
inline void set_distinguisedNames_10(StringU5BU5D_t1281789340* value)
{
___distinguisedNames_10 = value;
Il2CppCodeGenWriteBarrier((&___distinguisedNames_10), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // TLSSERVERCERTIFICATEREQUEST_T3690397592_H
#ifndef TLSSERVERFINISHED_T3860330041_H
#define TLSSERVERFINISHED_T3860330041_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Protocol.Tls.Handshake.Client.TlsServerFinished
struct TlsServerFinished_t3860330041 : public HandshakeMessage_t3696583168
{
public:
public:
};
struct TlsServerFinished_t3860330041_StaticFields
{
public:
// System.Byte[] Mono.Security.Protocol.Tls.Handshake.Client.TlsServerFinished::Ssl3Marker
ByteU5BU5D_t4116647657* ___Ssl3Marker_9;
public:
inline static int32_t get_offset_of_Ssl3Marker_9() { return static_cast<int32_t>(offsetof(TlsServerFinished_t3860330041_StaticFields, ___Ssl3Marker_9)); }
inline ByteU5BU5D_t4116647657* get_Ssl3Marker_9() const { return ___Ssl3Marker_9; }
inline ByteU5BU5D_t4116647657** get_address_of_Ssl3Marker_9() { return &___Ssl3Marker_9; }
inline void set_Ssl3Marker_9(ByteU5BU5D_t4116647657* value)
{
___Ssl3Marker_9 = value;
Il2CppCodeGenWriteBarrier((&___Ssl3Marker_9), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // TLSSERVERFINISHED_T3860330041_H
#ifndef TLSSERVERHELLO_T3343859594_H
#define TLSSERVERHELLO_T3343859594_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Protocol.Tls.Handshake.Client.TlsServerHello
struct TlsServerHello_t3343859594 : public HandshakeMessage_t3696583168
{
public:
// Mono.Security.Protocol.Tls.SecurityCompressionType Mono.Security.Protocol.Tls.Handshake.Client.TlsServerHello::compressionMethod
int32_t ___compressionMethod_9;
// System.Byte[] Mono.Security.Protocol.Tls.Handshake.Client.TlsServerHello::random
ByteU5BU5D_t4116647657* ___random_10;
// System.Byte[] Mono.Security.Protocol.Tls.Handshake.Client.TlsServerHello::sessionId
ByteU5BU5D_t4116647657* ___sessionId_11;
// Mono.Security.Protocol.Tls.CipherSuite Mono.Security.Protocol.Tls.Handshake.Client.TlsServerHello::cipherSuite
CipherSuite_t3414744575 * ___cipherSuite_12;
public:
inline static int32_t get_offset_of_compressionMethod_9() { return static_cast<int32_t>(offsetof(TlsServerHello_t3343859594, ___compressionMethod_9)); }
inline int32_t get_compressionMethod_9() const { return ___compressionMethod_9; }
inline int32_t* get_address_of_compressionMethod_9() { return &___compressionMethod_9; }
inline void set_compressionMethod_9(int32_t value)
{
___compressionMethod_9 = value;
}
inline static int32_t get_offset_of_random_10() { return static_cast<int32_t>(offsetof(TlsServerHello_t3343859594, ___random_10)); }
inline ByteU5BU5D_t4116647657* get_random_10() const { return ___random_10; }
inline ByteU5BU5D_t4116647657** get_address_of_random_10() { return &___random_10; }
inline void set_random_10(ByteU5BU5D_t4116647657* value)
{
___random_10 = value;
Il2CppCodeGenWriteBarrier((&___random_10), value);
}
inline static int32_t get_offset_of_sessionId_11() { return static_cast<int32_t>(offsetof(TlsServerHello_t3343859594, ___sessionId_11)); }
inline ByteU5BU5D_t4116647657* get_sessionId_11() const { return ___sessionId_11; }
inline ByteU5BU5D_t4116647657** get_address_of_sessionId_11() { return &___sessionId_11; }
inline void set_sessionId_11(ByteU5BU5D_t4116647657* value)
{
___sessionId_11 = value;
Il2CppCodeGenWriteBarrier((&___sessionId_11), value);
}
inline static int32_t get_offset_of_cipherSuite_12() { return static_cast<int32_t>(offsetof(TlsServerHello_t3343859594, ___cipherSuite_12)); }
inline CipherSuite_t3414744575 * get_cipherSuite_12() const { return ___cipherSuite_12; }
inline CipherSuite_t3414744575 ** get_address_of_cipherSuite_12() { return &___cipherSuite_12; }
inline void set_cipherSuite_12(CipherSuite_t3414744575 * value)
{
___cipherSuite_12 = value;
Il2CppCodeGenWriteBarrier((&___cipherSuite_12), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // TLSSERVERHELLO_T3343859594_H
#ifndef TLSSERVERHELLODONE_T1850379324_H
#define TLSSERVERHELLODONE_T1850379324_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Protocol.Tls.Handshake.Client.TlsServerHelloDone
struct TlsServerHelloDone_t1850379324 : public HandshakeMessage_t3696583168
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // TLSSERVERHELLODONE_T1850379324_H
#ifndef TLSSERVERKEYEXCHANGE_T699469151_H
#define TLSSERVERKEYEXCHANGE_T699469151_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Protocol.Tls.Handshake.Client.TlsServerKeyExchange
struct TlsServerKeyExchange_t699469151 : public HandshakeMessage_t3696583168
{
public:
// System.Security.Cryptography.RSAParameters Mono.Security.Protocol.Tls.Handshake.Client.TlsServerKeyExchange::rsaParams
RSAParameters_t1728406613 ___rsaParams_9;
// System.Byte[] Mono.Security.Protocol.Tls.Handshake.Client.TlsServerKeyExchange::signedParams
ByteU5BU5D_t4116647657* ___signedParams_10;
public:
inline static int32_t get_offset_of_rsaParams_9() { return static_cast<int32_t>(offsetof(TlsServerKeyExchange_t699469151, ___rsaParams_9)); }
inline RSAParameters_t1728406613 get_rsaParams_9() const { return ___rsaParams_9; }
inline RSAParameters_t1728406613 * get_address_of_rsaParams_9() { return &___rsaParams_9; }
inline void set_rsaParams_9(RSAParameters_t1728406613 value)
{
___rsaParams_9 = value;
}
inline static int32_t get_offset_of_signedParams_10() { return static_cast<int32_t>(offsetof(TlsServerKeyExchange_t699469151, ___signedParams_10)); }
inline ByteU5BU5D_t4116647657* get_signedParams_10() const { return ___signedParams_10; }
inline ByteU5BU5D_t4116647657** get_address_of_signedParams_10() { return &___signedParams_10; }
inline void set_signedParams_10(ByteU5BU5D_t4116647657* value)
{
___signedParams_10 = value;
Il2CppCodeGenWriteBarrier((&___signedParams_10), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // TLSSERVERKEYEXCHANGE_T699469151_H
#ifndef HTTPSCLIENTSTREAM_T1160552561_H
#define HTTPSCLIENTSTREAM_T1160552561_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Protocol.Tls.HttpsClientStream
struct HttpsClientStream_t1160552561 : public SslClientStream_t3914624661
{
public:
// System.Net.HttpWebRequest Mono.Security.Protocol.Tls.HttpsClientStream::_request
HttpWebRequest_t1669436515 * ____request_20;
// System.Int32 Mono.Security.Protocol.Tls.HttpsClientStream::_status
int32_t ____status_21;
public:
inline static int32_t get_offset_of__request_20() { return static_cast<int32_t>(offsetof(HttpsClientStream_t1160552561, ____request_20)); }
inline HttpWebRequest_t1669436515 * get__request_20() const { return ____request_20; }
inline HttpWebRequest_t1669436515 ** get_address_of__request_20() { return &____request_20; }
inline void set__request_20(HttpWebRequest_t1669436515 * value)
{
____request_20 = value;
Il2CppCodeGenWriteBarrier((&____request_20), value);
}
inline static int32_t get_offset_of__status_21() { return static_cast<int32_t>(offsetof(HttpsClientStream_t1160552561, ____status_21)); }
inline int32_t get__status_21() const { return ____status_21; }
inline int32_t* get_address_of__status_21() { return &____status_21; }
inline void set__status_21(int32_t value)
{
____status_21 = value;
}
};
struct HttpsClientStream_t1160552561_StaticFields
{
public:
// Mono.Security.Protocol.Tls.CertificateSelectionCallback Mono.Security.Protocol.Tls.HttpsClientStream::<>f__am$cache2
CertificateSelectionCallback_t3743405224 * ___U3CU3Ef__amU24cache2_22;
// Mono.Security.Protocol.Tls.PrivateKeySelectionCallback Mono.Security.Protocol.Tls.HttpsClientStream::<>f__am$cache3
PrivateKeySelectionCallback_t3240194217 * ___U3CU3Ef__amU24cache3_23;
public:
inline static int32_t get_offset_of_U3CU3Ef__amU24cache2_22() { return static_cast<int32_t>(offsetof(HttpsClientStream_t1160552561_StaticFields, ___U3CU3Ef__amU24cache2_22)); }
inline CertificateSelectionCallback_t3743405224 * get_U3CU3Ef__amU24cache2_22() const { return ___U3CU3Ef__amU24cache2_22; }
inline CertificateSelectionCallback_t3743405224 ** get_address_of_U3CU3Ef__amU24cache2_22() { return &___U3CU3Ef__amU24cache2_22; }
inline void set_U3CU3Ef__amU24cache2_22(CertificateSelectionCallback_t3743405224 * value)
{
___U3CU3Ef__amU24cache2_22 = value;
Il2CppCodeGenWriteBarrier((&___U3CU3Ef__amU24cache2_22), value);
}
inline static int32_t get_offset_of_U3CU3Ef__amU24cache3_23() { return static_cast<int32_t>(offsetof(HttpsClientStream_t1160552561_StaticFields, ___U3CU3Ef__amU24cache3_23)); }
inline PrivateKeySelectionCallback_t3240194217 * get_U3CU3Ef__amU24cache3_23() const { return ___U3CU3Ef__amU24cache3_23; }
inline PrivateKeySelectionCallback_t3240194217 ** get_address_of_U3CU3Ef__amU24cache3_23() { return &___U3CU3Ef__amU24cache3_23; }
inline void set_U3CU3Ef__amU24cache3_23(PrivateKeySelectionCallback_t3240194217 * value)
{
___U3CU3Ef__amU24cache3_23 = value;
Il2CppCodeGenWriteBarrier((&___U3CU3Ef__amU24cache3_23), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // HTTPSCLIENTSTREAM_T1160552561_H
#ifndef PRIVATEKEYSELECTIONCALLBACK_T3240194217_H
#define PRIVATEKEYSELECTIONCALLBACK_T3240194217_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Protocol.Tls.PrivateKeySelectionCallback
struct PrivateKeySelectionCallback_t3240194217 : public MulticastDelegate_t
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // PRIVATEKEYSELECTIONCALLBACK_T3240194217_H
#ifndef SERVERCONTEXT_T3848440993_H
#define SERVERCONTEXT_T3848440993_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Protocol.Tls.ServerContext
struct ServerContext_t3848440993 : public Context_t3971234707
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // SERVERCONTEXT_T3848440993_H
#ifndef SSLCIPHERSUITE_T1981645747_H
#define SSLCIPHERSUITE_T1981645747_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Protocol.Tls.SslCipherSuite
struct SslCipherSuite_t1981645747 : public CipherSuite_t3414744575
{
public:
// System.Byte[] Mono.Security.Protocol.Tls.SslCipherSuite::pad1
ByteU5BU5D_t4116647657* ___pad1_21;
// System.Byte[] Mono.Security.Protocol.Tls.SslCipherSuite::pad2
ByteU5BU5D_t4116647657* ___pad2_22;
// System.Byte[] Mono.Security.Protocol.Tls.SslCipherSuite::header
ByteU5BU5D_t4116647657* ___header_23;
public:
inline static int32_t get_offset_of_pad1_21() { return static_cast<int32_t>(offsetof(SslCipherSuite_t1981645747, ___pad1_21)); }
inline ByteU5BU5D_t4116647657* get_pad1_21() const { return ___pad1_21; }
inline ByteU5BU5D_t4116647657** get_address_of_pad1_21() { return &___pad1_21; }
inline void set_pad1_21(ByteU5BU5D_t4116647657* value)
{
___pad1_21 = value;
Il2CppCodeGenWriteBarrier((&___pad1_21), value);
}
inline static int32_t get_offset_of_pad2_22() { return static_cast<int32_t>(offsetof(SslCipherSuite_t1981645747, ___pad2_22)); }
inline ByteU5BU5D_t4116647657* get_pad2_22() const { return ___pad2_22; }
inline ByteU5BU5D_t4116647657** get_address_of_pad2_22() { return &___pad2_22; }
inline void set_pad2_22(ByteU5BU5D_t4116647657* value)
{
___pad2_22 = value;
Il2CppCodeGenWriteBarrier((&___pad2_22), value);
}
inline static int32_t get_offset_of_header_23() { return static_cast<int32_t>(offsetof(SslCipherSuite_t1981645747, ___header_23)); }
inline ByteU5BU5D_t4116647657* get_header_23() const { return ___header_23; }
inline ByteU5BU5D_t4116647657** get_address_of_header_23() { return &___header_23; }
inline void set_header_23(ByteU5BU5D_t4116647657* value)
{
___header_23 = value;
Il2CppCodeGenWriteBarrier((&___header_23), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // SSLCIPHERSUITE_T1981645747_H
#ifndef TLSCIPHERSUITE_T1545013223_H
#define TLSCIPHERSUITE_T1545013223_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Protocol.Tls.TlsCipherSuite
struct TlsCipherSuite_t1545013223 : public CipherSuite_t3414744575
{
public:
// System.Byte[] Mono.Security.Protocol.Tls.TlsCipherSuite::header
ByteU5BU5D_t4116647657* ___header_21;
// System.Object Mono.Security.Protocol.Tls.TlsCipherSuite::headerLock
RuntimeObject * ___headerLock_22;
public:
inline static int32_t get_offset_of_header_21() { return static_cast<int32_t>(offsetof(TlsCipherSuite_t1545013223, ___header_21)); }
inline ByteU5BU5D_t4116647657* get_header_21() const { return ___header_21; }
inline ByteU5BU5D_t4116647657** get_address_of_header_21() { return &___header_21; }
inline void set_header_21(ByteU5BU5D_t4116647657* value)
{
___header_21 = value;
Il2CppCodeGenWriteBarrier((&___header_21), value);
}
inline static int32_t get_offset_of_headerLock_22() { return static_cast<int32_t>(offsetof(TlsCipherSuite_t1545013223, ___headerLock_22)); }
inline RuntimeObject * get_headerLock_22() const { return ___headerLock_22; }
inline RuntimeObject ** get_address_of_headerLock_22() { return &___headerLock_22; }
inline void set_headerLock_22(RuntimeObject * value)
{
___headerLock_22 = value;
Il2CppCodeGenWriteBarrier((&___headerLock_22), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // TLSCIPHERSUITE_T1545013223_H
#ifndef X509CERTIFICATE_T489243025_H
#define X509CERTIFICATE_T489243025_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.X509.X509Certificate
struct X509Certificate_t489243025 : public RuntimeObject
{
public:
// Mono.Security.ASN1 Mono.Security.X509.X509Certificate::decoder
ASN1_t2114160833 * ___decoder_0;
// System.Byte[] Mono.Security.X509.X509Certificate::m_encodedcert
ByteU5BU5D_t4116647657* ___m_encodedcert_1;
// System.DateTime Mono.Security.X509.X509Certificate::m_from
DateTime_t3738529785 ___m_from_2;
// System.DateTime Mono.Security.X509.X509Certificate::m_until
DateTime_t3738529785 ___m_until_3;
// Mono.Security.ASN1 Mono.Security.X509.X509Certificate::issuer
ASN1_t2114160833 * ___issuer_4;
// System.String Mono.Security.X509.X509Certificate::m_issuername
String_t* ___m_issuername_5;
// System.String Mono.Security.X509.X509Certificate::m_keyalgo
String_t* ___m_keyalgo_6;
// System.Byte[] Mono.Security.X509.X509Certificate::m_keyalgoparams
ByteU5BU5D_t4116647657* ___m_keyalgoparams_7;
// Mono.Security.ASN1 Mono.Security.X509.X509Certificate::subject
ASN1_t2114160833 * ___subject_8;
// System.String Mono.Security.X509.X509Certificate::m_subject
String_t* ___m_subject_9;
// System.Byte[] Mono.Security.X509.X509Certificate::m_publickey
ByteU5BU5D_t4116647657* ___m_publickey_10;
// System.Byte[] Mono.Security.X509.X509Certificate::signature
ByteU5BU5D_t4116647657* ___signature_11;
// System.String Mono.Security.X509.X509Certificate::m_signaturealgo
String_t* ___m_signaturealgo_12;
// System.Byte[] Mono.Security.X509.X509Certificate::m_signaturealgoparams
ByteU5BU5D_t4116647657* ___m_signaturealgoparams_13;
// System.Byte[] Mono.Security.X509.X509Certificate::certhash
ByteU5BU5D_t4116647657* ___certhash_14;
// System.Security.Cryptography.RSA Mono.Security.X509.X509Certificate::_rsa
RSA_t2385438082 * ____rsa_15;
// System.Security.Cryptography.DSA Mono.Security.X509.X509Certificate::_dsa
DSA_t2386879874 * ____dsa_16;
// System.Int32 Mono.Security.X509.X509Certificate::version
int32_t ___version_17;
// System.Byte[] Mono.Security.X509.X509Certificate::serialnumber
ByteU5BU5D_t4116647657* ___serialnumber_18;
// System.Byte[] Mono.Security.X509.X509Certificate::issuerUniqueID
ByteU5BU5D_t4116647657* ___issuerUniqueID_19;
// System.Byte[] Mono.Security.X509.X509Certificate::subjectUniqueID
ByteU5BU5D_t4116647657* ___subjectUniqueID_20;
// Mono.Security.X509.X509ExtensionCollection Mono.Security.X509.X509Certificate::extensions
X509ExtensionCollection_t609554709 * ___extensions_21;
public:
inline static int32_t get_offset_of_decoder_0() { return static_cast<int32_t>(offsetof(X509Certificate_t489243025, ___decoder_0)); }
inline ASN1_t2114160833 * get_decoder_0() const { return ___decoder_0; }
inline ASN1_t2114160833 ** get_address_of_decoder_0() { return &___decoder_0; }
inline void set_decoder_0(ASN1_t2114160833 * value)
{
___decoder_0 = value;
Il2CppCodeGenWriteBarrier((&___decoder_0), value);
}
inline static int32_t get_offset_of_m_encodedcert_1() { return static_cast<int32_t>(offsetof(X509Certificate_t489243025, ___m_encodedcert_1)); }
inline ByteU5BU5D_t4116647657* get_m_encodedcert_1() const { return ___m_encodedcert_1; }
inline ByteU5BU5D_t4116647657** get_address_of_m_encodedcert_1() { return &___m_encodedcert_1; }
inline void set_m_encodedcert_1(ByteU5BU5D_t4116647657* value)
{
___m_encodedcert_1 = value;
Il2CppCodeGenWriteBarrier((&___m_encodedcert_1), value);
}
inline static int32_t get_offset_of_m_from_2() { return static_cast<int32_t>(offsetof(X509Certificate_t489243025, ___m_from_2)); }
inline DateTime_t3738529785 get_m_from_2() const { return ___m_from_2; }
inline DateTime_t3738529785 * get_address_of_m_from_2() { return &___m_from_2; }
inline void set_m_from_2(DateTime_t3738529785 value)
{
___m_from_2 = value;
}
inline static int32_t get_offset_of_m_until_3() { return static_cast<int32_t>(offsetof(X509Certificate_t489243025, ___m_until_3)); }
inline DateTime_t3738529785 get_m_until_3() const { return ___m_until_3; }
inline DateTime_t3738529785 * get_address_of_m_until_3() { return &___m_until_3; }
inline void set_m_until_3(DateTime_t3738529785 value)
{
___m_until_3 = value;
}
inline static int32_t get_offset_of_issuer_4() { return static_cast<int32_t>(offsetof(X509Certificate_t489243025, ___issuer_4)); }
inline ASN1_t2114160833 * get_issuer_4() const { return ___issuer_4; }
inline ASN1_t2114160833 ** get_address_of_issuer_4() { return &___issuer_4; }
inline void set_issuer_4(ASN1_t2114160833 * value)
{
___issuer_4 = value;
Il2CppCodeGenWriteBarrier((&___issuer_4), value);
}
inline static int32_t get_offset_of_m_issuername_5() { return static_cast<int32_t>(offsetof(X509Certificate_t489243025, ___m_issuername_5)); }
inline String_t* get_m_issuername_5() const { return ___m_issuername_5; }
inline String_t** get_address_of_m_issuername_5() { return &___m_issuername_5; }
inline void set_m_issuername_5(String_t* value)
{
___m_issuername_5 = value;
Il2CppCodeGenWriteBarrier((&___m_issuername_5), value);
}
inline static int32_t get_offset_of_m_keyalgo_6() { return static_cast<int32_t>(offsetof(X509Certificate_t489243025, ___m_keyalgo_6)); }
inline String_t* get_m_keyalgo_6() const { return ___m_keyalgo_6; }
inline String_t** get_address_of_m_keyalgo_6() { return &___m_keyalgo_6; }
inline void set_m_keyalgo_6(String_t* value)
{
___m_keyalgo_6 = value;
Il2CppCodeGenWriteBarrier((&___m_keyalgo_6), value);
}
inline static int32_t get_offset_of_m_keyalgoparams_7() { return static_cast<int32_t>(offsetof(X509Certificate_t489243025, ___m_keyalgoparams_7)); }
inline ByteU5BU5D_t4116647657* get_m_keyalgoparams_7() const { return ___m_keyalgoparams_7; }
inline ByteU5BU5D_t4116647657** get_address_of_m_keyalgoparams_7() { return &___m_keyalgoparams_7; }
inline void set_m_keyalgoparams_7(ByteU5BU5D_t4116647657* value)
{
___m_keyalgoparams_7 = value;
Il2CppCodeGenWriteBarrier((&___m_keyalgoparams_7), value);
}
inline static int32_t get_offset_of_subject_8() { return static_cast<int32_t>(offsetof(X509Certificate_t489243025, ___subject_8)); }
inline ASN1_t2114160833 * get_subject_8() const { return ___subject_8; }
inline ASN1_t2114160833 ** get_address_of_subject_8() { return &___subject_8; }
inline void set_subject_8(ASN1_t2114160833 * value)
{
___subject_8 = value;
Il2CppCodeGenWriteBarrier((&___subject_8), value);
}
inline static int32_t get_offset_of_m_subject_9() { return static_cast<int32_t>(offsetof(X509Certificate_t489243025, ___m_subject_9)); }
inline String_t* get_m_subject_9() const { return ___m_subject_9; }
inline String_t** get_address_of_m_subject_9() { return &___m_subject_9; }
inline void set_m_subject_9(String_t* value)
{
___m_subject_9 = value;
Il2CppCodeGenWriteBarrier((&___m_subject_9), value);
}
inline static int32_t get_offset_of_m_publickey_10() { return static_cast<int32_t>(offsetof(X509Certificate_t489243025, ___m_publickey_10)); }
inline ByteU5BU5D_t4116647657* get_m_publickey_10() const { return ___m_publickey_10; }
inline ByteU5BU5D_t4116647657** get_address_of_m_publickey_10() { return &___m_publickey_10; }
inline void set_m_publickey_10(ByteU5BU5D_t4116647657* value)
{
___m_publickey_10 = value;
Il2CppCodeGenWriteBarrier((&___m_publickey_10), value);
}
inline static int32_t get_offset_of_signature_11() { return static_cast<int32_t>(offsetof(X509Certificate_t489243025, ___signature_11)); }
inline ByteU5BU5D_t4116647657* get_signature_11() const { return ___signature_11; }
inline ByteU5BU5D_t4116647657** get_address_of_signature_11() { return &___signature_11; }
inline void set_signature_11(ByteU5BU5D_t4116647657* value)
{
___signature_11 = value;
Il2CppCodeGenWriteBarrier((&___signature_11), value);
}
inline static int32_t get_offset_of_m_signaturealgo_12() { return static_cast<int32_t>(offsetof(X509Certificate_t489243025, ___m_signaturealgo_12)); }
inline String_t* get_m_signaturealgo_12() const { return ___m_signaturealgo_12; }
inline String_t** get_address_of_m_signaturealgo_12() { return &___m_signaturealgo_12; }
inline void set_m_signaturealgo_12(String_t* value)
{
___m_signaturealgo_12 = value;
Il2CppCodeGenWriteBarrier((&___m_signaturealgo_12), value);
}
inline static int32_t get_offset_of_m_signaturealgoparams_13() { return static_cast<int32_t>(offsetof(X509Certificate_t489243025, ___m_signaturealgoparams_13)); }
inline ByteU5BU5D_t4116647657* get_m_signaturealgoparams_13() const { return ___m_signaturealgoparams_13; }
inline ByteU5BU5D_t4116647657** get_address_of_m_signaturealgoparams_13() { return &___m_signaturealgoparams_13; }
inline void set_m_signaturealgoparams_13(ByteU5BU5D_t4116647657* value)
{
___m_signaturealgoparams_13 = value;
Il2CppCodeGenWriteBarrier((&___m_signaturealgoparams_13), value);
}
inline static int32_t get_offset_of_certhash_14() { return static_cast<int32_t>(offsetof(X509Certificate_t489243025, ___certhash_14)); }
inline ByteU5BU5D_t4116647657* get_certhash_14() const { return ___certhash_14; }
inline ByteU5BU5D_t4116647657** get_address_of_certhash_14() { return &___certhash_14; }
inline void set_certhash_14(ByteU5BU5D_t4116647657* value)
{
___certhash_14 = value;
Il2CppCodeGenWriteBarrier((&___certhash_14), value);
}
inline static int32_t get_offset_of__rsa_15() { return static_cast<int32_t>(offsetof(X509Certificate_t489243025, ____rsa_15)); }
inline RSA_t2385438082 * get__rsa_15() const { return ____rsa_15; }
inline RSA_t2385438082 ** get_address_of__rsa_15() { return &____rsa_15; }
inline void set__rsa_15(RSA_t2385438082 * value)
{
____rsa_15 = value;
Il2CppCodeGenWriteBarrier((&____rsa_15), value);
}
inline static int32_t get_offset_of__dsa_16() { return static_cast<int32_t>(offsetof(X509Certificate_t489243025, ____dsa_16)); }
inline DSA_t2386879874 * get__dsa_16() const { return ____dsa_16; }
inline DSA_t2386879874 ** get_address_of__dsa_16() { return &____dsa_16; }
inline void set__dsa_16(DSA_t2386879874 * value)
{
____dsa_16 = value;
Il2CppCodeGenWriteBarrier((&____dsa_16), value);
}
inline static int32_t get_offset_of_version_17() { return static_cast<int32_t>(offsetof(X509Certificate_t489243025, ___version_17)); }
inline int32_t get_version_17() const { return ___version_17; }
inline int32_t* get_address_of_version_17() { return &___version_17; }
inline void set_version_17(int32_t value)
{
___version_17 = value;
}
inline static int32_t get_offset_of_serialnumber_18() { return static_cast<int32_t>(offsetof(X509Certificate_t489243025, ___serialnumber_18)); }
inline ByteU5BU5D_t4116647657* get_serialnumber_18() const { return ___serialnumber_18; }
inline ByteU5BU5D_t4116647657** get_address_of_serialnumber_18() { return &___serialnumber_18; }
inline void set_serialnumber_18(ByteU5BU5D_t4116647657* value)
{
___serialnumber_18 = value;
Il2CppCodeGenWriteBarrier((&___serialnumber_18), value);
}
inline static int32_t get_offset_of_issuerUniqueID_19() { return static_cast<int32_t>(offsetof(X509Certificate_t489243025, ___issuerUniqueID_19)); }
inline ByteU5BU5D_t4116647657* get_issuerUniqueID_19() const { return ___issuerUniqueID_19; }
inline ByteU5BU5D_t4116647657** get_address_of_issuerUniqueID_19() { return &___issuerUniqueID_19; }
inline void set_issuerUniqueID_19(ByteU5BU5D_t4116647657* value)
{
___issuerUniqueID_19 = value;
Il2CppCodeGenWriteBarrier((&___issuerUniqueID_19), value);
}
inline static int32_t get_offset_of_subjectUniqueID_20() { return static_cast<int32_t>(offsetof(X509Certificate_t489243025, ___subjectUniqueID_20)); }
inline ByteU5BU5D_t4116647657* get_subjectUniqueID_20() const { return ___subjectUniqueID_20; }
inline ByteU5BU5D_t4116647657** get_address_of_subjectUniqueID_20() { return &___subjectUniqueID_20; }
inline void set_subjectUniqueID_20(ByteU5BU5D_t4116647657* value)
{
___subjectUniqueID_20 = value;
Il2CppCodeGenWriteBarrier((&___subjectUniqueID_20), value);
}
inline static int32_t get_offset_of_extensions_21() { return static_cast<int32_t>(offsetof(X509Certificate_t489243025, ___extensions_21)); }
inline X509ExtensionCollection_t609554709 * get_extensions_21() const { return ___extensions_21; }
inline X509ExtensionCollection_t609554709 ** get_address_of_extensions_21() { return &___extensions_21; }
inline void set_extensions_21(X509ExtensionCollection_t609554709 * value)
{
___extensions_21 = value;
Il2CppCodeGenWriteBarrier((&___extensions_21), value);
}
};
struct X509Certificate_t489243025_StaticFields
{
public:
// System.String Mono.Security.X509.X509Certificate::encoding_error
String_t* ___encoding_error_22;
// System.Collections.Generic.Dictionary`2<System.String,System.Int32> Mono.Security.X509.X509Certificate::<>f__switch$mapF
Dictionary_2_t2736202052 * ___U3CU3Ef__switchU24mapF_23;
// System.Collections.Generic.Dictionary`2<System.String,System.Int32> Mono.Security.X509.X509Certificate::<>f__switch$map10
Dictionary_2_t2736202052 * ___U3CU3Ef__switchU24map10_24;
// System.Collections.Generic.Dictionary`2<System.String,System.Int32> Mono.Security.X509.X509Certificate::<>f__switch$map11
Dictionary_2_t2736202052 * ___U3CU3Ef__switchU24map11_25;
public:
inline static int32_t get_offset_of_encoding_error_22() { return static_cast<int32_t>(offsetof(X509Certificate_t489243025_StaticFields, ___encoding_error_22)); }
inline String_t* get_encoding_error_22() const { return ___encoding_error_22; }
inline String_t** get_address_of_encoding_error_22() { return &___encoding_error_22; }
inline void set_encoding_error_22(String_t* value)
{
___encoding_error_22 = value;
Il2CppCodeGenWriteBarrier((&___encoding_error_22), value);
}
inline static int32_t get_offset_of_U3CU3Ef__switchU24mapF_23() { return static_cast<int32_t>(offsetof(X509Certificate_t489243025_StaticFields, ___U3CU3Ef__switchU24mapF_23)); }
inline Dictionary_2_t2736202052 * get_U3CU3Ef__switchU24mapF_23() const { return ___U3CU3Ef__switchU24mapF_23; }
inline Dictionary_2_t2736202052 ** get_address_of_U3CU3Ef__switchU24mapF_23() { return &___U3CU3Ef__switchU24mapF_23; }
inline void set_U3CU3Ef__switchU24mapF_23(Dictionary_2_t2736202052 * value)
{
___U3CU3Ef__switchU24mapF_23 = value;
Il2CppCodeGenWriteBarrier((&___U3CU3Ef__switchU24mapF_23), value);
}
inline static int32_t get_offset_of_U3CU3Ef__switchU24map10_24() { return static_cast<int32_t>(offsetof(X509Certificate_t489243025_StaticFields, ___U3CU3Ef__switchU24map10_24)); }
inline Dictionary_2_t2736202052 * get_U3CU3Ef__switchU24map10_24() const { return ___U3CU3Ef__switchU24map10_24; }
inline Dictionary_2_t2736202052 ** get_address_of_U3CU3Ef__switchU24map10_24() { return &___U3CU3Ef__switchU24map10_24; }
inline void set_U3CU3Ef__switchU24map10_24(Dictionary_2_t2736202052 * value)
{
___U3CU3Ef__switchU24map10_24 = value;
Il2CppCodeGenWriteBarrier((&___U3CU3Ef__switchU24map10_24), value);
}
inline static int32_t get_offset_of_U3CU3Ef__switchU24map11_25() { return static_cast<int32_t>(offsetof(X509Certificate_t489243025_StaticFields, ___U3CU3Ef__switchU24map11_25)); }
inline Dictionary_2_t2736202052 * get_U3CU3Ef__switchU24map11_25() const { return ___U3CU3Ef__switchU24map11_25; }
inline Dictionary_2_t2736202052 ** get_address_of_U3CU3Ef__switchU24map11_25() { return &___U3CU3Ef__switchU24map11_25; }
inline void set_U3CU3Ef__switchU24map11_25(Dictionary_2_t2736202052 * value)
{
___U3CU3Ef__switchU24map11_25 = value;
Il2CppCodeGenWriteBarrier((&___U3CU3Ef__switchU24map11_25), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // X509CERTIFICATE_T489243025_H
#ifndef ASYNCCALLBACK_T3962456242_H
#define ASYNCCALLBACK_T3962456242_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.AsyncCallback
struct AsyncCallback_t3962456242 : public MulticastDelegate_t
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // ASYNCCALLBACK_T3962456242_H
#ifndef HTTPWEBREQUEST_T1669436515_H
#define HTTPWEBREQUEST_T1669436515_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Net.HttpWebRequest
struct HttpWebRequest_t1669436515 : public WebRequest_t1939381076
{
public:
// System.Uri System.Net.HttpWebRequest::requestUri
Uri_t100236324 * ___requestUri_6;
// System.Uri System.Net.HttpWebRequest::actualUri
Uri_t100236324 * ___actualUri_7;
// System.Boolean System.Net.HttpWebRequest::hostChanged
bool ___hostChanged_8;
// System.Boolean System.Net.HttpWebRequest::allowAutoRedirect
bool ___allowAutoRedirect_9;
// System.Boolean System.Net.HttpWebRequest::allowBuffering
bool ___allowBuffering_10;
// System.Security.Cryptography.X509Certificates.X509CertificateCollection System.Net.HttpWebRequest::certificates
X509CertificateCollection_t3399372417 * ___certificates_11;
// System.String System.Net.HttpWebRequest::connectionGroup
String_t* ___connectionGroup_12;
// System.Int64 System.Net.HttpWebRequest::contentLength
int64_t ___contentLength_13;
// System.Net.WebHeaderCollection System.Net.HttpWebRequest::webHeaders
WebHeaderCollection_t1942268960 * ___webHeaders_14;
// System.Boolean System.Net.HttpWebRequest::keepAlive
bool ___keepAlive_15;
// System.Int32 System.Net.HttpWebRequest::maxAutoRedirect
int32_t ___maxAutoRedirect_16;
// System.String System.Net.HttpWebRequest::mediaType
String_t* ___mediaType_17;
// System.String System.Net.HttpWebRequest::method
String_t* ___method_18;
// System.String System.Net.HttpWebRequest::initialMethod
String_t* ___initialMethod_19;
// System.Boolean System.Net.HttpWebRequest::pipelined
bool ___pipelined_20;
// System.Version System.Net.HttpWebRequest::version
Version_t3456873960 * ___version_21;
// System.Net.IWebProxy System.Net.HttpWebRequest::proxy
RuntimeObject* ___proxy_22;
// System.Boolean System.Net.HttpWebRequest::sendChunked
bool ___sendChunked_23;
// System.Net.ServicePoint System.Net.HttpWebRequest::servicePoint
ServicePoint_t2786966844 * ___servicePoint_24;
// System.Int32 System.Net.HttpWebRequest::timeout
int32_t ___timeout_25;
// System.Int32 System.Net.HttpWebRequest::redirects
int32_t ___redirects_26;
// System.Object System.Net.HttpWebRequest::locker
RuntimeObject * ___locker_27;
// System.Int32 System.Net.HttpWebRequest::readWriteTimeout
int32_t ___readWriteTimeout_29;
public:
inline static int32_t get_offset_of_requestUri_6() { return static_cast<int32_t>(offsetof(HttpWebRequest_t1669436515, ___requestUri_6)); }
inline Uri_t100236324 * get_requestUri_6() const { return ___requestUri_6; }
inline Uri_t100236324 ** get_address_of_requestUri_6() { return &___requestUri_6; }
inline void set_requestUri_6(Uri_t100236324 * value)
{
___requestUri_6 = value;
Il2CppCodeGenWriteBarrier((&___requestUri_6), value);
}
inline static int32_t get_offset_of_actualUri_7() { return static_cast<int32_t>(offsetof(HttpWebRequest_t1669436515, ___actualUri_7)); }
inline Uri_t100236324 * get_actualUri_7() const { return ___actualUri_7; }
inline Uri_t100236324 ** get_address_of_actualUri_7() { return &___actualUri_7; }
inline void set_actualUri_7(Uri_t100236324 * value)
{
___actualUri_7 = value;
Il2CppCodeGenWriteBarrier((&___actualUri_7), value);
}
inline static int32_t get_offset_of_hostChanged_8() { return static_cast<int32_t>(offsetof(HttpWebRequest_t1669436515, ___hostChanged_8)); }
inline bool get_hostChanged_8() const { return ___hostChanged_8; }
inline bool* get_address_of_hostChanged_8() { return &___hostChanged_8; }
inline void set_hostChanged_8(bool value)
{
___hostChanged_8 = value;
}
inline static int32_t get_offset_of_allowAutoRedirect_9() { return static_cast<int32_t>(offsetof(HttpWebRequest_t1669436515, ___allowAutoRedirect_9)); }
inline bool get_allowAutoRedirect_9() const { return ___allowAutoRedirect_9; }
inline bool* get_address_of_allowAutoRedirect_9() { return &___allowAutoRedirect_9; }
inline void set_allowAutoRedirect_9(bool value)
{
___allowAutoRedirect_9 = value;
}
inline static int32_t get_offset_of_allowBuffering_10() { return static_cast<int32_t>(offsetof(HttpWebRequest_t1669436515, ___allowBuffering_10)); }
inline bool get_allowBuffering_10() const { return ___allowBuffering_10; }
inline bool* get_address_of_allowBuffering_10() { return &___allowBuffering_10; }
inline void set_allowBuffering_10(bool value)
{
___allowBuffering_10 = value;
}
inline static int32_t get_offset_of_certificates_11() { return static_cast<int32_t>(offsetof(HttpWebRequest_t1669436515, ___certificates_11)); }
inline X509CertificateCollection_t3399372417 * get_certificates_11() const { return ___certificates_11; }
inline X509CertificateCollection_t3399372417 ** get_address_of_certificates_11() { return &___certificates_11; }
inline void set_certificates_11(X509CertificateCollection_t3399372417 * value)
{
___certificates_11 = value;
Il2CppCodeGenWriteBarrier((&___certificates_11), value);
}
inline static int32_t get_offset_of_connectionGroup_12() { return static_cast<int32_t>(offsetof(HttpWebRequest_t1669436515, ___connectionGroup_12)); }
inline String_t* get_connectionGroup_12() const { return ___connectionGroup_12; }
inline String_t** get_address_of_connectionGroup_12() { return &___connectionGroup_12; }
inline void set_connectionGroup_12(String_t* value)
{
___connectionGroup_12 = value;
Il2CppCodeGenWriteBarrier((&___connectionGroup_12), value);
}
inline static int32_t get_offset_of_contentLength_13() { return static_cast<int32_t>(offsetof(HttpWebRequest_t1669436515, ___contentLength_13)); }
inline int64_t get_contentLength_13() const { return ___contentLength_13; }
inline int64_t* get_address_of_contentLength_13() { return &___contentLength_13; }
inline void set_contentLength_13(int64_t value)
{
___contentLength_13 = value;
}
inline static int32_t get_offset_of_webHeaders_14() { return static_cast<int32_t>(offsetof(HttpWebRequest_t1669436515, ___webHeaders_14)); }
inline WebHeaderCollection_t1942268960 * get_webHeaders_14() const { return ___webHeaders_14; }
inline WebHeaderCollection_t1942268960 ** get_address_of_webHeaders_14() { return &___webHeaders_14; }
inline void set_webHeaders_14(WebHeaderCollection_t1942268960 * value)
{
___webHeaders_14 = value;
Il2CppCodeGenWriteBarrier((&___webHeaders_14), value);
}
inline static int32_t get_offset_of_keepAlive_15() { return static_cast<int32_t>(offsetof(HttpWebRequest_t1669436515, ___keepAlive_15)); }
inline bool get_keepAlive_15() const { return ___keepAlive_15; }
inline bool* get_address_of_keepAlive_15() { return &___keepAlive_15; }
inline void set_keepAlive_15(bool value)
{
___keepAlive_15 = value;
}
inline static int32_t get_offset_of_maxAutoRedirect_16() { return static_cast<int32_t>(offsetof(HttpWebRequest_t1669436515, ___maxAutoRedirect_16)); }
inline int32_t get_maxAutoRedirect_16() const { return ___maxAutoRedirect_16; }
inline int32_t* get_address_of_maxAutoRedirect_16() { return &___maxAutoRedirect_16; }
inline void set_maxAutoRedirect_16(int32_t value)
{
___maxAutoRedirect_16 = value;
}
inline static int32_t get_offset_of_mediaType_17() { return static_cast<int32_t>(offsetof(HttpWebRequest_t1669436515, ___mediaType_17)); }
inline String_t* get_mediaType_17() const { return ___mediaType_17; }
inline String_t** get_address_of_mediaType_17() { return &___mediaType_17; }
inline void set_mediaType_17(String_t* value)
{
___mediaType_17 = value;
Il2CppCodeGenWriteBarrier((&___mediaType_17), value);
}
inline static int32_t get_offset_of_method_18() { return static_cast<int32_t>(offsetof(HttpWebRequest_t1669436515, ___method_18)); }
inline String_t* get_method_18() const { return ___method_18; }
inline String_t** get_address_of_method_18() { return &___method_18; }
inline void set_method_18(String_t* value)
{
___method_18 = value;
Il2CppCodeGenWriteBarrier((&___method_18), value);
}
inline static int32_t get_offset_of_initialMethod_19() { return static_cast<int32_t>(offsetof(HttpWebRequest_t1669436515, ___initialMethod_19)); }
inline String_t* get_initialMethod_19() const { return ___initialMethod_19; }
inline String_t** get_address_of_initialMethod_19() { return &___initialMethod_19; }
inline void set_initialMethod_19(String_t* value)
{
___initialMethod_19 = value;
Il2CppCodeGenWriteBarrier((&___initialMethod_19), value);
}
inline static int32_t get_offset_of_pipelined_20() { return static_cast<int32_t>(offsetof(HttpWebRequest_t1669436515, ___pipelined_20)); }
inline bool get_pipelined_20() const { return ___pipelined_20; }
inline bool* get_address_of_pipelined_20() { return &___pipelined_20; }
inline void set_pipelined_20(bool value)
{
___pipelined_20 = value;
}
inline static int32_t get_offset_of_version_21() { return static_cast<int32_t>(offsetof(HttpWebRequest_t1669436515, ___version_21)); }
inline Version_t3456873960 * get_version_21() const { return ___version_21; }
inline Version_t3456873960 ** get_address_of_version_21() { return &___version_21; }
inline void set_version_21(Version_t3456873960 * value)
{
___version_21 = value;
Il2CppCodeGenWriteBarrier((&___version_21), value);
}
inline static int32_t get_offset_of_proxy_22() { return static_cast<int32_t>(offsetof(HttpWebRequest_t1669436515, ___proxy_22)); }
inline RuntimeObject* get_proxy_22() const { return ___proxy_22; }
inline RuntimeObject** get_address_of_proxy_22() { return &___proxy_22; }
inline void set_proxy_22(RuntimeObject* value)
{
___proxy_22 = value;
Il2CppCodeGenWriteBarrier((&___proxy_22), value);
}
inline static int32_t get_offset_of_sendChunked_23() { return static_cast<int32_t>(offsetof(HttpWebRequest_t1669436515, ___sendChunked_23)); }
inline bool get_sendChunked_23() const { return ___sendChunked_23; }
inline bool* get_address_of_sendChunked_23() { return &___sendChunked_23; }
inline void set_sendChunked_23(bool value)
{
___sendChunked_23 = value;
}
inline static int32_t get_offset_of_servicePoint_24() { return static_cast<int32_t>(offsetof(HttpWebRequest_t1669436515, ___servicePoint_24)); }
inline ServicePoint_t2786966844 * get_servicePoint_24() const { return ___servicePoint_24; }
inline ServicePoint_t2786966844 ** get_address_of_servicePoint_24() { return &___servicePoint_24; }
inline void set_servicePoint_24(ServicePoint_t2786966844 * value)
{
___servicePoint_24 = value;
Il2CppCodeGenWriteBarrier((&___servicePoint_24), value);
}
inline static int32_t get_offset_of_timeout_25() { return static_cast<int32_t>(offsetof(HttpWebRequest_t1669436515, ___timeout_25)); }
inline int32_t get_timeout_25() const { return ___timeout_25; }
inline int32_t* get_address_of_timeout_25() { return &___timeout_25; }
inline void set_timeout_25(int32_t value)
{
___timeout_25 = value;
}
inline static int32_t get_offset_of_redirects_26() { return static_cast<int32_t>(offsetof(HttpWebRequest_t1669436515, ___redirects_26)); }
inline int32_t get_redirects_26() const { return ___redirects_26; }
inline int32_t* get_address_of_redirects_26() { return &___redirects_26; }
inline void set_redirects_26(int32_t value)
{
___redirects_26 = value;
}
inline static int32_t get_offset_of_locker_27() { return static_cast<int32_t>(offsetof(HttpWebRequest_t1669436515, ___locker_27)); }
inline RuntimeObject * get_locker_27() const { return ___locker_27; }
inline RuntimeObject ** get_address_of_locker_27() { return &___locker_27; }
inline void set_locker_27(RuntimeObject * value)
{
___locker_27 = value;
Il2CppCodeGenWriteBarrier((&___locker_27), value);
}
inline static int32_t get_offset_of_readWriteTimeout_29() { return static_cast<int32_t>(offsetof(HttpWebRequest_t1669436515, ___readWriteTimeout_29)); }
inline int32_t get_readWriteTimeout_29() const { return ___readWriteTimeout_29; }
inline int32_t* get_address_of_readWriteTimeout_29() { return &___readWriteTimeout_29; }
inline void set_readWriteTimeout_29(int32_t value)
{
___readWriteTimeout_29 = value;
}
};
struct HttpWebRequest_t1669436515_StaticFields
{
public:
// System.Int32 System.Net.HttpWebRequest::defaultMaxResponseHeadersLength
int32_t ___defaultMaxResponseHeadersLength_28;
public:
inline static int32_t get_offset_of_defaultMaxResponseHeadersLength_28() { return static_cast<int32_t>(offsetof(HttpWebRequest_t1669436515_StaticFields, ___defaultMaxResponseHeadersLength_28)); }
inline int32_t get_defaultMaxResponseHeadersLength_28() const { return ___defaultMaxResponseHeadersLength_28; }
inline int32_t* get_address_of_defaultMaxResponseHeadersLength_28() { return &___defaultMaxResponseHeadersLength_28; }
inline void set_defaultMaxResponseHeadersLength_28(int32_t value)
{
___defaultMaxResponseHeadersLength_28 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // HTTPWEBREQUEST_T1669436515_H
#ifndef REMOTECERTIFICATEVALIDATIONCALLBACK_T3014364904_H
#define REMOTECERTIFICATEVALIDATIONCALLBACK_T3014364904_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Net.Security.RemoteCertificateValidationCallback
struct RemoteCertificateValidationCallback_t3014364904 : public MulticastDelegate_t
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // REMOTECERTIFICATEVALIDATIONCALLBACK_T3014364904_H
#ifndef SERVICEPOINT_T2786966844_H
#define SERVICEPOINT_T2786966844_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Net.ServicePoint
struct ServicePoint_t2786966844 : public RuntimeObject
{
public:
// System.Uri System.Net.ServicePoint::uri
Uri_t100236324 * ___uri_0;
// System.Int32 System.Net.ServicePoint::connectionLimit
int32_t ___connectionLimit_1;
// System.Int32 System.Net.ServicePoint::maxIdleTime
int32_t ___maxIdleTime_2;
// System.Int32 System.Net.ServicePoint::currentConnections
int32_t ___currentConnections_3;
// System.DateTime System.Net.ServicePoint::idleSince
DateTime_t3738529785 ___idleSince_4;
// System.Boolean System.Net.ServicePoint::usesProxy
bool ___usesProxy_5;
// System.Boolean System.Net.ServicePoint::sendContinue
bool ___sendContinue_6;
// System.Boolean System.Net.ServicePoint::useConnect
bool ___useConnect_7;
// System.Object System.Net.ServicePoint::locker
RuntimeObject * ___locker_8;
// System.Object System.Net.ServicePoint::hostE
RuntimeObject * ___hostE_9;
// System.Boolean System.Net.ServicePoint::useNagle
bool ___useNagle_10;
public:
inline static int32_t get_offset_of_uri_0() { return static_cast<int32_t>(offsetof(ServicePoint_t2786966844, ___uri_0)); }
inline Uri_t100236324 * get_uri_0() const { return ___uri_0; }
inline Uri_t100236324 ** get_address_of_uri_0() { return &___uri_0; }
inline void set_uri_0(Uri_t100236324 * value)
{
___uri_0 = value;
Il2CppCodeGenWriteBarrier((&___uri_0), value);
}
inline static int32_t get_offset_of_connectionLimit_1() { return static_cast<int32_t>(offsetof(ServicePoint_t2786966844, ___connectionLimit_1)); }
inline int32_t get_connectionLimit_1() const { return ___connectionLimit_1; }
inline int32_t* get_address_of_connectionLimit_1() { return &___connectionLimit_1; }
inline void set_connectionLimit_1(int32_t value)
{
___connectionLimit_1 = value;
}
inline static int32_t get_offset_of_maxIdleTime_2() { return static_cast<int32_t>(offsetof(ServicePoint_t2786966844, ___maxIdleTime_2)); }
inline int32_t get_maxIdleTime_2() const { return ___maxIdleTime_2; }
inline int32_t* get_address_of_maxIdleTime_2() { return &___maxIdleTime_2; }
inline void set_maxIdleTime_2(int32_t value)
{
___maxIdleTime_2 = value;
}
inline static int32_t get_offset_of_currentConnections_3() { return static_cast<int32_t>(offsetof(ServicePoint_t2786966844, ___currentConnections_3)); }
inline int32_t get_currentConnections_3() const { return ___currentConnections_3; }
inline int32_t* get_address_of_currentConnections_3() { return &___currentConnections_3; }
inline void set_currentConnections_3(int32_t value)
{
___currentConnections_3 = value;
}
inline static int32_t get_offset_of_idleSince_4() { return static_cast<int32_t>(offsetof(ServicePoint_t2786966844, ___idleSince_4)); }
inline DateTime_t3738529785 get_idleSince_4() const { return ___idleSince_4; }
inline DateTime_t3738529785 * get_address_of_idleSince_4() { return &___idleSince_4; }
inline void set_idleSince_4(DateTime_t3738529785 value)
{
___idleSince_4 = value;
}
inline static int32_t get_offset_of_usesProxy_5() { return static_cast<int32_t>(offsetof(ServicePoint_t2786966844, ___usesProxy_5)); }
inline bool get_usesProxy_5() const { return ___usesProxy_5; }
inline bool* get_address_of_usesProxy_5() { return &___usesProxy_5; }
inline void set_usesProxy_5(bool value)
{
___usesProxy_5 = value;
}
inline static int32_t get_offset_of_sendContinue_6() { return static_cast<int32_t>(offsetof(ServicePoint_t2786966844, ___sendContinue_6)); }
inline bool get_sendContinue_6() const { return ___sendContinue_6; }
inline bool* get_address_of_sendContinue_6() { return &___sendContinue_6; }
inline void set_sendContinue_6(bool value)
{
___sendContinue_6 = value;
}
inline static int32_t get_offset_of_useConnect_7() { return static_cast<int32_t>(offsetof(ServicePoint_t2786966844, ___useConnect_7)); }
inline bool get_useConnect_7() const { return ___useConnect_7; }
inline bool* get_address_of_useConnect_7() { return &___useConnect_7; }
inline void set_useConnect_7(bool value)
{
___useConnect_7 = value;
}
inline static int32_t get_offset_of_locker_8() { return static_cast<int32_t>(offsetof(ServicePoint_t2786966844, ___locker_8)); }
inline RuntimeObject * get_locker_8() const { return ___locker_8; }
inline RuntimeObject ** get_address_of_locker_8() { return &___locker_8; }
inline void set_locker_8(RuntimeObject * value)
{
___locker_8 = value;
Il2CppCodeGenWriteBarrier((&___locker_8), value);
}
inline static int32_t get_offset_of_hostE_9() { return static_cast<int32_t>(offsetof(ServicePoint_t2786966844, ___hostE_9)); }
inline RuntimeObject * get_hostE_9() const { return ___hostE_9; }
inline RuntimeObject ** get_address_of_hostE_9() { return &___hostE_9; }
inline void set_hostE_9(RuntimeObject * value)
{
___hostE_9 = value;
Il2CppCodeGenWriteBarrier((&___hostE_9), value);
}
inline static int32_t get_offset_of_useNagle_10() { return static_cast<int32_t>(offsetof(ServicePoint_t2786966844, ___useNagle_10)); }
inline bool get_useNagle_10() const { return ___useNagle_10; }
inline bool* get_address_of_useNagle_10() { return &___useNagle_10; }
inline void set_useNagle_10(bool value)
{
___useNagle_10 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // SERVICEPOINT_T2786966844_H
#ifndef DES_T821106792_H
#define DES_T821106792_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Security.Cryptography.DES
struct DES_t821106792 : public SymmetricAlgorithm_t4254223087
{
public:
public:
};
struct DES_t821106792_StaticFields
{
public:
// System.Byte[,] System.Security.Cryptography.DES::weakKeys
ByteU5BU2CU5D_t4116647658* ___weakKeys_10;
// System.Byte[,] System.Security.Cryptography.DES::semiWeakKeys
ByteU5BU2CU5D_t4116647658* ___semiWeakKeys_11;
public:
inline static int32_t get_offset_of_weakKeys_10() { return static_cast<int32_t>(offsetof(DES_t821106792_StaticFields, ___weakKeys_10)); }
inline ByteU5BU2CU5D_t4116647658* get_weakKeys_10() const { return ___weakKeys_10; }
inline ByteU5BU2CU5D_t4116647658** get_address_of_weakKeys_10() { return &___weakKeys_10; }
inline void set_weakKeys_10(ByteU5BU2CU5D_t4116647658* value)
{
___weakKeys_10 = value;
Il2CppCodeGenWriteBarrier((&___weakKeys_10), value);
}
inline static int32_t get_offset_of_semiWeakKeys_11() { return static_cast<int32_t>(offsetof(DES_t821106792_StaticFields, ___semiWeakKeys_11)); }
inline ByteU5BU2CU5D_t4116647658* get_semiWeakKeys_11() const { return ___semiWeakKeys_11; }
inline ByteU5BU2CU5D_t4116647658** get_address_of_semiWeakKeys_11() { return &___semiWeakKeys_11; }
inline void set_semiWeakKeys_11(ByteU5BU2CU5D_t4116647658* value)
{
___semiWeakKeys_11 = value;
Il2CppCodeGenWriteBarrier((&___semiWeakKeys_11), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // DES_T821106792_H
#ifndef RC2_T3167825714_H
#define RC2_T3167825714_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Security.Cryptography.RC2
struct RC2_t3167825714 : public SymmetricAlgorithm_t4254223087
{
public:
// System.Int32 System.Security.Cryptography.RC2::EffectiveKeySizeValue
int32_t ___EffectiveKeySizeValue_10;
public:
inline static int32_t get_offset_of_EffectiveKeySizeValue_10() { return static_cast<int32_t>(offsetof(RC2_t3167825714, ___EffectiveKeySizeValue_10)); }
inline int32_t get_EffectiveKeySizeValue_10() const { return ___EffectiveKeySizeValue_10; }
inline int32_t* get_address_of_EffectiveKeySizeValue_10() { return &___EffectiveKeySizeValue_10; }
inline void set_EffectiveKeySizeValue_10(int32_t value)
{
___EffectiveKeySizeValue_10 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // RC2_T3167825714_H
#ifndef RIJNDAEL_T2986313634_H
#define RIJNDAEL_T2986313634_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Security.Cryptography.Rijndael
struct Rijndael_t2986313634 : public SymmetricAlgorithm_t4254223087
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // RIJNDAEL_T2986313634_H
#ifndef TRIPLEDES_T92303514_H
#define TRIPLEDES_T92303514_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Security.Cryptography.TripleDES
struct TripleDES_t92303514 : public SymmetricAlgorithm_t4254223087
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // TRIPLEDES_T92303514_H
#ifndef MANUALRESETEVENT_T451242010_H
#define MANUALRESETEVENT_T451242010_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Threading.ManualResetEvent
struct ManualResetEvent_t451242010 : public EventWaitHandle_t777845177
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // MANUALRESETEVENT_T451242010_H
#ifndef ARC4MANAGED_T2641858452_H
#define ARC4MANAGED_T2641858452_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Cryptography.ARC4Managed
struct ARC4Managed_t2641858452 : public RC4_t2752556436
{
public:
// System.Byte[] Mono.Security.Cryptography.ARC4Managed::key
ByteU5BU5D_t4116647657* ___key_12;
// System.Byte[] Mono.Security.Cryptography.ARC4Managed::state
ByteU5BU5D_t4116647657* ___state_13;
// System.Byte Mono.Security.Cryptography.ARC4Managed::x
uint8_t ___x_14;
// System.Byte Mono.Security.Cryptography.ARC4Managed::y
uint8_t ___y_15;
// System.Boolean Mono.Security.Cryptography.ARC4Managed::m_disposed
bool ___m_disposed_16;
public:
inline static int32_t get_offset_of_key_12() { return static_cast<int32_t>(offsetof(ARC4Managed_t2641858452, ___key_12)); }
inline ByteU5BU5D_t4116647657* get_key_12() const { return ___key_12; }
inline ByteU5BU5D_t4116647657** get_address_of_key_12() { return &___key_12; }
inline void set_key_12(ByteU5BU5D_t4116647657* value)
{
___key_12 = value;
Il2CppCodeGenWriteBarrier((&___key_12), value);
}
inline static int32_t get_offset_of_state_13() { return static_cast<int32_t>(offsetof(ARC4Managed_t2641858452, ___state_13)); }
inline ByteU5BU5D_t4116647657* get_state_13() const { return ___state_13; }
inline ByteU5BU5D_t4116647657** get_address_of_state_13() { return &___state_13; }
inline void set_state_13(ByteU5BU5D_t4116647657* value)
{
___state_13 = value;
Il2CppCodeGenWriteBarrier((&___state_13), value);
}
inline static int32_t get_offset_of_x_14() { return static_cast<int32_t>(offsetof(ARC4Managed_t2641858452, ___x_14)); }
inline uint8_t get_x_14() const { return ___x_14; }
inline uint8_t* get_address_of_x_14() { return &___x_14; }
inline void set_x_14(uint8_t value)
{
___x_14 = value;
}
inline static int32_t get_offset_of_y_15() { return static_cast<int32_t>(offsetof(ARC4Managed_t2641858452, ___y_15)); }
inline uint8_t get_y_15() const { return ___y_15; }
inline uint8_t* get_address_of_y_15() { return &___y_15; }
inline void set_y_15(uint8_t value)
{
___y_15 = value;
}
inline static int32_t get_offset_of_m_disposed_16() { return static_cast<int32_t>(offsetof(ARC4Managed_t2641858452, ___m_disposed_16)); }
inline bool get_m_disposed_16() const { return ___m_disposed_16; }
inline bool* get_address_of_m_disposed_16() { return &___m_disposed_16; }
inline void set_m_disposed_16(bool value)
{
___m_disposed_16 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // ARC4MANAGED_T2641858452_H
// System.UInt32[]
struct UInt32U5BU5D_t2770800703 : public RuntimeArray
{
public:
ALIGN_FIELD (8) uint32_t m_Items[1];
public:
inline uint32_t GetAt(il2cpp_array_size_t index) const
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
return m_Items[index];
}
inline uint32_t* GetAddressAt(il2cpp_array_size_t index)
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
return m_Items + index;
}
inline void SetAt(il2cpp_array_size_t index, uint32_t value)
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
m_Items[index] = value;
}
inline uint32_t GetAtUnchecked(il2cpp_array_size_t index) const
{
return m_Items[index];
}
inline uint32_t* GetAddressAtUnchecked(il2cpp_array_size_t index)
{
return m_Items + index;
}
inline void SetAtUnchecked(il2cpp_array_size_t index, uint32_t value)
{
m_Items[index] = value;
}
};
// System.Byte[]
struct ByteU5BU5D_t4116647657 : public RuntimeArray
{
public:
ALIGN_FIELD (8) uint8_t m_Items[1];
public:
inline uint8_t GetAt(il2cpp_array_size_t index) const
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
return m_Items[index];
}
inline uint8_t* GetAddressAt(il2cpp_array_size_t index)
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
return m_Items + index;
}
inline void SetAt(il2cpp_array_size_t index, uint8_t value)
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
m_Items[index] = value;
}
inline uint8_t GetAtUnchecked(il2cpp_array_size_t index) const
{
return m_Items[index];
}
inline uint8_t* GetAddressAtUnchecked(il2cpp_array_size_t index)
{
return m_Items + index;
}
inline void SetAtUnchecked(il2cpp_array_size_t index, uint8_t value)
{
m_Items[index] = value;
}
};
// Mono.Math.BigInteger[]
struct BigIntegerU5BU5D_t2349952477 : public RuntimeArray
{
public:
ALIGN_FIELD (8) BigInteger_t2902905090 * m_Items[1];
public:
inline BigInteger_t2902905090 * GetAt(il2cpp_array_size_t index) const
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
return m_Items[index];
}
inline BigInteger_t2902905090 ** GetAddressAt(il2cpp_array_size_t index)
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
return m_Items + index;
}
inline void SetAt(il2cpp_array_size_t index, BigInteger_t2902905090 * value)
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
m_Items[index] = value;
Il2CppCodeGenWriteBarrier(m_Items + index, value);
}
inline BigInteger_t2902905090 * GetAtUnchecked(il2cpp_array_size_t index) const
{
return m_Items[index];
}
inline BigInteger_t2902905090 ** GetAddressAtUnchecked(il2cpp_array_size_t index)
{
return m_Items + index;
}
inline void SetAtUnchecked(il2cpp_array_size_t index, BigInteger_t2902905090 * value)
{
m_Items[index] = value;
Il2CppCodeGenWriteBarrier(m_Items + index, value);
}
};
// System.Object[]
struct ObjectU5BU5D_t2843939325 : public RuntimeArray
{
public:
ALIGN_FIELD (8) RuntimeObject * m_Items[1];
public:
inline RuntimeObject * GetAt(il2cpp_array_size_t index) const
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
return m_Items[index];
}
inline RuntimeObject ** GetAddressAt(il2cpp_array_size_t index)
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
return m_Items + index;
}
inline void SetAt(il2cpp_array_size_t index, RuntimeObject * value)
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
m_Items[index] = value;
Il2CppCodeGenWriteBarrier(m_Items + index, value);
}
inline RuntimeObject * GetAtUnchecked(il2cpp_array_size_t index) const
{
return m_Items[index];
}
inline RuntimeObject ** GetAddressAtUnchecked(il2cpp_array_size_t index)
{
return m_Items + index;
}
inline void SetAtUnchecked(il2cpp_array_size_t index, RuntimeObject * value)
{
m_Items[index] = value;
Il2CppCodeGenWriteBarrier(m_Items + index, value);
}
};
// System.Security.Cryptography.KeySizes[]
struct KeySizesU5BU5D_t722666473 : public RuntimeArray
{
public:
ALIGN_FIELD (8) KeySizes_t85027896 * m_Items[1];
public:
inline KeySizes_t85027896 * GetAt(il2cpp_array_size_t index) const
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
return m_Items[index];
}
inline KeySizes_t85027896 ** GetAddressAt(il2cpp_array_size_t index)
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
return m_Items + index;
}
inline void SetAt(il2cpp_array_size_t index, KeySizes_t85027896 * value)
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
m_Items[index] = value;
Il2CppCodeGenWriteBarrier(m_Items + index, value);
}
inline KeySizes_t85027896 * GetAtUnchecked(il2cpp_array_size_t index) const
{
return m_Items[index];
}
inline KeySizes_t85027896 ** GetAddressAtUnchecked(il2cpp_array_size_t index)
{
return m_Items + index;
}
inline void SetAtUnchecked(il2cpp_array_size_t index, KeySizes_t85027896 * value)
{
m_Items[index] = value;
Il2CppCodeGenWriteBarrier(m_Items + index, value);
}
};
// System.Int32[]
struct Int32U5BU5D_t385246372 : public RuntimeArray
{
public:
ALIGN_FIELD (8) int32_t m_Items[1];
public:
inline int32_t GetAt(il2cpp_array_size_t index) const
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
return m_Items[index];
}
inline int32_t* GetAddressAt(il2cpp_array_size_t index)
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
return m_Items + index;
}
inline void SetAt(il2cpp_array_size_t index, int32_t value)
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
m_Items[index] = value;
}
inline int32_t GetAtUnchecked(il2cpp_array_size_t index) const
{
return m_Items[index];
}
inline int32_t* GetAddressAtUnchecked(il2cpp_array_size_t index)
{
return m_Items + index;
}
inline void SetAtUnchecked(il2cpp_array_size_t index, int32_t value)
{
m_Items[index] = value;
}
};
// System.Byte[][]
struct ByteU5BU5DU5BU5D_t457913172 : public RuntimeArray
{
public:
ALIGN_FIELD (8) ByteU5BU5D_t4116647657* m_Items[1];
public:
inline ByteU5BU5D_t4116647657* GetAt(il2cpp_array_size_t index) const
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
return m_Items[index];
}
inline ByteU5BU5D_t4116647657** GetAddressAt(il2cpp_array_size_t index)
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
return m_Items + index;
}
inline void SetAt(il2cpp_array_size_t index, ByteU5BU5D_t4116647657* value)
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
m_Items[index] = value;
Il2CppCodeGenWriteBarrier(m_Items + index, value);
}
inline ByteU5BU5D_t4116647657* GetAtUnchecked(il2cpp_array_size_t index) const
{
return m_Items[index];
}
inline ByteU5BU5D_t4116647657** GetAddressAtUnchecked(il2cpp_array_size_t index)
{
return m_Items + index;
}
inline void SetAtUnchecked(il2cpp_array_size_t index, ByteU5BU5D_t4116647657* value)
{
m_Items[index] = value;
Il2CppCodeGenWriteBarrier(m_Items + index, value);
}
};
// System.String[]
struct StringU5BU5D_t1281789340 : public RuntimeArray
{
public:
ALIGN_FIELD (8) String_t* m_Items[1];
public:
inline String_t* GetAt(il2cpp_array_size_t index) const
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
return m_Items[index];
}
inline String_t** GetAddressAt(il2cpp_array_size_t index)
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
return m_Items + index;
}
inline void SetAt(il2cpp_array_size_t index, String_t* value)
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
m_Items[index] = value;
Il2CppCodeGenWriteBarrier(m_Items + index, value);
}
inline String_t* GetAtUnchecked(il2cpp_array_size_t index) const
{
return m_Items[index];
}
inline String_t** GetAddressAtUnchecked(il2cpp_array_size_t index)
{
return m_Items + index;
}
inline void SetAtUnchecked(il2cpp_array_size_t index, String_t* value)
{
m_Items[index] = value;
Il2CppCodeGenWriteBarrier(m_Items + index, value);
}
};
// Mono.Security.Protocol.Tls.Handshake.ClientCertificateType[]
struct ClientCertificateTypeU5BU5D_t4253920197 : public RuntimeArray
{
public:
ALIGN_FIELD (8) int32_t m_Items[1];
public:
inline int32_t GetAt(il2cpp_array_size_t index) const
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
return m_Items[index];
}
inline int32_t* GetAddressAt(il2cpp_array_size_t index)
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
return m_Items + index;
}
inline void SetAt(il2cpp_array_size_t index, int32_t value)
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
m_Items[index] = value;
}
inline int32_t GetAtUnchecked(il2cpp_array_size_t index) const
{
return m_Items[index];
}
inline int32_t* GetAddressAtUnchecked(il2cpp_array_size_t index)
{
return m_Items + index;
}
inline void SetAtUnchecked(il2cpp_array_size_t index, int32_t value)
{
m_Items[index] = value;
}
};
// System.Security.Cryptography.X509Certificates.X509Certificate[]
struct X509CertificateU5BU5D_t3145106755 : public RuntimeArray
{
public:
ALIGN_FIELD (8) X509Certificate_t713131622 * m_Items[1];
public:
inline X509Certificate_t713131622 * GetAt(il2cpp_array_size_t index) const
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
return m_Items[index];
}
inline X509Certificate_t713131622 ** GetAddressAt(il2cpp_array_size_t index)
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
return m_Items + index;
}
inline void SetAt(il2cpp_array_size_t index, X509Certificate_t713131622 * value)
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
m_Items[index] = value;
Il2CppCodeGenWriteBarrier(m_Items + index, value);
}
inline X509Certificate_t713131622 * GetAtUnchecked(il2cpp_array_size_t index) const
{
return m_Items[index];
}
inline X509Certificate_t713131622 ** GetAddressAtUnchecked(il2cpp_array_size_t index)
{
return m_Items + index;
}
inline void SetAtUnchecked(il2cpp_array_size_t index, X509Certificate_t713131622 * value)
{
m_Items[index] = value;
Il2CppCodeGenWriteBarrier(m_Items + index, value);
}
};
// System.Void System.Collections.Generic.Dictionary`2<System.Object,System.Int32>::.ctor(System.Int32)
extern "C" IL2CPP_METHOD_ATTR void Dictionary_2__ctor_m182537451_gshared (Dictionary_2_t3384741 * __this, int32_t p0, const RuntimeMethod* method);
// System.Void System.Collections.Generic.Dictionary`2<System.Object,System.Int32>::Add(!0,!1)
extern "C" IL2CPP_METHOD_ATTR void Dictionary_2_Add_m1279427033_gshared (Dictionary_2_t3384741 * __this, RuntimeObject * p0, int32_t p1, const RuntimeMethod* method);
// System.Boolean System.Collections.Generic.Dictionary`2<System.Object,System.Int32>::TryGetValue(!0,!1&)
extern "C" IL2CPP_METHOD_ATTR bool Dictionary_2_TryGetValue_m3959998165_gshared (Dictionary_2_t3384741 * __this, RuntimeObject * p0, int32_t* p1, const RuntimeMethod* method);
// System.Void System.Object::.ctor()
extern "C" IL2CPP_METHOD_ATTR void Object__ctor_m297566312 (RuntimeObject * __this, const RuntimeMethod* method);
// System.Object System.Array::Clone()
extern "C" IL2CPP_METHOD_ATTR RuntimeObject * Array_Clone_m2672907798 (RuntimeArray * __this, const RuntimeMethod* method);
// System.Void Mono.Math.BigInteger::Normalize()
extern "C" IL2CPP_METHOD_ATTR void BigInteger_Normalize_m3021106862 (BigInteger_t2902905090 * __this, const RuntimeMethod* method);
// System.Void System.Runtime.CompilerServices.RuntimeHelpers::InitializeArray(System.Array,System.RuntimeFieldHandle)
extern "C" IL2CPP_METHOD_ATTR void RuntimeHelpers_InitializeArray_m3117905507 (RuntimeObject * __this /* static, unused */, RuntimeArray * p0, RuntimeFieldHandle_t1871169219 p1, const RuntimeMethod* method);
// System.Security.Cryptography.RandomNumberGenerator System.Security.Cryptography.RandomNumberGenerator::Create()
extern "C" IL2CPP_METHOD_ATTR RandomNumberGenerator_t386037858 * RandomNumberGenerator_Create_m4162970280 (RuntimeObject * __this /* static, unused */, const RuntimeMethod* method);
// System.Void Mono.Math.BigInteger::.ctor(Mono.Math.BigInteger/Sign,System.UInt32)
extern "C" IL2CPP_METHOD_ATTR void BigInteger__ctor_m3473491062 (BigInteger_t2902905090 * __this, int32_t ___sign0, uint32_t ___len1, const RuntimeMethod* method);
// System.Void System.Buffer::BlockCopy(System.Array,System.Int32,System.Array,System.Int32,System.Int32)
extern "C" IL2CPP_METHOD_ATTR void Buffer_BlockCopy_m2884209081 (RuntimeObject * __this /* static, unused */, RuntimeArray * p0, int32_t p1, RuntimeArray * p2, int32_t p3, int32_t p4, const RuntimeMethod* method);
// System.Security.Cryptography.RandomNumberGenerator Mono.Math.BigInteger::get_Rng()
extern "C" IL2CPP_METHOD_ATTR RandomNumberGenerator_t386037858 * BigInteger_get_Rng_m3283260184 (RuntimeObject * __this /* static, unused */, const RuntimeMethod* method);
// Mono.Math.BigInteger Mono.Math.BigInteger::GenerateRandom(System.Int32,System.Security.Cryptography.RandomNumberGenerator)
extern "C" IL2CPP_METHOD_ATTR BigInteger_t2902905090 * BigInteger_GenerateRandom_m3872771375 (RuntimeObject * __this /* static, unused */, int32_t ___bits0, RandomNumberGenerator_t386037858 * ___rng1, const RuntimeMethod* method);
// System.Void System.IndexOutOfRangeException::.ctor(System.String)
extern "C" IL2CPP_METHOD_ATTR void IndexOutOfRangeException__ctor_m3408750441 (IndexOutOfRangeException_t1578797820 * __this, String_t* p0, const RuntimeMethod* method);
// System.Void Mono.Math.BigInteger::SetBit(System.UInt32,System.Boolean)
extern "C" IL2CPP_METHOD_ATTR void BigInteger_SetBit_m1723423691 (BigInteger_t2902905090 * __this, uint32_t ___bitNum0, bool ___value1, const RuntimeMethod* method);
// System.Boolean Mono.Math.BigInteger::op_Equality(Mono.Math.BigInteger,System.UInt32)
extern "C" IL2CPP_METHOD_ATTR bool BigInteger_op_Equality_m3872814973 (RuntimeObject * __this /* static, unused */, BigInteger_t2902905090 * ___bi10, uint32_t ___ui1, const RuntimeMethod* method);
// System.Boolean Mono.Math.BigInteger::TestBit(System.Int32)
extern "C" IL2CPP_METHOD_ATTR bool BigInteger_TestBit_m2798226118 (BigInteger_t2902905090 * __this, int32_t ___bitNum0, const RuntimeMethod* method);
// System.Int32 Mono.Math.BigInteger::BitCount()
extern "C" IL2CPP_METHOD_ATTR int32_t BigInteger_BitCount_m2055977486 (BigInteger_t2902905090 * __this, const RuntimeMethod* method);
// System.String Mono.Math.BigInteger::ToString(System.UInt32,System.String)
extern "C" IL2CPP_METHOD_ATTR String_t* BigInteger_ToString_m1181683046 (BigInteger_t2902905090 * __this, uint32_t ___radix0, String_t* ___characterSet1, const RuntimeMethod* method);
// System.Int32 System.String::get_Length()
extern "C" IL2CPP_METHOD_ATTR int32_t String_get_Length_m3847582255 (String_t* __this, const RuntimeMethod* method);
// System.Void System.ArgumentException::.ctor(System.String,System.String)
extern "C" IL2CPP_METHOD_ATTR void ArgumentException__ctor_m1216717135 (ArgumentException_t132251570 * __this, String_t* p0, String_t* p1, const RuntimeMethod* method);
// System.Void Mono.Math.BigInteger::.ctor(Mono.Math.BigInteger)
extern "C" IL2CPP_METHOD_ATTR void BigInteger__ctor_m2108826647 (BigInteger_t2902905090 * __this, BigInteger_t2902905090 * ___bi0, const RuntimeMethod* method);
// System.UInt32 Mono.Math.BigInteger/Kernel::SingleByteDivideInPlace(Mono.Math.BigInteger,System.UInt32)
extern "C" IL2CPP_METHOD_ATTR uint32_t Kernel_SingleByteDivideInPlace_m2393683267 (RuntimeObject * __this /* static, unused */, BigInteger_t2902905090 * ___n0, uint32_t ___d1, const RuntimeMethod* method);
// System.Char System.String::get_Chars(System.Int32)
extern "C" IL2CPP_METHOD_ATTR Il2CppChar String_get_Chars_m2986988803 (String_t* __this, int32_t p0, const RuntimeMethod* method);
// System.String System.String::Concat(System.Object,System.Object)
extern "C" IL2CPP_METHOD_ATTR String_t* String_Concat_m904156431 (RuntimeObject * __this /* static, unused */, RuntimeObject * p0, RuntimeObject * p1, const RuntimeMethod* method);
// System.Boolean Mono.Math.BigInteger::op_Inequality(Mono.Math.BigInteger,System.UInt32)
extern "C" IL2CPP_METHOD_ATTR bool BigInteger_op_Inequality_m3469726044 (RuntimeObject * __this /* static, unused */, BigInteger_t2902905090 * ___bi10, uint32_t ___ui1, const RuntimeMethod* method);
// System.String Mono.Math.BigInteger::ToString(System.UInt32)
extern "C" IL2CPP_METHOD_ATTR String_t* BigInteger_ToString_m3260066955 (BigInteger_t2902905090 * __this, uint32_t ___radix0, const RuntimeMethod* method);
// System.Boolean Mono.Math.BigInteger::op_Equality(Mono.Math.BigInteger,Mono.Math.BigInteger)
extern "C" IL2CPP_METHOD_ATTR bool BigInteger_op_Equality_m1194739960 (RuntimeObject * __this /* static, unused */, BigInteger_t2902905090 * ___bi10, BigInteger_t2902905090 * ___bi21, const RuntimeMethod* method);
// Mono.Math.BigInteger/Sign Mono.Math.BigInteger/Kernel::Compare(Mono.Math.BigInteger,Mono.Math.BigInteger)
extern "C" IL2CPP_METHOD_ATTR int32_t Kernel_Compare_m2669603547 (RuntimeObject * __this /* static, unused */, BigInteger_t2902905090 * ___bi10, BigInteger_t2902905090 * ___bi21, const RuntimeMethod* method);
// Mono.Math.BigInteger Mono.Math.BigInteger/Kernel::modInverse(Mono.Math.BigInteger,Mono.Math.BigInteger)
extern "C" IL2CPP_METHOD_ATTR BigInteger_t2902905090 * Kernel_modInverse_m652700340 (RuntimeObject * __this /* static, unused */, BigInteger_t2902905090 * ___bi0, BigInteger_t2902905090 * ___modulus1, const RuntimeMethod* method);
// System.Void Mono.Math.BigInteger/ModulusRing::.ctor(Mono.Math.BigInteger)
extern "C" IL2CPP_METHOD_ATTR void ModulusRing__ctor_m2420310199 (ModulusRing_t596511505 * __this, BigInteger_t2902905090 * ___modulus0, const RuntimeMethod* method);
// Mono.Math.BigInteger Mono.Math.BigInteger/ModulusRing::Pow(Mono.Math.BigInteger,Mono.Math.BigInteger)
extern "C" IL2CPP_METHOD_ATTR BigInteger_t2902905090 * ModulusRing_Pow_m1124248336 (ModulusRing_t596511505 * __this, BigInteger_t2902905090 * ___a0, BigInteger_t2902905090 * ___k1, const RuntimeMethod* method);
// System.Void Mono.Math.Prime.Generator.SequentialSearchPrimeGeneratorBase::.ctor()
extern "C" IL2CPP_METHOD_ATTR void SequentialSearchPrimeGeneratorBase__ctor_m577913576 (SequentialSearchPrimeGeneratorBase_t2996090509 * __this, const RuntimeMethod* method);
// System.Void Mono.Math.BigInteger::.ctor(System.UInt32)
extern "C" IL2CPP_METHOD_ATTR void BigInteger__ctor_m2474659844 (BigInteger_t2902905090 * __this, uint32_t ___ui0, const RuntimeMethod* method);
// System.Void System.ArgumentOutOfRangeException::.ctor(System.String)
extern "C" IL2CPP_METHOD_ATTR void ArgumentOutOfRangeException__ctor_m3628145864 (ArgumentOutOfRangeException_t777629997 * __this, String_t* p0, const RuntimeMethod* method);
// Mono.Math.BigInteger Mono.Math.BigInteger/Kernel::AddSameSign(Mono.Math.BigInteger,Mono.Math.BigInteger)
extern "C" IL2CPP_METHOD_ATTR BigInteger_t2902905090 * Kernel_AddSameSign_m3267067385 (RuntimeObject * __this /* static, unused */, BigInteger_t2902905090 * ___bi10, BigInteger_t2902905090 * ___bi21, const RuntimeMethod* method);
// System.Void System.ArithmeticException::.ctor(System.String)
extern "C" IL2CPP_METHOD_ATTR void ArithmeticException__ctor_m3551809662 (ArithmeticException_t4283546778 * __this, String_t* p0, const RuntimeMethod* method);
// Mono.Math.BigInteger Mono.Math.BigInteger::op_Implicit(System.Int32)
extern "C" IL2CPP_METHOD_ATTR BigInteger_t2902905090 * BigInteger_op_Implicit_m2547142909 (RuntimeObject * __this /* static, unused */, int32_t ___value0, const RuntimeMethod* method);
// Mono.Math.BigInteger Mono.Math.BigInteger/Kernel::Subtract(Mono.Math.BigInteger,Mono.Math.BigInteger)
extern "C" IL2CPP_METHOD_ATTR BigInteger_t2902905090 * Kernel_Subtract_m846005223 (RuntimeObject * __this /* static, unused */, BigInteger_t2902905090 * ___big0, BigInteger_t2902905090 * ___small1, const RuntimeMethod* method);
// System.Void System.Exception::.ctor()
extern "C" IL2CPP_METHOD_ATTR void Exception__ctor_m213470898 (Exception_t * __this, const RuntimeMethod* method);
// System.UInt32 Mono.Math.BigInteger/Kernel::DwordMod(Mono.Math.BigInteger,System.UInt32)
extern "C" IL2CPP_METHOD_ATTR uint32_t Kernel_DwordMod_m3830036736 (RuntimeObject * __this /* static, unused */, BigInteger_t2902905090 * ___n0, uint32_t ___d1, const RuntimeMethod* method);
// Mono.Math.BigInteger[] Mono.Math.BigInteger/Kernel::multiByteDivide(Mono.Math.BigInteger,Mono.Math.BigInteger)
extern "C" IL2CPP_METHOD_ATTR BigIntegerU5BU5D_t2349952477* Kernel_multiByteDivide_m450694282 (RuntimeObject * __this /* static, unused */, BigInteger_t2902905090 * ___bi10, BigInteger_t2902905090 * ___bi21, const RuntimeMethod* method);
// System.Void Mono.Math.BigInteger/Kernel::Multiply(System.UInt32[],System.UInt32,System.UInt32,System.UInt32[],System.UInt32,System.UInt32,System.UInt32[],System.UInt32)
extern "C" IL2CPP_METHOD_ATTR void Kernel_Multiply_m193213393 (RuntimeObject * __this /* static, unused */, UInt32U5BU5D_t2770800703* ___x0, uint32_t ___xOffset1, uint32_t ___xLen2, UInt32U5BU5D_t2770800703* ___y3, uint32_t ___yOffset4, uint32_t ___yLen5, UInt32U5BU5D_t2770800703* ___d6, uint32_t ___dOffset7, const RuntimeMethod* method);
// Mono.Math.BigInteger Mono.Math.BigInteger/Kernel::LeftShift(Mono.Math.BigInteger,System.Int32)
extern "C" IL2CPP_METHOD_ATTR BigInteger_t2902905090 * Kernel_LeftShift_m4140742987 (RuntimeObject * __this /* static, unused */, BigInteger_t2902905090 * ___bi0, int32_t ___n1, const RuntimeMethod* method);
// Mono.Math.BigInteger Mono.Math.BigInteger/Kernel::RightShift(Mono.Math.BigInteger,System.Int32)
extern "C" IL2CPP_METHOD_ATTR BigInteger_t2902905090 * Kernel_RightShift_m3246168448 (RuntimeObject * __this /* static, unused */, BigInteger_t2902905090 * ___bi0, int32_t ___n1, const RuntimeMethod* method);
// Mono.Math.BigInteger Mono.Math.BigInteger::op_Implicit(System.UInt32)
extern "C" IL2CPP_METHOD_ATTR BigInteger_t2902905090 * BigInteger_op_Implicit_m3414367033 (RuntimeObject * __this /* static, unused */, uint32_t ___value0, const RuntimeMethod* method);
// Mono.Math.BigInteger[] Mono.Math.BigInteger/Kernel::DwordDivMod(Mono.Math.BigInteger,System.UInt32)
extern "C" IL2CPP_METHOD_ATTR BigIntegerU5BU5D_t2349952477* Kernel_DwordDivMod_m1540317819 (RuntimeObject * __this /* static, unused */, BigInteger_t2902905090 * ___n0, uint32_t ___d1, const RuntimeMethod* method);
// Mono.Math.BigInteger Mono.Math.BigInteger::op_LeftShift(Mono.Math.BigInteger,System.Int32)
extern "C" IL2CPP_METHOD_ATTR BigInteger_t2902905090 * BigInteger_op_LeftShift_m3681213422 (RuntimeObject * __this /* static, unused */, BigInteger_t2902905090 * ___bi10, int32_t ___shiftVal1, const RuntimeMethod* method);
// Mono.Math.BigInteger Mono.Math.BigInteger::op_RightShift(Mono.Math.BigInteger,System.Int32)
extern "C" IL2CPP_METHOD_ATTR BigInteger_t2902905090 * BigInteger_op_RightShift_m460065452 (RuntimeObject * __this /* static, unused */, BigInteger_t2902905090 * ___bi10, int32_t ___shiftVal1, const RuntimeMethod* method);
// System.Void Mono.Math.BigInteger::.ctor(Mono.Math.BigInteger,System.UInt32)
extern "C" IL2CPP_METHOD_ATTR void BigInteger__ctor_m2644482640 (BigInteger_t2902905090 * __this, BigInteger_t2902905090 * ___bi0, uint32_t ___len1, const RuntimeMethod* method);
// System.UInt32 Mono.Math.BigInteger::op_Modulus(Mono.Math.BigInteger,System.UInt32)
extern "C" IL2CPP_METHOD_ATTR uint32_t BigInteger_op_Modulus_m3242311550 (RuntimeObject * __this /* static, unused */, BigInteger_t2902905090 * ___bi0, uint32_t ___ui1, const RuntimeMethod* method);
// System.UInt32 Mono.Math.BigInteger/Kernel::modInverse(Mono.Math.BigInteger,System.UInt32)
extern "C" IL2CPP_METHOD_ATTR uint32_t Kernel_modInverse_m4048046181 (RuntimeObject * __this /* static, unused */, BigInteger_t2902905090 * ___bi0, uint32_t ___modulus1, const RuntimeMethod* method);
// Mono.Math.BigInteger Mono.Math.BigInteger::op_Multiply(Mono.Math.BigInteger,Mono.Math.BigInteger)
extern "C" IL2CPP_METHOD_ATTR BigInteger_t2902905090 * BigInteger_op_Multiply_m3683746602 (RuntimeObject * __this /* static, unused */, BigInteger_t2902905090 * ___bi10, BigInteger_t2902905090 * ___bi21, const RuntimeMethod* method);
// Mono.Math.BigInteger Mono.Math.BigInteger/ModulusRing::Difference(Mono.Math.BigInteger,Mono.Math.BigInteger)
extern "C" IL2CPP_METHOD_ATTR BigInteger_t2902905090 * ModulusRing_Difference_m3686091506 (ModulusRing_t596511505 * __this, BigInteger_t2902905090 * ___a0, BigInteger_t2902905090 * ___b1, const RuntimeMethod* method);
// Mono.Math.BigInteger Mono.Math.BigInteger::op_Division(Mono.Math.BigInteger,Mono.Math.BigInteger)
extern "C" IL2CPP_METHOD_ATTR BigInteger_t2902905090 * BigInteger_op_Division_m3713793389 (RuntimeObject * __this /* static, unused */, BigInteger_t2902905090 * ___bi10, BigInteger_t2902905090 * ___bi21, const RuntimeMethod* method);
// System.Void Mono.Math.BigInteger/Kernel::MultiplyMod2p32pmod(System.UInt32[],System.Int32,System.Int32,System.UInt32[],System.Int32,System.Int32,System.UInt32[],System.Int32,System.Int32)
extern "C" IL2CPP_METHOD_ATTR void Kernel_MultiplyMod2p32pmod_m451690680 (RuntimeObject * __this /* static, unused */, UInt32U5BU5D_t2770800703* ___x0, int32_t ___xOffset1, int32_t ___xLen2, UInt32U5BU5D_t2770800703* ___y3, int32_t ___yOffest4, int32_t ___yLen5, UInt32U5BU5D_t2770800703* ___d6, int32_t ___dOffset7, int32_t ___mod8, const RuntimeMethod* method);
// System.Boolean Mono.Math.BigInteger::op_LessThanOrEqual(Mono.Math.BigInteger,Mono.Math.BigInteger)
extern "C" IL2CPP_METHOD_ATTR bool BigInteger_op_LessThanOrEqual_m3925173639 (RuntimeObject * __this /* static, unused */, BigInteger_t2902905090 * ___bi10, BigInteger_t2902905090 * ___bi21, const RuntimeMethod* method);
// System.Void Mono.Math.BigInteger/Kernel::MinusEq(Mono.Math.BigInteger,Mono.Math.BigInteger)
extern "C" IL2CPP_METHOD_ATTR void Kernel_MinusEq_m2152832554 (RuntimeObject * __this /* static, unused */, BigInteger_t2902905090 * ___big0, BigInteger_t2902905090 * ___small1, const RuntimeMethod* method);
// System.Void Mono.Math.BigInteger/Kernel::PlusEq(Mono.Math.BigInteger,Mono.Math.BigInteger)
extern "C" IL2CPP_METHOD_ATTR void Kernel_PlusEq_m136676638 (RuntimeObject * __this /* static, unused */, BigInteger_t2902905090 * ___bi10, BigInteger_t2902905090 * ___bi21, const RuntimeMethod* method);
// System.Boolean Mono.Math.BigInteger::op_GreaterThanOrEqual(Mono.Math.BigInteger,Mono.Math.BigInteger)
extern "C" IL2CPP_METHOD_ATTR bool BigInteger_op_GreaterThanOrEqual_m3313329514 (RuntimeObject * __this /* static, unused */, BigInteger_t2902905090 * ___bi10, BigInteger_t2902905090 * ___bi21, const RuntimeMethod* method);
// System.Boolean Mono.Math.BigInteger::op_GreaterThan(Mono.Math.BigInteger,Mono.Math.BigInteger)
extern "C" IL2CPP_METHOD_ATTR bool BigInteger_op_GreaterThan_m2974122765 (RuntimeObject * __this /* static, unused */, BigInteger_t2902905090 * ___bi10, BigInteger_t2902905090 * ___bi21, const RuntimeMethod* method);
// Mono.Math.BigInteger Mono.Math.BigInteger::op_Modulus(Mono.Math.BigInteger,Mono.Math.BigInteger)
extern "C" IL2CPP_METHOD_ATTR BigInteger_t2902905090 * BigInteger_op_Modulus_m2565477533 (RuntimeObject * __this /* static, unused */, BigInteger_t2902905090 * ___bi10, BigInteger_t2902905090 * ___bi21, const RuntimeMethod* method);
// System.Void Mono.Math.BigInteger/ModulusRing::BarrettReduction(Mono.Math.BigInteger)
extern "C" IL2CPP_METHOD_ATTR void ModulusRing_BarrettReduction_m3024442734 (ModulusRing_t596511505 * __this, BigInteger_t2902905090 * ___x0, const RuntimeMethod* method);
// Mono.Math.BigInteger Mono.Math.BigInteger::op_Subtraction(Mono.Math.BigInteger,Mono.Math.BigInteger)
extern "C" IL2CPP_METHOD_ATTR BigInteger_t2902905090 * BigInteger_op_Subtraction_m4245834512 (RuntimeObject * __this /* static, unused */, BigInteger_t2902905090 * ___bi10, BigInteger_t2902905090 * ___bi21, const RuntimeMethod* method);
// Mono.Math.BigInteger Mono.Math.BigInteger/ModulusRing::Multiply(Mono.Math.BigInteger,Mono.Math.BigInteger)
extern "C" IL2CPP_METHOD_ATTR BigInteger_t2902905090 * ModulusRing_Multiply_m1975391470 (ModulusRing_t596511505 * __this, BigInteger_t2902905090 * ___a0, BigInteger_t2902905090 * ___b1, const RuntimeMethod* method);
// System.Void Mono.Math.Prime.PrimalityTest::.ctor(System.Object,System.IntPtr)
extern "C" IL2CPP_METHOD_ATTR void PrimalityTest__ctor_m763620166 (PrimalityTest_t1539325944 * __this, RuntimeObject * ___object0, intptr_t ___method1, const RuntimeMethod* method);
// System.Void Mono.Math.Prime.Generator.PrimeGeneratorBase::.ctor()
extern "C" IL2CPP_METHOD_ATTR void PrimeGeneratorBase__ctor_m2423671149 (PrimeGeneratorBase_t446028867 * __this, const RuntimeMethod* method);
// Mono.Math.BigInteger Mono.Math.BigInteger::GenerateRandom(System.Int32)
extern "C" IL2CPP_METHOD_ATTR BigInteger_t2902905090 * BigInteger_GenerateRandom_m1790382084 (RuntimeObject * __this /* static, unused */, int32_t ___bits0, const RuntimeMethod* method);
// System.Void Mono.Math.BigInteger::SetBit(System.UInt32)
extern "C" IL2CPP_METHOD_ATTR void BigInteger_SetBit_m1387902198 (BigInteger_t2902905090 * __this, uint32_t ___bitNum0, const RuntimeMethod* method);
// System.Boolean Mono.Math.Prime.PrimalityTest::Invoke(Mono.Math.BigInteger,Mono.Math.Prime.ConfidenceFactor)
extern "C" IL2CPP_METHOD_ATTR bool PrimalityTest_Invoke_m2948246884 (PrimalityTest_t1539325944 * __this, BigInteger_t2902905090 * ___bi0, int32_t ___confidence1, const RuntimeMethod* method);
// System.Void Mono.Math.BigInteger::Incr2()
extern "C" IL2CPP_METHOD_ATTR void BigInteger_Incr2_m1531167978 (BigInteger_t2902905090 * __this, const RuntimeMethod* method);
// System.Void System.Exception::.ctor(System.String)
extern "C" IL2CPP_METHOD_ATTR void Exception__ctor_m1152696503 (Exception_t * __this, String_t* p0, const RuntimeMethod* method);
// System.Int32 Mono.Math.Prime.PrimalityTests::GetSPPRounds(Mono.Math.BigInteger,Mono.Math.Prime.ConfidenceFactor)
extern "C" IL2CPP_METHOD_ATTR int32_t PrimalityTests_GetSPPRounds_m2558073743 (RuntimeObject * __this /* static, unused */, BigInteger_t2902905090 * ___bi0, int32_t ___confidence1, const RuntimeMethod* method);
// System.Int32 Mono.Math.BigInteger::LowestSetBit()
extern "C" IL2CPP_METHOD_ATTR int32_t BigInteger_LowestSetBit_m1199244228 (BigInteger_t2902905090 * __this, const RuntimeMethod* method);
// Mono.Math.BigInteger Mono.Math.BigInteger/ModulusRing::Pow(System.UInt32,Mono.Math.BigInteger)
extern "C" IL2CPP_METHOD_ATTR BigInteger_t2902905090 * ModulusRing_Pow_m729002192 (ModulusRing_t596511505 * __this, uint32_t ___b0, BigInteger_t2902905090 * ___exp1, const RuntimeMethod* method);
// System.Boolean Mono.Math.BigInteger::op_Inequality(Mono.Math.BigInteger,Mono.Math.BigInteger)
extern "C" IL2CPP_METHOD_ATTR bool BigInteger_op_Inequality_m2697143438 (RuntimeObject * __this /* static, unused */, BigInteger_t2902905090 * ___bi10, BigInteger_t2902905090 * ___bi21, const RuntimeMethod* method);
// System.Void Mono.Security.ASN1::.ctor(System.Byte,System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void ASN1__ctor_m682794872 (ASN1_t2114160833 * __this, uint8_t ___tag0, ByteU5BU5D_t4116647657* ___data1, const RuntimeMethod* method);
// System.Void System.NotSupportedException::.ctor(System.String)
extern "C" IL2CPP_METHOD_ATTR void NotSupportedException__ctor_m2494070935 (NotSupportedException_t1314879016 * __this, String_t* p0, const RuntimeMethod* method);
// System.Void Mono.Security.ASN1::Decode(System.Byte[],System.Int32&,System.Int32)
extern "C" IL2CPP_METHOD_ATTR void ASN1_Decode_m1245286596 (ASN1_t2114160833 * __this, ByteU5BU5D_t4116647657* ___asn10, int32_t* ___anPos1, int32_t ___anLength2, const RuntimeMethod* method);
// System.Boolean Mono.Security.ASN1::CompareArray(System.Byte[],System.Byte[])
extern "C" IL2CPP_METHOD_ATTR bool ASN1_CompareArray_m3928975006 (ASN1_t2114160833 * __this, ByteU5BU5D_t4116647657* ___array10, ByteU5BU5D_t4116647657* ___array21, const RuntimeMethod* method);
// System.Void System.Collections.ArrayList::.ctor()
extern "C" IL2CPP_METHOD_ATTR void ArrayList__ctor_m4254721275 (ArrayList_t2718874744 * __this, const RuntimeMethod* method);
// System.Int32 Mono.Security.ASN1::get_Count()
extern "C" IL2CPP_METHOD_ATTR int32_t ASN1_get_Count_m1789520042 (ASN1_t2114160833 * __this, const RuntimeMethod* method);
// System.Void Mono.Security.ASN1::DecodeTLV(System.Byte[],System.Int32&,System.Byte&,System.Int32&,System.Byte[]&)
extern "C" IL2CPP_METHOD_ATTR void ASN1_DecodeTLV_m3927350254 (ASN1_t2114160833 * __this, ByteU5BU5D_t4116647657* ___asn10, int32_t* ___pos1, uint8_t* ___tag2, int32_t* ___length3, ByteU5BU5D_t4116647657** ___content4, const RuntimeMethod* method);
// Mono.Security.ASN1 Mono.Security.ASN1::Add(Mono.Security.ASN1)
extern "C" IL2CPP_METHOD_ATTR ASN1_t2114160833 * ASN1_Add_m2431139999 (ASN1_t2114160833 * __this, ASN1_t2114160833 * ___asn10, const RuntimeMethod* method);
// System.Byte Mono.Security.ASN1::get_Tag()
extern "C" IL2CPP_METHOD_ATTR uint8_t ASN1_get_Tag_m2789147236 (ASN1_t2114160833 * __this, const RuntimeMethod* method);
// System.Void System.Text.StringBuilder::.ctor()
extern "C" IL2CPP_METHOD_ATTR void StringBuilder__ctor_m3121283359 (StringBuilder_t * __this, const RuntimeMethod* method);
// System.String System.Byte::ToString(System.String)
extern "C" IL2CPP_METHOD_ATTR String_t* Byte_ToString_m3735479648 (uint8_t* __this, String_t* p0, const RuntimeMethod* method);
// System.String System.Environment::get_NewLine()
extern "C" IL2CPP_METHOD_ATTR String_t* Environment_get_NewLine_m3211016485 (RuntimeObject * __this /* static, unused */, const RuntimeMethod* method);
// System.Text.StringBuilder System.Text.StringBuilder::AppendFormat(System.String,System.Object,System.Object)
extern "C" IL2CPP_METHOD_ATTR StringBuilder_t * StringBuilder_AppendFormat_m3255666490 (StringBuilder_t * __this, String_t* p0, RuntimeObject * p1, RuntimeObject * p2, const RuntimeMethod* method);
// System.Byte[] Mono.Security.ASN1::get_Value()
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* ASN1_get_Value_m63296490 (ASN1_t2114160833 * __this, const RuntimeMethod* method);
// System.Text.StringBuilder System.Text.StringBuilder::Append(System.String)
extern "C" IL2CPP_METHOD_ATTR StringBuilder_t * StringBuilder_Append_m1965104174 (StringBuilder_t * __this, String_t* p0, const RuntimeMethod* method);
// System.Text.StringBuilder System.Text.StringBuilder::AppendFormat(System.String,System.Object)
extern "C" IL2CPP_METHOD_ATTR StringBuilder_t * StringBuilder_AppendFormat_m3016532472 (StringBuilder_t * __this, String_t* p0, RuntimeObject * p1, const RuntimeMethod* method);
// System.Text.StringBuilder System.Text.StringBuilder::AppendFormat(System.String,System.Object[])
extern "C" IL2CPP_METHOD_ATTR StringBuilder_t * StringBuilder_AppendFormat_m921870684 (StringBuilder_t * __this, String_t* p0, ObjectU5BU5D_t2843939325* p1, const RuntimeMethod* method);
// System.String System.Text.StringBuilder::ToString()
extern "C" IL2CPP_METHOD_ATTR String_t* StringBuilder_ToString_m3317489284 (StringBuilder_t * __this, const RuntimeMethod* method);
// System.Byte[] Mono.Security.BitConverterLE::GetBytes(System.Int32)
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* BitConverterLE_GetBytes_m3268825786 (RuntimeObject * __this /* static, unused */, int32_t ___value0, const RuntimeMethod* method);
// System.Void System.Array::Reverse(System.Array)
extern "C" IL2CPP_METHOD_ATTR void Array_Reverse_m3714848183 (RuntimeObject * __this /* static, unused */, RuntimeArray * p0, const RuntimeMethod* method);
// System.Void Mono.Security.ASN1::.ctor(System.Byte)
extern "C" IL2CPP_METHOD_ATTR void ASN1__ctor_m1239252869 (ASN1_t2114160833 * __this, uint8_t ___tag0, const RuntimeMethod* method);
// System.Void Mono.Security.ASN1::set_Value(System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void ASN1_set_Value_m647861841 (ASN1_t2114160833 * __this, ByteU5BU5D_t4116647657* ___value0, const RuntimeMethod* method);
// System.Void System.ArgumentNullException::.ctor(System.String)
extern "C" IL2CPP_METHOD_ATTR void ArgumentNullException__ctor_m1170824041 (ArgumentNullException_t1615371798 * __this, String_t* p0, const RuntimeMethod* method);
// System.Byte[] System.Security.Cryptography.CryptoConfig::EncodeOID(System.String)
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* CryptoConfig_EncodeOID_m2635914623 (RuntimeObject * __this /* static, unused */, String_t* p0, const RuntimeMethod* method);
// System.Void Mono.Security.ASN1::.ctor(System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void ASN1__ctor_m1638893325 (ASN1_t2114160833 * __this, ByteU5BU5D_t4116647657* ___data0, const RuntimeMethod* method);
// System.Void System.FormatException::.ctor(System.String)
extern "C" IL2CPP_METHOD_ATTR void FormatException__ctor_m4049685996 (FormatException_t154580423 * __this, String_t* p0, const RuntimeMethod* method);
// System.Globalization.CultureInfo System.Globalization.CultureInfo::get_InvariantCulture()
extern "C" IL2CPP_METHOD_ATTR CultureInfo_t4157843068 * CultureInfo_get_InvariantCulture_m3532445182 (RuntimeObject * __this /* static, unused */, const RuntimeMethod* method);
// System.String System.Byte::ToString(System.IFormatProvider)
extern "C" IL2CPP_METHOD_ATTR String_t* Byte_ToString_m2335342258 (uint8_t* __this, RuntimeObject* p0, const RuntimeMethod* method);
// System.String System.UInt64::ToString(System.IFormatProvider)
extern "C" IL2CPP_METHOD_ATTR String_t* UInt64_ToString_m2623377370 (uint64_t* __this, RuntimeObject* p0, const RuntimeMethod* method);
// System.Text.Encoding System.Text.Encoding::get_ASCII()
extern "C" IL2CPP_METHOD_ATTR Encoding_t1523322056 * Encoding_get_ASCII_m3595602635 (RuntimeObject * __this /* static, unused */, const RuntimeMethod* method);
// System.String System.String::Substring(System.Int32,System.Int32)
extern "C" IL2CPP_METHOD_ATTR String_t* String_Substring_m1610150815 (String_t* __this, int32_t p0, int32_t p1, const RuntimeMethod* method);
// System.Int16 System.Convert::ToInt16(System.String,System.IFormatProvider)
extern "C" IL2CPP_METHOD_ATTR int16_t Convert_ToInt16_m3185404879 (RuntimeObject * __this /* static, unused */, String_t* p0, RuntimeObject* p1, const RuntimeMethod* method);
// System.String System.String::Concat(System.String,System.String)
extern "C" IL2CPP_METHOD_ATTR String_t* String_Concat_m3937257545 (RuntimeObject * __this /* static, unused */, String_t* p0, String_t* p1, const RuntimeMethod* method);
// System.String System.String::Format(System.String,System.Object[])
extern "C" IL2CPP_METHOD_ATTR String_t* String_Format_m630303134 (RuntimeObject * __this /* static, unused */, String_t* p0, ObjectU5BU5D_t2843939325* p1, const RuntimeMethod* method);
// System.DateTime System.DateTime::ParseExact(System.String,System.String,System.IFormatProvider,System.Globalization.DateTimeStyles)
extern "C" IL2CPP_METHOD_ATTR DateTime_t3738529785 DateTime_ParseExact_m2711902273 (RuntimeObject * __this /* static, unused */, String_t* p0, String_t* p1, RuntimeObject* p2, int32_t p3, const RuntimeMethod* method);
// System.Byte[] Mono.Security.BitConverterLE::GetUIntBytes(System.Byte*)
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* BitConverterLE_GetUIntBytes_m795219058 (RuntimeObject * __this /* static, unused */, uint8_t* ___bytes0, const RuntimeMethod* method);
// System.Void Mono.Security.Cryptography.RC4::.ctor()
extern "C" IL2CPP_METHOD_ATTR void RC4__ctor_m3531760091 (RC4_t2752556436 * __this, const RuntimeMethod* method);
// System.Void System.Security.Cryptography.SymmetricAlgorithm::Finalize()
extern "C" IL2CPP_METHOD_ATTR void SymmetricAlgorithm_Finalize_m2361523015 (SymmetricAlgorithm_t4254223087 * __this, const RuntimeMethod* method);
// System.Void System.Array::Clear(System.Array,System.Int32,System.Int32)
extern "C" IL2CPP_METHOD_ATTR void Array_Clear_m2231608178 (RuntimeObject * __this /* static, unused */, RuntimeArray * p0, int32_t p1, int32_t p2, const RuntimeMethod* method);
// System.Void System.GC::SuppressFinalize(System.Object)
extern "C" IL2CPP_METHOD_ATTR void GC_SuppressFinalize_m1177400158 (RuntimeObject * __this /* static, unused */, RuntimeObject * p0, const RuntimeMethod* method);
// System.Void Mono.Security.Cryptography.ARC4Managed::KeySetup(System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void ARC4Managed_KeySetup_m2449315676 (ARC4Managed_t2641858452 * __this, ByteU5BU5D_t4116647657* ___key0, const RuntimeMethod* method);
// System.Byte[] Mono.Security.Cryptography.KeyBuilder::Key(System.Int32)
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* KeyBuilder_Key_m1482371611 (RuntimeObject * __this /* static, unused */, int32_t ___size0, const RuntimeMethod* method);
// System.Void System.ArgumentOutOfRangeException::.ctor(System.String,System.String)
extern "C" IL2CPP_METHOD_ATTR void ArgumentOutOfRangeException__ctor_m282481429 (ArgumentOutOfRangeException_t777629997 * __this, String_t* p0, String_t* p1, const RuntimeMethod* method);
// System.String Locale::GetText(System.String)
extern "C" IL2CPP_METHOD_ATTR String_t* Locale_GetText_m3520169047 (RuntimeObject * __this /* static, unused */, String_t* ___msg0, const RuntimeMethod* method);
// System.Void Mono.Security.Cryptography.ARC4Managed::CheckInput(System.Byte[],System.Int32,System.Int32)
extern "C" IL2CPP_METHOD_ATTR void ARC4Managed_CheckInput_m1562172012 (ARC4Managed_t2641858452 * __this, ByteU5BU5D_t4116647657* ___inputBuffer0, int32_t ___inputOffset1, int32_t ___inputCount2, const RuntimeMethod* method);
// System.Int32 Mono.Security.Cryptography.ARC4Managed::InternalTransformBlock(System.Byte[],System.Int32,System.Int32,System.Byte[],System.Int32)
extern "C" IL2CPP_METHOD_ATTR int32_t ARC4Managed_InternalTransformBlock_m1047162329 (ARC4Managed_t2641858452 * __this, ByteU5BU5D_t4116647657* ___inputBuffer0, int32_t ___inputOffset1, int32_t ___inputCount2, ByteU5BU5D_t4116647657* ___outputBuffer3, int32_t ___outputOffset4, const RuntimeMethod* method);
// System.Void System.Text.StringBuilder::.ctor(System.Int32)
extern "C" IL2CPP_METHOD_ATTR void StringBuilder__ctor_m2367297767 (StringBuilder_t * __this, int32_t p0, const RuntimeMethod* method);
// System.String System.Byte::ToString(System.String,System.IFormatProvider)
extern "C" IL2CPP_METHOD_ATTR String_t* Byte_ToString_m4063101981 (uint8_t* __this, String_t* p0, RuntimeObject* p1, const RuntimeMethod* method);
// System.Void System.Security.Cryptography.KeyedHashAlgorithm::.ctor()
extern "C" IL2CPP_METHOD_ATTR void KeyedHashAlgorithm__ctor_m4053775756 (KeyedHashAlgorithm_t112861511 * __this, const RuntimeMethod* method);
// System.Security.Cryptography.HashAlgorithm System.Security.Cryptography.HashAlgorithm::Create(System.String)
extern "C" IL2CPP_METHOD_ATTR HashAlgorithm_t1432317219 * HashAlgorithm_Create_m644612360 (RuntimeObject * __this /* static, unused */, String_t* p0, const RuntimeMethod* method);
// System.Byte[] System.Security.Cryptography.HashAlgorithm::ComputeHash(System.Byte[])
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* HashAlgorithm_ComputeHash_m2825542963 (HashAlgorithm_t1432317219 * __this, ByteU5BU5D_t4116647657* p0, const RuntimeMethod* method);
// System.Void Mono.Security.Cryptography.HMAC::initializePad()
extern "C" IL2CPP_METHOD_ATTR void HMAC_initializePad_m59014980 (HMAC_t3689525210 * __this, const RuntimeMethod* method);
// System.Int32 System.Security.Cryptography.HashAlgorithm::TransformBlock(System.Byte[],System.Int32,System.Int32,System.Byte[],System.Int32)
extern "C" IL2CPP_METHOD_ATTR int32_t HashAlgorithm_TransformBlock_m4006041779 (HashAlgorithm_t1432317219 * __this, ByteU5BU5D_t4116647657* p0, int32_t p1, int32_t p2, ByteU5BU5D_t4116647657* p3, int32_t p4, const RuntimeMethod* method);
// System.Byte[] System.Security.Cryptography.HashAlgorithm::TransformFinalBlock(System.Byte[],System.Int32,System.Int32)
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* HashAlgorithm_TransformFinalBlock_m3005451348 (HashAlgorithm_t1432317219 * __this, ByteU5BU5D_t4116647657* p0, int32_t p1, int32_t p2, const RuntimeMethod* method);
// System.Security.Cryptography.RandomNumberGenerator Mono.Security.Cryptography.KeyBuilder::get_Rng()
extern "C" IL2CPP_METHOD_ATTR RandomNumberGenerator_t386037858 * KeyBuilder_get_Rng_m983065666 (RuntimeObject * __this /* static, unused */, const RuntimeMethod* method);
// System.Void System.Security.Cryptography.HashAlgorithm::.ctor()
extern "C" IL2CPP_METHOD_ATTR void HashAlgorithm__ctor_m190815979 (HashAlgorithm_t1432317219 * __this, const RuntimeMethod* method);
// Mono.Security.Cryptography.MD2 Mono.Security.Cryptography.MD2::Create(System.String)
extern "C" IL2CPP_METHOD_ATTR MD2_t1561046427 * MD2_Create_m1292792200 (RuntimeObject * __this /* static, unused */, String_t* ___hashName0, const RuntimeMethod* method);
// System.Object System.Security.Cryptography.CryptoConfig::CreateFromName(System.String)
extern "C" IL2CPP_METHOD_ATTR RuntimeObject * CryptoConfig_CreateFromName_m1538277313 (RuntimeObject * __this /* static, unused */, String_t* p0, const RuntimeMethod* method);
// System.Void Mono.Security.Cryptography.MD2Managed::.ctor()
extern "C" IL2CPP_METHOD_ATTR void MD2Managed__ctor_m3243422744 (MD2Managed_t1377101535 * __this, const RuntimeMethod* method);
// System.Void Mono.Security.Cryptography.MD2::.ctor()
extern "C" IL2CPP_METHOD_ATTR void MD2__ctor_m2402458789 (MD2_t1561046427 * __this, const RuntimeMethod* method);
// System.Void Mono.Security.Cryptography.MD2Managed::MD2Transform(System.Byte[],System.Byte[],System.Byte[],System.Int32)
extern "C" IL2CPP_METHOD_ATTR void MD2Managed_MD2Transform_m3143426291 (MD2Managed_t1377101535 * __this, ByteU5BU5D_t4116647657* ___state0, ByteU5BU5D_t4116647657* ___checksum1, ByteU5BU5D_t4116647657* ___block2, int32_t ___index3, const RuntimeMethod* method);
// System.Byte[] Mono.Security.Cryptography.MD2Managed::Padding(System.Int32)
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* MD2Managed_Padding_m1334210368 (MD2Managed_t1377101535 * __this, int32_t ___nLength0, const RuntimeMethod* method);
// Mono.Security.Cryptography.MD4 Mono.Security.Cryptography.MD4::Create(System.String)
extern "C" IL2CPP_METHOD_ATTR MD4_t1560915355 * MD4_Create_m4111026039 (RuntimeObject * __this /* static, unused */, String_t* ___hashName0, const RuntimeMethod* method);
// System.Void Mono.Security.Cryptography.MD4Managed::.ctor()
extern "C" IL2CPP_METHOD_ATTR void MD4Managed__ctor_m2284724408 (MD4Managed_t957540063 * __this, const RuntimeMethod* method);
// System.Void Mono.Security.Cryptography.MD4::.ctor()
extern "C" IL2CPP_METHOD_ATTR void MD4__ctor_m919379109 (MD4_t1560915355 * __this, const RuntimeMethod* method);
// System.Void Mono.Security.Cryptography.MD4Managed::MD4Transform(System.UInt32[],System.Byte[],System.Int32)
extern "C" IL2CPP_METHOD_ATTR void MD4Managed_MD4Transform_m1101832482 (MD4Managed_t957540063 * __this, UInt32U5BU5D_t2770800703* ___state0, ByteU5BU5D_t4116647657* ___block1, int32_t ___index2, const RuntimeMethod* method);
// System.Void Mono.Security.Cryptography.MD4Managed::Encode(System.Byte[],System.UInt32[])
extern "C" IL2CPP_METHOD_ATTR void MD4Managed_Encode_m386285215 (MD4Managed_t957540063 * __this, ByteU5BU5D_t4116647657* ___output0, UInt32U5BU5D_t2770800703* ___input1, const RuntimeMethod* method);
// System.Byte[] Mono.Security.Cryptography.MD4Managed::Padding(System.Int32)
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* MD4Managed_Padding_m3091724296 (MD4Managed_t957540063 * __this, int32_t ___nLength0, const RuntimeMethod* method);
// System.UInt32 Mono.Security.Cryptography.MD4Managed::F(System.UInt32,System.UInt32,System.UInt32)
extern "C" IL2CPP_METHOD_ATTR uint32_t MD4Managed_F_m2794461001 (MD4Managed_t957540063 * __this, uint32_t ___x0, uint32_t ___y1, uint32_t ___z2, const RuntimeMethod* method);
// System.UInt32 Mono.Security.Cryptography.MD4Managed::ROL(System.UInt32,System.Byte)
extern "C" IL2CPP_METHOD_ATTR uint32_t MD4Managed_ROL_m691796253 (MD4Managed_t957540063 * __this, uint32_t ___x0, uint8_t ___n1, const RuntimeMethod* method);
// System.UInt32 Mono.Security.Cryptography.MD4Managed::G(System.UInt32,System.UInt32,System.UInt32)
extern "C" IL2CPP_METHOD_ATTR uint32_t MD4Managed_G_m2118206422 (MD4Managed_t957540063 * __this, uint32_t ___x0, uint32_t ___y1, uint32_t ___z2, const RuntimeMethod* method);
// System.UInt32 Mono.Security.Cryptography.MD4Managed::H(System.UInt32,System.UInt32,System.UInt32)
extern "C" IL2CPP_METHOD_ATTR uint32_t MD4Managed_H_m213605525 (MD4Managed_t957540063 * __this, uint32_t ___x0, uint32_t ___y1, uint32_t ___z2, const RuntimeMethod* method);
// System.Void Mono.Security.Cryptography.MD4Managed::Decode(System.UInt32[],System.Byte[],System.Int32)
extern "C" IL2CPP_METHOD_ATTR void MD4Managed_Decode_m4273685594 (MD4Managed_t957540063 * __this, UInt32U5BU5D_t2770800703* ___output0, ByteU5BU5D_t4116647657* ___input1, int32_t ___index2, const RuntimeMethod* method);
// System.Void Mono.Security.Cryptography.MD4Managed::FF(System.UInt32&,System.UInt32,System.UInt32,System.UInt32,System.UInt32,System.Byte)
extern "C" IL2CPP_METHOD_ATTR void MD4Managed_FF_m3294771481 (MD4Managed_t957540063 * __this, uint32_t* ___a0, uint32_t ___b1, uint32_t ___c2, uint32_t ___d3, uint32_t ___x4, uint8_t ___s5, const RuntimeMethod* method);
// System.Void Mono.Security.Cryptography.MD4Managed::GG(System.UInt32&,System.UInt32,System.UInt32,System.UInt32,System.UInt32,System.Byte)
extern "C" IL2CPP_METHOD_ATTR void MD4Managed_GG_m1845276249 (MD4Managed_t957540063 * __this, uint32_t* ___a0, uint32_t ___b1, uint32_t ___c2, uint32_t ___d3, uint32_t ___x4, uint8_t ___s5, const RuntimeMethod* method);
// System.Void Mono.Security.Cryptography.MD4Managed::HH(System.UInt32&,System.UInt32,System.UInt32,System.UInt32,System.UInt32,System.Byte)
extern "C" IL2CPP_METHOD_ATTR void MD4Managed_HH_m2535673516 (MD4Managed_t957540063 * __this, uint32_t* ___a0, uint32_t ___b1, uint32_t ___c2, uint32_t ___d3, uint32_t ___x4, uint8_t ___s5, const RuntimeMethod* method);
// System.Security.Cryptography.MD5 System.Security.Cryptography.MD5::Create()
extern "C" IL2CPP_METHOD_ATTR MD5_t3177620429 * MD5_Create_m3522414168 (RuntimeObject * __this /* static, unused */, const RuntimeMethod* method);
// System.Security.Cryptography.SHA1 System.Security.Cryptography.SHA1::Create()
extern "C" IL2CPP_METHOD_ATTR SHA1_t1803193667 * SHA1_Create_m1390871308 (RuntimeObject * __this /* static, unused */, const RuntimeMethod* method);
// System.Void System.Security.Cryptography.CryptographicUnexpectedOperationException::.ctor(System.String)
extern "C" IL2CPP_METHOD_ATTR void CryptographicUnexpectedOperationException__ctor_m2381988196 (CryptographicUnexpectedOperationException_t2790575154 * __this, String_t* p0, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.RSASslSignatureFormatter::.ctor(System.Security.Cryptography.AsymmetricAlgorithm)
extern "C" IL2CPP_METHOD_ATTR void RSASslSignatureFormatter__ctor_m1299283008 (RSASslSignatureFormatter_t2709678514 * __this, AsymmetricAlgorithm_t932037087 * ___key0, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.RSASslSignatureDeformatter::.ctor(System.Security.Cryptography.AsymmetricAlgorithm)
extern "C" IL2CPP_METHOD_ATTR void RSASslSignatureDeformatter__ctor_m4026549112 (RSASslSignatureDeformatter_t3558097625 * __this, AsymmetricAlgorithm_t932037087 * ___key0, const RuntimeMethod* method);
// System.Byte[] Mono.Security.Cryptography.PKCS1::Encode_v15(System.Security.Cryptography.HashAlgorithm,System.Byte[],System.Int32)
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* PKCS1_Encode_v15_m2077073129 (RuntimeObject * __this /* static, unused */, HashAlgorithm_t1432317219 * ___hash0, ByteU5BU5D_t4116647657* ___hashValue1, int32_t ___emLength2, const RuntimeMethod* method);
// System.Byte[] Mono.Security.Cryptography.PKCS1::OS2IP(System.Byte[])
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* PKCS1_OS2IP_m1443067185 (RuntimeObject * __this /* static, unused */, ByteU5BU5D_t4116647657* ___x0, const RuntimeMethod* method);
// System.Byte[] Mono.Security.Cryptography.PKCS1::RSASP1(System.Security.Cryptography.RSA,System.Byte[])
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* PKCS1_RSASP1_m4286349561 (RuntimeObject * __this /* static, unused */, RSA_t2385438082 * ___rsa0, ByteU5BU5D_t4116647657* ___m1, const RuntimeMethod* method);
// System.Byte[] Mono.Security.Cryptography.PKCS1::I2OSP(System.Byte[],System.Int32)
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* PKCS1_I2OSP_m2559784711 (RuntimeObject * __this /* static, unused */, ByteU5BU5D_t4116647657* ___x0, int32_t ___size1, const RuntimeMethod* method);
// System.Boolean Mono.Security.Cryptography.PKCS1::Verify_v15(System.Security.Cryptography.RSA,System.Security.Cryptography.HashAlgorithm,System.Byte[],System.Byte[],System.Boolean)
extern "C" IL2CPP_METHOD_ATTR bool PKCS1_Verify_v15_m400093581 (RuntimeObject * __this /* static, unused */, RSA_t2385438082 * ___rsa0, HashAlgorithm_t1432317219 * ___hash1, ByteU5BU5D_t4116647657* ___hashValue2, ByteU5BU5D_t4116647657* ___signature3, bool ___tryNonStandardEncoding4, const RuntimeMethod* method);
// System.Byte[] Mono.Security.Cryptography.PKCS1::RSAVP1(System.Security.Cryptography.RSA,System.Byte[])
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* PKCS1_RSAVP1_m43771175 (RuntimeObject * __this /* static, unused */, RSA_t2385438082 * ___rsa0, ByteU5BU5D_t4116647657* ___s1, const RuntimeMethod* method);
// System.Boolean Mono.Security.Cryptography.PKCS1::Compare(System.Byte[],System.Byte[])
extern "C" IL2CPP_METHOD_ATTR bool PKCS1_Compare_m8562819 (RuntimeObject * __this /* static, unused */, ByteU5BU5D_t4116647657* ___array10, ByteU5BU5D_t4116647657* ___array21, const RuntimeMethod* method);
// System.Void System.Security.Cryptography.CryptographicException::.ctor(System.String)
extern "C" IL2CPP_METHOD_ATTR void CryptographicException__ctor_m503735289 (CryptographicException_t248831461 * __this, String_t* p0, const RuntimeMethod* method);
// System.String System.Security.Cryptography.CryptoConfig::MapNameToOID(System.String)
extern "C" IL2CPP_METHOD_ATTR String_t* CryptoConfig_MapNameToOID_m2044758263 (RuntimeObject * __this /* static, unused */, String_t* p0, const RuntimeMethod* method);
// System.Int32 System.Math::Max(System.Int32,System.Int32)
extern "C" IL2CPP_METHOD_ATTR int32_t Math_Max_m1873195862 (RuntimeObject * __this /* static, unused */, int32_t p0, int32_t p1, const RuntimeMethod* method);
// System.Void Mono.Security.Cryptography.PKCS8/EncryptedPrivateKeyInfo::.ctor()
extern "C" IL2CPP_METHOD_ATTR void EncryptedPrivateKeyInfo__ctor_m3415744930 (EncryptedPrivateKeyInfo_t862116836 * __this, const RuntimeMethod* method);
// System.Void Mono.Security.Cryptography.PKCS8/EncryptedPrivateKeyInfo::Decode(System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void EncryptedPrivateKeyInfo_Decode_m3008916518 (EncryptedPrivateKeyInfo_t862116836 * __this, ByteU5BU5D_t4116647657* ___data0, const RuntimeMethod* method);
// Mono.Security.ASN1 Mono.Security.ASN1::get_Item(System.Int32)
extern "C" IL2CPP_METHOD_ATTR ASN1_t2114160833 * ASN1_get_Item_m2255075813 (ASN1_t2114160833 * __this, int32_t ___index0, const RuntimeMethod* method);
// System.String Mono.Security.ASN1Convert::ToOid(Mono.Security.ASN1)
extern "C" IL2CPP_METHOD_ATTR String_t* ASN1Convert_ToOid_m3847701408 (RuntimeObject * __this /* static, unused */, ASN1_t2114160833 * ___asn10, const RuntimeMethod* method);
// System.Int32 Mono.Security.ASN1Convert::ToInt32(Mono.Security.ASN1)
extern "C" IL2CPP_METHOD_ATTR int32_t ASN1Convert_ToInt32_m1017403318 (RuntimeObject * __this /* static, unused */, ASN1_t2114160833 * ___asn10, const RuntimeMethod* method);
// System.Void Mono.Security.Cryptography.PKCS8/PrivateKeyInfo::.ctor()
extern "C" IL2CPP_METHOD_ATTR void PrivateKeyInfo__ctor_m3331475997 (PrivateKeyInfo_t668027993 * __this, const RuntimeMethod* method);
// System.Void Mono.Security.Cryptography.PKCS8/PrivateKeyInfo::Decode(System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void PrivateKeyInfo_Decode_m986145117 (PrivateKeyInfo_t668027993 * __this, ByteU5BU5D_t4116647657* ___data0, const RuntimeMethod* method);
// System.Byte[] Mono.Security.Cryptography.PKCS8/PrivateKeyInfo::RemoveLeadingZero(System.Byte[])
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* PrivateKeyInfo_RemoveLeadingZero_m3592760008 (RuntimeObject * __this /* static, unused */, ByteU5BU5D_t4116647657* ___bigInt0, const RuntimeMethod* method);
// System.Byte[] Mono.Security.Cryptography.PKCS8/PrivateKeyInfo::Normalize(System.Byte[],System.Int32)
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* PrivateKeyInfo_Normalize_m2274647848 (RuntimeObject * __this /* static, unused */, ByteU5BU5D_t4116647657* ___bigInt0, int32_t ___length1, const RuntimeMethod* method);
// System.Security.Cryptography.RSA System.Security.Cryptography.RSA::Create()
extern "C" IL2CPP_METHOD_ATTR RSA_t2385438082 * RSA_Create_m4065275734 (RuntimeObject * __this /* static, unused */, const RuntimeMethod* method);
// System.Void System.Security.Cryptography.CspParameters::.ctor()
extern "C" IL2CPP_METHOD_ATTR void CspParameters__ctor_m277845443 (CspParameters_t239852639 * __this, const RuntimeMethod* method);
// System.Void System.Security.Cryptography.CspParameters::set_Flags(System.Security.Cryptography.CspProviderFlags)
extern "C" IL2CPP_METHOD_ATTR void CspParameters_set_Flags_m397261363 (CspParameters_t239852639 * __this, int32_t p0, const RuntimeMethod* method);
// System.Void System.Security.Cryptography.RSACryptoServiceProvider::.ctor(System.Security.Cryptography.CspParameters)
extern "C" IL2CPP_METHOD_ATTR void RSACryptoServiceProvider__ctor_m357386130 (RSACryptoServiceProvider_t2683512874 * __this, CspParameters_t239852639 * p0, const RuntimeMethod* method);
// System.Security.Cryptography.DSA System.Security.Cryptography.DSA::Create()
extern "C" IL2CPP_METHOD_ATTR DSA_t2386879874 * DSA_Create_m1220983153 (RuntimeObject * __this /* static, unused */, const RuntimeMethod* method);
// System.Void System.Security.Cryptography.SymmetricAlgorithm::.ctor()
extern "C" IL2CPP_METHOD_ATTR void SymmetricAlgorithm__ctor_m467277132 (SymmetricAlgorithm_t4254223087 * __this, const RuntimeMethod* method);
// System.Void System.Security.Cryptography.KeySizes::.ctor(System.Int32,System.Int32,System.Int32)
extern "C" IL2CPP_METHOD_ATTR void KeySizes__ctor_m3113946058 (KeySizes_t85027896 * __this, int32_t p0, int32_t p1, int32_t p2, const RuntimeMethod* method);
// System.Void Mono.Security.Cryptography.RSAManaged::.ctor(System.Int32)
extern "C" IL2CPP_METHOD_ATTR void RSAManaged__ctor_m350841446 (RSAManaged_t1757093820 * __this, int32_t ___keySize0, const RuntimeMethod* method);
// System.Void System.Security.Cryptography.RSA::.ctor()
extern "C" IL2CPP_METHOD_ATTR void RSA__ctor_m2923348713 (RSA_t2385438082 * __this, const RuntimeMethod* method);
// System.Void System.Security.Cryptography.AsymmetricAlgorithm::set_KeySize(System.Int32)
extern "C" IL2CPP_METHOD_ATTR void AsymmetricAlgorithm_set_KeySize_m2163393617 (AsymmetricAlgorithm_t932037087 * __this, int32_t p0, const RuntimeMethod* method);
// System.Void System.Object::Finalize()
extern "C" IL2CPP_METHOD_ATTR void Object_Finalize_m3076187857 (RuntimeObject * __this, const RuntimeMethod* method);
// Mono.Math.BigInteger Mono.Math.BigInteger::GeneratePseudoPrime(System.Int32)
extern "C" IL2CPP_METHOD_ATTR BigInteger_t2902905090 * BigInteger_GeneratePseudoPrime_m2547138838 (RuntimeObject * __this /* static, unused */, int32_t ___bits0, const RuntimeMethod* method);
// System.Boolean Mono.Math.BigInteger::op_LessThan(Mono.Math.BigInteger,Mono.Math.BigInteger)
extern "C" IL2CPP_METHOD_ATTR bool BigInteger_op_LessThan_m463398176 (RuntimeObject * __this /* static, unused */, BigInteger_t2902905090 * ___bi10, BigInteger_t2902905090 * ___bi21, const RuntimeMethod* method);
// Mono.Math.BigInteger Mono.Math.BigInteger::ModInverse(Mono.Math.BigInteger)
extern "C" IL2CPP_METHOD_ATTR BigInteger_t2902905090 * BigInteger_ModInverse_m2426215562 (BigInteger_t2902905090 * __this, BigInteger_t2902905090 * ___modulus0, const RuntimeMethod* method);
// System.Void Mono.Security.Cryptography.RSAManaged/KeyGeneratedEventHandler::Invoke(System.Object,System.EventArgs)
extern "C" IL2CPP_METHOD_ATTR void KeyGeneratedEventHandler_Invoke_m99769071 (KeyGeneratedEventHandler_t3064139578 * __this, RuntimeObject * ___sender0, EventArgs_t3591816995 * ___e1, const RuntimeMethod* method);
// System.Int32 System.Security.Cryptography.AsymmetricAlgorithm::get_KeySize()
extern "C" IL2CPP_METHOD_ATTR int32_t AsymmetricAlgorithm_get_KeySize_m2113907895 (AsymmetricAlgorithm_t932037087 * __this, const RuntimeMethod* method);
// System.Void System.ObjectDisposedException::.ctor(System.String)
extern "C" IL2CPP_METHOD_ATTR void ObjectDisposedException__ctor_m3603759869 (ObjectDisposedException_t21392786 * __this, String_t* p0, const RuntimeMethod* method);
// System.Void Mono.Security.Cryptography.RSAManaged::GenerateKeyPair()
extern "C" IL2CPP_METHOD_ATTR void RSAManaged_GenerateKeyPair_m2364618953 (RSAManaged_t1757093820 * __this, const RuntimeMethod* method);
// System.Void Mono.Math.BigInteger::.ctor(System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void BigInteger__ctor_m2601366464 (BigInteger_t2902905090 * __this, ByteU5BU5D_t4116647657* ___inData0, const RuntimeMethod* method);
// Mono.Math.BigInteger Mono.Math.BigInteger::ModPow(Mono.Math.BigInteger,Mono.Math.BigInteger)
extern "C" IL2CPP_METHOD_ATTR BigInteger_t2902905090 * BigInteger_ModPow_m3776562770 (BigInteger_t2902905090 * __this, BigInteger_t2902905090 * ___exp0, BigInteger_t2902905090 * ___n1, const RuntimeMethod* method);
// Mono.Math.BigInteger Mono.Math.BigInteger::op_Addition(Mono.Math.BigInteger,Mono.Math.BigInteger)
extern "C" IL2CPP_METHOD_ATTR BigInteger_t2902905090 * BigInteger_op_Addition_m1114527046 (RuntimeObject * __this /* static, unused */, BigInteger_t2902905090 * ___bi10, BigInteger_t2902905090 * ___bi21, const RuntimeMethod* method);
// System.Boolean Mono.Security.Cryptography.RSAManaged::get_PublicOnly()
extern "C" IL2CPP_METHOD_ATTR bool RSAManaged_get_PublicOnly_m405847294 (RSAManaged_t1757093820 * __this, const RuntimeMethod* method);
// System.Void Mono.Math.BigInteger::Clear()
extern "C" IL2CPP_METHOD_ATTR void BigInteger_Clear_m2995574218 (BigInteger_t2902905090 * __this, const RuntimeMethod* method);
// System.Byte[] Mono.Security.Cryptography.RSAManaged::GetPaddedValue(Mono.Math.BigInteger,System.Int32)
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* RSAManaged_GetPaddedValue_m2182626630 (RSAManaged_t1757093820 * __this, BigInteger_t2902905090 * ___value0, int32_t ___length1, const RuntimeMethod* method);
// System.Byte[] Mono.Math.BigInteger::GetBytes()
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* BigInteger_GetBytes_m1259701831 (BigInteger_t2902905090 * __this, const RuntimeMethod* method);
// System.String System.Convert::ToBase64String(System.Byte[])
extern "C" IL2CPP_METHOD_ATTR String_t* Convert_ToBase64String_m3839334935 (RuntimeObject * __this /* static, unused */, ByteU5BU5D_t4116647657* p0, const RuntimeMethod* method);
// System.Void Mono.Security.PKCS7/ContentInfo::.ctor()
extern "C" IL2CPP_METHOD_ATTR void ContentInfo__ctor_m1955840786 (ContentInfo_t3218159896 * __this, const RuntimeMethod* method);
// System.Void Mono.Security.PKCS7/ContentInfo::.ctor(Mono.Security.ASN1)
extern "C" IL2CPP_METHOD_ATTR void ContentInfo__ctor_m3397951412 (ContentInfo_t3218159896 * __this, ASN1_t2114160833 * ___asn10, const RuntimeMethod* method);
// System.Void System.ArgumentException::.ctor(System.String)
extern "C" IL2CPP_METHOD_ATTR void ArgumentException__ctor_m1312628991 (ArgumentException_t132251570 * __this, String_t* p0, const RuntimeMethod* method);
// Mono.Security.ASN1 Mono.Security.PKCS7/ContentInfo::GetASN1()
extern "C" IL2CPP_METHOD_ATTR ASN1_t2114160833 * ContentInfo_GetASN1_m2535172199 (ContentInfo_t3218159896 * __this, const RuntimeMethod* method);
// Mono.Security.ASN1 Mono.Security.ASN1Convert::FromOid(System.String)
extern "C" IL2CPP_METHOD_ATTR ASN1_t2114160833 * ASN1Convert_FromOid_m3844102704 (RuntimeObject * __this /* static, unused */, String_t* ___oid0, const RuntimeMethod* method);
// System.Void Mono.Security.PKCS7/EncryptedData::.ctor()
extern "C" IL2CPP_METHOD_ATTR void EncryptedData__ctor_m257803736 (EncryptedData_t3577548733 * __this, const RuntimeMethod* method);
// System.Void Mono.Security.PKCS7/ContentInfo::.ctor(System.String)
extern "C" IL2CPP_METHOD_ATTR void ContentInfo__ctor_m2855743200 (ContentInfo_t3218159896 * __this, String_t* ___oid0, const RuntimeMethod* method);
// System.Void Mono.Security.PKCS7/ContentInfo::set_Content(Mono.Security.ASN1)
extern "C" IL2CPP_METHOD_ATTR void ContentInfo_set_Content_m2581255245 (ContentInfo_t3218159896 * __this, ASN1_t2114160833 * ___value0, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.Alert::inferAlertLevel()
extern "C" IL2CPP_METHOD_ATTR void Alert_inferAlertLevel_m151204576 (Alert_t4059934885 * __this, const RuntimeMethod* method);
// System.Boolean Mono.Security.Protocol.Tls.Alert::get_IsWarning()
extern "C" IL2CPP_METHOD_ATTR bool Alert_get_IsWarning_m1365397992 (Alert_t4059934885 * __this, const RuntimeMethod* method);
// System.Security.Cryptography.X509Certificates.X509Certificate Mono.Security.Protocol.Tls.CertificateSelectionCallback::Invoke(System.Security.Cryptography.X509Certificates.X509CertificateCollection,System.Security.Cryptography.X509Certificates.X509Certificate,System.String,System.Security.Cryptography.X509Certificates.X509CertificateCollection)
extern "C" IL2CPP_METHOD_ATTR X509Certificate_t713131622 * CertificateSelectionCallback_Invoke_m3129973019 (CertificateSelectionCallback_t3743405224 * __this, X509CertificateCollection_t3399372417 * ___clientCertificates0, X509Certificate_t713131622 * ___serverCertificate1, String_t* ___targetHost2, X509CertificateCollection_t3399372417 * ___serverRequestedCertificates3, const RuntimeMethod* method);
// System.Boolean Mono.Security.Protocol.Tls.CertificateValidationCallback::Invoke(System.Security.Cryptography.X509Certificates.X509Certificate,System.Int32[])
extern "C" IL2CPP_METHOD_ATTR bool CertificateValidationCallback_Invoke_m1014111289 (CertificateValidationCallback_t4091668218 * __this, X509Certificate_t713131622 * ___certificate0, Int32U5BU5D_t385246372* ___certificateErrors1, const RuntimeMethod* method);
// Mono.Security.Protocol.Tls.ValidationResult Mono.Security.Protocol.Tls.CertificateValidationCallback2::Invoke(Mono.Security.X509.X509CertificateCollection)
extern "C" IL2CPP_METHOD_ATTR ValidationResult_t3834298736 * CertificateValidationCallback2_Invoke_m3381554834 (CertificateValidationCallback2_t1842476440 * __this, X509CertificateCollection_t1542168550 * ___collection0, const RuntimeMethod* method);
// System.Int32 Mono.Security.Protocol.Tls.CipherSuite::get_HashSize()
extern "C" IL2CPP_METHOD_ATTR int32_t CipherSuite_get_HashSize_m4060916532 (CipherSuite_t3414744575 * __this, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.CipherSuite::createEncryptionCipher()
extern "C" IL2CPP_METHOD_ATTR void CipherSuite_createEncryptionCipher_m2533565116 (CipherSuite_t3414744575 * __this, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.CipherSuite::createDecryptionCipher()
extern "C" IL2CPP_METHOD_ATTR void CipherSuite_createDecryptionCipher_m1176259509 (CipherSuite_t3414744575 * __this, const RuntimeMethod* method);
// System.Security.Cryptography.CipherMode Mono.Security.Protocol.Tls.CipherSuite::get_CipherMode()
extern "C" IL2CPP_METHOD_ATTR int32_t CipherSuite_get_CipherMode_m425550365 (CipherSuite_t3414744575 * __this, const RuntimeMethod* method);
// System.Security.Cryptography.ICryptoTransform Mono.Security.Protocol.Tls.CipherSuite::get_EncryptionCipher()
extern "C" IL2CPP_METHOD_ATTR RuntimeObject* CipherSuite_get_EncryptionCipher_m3029637613 (CipherSuite_t3414744575 * __this, const RuntimeMethod* method);
// System.Security.Cryptography.ICryptoTransform Mono.Security.Protocol.Tls.CipherSuite::get_DecryptionCipher()
extern "C" IL2CPP_METHOD_ATTR RuntimeObject* CipherSuite_get_DecryptionCipher_m2839827488 (CipherSuite_t3414744575 * __this, const RuntimeMethod* method);
// System.Byte[] Mono.Security.Protocol.Tls.Context::GetSecureRandomBytes(System.Int32)
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* Context_GetSecureRandomBytes_m3676009387 (Context_t3971234707 * __this, int32_t ___count0, const RuntimeMethod* method);
// System.Int16 Mono.Security.Protocol.Tls.ClientContext::get_ClientHelloProtocol()
extern "C" IL2CPP_METHOD_ATTR int16_t ClientContext_get_ClientHelloProtocol_m1654639078 (ClientContext_t2797401965 * __this, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.TlsStream::.ctor()
extern "C" IL2CPP_METHOD_ATTR void TlsStream__ctor_m787793111 (TlsStream_t2365453965 * __this, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.TlsStream::Write(System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void TlsStream_Write_m4133894341 (TlsStream_t2365453965 * __this, ByteU5BU5D_t4116647657* ___buffer0, const RuntimeMethod* method);
// System.Byte[] Mono.Security.Protocol.Tls.TlsStream::ToArray()
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* TlsStream_ToArray_m4177184296 (TlsStream_t2365453965 * __this, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.TlsStream::Reset()
extern "C" IL2CPP_METHOD_ATTR void TlsStream_Reset_m369197964 (TlsStream_t2365453965 * __this, const RuntimeMethod* method);
// System.Byte[] Mono.Security.Protocol.Tls.CipherSuite::Expand(System.String,System.Byte[],System.Byte[],System.Int32)
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* CipherSuite_Expand_m2729769226 (CipherSuite_t3414744575 * __this, String_t* ___hashName0, ByteU5BU5D_t4116647657* ___secret1, ByteU5BU5D_t4116647657* ___seed2, int32_t ___length3, const RuntimeMethod* method);
// System.Boolean System.String::op_Equality(System.String,System.String)
extern "C" IL2CPP_METHOD_ATTR bool String_op_Equality_m920492651 (RuntimeObject * __this /* static, unused */, String_t* p0, String_t* p1, const RuntimeMethod* method);
// System.Void Mono.Security.Cryptography.HMAC::.ctor(System.String,System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void HMAC__ctor_m775015853 (HMAC_t3689525210 * __this, String_t* ___hashName0, ByteU5BU5D_t4116647657* ___rgbKey1, const RuntimeMethod* method);
// System.Security.Cryptography.DES System.Security.Cryptography.DES::Create()
extern "C" IL2CPP_METHOD_ATTR DES_t821106792 * DES_Create_m1258183099 (RuntimeObject * __this /* static, unused */, const RuntimeMethod* method);
// System.Security.Cryptography.RC2 System.Security.Cryptography.RC2::Create()
extern "C" IL2CPP_METHOD_ATTR RC2_t3167825714 * RC2_Create_m2516417038 (RuntimeObject * __this /* static, unused */, const RuntimeMethod* method);
// System.Void Mono.Security.Cryptography.ARC4Managed::.ctor()
extern "C" IL2CPP_METHOD_ATTR void ARC4Managed__ctor_m2553537404 (ARC4Managed_t2641858452 * __this, const RuntimeMethod* method);
// System.Security.Cryptography.TripleDES System.Security.Cryptography.TripleDES::Create()
extern "C" IL2CPP_METHOD_ATTR TripleDES_t92303514 * TripleDES_Create_m3761371613 (RuntimeObject * __this /* static, unused */, const RuntimeMethod* method);
// System.Security.Cryptography.Rijndael System.Security.Cryptography.Rijndael::Create()
extern "C" IL2CPP_METHOD_ATTR Rijndael_t2986313634 * Rijndael_Create_m3053077028 (RuntimeObject * __this /* static, unused */, const RuntimeMethod* method);
// System.Byte[] Mono.Security.Protocol.Tls.Context::get_ClientWriteKey()
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* Context_get_ClientWriteKey_m3174706656 (Context_t3971234707 * __this, const RuntimeMethod* method);
// System.Byte[] Mono.Security.Protocol.Tls.Context::get_ClientWriteIV()
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* Context_get_ClientWriteIV_m1729804632 (Context_t3971234707 * __this, const RuntimeMethod* method);
// System.Byte[] Mono.Security.Protocol.Tls.Context::get_ServerWriteKey()
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* Context_get_ServerWriteKey_m2199131569 (Context_t3971234707 * __this, const RuntimeMethod* method);
// System.Byte[] Mono.Security.Protocol.Tls.Context::get_ServerWriteIV()
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* Context_get_ServerWriteIV_m1839374659 (Context_t3971234707 * __this, const RuntimeMethod* method);
// System.String Mono.Security.Protocol.Tls.CipherSuite::get_HashAlgorithmName()
extern "C" IL2CPP_METHOD_ATTR String_t* CipherSuite_get_HashAlgorithmName_m3758129154 (CipherSuite_t3414744575 * __this, const RuntimeMethod* method);
// Mono.Security.Protocol.Tls.SecurityParameters Mono.Security.Protocol.Tls.Context::get_Negotiating()
extern "C" IL2CPP_METHOD_ATTR SecurityParameters_t2199972650 * Context_get_Negotiating_m2044579817 (Context_t3971234707 * __this, const RuntimeMethod* method);
// System.Byte[] Mono.Security.Protocol.Tls.SecurityParameters::get_ClientWriteMAC()
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* SecurityParameters_get_ClientWriteMAC_m225554750 (SecurityParameters_t2199972650 * __this, const RuntimeMethod* method);
// System.Byte[] Mono.Security.Protocol.Tls.SecurityParameters::get_ServerWriteMAC()
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* SecurityParameters_get_ServerWriteMAC_m3430427271 (SecurityParameters_t2199972650 * __this, const RuntimeMethod* method);
// Mono.Security.Protocol.Tls.CipherSuite Mono.Security.Protocol.Tls.CipherSuiteCollection::get_Item(System.Int32)
extern "C" IL2CPP_METHOD_ATTR CipherSuite_t3414744575 * CipherSuiteCollection_get_Item_m4188309062 (CipherSuiteCollection_t1129639304 * __this, int32_t ___index0, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.CipherSuiteCollection::set_Item(System.Int32,Mono.Security.Protocol.Tls.CipherSuite)
extern "C" IL2CPP_METHOD_ATTR void CipherSuiteCollection_set_Item_m2392524001 (CipherSuiteCollection_t1129639304 * __this, int32_t ___index0, CipherSuite_t3414744575 * ___value1, const RuntimeMethod* method);
// System.Int32 Mono.Security.Protocol.Tls.CipherSuiteCollection::IndexOf(System.String)
extern "C" IL2CPP_METHOD_ATTR int32_t CipherSuiteCollection_IndexOf_m2232557119 (CipherSuiteCollection_t1129639304 * __this, String_t* ___name0, const RuntimeMethod* method);
// System.Int32 Mono.Security.Protocol.Tls.CipherSuiteCollection::IndexOf(System.Int16)
extern "C" IL2CPP_METHOD_ATTR int32_t CipherSuiteCollection_IndexOf_m2770510321 (CipherSuiteCollection_t1129639304 * __this, int16_t ___code0, const RuntimeMethod* method);
// System.String Mono.Security.Protocol.Tls.CipherSuite::get_Name()
extern "C" IL2CPP_METHOD_ATTR String_t* CipherSuite_get_Name_m1137568068 (CipherSuite_t3414744575 * __this, const RuntimeMethod* method);
// System.Boolean Mono.Security.Protocol.Tls.CipherSuiteCollection::cultureAwareCompare(System.String,System.String)
extern "C" IL2CPP_METHOD_ATTR bool CipherSuiteCollection_cultureAwareCompare_m2072548979 (CipherSuiteCollection_t1129639304 * __this, String_t* ___strA0, String_t* ___strB1, const RuntimeMethod* method);
// System.Int16 Mono.Security.Protocol.Tls.CipherSuite::get_Code()
extern "C" IL2CPP_METHOD_ATTR int16_t CipherSuite_get_Code_m3847824475 (CipherSuite_t3414744575 * __this, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.TlsCipherSuite::.ctor(System.Int16,System.String,Mono.Security.Protocol.Tls.CipherAlgorithmType,Mono.Security.Protocol.Tls.HashAlgorithmType,Mono.Security.Protocol.Tls.ExchangeAlgorithmType,System.Boolean,System.Boolean,System.Byte,System.Byte,System.Int16,System.Byte,System.Byte)
extern "C" IL2CPP_METHOD_ATTR void TlsCipherSuite__ctor_m3580955828 (TlsCipherSuite_t1545013223 * __this, int16_t ___code0, String_t* ___name1, int32_t ___cipherAlgorithmType2, int32_t ___hashAlgorithmType3, int32_t ___exchangeAlgorithmType4, bool ___exportable5, bool ___blockMode6, uint8_t ___keyMaterialSize7, uint8_t ___expandedKeyMaterialSize8, int16_t ___effectiveKeyBytes9, uint8_t ___ivSize10, uint8_t ___blockSize11, const RuntimeMethod* method);
// Mono.Security.Protocol.Tls.TlsCipherSuite Mono.Security.Protocol.Tls.CipherSuiteCollection::add(Mono.Security.Protocol.Tls.TlsCipherSuite)
extern "C" IL2CPP_METHOD_ATTR TlsCipherSuite_t1545013223 * CipherSuiteCollection_add_m3005595589 (CipherSuiteCollection_t1129639304 * __this, TlsCipherSuite_t1545013223 * ___cipherSuite0, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.SslCipherSuite::.ctor(System.Int16,System.String,Mono.Security.Protocol.Tls.CipherAlgorithmType,Mono.Security.Protocol.Tls.HashAlgorithmType,Mono.Security.Protocol.Tls.ExchangeAlgorithmType,System.Boolean,System.Boolean,System.Byte,System.Byte,System.Int16,System.Byte,System.Byte)
extern "C" IL2CPP_METHOD_ATTR void SslCipherSuite__ctor_m1470082018 (SslCipherSuite_t1981645747 * __this, int16_t ___code0, String_t* ___name1, int32_t ___cipherAlgorithmType2, int32_t ___hashAlgorithmType3, int32_t ___exchangeAlgorithmType4, bool ___exportable5, bool ___blockMode6, uint8_t ___keyMaterialSize7, uint8_t ___expandedKeyMaterialSize8, int16_t ___effectiveKeyBytes9, uint8_t ___ivSize10, uint8_t ___blockSize11, const RuntimeMethod* method);
// Mono.Security.Protocol.Tls.SslCipherSuite Mono.Security.Protocol.Tls.CipherSuiteCollection::add(Mono.Security.Protocol.Tls.SslCipherSuite)
extern "C" IL2CPP_METHOD_ATTR SslCipherSuite_t1981645747 * CipherSuiteCollection_add_m1422128145 (CipherSuiteCollection_t1129639304 * __this, SslCipherSuite_t1981645747 * ___cipherSuite0, const RuntimeMethod* method);
// System.Globalization.CultureInfo System.Globalization.CultureInfo::get_CurrentCulture()
extern "C" IL2CPP_METHOD_ATTR CultureInfo_t4157843068 * CultureInfo_get_CurrentCulture_m1632690660 (RuntimeObject * __this /* static, unused */, const RuntimeMethod* method);
// Mono.Security.Protocol.Tls.CipherSuiteCollection Mono.Security.Protocol.Tls.CipherSuiteFactory::GetTls1SupportedCiphers()
extern "C" IL2CPP_METHOD_ATTR CipherSuiteCollection_t1129639304 * CipherSuiteFactory_GetTls1SupportedCiphers_m3691819504 (RuntimeObject * __this /* static, unused */, const RuntimeMethod* method);
// Mono.Security.Protocol.Tls.CipherSuiteCollection Mono.Security.Protocol.Tls.CipherSuiteFactory::GetSsl3SupportedCiphers()
extern "C" IL2CPP_METHOD_ATTR CipherSuiteCollection_t1129639304 * CipherSuiteFactory_GetSsl3SupportedCiphers_m3757358569 (RuntimeObject * __this /* static, unused */, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.CipherSuiteCollection::.ctor(Mono.Security.Protocol.Tls.SecurityProtocolType)
extern "C" IL2CPP_METHOD_ATTR void CipherSuiteCollection__ctor_m384434353 (CipherSuiteCollection_t1129639304 * __this, int32_t ___protocol0, const RuntimeMethod* method);
// Mono.Security.Protocol.Tls.CipherSuite Mono.Security.Protocol.Tls.CipherSuiteCollection::Add(System.Int16,System.String,Mono.Security.Protocol.Tls.CipherAlgorithmType,Mono.Security.Protocol.Tls.HashAlgorithmType,Mono.Security.Protocol.Tls.ExchangeAlgorithmType,System.Boolean,System.Boolean,System.Byte,System.Byte,System.Int16,System.Byte,System.Byte)
extern "C" IL2CPP_METHOD_ATTR CipherSuite_t3414744575 * CipherSuiteCollection_Add_m2046232751 (CipherSuiteCollection_t1129639304 * __this, int16_t ___code0, String_t* ___name1, int32_t ___cipherType2, int32_t ___hashType3, int32_t ___exchangeType4, bool ___exportable5, bool ___blockMode6, uint8_t ___keyMaterialSize7, uint8_t ___expandedKeyMaterialSize8, int16_t ___effectiveKeyBytes9, uint8_t ___ivSize10, uint8_t ___blockSize11, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.Context::.ctor(Mono.Security.Protocol.Tls.SecurityProtocolType)
extern "C" IL2CPP_METHOD_ATTR void Context__ctor_m1288667393 (Context_t3971234707 * __this, int32_t ___securityProtocolType0, const RuntimeMethod* method);
// Mono.Security.Protocol.Tls.TlsClientSettings Mono.Security.Protocol.Tls.Context::get_ClientSettings()
extern "C" IL2CPP_METHOD_ATTR TlsClientSettings_t2486039503 * Context_get_ClientSettings_m2874391194 (Context_t3971234707 * __this, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.TlsClientSettings::set_Certificates(System.Security.Cryptography.X509Certificates.X509CertificateCollection)
extern "C" IL2CPP_METHOD_ATTR void TlsClientSettings_set_Certificates_m3887201895 (TlsClientSettings_t2486039503 * __this, X509CertificateCollection_t3399372417 * ___value0, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.TlsClientSettings::set_TargetHost(System.String)
extern "C" IL2CPP_METHOD_ATTR void TlsClientSettings_set_TargetHost_m3350021121 (TlsClientSettings_t2486039503 * __this, String_t* ___value0, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.Context::Clear()
extern "C" IL2CPP_METHOD_ATTR void Context_Clear_m2678836033 (Context_t3971234707 * __this, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.RecordProtocol::.ctor(System.IO.Stream,Mono.Security.Protocol.Tls.Context)
extern "C" IL2CPP_METHOD_ATTR void RecordProtocol__ctor_m1695232390 (RecordProtocol_t3759049701 * __this, Stream_t1273022909 * ___innerStream0, Context_t3971234707 * ___context1, const RuntimeMethod* method);
// Mono.Security.Protocol.Tls.Handshake.HandshakeMessage Mono.Security.Protocol.Tls.ClientRecordProtocol::createClientHandshakeMessage(Mono.Security.Protocol.Tls.Handshake.HandshakeType)
extern "C" IL2CPP_METHOD_ATTR HandshakeMessage_t3696583168 * ClientRecordProtocol_createClientHandshakeMessage_m3325677558 (ClientRecordProtocol_t2031137796 * __this, uint8_t ___type0, const RuntimeMethod* method);
// System.Byte Mono.Security.Protocol.Tls.TlsStream::ReadByte()
extern "C" IL2CPP_METHOD_ATTR uint8_t TlsStream_ReadByte_m3396126844 (TlsStream_t2365453965 * __this, const RuntimeMethod* method);
// System.Int32 Mono.Security.Protocol.Tls.TlsStream::ReadInt24()
extern "C" IL2CPP_METHOD_ATTR int32_t TlsStream_ReadInt24_m3096782201 (TlsStream_t2365453965 * __this, const RuntimeMethod* method);
// Mono.Security.Protocol.Tls.Handshake.HandshakeMessage Mono.Security.Protocol.Tls.ClientRecordProtocol::createServerHandshakeMessage(Mono.Security.Protocol.Tls.Handshake.HandshakeType,System.Byte[])
extern "C" IL2CPP_METHOD_ATTR HandshakeMessage_t3696583168 * ClientRecordProtocol_createServerHandshakeMessage_m2804371400 (ClientRecordProtocol_t2031137796 * __this, uint8_t ___type0, ByteU5BU5D_t4116647657* ___buffer1, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.Handshake.HandshakeMessage::Process()
extern "C" IL2CPP_METHOD_ATTR void HandshakeMessage_Process_m810828609 (HandshakeMessage_t3696583168 * __this, const RuntimeMethod* method);
// Mono.Security.Protocol.Tls.Context Mono.Security.Protocol.Tls.RecordProtocol::get_Context()
extern "C" IL2CPP_METHOD_ATTR Context_t3971234707 * RecordProtocol_get_Context_m3273611300 (RecordProtocol_t3759049701 * __this, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.Context::set_LastHandshakeMsg(Mono.Security.Protocol.Tls.Handshake.HandshakeType)
extern "C" IL2CPP_METHOD_ATTR void Context_set_LastHandshakeMsg_m1770618067 (Context_t3971234707 * __this, uint8_t ___value0, const RuntimeMethod* method);
// Mono.Security.Protocol.Tls.TlsStream Mono.Security.Protocol.Tls.Context::get_HandshakeMessages()
extern "C" IL2CPP_METHOD_ATTR TlsStream_t2365453965 * Context_get_HandshakeMessages_m3655705111 (Context_t3971234707 * __this, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.TlsStream::WriteInt24(System.Int32)
extern "C" IL2CPP_METHOD_ATTR void TlsStream_WriteInt24_m58952549 (TlsStream_t2365453965 * __this, int32_t ___value0, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsClientHello::.ctor(Mono.Security.Protocol.Tls.Context)
extern "C" IL2CPP_METHOD_ATTR void TlsClientHello__ctor_m1986768336 (TlsClientHello_t97965998 * __this, Context_t3971234707 * ___context0, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsClientCertificate::.ctor(Mono.Security.Protocol.Tls.Context)
extern "C" IL2CPP_METHOD_ATTR void TlsClientCertificate__ctor_m101524132 (TlsClientCertificate_t3519510577 * __this, Context_t3971234707 * ___context0, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsClientKeyExchange::.ctor(Mono.Security.Protocol.Tls.Context)
extern "C" IL2CPP_METHOD_ATTR void TlsClientKeyExchange__ctor_m31786095 (TlsClientKeyExchange_t643923608 * __this, Context_t3971234707 * ___context0, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsClientCertificateVerify::.ctor(Mono.Security.Protocol.Tls.Context)
extern "C" IL2CPP_METHOD_ATTR void TlsClientCertificateVerify__ctor_m1589614281 (TlsClientCertificateVerify_t1824902654 * __this, Context_t3971234707 * ___context0, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsClientFinished::.ctor(Mono.Security.Protocol.Tls.Context)
extern "C" IL2CPP_METHOD_ATTR void TlsClientFinished__ctor_m399357014 (TlsClientFinished_t2486981163 * __this, Context_t3971234707 * ___context0, const RuntimeMethod* method);
// System.Void System.InvalidOperationException::.ctor(System.String)
extern "C" IL2CPP_METHOD_ATTR void InvalidOperationException__ctor_m237278729 (InvalidOperationException_t56020091 * __this, String_t* p0, const RuntimeMethod* method);
// Mono.Security.Protocol.Tls.HandshakeState Mono.Security.Protocol.Tls.Context::get_HandshakeState()
extern "C" IL2CPP_METHOD_ATTR int32_t Context_get_HandshakeState_m2425796590 (Context_t3971234707 * __this, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.Context::set_HandshakeState(Mono.Security.Protocol.Tls.HandshakeState)
extern "C" IL2CPP_METHOD_ATTR void Context_set_HandshakeState_m1329976135 (Context_t3971234707 * __this, int32_t ___value0, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.RecordProtocol::SendAlert(Mono.Security.Protocol.Tls.AlertLevel,Mono.Security.Protocol.Tls.AlertDescription)
extern "C" IL2CPP_METHOD_ATTR void RecordProtocol_SendAlert_m2670098001 (RecordProtocol_t3759049701 * __this, uint8_t ___level0, uint8_t ___description1, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsServerHello::.ctor(Mono.Security.Protocol.Tls.Context,System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void TlsServerHello__ctor_m3887266572 (TlsServerHello_t3343859594 * __this, Context_t3971234707 * ___context0, ByteU5BU5D_t4116647657* ___buffer1, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsServerCertificate::.ctor(Mono.Security.Protocol.Tls.Context,System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void TlsServerCertificate__ctor_m389328097 (TlsServerCertificate_t2716496392 * __this, Context_t3971234707 * ___context0, ByteU5BU5D_t4116647657* ___buffer1, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsServerKeyExchange::.ctor(Mono.Security.Protocol.Tls.Context,System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void TlsServerKeyExchange__ctor_m3572942737 (TlsServerKeyExchange_t699469151 * __this, Context_t3971234707 * ___context0, ByteU5BU5D_t4116647657* ___buffer1, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsServerCertificateRequest::.ctor(Mono.Security.Protocol.Tls.Context,System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void TlsServerCertificateRequest__ctor_m1334974076 (TlsServerCertificateRequest_t3690397592 * __this, Context_t3971234707 * ___context0, ByteU5BU5D_t4116647657* ___buffer1, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsServerHelloDone::.ctor(Mono.Security.Protocol.Tls.Context,System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void TlsServerHelloDone__ctor_m173627900 (TlsServerHelloDone_t1850379324 * __this, Context_t3971234707 * ___context0, ByteU5BU5D_t4116647657* ___buffer1, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsServerFinished::.ctor(Mono.Security.Protocol.Tls.Context,System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void TlsServerFinished__ctor_m1445633918 (TlsServerFinished_t3860330041 * __this, Context_t3971234707 * ___context0, ByteU5BU5D_t4116647657* ___buffer1, const RuntimeMethod* method);
// System.Globalization.CultureInfo System.Globalization.CultureInfo::get_CurrentUICulture()
extern "C" IL2CPP_METHOD_ATTR CultureInfo_t4157843068 * CultureInfo_get_CurrentUICulture_m959203371 (RuntimeObject * __this /* static, unused */, const RuntimeMethod* method);
// System.String System.String::Format(System.IFormatProvider,System.String,System.Object[])
extern "C" IL2CPP_METHOD_ATTR String_t* String_Format_m1881875187 (RuntimeObject * __this /* static, unused */, RuntimeObject* p0, String_t* p1, ObjectU5BU5D_t2843939325* p2, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.TlsException::.ctor(Mono.Security.Protocol.Tls.AlertDescription,System.String)
extern "C" IL2CPP_METHOD_ATTR void TlsException__ctor_m3242533711 (TlsException_t3534743363 * __this, uint8_t ___description0, String_t* ___message1, const RuntimeMethod* method);
// System.Void System.Collections.Hashtable::.ctor()
extern "C" IL2CPP_METHOD_ATTR void Hashtable__ctor_m1815022027 (Hashtable_t1853889766 * __this, const RuntimeMethod* method);
// System.Void System.Threading.Monitor::Enter(System.Object)
extern "C" IL2CPP_METHOD_ATTR void Monitor_Enter_m2249409497 (RuntimeObject * __this /* static, unused */, RuntimeObject * p0, const RuntimeMethod* method);
// System.String System.BitConverter::ToString(System.Byte[])
extern "C" IL2CPP_METHOD_ATTR String_t* BitConverter_ToString_m3464863163 (RuntimeObject * __this /* static, unused */, ByteU5BU5D_t4116647657* p0, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.ClientSessionInfo::.ctor(System.String,System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void ClientSessionInfo__ctor_m2436192270 (ClientSessionInfo_t1775821398 * __this, String_t* ___hostname0, ByteU5BU5D_t4116647657* ___id1, const RuntimeMethod* method);
// System.String Mono.Security.Protocol.Tls.ClientSessionInfo::get_HostName()
extern "C" IL2CPP_METHOD_ATTR String_t* ClientSessionInfo_get_HostName_m2118440995 (ClientSessionInfo_t1775821398 * __this, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.ClientSessionInfo::KeepAlive()
extern "C" IL2CPP_METHOD_ATTR void ClientSessionInfo_KeepAlive_m1020179566 (ClientSessionInfo_t1775821398 * __this, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.ClientSessionInfo::Dispose()
extern "C" IL2CPP_METHOD_ATTR void ClientSessionInfo_Dispose_m1535509451 (ClientSessionInfo_t1775821398 * __this, const RuntimeMethod* method);
// System.Void System.Threading.Monitor::Exit(System.Object)
extern "C" IL2CPP_METHOD_ATTR void Monitor_Exit_m3585316909 (RuntimeObject * __this /* static, unused */, RuntimeObject * p0, const RuntimeMethod* method);
// System.Boolean Mono.Security.Protocol.Tls.ClientSessionInfo::get_Valid()
extern "C" IL2CPP_METHOD_ATTR bool ClientSessionInfo_get_Valid_m1260893789 (ClientSessionInfo_t1775821398 * __this, const RuntimeMethod* method);
// System.Byte[] Mono.Security.Protocol.Tls.ClientSessionInfo::get_Id()
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* ClientSessionInfo_get_Id_m2119140021 (ClientSessionInfo_t1775821398 * __this, const RuntimeMethod* method);
// System.Byte[] Mono.Security.Protocol.Tls.Context::get_SessionId()
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* Context_get_SessionId_m1086671147 (Context_t3971234707 * __this, const RuntimeMethod* method);
// System.String Mono.Security.Protocol.Tls.TlsClientSettings::get_TargetHost()
extern "C" IL2CPP_METHOD_ATTR String_t* TlsClientSettings_get_TargetHost_m2463481414 (TlsClientSettings_t2486039503 * __this, const RuntimeMethod* method);
// System.Boolean System.String::op_Inequality(System.String,System.String)
extern "C" IL2CPP_METHOD_ATTR bool String_op_Inequality_m215368492 (RuntimeObject * __this /* static, unused */, String_t* p0, String_t* p1, const RuntimeMethod* method);
// Mono.Security.Protocol.Tls.ClientSessionInfo Mono.Security.Protocol.Tls.ClientSessionCache::FromContext(Mono.Security.Protocol.Tls.Context,System.Boolean)
extern "C" IL2CPP_METHOD_ATTR ClientSessionInfo_t1775821398 * ClientSessionCache_FromContext_m343076119 (RuntimeObject * __this /* static, unused */, Context_t3971234707 * ___context0, bool ___checkValidity1, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.ClientSessionInfo::GetContext(Mono.Security.Protocol.Tls.Context)
extern "C" IL2CPP_METHOD_ATTR void ClientSessionInfo_GetContext_m1679628259 (ClientSessionInfo_t1775821398 * __this, Context_t3971234707 * ___context0, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.ClientSessionInfo::SetContext(Mono.Security.Protocol.Tls.Context)
extern "C" IL2CPP_METHOD_ATTR void ClientSessionInfo_SetContext_m2115875186 (ClientSessionInfo_t1775821398 * __this, Context_t3971234707 * ___context0, const RuntimeMethod* method);
// System.String System.Environment::GetEnvironmentVariable(System.String)
extern "C" IL2CPP_METHOD_ATTR String_t* Environment_GetEnvironmentVariable_m394552009 (RuntimeObject * __this /* static, unused */, String_t* p0, const RuntimeMethod* method);
// System.Int32 System.Int32::Parse(System.String)
extern "C" IL2CPP_METHOD_ATTR int32_t Int32_Parse_m1033611559 (RuntimeObject * __this /* static, unused */, String_t* p0, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.ClientSessionInfo::Dispose(System.Boolean)
extern "C" IL2CPP_METHOD_ATTR void ClientSessionInfo_Dispose_m3253728296 (ClientSessionInfo_t1775821398 * __this, bool ___disposing0, const RuntimeMethod* method);
// System.DateTime System.DateTime::get_UtcNow()
extern "C" IL2CPP_METHOD_ATTR DateTime_t3738529785 DateTime_get_UtcNow_m1393945741 (RuntimeObject * __this /* static, unused */, const RuntimeMethod* method);
// System.Boolean System.DateTime::op_GreaterThan(System.DateTime,System.DateTime)
extern "C" IL2CPP_METHOD_ATTR bool DateTime_op_GreaterThan_m3768590082 (RuntimeObject * __this /* static, unused */, DateTime_t3738529785 p0, DateTime_t3738529785 p1, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.ClientSessionInfo::CheckDisposed()
extern "C" IL2CPP_METHOD_ATTR void ClientSessionInfo_CheckDisposed_m1172439856 (ClientSessionInfo_t1775821398 * __this, const RuntimeMethod* method);
// System.Byte[] Mono.Security.Protocol.Tls.Context::get_MasterSecret()
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* Context_get_MasterSecret_m676083615 (Context_t3971234707 * __this, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.Context::set_MasterSecret(System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void Context_set_MasterSecret_m3419105191 (Context_t3971234707 * __this, ByteU5BU5D_t4116647657* ___value0, const RuntimeMethod* method);
// System.DateTime System.DateTime::AddSeconds(System.Double)
extern "C" IL2CPP_METHOD_ATTR DateTime_t3738529785 DateTime_AddSeconds_m332574389 (DateTime_t3738529785 * __this, double p0, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.Context::set_SecurityProtocol(Mono.Security.Protocol.Tls.SecurityProtocolType)
extern "C" IL2CPP_METHOD_ATTR void Context_set_SecurityProtocol_m2833661610 (Context_t3971234707 * __this, int32_t ___value0, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.TlsServerSettings::.ctor()
extern "C" IL2CPP_METHOD_ATTR void TlsServerSettings__ctor_m373357120 (TlsServerSettings_t4144396432 * __this, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.TlsClientSettings::.ctor()
extern "C" IL2CPP_METHOD_ATTR void TlsClientSettings__ctor_m3220697265 (TlsClientSettings_t2486039503 * __this, const RuntimeMethod* method);
// Mono.Security.Protocol.Tls.SecurityProtocolType Mono.Security.Protocol.Tls.Context::get_SecurityProtocol()
extern "C" IL2CPP_METHOD_ATTR int32_t Context_get_SecurityProtocol_m3228286292 (Context_t3971234707 * __this, const RuntimeMethod* method);
// System.Int64 System.DateTime::get_Ticks()
extern "C" IL2CPP_METHOD_ATTR int64_t DateTime_get_Ticks_m1550640881 (DateTime_t3738529785 * __this, const RuntimeMethod* method);
// Mono.Security.Protocol.Tls.SecurityProtocolType Mono.Security.Protocol.Tls.Context::DecodeProtocolCode(System.Int16)
extern "C" IL2CPP_METHOD_ATTR int32_t Context_DecodeProtocolCode_m2249547310 (Context_t3971234707 * __this, int16_t ___code0, const RuntimeMethod* method);
// Mono.Security.Protocol.Tls.SecurityProtocolType Mono.Security.Protocol.Tls.Context::get_SecurityProtocolFlags()
extern "C" IL2CPP_METHOD_ATTR int32_t Context_get_SecurityProtocolFlags_m2022471746 (Context_t3971234707 * __this, const RuntimeMethod* method);
// Mono.Security.Protocol.Tls.CipherSuiteCollection Mono.Security.Protocol.Tls.Context::get_SupportedCiphers()
extern "C" IL2CPP_METHOD_ATTR CipherSuiteCollection_t1129639304 * Context_get_SupportedCiphers_m1883682196 (Context_t3971234707 * __this, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.CipherSuiteCollection::Clear()
extern "C" IL2CPP_METHOD_ATTR void CipherSuiteCollection_Clear_m2642701260 (CipherSuiteCollection_t1129639304 * __this, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.Context::set_SupportedCiphers(Mono.Security.Protocol.Tls.CipherSuiteCollection)
extern "C" IL2CPP_METHOD_ATTR void Context_set_SupportedCiphers_m4238648387 (Context_t3971234707 * __this, CipherSuiteCollection_t1129639304 * ___value0, const RuntimeMethod* method);
// Mono.Security.Protocol.Tls.CipherSuiteCollection Mono.Security.Protocol.Tls.CipherSuiteFactory::GetSupportedCiphers(Mono.Security.Protocol.Tls.SecurityProtocolType)
extern "C" IL2CPP_METHOD_ATTR CipherSuiteCollection_t1129639304 * CipherSuiteFactory_GetSupportedCiphers_m3260014148 (RuntimeObject * __this /* static, unused */, int32_t ___protocol0, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.SecurityParameters::.ctor()
extern "C" IL2CPP_METHOD_ATTR void SecurityParameters__ctor_m3952189175 (SecurityParameters_t2199972650 * __this, const RuntimeMethod* method);
// Mono.Security.Protocol.Tls.CipherSuite Mono.Security.Protocol.Tls.SecurityParameters::get_Cipher()
extern "C" IL2CPP_METHOD_ATTR CipherSuite_t3414744575 * SecurityParameters_get_Cipher_m108846204 (SecurityParameters_t2199972650 * __this, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.CipherSuite::set_Context(Mono.Security.Protocol.Tls.Context)
extern "C" IL2CPP_METHOD_ATTR void CipherSuite_set_Context_m1978767807 (CipherSuite_t3414744575 * __this, Context_t3971234707 * ___value0, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.SecurityParameters::Clear()
extern "C" IL2CPP_METHOD_ATTR void SecurityParameters_Clear_m680574382 (SecurityParameters_t2199972650 * __this, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.Handshake.HandshakeMessage::.ctor(Mono.Security.Protocol.Tls.Context,Mono.Security.Protocol.Tls.Handshake.HandshakeType)
extern "C" IL2CPP_METHOD_ATTR void HandshakeMessage__ctor_m2692487706 (HandshakeMessage_t3696583168 * __this, Context_t3971234707 * ___context0, uint8_t ___handshakeType1, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsClientCertificate::GetClientCertificate()
extern "C" IL2CPP_METHOD_ATTR void TlsClientCertificate_GetClientCertificate_m566867090 (TlsClientCertificate_t3519510577 * __this, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.Handshake.HandshakeMessage::Update()
extern "C" IL2CPP_METHOD_ATTR void HandshakeMessage_Update_m2417837686 (HandshakeMessage_t3696583168 * __this, const RuntimeMethod* method);
// Mono.Security.Protocol.Tls.Context Mono.Security.Protocol.Tls.Handshake.HandshakeMessage::get_Context()
extern "C" IL2CPP_METHOD_ATTR Context_t3971234707 * HandshakeMessage_get_Context_m3036797856 (HandshakeMessage_t3696583168 * __this, const RuntimeMethod* method);
// System.Security.Cryptography.X509Certificates.X509CertificateCollection Mono.Security.Protocol.Tls.TlsClientSettings::get_Certificates()
extern "C" IL2CPP_METHOD_ATTR X509CertificateCollection_t3399372417 * TlsClientSettings_get_Certificates_m2671943654 (TlsClientSettings_t2486039503 * __this, const RuntimeMethod* method);
// System.Int32 System.Collections.CollectionBase::get_Count()
extern "C" IL2CPP_METHOD_ATTR int32_t CollectionBase_get_Count_m1708965601 (CollectionBase_t2727926298 * __this, const RuntimeMethod* method);
// Mono.Security.Protocol.Tls.SslClientStream Mono.Security.Protocol.Tls.ClientContext::get_SslStream()
extern "C" IL2CPP_METHOD_ATTR SslClientStream_t3914624661 * ClientContext_get_SslStream_m1583577309 (ClientContext_t2797401965 * __this, const RuntimeMethod* method);
// Mono.Security.Protocol.Tls.TlsServerSettings Mono.Security.Protocol.Tls.Context::get_ServerSettings()
extern "C" IL2CPP_METHOD_ATTR TlsServerSettings_t4144396432 * Context_get_ServerSettings_m1982578801 (Context_t3971234707 * __this, const RuntimeMethod* method);
// Mono.Security.X509.X509CertificateCollection Mono.Security.Protocol.Tls.TlsServerSettings::get_Certificates()
extern "C" IL2CPP_METHOD_ATTR X509CertificateCollection_t1542168550 * TlsServerSettings_get_Certificates_m3981837031 (TlsServerSettings_t4144396432 * __this, const RuntimeMethod* method);
// Mono.Security.X509.X509Certificate Mono.Security.X509.X509CertificateCollection::get_Item(System.Int32)
extern "C" IL2CPP_METHOD_ATTR X509Certificate_t489243025 * X509CertificateCollection_get_Item_m3285563224 (X509CertificateCollection_t1542168550 * __this, int32_t ___index0, const RuntimeMethod* method);
// System.Void System.Security.Cryptography.X509Certificates.X509Certificate::.ctor(System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void X509Certificate__ctor_m1413707489 (X509Certificate_t713131622 * __this, ByteU5BU5D_t4116647657* p0, const RuntimeMethod* method);
// System.Security.Cryptography.X509Certificates.X509Certificate Mono.Security.Protocol.Tls.SslClientStream::RaiseClientCertificateSelection(System.Security.Cryptography.X509Certificates.X509CertificateCollection,System.Security.Cryptography.X509Certificates.X509Certificate,System.String,System.Security.Cryptography.X509Certificates.X509CertificateCollection)
extern "C" IL2CPP_METHOD_ATTR X509Certificate_t713131622 * SslClientStream_RaiseClientCertificateSelection_m3936211295 (SslClientStream_t3914624661 * __this, X509CertificateCollection_t3399372417 * ___clientCertificates0, X509Certificate_t713131622 * ___serverCertificate1, String_t* ___targetHost2, X509CertificateCollection_t3399372417 * ___serverRequestedCertificates3, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.TlsClientSettings::set_ClientCertificate(System.Security.Cryptography.X509Certificates.X509Certificate)
extern "C" IL2CPP_METHOD_ATTR void TlsClientSettings_set_ClientCertificate_m3374228612 (TlsClientSettings_t2486039503 * __this, X509Certificate_t713131622 * ___value0, const RuntimeMethod* method);
// System.Security.Cryptography.X509Certificates.X509Certificate Mono.Security.Protocol.Tls.Handshake.Client.TlsClientCertificate::get_ClientCertificate()
extern "C" IL2CPP_METHOD_ATTR X509Certificate_t713131622 * TlsClientCertificate_get_ClientCertificate_m1637836254 (TlsClientCertificate_t3519510577 * __this, const RuntimeMethod* method);
// System.Security.Cryptography.X509Certificates.X509Certificate Mono.Security.Protocol.Tls.Handshake.Client.TlsClientCertificate::FindParentCertificate(System.Security.Cryptography.X509Certificates.X509Certificate)
extern "C" IL2CPP_METHOD_ATTR X509Certificate_t713131622 * TlsClientCertificate_FindParentCertificate_m3844441401 (TlsClientCertificate_t3519510577 * __this, X509Certificate_t713131622 * ___cert0, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsClientCertificate::SendCertificates()
extern "C" IL2CPP_METHOD_ATTR void TlsClientCertificate_SendCertificates_m1965594186 (TlsClientCertificate_t3519510577 * __this, const RuntimeMethod* method);
// System.Security.Cryptography.X509Certificates.X509CertificateCollection/X509CertificateEnumerator System.Security.Cryptography.X509Certificates.X509CertificateCollection::GetEnumerator()
extern "C" IL2CPP_METHOD_ATTR X509CertificateEnumerator_t855273292 * X509CertificateCollection_GetEnumerator_m1686475779 (X509CertificateCollection_t3399372417 * __this, const RuntimeMethod* method);
// System.Security.Cryptography.X509Certificates.X509Certificate System.Security.Cryptography.X509Certificates.X509CertificateCollection/X509CertificateEnumerator::get_Current()
extern "C" IL2CPP_METHOD_ATTR X509Certificate_t713131622 * X509CertificateEnumerator_get_Current_m364341970 (X509CertificateEnumerator_t855273292 * __this, const RuntimeMethod* method);
// System.Boolean System.Security.Cryptography.X509Certificates.X509CertificateCollection/X509CertificateEnumerator::MoveNext()
extern "C" IL2CPP_METHOD_ATTR bool X509CertificateEnumerator_MoveNext_m1557350766 (X509CertificateEnumerator_t855273292 * __this, const RuntimeMethod* method);
// System.Security.Cryptography.X509Certificates.X509Certificate Mono.Security.Protocol.Tls.TlsClientSettings::get_ClientCertificate()
extern "C" IL2CPP_METHOD_ATTR X509Certificate_t713131622 * TlsClientSettings_get_ClientCertificate_m3139459118 (TlsClientSettings_t2486039503 * __this, const RuntimeMethod* method);
// System.Security.Cryptography.AsymmetricAlgorithm Mono.Security.Protocol.Tls.SslClientStream::RaisePrivateKeySelection(System.Security.Cryptography.X509Certificates.X509Certificate,System.String)
extern "C" IL2CPP_METHOD_ATTR AsymmetricAlgorithm_t932037087 * SslClientStream_RaisePrivateKeySelection_m3394190501 (SslClientStream_t3914624661 * __this, X509Certificate_t713131622 * ___certificate0, String_t* ___targetHost1, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.SslHandshakeHash::.ctor(System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void SslHandshakeHash__ctor_m4169387017 (SslHandshakeHash_t2107581772 * __this, ByteU5BU5D_t4116647657* ___secret0, const RuntimeMethod* method);
// System.Byte[] Mono.Security.Protocol.Tls.SslHandshakeHash::CreateSignature(System.Security.Cryptography.RSA)
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* SslHandshakeHash_CreateSignature_m1634235041 (SslHandshakeHash_t2107581772 * __this, RSA_t2385438082 * ___rsa0, const RuntimeMethod* method);
// System.Security.Cryptography.RSA Mono.Security.Protocol.Tls.Handshake.Client.TlsClientCertificateVerify::getClientCertRSA(System.Security.Cryptography.RSA)
extern "C" IL2CPP_METHOD_ATTR RSA_t2385438082 * TlsClientCertificateVerify_getClientCertRSA_m1205662940 (TlsClientCertificateVerify_t1824902654 * __this, RSA_t2385438082 * ___privKey0, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.TlsStream::Write(System.Int16)
extern "C" IL2CPP_METHOD_ATTR void TlsStream_Write_m1412844442 (TlsStream_t2365453965 * __this, int16_t ___value0, const RuntimeMethod* method);
// System.Void Mono.Security.Cryptography.MD5SHA1::.ctor()
extern "C" IL2CPP_METHOD_ATTR void MD5SHA1__ctor_m4081016482 (MD5SHA1_t723838944 * __this, const RuntimeMethod* method);
// System.Byte[] System.Security.Cryptography.HashAlgorithm::ComputeHash(System.Byte[],System.Int32,System.Int32)
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* HashAlgorithm_ComputeHash_m2044824070 (HashAlgorithm_t1432317219 * __this, ByteU5BU5D_t4116647657* p0, int32_t p1, int32_t p2, const RuntimeMethod* method);
// System.Byte[] Mono.Security.Cryptography.MD5SHA1::CreateSignature(System.Security.Cryptography.RSA)
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* MD5SHA1_CreateSignature_m3583449066 (MD5SHA1_t723838944 * __this, RSA_t2385438082 * ___rsa0, const RuntimeMethod* method);
// System.Security.Cryptography.X509Certificates.X509Certificate System.Security.Cryptography.X509Certificates.X509CertificateCollection::get_Item(System.Int32)
extern "C" IL2CPP_METHOD_ATTR X509Certificate_t713131622 * X509CertificateCollection_get_Item_m1177942658 (X509CertificateCollection_t3399372417 * __this, int32_t p0, const RuntimeMethod* method);
// System.Byte[] Mono.Security.Protocol.Tls.Handshake.Client.TlsClientCertificateVerify::getUnsignedBigInteger(System.Byte[])
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* TlsClientCertificateVerify_getUnsignedBigInteger_m3003216819 (TlsClientCertificateVerify_t1824902654 * __this, ByteU5BU5D_t4116647657* ___integer0, const RuntimeMethod* method);
// Mono.Security.Protocol.Tls.SecurityParameters Mono.Security.Protocol.Tls.Context::get_Write()
extern "C" IL2CPP_METHOD_ATTR SecurityParameters_t2199972650 * Context_get_Write_m1564343513 (Context_t3971234707 * __this, const RuntimeMethod* method);
// System.Byte[] Mono.Security.Protocol.Tls.CipherSuite::PRF(System.Byte[],System.String,System.Byte[],System.Int32)
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* CipherSuite_PRF_m2801806009 (CipherSuite_t3414744575 * __this, ByteU5BU5D_t4116647657* ___secret0, String_t* ___label1, ByteU5BU5D_t4116647657* ___data2, int32_t ___length3, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.Context::set_ClientRandom(System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void Context_set_ClientRandom_m2974454575 (Context_t3971234707 * __this, ByteU5BU5D_t4116647657* ___value0, const RuntimeMethod* method);
// System.Int16 Mono.Security.Protocol.Tls.Context::get_Protocol()
extern "C" IL2CPP_METHOD_ATTR int16_t Context_get_Protocol_m1078422015 (Context_t3971234707 * __this, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.ClientContext::set_ClientHelloProtocol(System.Int16)
extern "C" IL2CPP_METHOD_ATTR void ClientContext_set_ClientHelloProtocol_m4189379912 (ClientContext_t2797401965 * __this, int16_t ___value0, const RuntimeMethod* method);
// System.Int32 Mono.Security.Protocol.Tls.Context::GetUnixTime()
extern "C" IL2CPP_METHOD_ATTR int32_t Context_GetUnixTime_m3811151335 (Context_t3971234707 * __this, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.TlsStream::Write(System.Int32)
extern "C" IL2CPP_METHOD_ATTR void TlsStream_Write_m1413106584 (TlsStream_t2365453965 * __this, int32_t ___value0, const RuntimeMethod* method);
// System.Byte[] Mono.Security.Protocol.Tls.ClientSessionCache::FromHost(System.String)
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* ClientSessionCache_FromHost_m273325760 (RuntimeObject * __this /* static, unused */, String_t* ___host0, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.Context::set_SessionId(System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void Context_set_SessionId_m942328427 (Context_t3971234707 * __this, ByteU5BU5D_t4116647657* ___value0, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.TlsStream::Write(System.Byte)
extern "C" IL2CPP_METHOD_ATTR void TlsStream_Write_m4246040664 (TlsStream_t2365453965 * __this, uint8_t ___value0, const RuntimeMethod* method);
// System.Int32 Mono.Security.Protocol.Tls.CipherSuiteCollection::get_Count()
extern "C" IL2CPP_METHOD_ATTR int32_t CipherSuiteCollection_get_Count_m4271692531 (CipherSuiteCollection_t1129639304 * __this, const RuntimeMethod* method);
// Mono.Security.Protocol.Tls.SecurityCompressionType Mono.Security.Protocol.Tls.Context::get_CompressionMethod()
extern "C" IL2CPP_METHOD_ATTR int32_t Context_get_CompressionMethod_m2647114016 (Context_t3971234707 * __this, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsClientKeyExchange::ProcessCommon(System.Boolean)
extern "C" IL2CPP_METHOD_ATTR void TlsClientKeyExchange_ProcessCommon_m2327374157 (TlsClientKeyExchange_t643923608 * __this, bool ___sendLength0, const RuntimeMethod* method);
// System.Byte[] Mono.Security.Protocol.Tls.CipherSuite::CreatePremasterSecret()
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* CipherSuite_CreatePremasterSecret_m4264566459 (CipherSuite_t3414744575 * __this, const RuntimeMethod* method);
// System.Boolean Mono.Security.Protocol.Tls.TlsServerSettings::get_ServerKeyExchange()
extern "C" IL2CPP_METHOD_ATTR bool TlsServerSettings_get_ServerKeyExchange_m691183033 (TlsServerSettings_t4144396432 * __this, const RuntimeMethod* method);
// System.Void Mono.Security.Cryptography.RSAManaged::.ctor()
extern "C" IL2CPP_METHOD_ATTR void RSAManaged__ctor_m3504773110 (RSAManaged_t1757093820 * __this, const RuntimeMethod* method);
// System.Security.Cryptography.RSAParameters Mono.Security.Protocol.Tls.TlsServerSettings::get_RsaParameters()
extern "C" IL2CPP_METHOD_ATTR RSAParameters_t1728406613 TlsServerSettings_get_RsaParameters_m2264301690 (TlsServerSettings_t4144396432 * __this, const RuntimeMethod* method);
// System.Security.Cryptography.RSA Mono.Security.Protocol.Tls.TlsServerSettings::get_CertificateRSA()
extern "C" IL2CPP_METHOD_ATTR RSA_t2385438082 * TlsServerSettings_get_CertificateRSA_m597274968 (TlsServerSettings_t4144396432 * __this, const RuntimeMethod* method);
// System.Void System.Security.Cryptography.RSAPKCS1KeyExchangeFormatter::.ctor(System.Security.Cryptography.AsymmetricAlgorithm)
extern "C" IL2CPP_METHOD_ATTR void RSAPKCS1KeyExchangeFormatter__ctor_m1170240343 (RSAPKCS1KeyExchangeFormatter_t2761096101 * __this, AsymmetricAlgorithm_t932037087 * p0, const RuntimeMethod* method);
// System.Void System.Security.Cryptography.AsymmetricAlgorithm::Clear()
extern "C" IL2CPP_METHOD_ATTR void AsymmetricAlgorithm_Clear_m1528825448 (AsymmetricAlgorithm_t932037087 * __this, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.Handshake.HandshakeMessage::.ctor(Mono.Security.Protocol.Tls.Context,Mono.Security.Protocol.Tls.Handshake.HandshakeType,System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void HandshakeMessage__ctor_m1555296807 (HandshakeMessage_t3696583168 * __this, Context_t3971234707 * ___context0, uint8_t ___handshakeType1, ByteU5BU5D_t4116647657* ___data2, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.TlsServerSettings::set_Certificates(Mono.Security.X509.X509CertificateCollection)
extern "C" IL2CPP_METHOD_ATTR void TlsServerSettings_set_Certificates_m3313375596 (TlsServerSettings_t4144396432 * __this, X509CertificateCollection_t1542168550 * ___value0, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.TlsServerSettings::UpdateCertificateRSA()
extern "C" IL2CPP_METHOD_ATTR void TlsServerSettings_UpdateCertificateRSA_m3985265846 (TlsServerSettings_t4144396432 * __this, const RuntimeMethod* method);
// System.Void Mono.Security.X509.X509CertificateCollection::.ctor()
extern "C" IL2CPP_METHOD_ATTR void X509CertificateCollection__ctor_m2066277891 (X509CertificateCollection_t1542168550 * __this, const RuntimeMethod* method);
// System.Byte[] Mono.Security.Protocol.Tls.TlsStream::ReadBytes(System.Int32)
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* TlsStream_ReadBytes_m2334803179 (TlsStream_t2365453965 * __this, int32_t ___count0, const RuntimeMethod* method);
// System.Void Mono.Security.X509.X509Certificate::.ctor(System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void X509Certificate__ctor_m553243489 (X509Certificate_t489243025 * __this, ByteU5BU5D_t4116647657* ___data0, const RuntimeMethod* method);
// System.Int32 Mono.Security.X509.X509CertificateCollection::Add(Mono.Security.X509.X509Certificate)
extern "C" IL2CPP_METHOD_ATTR int32_t X509CertificateCollection_Add_m2277657976 (X509CertificateCollection_t1542168550 * __this, X509Certificate_t489243025 * ___value0, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsServerCertificate::validateCertificates(Mono.Security.X509.X509CertificateCollection)
extern "C" IL2CPP_METHOD_ATTR void TlsServerCertificate_validateCertificates_m4242999387 (TlsServerCertificate_t2716496392 * __this, X509CertificateCollection_t1542168550 * ___certificates0, const RuntimeMethod* method);
// System.Int32 Mono.Security.X509.X509Certificate::get_Version()
extern "C" IL2CPP_METHOD_ATTR int32_t X509Certificate_get_Version_m3419034307 (X509Certificate_t489243025 * __this, const RuntimeMethod* method);
// Mono.Security.Protocol.Tls.ExchangeAlgorithmType Mono.Security.Protocol.Tls.CipherSuite::get_ExchangeAlgorithmType()
extern "C" IL2CPP_METHOD_ATTR int32_t CipherSuite_get_ExchangeAlgorithmType_m1633709183 (CipherSuite_t3414744575 * __this, const RuntimeMethod* method);
// Mono.Security.X509.X509ExtensionCollection Mono.Security.X509.X509Certificate::get_Extensions()
extern "C" IL2CPP_METHOD_ATTR X509ExtensionCollection_t609554709 * X509Certificate_get_Extensions_m2532937142 (X509Certificate_t489243025 * __this, const RuntimeMethod* method);
// Mono.Security.X509.X509Extension Mono.Security.X509.X509ExtensionCollection::get_Item(System.String)
extern "C" IL2CPP_METHOD_ATTR X509Extension_t3173393653 * X509ExtensionCollection_get_Item_m4249795832 (X509ExtensionCollection_t609554709 * __this, String_t* ___oid0, const RuntimeMethod* method);
// System.Void Mono.Security.X509.Extensions.KeyUsageExtension::.ctor(Mono.Security.X509.X509Extension)
extern "C" IL2CPP_METHOD_ATTR void KeyUsageExtension__ctor_m3414452076 (KeyUsageExtension_t1795615912 * __this, X509Extension_t3173393653 * ___extension0, const RuntimeMethod* method);
// System.Void Mono.Security.X509.Extensions.ExtendedKeyUsageExtension::.ctor(Mono.Security.X509.X509Extension)
extern "C" IL2CPP_METHOD_ATTR void ExtendedKeyUsageExtension__ctor_m3228998638 (ExtendedKeyUsageExtension_t3929363080 * __this, X509Extension_t3173393653 * ___extension0, const RuntimeMethod* method);
// System.Boolean Mono.Security.X509.Extensions.KeyUsageExtension::Support(Mono.Security.X509.Extensions.KeyUsages)
extern "C" IL2CPP_METHOD_ATTR bool KeyUsageExtension_Support_m3508856672 (KeyUsageExtension_t1795615912 * __this, int32_t ___usage0, const RuntimeMethod* method);
// System.Collections.ArrayList Mono.Security.X509.Extensions.ExtendedKeyUsageExtension::get_KeyPurpose()
extern "C" IL2CPP_METHOD_ATTR ArrayList_t2718874744 * ExtendedKeyUsageExtension_get_KeyPurpose_m187586919 (ExtendedKeyUsageExtension_t3929363080 * __this, const RuntimeMethod* method);
// System.Void Mono.Security.X509.Extensions.NetscapeCertTypeExtension::.ctor(Mono.Security.X509.X509Extension)
extern "C" IL2CPP_METHOD_ATTR void NetscapeCertTypeExtension__ctor_m323882095 (NetscapeCertTypeExtension_t1524296876 * __this, X509Extension_t3173393653 * ___extension0, const RuntimeMethod* method);
// System.Boolean Mono.Security.X509.Extensions.NetscapeCertTypeExtension::Support(Mono.Security.X509.Extensions.NetscapeCertTypeExtension/CertTypes)
extern "C" IL2CPP_METHOD_ATTR bool NetscapeCertTypeExtension_Support_m3981181230 (NetscapeCertTypeExtension_t1524296876 * __this, int32_t ___usage0, const RuntimeMethod* method);
// System.Boolean Mono.Security.Protocol.Tls.ValidationResult::get_Trusted()
extern "C" IL2CPP_METHOD_ATTR bool ValidationResult_get_Trusted_m2108852505 (ValidationResult_t3834298736 * __this, const RuntimeMethod* method);
// System.Int32 Mono.Security.Protocol.Tls.ValidationResult::get_ErrorCode()
extern "C" IL2CPP_METHOD_ATTR int32_t ValidationResult_get_ErrorCode_m1533688152 (ValidationResult_t3834298736 * __this, const RuntimeMethod* method);
// System.String System.String::Format(System.String,System.Object)
extern "C" IL2CPP_METHOD_ATTR String_t* String_Format_m2844511972 (RuntimeObject * __this /* static, unused */, String_t* p0, RuntimeObject * p1, const RuntimeMethod* method);
// System.Boolean Mono.Security.Protocol.Tls.Handshake.Client.TlsServerCertificate::checkCertificateUsage(Mono.Security.X509.X509Certificate)
extern "C" IL2CPP_METHOD_ATTR bool TlsServerCertificate_checkCertificateUsage_m2152016773 (TlsServerCertificate_t2716496392 * __this, X509Certificate_t489243025 * ___cert0, const RuntimeMethod* method);
// System.Boolean Mono.Security.Protocol.Tls.Handshake.Client.TlsServerCertificate::checkServerIdentity(Mono.Security.X509.X509Certificate)
extern "C" IL2CPP_METHOD_ATTR bool TlsServerCertificate_checkServerIdentity_m2801575130 (TlsServerCertificate_t2716496392 * __this, X509Certificate_t489243025 * ___cert0, const RuntimeMethod* method);
// System.Void Mono.Security.X509.X509CertificateCollection::.ctor(Mono.Security.X509.X509CertificateCollection)
extern "C" IL2CPP_METHOD_ATTR void X509CertificateCollection__ctor_m3467061452 (X509CertificateCollection_t1542168550 * __this, X509CertificateCollection_t1542168550 * ___value0, const RuntimeMethod* method);
// System.Void Mono.Security.X509.X509CertificateCollection::Remove(Mono.Security.X509.X509Certificate)
extern "C" IL2CPP_METHOD_ATTR void X509CertificateCollection_Remove_m2199606504 (X509CertificateCollection_t1542168550 * __this, X509Certificate_t489243025 * ___value0, const RuntimeMethod* method);
// System.Void Mono.Security.X509.X509Chain::.ctor(Mono.Security.X509.X509CertificateCollection)
extern "C" IL2CPP_METHOD_ATTR void X509Chain__ctor_m1084071882 (X509Chain_t863783600 * __this, X509CertificateCollection_t1542168550 * ___chain0, const RuntimeMethod* method);
// System.Boolean Mono.Security.X509.X509Chain::Build(Mono.Security.X509.X509Certificate)
extern "C" IL2CPP_METHOD_ATTR bool X509Chain_Build_m2469702749 (X509Chain_t863783600 * __this, X509Certificate_t489243025 * ___leaf0, const RuntimeMethod* method);
// Mono.Security.X509.X509ChainStatusFlags Mono.Security.X509.X509Chain::get_Status()
extern "C" IL2CPP_METHOD_ATTR int32_t X509Chain_get_Status_m348797749 (X509Chain_t863783600 * __this, const RuntimeMethod* method);
// System.Type System.Type::GetTypeFromHandle(System.RuntimeTypeHandle)
extern "C" IL2CPP_METHOD_ATTR Type_t * Type_GetTypeFromHandle_m1620074514 (RuntimeObject * __this /* static, unused */, RuntimeTypeHandle_t3027515415 p0, const RuntimeMethod* method);
// System.Void Mono.Security.X509.Extensions.SubjectAltNameExtension::.ctor(Mono.Security.X509.X509Extension)
extern "C" IL2CPP_METHOD_ATTR void SubjectAltNameExtension__ctor_m1991362362 (SubjectAltNameExtension_t1536937677 * __this, X509Extension_t3173393653 * ___extension0, const RuntimeMethod* method);
// System.String[] Mono.Security.X509.Extensions.SubjectAltNameExtension::get_DNSNames()
extern "C" IL2CPP_METHOD_ATTR StringU5BU5D_t1281789340* SubjectAltNameExtension_get_DNSNames_m2346000460 (SubjectAltNameExtension_t1536937677 * __this, const RuntimeMethod* method);
// System.Boolean Mono.Security.Protocol.Tls.Handshake.Client.TlsServerCertificate::Match(System.String,System.String)
extern "C" IL2CPP_METHOD_ATTR bool TlsServerCertificate_Match_m2996121276 (RuntimeObject * __this /* static, unused */, String_t* ___hostname0, String_t* ___pattern1, const RuntimeMethod* method);
// System.String[] Mono.Security.X509.Extensions.SubjectAltNameExtension::get_IPAddresses()
extern "C" IL2CPP_METHOD_ATTR StringU5BU5D_t1281789340* SubjectAltNameExtension_get_IPAddresses_m1641002124 (SubjectAltNameExtension_t1536937677 * __this, const RuntimeMethod* method);
// System.Boolean Mono.Security.Protocol.Tls.Handshake.Client.TlsServerCertificate::checkDomainName(System.String)
extern "C" IL2CPP_METHOD_ATTR bool TlsServerCertificate_checkDomainName_m2543190336 (TlsServerCertificate_t2716496392 * __this, String_t* ___subjectName0, const RuntimeMethod* method);
// System.Void System.Text.RegularExpressions.Regex::.ctor(System.String)
extern "C" IL2CPP_METHOD_ATTR void Regex__ctor_m3948448025 (Regex_t3657309853 * __this, String_t* p0, const RuntimeMethod* method);
// System.Text.RegularExpressions.MatchCollection System.Text.RegularExpressions.Regex::Matches(System.String)
extern "C" IL2CPP_METHOD_ATTR MatchCollection_t1395363720 * Regex_Matches_m979395559 (Regex_t3657309853 * __this, String_t* p0, const RuntimeMethod* method);
// System.Int32 System.Text.RegularExpressions.MatchCollection::get_Count()
extern "C" IL2CPP_METHOD_ATTR int32_t MatchCollection_get_Count_m1586545784 (MatchCollection_t1395363720 * __this, const RuntimeMethod* method);
// System.Boolean System.Text.RegularExpressions.Group::get_Success()
extern "C" IL2CPP_METHOD_ATTR bool Group_get_Success_m3823591889 (Group_t2468205786 * __this, const RuntimeMethod* method);
// System.Text.RegularExpressions.Group System.Text.RegularExpressions.GroupCollection::get_Item(System.Int32)
extern "C" IL2CPP_METHOD_ATTR Group_t2468205786 * GroupCollection_get_Item_m723682197 (GroupCollection_t69770484 * __this, int32_t p0, const RuntimeMethod* method);
// System.String System.Text.RegularExpressions.Capture::get_Value()
extern "C" IL2CPP_METHOD_ATTR String_t* Capture_get_Value_m3919646039 (Capture_t2232016050 * __this, const RuntimeMethod* method);
// System.String System.String::ToString()
extern "C" IL2CPP_METHOD_ATTR String_t* String_ToString_m838249115 (String_t* __this, const RuntimeMethod* method);
// System.Int32 System.String::IndexOf(System.Char)
extern "C" IL2CPP_METHOD_ATTR int32_t String_IndexOf_m363431711 (String_t* __this, Il2CppChar p0, const RuntimeMethod* method);
// System.Int32 System.String::Compare(System.String,System.String,System.Boolean,System.Globalization.CultureInfo)
extern "C" IL2CPP_METHOD_ATTR int32_t String_Compare_m1293271421 (RuntimeObject * __this /* static, unused */, String_t* p0, String_t* p1, bool p2, CultureInfo_t4157843068 * p3, const RuntimeMethod* method);
// System.Int32 System.String::IndexOf(System.Char,System.Int32)
extern "C" IL2CPP_METHOD_ATTR int32_t String_IndexOf_m2466398549 (String_t* __this, Il2CppChar p0, int32_t p1, const RuntimeMethod* method);
// System.String System.String::Substring(System.Int32)
extern "C" IL2CPP_METHOD_ATTR String_t* String_Substring_m2848979100 (String_t* __this, int32_t p0, const RuntimeMethod* method);
// System.Int32 System.String::Compare(System.String,System.Int32,System.String,System.Int32,System.Int32,System.Boolean,System.Globalization.CultureInfo)
extern "C" IL2CPP_METHOD_ATTR int32_t String_Compare_m945110377 (RuntimeObject * __this /* static, unused */, String_t* p0, int32_t p1, String_t* p2, int32_t p3, int32_t p4, bool p5, CultureInfo_t4157843068 * p6, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.TlsServerSettings::set_CertificateTypes(Mono.Security.Protocol.Tls.Handshake.ClientCertificateType[])
extern "C" IL2CPP_METHOD_ATTR void TlsServerSettings_set_CertificateTypes_m2047242411 (TlsServerSettings_t4144396432 * __this, ClientCertificateTypeU5BU5D_t4253920197* ___value0, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.TlsServerSettings::set_DistinguisedNames(System.String[])
extern "C" IL2CPP_METHOD_ATTR void TlsServerSettings_set_DistinguisedNames_m787752700 (TlsServerSettings_t4144396432 * __this, StringU5BU5D_t1281789340* ___value0, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.TlsServerSettings::set_CertificateRequest(System.Boolean)
extern "C" IL2CPP_METHOD_ATTR void TlsServerSettings_set_CertificateRequest_m1039729760 (TlsServerSettings_t4144396432 * __this, bool ___value0, const RuntimeMethod* method);
// System.Int16 Mono.Security.Protocol.Tls.TlsStream::ReadInt16()
extern "C" IL2CPP_METHOD_ATTR int16_t TlsStream_ReadInt16_m1728211431 (TlsStream_t2365453965 * __this, const RuntimeMethod* method);
// System.Text.Encoding System.Text.Encoding::get_UTF8()
extern "C" IL2CPP_METHOD_ATTR Encoding_t1523322056 * Encoding_get_UTF8_m1008486739 (RuntimeObject * __this /* static, unused */, const RuntimeMethod* method);
// System.Boolean Mono.Security.Protocol.Tls.Handshake.HandshakeMessage::Compare(System.Byte[],System.Byte[])
extern "C" IL2CPP_METHOD_ATTR bool HandshakeMessage_Compare_m2214647946 (RuntimeObject * __this /* static, unused */, ByteU5BU5D_t4116647657* ___buffer10, ByteU5BU5D_t4116647657* ___buffer21, const RuntimeMethod* method);
// Mono.Security.Protocol.Tls.SecurityParameters Mono.Security.Protocol.Tls.Context::get_Current()
extern "C" IL2CPP_METHOD_ATTR SecurityParameters_t2199972650 * Context_get_Current_m2853615040 (Context_t3971234707 * __this, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.TlsException::.ctor(System.String)
extern "C" IL2CPP_METHOD_ATTR void TlsException__ctor_m3652817735 (TlsException_t3534743363 * __this, String_t* ___message0, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.Context::set_ServerRandom(System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void Context_set_ServerRandom_m2929894009 (Context_t3971234707 * __this, ByteU5BU5D_t4116647657* ___value0, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.SecurityParameters::set_Cipher(Mono.Security.Protocol.Tls.CipherSuite)
extern "C" IL2CPP_METHOD_ATTR void SecurityParameters_set_Cipher_m588445085 (SecurityParameters_t2199972650 * __this, CipherSuite_t3414744575 * ___value0, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.Context::set_CompressionMethod(Mono.Security.Protocol.Tls.SecurityCompressionType)
extern "C" IL2CPP_METHOD_ATTR void Context_set_CompressionMethod_m2054483993 (Context_t3971234707 * __this, int32_t ___value0, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.Context::set_ProtocolNegotiated(System.Boolean)
extern "C" IL2CPP_METHOD_ATTR void Context_set_ProtocolNegotiated_m2904861662 (Context_t3971234707 * __this, bool ___value0, const RuntimeMethod* method);
// System.Byte[] Mono.Security.Protocol.Tls.Context::get_ClientRandom()
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* Context_get_ClientRandom_m1437588520 (Context_t3971234707 * __this, const RuntimeMethod* method);
// System.Byte[] Mono.Security.Protocol.Tls.Context::get_ServerRandom()
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* Context_get_ServerRandom_m2710024742 (Context_t3971234707 * __this, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.Context::set_RandomCS(System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void Context_set_RandomCS_m2687068745 (Context_t3971234707 * __this, ByteU5BU5D_t4116647657* ___value0, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.Context::set_RandomSC(System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void Context_set_RandomSC_m2364786761 (Context_t3971234707 * __this, ByteU5BU5D_t4116647657* ___value0, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsServerHello::processProtocol(System.Int16)
extern "C" IL2CPP_METHOD_ATTR void TlsServerHello_processProtocol_m3969427189 (TlsServerHello_t3343859594 * __this, int16_t ___protocol0, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.ClientSessionCache::Add(System.String,System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void ClientSessionCache_Add_m964342678 (RuntimeObject * __this /* static, unused */, String_t* ___host0, ByteU5BU5D_t4116647657* ___id1, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.Context::set_AbbreviatedHandshake(System.Boolean)
extern "C" IL2CPP_METHOD_ATTR void Context_set_AbbreviatedHandshake_m827173393 (Context_t3971234707 * __this, bool ___value0, const RuntimeMethod* method);
// Mono.Security.Protocol.Tls.CipherSuite Mono.Security.Protocol.Tls.CipherSuiteCollection::get_Item(System.Int16)
extern "C" IL2CPP_METHOD_ATTR CipherSuite_t3414744575 * CipherSuiteCollection_get_Item_m3790183696 (CipherSuiteCollection_t1129639304 * __this, int16_t ___code0, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsServerKeyExchange::verifySignature()
extern "C" IL2CPP_METHOD_ATTR void TlsServerKeyExchange_verifySignature_m3412856769 (TlsServerKeyExchange_t699469151 * __this, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.TlsServerSettings::set_ServerKeyExchange(System.Boolean)
extern "C" IL2CPP_METHOD_ATTR void TlsServerSettings_set_ServerKeyExchange_m3302765325 (TlsServerSettings_t4144396432 * __this, bool ___value0, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.TlsServerSettings::set_RsaParameters(System.Security.Cryptography.RSAParameters)
extern "C" IL2CPP_METHOD_ATTR void TlsServerSettings_set_RsaParameters_m853026166 (TlsServerSettings_t4144396432 * __this, RSAParameters_t1728406613 ___value0, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.TlsServerSettings::set_SignedParams(System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void TlsServerSettings_set_SignedParams_m3618693098 (TlsServerSettings_t4144396432 * __this, ByteU5BU5D_t4116647657* ___value0, const RuntimeMethod* method);
// System.Byte[] Mono.Security.Protocol.Tls.Context::get_RandomCS()
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* Context_get_RandomCS_m1367948315 (Context_t3971234707 * __this, const RuntimeMethod* method);
// System.Boolean Mono.Security.Cryptography.MD5SHA1::VerifySignature(System.Security.Cryptography.RSA,System.Byte[])
extern "C" IL2CPP_METHOD_ATTR bool MD5SHA1_VerifySignature_m915115209 (MD5SHA1_t723838944 * __this, RSA_t2385438082 * ___rsa0, ByteU5BU5D_t4116647657* ___rgbSignature1, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.Handshake.HandshakeMessage::.ctor(Mono.Security.Protocol.Tls.Context,Mono.Security.Protocol.Tls.Handshake.HandshakeType,Mono.Security.Protocol.Tls.ContentType)
extern "C" IL2CPP_METHOD_ATTR void HandshakeMessage__ctor_m1353615444 (HandshakeMessage_t3696583168 * __this, Context_t3971234707 * ___context0, uint8_t ___handshakeType1, uint8_t ___contentType2, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.TlsStream::.ctor(System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void TlsStream__ctor_m277557575 (TlsStream_t2365453965 * __this, ByteU5BU5D_t4116647657* ___data0, const RuntimeMethod* method);
// Mono.Security.Protocol.Tls.Handshake.HandshakeType Mono.Security.Protocol.Tls.Handshake.HandshakeMessage::get_HandshakeType()
extern "C" IL2CPP_METHOD_ATTR uint8_t HandshakeMessage_get_HandshakeType_m478242308 (HandshakeMessage_t3696583168 * __this, const RuntimeMethod* method);
// System.Uri System.Net.HttpWebRequest::get_Address()
extern "C" IL2CPP_METHOD_ATTR Uri_t100236324 * HttpWebRequest_get_Address_m1609525404 (HttpWebRequest_t1669436515 * __this, const RuntimeMethod* method);
// System.String System.Uri::get_Host()
extern "C" IL2CPP_METHOD_ATTR String_t* Uri_get_Host_m42857288 (Uri_t100236324 * __this, const RuntimeMethod* method);
// System.Net.SecurityProtocolType System.Net.ServicePointManager::get_SecurityProtocol()
extern "C" IL2CPP_METHOD_ATTR int32_t ServicePointManager_get_SecurityProtocol_m4259357356 (RuntimeObject * __this /* static, unused */, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.SslClientStream::.ctor(System.IO.Stream,System.String,System.Boolean,Mono.Security.Protocol.Tls.SecurityProtocolType,System.Security.Cryptography.X509Certificates.X509CertificateCollection)
extern "C" IL2CPP_METHOD_ATTR void SslClientStream__ctor_m3351906728 (SslClientStream_t3914624661 * __this, Stream_t1273022909 * ___stream0, String_t* ___targetHost1, bool ___ownsStream2, int32_t ___securityProtocolType3, X509CertificateCollection_t3399372417 * ___clientCertificates4, const RuntimeMethod* method);
// System.IO.Stream Mono.Security.Protocol.Tls.SslClientStream::get_InputBuffer()
extern "C" IL2CPP_METHOD_ATTR Stream_t1273022909 * SslClientStream_get_InputBuffer_m4092356391 (SslClientStream_t3914624661 * __this, const RuntimeMethod* method);
// System.Boolean System.Net.ServicePointManager::get_CheckCertificateRevocationList()
extern "C" IL2CPP_METHOD_ATTR bool ServicePointManager_get_CheckCertificateRevocationList_m1716454075 (RuntimeObject * __this /* static, unused */, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.SslStreamBase::set_CheckCertRevocationStatus(System.Boolean)
extern "C" IL2CPP_METHOD_ATTR void SslStreamBase_set_CheckCertRevocationStatus_m912861213 (SslStreamBase_t1667413407 * __this, bool ___value0, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.CertificateSelectionCallback::.ctor(System.Object,System.IntPtr)
extern "C" IL2CPP_METHOD_ATTR void CertificateSelectionCallback__ctor_m3437537928 (CertificateSelectionCallback_t3743405224 * __this, RuntimeObject * ___object0, intptr_t ___method1, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.SslClientStream::add_ClientCertSelection(Mono.Security.Protocol.Tls.CertificateSelectionCallback)
extern "C" IL2CPP_METHOD_ATTR void SslClientStream_add_ClientCertSelection_m1387948363 (SslClientStream_t3914624661 * __this, CertificateSelectionCallback_t3743405224 * ___value0, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.PrivateKeySelectionCallback::.ctor(System.Object,System.IntPtr)
extern "C" IL2CPP_METHOD_ATTR void PrivateKeySelectionCallback__ctor_m265141085 (PrivateKeySelectionCallback_t3240194217 * __this, RuntimeObject * ___object0, intptr_t ___method1, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.SslClientStream::add_PrivateKeySelection(Mono.Security.Protocol.Tls.PrivateKeySelectionCallback)
extern "C" IL2CPP_METHOD_ATTR void SslClientStream_add_PrivateKeySelection_m1663125063 (SslClientStream_t3914624661 * __this, PrivateKeySelectionCallback_t3240194217 * ___value0, const RuntimeMethod* method);
// System.Net.ICertificatePolicy System.Net.ServicePointManager::get_CertificatePolicy()
extern "C" IL2CPP_METHOD_ATTR RuntimeObject* ServicePointManager_get_CertificatePolicy_m1966679142 (RuntimeObject * __this /* static, unused */, const RuntimeMethod* method);
// System.Net.ServicePoint System.Net.HttpWebRequest::get_ServicePoint()
extern "C" IL2CPP_METHOD_ATTR ServicePoint_t2786966844 * HttpWebRequest_get_ServicePoint_m1080482337 (HttpWebRequest_t1669436515 * __this, const RuntimeMethod* method);
// System.Net.Security.RemoteCertificateValidationCallback System.Net.ServicePointManager::get_ServerCertificateValidationCallback()
extern "C" IL2CPP_METHOD_ATTR RemoteCertificateValidationCallback_t3014364904 * ServicePointManager_get_ServerCertificateValidationCallback_m984921647 (RuntimeObject * __this /* static, unused */, const RuntimeMethod* method);
// System.Void System.Security.Cryptography.X509Certificates.X509Certificate2::.ctor(System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void X509Certificate2__ctor_m2370196240 (X509Certificate2_t714049126 * __this, ByteU5BU5D_t4116647657* p0, const RuntimeMethod* method);
// System.Void System.Security.Cryptography.X509Certificates.X509Chain::.ctor()
extern "C" IL2CPP_METHOD_ATTR void X509Chain__ctor_m2878811474 (X509Chain_t194917408 * __this, const RuntimeMethod* method);
// System.Boolean System.Security.Cryptography.X509Certificates.X509Chain::Build(System.Security.Cryptography.X509Certificates.X509Certificate2)
extern "C" IL2CPP_METHOD_ATTR bool X509Chain_Build_m1705729171 (X509Chain_t194917408 * __this, X509Certificate2_t714049126 * p0, const RuntimeMethod* method);
// System.Boolean System.Net.Security.RemoteCertificateValidationCallback::Invoke(System.Object,System.Security.Cryptography.X509Certificates.X509Certificate,System.Security.Cryptography.X509Certificates.X509Chain,System.Net.Security.SslPolicyErrors)
extern "C" IL2CPP_METHOD_ATTR bool RemoteCertificateValidationCallback_Invoke_m727898444 (RemoteCertificateValidationCallback_t3014364904 * __this, RuntimeObject * p0, X509Certificate_t713131622 * p1, X509Chain_t194917408 * p2, int32_t p3, const RuntimeMethod* method);
// System.Security.Cryptography.AsymmetricAlgorithm System.Security.Cryptography.X509Certificates.X509Certificate2::get_PrivateKey()
extern "C" IL2CPP_METHOD_ATTR AsymmetricAlgorithm_t932037087 * X509Certificate2_get_PrivateKey_m450647294 (X509Certificate2_t714049126 * __this, const RuntimeMethod* method);
// System.Security.Cryptography.AsymmetricAlgorithm Mono.Security.Protocol.Tls.PrivateKeySelectionCallback::Invoke(System.Security.Cryptography.X509Certificates.X509Certificate,System.String)
extern "C" IL2CPP_METHOD_ATTR AsymmetricAlgorithm_t932037087 * PrivateKeySelectionCallback_Invoke_m921844982 (PrivateKeySelectionCallback_t3240194217 * __this, X509Certificate_t713131622 * ___certificate0, String_t* ___targetHost1, const RuntimeMethod* method);
// System.Void System.Security.Cryptography.AsymmetricSignatureDeformatter::.ctor()
extern "C" IL2CPP_METHOD_ATTR void AsymmetricSignatureDeformatter__ctor_m88114807 (AsymmetricSignatureDeformatter_t2681190756 * __this, const RuntimeMethod* method);
// System.Boolean Mono.Security.Cryptography.PKCS1::Verify_v15(System.Security.Cryptography.RSA,System.Security.Cryptography.HashAlgorithm,System.Byte[],System.Byte[])
extern "C" IL2CPP_METHOD_ATTR bool PKCS1_Verify_v15_m4192025173 (RuntimeObject * __this /* static, unused */, RSA_t2385438082 * ___rsa0, HashAlgorithm_t1432317219 * ___hash1, ByteU5BU5D_t4116647657* ___hashValue2, ByteU5BU5D_t4116647657* ___signature3, const RuntimeMethod* method);
// System.Void System.Collections.Generic.Dictionary`2<System.String,System.Int32>::.ctor(System.Int32)
inline void Dictionary_2__ctor_m2392909825 (Dictionary_2_t2736202052 * __this, int32_t p0, const RuntimeMethod* method)
{
(( void (*) (Dictionary_2_t2736202052 *, int32_t, const RuntimeMethod*))Dictionary_2__ctor_m182537451_gshared)(__this, p0, method);
}
// System.Void System.Collections.Generic.Dictionary`2<System.String,System.Int32>::Add(!0,!1)
inline void Dictionary_2_Add_m282647386 (Dictionary_2_t2736202052 * __this, String_t* p0, int32_t p1, const RuntimeMethod* method)
{
(( void (*) (Dictionary_2_t2736202052 *, String_t*, int32_t, const RuntimeMethod*))Dictionary_2_Add_m1279427033_gshared)(__this, p0, p1, method);
}
// System.Boolean System.Collections.Generic.Dictionary`2<System.String,System.Int32>::TryGetValue(!0,!1&)
inline bool Dictionary_2_TryGetValue_m1013208020 (Dictionary_2_t2736202052 * __this, String_t* p0, int32_t* p1, const RuntimeMethod* method)
{
return (( bool (*) (Dictionary_2_t2736202052 *, String_t*, int32_t*, const RuntimeMethod*))Dictionary_2_TryGetValue_m3959998165_gshared)(__this, p0, p1, method);
}
// System.Void System.Security.Cryptography.AsymmetricSignatureFormatter::.ctor()
extern "C" IL2CPP_METHOD_ATTR void AsymmetricSignatureFormatter__ctor_m3278494933 (AsymmetricSignatureFormatter_t3486936014 * __this, const RuntimeMethod* method);
// System.Byte[] Mono.Security.Cryptography.PKCS1::Sign_v15(System.Security.Cryptography.RSA,System.Security.Cryptography.HashAlgorithm,System.Byte[])
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* PKCS1_Sign_v15_m3459793192 (RuntimeObject * __this /* static, unused */, RSA_t2385438082 * ___rsa0, HashAlgorithm_t1432317219 * ___hash1, ByteU5BU5D_t4116647657* ___hashValue2, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.Context::set_RecordProtocol(Mono.Security.Protocol.Tls.RecordProtocol)
extern "C" IL2CPP_METHOD_ATTR void Context_set_RecordProtocol_m3067654641 (Context_t3971234707 * __this, RecordProtocol_t3759049701 * ___value0, const RuntimeMethod* method);
// System.Void System.Threading.ManualResetEvent::.ctor(System.Boolean)
extern "C" IL2CPP_METHOD_ATTR void ManualResetEvent__ctor_m4010886457 (ManualResetEvent_t451242010 * __this, bool p0, const RuntimeMethod* method);
// System.IAsyncResult Mono.Security.Protocol.Tls.RecordProtocol::BeginSendRecord(Mono.Security.Protocol.Tls.Handshake.HandshakeType,System.AsyncCallback,System.Object)
extern "C" IL2CPP_METHOD_ATTR RuntimeObject* RecordProtocol_BeginSendRecord_m615249746 (RecordProtocol_t3759049701 * __this, uint8_t ___handshakeType0, AsyncCallback_t3962456242 * ___callback1, RuntimeObject * ___state2, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.RecordProtocol::EndSendRecord(System.IAsyncResult)
extern "C" IL2CPP_METHOD_ATTR void RecordProtocol_EndSendRecord_m4264777321 (RecordProtocol_t3759049701 * __this, RuntimeObject* ___asyncResult0, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.Context::set_ReadSequenceNumber(System.UInt64)
extern "C" IL2CPP_METHOD_ATTR void Context_set_ReadSequenceNumber_m2154909392 (Context_t3971234707 * __this, uint64_t ___value0, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.Context::EndSwitchingSecurityParameters(System.Boolean)
extern "C" IL2CPP_METHOD_ATTR void Context_EndSwitchingSecurityParameters_m4148956166 (Context_t3971234707 * __this, bool ___client0, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.Context::StartSwitchingSecurityParameters(System.Boolean)
extern "C" IL2CPP_METHOD_ATTR void Context_StartSwitchingSecurityParameters_m28285865 (Context_t3971234707 * __this, bool ___client0, const RuntimeMethod* method);
// System.Void System.NotSupportedException::.ctor()
extern "C" IL2CPP_METHOD_ATTR void NotSupportedException__ctor_m2730133172 (NotSupportedException_t1314879016 * __this, const RuntimeMethod* method);
// System.Boolean Mono.Security.Protocol.Tls.Context::get_ReceivedConnectionEnd()
extern "C" IL2CPP_METHOD_ATTR bool Context_get_ReceivedConnectionEnd_m4011125537 (Context_t3971234707 * __this, const RuntimeMethod* method);
// System.Boolean System.Threading.EventWaitHandle::Reset()
extern "C" IL2CPP_METHOD_ATTR bool EventWaitHandle_Reset_m3348053200 (EventWaitHandle_t777845177 * __this, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.RecordProtocol/ReceiveRecordAsyncResult::.ctor(System.AsyncCallback,System.Object,System.Byte[],System.IO.Stream)
extern "C" IL2CPP_METHOD_ATTR void ReceiveRecordAsyncResult__ctor_m277637112 (ReceiveRecordAsyncResult_t3680907657 * __this, AsyncCallback_t3962456242 * ___userCallback0, RuntimeObject * ___userState1, ByteU5BU5D_t4116647657* ___initialBuffer2, Stream_t1273022909 * ___record3, const RuntimeMethod* method);
// System.Byte[] Mono.Security.Protocol.Tls.RecordProtocol/ReceiveRecordAsyncResult::get_InitialBuffer()
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* ReceiveRecordAsyncResult_get_InitialBuffer_m2924495696 (ReceiveRecordAsyncResult_t3680907657 * __this, const RuntimeMethod* method);
// System.Void System.AsyncCallback::.ctor(System.Object,System.IntPtr)
extern "C" IL2CPP_METHOD_ATTR void AsyncCallback__ctor_m530647953 (AsyncCallback_t3962456242 * __this, RuntimeObject * p0, intptr_t p1, const RuntimeMethod* method);
// System.IO.Stream Mono.Security.Protocol.Tls.RecordProtocol/ReceiveRecordAsyncResult::get_Record()
extern "C" IL2CPP_METHOD_ATTR Stream_t1273022909 * ReceiveRecordAsyncResult_get_Record_m223479150 (ReceiveRecordAsyncResult_t3680907657 * __this, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.RecordProtocol/ReceiveRecordAsyncResult::SetComplete(System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void ReceiveRecordAsyncResult_SetComplete_m464469214 (ReceiveRecordAsyncResult_t3680907657 * __this, ByteU5BU5D_t4116647657* ___resultingBuffer0, const RuntimeMethod* method);
// System.Byte[] Mono.Security.Protocol.Tls.RecordProtocol::ReadRecordBuffer(System.Int32,System.IO.Stream)
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* RecordProtocol_ReadRecordBuffer_m180543381 (RecordProtocol_t3759049701 * __this, int32_t ___contentType0, Stream_t1273022909 * ___record1, const RuntimeMethod* method);
// Mono.Security.Protocol.Tls.SecurityParameters Mono.Security.Protocol.Tls.Context::get_Read()
extern "C" IL2CPP_METHOD_ATTR SecurityParameters_t2199972650 * Context_get_Read_m4172356735 (Context_t3971234707 * __this, const RuntimeMethod* method);
// System.Byte[] Mono.Security.Protocol.Tls.RecordProtocol::decryptRecordFragment(Mono.Security.Protocol.Tls.ContentType,System.Byte[])
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* RecordProtocol_decryptRecordFragment_m66623237 (RecordProtocol_t3759049701 * __this, uint8_t ___contentType0, ByteU5BU5D_t4116647657* ___fragment1, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.RecordProtocol::ProcessAlert(Mono.Security.Protocol.Tls.AlertLevel,Mono.Security.Protocol.Tls.AlertDescription)
extern "C" IL2CPP_METHOD_ATTR void RecordProtocol_ProcessAlert_m1036912531 (RecordProtocol_t3759049701 * __this, uint8_t ___alertLevel0, uint8_t ___alertDesc1, const RuntimeMethod* method);
// System.Boolean Mono.Security.Protocol.Tls.TlsStream::get_EOF()
extern "C" IL2CPP_METHOD_ATTR bool TlsStream_get_EOF_m953226442 (TlsStream_t2365453965 * __this, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.RecordProtocol/ReceiveRecordAsyncResult::SetComplete(System.Exception)
extern "C" IL2CPP_METHOD_ATTR void ReceiveRecordAsyncResult_SetComplete_m1568733499 (ReceiveRecordAsyncResult_t3680907657 * __this, Exception_t * ___ex0, const RuntimeMethod* method);
// System.Boolean Mono.Security.Protocol.Tls.RecordProtocol/ReceiveRecordAsyncResult::get_IsCompleted()
extern "C" IL2CPP_METHOD_ATTR bool ReceiveRecordAsyncResult_get_IsCompleted_m1918259948 (ReceiveRecordAsyncResult_t3680907657 * __this, const RuntimeMethod* method);
// System.Threading.WaitHandle Mono.Security.Protocol.Tls.RecordProtocol/ReceiveRecordAsyncResult::get_AsyncWaitHandle()
extern "C" IL2CPP_METHOD_ATTR WaitHandle_t1743403487 * ReceiveRecordAsyncResult_get_AsyncWaitHandle_m1781023438 (ReceiveRecordAsyncResult_t3680907657 * __this, const RuntimeMethod* method);
// System.Boolean Mono.Security.Protocol.Tls.RecordProtocol/ReceiveRecordAsyncResult::get_CompletedWithError()
extern "C" IL2CPP_METHOD_ATTR bool ReceiveRecordAsyncResult_get_CompletedWithError_m2856009536 (ReceiveRecordAsyncResult_t3680907657 * __this, const RuntimeMethod* method);
// System.Exception Mono.Security.Protocol.Tls.RecordProtocol/ReceiveRecordAsyncResult::get_AsyncException()
extern "C" IL2CPP_METHOD_ATTR Exception_t * ReceiveRecordAsyncResult_get_AsyncException_m631453737 (ReceiveRecordAsyncResult_t3680907657 * __this, const RuntimeMethod* method);
// System.Byte[] Mono.Security.Protocol.Tls.RecordProtocol/ReceiveRecordAsyncResult::get_ResultingBuffer()
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* ReceiveRecordAsyncResult_get_ResultingBuffer_m1839161335 (ReceiveRecordAsyncResult_t3680907657 * __this, const RuntimeMethod* method);
// System.Boolean System.Threading.EventWaitHandle::Set()
extern "C" IL2CPP_METHOD_ATTR bool EventWaitHandle_Set_m2445193251 (EventWaitHandle_t777845177 * __this, const RuntimeMethod* method);
// System.IAsyncResult Mono.Security.Protocol.Tls.RecordProtocol::BeginReceiveRecord(System.IO.Stream,System.AsyncCallback,System.Object)
extern "C" IL2CPP_METHOD_ATTR RuntimeObject* RecordProtocol_BeginReceiveRecord_m295321170 (RecordProtocol_t3759049701 * __this, Stream_t1273022909 * ___record0, AsyncCallback_t3962456242 * ___callback1, RuntimeObject * ___state2, const RuntimeMethod* method);
// System.Byte[] Mono.Security.Protocol.Tls.RecordProtocol::EndReceiveRecord(System.IAsyncResult)
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* RecordProtocol_EndReceiveRecord_m1872541318 (RecordProtocol_t3759049701 * __this, RuntimeObject* ___asyncResult0, const RuntimeMethod* method);
// System.Byte[] Mono.Security.Protocol.Tls.RecordProtocol::ReadClientHelloV2(System.IO.Stream)
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* RecordProtocol_ReadClientHelloV2_m4052496367 (RecordProtocol_t3759049701 * __this, Stream_t1273022909 * ___record0, const RuntimeMethod* method);
// System.Boolean System.Enum::IsDefined(System.Type,System.Object)
extern "C" IL2CPP_METHOD_ATTR bool Enum_IsDefined_m1442314461 (RuntimeObject * __this /* static, unused */, Type_t * p0, RuntimeObject * p1, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.TlsException::.ctor(Mono.Security.Protocol.Tls.AlertDescription)
extern "C" IL2CPP_METHOD_ATTR void TlsException__ctor_m818940807 (TlsException_t3534743363 * __this, uint8_t ___description0, const RuntimeMethod* method);
// System.Byte[] Mono.Security.Protocol.Tls.RecordProtocol::ReadStandardRecordBuffer(System.IO.Stream)
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* RecordProtocol_ReadStandardRecordBuffer_m3738063864 (RecordProtocol_t3759049701 * __this, Stream_t1273022909 * ___record0, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.Context::ChangeProtocol(System.Int16)
extern "C" IL2CPP_METHOD_ATTR void Context_ChangeProtocol_m2412635871 (Context_t3971234707 * __this, int16_t ___protocol0, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.RecordProtocol::ProcessCipherSpecV2Buffer(Mono.Security.Protocol.Tls.SecurityProtocolType,System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void RecordProtocol_ProcessCipherSpecV2Buffer_m487045483 (RecordProtocol_t3759049701 * __this, int32_t ___protocol0, ByteU5BU5D_t4116647657* ___buffer1, const RuntimeMethod* method);
// System.Boolean Mono.Security.Protocol.Tls.Context::get_ProtocolNegotiated()
extern "C" IL2CPP_METHOD_ATTR bool Context_get_ProtocolNegotiated_m4220412840 (Context_t3971234707 * __this, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.TlsException::.ctor(Mono.Security.Protocol.Tls.AlertLevel,Mono.Security.Protocol.Tls.AlertDescription)
extern "C" IL2CPP_METHOD_ATTR void TlsException__ctor_m596254082 (TlsException_t3534743363 * __this, uint8_t ___level0, uint8_t ___description1, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.Context::set_ReceivedConnectionEnd(System.Boolean)
extern "C" IL2CPP_METHOD_ATTR void Context_set_ReceivedConnectionEnd_m911334662 (Context_t3971234707 * __this, bool ___value0, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.Alert::.ctor(Mono.Security.Protocol.Tls.AlertDescription)
extern "C" IL2CPP_METHOD_ATTR void Alert__ctor_m3135936936 (Alert_t4059934885 * __this, uint8_t ___description0, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.RecordProtocol::SendAlert(Mono.Security.Protocol.Tls.Alert)
extern "C" IL2CPP_METHOD_ATTR void RecordProtocol_SendAlert_m3736432480 (RecordProtocol_t3759049701 * __this, Alert_t4059934885 * ___alert0, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.Alert::.ctor(Mono.Security.Protocol.Tls.AlertLevel,Mono.Security.Protocol.Tls.AlertDescription)
extern "C" IL2CPP_METHOD_ATTR void Alert__ctor_m2879739792 (Alert_t4059934885 * __this, uint8_t ___level0, uint8_t ___description1, const RuntimeMethod* method);
// Mono.Security.Protocol.Tls.AlertLevel Mono.Security.Protocol.Tls.Alert::get_Level()
extern "C" IL2CPP_METHOD_ATTR uint8_t Alert_get_Level_m4249630350 (Alert_t4059934885 * __this, const RuntimeMethod* method);
// Mono.Security.Protocol.Tls.AlertDescription Mono.Security.Protocol.Tls.Alert::get_Description()
extern "C" IL2CPP_METHOD_ATTR uint8_t Alert_get_Description_m3833114036 (Alert_t4059934885 * __this, const RuntimeMethod* method);
// System.Boolean Mono.Security.Protocol.Tls.Alert::get_IsCloseNotify()
extern "C" IL2CPP_METHOD_ATTR bool Alert_get_IsCloseNotify_m3157384796 (Alert_t4059934885 * __this, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.RecordProtocol::SendRecord(Mono.Security.Protocol.Tls.ContentType,System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void RecordProtocol_SendRecord_m927045752 (RecordProtocol_t3759049701 * __this, uint8_t ___contentType0, ByteU5BU5D_t4116647657* ___recordData1, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.Context::set_SentConnectionEnd(System.Boolean)
extern "C" IL2CPP_METHOD_ATTR void Context_set_SentConnectionEnd_m1367645582 (Context_t3971234707 * __this, bool ___value0, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.Context::set_WriteSequenceNumber(System.UInt64)
extern "C" IL2CPP_METHOD_ATTR void Context_set_WriteSequenceNumber_m942577065 (Context_t3971234707 * __this, uint64_t ___value0, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.RecordProtocol/SendRecordAsyncResult::.ctor(System.AsyncCallback,System.Object,Mono.Security.Protocol.Tls.Handshake.HandshakeMessage)
extern "C" IL2CPP_METHOD_ATTR void SendRecordAsyncResult__ctor_m425551707 (SendRecordAsyncResult_t3718352467 * __this, AsyncCallback_t3962456242 * ___userCallback0, RuntimeObject * ___userState1, HandshakeMessage_t3696583168 * ___message2, const RuntimeMethod* method);
// Mono.Security.Protocol.Tls.ContentType Mono.Security.Protocol.Tls.Handshake.HandshakeMessage::get_ContentType()
extern "C" IL2CPP_METHOD_ATTR uint8_t HandshakeMessage_get_ContentType_m1693718190 (HandshakeMessage_t3696583168 * __this, const RuntimeMethod* method);
// System.IAsyncResult Mono.Security.Protocol.Tls.RecordProtocol::BeginSendRecord(Mono.Security.Protocol.Tls.ContentType,System.Byte[],System.AsyncCallback,System.Object)
extern "C" IL2CPP_METHOD_ATTR RuntimeObject* RecordProtocol_BeginSendRecord_m3926976520 (RecordProtocol_t3759049701 * __this, uint8_t ___contentType0, ByteU5BU5D_t4116647657* ___recordData1, AsyncCallback_t3962456242 * ___callback2, RuntimeObject * ___state3, const RuntimeMethod* method);
// Mono.Security.Protocol.Tls.Handshake.HandshakeMessage Mono.Security.Protocol.Tls.RecordProtocol/SendRecordAsyncResult::get_Message()
extern "C" IL2CPP_METHOD_ATTR HandshakeMessage_t3696583168 * SendRecordAsyncResult_get_Message_m1204240861 (SendRecordAsyncResult_t3718352467 * __this, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.RecordProtocol/SendRecordAsyncResult::SetComplete()
extern "C" IL2CPP_METHOD_ATTR void SendRecordAsyncResult_SetComplete_m170417386 (SendRecordAsyncResult_t3718352467 * __this, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.RecordProtocol/SendRecordAsyncResult::SetComplete(System.Exception)
extern "C" IL2CPP_METHOD_ATTR void SendRecordAsyncResult_SetComplete_m153213906 (SendRecordAsyncResult_t3718352467 * __this, Exception_t * ___ex0, const RuntimeMethod* method);
// System.Boolean Mono.Security.Protocol.Tls.Context::get_SentConnectionEnd()
extern "C" IL2CPP_METHOD_ATTR bool Context_get_SentConnectionEnd_m963812869 (Context_t3971234707 * __this, const RuntimeMethod* method);
// System.Byte[] Mono.Security.Protocol.Tls.RecordProtocol::EncodeRecord(Mono.Security.Protocol.Tls.ContentType,System.Byte[])
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* RecordProtocol_EncodeRecord_m164201598 (RecordProtocol_t3759049701 * __this, uint8_t ___contentType0, ByteU5BU5D_t4116647657* ___recordData1, const RuntimeMethod* method);
// System.Boolean Mono.Security.Protocol.Tls.RecordProtocol/SendRecordAsyncResult::get_IsCompleted()
extern "C" IL2CPP_METHOD_ATTR bool SendRecordAsyncResult_get_IsCompleted_m3929307031 (SendRecordAsyncResult_t3718352467 * __this, const RuntimeMethod* method);
// System.Threading.WaitHandle Mono.Security.Protocol.Tls.RecordProtocol/SendRecordAsyncResult::get_AsyncWaitHandle()
extern "C" IL2CPP_METHOD_ATTR WaitHandle_t1743403487 * SendRecordAsyncResult_get_AsyncWaitHandle_m1466641472 (SendRecordAsyncResult_t3718352467 * __this, const RuntimeMethod* method);
// System.Boolean Mono.Security.Protocol.Tls.RecordProtocol/SendRecordAsyncResult::get_CompletedWithError()
extern "C" IL2CPP_METHOD_ATTR bool SendRecordAsyncResult_get_CompletedWithError_m3232037803 (SendRecordAsyncResult_t3718352467 * __this, const RuntimeMethod* method);
// System.Exception Mono.Security.Protocol.Tls.RecordProtocol/SendRecordAsyncResult::get_AsyncException()
extern "C" IL2CPP_METHOD_ATTR Exception_t * SendRecordAsyncResult_get_AsyncException_m3556917569 (SendRecordAsyncResult_t3718352467 * __this, const RuntimeMethod* method);
// System.Byte[] Mono.Security.Protocol.Tls.RecordProtocol::EncodeRecord(Mono.Security.Protocol.Tls.ContentType,System.Byte[],System.Int32,System.Int32)
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* RecordProtocol_EncodeRecord_m3312835762 (RecordProtocol_t3759049701 * __this, uint8_t ___contentType0, ByteU5BU5D_t4116647657* ___recordData1, int32_t ___offset2, int32_t ___count3, const RuntimeMethod* method);
// System.Byte[] Mono.Security.Protocol.Tls.RecordProtocol::encryptRecordFragment(Mono.Security.Protocol.Tls.ContentType,System.Byte[])
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* RecordProtocol_encryptRecordFragment_m710101985 (RecordProtocol_t3759049701 * __this, uint8_t ___contentType0, ByteU5BU5D_t4116647657* ___fragment1, const RuntimeMethod* method);
// System.Byte[] Mono.Security.Protocol.Tls.CipherSuite::EncryptRecord(System.Byte[],System.Byte[])
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* CipherSuite_EncryptRecord_m4196378593 (CipherSuite_t3414744575 * __this, ByteU5BU5D_t4116647657* ___fragment0, ByteU5BU5D_t4116647657* ___mac1, const RuntimeMethod* method);
// System.UInt64 Mono.Security.Protocol.Tls.Context::get_WriteSequenceNumber()
extern "C" IL2CPP_METHOD_ATTR uint64_t Context_get_WriteSequenceNumber_m1115956887 (Context_t3971234707 * __this, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.CipherSuite::DecryptRecord(System.Byte[],System.Byte[]&,System.Byte[]&)
extern "C" IL2CPP_METHOD_ATTR void CipherSuite_DecryptRecord_m1495386860 (CipherSuite_t3414744575 * __this, ByteU5BU5D_t4116647657* ___fragment0, ByteU5BU5D_t4116647657** ___dcrFragment1, ByteU5BU5D_t4116647657** ___dcrMAC2, const RuntimeMethod* method);
// Mono.Security.Protocol.Tls.RecordProtocol Mono.Security.Protocol.Tls.Context::get_RecordProtocol()
extern "C" IL2CPP_METHOD_ATTR RecordProtocol_t3759049701 * Context_get_RecordProtocol_m2261754827 (Context_t3971234707 * __this, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.RecordProtocol::SendAlert(Mono.Security.Protocol.Tls.AlertDescription)
extern "C" IL2CPP_METHOD_ATTR void RecordProtocol_SendAlert_m1931708341 (RecordProtocol_t3759049701 * __this, uint8_t ___description0, const RuntimeMethod* method);
// System.Boolean Mono.Security.Protocol.Tls.RecordProtocol::Compare(System.Byte[],System.Byte[])
extern "C" IL2CPP_METHOD_ATTR bool RecordProtocol_Compare_m4182754688 (RecordProtocol_t3759049701 * __this, ByteU5BU5D_t4116647657* ___array10, ByteU5BU5D_t4116647657* ___array21, const RuntimeMethod* method);
// System.UInt64 Mono.Security.Protocol.Tls.Context::get_ReadSequenceNumber()
extern "C" IL2CPP_METHOD_ATTR uint64_t Context_get_ReadSequenceNumber_m3883329199 (Context_t3971234707 * __this, const RuntimeMethod* method);
// Mono.Security.Protocol.Tls.CipherSuite Mono.Security.Protocol.Tls.RecordProtocol::MapV2CipherCode(System.String,System.Int32)
extern "C" IL2CPP_METHOD_ATTR CipherSuite_t3414744575 * RecordProtocol_MapV2CipherCode_m4087331414 (RecordProtocol_t3759049701 * __this, String_t* ___prefix0, int32_t ___code1, const RuntimeMethod* method);
// Mono.Security.Protocol.Tls.CipherSuite Mono.Security.Protocol.Tls.CipherSuiteCollection::get_Item(System.String)
extern "C" IL2CPP_METHOD_ATTR CipherSuite_t3414744575 * CipherSuiteCollection_get_Item_m2791953484 (CipherSuiteCollection_t1129639304 * __this, String_t* ___name0, const RuntimeMethod* method);
// System.IAsyncResult System.AsyncCallback::BeginInvoke(System.IAsyncResult,System.AsyncCallback,System.Object)
extern "C" IL2CPP_METHOD_ATTR RuntimeObject* AsyncCallback_BeginInvoke_m2710486612 (AsyncCallback_t3962456242 * __this, RuntimeObject* p0, AsyncCallback_t3962456242 * p1, RuntimeObject * p2, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.RecordProtocol/ReceiveRecordAsyncResult::SetComplete(System.Exception,System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void ReceiveRecordAsyncResult_SetComplete_m1372905673 (ReceiveRecordAsyncResult_t3680907657 * __this, Exception_t * ___ex0, ByteU5BU5D_t4116647657* ___resultingBuffer1, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.CipherSuite::.ctor(System.Int16,System.String,Mono.Security.Protocol.Tls.CipherAlgorithmType,Mono.Security.Protocol.Tls.HashAlgorithmType,Mono.Security.Protocol.Tls.ExchangeAlgorithmType,System.Boolean,System.Boolean,System.Byte,System.Byte,System.Int16,System.Byte,System.Byte)
extern "C" IL2CPP_METHOD_ATTR void CipherSuite__ctor_m2440635082 (CipherSuite_t3414744575 * __this, int16_t ___code0, String_t* ___name1, int32_t ___cipherAlgorithmType2, int32_t ___hashAlgorithmType3, int32_t ___exchangeAlgorithmType4, bool ___exportable5, bool ___blockMode6, uint8_t ___keyMaterialSize7, uint8_t ___expandedKeyMaterialSize8, int16_t ___effectiveKeyBits9, uint8_t ___ivSize10, uint8_t ___blockSize11, const RuntimeMethod* method);
// Mono.Security.Protocol.Tls.Context Mono.Security.Protocol.Tls.CipherSuite::get_Context()
extern "C" IL2CPP_METHOD_ATTR Context_t3971234707 * CipherSuite_get_Context_m1621551997 (CipherSuite_t3414744575 * __this, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.CipherSuite::Write(System.Byte[],System.Int32,System.UInt64)
extern "C" IL2CPP_METHOD_ATTR void CipherSuite_Write_m1841735015 (CipherSuite_t3414744575 * __this, ByteU5BU5D_t4116647657* ___array0, int32_t ___offset1, uint64_t ___value2, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.CipherSuite::Write(System.Byte[],System.Int32,System.Int16)
extern "C" IL2CPP_METHOD_ATTR void CipherSuite_Write_m1172814058 (CipherSuite_t3414744575 * __this, ByteU5BU5D_t4116647657* ___array0, int32_t ___offset1, int16_t ___value2, const RuntimeMethod* method);
// System.Byte[] Mono.Security.Protocol.Tls.SslCipherSuite::prf(System.Byte[],System.String,System.Byte[])
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* SslCipherSuite_prf_m922878400 (SslCipherSuite_t1981645747 * __this, ByteU5BU5D_t4116647657* ___secret0, String_t* ___label1, ByteU5BU5D_t4116647657* ___random2, const RuntimeMethod* method);
// System.String System.Char::ToString()
extern "C" IL2CPP_METHOD_ATTR String_t* Char_ToString_m3588025615 (Il2CppChar* __this, const RuntimeMethod* method);
// System.Byte[] Mono.Security.Protocol.Tls.Context::get_RandomSC()
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* Context_get_RandomSC_m1891758699 (Context_t3971234707 * __this, const RuntimeMethod* method);
// System.Int32 Mono.Security.Protocol.Tls.CipherSuite::get_KeyBlockSize()
extern "C" IL2CPP_METHOD_ATTR int32_t CipherSuite_get_KeyBlockSize_m519075451 (CipherSuite_t3414744575 * __this, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.SecurityParameters::set_ClientWriteMAC(System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void SecurityParameters_set_ClientWriteMAC_m2984527188 (SecurityParameters_t2199972650 * __this, ByteU5BU5D_t4116647657* ___value0, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.SecurityParameters::set_ServerWriteMAC(System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void SecurityParameters_set_ServerWriteMAC_m3003817350 (SecurityParameters_t2199972650 * __this, ByteU5BU5D_t4116647657* ___value0, const RuntimeMethod* method);
// System.Byte Mono.Security.Protocol.Tls.CipherSuite::get_KeyMaterialSize()
extern "C" IL2CPP_METHOD_ATTR uint8_t CipherSuite_get_KeyMaterialSize_m3569550689 (CipherSuite_t3414744575 * __this, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.Context::set_ClientWriteKey(System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void Context_set_ClientWriteKey_m1601425248 (Context_t3971234707 * __this, ByteU5BU5D_t4116647657* ___value0, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.Context::set_ServerWriteKey(System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void Context_set_ServerWriteKey_m3347272648 (Context_t3971234707 * __this, ByteU5BU5D_t4116647657* ___value0, const RuntimeMethod* method);
// System.Boolean Mono.Security.Protocol.Tls.CipherSuite::get_IsExportable()
extern "C" IL2CPP_METHOD_ATTR bool CipherSuite_get_IsExportable_m677202963 (CipherSuite_t3414744575 * __this, const RuntimeMethod* method);
// System.Byte Mono.Security.Protocol.Tls.CipherSuite::get_IvSize()
extern "C" IL2CPP_METHOD_ATTR uint8_t CipherSuite_get_IvSize_m630778063 (CipherSuite_t3414744575 * __this, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.Context::set_ClientWriteIV(System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void Context_set_ClientWriteIV_m3405909624 (Context_t3971234707 * __this, ByteU5BU5D_t4116647657* ___value0, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.Context::set_ServerWriteIV(System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void Context_set_ServerWriteIV_m1007123427 (Context_t3971234707 * __this, ByteU5BU5D_t4116647657* ___value0, const RuntimeMethod* method);
// System.Byte Mono.Security.Protocol.Tls.CipherSuite::get_ExpandedKeyMaterialSize()
extern "C" IL2CPP_METHOD_ATTR uint8_t CipherSuite_get_ExpandedKeyMaterialSize_m197590106 (CipherSuite_t3414744575 * __this, const RuntimeMethod* method);
// System.Boolean Mono.Security.Protocol.Tls.ClientSessionCache::SetContextInCache(Mono.Security.Protocol.Tls.Context)
extern "C" IL2CPP_METHOD_ATTR bool ClientSessionCache_SetContextInCache_m2875733100 (RuntimeObject * __this /* static, unused */, Context_t3971234707 * ___context0, const RuntimeMethod* method);
// System.Void System.Security.Cryptography.X509Certificates.X509CertificateCollection::.ctor(System.Security.Cryptography.X509Certificates.X509Certificate[])
extern "C" IL2CPP_METHOD_ATTR void X509CertificateCollection__ctor_m3178797723 (X509CertificateCollection_t3399372417 * __this, X509CertificateU5BU5D_t3145106755* p0, const RuntimeMethod* method);
// System.Void System.Security.Cryptography.X509Certificates.X509CertificateCollection::.ctor()
extern "C" IL2CPP_METHOD_ATTR void X509CertificateCollection__ctor_m147081211 (X509CertificateCollection_t3399372417 * __this, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.SslStreamBase::.ctor(System.IO.Stream,System.Boolean)
extern "C" IL2CPP_METHOD_ATTR void SslStreamBase__ctor_m3009266308 (SslStreamBase_t1667413407 * __this, Stream_t1273022909 * ___stream0, bool ___ownsStream1, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.ClientContext::.ctor(Mono.Security.Protocol.Tls.SslClientStream,Mono.Security.Protocol.Tls.SecurityProtocolType,System.String,System.Security.Cryptography.X509Certificates.X509CertificateCollection)
extern "C" IL2CPP_METHOD_ATTR void ClientContext__ctor_m3993227749 (ClientContext_t2797401965 * __this, SslClientStream_t3914624661 * ___stream0, int32_t ___securityProtocolType1, String_t* ___targetHost2, X509CertificateCollection_t3399372417 * ___clientCertificates3, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.ClientRecordProtocol::.ctor(System.IO.Stream,Mono.Security.Protocol.Tls.ClientContext)
extern "C" IL2CPP_METHOD_ATTR void ClientRecordProtocol__ctor_m2839844778 (ClientRecordProtocol_t2031137796 * __this, Stream_t1273022909 * ___innerStream0, ClientContext_t2797401965 * ___context1, const RuntimeMethod* method);
// System.Delegate System.Delegate::Combine(System.Delegate,System.Delegate)
extern "C" IL2CPP_METHOD_ATTR Delegate_t1188392813 * Delegate_Combine_m1859655160 (RuntimeObject * __this /* static, unused */, Delegate_t1188392813 * p0, Delegate_t1188392813 * p1, const RuntimeMethod* method);
// System.Delegate System.Delegate::Remove(System.Delegate,System.Delegate)
extern "C" IL2CPP_METHOD_ATTR Delegate_t1188392813 * Delegate_Remove_m334097152 (RuntimeObject * __this /* static, unused */, Delegate_t1188392813 * p0, Delegate_t1188392813 * p1, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.SslStreamBase::Dispose(System.Boolean)
extern "C" IL2CPP_METHOD_ATTR void SslStreamBase_Dispose_m3190415328 (SslStreamBase_t1667413407 * __this, bool ___disposing0, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.SslStreamBase::Finalize()
extern "C" IL2CPP_METHOD_ATTR void SslStreamBase_Finalize_m3260913635 (SslStreamBase_t1667413407 * __this, const RuntimeMethod* method);
// Mono.Security.Protocol.Tls.Alert Mono.Security.Protocol.Tls.TlsException::get_Alert()
extern "C" IL2CPP_METHOD_ATTR Alert_t4059934885 * TlsException_get_Alert_m1206526559 (TlsException_t3534743363 * __this, const RuntimeMethod* method);
// System.Void System.IO.IOException::.ctor(System.String,System.Exception)
extern "C" IL2CPP_METHOD_ATTR void IOException__ctor_m3246761956 (IOException_t4088381929 * __this, String_t* p0, Exception_t * p1, const RuntimeMethod* method);
// System.Byte[] Mono.Security.Protocol.Tls.RecordProtocol::ReceiveRecord(System.IO.Stream)
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* RecordProtocol_ReceiveRecord_m3797641756 (RecordProtocol_t3759049701 * __this, Stream_t1273022909 * ___record0, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.SslClientStream::SafeReceiveRecord(System.IO.Stream)
extern "C" IL2CPP_METHOD_ATTR void SslClientStream_SafeReceiveRecord_m2217679740 (SslClientStream_t3914624661 * __this, Stream_t1273022909 * ___s0, const RuntimeMethod* method);
// System.Boolean Mono.Security.Protocol.Tls.Context::get_AbbreviatedHandshake()
extern "C" IL2CPP_METHOD_ATTR bool Context_get_AbbreviatedHandshake_m3907920227 (Context_t3971234707 * __this, const RuntimeMethod* method);
// Mono.Security.Protocol.Tls.Handshake.HandshakeType Mono.Security.Protocol.Tls.Context::get_LastHandshakeMsg()
extern "C" IL2CPP_METHOD_ATTR uint8_t Context_get_LastHandshakeMsg_m2730646725 (Context_t3971234707 * __this, const RuntimeMethod* method);
// System.Boolean Mono.Security.Protocol.Tls.ClientSessionCache::SetContextFromCache(Mono.Security.Protocol.Tls.Context)
extern "C" IL2CPP_METHOD_ATTR bool ClientSessionCache_SetContextFromCache_m3781380849 (RuntimeObject * __this /* static, unused */, Context_t3971234707 * ___context0, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.CipherSuite::InitializeCipher()
extern "C" IL2CPP_METHOD_ATTR void CipherSuite_InitializeCipher_m2397698608 (CipherSuite_t3414744575 * __this, const RuntimeMethod* method);
// System.Void Mono.Security.Protocol.Tls.RecordProtocol::SendChangeCipherSpec()
extern "C" IL2CPP_METHOD_ATTR void RecordProtocol_SendChangeCipherSpec_m464005157 (RecordProtocol_t3759049701 * __this, const RuntimeMethod* method);
// System.Boolean Mono.Security.Protocol.Tls.TlsServerSettings::get_CertificateRequest()
extern "C" IL2CPP_METHOD_ATTR bool TlsServerSettings_get_CertificateRequest_m842655670 (TlsServerSettings_t4144396432 * __this, const RuntimeMethod* method);
// System.Boolean Mono.Security.Protocol.Tls.SslStreamBase::RaiseRemoteCertificateValidation(System.Security.Cryptography.X509Certificates.X509Certificate,System.Int32[])
extern "C" IL2CPP_METHOD_ATTR bool SslStreamBase_RaiseRemoteCertificateValidation_m944390272 (SslStreamBase_t1667413407 * __this, X509Certificate_t713131622 * ___certificate0, Int32U5BU5D_t385246372* ___errors1, const RuntimeMethod* method);
// Mono.Security.Protocol.Tls.ValidationResult Mono.Security.Protocol.Tls.SslStreamBase::RaiseRemoteCertificateValidation2(Mono.Security.X509.X509CertificateCollection)
extern "C" IL2CPP_METHOD_ATTR ValidationResult_t3834298736 * SslStreamBase_RaiseRemoteCertificateValidation2_m2908038766 (SslStreamBase_t1667413407 * __this, X509CertificateCollection_t1542168550 * ___collection0, const RuntimeMethod* method);
// System.Security.Cryptography.X509Certificates.X509Certificate Mono.Security.Protocol.Tls.SslStreamBase::RaiseLocalCertificateSelection(System.Security.Cryptography.X509Certificates.X509CertificateCollection,System.Security.Cryptography.X509Certificates.X509Certificate,System.String,System.Security.Cryptography.X509Certificates.X509CertificateCollection)
extern "C" IL2CPP_METHOD_ATTR X509Certificate_t713131622 * SslStreamBase_RaiseLocalCertificateSelection_m980106471 (SslStreamBase_t1667413407 * __this, X509CertificateCollection_t3399372417 * ___certificates0, X509Certificate_t713131622 * ___remoteCertificate1, String_t* ___targetHost2, X509CertificateCollection_t3399372417 * ___requestedCertificates3, const RuntimeMethod* method);
// System.Security.Cryptography.AsymmetricAlgorithm Mono.Security.Protocol.Tls.SslStreamBase::RaiseLocalPrivateKeySelection(System.Security.Cryptography.X509Certificates.X509Certificate,System.String)
extern "C" IL2CPP_METHOD_ATTR AsymmetricAlgorithm_t932037087 * SslStreamBase_RaiseLocalPrivateKeySelection_m4112368540 (SslStreamBase_t1667413407 * __this, X509Certificate_t713131622 * ___certificate0, String_t* ___targetHost1, const RuntimeMethod* method);
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.String Locale::GetText(System.String)
extern "C" IL2CPP_METHOD_ATTR String_t* Locale_GetText_m3520169047 (RuntimeObject * __this /* static, unused */, String_t* ___msg0, const RuntimeMethod* method)
{
{
String_t* L_0 = ___msg0;
return L_0;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void Mono.Math.BigInteger::.ctor(Mono.Math.BigInteger/Sign,System.UInt32)
extern "C" IL2CPP_METHOD_ATTR void BigInteger__ctor_m3473491062 (BigInteger_t2902905090 * __this, int32_t ___sign0, uint32_t ___len1, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (BigInteger__ctor_m3473491062_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
__this->set_length_0(1);
Object__ctor_m297566312(__this, /*hidden argument*/NULL);
uint32_t L_0 = ___len1;
UInt32U5BU5D_t2770800703* L_1 = (UInt32U5BU5D_t2770800703*)SZArrayNew(UInt32U5BU5D_t2770800703_il2cpp_TypeInfo_var, (uint32_t)(((uintptr_t)L_0)));
__this->set_data_1(L_1);
uint32_t L_2 = ___len1;
__this->set_length_0(L_2);
return;
}
}
// System.Void Mono.Math.BigInteger::.ctor(Mono.Math.BigInteger)
extern "C" IL2CPP_METHOD_ATTR void BigInteger__ctor_m2108826647 (BigInteger_t2902905090 * __this, BigInteger_t2902905090 * ___bi0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (BigInteger__ctor_m2108826647_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
__this->set_length_0(1);
Object__ctor_m297566312(__this, /*hidden argument*/NULL);
BigInteger_t2902905090 * L_0 = ___bi0;
UInt32U5BU5D_t2770800703* L_1 = L_0->get_data_1();
RuntimeObject * L_2 = Array_Clone_m2672907798((RuntimeArray *)(RuntimeArray *)L_1, /*hidden argument*/NULL);
__this->set_data_1(((UInt32U5BU5D_t2770800703*)Castclass((RuntimeObject*)L_2, UInt32U5BU5D_t2770800703_il2cpp_TypeInfo_var)));
BigInteger_t2902905090 * L_3 = ___bi0;
uint32_t L_4 = L_3->get_length_0();
__this->set_length_0(L_4);
return;
}
}
// System.Void Mono.Math.BigInteger::.ctor(Mono.Math.BigInteger,System.UInt32)
extern "C" IL2CPP_METHOD_ATTR void BigInteger__ctor_m2644482640 (BigInteger_t2902905090 * __this, BigInteger_t2902905090 * ___bi0, uint32_t ___len1, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (BigInteger__ctor_m2644482640_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
uint32_t V_0 = 0;
{
__this->set_length_0(1);
Object__ctor_m297566312(__this, /*hidden argument*/NULL);
uint32_t L_0 = ___len1;
UInt32U5BU5D_t2770800703* L_1 = (UInt32U5BU5D_t2770800703*)SZArrayNew(UInt32U5BU5D_t2770800703_il2cpp_TypeInfo_var, (uint32_t)(((uintptr_t)L_0)));
__this->set_data_1(L_1);
V_0 = 0;
goto IL_0037;
}
IL_0021:
{
UInt32U5BU5D_t2770800703* L_2 = __this->get_data_1();
uint32_t L_3 = V_0;
BigInteger_t2902905090 * L_4 = ___bi0;
UInt32U5BU5D_t2770800703* L_5 = L_4->get_data_1();
uint32_t L_6 = V_0;
uintptr_t L_7 = (((uintptr_t)L_6));
uint32_t L_8 = (L_5)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_7));
(L_2)->SetAtUnchecked(static_cast<il2cpp_array_size_t>((((uintptr_t)L_3))), (uint32_t)L_8);
uint32_t L_9 = V_0;
V_0 = ((int32_t)il2cpp_codegen_add((int32_t)L_9, (int32_t)1));
}
IL_0037:
{
uint32_t L_10 = V_0;
BigInteger_t2902905090 * L_11 = ___bi0;
uint32_t L_12 = L_11->get_length_0();
if ((!(((uint32_t)L_10) >= ((uint32_t)L_12))))
{
goto IL_0021;
}
}
{
BigInteger_t2902905090 * L_13 = ___bi0;
uint32_t L_14 = L_13->get_length_0();
__this->set_length_0(L_14);
return;
}
}
// System.Void Mono.Math.BigInteger::.ctor(System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void BigInteger__ctor_m2601366464 (BigInteger_t2902905090 * __this, ByteU5BU5D_t4116647657* ___inData0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (BigInteger__ctor_m2601366464_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
int32_t V_0 = 0;
int32_t V_1 = 0;
int32_t V_2 = 0;
int32_t V_3 = 0;
{
__this->set_length_0(1);
Object__ctor_m297566312(__this, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_0 = ___inData0;
__this->set_length_0(((int32_t)((uint32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_0)->max_length))))>>2)));
ByteU5BU5D_t4116647657* L_1 = ___inData0;
V_0 = ((int32_t)((int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_1)->max_length))))&(int32_t)3));
int32_t L_2 = V_0;
if (!L_2)
{
goto IL_0032;
}
}
{
uint32_t L_3 = __this->get_length_0();
__this->set_length_0(((int32_t)il2cpp_codegen_add((int32_t)L_3, (int32_t)1)));
}
IL_0032:
{
uint32_t L_4 = __this->get_length_0();
UInt32U5BU5D_t2770800703* L_5 = (UInt32U5BU5D_t2770800703*)SZArrayNew(UInt32U5BU5D_t2770800703_il2cpp_TypeInfo_var, (uint32_t)(((uintptr_t)L_4)));
__this->set_data_1(L_5);
ByteU5BU5D_t4116647657* L_6 = ___inData0;
V_1 = ((int32_t)il2cpp_codegen_subtract((int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_6)->max_length)))), (int32_t)1));
V_2 = 0;
goto IL_007e;
}
IL_0051:
{
UInt32U5BU5D_t2770800703* L_7 = __this->get_data_1();
int32_t L_8 = V_2;
ByteU5BU5D_t4116647657* L_9 = ___inData0;
int32_t L_10 = V_1;
int32_t L_11 = ((int32_t)il2cpp_codegen_subtract((int32_t)L_10, (int32_t)3));
uint8_t L_12 = (L_9)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_11));
ByteU5BU5D_t4116647657* L_13 = ___inData0;
int32_t L_14 = V_1;
int32_t L_15 = ((int32_t)il2cpp_codegen_subtract((int32_t)L_14, (int32_t)2));
uint8_t L_16 = (L_13)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_15));
ByteU5BU5D_t4116647657* L_17 = ___inData0;
int32_t L_18 = V_1;
int32_t L_19 = ((int32_t)il2cpp_codegen_subtract((int32_t)L_18, (int32_t)1));
uint8_t L_20 = (L_17)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_19));
ByteU5BU5D_t4116647657* L_21 = ___inData0;
int32_t L_22 = V_1;
int32_t L_23 = L_22;
uint8_t L_24 = (L_21)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_23));
(L_7)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(L_8), (uint32_t)((int32_t)((int32_t)((int32_t)((int32_t)((int32_t)((int32_t)((int32_t)((int32_t)L_12<<(int32_t)((int32_t)24)))|(int32_t)((int32_t)((int32_t)L_16<<(int32_t)((int32_t)16)))))|(int32_t)((int32_t)((int32_t)L_20<<(int32_t)8))))|(int32_t)L_24)));
int32_t L_25 = V_1;
V_1 = ((int32_t)il2cpp_codegen_subtract((int32_t)L_25, (int32_t)4));
int32_t L_26 = V_2;
V_2 = ((int32_t)il2cpp_codegen_add((int32_t)L_26, (int32_t)1));
}
IL_007e:
{
int32_t L_27 = V_1;
if ((((int32_t)L_27) >= ((int32_t)3)))
{
goto IL_0051;
}
}
{
int32_t L_28 = V_0;
V_3 = L_28;
int32_t L_29 = V_3;
switch (((int32_t)il2cpp_codegen_subtract((int32_t)L_29, (int32_t)1)))
{
case 0:
{
goto IL_00a0;
}
case 1:
{
goto IL_00b8;
}
case 2:
{
goto IL_00d6;
}
}
}
{
goto IL_00fb;
}
IL_00a0:
{
UInt32U5BU5D_t2770800703* L_30 = __this->get_data_1();
uint32_t L_31 = __this->get_length_0();
ByteU5BU5D_t4116647657* L_32 = ___inData0;
int32_t L_33 = 0;
uint8_t L_34 = (L_32)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_33));
(L_30)->SetAtUnchecked(static_cast<il2cpp_array_size_t>((((uintptr_t)((int32_t)il2cpp_codegen_subtract((int32_t)L_31, (int32_t)1))))), (uint32_t)L_34);
goto IL_00fb;
}
IL_00b8:
{
UInt32U5BU5D_t2770800703* L_35 = __this->get_data_1();
uint32_t L_36 = __this->get_length_0();
ByteU5BU5D_t4116647657* L_37 = ___inData0;
int32_t L_38 = 0;
uint8_t L_39 = (L_37)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_38));
ByteU5BU5D_t4116647657* L_40 = ___inData0;
int32_t L_41 = 1;
uint8_t L_42 = (L_40)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_41));
(L_35)->SetAtUnchecked(static_cast<il2cpp_array_size_t>((((uintptr_t)((int32_t)il2cpp_codegen_subtract((int32_t)L_36, (int32_t)1))))), (uint32_t)((int32_t)((int32_t)((int32_t)((int32_t)L_39<<(int32_t)8))|(int32_t)L_42)));
goto IL_00fb;
}
IL_00d6:
{
UInt32U5BU5D_t2770800703* L_43 = __this->get_data_1();
uint32_t L_44 = __this->get_length_0();
ByteU5BU5D_t4116647657* L_45 = ___inData0;
int32_t L_46 = 0;
uint8_t L_47 = (L_45)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_46));
ByteU5BU5D_t4116647657* L_48 = ___inData0;
int32_t L_49 = 1;
uint8_t L_50 = (L_48)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_49));
ByteU5BU5D_t4116647657* L_51 = ___inData0;
int32_t L_52 = 2;
uint8_t L_53 = (L_51)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_52));
(L_43)->SetAtUnchecked(static_cast<il2cpp_array_size_t>((((uintptr_t)((int32_t)il2cpp_codegen_subtract((int32_t)L_44, (int32_t)1))))), (uint32_t)((int32_t)((int32_t)((int32_t)((int32_t)((int32_t)((int32_t)L_47<<(int32_t)((int32_t)16)))|(int32_t)((int32_t)((int32_t)L_50<<(int32_t)8))))|(int32_t)L_53)));
goto IL_00fb;
}
IL_00fb:
{
BigInteger_Normalize_m3021106862(__this, /*hidden argument*/NULL);
return;
}
}
// System.Void Mono.Math.BigInteger::.ctor(System.UInt32)
extern "C" IL2CPP_METHOD_ATTR void BigInteger__ctor_m2474659844 (BigInteger_t2902905090 * __this, uint32_t ___ui0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (BigInteger__ctor_m2474659844_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
__this->set_length_0(1);
Object__ctor_m297566312(__this, /*hidden argument*/NULL);
UInt32U5BU5D_t2770800703* L_0 = (UInt32U5BU5D_t2770800703*)SZArrayNew(UInt32U5BU5D_t2770800703_il2cpp_TypeInfo_var, (uint32_t)1);
UInt32U5BU5D_t2770800703* L_1 = L_0;
uint32_t L_2 = ___ui0;
(L_1)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(0), (uint32_t)L_2);
__this->set_data_1(L_1);
return;
}
}
// System.Void Mono.Math.BigInteger::.cctor()
extern "C" IL2CPP_METHOD_ATTR void BigInteger__cctor_m102257529 (RuntimeObject * __this /* static, unused */, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (BigInteger__cctor_m102257529_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
UInt32U5BU5D_t2770800703* L_0 = (UInt32U5BU5D_t2770800703*)SZArrayNew(UInt32U5BU5D_t2770800703_il2cpp_TypeInfo_var, (uint32_t)((int32_t)783));
UInt32U5BU5D_t2770800703* L_1 = L_0;
RuntimeFieldHandle_t1871169219 L_2 = { reinterpret_cast<intptr_t> (U3CPrivateImplementationDetailsU3E_t3057255363____U24U24fieldU2D0_0_FieldInfo_var) };
RuntimeHelpers_InitializeArray_m3117905507(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_1, L_2, /*hidden argument*/NULL);
((BigInteger_t2902905090_StaticFields*)il2cpp_codegen_static_fields_for(BigInteger_t2902905090_il2cpp_TypeInfo_var))->set_smallPrimes_2(L_1);
return;
}
}
// System.Security.Cryptography.RandomNumberGenerator Mono.Math.BigInteger::get_Rng()
extern "C" IL2CPP_METHOD_ATTR RandomNumberGenerator_t386037858 * BigInteger_get_Rng_m3283260184 (RuntimeObject * __this /* static, unused */, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (BigInteger_get_Rng_m3283260184_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
RandomNumberGenerator_t386037858 * L_0 = ((BigInteger_t2902905090_StaticFields*)il2cpp_codegen_static_fields_for(BigInteger_t2902905090_il2cpp_TypeInfo_var))->get_rng_3();
if (L_0)
{
goto IL_0014;
}
}
{
RandomNumberGenerator_t386037858 * L_1 = RandomNumberGenerator_Create_m4162970280(NULL /*static, unused*/, /*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
((BigInteger_t2902905090_StaticFields*)il2cpp_codegen_static_fields_for(BigInteger_t2902905090_il2cpp_TypeInfo_var))->set_rng_3(L_1);
}
IL_0014:
{
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
RandomNumberGenerator_t386037858 * L_2 = ((BigInteger_t2902905090_StaticFields*)il2cpp_codegen_static_fields_for(BigInteger_t2902905090_il2cpp_TypeInfo_var))->get_rng_3();
return L_2;
}
}
// Mono.Math.BigInteger Mono.Math.BigInteger::GenerateRandom(System.Int32,System.Security.Cryptography.RandomNumberGenerator)
extern "C" IL2CPP_METHOD_ATTR BigInteger_t2902905090 * BigInteger_GenerateRandom_m3872771375 (RuntimeObject * __this /* static, unused */, int32_t ___bits0, RandomNumberGenerator_t386037858 * ___rng1, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (BigInteger_GenerateRandom_m3872771375_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
int32_t V_0 = 0;
int32_t V_1 = 0;
BigInteger_t2902905090 * V_2 = NULL;
ByteU5BU5D_t4116647657* V_3 = NULL;
uint32_t V_4 = 0;
{
int32_t L_0 = ___bits0;
V_0 = ((int32_t)((int32_t)L_0>>(int32_t)5));
int32_t L_1 = ___bits0;
V_1 = ((int32_t)((int32_t)L_1&(int32_t)((int32_t)31)));
int32_t L_2 = V_1;
if (!L_2)
{
goto IL_0013;
}
}
{
int32_t L_3 = V_0;
V_0 = ((int32_t)il2cpp_codegen_add((int32_t)L_3, (int32_t)1));
}
IL_0013:
{
int32_t L_4 = V_0;
BigInteger_t2902905090 * L_5 = (BigInteger_t2902905090 *)il2cpp_codegen_object_new(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger__ctor_m3473491062(L_5, 1, ((int32_t)il2cpp_codegen_add((int32_t)L_4, (int32_t)1)), /*hidden argument*/NULL);
V_2 = L_5;
int32_t L_6 = V_0;
ByteU5BU5D_t4116647657* L_7 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)((int32_t)((int32_t)L_6<<(int32_t)2)));
V_3 = L_7;
RandomNumberGenerator_t386037858 * L_8 = ___rng1;
ByteU5BU5D_t4116647657* L_9 = V_3;
VirtActionInvoker1< ByteU5BU5D_t4116647657* >::Invoke(4 /* System.Void System.Security.Cryptography.RandomNumberGenerator::GetBytes(System.Byte[]) */, L_8, L_9);
ByteU5BU5D_t4116647657* L_10 = V_3;
BigInteger_t2902905090 * L_11 = V_2;
UInt32U5BU5D_t2770800703* L_12 = L_11->get_data_1();
int32_t L_13 = V_0;
Buffer_BlockCopy_m2884209081(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_10, 0, (RuntimeArray *)(RuntimeArray *)L_12, 0, ((int32_t)((int32_t)L_13<<(int32_t)2)), /*hidden argument*/NULL);
int32_t L_14 = V_1;
if (!L_14)
{
goto IL_0086;
}
}
{
int32_t L_15 = V_1;
V_4 = ((int32_t)((int32_t)1<<(int32_t)((int32_t)((int32_t)((int32_t)il2cpp_codegen_subtract((int32_t)L_15, (int32_t)1))&(int32_t)((int32_t)31)))));
BigInteger_t2902905090 * L_16 = V_2;
UInt32U5BU5D_t2770800703* L_17 = L_16->get_data_1();
int32_t L_18 = V_0;
uint32_t* L_19 = ((L_17)->GetAddressAtUnchecked(static_cast<il2cpp_array_size_t>(((int32_t)il2cpp_codegen_subtract((int32_t)L_18, (int32_t)1)))));
uint32_t L_20 = V_4;
*((int32_t*)(L_19)) = (int32_t)((int32_t)((int32_t)(*((uint32_t*)L_19))|(int32_t)L_20));
int32_t L_21 = V_1;
V_4 = ((int32_t)((uint32_t)(-1)>>((int32_t)((int32_t)((int32_t)il2cpp_codegen_subtract((int32_t)((int32_t)32), (int32_t)L_21))&(int32_t)((int32_t)31)))));
BigInteger_t2902905090 * L_22 = V_2;
UInt32U5BU5D_t2770800703* L_23 = L_22->get_data_1();
int32_t L_24 = V_0;
uint32_t* L_25 = ((L_23)->GetAddressAtUnchecked(static_cast<il2cpp_array_size_t>(((int32_t)il2cpp_codegen_subtract((int32_t)L_24, (int32_t)1)))));
uint32_t L_26 = V_4;
*((int32_t*)(L_25)) = (int32_t)((int32_t)((int32_t)(*((uint32_t*)L_25))&(int32_t)L_26));
goto IL_009d;
}
IL_0086:
{
BigInteger_t2902905090 * L_27 = V_2;
UInt32U5BU5D_t2770800703* L_28 = L_27->get_data_1();
int32_t L_29 = V_0;
uint32_t* L_30 = ((L_28)->GetAddressAtUnchecked(static_cast<il2cpp_array_size_t>(((int32_t)il2cpp_codegen_subtract((int32_t)L_29, (int32_t)1)))));
*((int32_t*)(L_30)) = (int32_t)((int32_t)((int32_t)(*((uint32_t*)L_30))|(int32_t)((int32_t)-2147483648LL)));
}
IL_009d:
{
BigInteger_t2902905090 * L_31 = V_2;
BigInteger_Normalize_m3021106862(L_31, /*hidden argument*/NULL);
BigInteger_t2902905090 * L_32 = V_2;
return L_32;
}
}
// Mono.Math.BigInteger Mono.Math.BigInteger::GenerateRandom(System.Int32)
extern "C" IL2CPP_METHOD_ATTR BigInteger_t2902905090 * BigInteger_GenerateRandom_m1790382084 (RuntimeObject * __this /* static, unused */, int32_t ___bits0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (BigInteger_GenerateRandom_m1790382084_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
int32_t L_0 = ___bits0;
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
RandomNumberGenerator_t386037858 * L_1 = BigInteger_get_Rng_m3283260184(NULL /*static, unused*/, /*hidden argument*/NULL);
BigInteger_t2902905090 * L_2 = BigInteger_GenerateRandom_m3872771375(NULL /*static, unused*/, L_0, L_1, /*hidden argument*/NULL);
return L_2;
}
}
// System.Int32 Mono.Math.BigInteger::BitCount()
extern "C" IL2CPP_METHOD_ATTR int32_t BigInteger_BitCount_m2055977486 (BigInteger_t2902905090 * __this, const RuntimeMethod* method)
{
uint32_t V_0 = 0;
uint32_t V_1 = 0;
uint32_t V_2 = 0;
{
BigInteger_Normalize_m3021106862(__this, /*hidden argument*/NULL);
UInt32U5BU5D_t2770800703* L_0 = __this->get_data_1();
uint32_t L_1 = __this->get_length_0();
uintptr_t L_2 = (((uintptr_t)((int32_t)il2cpp_codegen_subtract((int32_t)L_1, (int32_t)1))));
uint32_t L_3 = (L_0)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_2));
V_0 = L_3;
V_1 = ((int32_t)-2147483648LL);
V_2 = ((int32_t)32);
goto IL_002d;
}
IL_0025:
{
uint32_t L_4 = V_2;
V_2 = ((int32_t)il2cpp_codegen_subtract((int32_t)L_4, (int32_t)1));
uint32_t L_5 = V_1;
V_1 = ((int32_t)((uint32_t)L_5>>1));
}
IL_002d:
{
uint32_t L_6 = V_2;
if ((!(((uint32_t)L_6) > ((uint32_t)0))))
{
goto IL_003c;
}
}
{
uint32_t L_7 = V_0;
uint32_t L_8 = V_1;
if (!((int32_t)((int32_t)L_7&(int32_t)L_8)))
{
goto IL_0025;
}
}
IL_003c:
{
uint32_t L_9 = V_2;
uint32_t L_10 = __this->get_length_0();
V_2 = ((int32_t)il2cpp_codegen_add((int32_t)L_9, (int32_t)((int32_t)((int32_t)((int32_t)il2cpp_codegen_subtract((int32_t)L_10, (int32_t)1))<<(int32_t)5))));
uint32_t L_11 = V_2;
return L_11;
}
}
// System.Boolean Mono.Math.BigInteger::TestBit(System.Int32)
extern "C" IL2CPP_METHOD_ATTR bool BigInteger_TestBit_m2798226118 (BigInteger_t2902905090 * __this, int32_t ___bitNum0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (BigInteger_TestBit_m2798226118_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
uint32_t V_0 = 0;
uint8_t V_1 = 0x0;
uint32_t V_2 = 0;
{
int32_t L_0 = ___bitNum0;
if ((((int32_t)L_0) >= ((int32_t)0)))
{
goto IL_0012;
}
}
{
IndexOutOfRangeException_t1578797820 * L_1 = (IndexOutOfRangeException_t1578797820 *)il2cpp_codegen_object_new(IndexOutOfRangeException_t1578797820_il2cpp_TypeInfo_var);
IndexOutOfRangeException__ctor_m3408750441(L_1, _stringLiteral3202607819, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_1, NULL, BigInteger_TestBit_m2798226118_RuntimeMethod_var);
}
IL_0012:
{
int32_t L_2 = ___bitNum0;
V_0 = ((int32_t)((uint32_t)L_2>>5));
int32_t L_3 = ___bitNum0;
V_1 = (uint8_t)(((int32_t)((uint8_t)((int32_t)((int32_t)L_3&(int32_t)((int32_t)31))))));
uint8_t L_4 = V_1;
V_2 = ((int32_t)((int32_t)1<<(int32_t)((int32_t)((int32_t)L_4&(int32_t)((int32_t)31)))));
UInt32U5BU5D_t2770800703* L_5 = __this->get_data_1();
uint32_t L_6 = V_0;
uintptr_t L_7 = (((uintptr_t)L_6));
uint32_t L_8 = (L_5)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_7));
uint32_t L_9 = V_2;
UInt32U5BU5D_t2770800703* L_10 = __this->get_data_1();
uint32_t L_11 = V_0;
uintptr_t L_12 = (((uintptr_t)L_11));
uint32_t L_13 = (L_10)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_12));
return (bool)((((int32_t)((int32_t)((int32_t)L_8|(int32_t)L_9))) == ((int32_t)L_13))? 1 : 0);
}
}
// System.Void Mono.Math.BigInteger::SetBit(System.UInt32)
extern "C" IL2CPP_METHOD_ATTR void BigInteger_SetBit_m1387902198 (BigInteger_t2902905090 * __this, uint32_t ___bitNum0, const RuntimeMethod* method)
{
{
uint32_t L_0 = ___bitNum0;
BigInteger_SetBit_m1723423691(__this, L_0, (bool)1, /*hidden argument*/NULL);
return;
}
}
// System.Void Mono.Math.BigInteger::SetBit(System.UInt32,System.Boolean)
extern "C" IL2CPP_METHOD_ATTR void BigInteger_SetBit_m1723423691 (BigInteger_t2902905090 * __this, uint32_t ___bitNum0, bool ___value1, const RuntimeMethod* method)
{
uint32_t V_0 = 0;
uint32_t V_1 = 0;
{
uint32_t L_0 = ___bitNum0;
V_0 = ((int32_t)((uint32_t)L_0>>5));
uint32_t L_1 = V_0;
uint32_t L_2 = __this->get_length_0();
if ((!(((uint32_t)L_1) < ((uint32_t)L_2))))
{
goto IL_004a;
}
}
{
uint32_t L_3 = ___bitNum0;
V_1 = ((int32_t)((int32_t)1<<(int32_t)((int32_t)((int32_t)((int32_t)((int32_t)L_3&(int32_t)((int32_t)31)))&(int32_t)((int32_t)31)))));
bool L_4 = ___value1;
if (!L_4)
{
goto IL_0037;
}
}
{
UInt32U5BU5D_t2770800703* L_5 = __this->get_data_1();
uint32_t L_6 = V_0;
uint32_t* L_7 = ((L_5)->GetAddressAtUnchecked(static_cast<il2cpp_array_size_t>((((uintptr_t)L_6)))));
uint32_t L_8 = V_1;
*((int32_t*)(L_7)) = (int32_t)((int32_t)((int32_t)(*((uint32_t*)L_7))|(int32_t)L_8));
goto IL_004a;
}
IL_0037:
{
UInt32U5BU5D_t2770800703* L_9 = __this->get_data_1();
uint32_t L_10 = V_0;
uint32_t* L_11 = ((L_9)->GetAddressAtUnchecked(static_cast<il2cpp_array_size_t>((((uintptr_t)L_10)))));
uint32_t L_12 = V_1;
*((int32_t*)(L_11)) = (int32_t)((int32_t)((int32_t)(*((uint32_t*)L_11))&(int32_t)((~L_12))));
}
IL_004a:
{
return;
}
}
// System.Int32 Mono.Math.BigInteger::LowestSetBit()
extern "C" IL2CPP_METHOD_ATTR int32_t BigInteger_LowestSetBit_m1199244228 (BigInteger_t2902905090 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (BigInteger_LowestSetBit_m1199244228_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
int32_t V_0 = 0;
{
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
bool L_0 = BigInteger_op_Equality_m3872814973(NULL /*static, unused*/, __this, 0, /*hidden argument*/NULL);
if (!L_0)
{
goto IL_000e;
}
}
{
return (-1);
}
IL_000e:
{
V_0 = 0;
goto IL_0019;
}
IL_0015:
{
int32_t L_1 = V_0;
V_0 = ((int32_t)il2cpp_codegen_add((int32_t)L_1, (int32_t)1));
}
IL_0019:
{
int32_t L_2 = V_0;
bool L_3 = BigInteger_TestBit_m2798226118(__this, L_2, /*hidden argument*/NULL);
if (!L_3)
{
goto IL_0015;
}
}
{
int32_t L_4 = V_0;
return L_4;
}
}
// System.Byte[] Mono.Math.BigInteger::GetBytes()
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* BigInteger_GetBytes_m1259701831 (BigInteger_t2902905090 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (BigInteger_GetBytes_m1259701831_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
int32_t V_0 = 0;
int32_t V_1 = 0;
ByteU5BU5D_t4116647657* V_2 = NULL;
int32_t V_3 = 0;
int32_t V_4 = 0;
int32_t V_5 = 0;
uint32_t V_6 = 0;
int32_t V_7 = 0;
{
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
bool L_0 = BigInteger_op_Equality_m3872814973(NULL /*static, unused*/, __this, 0, /*hidden argument*/NULL);
if (!L_0)
{
goto IL_0013;
}
}
{
ByteU5BU5D_t4116647657* L_1 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)1);
return L_1;
}
IL_0013:
{
int32_t L_2 = BigInteger_BitCount_m2055977486(__this, /*hidden argument*/NULL);
V_0 = L_2;
int32_t L_3 = V_0;
V_1 = ((int32_t)((int32_t)L_3>>(int32_t)3));
int32_t L_4 = V_0;
if (!((int32_t)((int32_t)L_4&(int32_t)7)))
{
goto IL_002a;
}
}
{
int32_t L_5 = V_1;
V_1 = ((int32_t)il2cpp_codegen_add((int32_t)L_5, (int32_t)1));
}
IL_002a:
{
int32_t L_6 = V_1;
ByteU5BU5D_t4116647657* L_7 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)L_6);
V_2 = L_7;
int32_t L_8 = V_1;
V_3 = ((int32_t)((int32_t)L_8&(int32_t)3));
int32_t L_9 = V_3;
if (L_9)
{
goto IL_003d;
}
}
{
V_3 = 4;
}
IL_003d:
{
V_4 = 0;
uint32_t L_10 = __this->get_length_0();
V_5 = ((int32_t)il2cpp_codegen_subtract((int32_t)L_10, (int32_t)1));
goto IL_0096;
}
IL_004f:
{
UInt32U5BU5D_t2770800703* L_11 = __this->get_data_1();
int32_t L_12 = V_5;
int32_t L_13 = L_12;
uint32_t L_14 = (L_11)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_13));
V_6 = L_14;
int32_t L_15 = V_3;
V_7 = ((int32_t)il2cpp_codegen_subtract((int32_t)L_15, (int32_t)1));
goto IL_0080;
}
IL_0064:
{
ByteU5BU5D_t4116647657* L_16 = V_2;
int32_t L_17 = V_4;
int32_t L_18 = V_7;
uint32_t L_19 = V_6;
(L_16)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(((int32_t)il2cpp_codegen_add((int32_t)L_17, (int32_t)L_18))), (uint8_t)(((int32_t)((uint8_t)((int32_t)((int32_t)L_19&(int32_t)((int32_t)255)))))));
uint32_t L_20 = V_6;
V_6 = ((int32_t)((uint32_t)L_20>>8));
int32_t L_21 = V_7;
V_7 = ((int32_t)il2cpp_codegen_subtract((int32_t)L_21, (int32_t)1));
}
IL_0080:
{
int32_t L_22 = V_7;
if ((((int32_t)L_22) >= ((int32_t)0)))
{
goto IL_0064;
}
}
{
int32_t L_23 = V_4;
int32_t L_24 = V_3;
V_4 = ((int32_t)il2cpp_codegen_add((int32_t)L_23, (int32_t)L_24));
V_3 = 4;
int32_t L_25 = V_5;
V_5 = ((int32_t)il2cpp_codegen_subtract((int32_t)L_25, (int32_t)1));
}
IL_0096:
{
int32_t L_26 = V_5;
if ((((int32_t)L_26) >= ((int32_t)0)))
{
goto IL_004f;
}
}
{
ByteU5BU5D_t4116647657* L_27 = V_2;
return L_27;
}
}
// System.String Mono.Math.BigInteger::ToString(System.UInt32)
extern "C" IL2CPP_METHOD_ATTR String_t* BigInteger_ToString_m3260066955 (BigInteger_t2902905090 * __this, uint32_t ___radix0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (BigInteger_ToString_m3260066955_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
uint32_t L_0 = ___radix0;
String_t* L_1 = BigInteger_ToString_m1181683046(__this, L_0, _stringLiteral1506186219, /*hidden argument*/NULL);
return L_1;
}
}
// System.String Mono.Math.BigInteger::ToString(System.UInt32,System.String)
extern "C" IL2CPP_METHOD_ATTR String_t* BigInteger_ToString_m1181683046 (BigInteger_t2902905090 * __this, uint32_t ___radix0, String_t* ___characterSet1, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (BigInteger_ToString_m1181683046_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
String_t* V_0 = NULL;
BigInteger_t2902905090 * V_1 = NULL;
uint32_t V_2 = 0;
{
String_t* L_0 = ___characterSet1;
int32_t L_1 = String_get_Length_m3847582255(L_0, /*hidden argument*/NULL);
uint32_t L_2 = ___radix0;
if ((((int64_t)(((int64_t)((int64_t)L_1)))) >= ((int64_t)(((int64_t)((uint64_t)L_2))))))
{
goto IL_001e;
}
}
{
ArgumentException_t132251570 * L_3 = (ArgumentException_t132251570 *)il2cpp_codegen_object_new(ArgumentException_t132251570_il2cpp_TypeInfo_var);
ArgumentException__ctor_m1216717135(L_3, _stringLiteral907065636, _stringLiteral2188206873, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_3, NULL, BigInteger_ToString_m1181683046_RuntimeMethod_var);
}
IL_001e:
{
uint32_t L_4 = ___radix0;
if ((!(((uint32_t)L_4) == ((uint32_t)1))))
{
goto IL_0035;
}
}
{
ArgumentException_t132251570 * L_5 = (ArgumentException_t132251570 *)il2cpp_codegen_object_new(ArgumentException_t132251570_il2cpp_TypeInfo_var);
ArgumentException__ctor_m1216717135(L_5, _stringLiteral2375729243, _stringLiteral3085174530, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_5, NULL, BigInteger_ToString_m1181683046_RuntimeMethod_var);
}
IL_0035:
{
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
bool L_6 = BigInteger_op_Equality_m3872814973(NULL /*static, unused*/, __this, 0, /*hidden argument*/NULL);
if (!L_6)
{
goto IL_0047;
}
}
{
return _stringLiteral3452614544;
}
IL_0047:
{
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
bool L_7 = BigInteger_op_Equality_m3872814973(NULL /*static, unused*/, __this, 1, /*hidden argument*/NULL);
if (!L_7)
{
goto IL_0059;
}
}
{
return _stringLiteral3452614543;
}
IL_0059:
{
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_8 = ((String_t_StaticFields*)il2cpp_codegen_static_fields_for(String_t_il2cpp_TypeInfo_var))->get_Empty_2();
V_0 = L_8;
BigInteger_t2902905090 * L_9 = (BigInteger_t2902905090 *)il2cpp_codegen_object_new(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger__ctor_m2108826647(L_9, __this, /*hidden argument*/NULL);
V_1 = L_9;
goto IL_0086;
}
IL_006b:
{
BigInteger_t2902905090 * L_10 = V_1;
uint32_t L_11 = ___radix0;
uint32_t L_12 = Kernel_SingleByteDivideInPlace_m2393683267(NULL /*static, unused*/, L_10, L_11, /*hidden argument*/NULL);
V_2 = L_12;
String_t* L_13 = ___characterSet1;
uint32_t L_14 = V_2;
Il2CppChar L_15 = String_get_Chars_m2986988803(L_13, L_14, /*hidden argument*/NULL);
Il2CppChar L_16 = L_15;
RuntimeObject * L_17 = Box(Char_t3634460470_il2cpp_TypeInfo_var, &L_16);
String_t* L_18 = V_0;
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_19 = String_Concat_m904156431(NULL /*static, unused*/, L_17, L_18, /*hidden argument*/NULL);
V_0 = L_19;
}
IL_0086:
{
BigInteger_t2902905090 * L_20 = V_1;
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
bool L_21 = BigInteger_op_Inequality_m3469726044(NULL /*static, unused*/, L_20, 0, /*hidden argument*/NULL);
if (L_21)
{
goto IL_006b;
}
}
{
String_t* L_22 = V_0;
return L_22;
}
}
// System.Void Mono.Math.BigInteger::Normalize()
extern "C" IL2CPP_METHOD_ATTR void BigInteger_Normalize_m3021106862 (BigInteger_t2902905090 * __this, const RuntimeMethod* method)
{
{
goto IL_0013;
}
IL_0005:
{
uint32_t L_0 = __this->get_length_0();
__this->set_length_0(((int32_t)il2cpp_codegen_subtract((int32_t)L_0, (int32_t)1)));
}
IL_0013:
{
uint32_t L_1 = __this->get_length_0();
if ((!(((uint32_t)L_1) > ((uint32_t)0))))
{
goto IL_0034;
}
}
{
UInt32U5BU5D_t2770800703* L_2 = __this->get_data_1();
uint32_t L_3 = __this->get_length_0();
uintptr_t L_4 = (((uintptr_t)((int32_t)il2cpp_codegen_subtract((int32_t)L_3, (int32_t)1))));
uint32_t L_5 = (L_2)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_4));
if (!L_5)
{
goto IL_0005;
}
}
IL_0034:
{
uint32_t L_6 = __this->get_length_0();
if (L_6)
{
goto IL_004d;
}
}
{
uint32_t L_7 = __this->get_length_0();
__this->set_length_0(((int32_t)il2cpp_codegen_add((int32_t)L_7, (int32_t)1)));
}
IL_004d:
{
return;
}
}
// System.Void Mono.Math.BigInteger::Clear()
extern "C" IL2CPP_METHOD_ATTR void BigInteger_Clear_m2995574218 (BigInteger_t2902905090 * __this, const RuntimeMethod* method)
{
int32_t V_0 = 0;
{
V_0 = 0;
goto IL_0014;
}
IL_0007:
{
UInt32U5BU5D_t2770800703* L_0 = __this->get_data_1();
int32_t L_1 = V_0;
(L_0)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(L_1), (uint32_t)0);
int32_t L_2 = V_0;
V_0 = ((int32_t)il2cpp_codegen_add((int32_t)L_2, (int32_t)1));
}
IL_0014:
{
int32_t L_3 = V_0;
uint32_t L_4 = __this->get_length_0();
if ((((int64_t)(((int64_t)((int64_t)L_3)))) < ((int64_t)(((int64_t)((uint64_t)L_4))))))
{
goto IL_0007;
}
}
{
return;
}
}
// System.Int32 Mono.Math.BigInteger::GetHashCode()
extern "C" IL2CPP_METHOD_ATTR int32_t BigInteger_GetHashCode_m1594560121 (BigInteger_t2902905090 * __this, const RuntimeMethod* method)
{
uint32_t V_0 = 0;
uint32_t V_1 = 0;
{
V_0 = 0;
V_1 = 0;
goto IL_0019;
}
IL_0009:
{
uint32_t L_0 = V_0;
UInt32U5BU5D_t2770800703* L_1 = __this->get_data_1();
uint32_t L_2 = V_1;
uintptr_t L_3 = (((uintptr_t)L_2));
uint32_t L_4 = (L_1)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_3));
V_0 = ((int32_t)((int32_t)L_0^(int32_t)L_4));
uint32_t L_5 = V_1;
V_1 = ((int32_t)il2cpp_codegen_add((int32_t)L_5, (int32_t)1));
}
IL_0019:
{
uint32_t L_6 = V_1;
uint32_t L_7 = __this->get_length_0();
if ((!(((uint32_t)L_6) >= ((uint32_t)L_7))))
{
goto IL_0009;
}
}
{
uint32_t L_8 = V_0;
return L_8;
}
}
// System.String Mono.Math.BigInteger::ToString()
extern "C" IL2CPP_METHOD_ATTR String_t* BigInteger_ToString_m3927393477 (BigInteger_t2902905090 * __this, const RuntimeMethod* method)
{
{
String_t* L_0 = BigInteger_ToString_m3260066955(__this, ((int32_t)10), /*hidden argument*/NULL);
return L_0;
}
}
// System.Boolean Mono.Math.BigInteger::Equals(System.Object)
extern "C" IL2CPP_METHOD_ATTR bool BigInteger_Equals_m63093403 (BigInteger_t2902905090 * __this, RuntimeObject * ___o0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (BigInteger_Equals_m63093403_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
BigInteger_t2902905090 * V_0 = NULL;
int32_t G_B6_0 = 0;
{
RuntimeObject * L_0 = ___o0;
if (L_0)
{
goto IL_0008;
}
}
{
return (bool)0;
}
IL_0008:
{
RuntimeObject * L_1 = ___o0;
if (!((RuntimeObject *)IsInstSealed((RuntimeObject*)L_1, Int32_t2950945753_il2cpp_TypeInfo_var)))
{
goto IL_002f;
}
}
{
RuntimeObject * L_2 = ___o0;
if ((((int32_t)((*(int32_t*)((int32_t*)UnBox(L_2, Int32_t2950945753_il2cpp_TypeInfo_var))))) < ((int32_t)0)))
{
goto IL_002d;
}
}
{
RuntimeObject * L_3 = ___o0;
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
bool L_4 = BigInteger_op_Equality_m3872814973(NULL /*static, unused*/, __this, ((*(uint32_t*)((uint32_t*)UnBox(L_3, UInt32_t2560061978_il2cpp_TypeInfo_var)))), /*hidden argument*/NULL);
G_B6_0 = ((int32_t)(L_4));
goto IL_002e;
}
IL_002d:
{
G_B6_0 = 0;
}
IL_002e:
{
return (bool)G_B6_0;
}
IL_002f:
{
RuntimeObject * L_5 = ___o0;
V_0 = ((BigInteger_t2902905090 *)IsInstClass((RuntimeObject*)L_5, BigInteger_t2902905090_il2cpp_TypeInfo_var));
BigInteger_t2902905090 * L_6 = V_0;
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
bool L_7 = BigInteger_op_Equality_m1194739960(NULL /*static, unused*/, L_6, (BigInteger_t2902905090 *)NULL, /*hidden argument*/NULL);
if (!L_7)
{
goto IL_0044;
}
}
{
return (bool)0;
}
IL_0044:
{
BigInteger_t2902905090 * L_8 = V_0;
int32_t L_9 = Kernel_Compare_m2669603547(NULL /*static, unused*/, __this, L_8, /*hidden argument*/NULL);
return (bool)((((int32_t)L_9) == ((int32_t)0))? 1 : 0);
}
}
// Mono.Math.BigInteger Mono.Math.BigInteger::ModInverse(Mono.Math.BigInteger)
extern "C" IL2CPP_METHOD_ATTR BigInteger_t2902905090 * BigInteger_ModInverse_m2426215562 (BigInteger_t2902905090 * __this, BigInteger_t2902905090 * ___modulus0, const RuntimeMethod* method)
{
{
BigInteger_t2902905090 * L_0 = ___modulus0;
BigInteger_t2902905090 * L_1 = Kernel_modInverse_m652700340(NULL /*static, unused*/, __this, L_0, /*hidden argument*/NULL);
return L_1;
}
}
// Mono.Math.BigInteger Mono.Math.BigInteger::ModPow(Mono.Math.BigInteger,Mono.Math.BigInteger)
extern "C" IL2CPP_METHOD_ATTR BigInteger_t2902905090 * BigInteger_ModPow_m3776562770 (BigInteger_t2902905090 * __this, BigInteger_t2902905090 * ___exp0, BigInteger_t2902905090 * ___n1, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (BigInteger_ModPow_m3776562770_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
ModulusRing_t596511505 * V_0 = NULL;
{
BigInteger_t2902905090 * L_0 = ___n1;
ModulusRing_t596511505 * L_1 = (ModulusRing_t596511505 *)il2cpp_codegen_object_new(ModulusRing_t596511505_il2cpp_TypeInfo_var);
ModulusRing__ctor_m2420310199(L_1, L_0, /*hidden argument*/NULL);
V_0 = L_1;
ModulusRing_t596511505 * L_2 = V_0;
BigInteger_t2902905090 * L_3 = ___exp0;
BigInteger_t2902905090 * L_4 = ModulusRing_Pow_m1124248336(L_2, __this, L_3, /*hidden argument*/NULL);
return L_4;
}
}
// Mono.Math.BigInteger Mono.Math.BigInteger::GeneratePseudoPrime(System.Int32)
extern "C" IL2CPP_METHOD_ATTR BigInteger_t2902905090 * BigInteger_GeneratePseudoPrime_m2547138838 (RuntimeObject * __this /* static, unused */, int32_t ___bits0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (BigInteger_GeneratePseudoPrime_m2547138838_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
SequentialSearchPrimeGeneratorBase_t2996090509 * V_0 = NULL;
{
SequentialSearchPrimeGeneratorBase_t2996090509 * L_0 = (SequentialSearchPrimeGeneratorBase_t2996090509 *)il2cpp_codegen_object_new(SequentialSearchPrimeGeneratorBase_t2996090509_il2cpp_TypeInfo_var);
SequentialSearchPrimeGeneratorBase__ctor_m577913576(L_0, /*hidden argument*/NULL);
V_0 = L_0;
SequentialSearchPrimeGeneratorBase_t2996090509 * L_1 = V_0;
int32_t L_2 = ___bits0;
BigInteger_t2902905090 * L_3 = VirtFuncInvoker1< BigInteger_t2902905090 *, int32_t >::Invoke(7 /* Mono.Math.BigInteger Mono.Math.Prime.Generator.SequentialSearchPrimeGeneratorBase::GenerateNewPrime(System.Int32) */, L_1, L_2);
return L_3;
}
}
// System.Void Mono.Math.BigInteger::Incr2()
extern "C" IL2CPP_METHOD_ATTR void BigInteger_Incr2_m1531167978 (BigInteger_t2902905090 * __this, const RuntimeMethod* method)
{
int32_t V_0 = 0;
{
V_0 = 0;
UInt32U5BU5D_t2770800703* L_0 = __this->get_data_1();
uint32_t* L_1 = ((L_0)->GetAddressAtUnchecked(static_cast<il2cpp_array_size_t>(0)));
*((int32_t*)(L_1)) = (int32_t)((int32_t)il2cpp_codegen_add((int32_t)(*((uint32_t*)L_1)), (int32_t)2));
UInt32U5BU5D_t2770800703* L_2 = __this->get_data_1();
int32_t L_3 = 0;
uint32_t L_4 = (L_2)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_3));
if ((!(((uint32_t)L_4) < ((uint32_t)2))))
{
goto IL_0077;
}
}
{
UInt32U5BU5D_t2770800703* L_5 = __this->get_data_1();
int32_t L_6 = V_0;
int32_t L_7 = ((int32_t)il2cpp_codegen_add((int32_t)L_6, (int32_t)1));
V_0 = L_7;
uint32_t* L_8 = ((L_5)->GetAddressAtUnchecked(static_cast<il2cpp_array_size_t>(L_7)));
*((int32_t*)(L_8)) = (int32_t)((int32_t)il2cpp_codegen_add((int32_t)(*((uint32_t*)L_8)), (int32_t)1));
goto IL_004c;
}
IL_003b:
{
UInt32U5BU5D_t2770800703* L_9 = __this->get_data_1();
int32_t L_10 = V_0;
uint32_t* L_11 = ((L_9)->GetAddressAtUnchecked(static_cast<il2cpp_array_size_t>(L_10)));
*((int32_t*)(L_11)) = (int32_t)((int32_t)il2cpp_codegen_add((int32_t)(*((uint32_t*)L_11)), (int32_t)1));
}
IL_004c:
{
UInt32U5BU5D_t2770800703* L_12 = __this->get_data_1();
int32_t L_13 = V_0;
int32_t L_14 = L_13;
V_0 = ((int32_t)il2cpp_codegen_add((int32_t)L_14, (int32_t)1));
int32_t L_15 = L_14;
uint32_t L_16 = (L_12)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_15));
if (!L_16)
{
goto IL_003b;
}
}
{
uint32_t L_17 = __this->get_length_0();
int32_t L_18 = V_0;
if ((!(((uint32_t)L_17) == ((uint32_t)L_18))))
{
goto IL_0077;
}
}
{
uint32_t L_19 = __this->get_length_0();
__this->set_length_0(((int32_t)il2cpp_codegen_add((int32_t)L_19, (int32_t)1)));
}
IL_0077:
{
return;
}
}
// Mono.Math.BigInteger Mono.Math.BigInteger::op_Implicit(System.UInt32)
extern "C" IL2CPP_METHOD_ATTR BigInteger_t2902905090 * BigInteger_op_Implicit_m3414367033 (RuntimeObject * __this /* static, unused */, uint32_t ___value0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (BigInteger_op_Implicit_m3414367033_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
uint32_t L_0 = ___value0;
BigInteger_t2902905090 * L_1 = (BigInteger_t2902905090 *)il2cpp_codegen_object_new(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger__ctor_m2474659844(L_1, L_0, /*hidden argument*/NULL);
return L_1;
}
}
// Mono.Math.BigInteger Mono.Math.BigInteger::op_Implicit(System.Int32)
extern "C" IL2CPP_METHOD_ATTR BigInteger_t2902905090 * BigInteger_op_Implicit_m2547142909 (RuntimeObject * __this /* static, unused */, int32_t ___value0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (BigInteger_op_Implicit_m2547142909_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
int32_t L_0 = ___value0;
if ((((int32_t)L_0) >= ((int32_t)0)))
{
goto IL_0012;
}
}
{
ArgumentOutOfRangeException_t777629997 * L_1 = (ArgumentOutOfRangeException_t777629997 *)il2cpp_codegen_object_new(ArgumentOutOfRangeException_t777629997_il2cpp_TypeInfo_var);
ArgumentOutOfRangeException__ctor_m3628145864(L_1, _stringLiteral3493618073, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_1, NULL, BigInteger_op_Implicit_m2547142909_RuntimeMethod_var);
}
IL_0012:
{
int32_t L_2 = ___value0;
BigInteger_t2902905090 * L_3 = (BigInteger_t2902905090 *)il2cpp_codegen_object_new(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger__ctor_m2474659844(L_3, L_2, /*hidden argument*/NULL);
return L_3;
}
}
// Mono.Math.BigInteger Mono.Math.BigInteger::op_Addition(Mono.Math.BigInteger,Mono.Math.BigInteger)
extern "C" IL2CPP_METHOD_ATTR BigInteger_t2902905090 * BigInteger_op_Addition_m1114527046 (RuntimeObject * __this /* static, unused */, BigInteger_t2902905090 * ___bi10, BigInteger_t2902905090 * ___bi21, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (BigInteger_op_Addition_m1114527046_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
BigInteger_t2902905090 * L_0 = ___bi10;
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
bool L_1 = BigInteger_op_Equality_m3872814973(NULL /*static, unused*/, L_0, 0, /*hidden argument*/NULL);
if (!L_1)
{
goto IL_0013;
}
}
{
BigInteger_t2902905090 * L_2 = ___bi21;
BigInteger_t2902905090 * L_3 = (BigInteger_t2902905090 *)il2cpp_codegen_object_new(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger__ctor_m2108826647(L_3, L_2, /*hidden argument*/NULL);
return L_3;
}
IL_0013:
{
BigInteger_t2902905090 * L_4 = ___bi21;
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
bool L_5 = BigInteger_op_Equality_m3872814973(NULL /*static, unused*/, L_4, 0, /*hidden argument*/NULL);
if (!L_5)
{
goto IL_0026;
}
}
{
BigInteger_t2902905090 * L_6 = ___bi10;
BigInteger_t2902905090 * L_7 = (BigInteger_t2902905090 *)il2cpp_codegen_object_new(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger__ctor_m2108826647(L_7, L_6, /*hidden argument*/NULL);
return L_7;
}
IL_0026:
{
BigInteger_t2902905090 * L_8 = ___bi10;
BigInteger_t2902905090 * L_9 = ___bi21;
BigInteger_t2902905090 * L_10 = Kernel_AddSameSign_m3267067385(NULL /*static, unused*/, L_8, L_9, /*hidden argument*/NULL);
return L_10;
}
}
// Mono.Math.BigInteger Mono.Math.BigInteger::op_Subtraction(Mono.Math.BigInteger,Mono.Math.BigInteger)
extern "C" IL2CPP_METHOD_ATTR BigInteger_t2902905090 * BigInteger_op_Subtraction_m4245834512 (RuntimeObject * __this /* static, unused */, BigInteger_t2902905090 * ___bi10, BigInteger_t2902905090 * ___bi21, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (BigInteger_op_Subtraction_m4245834512_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
int32_t V_0 = 0;
{
BigInteger_t2902905090 * L_0 = ___bi21;
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
bool L_1 = BigInteger_op_Equality_m3872814973(NULL /*static, unused*/, L_0, 0, /*hidden argument*/NULL);
if (!L_1)
{
goto IL_0013;
}
}
{
BigInteger_t2902905090 * L_2 = ___bi10;
BigInteger_t2902905090 * L_3 = (BigInteger_t2902905090 *)il2cpp_codegen_object_new(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger__ctor_m2108826647(L_3, L_2, /*hidden argument*/NULL);
return L_3;
}
IL_0013:
{
BigInteger_t2902905090 * L_4 = ___bi10;
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
bool L_5 = BigInteger_op_Equality_m3872814973(NULL /*static, unused*/, L_4, 0, /*hidden argument*/NULL);
if (!L_5)
{
goto IL_002a;
}
}
{
ArithmeticException_t4283546778 * L_6 = (ArithmeticException_t4283546778 *)il2cpp_codegen_object_new(ArithmeticException_t4283546778_il2cpp_TypeInfo_var);
ArithmeticException__ctor_m3551809662(L_6, _stringLiteral4059074779, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_6, NULL, BigInteger_op_Subtraction_m4245834512_RuntimeMethod_var);
}
IL_002a:
{
BigInteger_t2902905090 * L_7 = ___bi10;
BigInteger_t2902905090 * L_8 = ___bi21;
int32_t L_9 = Kernel_Compare_m2669603547(NULL /*static, unused*/, L_7, L_8, /*hidden argument*/NULL);
V_0 = L_9;
int32_t L_10 = V_0;
switch (((int32_t)il2cpp_codegen_add((int32_t)L_10, (int32_t)1)))
{
case 0:
{
goto IL_005a;
}
case 1:
{
goto IL_004b;
}
case 2:
{
goto IL_0052;
}
}
}
{
goto IL_0065;
}
IL_004b:
{
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger_t2902905090 * L_11 = BigInteger_op_Implicit_m2547142909(NULL /*static, unused*/, 0, /*hidden argument*/NULL);
return L_11;
}
IL_0052:
{
BigInteger_t2902905090 * L_12 = ___bi10;
BigInteger_t2902905090 * L_13 = ___bi21;
BigInteger_t2902905090 * L_14 = Kernel_Subtract_m846005223(NULL /*static, unused*/, L_12, L_13, /*hidden argument*/NULL);
return L_14;
}
IL_005a:
{
ArithmeticException_t4283546778 * L_15 = (ArithmeticException_t4283546778 *)il2cpp_codegen_object_new(ArithmeticException_t4283546778_il2cpp_TypeInfo_var);
ArithmeticException__ctor_m3551809662(L_15, _stringLiteral4059074779, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_15, NULL, BigInteger_op_Subtraction_m4245834512_RuntimeMethod_var);
}
IL_0065:
{
Exception_t * L_16 = (Exception_t *)il2cpp_codegen_object_new(Exception_t_il2cpp_TypeInfo_var);
Exception__ctor_m213470898(L_16, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_16, NULL, BigInteger_op_Subtraction_m4245834512_RuntimeMethod_var);
}
}
// System.UInt32 Mono.Math.BigInteger::op_Modulus(Mono.Math.BigInteger,System.UInt32)
extern "C" IL2CPP_METHOD_ATTR uint32_t BigInteger_op_Modulus_m3242311550 (RuntimeObject * __this /* static, unused */, BigInteger_t2902905090 * ___bi0, uint32_t ___ui1, const RuntimeMethod* method)
{
{
BigInteger_t2902905090 * L_0 = ___bi0;
uint32_t L_1 = ___ui1;
uint32_t L_2 = Kernel_DwordMod_m3830036736(NULL /*static, unused*/, L_0, L_1, /*hidden argument*/NULL);
return L_2;
}
}
// Mono.Math.BigInteger Mono.Math.BigInteger::op_Modulus(Mono.Math.BigInteger,Mono.Math.BigInteger)
extern "C" IL2CPP_METHOD_ATTR BigInteger_t2902905090 * BigInteger_op_Modulus_m2565477533 (RuntimeObject * __this /* static, unused */, BigInteger_t2902905090 * ___bi10, BigInteger_t2902905090 * ___bi21, const RuntimeMethod* method)
{
{
BigInteger_t2902905090 * L_0 = ___bi10;
BigInteger_t2902905090 * L_1 = ___bi21;
BigIntegerU5BU5D_t2349952477* L_2 = Kernel_multiByteDivide_m450694282(NULL /*static, unused*/, L_0, L_1, /*hidden argument*/NULL);
int32_t L_3 = 1;
BigInteger_t2902905090 * L_4 = (L_2)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_3));
return L_4;
}
}
// Mono.Math.BigInteger Mono.Math.BigInteger::op_Division(Mono.Math.BigInteger,Mono.Math.BigInteger)
extern "C" IL2CPP_METHOD_ATTR BigInteger_t2902905090 * BigInteger_op_Division_m3713793389 (RuntimeObject * __this /* static, unused */, BigInteger_t2902905090 * ___bi10, BigInteger_t2902905090 * ___bi21, const RuntimeMethod* method)
{
{
BigInteger_t2902905090 * L_0 = ___bi10;
BigInteger_t2902905090 * L_1 = ___bi21;
BigIntegerU5BU5D_t2349952477* L_2 = Kernel_multiByteDivide_m450694282(NULL /*static, unused*/, L_0, L_1, /*hidden argument*/NULL);
int32_t L_3 = 0;
BigInteger_t2902905090 * L_4 = (L_2)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_3));
return L_4;
}
}
// Mono.Math.BigInteger Mono.Math.BigInteger::op_Multiply(Mono.Math.BigInteger,Mono.Math.BigInteger)
extern "C" IL2CPP_METHOD_ATTR BigInteger_t2902905090 * BigInteger_op_Multiply_m3683746602 (RuntimeObject * __this /* static, unused */, BigInteger_t2902905090 * ___bi10, BigInteger_t2902905090 * ___bi21, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (BigInteger_op_Multiply_m3683746602_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
BigInteger_t2902905090 * V_0 = NULL;
{
BigInteger_t2902905090 * L_0 = ___bi10;
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
bool L_1 = BigInteger_op_Equality_m3872814973(NULL /*static, unused*/, L_0, 0, /*hidden argument*/NULL);
if (L_1)
{
goto IL_0018;
}
}
{
BigInteger_t2902905090 * L_2 = ___bi21;
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
bool L_3 = BigInteger_op_Equality_m3872814973(NULL /*static, unused*/, L_2, 0, /*hidden argument*/NULL);
if (!L_3)
{
goto IL_001f;
}
}
IL_0018:
{
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger_t2902905090 * L_4 = BigInteger_op_Implicit_m2547142909(NULL /*static, unused*/, 0, /*hidden argument*/NULL);
return L_4;
}
IL_001f:
{
BigInteger_t2902905090 * L_5 = ___bi10;
UInt32U5BU5D_t2770800703* L_6 = L_5->get_data_1();
BigInteger_t2902905090 * L_7 = ___bi10;
uint32_t L_8 = L_7->get_length_0();
if ((((int64_t)(((int64_t)((int64_t)(((int32_t)((int32_t)(((RuntimeArray *)L_6)->max_length)))))))) >= ((int64_t)(((int64_t)((uint64_t)L_8))))))
{
goto IL_003f;
}
}
{
IndexOutOfRangeException_t1578797820 * L_9 = (IndexOutOfRangeException_t1578797820 *)il2cpp_codegen_object_new(IndexOutOfRangeException_t1578797820_il2cpp_TypeInfo_var);
IndexOutOfRangeException__ctor_m3408750441(L_9, _stringLiteral3830216635, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_9, NULL, BigInteger_op_Multiply_m3683746602_RuntimeMethod_var);
}
IL_003f:
{
BigInteger_t2902905090 * L_10 = ___bi21;
UInt32U5BU5D_t2770800703* L_11 = L_10->get_data_1();
BigInteger_t2902905090 * L_12 = ___bi21;
uint32_t L_13 = L_12->get_length_0();
if ((((int64_t)(((int64_t)((int64_t)(((int32_t)((int32_t)(((RuntimeArray *)L_11)->max_length)))))))) >= ((int64_t)(((int64_t)((uint64_t)L_13))))))
{
goto IL_005f;
}
}
{
IndexOutOfRangeException_t1578797820 * L_14 = (IndexOutOfRangeException_t1578797820 *)il2cpp_codegen_object_new(IndexOutOfRangeException_t1578797820_il2cpp_TypeInfo_var);
IndexOutOfRangeException__ctor_m3408750441(L_14, _stringLiteral3016771816, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_14, NULL, BigInteger_op_Multiply_m3683746602_RuntimeMethod_var);
}
IL_005f:
{
BigInteger_t2902905090 * L_15 = ___bi10;
uint32_t L_16 = L_15->get_length_0();
BigInteger_t2902905090 * L_17 = ___bi21;
uint32_t L_18 = L_17->get_length_0();
BigInteger_t2902905090 * L_19 = (BigInteger_t2902905090 *)il2cpp_codegen_object_new(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger__ctor_m3473491062(L_19, 1, ((int32_t)il2cpp_codegen_add((int32_t)L_16, (int32_t)L_18)), /*hidden argument*/NULL);
V_0 = L_19;
BigInteger_t2902905090 * L_20 = ___bi10;
UInt32U5BU5D_t2770800703* L_21 = L_20->get_data_1();
BigInteger_t2902905090 * L_22 = ___bi10;
uint32_t L_23 = L_22->get_length_0();
BigInteger_t2902905090 * L_24 = ___bi21;
UInt32U5BU5D_t2770800703* L_25 = L_24->get_data_1();
BigInteger_t2902905090 * L_26 = ___bi21;
uint32_t L_27 = L_26->get_length_0();
BigInteger_t2902905090 * L_28 = V_0;
UInt32U5BU5D_t2770800703* L_29 = L_28->get_data_1();
Kernel_Multiply_m193213393(NULL /*static, unused*/, L_21, 0, L_23, L_25, 0, L_27, L_29, 0, /*hidden argument*/NULL);
BigInteger_t2902905090 * L_30 = V_0;
BigInteger_Normalize_m3021106862(L_30, /*hidden argument*/NULL);
BigInteger_t2902905090 * L_31 = V_0;
return L_31;
}
}
// Mono.Math.BigInteger Mono.Math.BigInteger::op_LeftShift(Mono.Math.BigInteger,System.Int32)
extern "C" IL2CPP_METHOD_ATTR BigInteger_t2902905090 * BigInteger_op_LeftShift_m3681213422 (RuntimeObject * __this /* static, unused */, BigInteger_t2902905090 * ___bi10, int32_t ___shiftVal1, const RuntimeMethod* method)
{
{
BigInteger_t2902905090 * L_0 = ___bi10;
int32_t L_1 = ___shiftVal1;
BigInteger_t2902905090 * L_2 = Kernel_LeftShift_m4140742987(NULL /*static, unused*/, L_0, L_1, /*hidden argument*/NULL);
return L_2;
}
}
// Mono.Math.BigInteger Mono.Math.BigInteger::op_RightShift(Mono.Math.BigInteger,System.Int32)
extern "C" IL2CPP_METHOD_ATTR BigInteger_t2902905090 * BigInteger_op_RightShift_m460065452 (RuntimeObject * __this /* static, unused */, BigInteger_t2902905090 * ___bi10, int32_t ___shiftVal1, const RuntimeMethod* method)
{
{
BigInteger_t2902905090 * L_0 = ___bi10;
int32_t L_1 = ___shiftVal1;
BigInteger_t2902905090 * L_2 = Kernel_RightShift_m3246168448(NULL /*static, unused*/, L_0, L_1, /*hidden argument*/NULL);
return L_2;
}
}
// System.Boolean Mono.Math.BigInteger::op_Equality(Mono.Math.BigInteger,System.UInt32)
extern "C" IL2CPP_METHOD_ATTR bool BigInteger_op_Equality_m3872814973 (RuntimeObject * __this /* static, unused */, BigInteger_t2902905090 * ___bi10, uint32_t ___ui1, const RuntimeMethod* method)
{
int32_t G_B5_0 = 0;
{
BigInteger_t2902905090 * L_0 = ___bi10;
uint32_t L_1 = L_0->get_length_0();
if ((((int32_t)L_1) == ((int32_t)1)))
{
goto IL_0012;
}
}
{
BigInteger_t2902905090 * L_2 = ___bi10;
BigInteger_Normalize_m3021106862(L_2, /*hidden argument*/NULL);
}
IL_0012:
{
BigInteger_t2902905090 * L_3 = ___bi10;
uint32_t L_4 = L_3->get_length_0();
if ((!(((uint32_t)L_4) == ((uint32_t)1))))
{
goto IL_002b;
}
}
{
BigInteger_t2902905090 * L_5 = ___bi10;
UInt32U5BU5D_t2770800703* L_6 = L_5->get_data_1();
int32_t L_7 = 0;
uint32_t L_8 = (L_6)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_7));
uint32_t L_9 = ___ui1;
G_B5_0 = ((((int32_t)L_8) == ((int32_t)L_9))? 1 : 0);
goto IL_002c;
}
IL_002b:
{
G_B5_0 = 0;
}
IL_002c:
{
return (bool)G_B5_0;
}
}
// System.Boolean Mono.Math.BigInteger::op_Inequality(Mono.Math.BigInteger,System.UInt32)
extern "C" IL2CPP_METHOD_ATTR bool BigInteger_op_Inequality_m3469726044 (RuntimeObject * __this /* static, unused */, BigInteger_t2902905090 * ___bi10, uint32_t ___ui1, const RuntimeMethod* method)
{
int32_t G_B5_0 = 0;
{
BigInteger_t2902905090 * L_0 = ___bi10;
uint32_t L_1 = L_0->get_length_0();
if ((((int32_t)L_1) == ((int32_t)1)))
{
goto IL_0012;
}
}
{
BigInteger_t2902905090 * L_2 = ___bi10;
BigInteger_Normalize_m3021106862(L_2, /*hidden argument*/NULL);
}
IL_0012:
{
BigInteger_t2902905090 * L_3 = ___bi10;
uint32_t L_4 = L_3->get_length_0();
if ((!(((uint32_t)L_4) == ((uint32_t)1))))
{
goto IL_002b;
}
}
{
BigInteger_t2902905090 * L_5 = ___bi10;
UInt32U5BU5D_t2770800703* L_6 = L_5->get_data_1();
int32_t L_7 = 0;
uint32_t L_8 = (L_6)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_7));
uint32_t L_9 = ___ui1;
G_B5_0 = ((((int32_t)L_8) == ((int32_t)L_9))? 1 : 0);
goto IL_002c;
}
IL_002b:
{
G_B5_0 = 0;
}
IL_002c:
{
return (bool)((((int32_t)G_B5_0) == ((int32_t)0))? 1 : 0);
}
}
// System.Boolean Mono.Math.BigInteger::op_Equality(Mono.Math.BigInteger,Mono.Math.BigInteger)
extern "C" IL2CPP_METHOD_ATTR bool BigInteger_op_Equality_m1194739960 (RuntimeObject * __this /* static, unused */, BigInteger_t2902905090 * ___bi10, BigInteger_t2902905090 * ___bi21, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (BigInteger_op_Equality_m1194739960_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
BigInteger_t2902905090 * L_0 = ___bi10;
BigInteger_t2902905090 * L_1 = ___bi21;
if ((!(((RuntimeObject*)(BigInteger_t2902905090 *)L_0) == ((RuntimeObject*)(BigInteger_t2902905090 *)L_1))))
{
goto IL_0009;
}
}
{
return (bool)1;
}
IL_0009:
{
BigInteger_t2902905090 * L_2 = ___bi10;
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
bool L_3 = BigInteger_op_Equality_m1194739960(NULL /*static, unused*/, (BigInteger_t2902905090 *)NULL, L_2, /*hidden argument*/NULL);
if (L_3)
{
goto IL_0021;
}
}
{
BigInteger_t2902905090 * L_4 = ___bi21;
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
bool L_5 = BigInteger_op_Equality_m1194739960(NULL /*static, unused*/, (BigInteger_t2902905090 *)NULL, L_4, /*hidden argument*/NULL);
if (!L_5)
{
goto IL_0023;
}
}
IL_0021:
{
return (bool)0;
}
IL_0023:
{
BigInteger_t2902905090 * L_6 = ___bi10;
BigInteger_t2902905090 * L_7 = ___bi21;
int32_t L_8 = Kernel_Compare_m2669603547(NULL /*static, unused*/, L_6, L_7, /*hidden argument*/NULL);
return (bool)((((int32_t)L_8) == ((int32_t)0))? 1 : 0);
}
}
// System.Boolean Mono.Math.BigInteger::op_Inequality(Mono.Math.BigInteger,Mono.Math.BigInteger)
extern "C" IL2CPP_METHOD_ATTR bool BigInteger_op_Inequality_m2697143438 (RuntimeObject * __this /* static, unused */, BigInteger_t2902905090 * ___bi10, BigInteger_t2902905090 * ___bi21, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (BigInteger_op_Inequality_m2697143438_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
BigInteger_t2902905090 * L_0 = ___bi10;
BigInteger_t2902905090 * L_1 = ___bi21;
if ((!(((RuntimeObject*)(BigInteger_t2902905090 *)L_0) == ((RuntimeObject*)(BigInteger_t2902905090 *)L_1))))
{
goto IL_0009;
}
}
{
return (bool)0;
}
IL_0009:
{
BigInteger_t2902905090 * L_2 = ___bi10;
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
bool L_3 = BigInteger_op_Equality_m1194739960(NULL /*static, unused*/, (BigInteger_t2902905090 *)NULL, L_2, /*hidden argument*/NULL);
if (L_3)
{
goto IL_0021;
}
}
{
BigInteger_t2902905090 * L_4 = ___bi21;
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
bool L_5 = BigInteger_op_Equality_m1194739960(NULL /*static, unused*/, (BigInteger_t2902905090 *)NULL, L_4, /*hidden argument*/NULL);
if (!L_5)
{
goto IL_0023;
}
}
IL_0021:
{
return (bool)1;
}
IL_0023:
{
BigInteger_t2902905090 * L_6 = ___bi10;
BigInteger_t2902905090 * L_7 = ___bi21;
int32_t L_8 = Kernel_Compare_m2669603547(NULL /*static, unused*/, L_6, L_7, /*hidden argument*/NULL);
return (bool)((((int32_t)((((int32_t)L_8) == ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0);
}
}
// System.Boolean Mono.Math.BigInteger::op_GreaterThan(Mono.Math.BigInteger,Mono.Math.BigInteger)
extern "C" IL2CPP_METHOD_ATTR bool BigInteger_op_GreaterThan_m2974122765 (RuntimeObject * __this /* static, unused */, BigInteger_t2902905090 * ___bi10, BigInteger_t2902905090 * ___bi21, const RuntimeMethod* method)
{
{
BigInteger_t2902905090 * L_0 = ___bi10;
BigInteger_t2902905090 * L_1 = ___bi21;
int32_t L_2 = Kernel_Compare_m2669603547(NULL /*static, unused*/, L_0, L_1, /*hidden argument*/NULL);
return (bool)((((int32_t)L_2) > ((int32_t)0))? 1 : 0);
}
}
// System.Boolean Mono.Math.BigInteger::op_LessThan(Mono.Math.BigInteger,Mono.Math.BigInteger)
extern "C" IL2CPP_METHOD_ATTR bool BigInteger_op_LessThan_m463398176 (RuntimeObject * __this /* static, unused */, BigInteger_t2902905090 * ___bi10, BigInteger_t2902905090 * ___bi21, const RuntimeMethod* method)
{
{
BigInteger_t2902905090 * L_0 = ___bi10;
BigInteger_t2902905090 * L_1 = ___bi21;
int32_t L_2 = Kernel_Compare_m2669603547(NULL /*static, unused*/, L_0, L_1, /*hidden argument*/NULL);
return (bool)((((int32_t)L_2) < ((int32_t)0))? 1 : 0);
}
}
// System.Boolean Mono.Math.BigInteger::op_GreaterThanOrEqual(Mono.Math.BigInteger,Mono.Math.BigInteger)
extern "C" IL2CPP_METHOD_ATTR bool BigInteger_op_GreaterThanOrEqual_m3313329514 (RuntimeObject * __this /* static, unused */, BigInteger_t2902905090 * ___bi10, BigInteger_t2902905090 * ___bi21, const RuntimeMethod* method)
{
{
BigInteger_t2902905090 * L_0 = ___bi10;
BigInteger_t2902905090 * L_1 = ___bi21;
int32_t L_2 = Kernel_Compare_m2669603547(NULL /*static, unused*/, L_0, L_1, /*hidden argument*/NULL);
return (bool)((((int32_t)((((int32_t)L_2) < ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0);
}
}
// System.Boolean Mono.Math.BigInteger::op_LessThanOrEqual(Mono.Math.BigInteger,Mono.Math.BigInteger)
extern "C" IL2CPP_METHOD_ATTR bool BigInteger_op_LessThanOrEqual_m3925173639 (RuntimeObject * __this /* static, unused */, BigInteger_t2902905090 * ___bi10, BigInteger_t2902905090 * ___bi21, const RuntimeMethod* method)
{
{
BigInteger_t2902905090 * L_0 = ___bi10;
BigInteger_t2902905090 * L_1 = ___bi21;
int32_t L_2 = Kernel_Compare_m2669603547(NULL /*static, unused*/, L_0, L_1, /*hidden argument*/NULL);
return (bool)((((int32_t)((((int32_t)L_2) > ((int32_t)0))? 1 : 0)) == ((int32_t)0))? 1 : 0);
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Math.BigInteger Mono.Math.BigInteger/Kernel::AddSameSign(Mono.Math.BigInteger,Mono.Math.BigInteger)
extern "C" IL2CPP_METHOD_ATTR BigInteger_t2902905090 * Kernel_AddSameSign_m3267067385 (RuntimeObject * __this /* static, unused */, BigInteger_t2902905090 * ___bi10, BigInteger_t2902905090 * ___bi21, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (Kernel_AddSameSign_m3267067385_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
UInt32U5BU5D_t2770800703* V_0 = NULL;
UInt32U5BU5D_t2770800703* V_1 = NULL;
uint32_t V_2 = 0;
uint32_t V_3 = 0;
uint32_t V_4 = 0;
BigInteger_t2902905090 * V_5 = NULL;
UInt32U5BU5D_t2770800703* V_6 = NULL;
uint64_t V_7 = 0;
bool V_8 = false;
uint32_t V_9 = 0;
{
V_4 = 0;
BigInteger_t2902905090 * L_0 = ___bi10;
uint32_t L_1 = L_0->get_length_0();
BigInteger_t2902905090 * L_2 = ___bi21;
uint32_t L_3 = L_2->get_length_0();
if ((!(((uint32_t)L_1) < ((uint32_t)L_3))))
{
goto IL_0035;
}
}
{
BigInteger_t2902905090 * L_4 = ___bi21;
UInt32U5BU5D_t2770800703* L_5 = L_4->get_data_1();
V_0 = L_5;
BigInteger_t2902905090 * L_6 = ___bi21;
uint32_t L_7 = L_6->get_length_0();
V_3 = L_7;
BigInteger_t2902905090 * L_8 = ___bi10;
UInt32U5BU5D_t2770800703* L_9 = L_8->get_data_1();
V_1 = L_9;
BigInteger_t2902905090 * L_10 = ___bi10;
uint32_t L_11 = L_10->get_length_0();
V_2 = L_11;
goto IL_0051;
}
IL_0035:
{
BigInteger_t2902905090 * L_12 = ___bi10;
UInt32U5BU5D_t2770800703* L_13 = L_12->get_data_1();
V_0 = L_13;
BigInteger_t2902905090 * L_14 = ___bi10;
uint32_t L_15 = L_14->get_length_0();
V_3 = L_15;
BigInteger_t2902905090 * L_16 = ___bi21;
UInt32U5BU5D_t2770800703* L_17 = L_16->get_data_1();
V_1 = L_17;
BigInteger_t2902905090 * L_18 = ___bi21;
uint32_t L_19 = L_18->get_length_0();
V_2 = L_19;
}
IL_0051:
{
uint32_t L_20 = V_3;
BigInteger_t2902905090 * L_21 = (BigInteger_t2902905090 *)il2cpp_codegen_object_new(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger__ctor_m3473491062(L_21, 1, ((int32_t)il2cpp_codegen_add((int32_t)L_20, (int32_t)1)), /*hidden argument*/NULL);
V_5 = L_21;
BigInteger_t2902905090 * L_22 = V_5;
UInt32U5BU5D_t2770800703* L_23 = L_22->get_data_1();
V_6 = L_23;
V_7 = (((int64_t)((int64_t)0)));
}
IL_0069:
{
UInt32U5BU5D_t2770800703* L_24 = V_0;
uint32_t L_25 = V_4;
uintptr_t L_26 = (((uintptr_t)L_25));
uint32_t L_27 = (L_24)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_26));
UInt32U5BU5D_t2770800703* L_28 = V_1;
uint32_t L_29 = V_4;
uintptr_t L_30 = (((uintptr_t)L_29));
uint32_t L_31 = (L_28)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_30));
uint64_t L_32 = V_7;
V_7 = ((int64_t)il2cpp_codegen_add((int64_t)((int64_t)il2cpp_codegen_add((int64_t)(((int64_t)((uint64_t)L_27))), (int64_t)(((int64_t)((uint64_t)L_31))))), (int64_t)L_32));
UInt32U5BU5D_t2770800703* L_33 = V_6;
uint32_t L_34 = V_4;
uint64_t L_35 = V_7;
(L_33)->SetAtUnchecked(static_cast<il2cpp_array_size_t>((((uintptr_t)L_34))), (uint32_t)(((int32_t)((uint32_t)L_35))));
uint64_t L_36 = V_7;
V_7 = ((int64_t)((uint64_t)L_36>>((int32_t)32)));
uint32_t L_37 = V_4;
int32_t L_38 = ((int32_t)il2cpp_codegen_add((int32_t)L_37, (int32_t)1));
V_4 = L_38;
uint32_t L_39 = V_2;
if ((!(((uint32_t)L_38) >= ((uint32_t)L_39))))
{
goto IL_0069;
}
}
{
uint64_t L_40 = V_7;
V_8 = (bool)((((int32_t)((((int64_t)L_40) == ((int64_t)(((int64_t)((int64_t)0)))))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_41 = V_8;
if (!L_41)
{
goto IL_00fc;
}
}
{
uint32_t L_42 = V_4;
uint32_t L_43 = V_3;
if ((!(((uint32_t)L_42) < ((uint32_t)L_43))))
{
goto IL_00dd;
}
}
IL_00b2:
{
UInt32U5BU5D_t2770800703* L_44 = V_6;
uint32_t L_45 = V_4;
UInt32U5BU5D_t2770800703* L_46 = V_0;
uint32_t L_47 = V_4;
uintptr_t L_48 = (((uintptr_t)L_47));
uint32_t L_49 = (L_46)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_48));
int32_t L_50 = ((int32_t)il2cpp_codegen_add((int32_t)L_49, (int32_t)1));
V_9 = L_50;
(L_44)->SetAtUnchecked(static_cast<il2cpp_array_size_t>((((uintptr_t)L_45))), (uint32_t)L_50);
uint32_t L_51 = V_9;
V_8 = (bool)((((int32_t)L_51) == ((int32_t)0))? 1 : 0);
uint32_t L_52 = V_4;
int32_t L_53 = ((int32_t)il2cpp_codegen_add((int32_t)L_52, (int32_t)1));
V_4 = L_53;
uint32_t L_54 = V_3;
if ((!(((uint32_t)L_53) < ((uint32_t)L_54))))
{
goto IL_00dd;
}
}
{
bool L_55 = V_8;
if (L_55)
{
goto IL_00b2;
}
}
IL_00dd:
{
bool L_56 = V_8;
if (!L_56)
{
goto IL_00fc;
}
}
{
UInt32U5BU5D_t2770800703* L_57 = V_6;
uint32_t L_58 = V_4;
(L_57)->SetAtUnchecked(static_cast<il2cpp_array_size_t>((((uintptr_t)L_58))), (uint32_t)1);
BigInteger_t2902905090 * L_59 = V_5;
uint32_t L_60 = V_4;
int32_t L_61 = ((int32_t)il2cpp_codegen_add((int32_t)L_60, (int32_t)1));
V_4 = L_61;
L_59->set_length_0(L_61);
BigInteger_t2902905090 * L_62 = V_5;
return L_62;
}
IL_00fc:
{
uint32_t L_63 = V_4;
uint32_t L_64 = V_3;
if ((!(((uint32_t)L_63) < ((uint32_t)L_64))))
{
goto IL_011c;
}
}
IL_0104:
{
UInt32U5BU5D_t2770800703* L_65 = V_6;
uint32_t L_66 = V_4;
UInt32U5BU5D_t2770800703* L_67 = V_0;
uint32_t L_68 = V_4;
uintptr_t L_69 = (((uintptr_t)L_68));
uint32_t L_70 = (L_67)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_69));
(L_65)->SetAtUnchecked(static_cast<il2cpp_array_size_t>((((uintptr_t)L_66))), (uint32_t)L_70);
uint32_t L_71 = V_4;
int32_t L_72 = ((int32_t)il2cpp_codegen_add((int32_t)L_71, (int32_t)1));
V_4 = L_72;
uint32_t L_73 = V_3;
if ((!(((uint32_t)L_72) >= ((uint32_t)L_73))))
{
goto IL_0104;
}
}
IL_011c:
{
BigInteger_t2902905090 * L_74 = V_5;
BigInteger_Normalize_m3021106862(L_74, /*hidden argument*/NULL);
BigInteger_t2902905090 * L_75 = V_5;
return L_75;
}
}
// Mono.Math.BigInteger Mono.Math.BigInteger/Kernel::Subtract(Mono.Math.BigInteger,Mono.Math.BigInteger)
extern "C" IL2CPP_METHOD_ATTR BigInteger_t2902905090 * Kernel_Subtract_m846005223 (RuntimeObject * __this /* static, unused */, BigInteger_t2902905090 * ___big0, BigInteger_t2902905090 * ___small1, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (Kernel_Subtract_m846005223_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
BigInteger_t2902905090 * V_0 = NULL;
UInt32U5BU5D_t2770800703* V_1 = NULL;
UInt32U5BU5D_t2770800703* V_2 = NULL;
UInt32U5BU5D_t2770800703* V_3 = NULL;
uint32_t V_4 = 0;
uint32_t V_5 = 0;
uint32_t V_6 = 0;
uint32_t V_7 = 0;
{
BigInteger_t2902905090 * L_0 = ___big0;
uint32_t L_1 = L_0->get_length_0();
BigInteger_t2902905090 * L_2 = (BigInteger_t2902905090 *)il2cpp_codegen_object_new(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger__ctor_m3473491062(L_2, 1, L_1, /*hidden argument*/NULL);
V_0 = L_2;
BigInteger_t2902905090 * L_3 = V_0;
UInt32U5BU5D_t2770800703* L_4 = L_3->get_data_1();
V_1 = L_4;
BigInteger_t2902905090 * L_5 = ___big0;
UInt32U5BU5D_t2770800703* L_6 = L_5->get_data_1();
V_2 = L_6;
BigInteger_t2902905090 * L_7 = ___small1;
UInt32U5BU5D_t2770800703* L_8 = L_7->get_data_1();
V_3 = L_8;
V_4 = 0;
V_5 = 0;
}
IL_0028:
{
UInt32U5BU5D_t2770800703* L_9 = V_3;
uint32_t L_10 = V_4;
uintptr_t L_11 = (((uintptr_t)L_10));
uint32_t L_12 = (L_9)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_11));
V_6 = L_12;
uint32_t L_13 = V_6;
uint32_t L_14 = V_5;
int32_t L_15 = ((int32_t)il2cpp_codegen_add((int32_t)L_13, (int32_t)L_14));
V_6 = L_15;
uint32_t L_16 = V_5;
UInt32U5BU5D_t2770800703* L_17 = V_1;
uint32_t L_18 = V_4;
UInt32U5BU5D_t2770800703* L_19 = V_2;
uint32_t L_20 = V_4;
uintptr_t L_21 = (((uintptr_t)L_20));
uint32_t L_22 = (L_19)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_21));
uint32_t L_23 = V_6;
int32_t L_24 = ((int32_t)il2cpp_codegen_subtract((int32_t)L_22, (int32_t)L_23));
V_7 = L_24;
(L_17)->SetAtUnchecked(static_cast<il2cpp_array_size_t>((((uintptr_t)L_18))), (uint32_t)L_24);
uint32_t L_25 = V_7;
uint32_t L_26 = V_6;
if (!((int32_t)((int32_t)((!(((uint32_t)L_15) >= ((uint32_t)L_16)))? 1 : 0)|(int32_t)((!(((uint32_t)L_25) <= ((uint32_t)((~L_26)))))? 1 : 0))))
{
goto IL_0060;
}
}
{
V_5 = 1;
goto IL_0063;
}
IL_0060:
{
V_5 = 0;
}
IL_0063:
{
uint32_t L_27 = V_4;
int32_t L_28 = ((int32_t)il2cpp_codegen_add((int32_t)L_27, (int32_t)1));
V_4 = L_28;
BigInteger_t2902905090 * L_29 = ___small1;
uint32_t L_30 = L_29->get_length_0();
if ((!(((uint32_t)L_28) >= ((uint32_t)L_30))))
{
goto IL_0028;
}
}
{
uint32_t L_31 = V_4;
BigInteger_t2902905090 * L_32 = ___big0;
uint32_t L_33 = L_32->get_length_0();
if ((!(((uint32_t)L_31) == ((uint32_t)L_33))))
{
goto IL_0087;
}
}
{
goto IL_00e5;
}
IL_0087:
{
uint32_t L_34 = V_5;
if ((!(((uint32_t)L_34) == ((uint32_t)1))))
{
goto IL_00c9;
}
}
IL_008f:
{
UInt32U5BU5D_t2770800703* L_35 = V_1;
uint32_t L_36 = V_4;
UInt32U5BU5D_t2770800703* L_37 = V_2;
uint32_t L_38 = V_4;
uintptr_t L_39 = (((uintptr_t)L_38));
uint32_t L_40 = (L_37)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_39));
(L_35)->SetAtUnchecked(static_cast<il2cpp_array_size_t>((((uintptr_t)L_36))), (uint32_t)((int32_t)il2cpp_codegen_subtract((int32_t)L_40, (int32_t)1)));
UInt32U5BU5D_t2770800703* L_41 = V_2;
uint32_t L_42 = V_4;
uint32_t L_43 = L_42;
V_4 = ((int32_t)il2cpp_codegen_add((int32_t)L_43, (int32_t)1));
uintptr_t L_44 = (((uintptr_t)L_43));
uint32_t L_45 = (L_41)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_44));
if (L_45)
{
goto IL_00b7;
}
}
{
uint32_t L_46 = V_4;
BigInteger_t2902905090 * L_47 = ___big0;
uint32_t L_48 = L_47->get_length_0();
if ((!(((uint32_t)L_46) >= ((uint32_t)L_48))))
{
goto IL_008f;
}
}
IL_00b7:
{
uint32_t L_49 = V_4;
BigInteger_t2902905090 * L_50 = ___big0;
uint32_t L_51 = L_50->get_length_0();
if ((!(((uint32_t)L_49) == ((uint32_t)L_51))))
{
goto IL_00c9;
}
}
{
goto IL_00e5;
}
IL_00c9:
{
UInt32U5BU5D_t2770800703* L_52 = V_1;
uint32_t L_53 = V_4;
UInt32U5BU5D_t2770800703* L_54 = V_2;
uint32_t L_55 = V_4;
uintptr_t L_56 = (((uintptr_t)L_55));
uint32_t L_57 = (L_54)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_56));
(L_52)->SetAtUnchecked(static_cast<il2cpp_array_size_t>((((uintptr_t)L_53))), (uint32_t)L_57);
uint32_t L_58 = V_4;
int32_t L_59 = ((int32_t)il2cpp_codegen_add((int32_t)L_58, (int32_t)1));
V_4 = L_59;
BigInteger_t2902905090 * L_60 = ___big0;
uint32_t L_61 = L_60->get_length_0();
if ((!(((uint32_t)L_59) >= ((uint32_t)L_61))))
{
goto IL_00c9;
}
}
IL_00e5:
{
BigInteger_t2902905090 * L_62 = V_0;
BigInteger_Normalize_m3021106862(L_62, /*hidden argument*/NULL);
BigInteger_t2902905090 * L_63 = V_0;
return L_63;
}
}
// System.Void Mono.Math.BigInteger/Kernel::MinusEq(Mono.Math.BigInteger,Mono.Math.BigInteger)
extern "C" IL2CPP_METHOD_ATTR void Kernel_MinusEq_m2152832554 (RuntimeObject * __this /* static, unused */, BigInteger_t2902905090 * ___big0, BigInteger_t2902905090 * ___small1, const RuntimeMethod* method)
{
UInt32U5BU5D_t2770800703* V_0 = NULL;
UInt32U5BU5D_t2770800703* V_1 = NULL;
uint32_t V_2 = 0;
uint32_t V_3 = 0;
uint32_t V_4 = 0;
uint32_t V_5 = 0;
{
BigInteger_t2902905090 * L_0 = ___big0;
UInt32U5BU5D_t2770800703* L_1 = L_0->get_data_1();
V_0 = L_1;
BigInteger_t2902905090 * L_2 = ___small1;
UInt32U5BU5D_t2770800703* L_3 = L_2->get_data_1();
V_1 = L_3;
V_2 = 0;
V_3 = 0;
}
IL_0012:
{
UInt32U5BU5D_t2770800703* L_4 = V_1;
uint32_t L_5 = V_2;
uintptr_t L_6 = (((uintptr_t)L_5));
uint32_t L_7 = (L_4)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_6));
V_4 = L_7;
uint32_t L_8 = V_4;
uint32_t L_9 = V_3;
int32_t L_10 = ((int32_t)il2cpp_codegen_add((int32_t)L_8, (int32_t)L_9));
V_4 = L_10;
uint32_t L_11 = V_3;
UInt32U5BU5D_t2770800703* L_12 = V_0;
uint32_t L_13 = V_2;
uint32_t* L_14 = ((L_12)->GetAddressAtUnchecked(static_cast<il2cpp_array_size_t>((((uintptr_t)L_13)))));
uint32_t L_15 = V_4;
int32_t L_16 = ((int32_t)il2cpp_codegen_subtract((int32_t)(*((uint32_t*)L_14)), (int32_t)L_15));
V_5 = L_16;
*((int32_t*)(L_14)) = (int32_t)L_16;
uint32_t L_17 = V_5;
uint32_t L_18 = V_4;
if (!((int32_t)((int32_t)((!(((uint32_t)L_10) >= ((uint32_t)L_11)))? 1 : 0)|(int32_t)((!(((uint32_t)L_17) <= ((uint32_t)((~L_18)))))? 1 : 0))))
{
goto IL_0047;
}
}
{
V_3 = 1;
goto IL_0049;
}
IL_0047:
{
V_3 = 0;
}
IL_0049:
{
uint32_t L_19 = V_2;
int32_t L_20 = ((int32_t)il2cpp_codegen_add((int32_t)L_19, (int32_t)1));
V_2 = L_20;
BigInteger_t2902905090 * L_21 = ___small1;
uint32_t L_22 = L_21->get_length_0();
if ((!(((uint32_t)L_20) >= ((uint32_t)L_22))))
{
goto IL_0012;
}
}
{
uint32_t L_23 = V_2;
BigInteger_t2902905090 * L_24 = ___big0;
uint32_t L_25 = L_24->get_length_0();
if ((!(((uint32_t)L_23) == ((uint32_t)L_25))))
{
goto IL_006a;
}
}
{
goto IL_0097;
}
IL_006a:
{
uint32_t L_26 = V_3;
if ((!(((uint32_t)L_26) == ((uint32_t)1))))
{
goto IL_0097;
}
}
IL_0071:
{
UInt32U5BU5D_t2770800703* L_27 = V_0;
uint32_t L_28 = V_2;
uint32_t* L_29 = ((L_27)->GetAddressAtUnchecked(static_cast<il2cpp_array_size_t>((((uintptr_t)L_28)))));
*((int32_t*)(L_29)) = (int32_t)((int32_t)il2cpp_codegen_subtract((int32_t)(*((uint32_t*)L_29)), (int32_t)1));
UInt32U5BU5D_t2770800703* L_30 = V_0;
uint32_t L_31 = V_2;
uint32_t L_32 = L_31;
V_2 = ((int32_t)il2cpp_codegen_add((int32_t)L_32, (int32_t)1));
uintptr_t L_33 = (((uintptr_t)L_32));
uint32_t L_34 = (L_30)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_33));
if (L_34)
{
goto IL_0097;
}
}
{
uint32_t L_35 = V_2;
BigInteger_t2902905090 * L_36 = ___big0;
uint32_t L_37 = L_36->get_length_0();
if ((!(((uint32_t)L_35) >= ((uint32_t)L_37))))
{
goto IL_0071;
}
}
IL_0097:
{
goto IL_00aa;
}
IL_009c:
{
BigInteger_t2902905090 * L_38 = ___big0;
BigInteger_t2902905090 * L_39 = L_38;
uint32_t L_40 = L_39->get_length_0();
L_39->set_length_0(((int32_t)il2cpp_codegen_subtract((int32_t)L_40, (int32_t)1)));
}
IL_00aa:
{
BigInteger_t2902905090 * L_41 = ___big0;
uint32_t L_42 = L_41->get_length_0();
if ((!(((uint32_t)L_42) > ((uint32_t)0))))
{
goto IL_00cb;
}
}
{
BigInteger_t2902905090 * L_43 = ___big0;
UInt32U5BU5D_t2770800703* L_44 = L_43->get_data_1();
BigInteger_t2902905090 * L_45 = ___big0;
uint32_t L_46 = L_45->get_length_0();
uintptr_t L_47 = (((uintptr_t)((int32_t)il2cpp_codegen_subtract((int32_t)L_46, (int32_t)1))));
uint32_t L_48 = (L_44)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_47));
if (!L_48)
{
goto IL_009c;
}
}
IL_00cb:
{
BigInteger_t2902905090 * L_49 = ___big0;
uint32_t L_50 = L_49->get_length_0();
if (L_50)
{
goto IL_00e4;
}
}
{
BigInteger_t2902905090 * L_51 = ___big0;
BigInteger_t2902905090 * L_52 = L_51;
uint32_t L_53 = L_52->get_length_0();
L_52->set_length_0(((int32_t)il2cpp_codegen_add((int32_t)L_53, (int32_t)1)));
}
IL_00e4:
{
return;
}
}
// System.Void Mono.Math.BigInteger/Kernel::PlusEq(Mono.Math.BigInteger,Mono.Math.BigInteger)
extern "C" IL2CPP_METHOD_ATTR void Kernel_PlusEq_m136676638 (RuntimeObject * __this /* static, unused */, BigInteger_t2902905090 * ___bi10, BigInteger_t2902905090 * ___bi21, const RuntimeMethod* method)
{
UInt32U5BU5D_t2770800703* V_0 = NULL;
UInt32U5BU5D_t2770800703* V_1 = NULL;
uint32_t V_2 = 0;
uint32_t V_3 = 0;
uint32_t V_4 = 0;
bool V_5 = false;
UInt32U5BU5D_t2770800703* V_6 = NULL;
uint64_t V_7 = 0;
bool V_8 = false;
uint32_t V_9 = 0;
{
V_4 = 0;
V_5 = (bool)0;
BigInteger_t2902905090 * L_0 = ___bi10;
uint32_t L_1 = L_0->get_length_0();
BigInteger_t2902905090 * L_2 = ___bi21;
uint32_t L_3 = L_2->get_length_0();
if ((!(((uint32_t)L_1) < ((uint32_t)L_3))))
{
goto IL_003b;
}
}
{
V_5 = (bool)1;
BigInteger_t2902905090 * L_4 = ___bi21;
UInt32U5BU5D_t2770800703* L_5 = L_4->get_data_1();
V_0 = L_5;
BigInteger_t2902905090 * L_6 = ___bi21;
uint32_t L_7 = L_6->get_length_0();
V_3 = L_7;
BigInteger_t2902905090 * L_8 = ___bi10;
UInt32U5BU5D_t2770800703* L_9 = L_8->get_data_1();
V_1 = L_9;
BigInteger_t2902905090 * L_10 = ___bi10;
uint32_t L_11 = L_10->get_length_0();
V_2 = L_11;
goto IL_0057;
}
IL_003b:
{
BigInteger_t2902905090 * L_12 = ___bi10;
UInt32U5BU5D_t2770800703* L_13 = L_12->get_data_1();
V_0 = L_13;
BigInteger_t2902905090 * L_14 = ___bi10;
uint32_t L_15 = L_14->get_length_0();
V_3 = L_15;
BigInteger_t2902905090 * L_16 = ___bi21;
UInt32U5BU5D_t2770800703* L_17 = L_16->get_data_1();
V_1 = L_17;
BigInteger_t2902905090 * L_18 = ___bi21;
uint32_t L_19 = L_18->get_length_0();
V_2 = L_19;
}
IL_0057:
{
BigInteger_t2902905090 * L_20 = ___bi10;
UInt32U5BU5D_t2770800703* L_21 = L_20->get_data_1();
V_6 = L_21;
V_7 = (((int64_t)((int64_t)0)));
}
IL_0063:
{
uint64_t L_22 = V_7;
UInt32U5BU5D_t2770800703* L_23 = V_0;
uint32_t L_24 = V_4;
uintptr_t L_25 = (((uintptr_t)L_24));
uint32_t L_26 = (L_23)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_25));
UInt32U5BU5D_t2770800703* L_27 = V_1;
uint32_t L_28 = V_4;
uintptr_t L_29 = (((uintptr_t)L_28));
uint32_t L_30 = (L_27)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_29));
V_7 = ((int64_t)il2cpp_codegen_add((int64_t)L_22, (int64_t)((int64_t)il2cpp_codegen_add((int64_t)(((int64_t)((uint64_t)L_26))), (int64_t)(((int64_t)((uint64_t)L_30)))))));
UInt32U5BU5D_t2770800703* L_31 = V_6;
uint32_t L_32 = V_4;
uint64_t L_33 = V_7;
(L_31)->SetAtUnchecked(static_cast<il2cpp_array_size_t>((((uintptr_t)L_32))), (uint32_t)(((int32_t)((uint32_t)L_33))));
uint64_t L_34 = V_7;
V_7 = ((int64_t)((uint64_t)L_34>>((int32_t)32)));
uint32_t L_35 = V_4;
int32_t L_36 = ((int32_t)il2cpp_codegen_add((int32_t)L_35, (int32_t)1));
V_4 = L_36;
uint32_t L_37 = V_2;
if ((!(((uint32_t)L_36) >= ((uint32_t)L_37))))
{
goto IL_0063;
}
}
{
uint64_t L_38 = V_7;
V_8 = (bool)((((int32_t)((((int64_t)L_38) == ((int64_t)(((int64_t)((int64_t)0)))))? 1 : 0)) == ((int32_t)0))? 1 : 0);
bool L_39 = V_8;
if (!L_39)
{
goto IL_00f3;
}
}
{
uint32_t L_40 = V_4;
uint32_t L_41 = V_3;
if ((!(((uint32_t)L_40) < ((uint32_t)L_41))))
{
goto IL_00d7;
}
}
IL_00ac:
{
UInt32U5BU5D_t2770800703* L_42 = V_6;
uint32_t L_43 = V_4;
UInt32U5BU5D_t2770800703* L_44 = V_0;
uint32_t L_45 = V_4;
uintptr_t L_46 = (((uintptr_t)L_45));
uint32_t L_47 = (L_44)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_46));
int32_t L_48 = ((int32_t)il2cpp_codegen_add((int32_t)L_47, (int32_t)1));
V_9 = L_48;
(L_42)->SetAtUnchecked(static_cast<il2cpp_array_size_t>((((uintptr_t)L_43))), (uint32_t)L_48);
uint32_t L_49 = V_9;
V_8 = (bool)((((int32_t)L_49) == ((int32_t)0))? 1 : 0);
uint32_t L_50 = V_4;
int32_t L_51 = ((int32_t)il2cpp_codegen_add((int32_t)L_50, (int32_t)1));
V_4 = L_51;
uint32_t L_52 = V_3;
if ((!(((uint32_t)L_51) < ((uint32_t)L_52))))
{
goto IL_00d7;
}
}
{
bool L_53 = V_8;
if (L_53)
{
goto IL_00ac;
}
}
IL_00d7:
{
bool L_54 = V_8;
if (!L_54)
{
goto IL_00f3;
}
}
{
UInt32U5BU5D_t2770800703* L_55 = V_6;
uint32_t L_56 = V_4;
(L_55)->SetAtUnchecked(static_cast<il2cpp_array_size_t>((((uintptr_t)L_56))), (uint32_t)1);
BigInteger_t2902905090 * L_57 = ___bi10;
uint32_t L_58 = V_4;
int32_t L_59 = ((int32_t)il2cpp_codegen_add((int32_t)L_58, (int32_t)1));
V_4 = L_59;
L_57->set_length_0(L_59);
return;
}
IL_00f3:
{
bool L_60 = V_5;
if (!L_60)
{
goto IL_011c;
}
}
{
uint32_t L_61 = V_4;
uint32_t L_62 = V_3;
if ((!(((uint32_t)L_61) < ((uint32_t)((int32_t)il2cpp_codegen_subtract((int32_t)L_62, (int32_t)1))))))
{
goto IL_011c;
}
}
IL_0104:
{
UInt32U5BU5D_t2770800703* L_63 = V_6;
uint32_t L_64 = V_4;
UInt32U5BU5D_t2770800703* L_65 = V_0;
uint32_t L_66 = V_4;
uintptr_t L_67 = (((uintptr_t)L_66));
uint32_t L_68 = (L_65)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_67));
(L_63)->SetAtUnchecked(static_cast<il2cpp_array_size_t>((((uintptr_t)L_64))), (uint32_t)L_68);
uint32_t L_69 = V_4;
int32_t L_70 = ((int32_t)il2cpp_codegen_add((int32_t)L_69, (int32_t)1));
V_4 = L_70;
uint32_t L_71 = V_3;
if ((!(((uint32_t)L_70) >= ((uint32_t)L_71))))
{
goto IL_0104;
}
}
IL_011c:
{
BigInteger_t2902905090 * L_72 = ___bi10;
uint32_t L_73 = V_3;
L_72->set_length_0(((int32_t)il2cpp_codegen_add((int32_t)L_73, (int32_t)1)));
BigInteger_t2902905090 * L_74 = ___bi10;
BigInteger_Normalize_m3021106862(L_74, /*hidden argument*/NULL);
return;
}
}
// Mono.Math.BigInteger/Sign Mono.Math.BigInteger/Kernel::Compare(Mono.Math.BigInteger,Mono.Math.BigInteger)
extern "C" IL2CPP_METHOD_ATTR int32_t Kernel_Compare_m2669603547 (RuntimeObject * __this /* static, unused */, BigInteger_t2902905090 * ___bi10, BigInteger_t2902905090 * ___bi21, const RuntimeMethod* method)
{
uint32_t V_0 = 0;
uint32_t V_1 = 0;
uint32_t V_2 = 0;
{
BigInteger_t2902905090 * L_0 = ___bi10;
uint32_t L_1 = L_0->get_length_0();
V_0 = L_1;
BigInteger_t2902905090 * L_2 = ___bi21;
uint32_t L_3 = L_2->get_length_0();
V_1 = L_3;
goto IL_0017;
}
IL_0013:
{
uint32_t L_4 = V_0;
V_0 = ((int32_t)il2cpp_codegen_subtract((int32_t)L_4, (int32_t)1));
}
IL_0017:
{
uint32_t L_5 = V_0;
if ((!(((uint32_t)L_5) > ((uint32_t)0))))
{
goto IL_002e;
}
}
{
BigInteger_t2902905090 * L_6 = ___bi10;
UInt32U5BU5D_t2770800703* L_7 = L_6->get_data_1();
uint32_t L_8 = V_0;
uintptr_t L_9 = (((uintptr_t)((int32_t)il2cpp_codegen_subtract((int32_t)L_8, (int32_t)1))));
uint32_t L_10 = (L_7)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_9));
if (!L_10)
{
goto IL_0013;
}
}
IL_002e:
{
goto IL_0037;
}
IL_0033:
{
uint32_t L_11 = V_1;
V_1 = ((int32_t)il2cpp_codegen_subtract((int32_t)L_11, (int32_t)1));
}
IL_0037:
{
uint32_t L_12 = V_1;
if ((!(((uint32_t)L_12) > ((uint32_t)0))))
{
goto IL_004e;
}
}
{
BigInteger_t2902905090 * L_13 = ___bi21;
UInt32U5BU5D_t2770800703* L_14 = L_13->get_data_1();
uint32_t L_15 = V_1;
uintptr_t L_16 = (((uintptr_t)((int32_t)il2cpp_codegen_subtract((int32_t)L_15, (int32_t)1))));
uint32_t L_17 = (L_14)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_16));
if (!L_17)
{
goto IL_0033;
}
}
IL_004e:
{
uint32_t L_18 = V_0;
if (L_18)
{
goto IL_005c;
}
}
{
uint32_t L_19 = V_1;
if (L_19)
{
goto IL_005c;
}
}
{
return (int32_t)(0);
}
IL_005c:
{
uint32_t L_20 = V_0;
uint32_t L_21 = V_1;
if ((!(((uint32_t)L_20) < ((uint32_t)L_21))))
{
goto IL_0065;
}
}
{
return (int32_t)((-1));
}
IL_0065:
{
uint32_t L_22 = V_0;
uint32_t L_23 = V_1;
if ((!(((uint32_t)L_22) > ((uint32_t)L_23))))
{
goto IL_006e;
}
}
{
return (int32_t)(1);
}
IL_006e:
{
uint32_t L_24 = V_0;
V_2 = ((int32_t)il2cpp_codegen_subtract((int32_t)L_24, (int32_t)1));
goto IL_007b;
}
IL_0077:
{
uint32_t L_25 = V_2;
V_2 = ((int32_t)il2cpp_codegen_subtract((int32_t)L_25, (int32_t)1));
}
IL_007b:
{
uint32_t L_26 = V_2;
if (!L_26)
{
goto IL_0098;
}
}
{
BigInteger_t2902905090 * L_27 = ___bi10;
UInt32U5BU5D_t2770800703* L_28 = L_27->get_data_1();
uint32_t L_29 = V_2;
uintptr_t L_30 = (((uintptr_t)L_29));
uint32_t L_31 = (L_28)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_30));
BigInteger_t2902905090 * L_32 = ___bi21;
UInt32U5BU5D_t2770800703* L_33 = L_32->get_data_1();
uint32_t L_34 = V_2;
uintptr_t L_35 = (((uintptr_t)L_34));
uint32_t L_36 = (L_33)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_35));
if ((((int32_t)L_31) == ((int32_t)L_36)))
{
goto IL_0077;
}
}
IL_0098:
{
BigInteger_t2902905090 * L_37 = ___bi10;
UInt32U5BU5D_t2770800703* L_38 = L_37->get_data_1();
uint32_t L_39 = V_2;
uintptr_t L_40 = (((uintptr_t)L_39));
uint32_t L_41 = (L_38)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_40));
BigInteger_t2902905090 * L_42 = ___bi21;
UInt32U5BU5D_t2770800703* L_43 = L_42->get_data_1();
uint32_t L_44 = V_2;
uintptr_t L_45 = (((uintptr_t)L_44));
uint32_t L_46 = (L_43)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_45));
if ((!(((uint32_t)L_41) < ((uint32_t)L_46))))
{
goto IL_00b1;
}
}
{
return (int32_t)((-1));
}
IL_00b1:
{
BigInteger_t2902905090 * L_47 = ___bi10;
UInt32U5BU5D_t2770800703* L_48 = L_47->get_data_1();
uint32_t L_49 = V_2;
uintptr_t L_50 = (((uintptr_t)L_49));
uint32_t L_51 = (L_48)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_50));
BigInteger_t2902905090 * L_52 = ___bi21;
UInt32U5BU5D_t2770800703* L_53 = L_52->get_data_1();
uint32_t L_54 = V_2;
uintptr_t L_55 = (((uintptr_t)L_54));
uint32_t L_56 = (L_53)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_55));
if ((!(((uint32_t)L_51) > ((uint32_t)L_56))))
{
goto IL_00ca;
}
}
{
return (int32_t)(1);
}
IL_00ca:
{
return (int32_t)(0);
}
}
// System.UInt32 Mono.Math.BigInteger/Kernel::SingleByteDivideInPlace(Mono.Math.BigInteger,System.UInt32)
extern "C" IL2CPP_METHOD_ATTR uint32_t Kernel_SingleByteDivideInPlace_m2393683267 (RuntimeObject * __this /* static, unused */, BigInteger_t2902905090 * ___n0, uint32_t ___d1, const RuntimeMethod* method)
{
uint64_t V_0 = 0;
uint32_t V_1 = 0;
{
V_0 = (((int64_t)((int64_t)0)));
BigInteger_t2902905090 * L_0 = ___n0;
uint32_t L_1 = L_0->get_length_0();
V_1 = L_1;
goto IL_0034;
}
IL_000f:
{
uint64_t L_2 = V_0;
V_0 = ((int64_t)((int64_t)L_2<<(int32_t)((int32_t)32)));
uint64_t L_3 = V_0;
BigInteger_t2902905090 * L_4 = ___n0;
UInt32U5BU5D_t2770800703* L_5 = L_4->get_data_1();
uint32_t L_6 = V_1;
uintptr_t L_7 = (((uintptr_t)L_6));
uint32_t L_8 = (L_5)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_7));
V_0 = ((int64_t)((int64_t)L_3|(int64_t)(((int64_t)((uint64_t)L_8)))));
BigInteger_t2902905090 * L_9 = ___n0;
UInt32U5BU5D_t2770800703* L_10 = L_9->get_data_1();
uint32_t L_11 = V_1;
uint64_t L_12 = V_0;
uint32_t L_13 = ___d1;
(L_10)->SetAtUnchecked(static_cast<il2cpp_array_size_t>((((uintptr_t)L_11))), (uint32_t)(((int32_t)((uint32_t)((int64_t)((uint64_t)(int64_t)L_12/(uint64_t)(int64_t)(((int64_t)((uint64_t)L_13)))))))));
uint64_t L_14 = V_0;
uint32_t L_15 = ___d1;
V_0 = ((int64_t)((uint64_t)(int64_t)L_14%(uint64_t)(int64_t)(((int64_t)((uint64_t)L_15)))));
}
IL_0034:
{
uint32_t L_16 = V_1;
uint32_t L_17 = L_16;
V_1 = ((int32_t)il2cpp_codegen_subtract((int32_t)L_17, (int32_t)1));
if ((!(((uint32_t)L_17) <= ((uint32_t)0))))
{
goto IL_000f;
}
}
{
BigInteger_t2902905090 * L_18 = ___n0;
BigInteger_Normalize_m3021106862(L_18, /*hidden argument*/NULL);
uint64_t L_19 = V_0;
return (((int32_t)((uint32_t)L_19)));
}
}
// System.UInt32 Mono.Math.BigInteger/Kernel::DwordMod(Mono.Math.BigInteger,System.UInt32)
extern "C" IL2CPP_METHOD_ATTR uint32_t Kernel_DwordMod_m3830036736 (RuntimeObject * __this /* static, unused */, BigInteger_t2902905090 * ___n0, uint32_t ___d1, const RuntimeMethod* method)
{
uint64_t V_0 = 0;
uint32_t V_1 = 0;
{
V_0 = (((int64_t)((int64_t)0)));
BigInteger_t2902905090 * L_0 = ___n0;
uint32_t L_1 = L_0->get_length_0();
V_1 = L_1;
goto IL_0026;
}
IL_000f:
{
uint64_t L_2 = V_0;
V_0 = ((int64_t)((int64_t)L_2<<(int32_t)((int32_t)32)));
uint64_t L_3 = V_0;
BigInteger_t2902905090 * L_4 = ___n0;
UInt32U5BU5D_t2770800703* L_5 = L_4->get_data_1();
uint32_t L_6 = V_1;
uintptr_t L_7 = (((uintptr_t)L_6));
uint32_t L_8 = (L_5)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_7));
V_0 = ((int64_t)((int64_t)L_3|(int64_t)(((int64_t)((uint64_t)L_8)))));
uint64_t L_9 = V_0;
uint32_t L_10 = ___d1;
V_0 = ((int64_t)((uint64_t)(int64_t)L_9%(uint64_t)(int64_t)(((int64_t)((uint64_t)L_10)))));
}
IL_0026:
{
uint32_t L_11 = V_1;
uint32_t L_12 = L_11;
V_1 = ((int32_t)il2cpp_codegen_subtract((int32_t)L_12, (int32_t)1));
if ((!(((uint32_t)L_12) <= ((uint32_t)0))))
{
goto IL_000f;
}
}
{
uint64_t L_13 = V_0;
return (((int32_t)((uint32_t)L_13)));
}
}
// Mono.Math.BigInteger[] Mono.Math.BigInteger/Kernel::DwordDivMod(Mono.Math.BigInteger,System.UInt32)
extern "C" IL2CPP_METHOD_ATTR BigIntegerU5BU5D_t2349952477* Kernel_DwordDivMod_m1540317819 (RuntimeObject * __this /* static, unused */, BigInteger_t2902905090 * ___n0, uint32_t ___d1, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (Kernel_DwordDivMod_m1540317819_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
BigInteger_t2902905090 * V_0 = NULL;
uint64_t V_1 = 0;
uint32_t V_2 = 0;
BigInteger_t2902905090 * V_3 = NULL;
{
BigInteger_t2902905090 * L_0 = ___n0;
uint32_t L_1 = L_0->get_length_0();
BigInteger_t2902905090 * L_2 = (BigInteger_t2902905090 *)il2cpp_codegen_object_new(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger__ctor_m3473491062(L_2, 1, L_1, /*hidden argument*/NULL);
V_0 = L_2;
V_1 = (((int64_t)((int64_t)0)));
BigInteger_t2902905090 * L_3 = ___n0;
uint32_t L_4 = L_3->get_length_0();
V_2 = L_4;
goto IL_0041;
}
IL_001c:
{
uint64_t L_5 = V_1;
V_1 = ((int64_t)((int64_t)L_5<<(int32_t)((int32_t)32)));
uint64_t L_6 = V_1;
BigInteger_t2902905090 * L_7 = ___n0;
UInt32U5BU5D_t2770800703* L_8 = L_7->get_data_1();
uint32_t L_9 = V_2;
uintptr_t L_10 = (((uintptr_t)L_9));
uint32_t L_11 = (L_8)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_10));
V_1 = ((int64_t)((int64_t)L_6|(int64_t)(((int64_t)((uint64_t)L_11)))));
BigInteger_t2902905090 * L_12 = V_0;
UInt32U5BU5D_t2770800703* L_13 = L_12->get_data_1();
uint32_t L_14 = V_2;
uint64_t L_15 = V_1;
uint32_t L_16 = ___d1;
(L_13)->SetAtUnchecked(static_cast<il2cpp_array_size_t>((((uintptr_t)L_14))), (uint32_t)(((int32_t)((uint32_t)((int64_t)((uint64_t)(int64_t)L_15/(uint64_t)(int64_t)(((int64_t)((uint64_t)L_16)))))))));
uint64_t L_17 = V_1;
uint32_t L_18 = ___d1;
V_1 = ((int64_t)((uint64_t)(int64_t)L_17%(uint64_t)(int64_t)(((int64_t)((uint64_t)L_18)))));
}
IL_0041:
{
uint32_t L_19 = V_2;
uint32_t L_20 = L_19;
V_2 = ((int32_t)il2cpp_codegen_subtract((int32_t)L_20, (int32_t)1));
if ((!(((uint32_t)L_20) <= ((uint32_t)0))))
{
goto IL_001c;
}
}
{
BigInteger_t2902905090 * L_21 = V_0;
BigInteger_Normalize_m3021106862(L_21, /*hidden argument*/NULL);
uint64_t L_22 = V_1;
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger_t2902905090 * L_23 = BigInteger_op_Implicit_m3414367033(NULL /*static, unused*/, (((int32_t)((uint32_t)L_22))), /*hidden argument*/NULL);
V_3 = L_23;
BigIntegerU5BU5D_t2349952477* L_24 = (BigIntegerU5BU5D_t2349952477*)SZArrayNew(BigIntegerU5BU5D_t2349952477_il2cpp_TypeInfo_var, (uint32_t)2);
BigIntegerU5BU5D_t2349952477* L_25 = L_24;
BigInteger_t2902905090 * L_26 = V_0;
ArrayElementTypeCheck (L_25, L_26);
(L_25)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(0), (BigInteger_t2902905090 *)L_26);
BigIntegerU5BU5D_t2349952477* L_27 = L_25;
BigInteger_t2902905090 * L_28 = V_3;
ArrayElementTypeCheck (L_27, L_28);
(L_27)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(1), (BigInteger_t2902905090 *)L_28);
return L_27;
}
}
// Mono.Math.BigInteger[] Mono.Math.BigInteger/Kernel::multiByteDivide(Mono.Math.BigInteger,Mono.Math.BigInteger)
extern "C" IL2CPP_METHOD_ATTR BigIntegerU5BU5D_t2349952477* Kernel_multiByteDivide_m450694282 (RuntimeObject * __this /* static, unused */, BigInteger_t2902905090 * ___bi10, BigInteger_t2902905090 * ___bi21, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (Kernel_multiByteDivide_m450694282_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
uint32_t V_0 = 0;
int32_t V_1 = 0;
uint32_t V_2 = 0;
uint32_t V_3 = 0;
int32_t V_4 = 0;
int32_t V_5 = 0;
BigInteger_t2902905090 * V_6 = NULL;
BigInteger_t2902905090 * V_7 = NULL;
UInt32U5BU5D_t2770800703* V_8 = NULL;
int32_t V_9 = 0;
int32_t V_10 = 0;
uint32_t V_11 = 0;
uint64_t V_12 = 0;
uint64_t V_13 = 0;
uint64_t V_14 = 0;
uint64_t V_15 = 0;
uint32_t V_16 = 0;
uint32_t V_17 = 0;
int32_t V_18 = 0;
uint64_t V_19 = 0;
uint32_t V_20 = 0;
uint64_t V_21 = 0;
BigIntegerU5BU5D_t2349952477* V_22 = NULL;
{
BigInteger_t2902905090 * L_0 = ___bi10;
BigInteger_t2902905090 * L_1 = ___bi21;
int32_t L_2 = Kernel_Compare_m2669603547(NULL /*static, unused*/, L_0, L_1, /*hidden argument*/NULL);
if ((!(((uint32_t)L_2) == ((uint32_t)(-1)))))
{
goto IL_0026;
}
}
{
BigIntegerU5BU5D_t2349952477* L_3 = (BigIntegerU5BU5D_t2349952477*)SZArrayNew(BigIntegerU5BU5D_t2349952477_il2cpp_TypeInfo_var, (uint32_t)2);
BigIntegerU5BU5D_t2349952477* L_4 = L_3;
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger_t2902905090 * L_5 = BigInteger_op_Implicit_m2547142909(NULL /*static, unused*/, 0, /*hidden argument*/NULL);
ArrayElementTypeCheck (L_4, L_5);
(L_4)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(0), (BigInteger_t2902905090 *)L_5);
BigIntegerU5BU5D_t2349952477* L_6 = L_4;
BigInteger_t2902905090 * L_7 = ___bi10;
BigInteger_t2902905090 * L_8 = (BigInteger_t2902905090 *)il2cpp_codegen_object_new(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger__ctor_m2108826647(L_8, L_7, /*hidden argument*/NULL);
ArrayElementTypeCheck (L_6, L_8);
(L_6)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(1), (BigInteger_t2902905090 *)L_8);
return L_6;
}
IL_0026:
{
BigInteger_t2902905090 * L_9 = ___bi10;
BigInteger_Normalize_m3021106862(L_9, /*hidden argument*/NULL);
BigInteger_t2902905090 * L_10 = ___bi21;
BigInteger_Normalize_m3021106862(L_10, /*hidden argument*/NULL);
BigInteger_t2902905090 * L_11 = ___bi21;
uint32_t L_12 = L_11->get_length_0();
if ((!(((uint32_t)L_12) == ((uint32_t)1))))
{
goto IL_004d;
}
}
{
BigInteger_t2902905090 * L_13 = ___bi10;
BigInteger_t2902905090 * L_14 = ___bi21;
UInt32U5BU5D_t2770800703* L_15 = L_14->get_data_1();
int32_t L_16 = 0;
uint32_t L_17 = (L_15)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_16));
BigIntegerU5BU5D_t2349952477* L_18 = Kernel_DwordDivMod_m1540317819(NULL /*static, unused*/, L_13, L_17, /*hidden argument*/NULL);
return L_18;
}
IL_004d:
{
BigInteger_t2902905090 * L_19 = ___bi10;
uint32_t L_20 = L_19->get_length_0();
V_0 = ((int32_t)il2cpp_codegen_add((int32_t)L_20, (int32_t)1));
BigInteger_t2902905090 * L_21 = ___bi21;
uint32_t L_22 = L_21->get_length_0();
V_1 = ((int32_t)il2cpp_codegen_add((int32_t)L_22, (int32_t)1));
V_2 = ((int32_t)-2147483648LL);
BigInteger_t2902905090 * L_23 = ___bi21;
UInt32U5BU5D_t2770800703* L_24 = L_23->get_data_1();
BigInteger_t2902905090 * L_25 = ___bi21;
uint32_t L_26 = L_25->get_length_0();
uintptr_t L_27 = (((uintptr_t)((int32_t)il2cpp_codegen_subtract((int32_t)L_26, (int32_t)1))));
uint32_t L_28 = (L_24)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_27));
V_3 = L_28;
V_4 = 0;
BigInteger_t2902905090 * L_29 = ___bi10;
uint32_t L_30 = L_29->get_length_0();
BigInteger_t2902905090 * L_31 = ___bi21;
uint32_t L_32 = L_31->get_length_0();
V_5 = ((int32_t)il2cpp_codegen_subtract((int32_t)L_30, (int32_t)L_32));
goto IL_0097;
}
IL_008d:
{
int32_t L_33 = V_4;
V_4 = ((int32_t)il2cpp_codegen_add((int32_t)L_33, (int32_t)1));
uint32_t L_34 = V_2;
V_2 = ((int32_t)((uint32_t)L_34>>1));
}
IL_0097:
{
uint32_t L_35 = V_2;
if (!L_35)
{
goto IL_00a5;
}
}
{
uint32_t L_36 = V_3;
uint32_t L_37 = V_2;
if (!((int32_t)((int32_t)L_36&(int32_t)L_37)))
{
goto IL_008d;
}
}
IL_00a5:
{
BigInteger_t2902905090 * L_38 = ___bi10;
uint32_t L_39 = L_38->get_length_0();
BigInteger_t2902905090 * L_40 = ___bi21;
uint32_t L_41 = L_40->get_length_0();
BigInteger_t2902905090 * L_42 = (BigInteger_t2902905090 *)il2cpp_codegen_object_new(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger__ctor_m3473491062(L_42, 1, ((int32_t)il2cpp_codegen_add((int32_t)((int32_t)il2cpp_codegen_subtract((int32_t)L_39, (int32_t)L_41)), (int32_t)1)), /*hidden argument*/NULL);
V_6 = L_42;
BigInteger_t2902905090 * L_43 = ___bi10;
int32_t L_44 = V_4;
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger_t2902905090 * L_45 = BigInteger_op_LeftShift_m3681213422(NULL /*static, unused*/, L_43, L_44, /*hidden argument*/NULL);
V_7 = L_45;
BigInteger_t2902905090 * L_46 = V_7;
UInt32U5BU5D_t2770800703* L_47 = L_46->get_data_1();
V_8 = L_47;
BigInteger_t2902905090 * L_48 = ___bi21;
int32_t L_49 = V_4;
BigInteger_t2902905090 * L_50 = BigInteger_op_LeftShift_m3681213422(NULL /*static, unused*/, L_48, L_49, /*hidden argument*/NULL);
___bi21 = L_50;
uint32_t L_51 = V_0;
BigInteger_t2902905090 * L_52 = ___bi21;
uint32_t L_53 = L_52->get_length_0();
V_9 = ((int32_t)il2cpp_codegen_subtract((int32_t)L_51, (int32_t)L_53));
uint32_t L_54 = V_0;
V_10 = ((int32_t)il2cpp_codegen_subtract((int32_t)L_54, (int32_t)1));
BigInteger_t2902905090 * L_55 = ___bi21;
UInt32U5BU5D_t2770800703* L_56 = L_55->get_data_1();
BigInteger_t2902905090 * L_57 = ___bi21;
uint32_t L_58 = L_57->get_length_0();
uintptr_t L_59 = (((uintptr_t)((int32_t)il2cpp_codegen_subtract((int32_t)L_58, (int32_t)1))));
uint32_t L_60 = (L_56)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_59));
V_11 = L_60;
BigInteger_t2902905090 * L_61 = ___bi21;
UInt32U5BU5D_t2770800703* L_62 = L_61->get_data_1();
BigInteger_t2902905090 * L_63 = ___bi21;
uint32_t L_64 = L_63->get_length_0();
uintptr_t L_65 = (((uintptr_t)((int32_t)il2cpp_codegen_subtract((int32_t)L_64, (int32_t)2))));
uint32_t L_66 = (L_62)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_65));
V_12 = (((int64_t)((uint64_t)L_66)));
goto IL_0270;
}
IL_0112:
{
UInt32U5BU5D_t2770800703* L_67 = V_8;
int32_t L_68 = V_10;
int32_t L_69 = L_68;
uint32_t L_70 = (L_67)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_69));
UInt32U5BU5D_t2770800703* L_71 = V_8;
int32_t L_72 = V_10;
int32_t L_73 = ((int32_t)il2cpp_codegen_subtract((int32_t)L_72, (int32_t)1));
uint32_t L_74 = (L_71)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_73));
V_13 = ((int64_t)il2cpp_codegen_add((int64_t)((int64_t)((int64_t)(((int64_t)((uint64_t)L_70)))<<(int32_t)((int32_t)32))), (int64_t)(((int64_t)((uint64_t)L_74)))));
uint64_t L_75 = V_13;
uint32_t L_76 = V_11;
V_14 = ((int64_t)((uint64_t)(int64_t)L_75/(uint64_t)(int64_t)(((int64_t)((uint64_t)L_76)))));
uint64_t L_77 = V_13;
uint32_t L_78 = V_11;
V_15 = ((int64_t)((uint64_t)(int64_t)L_77%(uint64_t)(int64_t)(((int64_t)((uint64_t)L_78)))));
}
IL_0136:
{
uint64_t L_79 = V_14;
if ((((int64_t)L_79) == ((int64_t)((int64_t)4294967296LL))))
{
goto IL_015e;
}
}
{
uint64_t L_80 = V_14;
uint64_t L_81 = V_12;
uint64_t L_82 = V_15;
UInt32U5BU5D_t2770800703* L_83 = V_8;
int32_t L_84 = V_10;
int32_t L_85 = ((int32_t)il2cpp_codegen_subtract((int32_t)L_84, (int32_t)2));
uint32_t L_86 = (L_83)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_85));
if ((!(((uint64_t)((int64_t)il2cpp_codegen_multiply((int64_t)L_80, (int64_t)L_81))) > ((uint64_t)((int64_t)il2cpp_codegen_add((int64_t)((int64_t)((int64_t)L_82<<(int32_t)((int32_t)32))), (int64_t)(((int64_t)((uint64_t)L_86)))))))))
{
goto IL_0182;
}
}
IL_015e:
{
uint64_t L_87 = V_14;
V_14 = ((int64_t)il2cpp_codegen_subtract((int64_t)L_87, (int64_t)(((int64_t)((int64_t)1)))));
uint64_t L_88 = V_15;
uint32_t L_89 = V_11;
V_15 = ((int64_t)il2cpp_codegen_add((int64_t)L_88, (int64_t)(((int64_t)((uint64_t)L_89)))));
uint64_t L_90 = V_15;
if ((!(((uint64_t)L_90) < ((uint64_t)((int64_t)4294967296LL)))))
{
goto IL_0182;
}
}
{
goto IL_0187;
}
IL_0182:
{
goto IL_018c;
}
IL_0187:
{
goto IL_0136;
}
IL_018c:
{
V_17 = 0;
int32_t L_91 = V_10;
int32_t L_92 = V_1;
V_18 = ((int32_t)il2cpp_codegen_add((int32_t)((int32_t)il2cpp_codegen_subtract((int32_t)L_91, (int32_t)L_92)), (int32_t)1));
V_19 = (((int64_t)((int64_t)0)));
uint64_t L_93 = V_14;
V_20 = (((int32_t)((uint32_t)L_93)));
}
IL_01a0:
{
uint64_t L_94 = V_19;
BigInteger_t2902905090 * L_95 = ___bi21;
UInt32U5BU5D_t2770800703* L_96 = L_95->get_data_1();
uint32_t L_97 = V_17;
uintptr_t L_98 = (((uintptr_t)L_97));
uint32_t L_99 = (L_96)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_98));
uint32_t L_100 = V_20;
V_19 = ((int64_t)il2cpp_codegen_add((int64_t)L_94, (int64_t)((int64_t)il2cpp_codegen_multiply((int64_t)(((int64_t)((uint64_t)L_99))), (int64_t)(((int64_t)((uint64_t)L_100)))))));
UInt32U5BU5D_t2770800703* L_101 = V_8;
int32_t L_102 = V_18;
int32_t L_103 = L_102;
uint32_t L_104 = (L_101)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_103));
V_16 = L_104;
UInt32U5BU5D_t2770800703* L_105 = V_8;
int32_t L_106 = V_18;
uint32_t* L_107 = ((L_105)->GetAddressAtUnchecked(static_cast<il2cpp_array_size_t>(L_106)));
uint64_t L_108 = V_19;
*((int32_t*)(L_107)) = (int32_t)((int32_t)il2cpp_codegen_subtract((int32_t)(*((uint32_t*)L_107)), (int32_t)(((int32_t)((uint32_t)L_108)))));
uint64_t L_109 = V_19;
V_19 = ((int64_t)((uint64_t)L_109>>((int32_t)32)));
UInt32U5BU5D_t2770800703* L_110 = V_8;
int32_t L_111 = V_18;
int32_t L_112 = L_111;
uint32_t L_113 = (L_110)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_112));
uint32_t L_114 = V_16;
if ((!(((uint32_t)L_113) > ((uint32_t)L_114))))
{
goto IL_01e5;
}
}
{
uint64_t L_115 = V_19;
V_19 = ((int64_t)il2cpp_codegen_add((int64_t)L_115, (int64_t)(((int64_t)((int64_t)1)))));
}
IL_01e5:
{
uint32_t L_116 = V_17;
V_17 = ((int32_t)il2cpp_codegen_add((int32_t)L_116, (int32_t)1));
int32_t L_117 = V_18;
V_18 = ((int32_t)il2cpp_codegen_add((int32_t)L_117, (int32_t)1));
uint32_t L_118 = V_17;
int32_t L_119 = V_1;
if ((((int64_t)(((int64_t)((uint64_t)L_118)))) < ((int64_t)(((int64_t)((int64_t)L_119))))))
{
goto IL_01a0;
}
}
{
int32_t L_120 = V_10;
int32_t L_121 = V_1;
V_18 = ((int32_t)il2cpp_codegen_add((int32_t)((int32_t)il2cpp_codegen_subtract((int32_t)L_120, (int32_t)L_121)), (int32_t)1));
V_17 = 0;
uint64_t L_122 = V_19;
if (!L_122)
{
goto IL_0253;
}
}
{
uint32_t L_123 = V_20;
V_20 = ((int32_t)il2cpp_codegen_subtract((int32_t)L_123, (int32_t)1));
V_21 = (((int64_t)((int64_t)0)));
}
IL_0217:
{
UInt32U5BU5D_t2770800703* L_124 = V_8;
int32_t L_125 = V_18;
int32_t L_126 = L_125;
uint32_t L_127 = (L_124)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_126));
BigInteger_t2902905090 * L_128 = ___bi21;
UInt32U5BU5D_t2770800703* L_129 = L_128->get_data_1();
uint32_t L_130 = V_17;
uintptr_t L_131 = (((uintptr_t)L_130));
uint32_t L_132 = (L_129)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_131));
uint64_t L_133 = V_21;
V_21 = ((int64_t)il2cpp_codegen_add((int64_t)((int64_t)il2cpp_codegen_add((int64_t)(((int64_t)((uint64_t)L_127))), (int64_t)(((int64_t)((uint64_t)L_132))))), (int64_t)L_133));
UInt32U5BU5D_t2770800703* L_134 = V_8;
int32_t L_135 = V_18;
uint64_t L_136 = V_21;
(L_134)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(L_135), (uint32_t)(((int32_t)((uint32_t)L_136))));
uint64_t L_137 = V_21;
V_21 = ((int64_t)((uint64_t)L_137>>((int32_t)32)));
uint32_t L_138 = V_17;
V_17 = ((int32_t)il2cpp_codegen_add((int32_t)L_138, (int32_t)1));
int32_t L_139 = V_18;
V_18 = ((int32_t)il2cpp_codegen_add((int32_t)L_139, (int32_t)1));
uint32_t L_140 = V_17;
int32_t L_141 = V_1;
if ((((int64_t)(((int64_t)((uint64_t)L_140)))) < ((int64_t)(((int64_t)((int64_t)L_141))))))
{
goto IL_0217;
}
}
IL_0253:
{
BigInteger_t2902905090 * L_142 = V_6;
UInt32U5BU5D_t2770800703* L_143 = L_142->get_data_1();
int32_t L_144 = V_5;
int32_t L_145 = L_144;
V_5 = ((int32_t)il2cpp_codegen_subtract((int32_t)L_145, (int32_t)1));
uint32_t L_146 = V_20;
(L_143)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(L_145), (uint32_t)L_146);
int32_t L_147 = V_10;
V_10 = ((int32_t)il2cpp_codegen_subtract((int32_t)L_147, (int32_t)1));
int32_t L_148 = V_9;
V_9 = ((int32_t)il2cpp_codegen_subtract((int32_t)L_148, (int32_t)1));
}
IL_0270:
{
int32_t L_149 = V_9;
if ((((int32_t)L_149) > ((int32_t)0)))
{
goto IL_0112;
}
}
{
BigInteger_t2902905090 * L_150 = V_6;
BigInteger_Normalize_m3021106862(L_150, /*hidden argument*/NULL);
BigInteger_t2902905090 * L_151 = V_7;
BigInteger_Normalize_m3021106862(L_151, /*hidden argument*/NULL);
BigIntegerU5BU5D_t2349952477* L_152 = (BigIntegerU5BU5D_t2349952477*)SZArrayNew(BigIntegerU5BU5D_t2349952477_il2cpp_TypeInfo_var, (uint32_t)2);
BigIntegerU5BU5D_t2349952477* L_153 = L_152;
BigInteger_t2902905090 * L_154 = V_6;
ArrayElementTypeCheck (L_153, L_154);
(L_153)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(0), (BigInteger_t2902905090 *)L_154);
BigIntegerU5BU5D_t2349952477* L_155 = L_153;
BigInteger_t2902905090 * L_156 = V_7;
ArrayElementTypeCheck (L_155, L_156);
(L_155)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(1), (BigInteger_t2902905090 *)L_156);
V_22 = L_155;
int32_t L_157 = V_4;
if (!L_157)
{
goto IL_02b1;
}
}
{
BigIntegerU5BU5D_t2349952477* L_158 = V_22;
BigInteger_t2902905090 ** L_159 = ((L_158)->GetAddressAtUnchecked(static_cast<il2cpp_array_size_t>(1)));
BigInteger_t2902905090 * L_160 = *((BigInteger_t2902905090 **)L_159);
int32_t L_161 = V_4;
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger_t2902905090 * L_162 = BigInteger_op_RightShift_m460065452(NULL /*static, unused*/, L_160, L_161, /*hidden argument*/NULL);
*((RuntimeObject **)(L_159)) = (RuntimeObject *)L_162;
Il2CppCodeGenWriteBarrier((RuntimeObject **)(L_159), (RuntimeObject *)L_162);
}
IL_02b1:
{
BigIntegerU5BU5D_t2349952477* L_163 = V_22;
return L_163;
}
}
// Mono.Math.BigInteger Mono.Math.BigInteger/Kernel::LeftShift(Mono.Math.BigInteger,System.Int32)
extern "C" IL2CPP_METHOD_ATTR BigInteger_t2902905090 * Kernel_LeftShift_m4140742987 (RuntimeObject * __this /* static, unused */, BigInteger_t2902905090 * ___bi0, int32_t ___n1, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (Kernel_LeftShift_m4140742987_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
int32_t V_0 = 0;
BigInteger_t2902905090 * V_1 = NULL;
uint32_t V_2 = 0;
uint32_t V_3 = 0;
uint32_t V_4 = 0;
uint32_t V_5 = 0;
{
int32_t L_0 = ___n1;
if (L_0)
{
goto IL_0015;
}
}
{
BigInteger_t2902905090 * L_1 = ___bi0;
BigInteger_t2902905090 * L_2 = ___bi0;
uint32_t L_3 = L_2->get_length_0();
BigInteger_t2902905090 * L_4 = (BigInteger_t2902905090 *)il2cpp_codegen_object_new(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger__ctor_m2644482640(L_4, L_1, ((int32_t)il2cpp_codegen_add((int32_t)L_3, (int32_t)1)), /*hidden argument*/NULL);
return L_4;
}
IL_0015:
{
int32_t L_5 = ___n1;
V_0 = ((int32_t)((int32_t)L_5>>(int32_t)5));
int32_t L_6 = ___n1;
___n1 = ((int32_t)((int32_t)L_6&(int32_t)((int32_t)31)));
BigInteger_t2902905090 * L_7 = ___bi0;
uint32_t L_8 = L_7->get_length_0();
int32_t L_9 = V_0;
BigInteger_t2902905090 * L_10 = (BigInteger_t2902905090 *)il2cpp_codegen_object_new(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger__ctor_m3473491062(L_10, 1, ((int32_t)il2cpp_codegen_add((int32_t)((int32_t)il2cpp_codegen_add((int32_t)L_8, (int32_t)1)), (int32_t)L_9)), /*hidden argument*/NULL);
V_1 = L_10;
V_2 = 0;
BigInteger_t2902905090 * L_11 = ___bi0;
uint32_t L_12 = L_11->get_length_0();
V_3 = L_12;
int32_t L_13 = ___n1;
if (!L_13)
{
goto IL_0094;
}
}
{
V_5 = 0;
goto IL_0079;
}
IL_0047:
{
BigInteger_t2902905090 * L_14 = ___bi0;
UInt32U5BU5D_t2770800703* L_15 = L_14->get_data_1();
uint32_t L_16 = V_2;
uintptr_t L_17 = (((uintptr_t)L_16));
uint32_t L_18 = (L_15)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_17));
V_4 = L_18;
BigInteger_t2902905090 * L_19 = V_1;
UInt32U5BU5D_t2770800703* L_20 = L_19->get_data_1();
uint32_t L_21 = V_2;
int32_t L_22 = V_0;
if ((int64_t)(((int64_t)il2cpp_codegen_add((int64_t)(((int64_t)((uint64_t)L_21))), (int64_t)(((int64_t)((int64_t)L_22)))))) > INTPTR_MAX) IL2CPP_RAISE_MANAGED_EXCEPTION(il2cpp_codegen_get_overflow_exception(), NULL, Kernel_LeftShift_m4140742987_RuntimeMethod_var);
uint32_t L_23 = V_4;
int32_t L_24 = ___n1;
uint32_t L_25 = V_5;
(L_20)->SetAtUnchecked(static_cast<il2cpp_array_size_t>((((intptr_t)((int64_t)il2cpp_codegen_add((int64_t)(((int64_t)((uint64_t)L_21))), (int64_t)(((int64_t)((int64_t)L_22)))))))), (uint32_t)((int32_t)((int32_t)((int32_t)((int32_t)L_23<<(int32_t)((int32_t)((int32_t)L_24&(int32_t)((int32_t)31)))))|(int32_t)L_25)));
uint32_t L_26 = V_4;
int32_t L_27 = ___n1;
V_5 = ((int32_t)((uint32_t)L_26>>((int32_t)((int32_t)((int32_t)il2cpp_codegen_subtract((int32_t)((int32_t)32), (int32_t)L_27))&(int32_t)((int32_t)31)))));
uint32_t L_28 = V_2;
V_2 = ((int32_t)il2cpp_codegen_add((int32_t)L_28, (int32_t)1));
}
IL_0079:
{
uint32_t L_29 = V_2;
uint32_t L_30 = V_3;
if ((!(((uint32_t)L_29) >= ((uint32_t)L_30))))
{
goto IL_0047;
}
}
{
BigInteger_t2902905090 * L_31 = V_1;
UInt32U5BU5D_t2770800703* L_32 = L_31->get_data_1();
uint32_t L_33 = V_2;
int32_t L_34 = V_0;
if ((int64_t)(((int64_t)il2cpp_codegen_add((int64_t)(((int64_t)((uint64_t)L_33))), (int64_t)(((int64_t)((int64_t)L_34)))))) > INTPTR_MAX) IL2CPP_RAISE_MANAGED_EXCEPTION(il2cpp_codegen_get_overflow_exception(), NULL, Kernel_LeftShift_m4140742987_RuntimeMethod_var);
uint32_t L_35 = V_5;
(L_32)->SetAtUnchecked(static_cast<il2cpp_array_size_t>((((intptr_t)((int64_t)il2cpp_codegen_add((int64_t)(((int64_t)((uint64_t)L_33))), (int64_t)(((int64_t)((int64_t)L_34)))))))), (uint32_t)L_35);
goto IL_00ba;
}
IL_0094:
{
goto IL_00b3;
}
IL_0099:
{
BigInteger_t2902905090 * L_36 = V_1;
UInt32U5BU5D_t2770800703* L_37 = L_36->get_data_1();
uint32_t L_38 = V_2;
int32_t L_39 = V_0;
if ((int64_t)(((int64_t)il2cpp_codegen_add((int64_t)(((int64_t)((uint64_t)L_38))), (int64_t)(((int64_t)((int64_t)L_39)))))) > INTPTR_MAX) IL2CPP_RAISE_MANAGED_EXCEPTION(il2cpp_codegen_get_overflow_exception(), NULL, Kernel_LeftShift_m4140742987_RuntimeMethod_var);
BigInteger_t2902905090 * L_40 = ___bi0;
UInt32U5BU5D_t2770800703* L_41 = L_40->get_data_1();
uint32_t L_42 = V_2;
uintptr_t L_43 = (((uintptr_t)L_42));
uint32_t L_44 = (L_41)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_43));
(L_37)->SetAtUnchecked(static_cast<il2cpp_array_size_t>((((intptr_t)((int64_t)il2cpp_codegen_add((int64_t)(((int64_t)((uint64_t)L_38))), (int64_t)(((int64_t)((int64_t)L_39)))))))), (uint32_t)L_44);
uint32_t L_45 = V_2;
V_2 = ((int32_t)il2cpp_codegen_add((int32_t)L_45, (int32_t)1));
}
IL_00b3:
{
uint32_t L_46 = V_2;
uint32_t L_47 = V_3;
if ((!(((uint32_t)L_46) >= ((uint32_t)L_47))))
{
goto IL_0099;
}
}
IL_00ba:
{
BigInteger_t2902905090 * L_48 = V_1;
BigInteger_Normalize_m3021106862(L_48, /*hidden argument*/NULL);
BigInteger_t2902905090 * L_49 = V_1;
return L_49;
}
}
// Mono.Math.BigInteger Mono.Math.BigInteger/Kernel::RightShift(Mono.Math.BigInteger,System.Int32)
extern "C" IL2CPP_METHOD_ATTR BigInteger_t2902905090 * Kernel_RightShift_m3246168448 (RuntimeObject * __this /* static, unused */, BigInteger_t2902905090 * ___bi0, int32_t ___n1, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (Kernel_RightShift_m3246168448_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
int32_t V_0 = 0;
int32_t V_1 = 0;
BigInteger_t2902905090 * V_2 = NULL;
uint32_t V_3 = 0;
uint32_t V_4 = 0;
uint32_t V_5 = 0;
{
int32_t L_0 = ___n1;
if (L_0)
{
goto IL_000d;
}
}
{
BigInteger_t2902905090 * L_1 = ___bi0;
BigInteger_t2902905090 * L_2 = (BigInteger_t2902905090 *)il2cpp_codegen_object_new(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger__ctor_m2108826647(L_2, L_1, /*hidden argument*/NULL);
return L_2;
}
IL_000d:
{
int32_t L_3 = ___n1;
V_0 = ((int32_t)((int32_t)L_3>>(int32_t)5));
int32_t L_4 = ___n1;
V_1 = ((int32_t)((int32_t)L_4&(int32_t)((int32_t)31)));
BigInteger_t2902905090 * L_5 = ___bi0;
uint32_t L_6 = L_5->get_length_0();
int32_t L_7 = V_0;
BigInteger_t2902905090 * L_8 = (BigInteger_t2902905090 *)il2cpp_codegen_object_new(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger__ctor_m3473491062(L_8, 1, ((int32_t)il2cpp_codegen_add((int32_t)((int32_t)il2cpp_codegen_subtract((int32_t)L_6, (int32_t)L_7)), (int32_t)1)), /*hidden argument*/NULL);
V_2 = L_8;
BigInteger_t2902905090 * L_9 = V_2;
UInt32U5BU5D_t2770800703* L_10 = L_9->get_data_1();
V_3 = ((int32_t)il2cpp_codegen_subtract((int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_10)->max_length)))), (int32_t)1));
int32_t L_11 = V_1;
if (!L_11)
{
goto IL_007e;
}
}
{
V_5 = 0;
goto IL_006e;
}
IL_0040:
{
BigInteger_t2902905090 * L_12 = ___bi0;
UInt32U5BU5D_t2770800703* L_13 = L_12->get_data_1();
uint32_t L_14 = V_3;
int32_t L_15 = V_0;
if ((int64_t)(((int64_t)il2cpp_codegen_add((int64_t)(((int64_t)((uint64_t)L_14))), (int64_t)(((int64_t)((int64_t)L_15)))))) > INTPTR_MAX) IL2CPP_RAISE_MANAGED_EXCEPTION(il2cpp_codegen_get_overflow_exception(), NULL, Kernel_RightShift_m3246168448_RuntimeMethod_var);
intptr_t L_16 = (((intptr_t)((int64_t)il2cpp_codegen_add((int64_t)(((int64_t)((uint64_t)L_14))), (int64_t)(((int64_t)((int64_t)L_15)))))));
uint32_t L_17 = (L_13)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_16));
V_4 = L_17;
BigInteger_t2902905090 * L_18 = V_2;
UInt32U5BU5D_t2770800703* L_19 = L_18->get_data_1();
uint32_t L_20 = V_3;
uint32_t L_21 = V_4;
int32_t L_22 = ___n1;
uint32_t L_23 = V_5;
(L_19)->SetAtUnchecked(static_cast<il2cpp_array_size_t>((((uintptr_t)L_20))), (uint32_t)((int32_t)((int32_t)((int32_t)((uint32_t)L_21>>((int32_t)((int32_t)L_22&(int32_t)((int32_t)31)))))|(int32_t)L_23)));
uint32_t L_24 = V_4;
int32_t L_25 = ___n1;
V_5 = ((int32_t)((int32_t)L_24<<(int32_t)((int32_t)((int32_t)((int32_t)il2cpp_codegen_subtract((int32_t)((int32_t)32), (int32_t)L_25))&(int32_t)((int32_t)31)))));
}
IL_006e:
{
uint32_t L_26 = V_3;
uint32_t L_27 = L_26;
V_3 = ((int32_t)il2cpp_codegen_subtract((int32_t)L_27, (int32_t)1));
if ((!(((uint32_t)L_27) <= ((uint32_t)0))))
{
goto IL_0040;
}
}
{
goto IL_00a4;
}
IL_007e:
{
goto IL_0099;
}
IL_0083:
{
BigInteger_t2902905090 * L_28 = V_2;
UInt32U5BU5D_t2770800703* L_29 = L_28->get_data_1();
uint32_t L_30 = V_3;
BigInteger_t2902905090 * L_31 = ___bi0;
UInt32U5BU5D_t2770800703* L_32 = L_31->get_data_1();
uint32_t L_33 = V_3;
int32_t L_34 = V_0;
if ((int64_t)(((int64_t)il2cpp_codegen_add((int64_t)(((int64_t)((uint64_t)L_33))), (int64_t)(((int64_t)((int64_t)L_34)))))) > INTPTR_MAX) IL2CPP_RAISE_MANAGED_EXCEPTION(il2cpp_codegen_get_overflow_exception(), NULL, Kernel_RightShift_m3246168448_RuntimeMethod_var);
intptr_t L_35 = (((intptr_t)((int64_t)il2cpp_codegen_add((int64_t)(((int64_t)((uint64_t)L_33))), (int64_t)(((int64_t)((int64_t)L_34)))))));
uint32_t L_36 = (L_32)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_35));
(L_29)->SetAtUnchecked(static_cast<il2cpp_array_size_t>((((uintptr_t)L_30))), (uint32_t)L_36);
}
IL_0099:
{
uint32_t L_37 = V_3;
uint32_t L_38 = L_37;
V_3 = ((int32_t)il2cpp_codegen_subtract((int32_t)L_38, (int32_t)1));
if ((!(((uint32_t)L_38) <= ((uint32_t)0))))
{
goto IL_0083;
}
}
IL_00a4:
{
BigInteger_t2902905090 * L_39 = V_2;
BigInteger_Normalize_m3021106862(L_39, /*hidden argument*/NULL);
BigInteger_t2902905090 * L_40 = V_2;
return L_40;
}
}
// System.Void Mono.Math.BigInteger/Kernel::Multiply(System.UInt32[],System.UInt32,System.UInt32,System.UInt32[],System.UInt32,System.UInt32,System.UInt32[],System.UInt32)
extern "C" IL2CPP_METHOD_ATTR void Kernel_Multiply_m193213393 (RuntimeObject * __this /* static, unused */, UInt32U5BU5D_t2770800703* ___x0, uint32_t ___xOffset1, uint32_t ___xLen2, UInt32U5BU5D_t2770800703* ___y3, uint32_t ___yOffset4, uint32_t ___yLen5, UInt32U5BU5D_t2770800703* ___d6, uint32_t ___dOffset7, const RuntimeMethod* method)
{
uint32_t* V_0 = NULL;
uint32_t* V_1 = NULL;
uint32_t* V_2 = NULL;
uint32_t* V_3 = NULL;
uint32_t* V_4 = NULL;
uint32_t* V_5 = NULL;
uint32_t* V_6 = NULL;
uint32_t* V_7 = NULL;
uint64_t V_8 = 0;
uint32_t* V_9 = NULL;
uint32_t* V_10 = NULL;
uintptr_t G_B4_0 = 0;
uintptr_t G_B8_0 = 0;
uintptr_t G_B12_0 = 0;
{
UInt32U5BU5D_t2770800703* L_0 = ___x0;
if (!L_0)
{
goto IL_000e;
}
}
{
UInt32U5BU5D_t2770800703* L_1 = ___x0;
if ((((int32_t)((int32_t)(((RuntimeArray *)L_1)->max_length)))))
{
goto IL_0015;
}
}
IL_000e:
{
G_B4_0 = (((uintptr_t)0));
goto IL_001c;
}
IL_0015:
{
UInt32U5BU5D_t2770800703* L_2 = ___x0;
G_B4_0 = ((uintptr_t)(((L_2)->GetAddressAtUnchecked(static_cast<il2cpp_array_size_t>(0)))));
}
IL_001c:
{
V_0 = (uint32_t*)G_B4_0;
UInt32U5BU5D_t2770800703* L_3 = ___y3;
if (!L_3)
{
goto IL_002b;
}
}
{
UInt32U5BU5D_t2770800703* L_4 = ___y3;
if ((((int32_t)((int32_t)(((RuntimeArray *)L_4)->max_length)))))
{
goto IL_0032;
}
}
IL_002b:
{
G_B8_0 = (((uintptr_t)0));
goto IL_0039;
}
IL_0032:
{
UInt32U5BU5D_t2770800703* L_5 = ___y3;
G_B8_0 = ((uintptr_t)(((L_5)->GetAddressAtUnchecked(static_cast<il2cpp_array_size_t>(0)))));
}
IL_0039:
{
V_1 = (uint32_t*)G_B8_0;
UInt32U5BU5D_t2770800703* L_6 = ___d6;
if (!L_6)
{
goto IL_004a;
}
}
{
UInt32U5BU5D_t2770800703* L_7 = ___d6;
if ((((int32_t)((int32_t)(((RuntimeArray *)L_7)->max_length)))))
{
goto IL_0051;
}
}
IL_004a:
{
G_B12_0 = (((uintptr_t)0));
goto IL_0059;
}
IL_0051:
{
UInt32U5BU5D_t2770800703* L_8 = ___d6;
G_B12_0 = ((uintptr_t)(((L_8)->GetAddressAtUnchecked(static_cast<il2cpp_array_size_t>(0)))));
}
IL_0059:
{
V_2 = (uint32_t*)G_B12_0;
uint32_t* L_9 = V_0;
uint32_t L_10 = ___xOffset1;
V_3 = (uint32_t*)((uint32_t*)il2cpp_codegen_add((intptr_t)L_9, (intptr_t)((intptr_t)il2cpp_codegen_multiply((intptr_t)(((uintptr_t)L_10)), (int32_t)4))));
uint32_t* L_11 = V_3;
uint32_t L_12 = ___xLen2;
V_4 = (uint32_t*)((uint32_t*)il2cpp_codegen_add((intptr_t)L_11, (intptr_t)((intptr_t)il2cpp_codegen_multiply((intptr_t)(((uintptr_t)L_12)), (int32_t)4))));
uint32_t* L_13 = V_1;
uint32_t L_14 = ___yOffset4;
V_5 = (uint32_t*)((uint32_t*)il2cpp_codegen_add((intptr_t)L_13, (intptr_t)((intptr_t)il2cpp_codegen_multiply((intptr_t)(((uintptr_t)L_14)), (int32_t)4))));
uint32_t* L_15 = V_5;
uint32_t L_16 = ___yLen5;
V_6 = (uint32_t*)((uint32_t*)il2cpp_codegen_add((intptr_t)L_15, (intptr_t)((intptr_t)il2cpp_codegen_multiply((intptr_t)(((uintptr_t)L_16)), (int32_t)4))));
uint32_t* L_17 = V_2;
uint32_t L_18 = ___dOffset7;
V_7 = (uint32_t*)((uint32_t*)il2cpp_codegen_add((intptr_t)L_17, (intptr_t)((intptr_t)il2cpp_codegen_multiply((intptr_t)(((uintptr_t)L_18)), (int32_t)4))));
goto IL_00f6;
}
IL_008a:
{
uint32_t* L_19 = V_3;
if ((*((uint32_t*)L_19)))
{
goto IL_0096;
}
}
{
goto IL_00ea;
}
IL_0096:
{
V_8 = (((int64_t)((int64_t)0)));
uint32_t* L_20 = V_7;
V_9 = (uint32_t*)L_20;
uint32_t* L_21 = V_5;
V_10 = (uint32_t*)L_21;
goto IL_00d4;
}
IL_00a7:
{
uint64_t L_22 = V_8;
uint32_t* L_23 = V_3;
uint32_t* L_24 = V_10;
uint32_t* L_25 = V_9;
V_8 = ((int64_t)il2cpp_codegen_add((int64_t)L_22, (int64_t)((int64_t)il2cpp_codegen_add((int64_t)((int64_t)il2cpp_codegen_multiply((int64_t)(((int64_t)((uint64_t)(((uint32_t)((uint32_t)(*((uint32_t*)L_23)))))))), (int64_t)(((int64_t)((uint64_t)(((uint32_t)((uint32_t)(*((uint32_t*)L_24)))))))))), (int64_t)(((int64_t)((uint64_t)(((uint32_t)((uint32_t)(*((uint32_t*)L_25))))))))))));
uint32_t* L_26 = V_9;
uint64_t L_27 = V_8;
*((int32_t*)(L_26)) = (int32_t)(((int32_t)((uint32_t)L_27)));
uint64_t L_28 = V_8;
V_8 = ((int64_t)((uint64_t)L_28>>((int32_t)32)));
uint32_t* L_29 = V_10;
V_10 = (uint32_t*)((uint32_t*)il2cpp_codegen_add((intptr_t)L_29, (intptr_t)(((intptr_t)4))));
uint32_t* L_30 = V_9;
V_9 = (uint32_t*)((uint32_t*)il2cpp_codegen_add((intptr_t)L_30, (intptr_t)(((intptr_t)4))));
}
IL_00d4:
{
uint32_t* L_31 = V_10;
uint32_t* L_32 = V_6;
if ((!(((uintptr_t)L_31) >= ((uintptr_t)L_32))))
{
goto IL_00a7;
}
}
{
uint64_t L_33 = V_8;
if (!L_33)
{
goto IL_00ea;
}
}
{
uint32_t* L_34 = V_9;
uint64_t L_35 = V_8;
*((int32_t*)(L_34)) = (int32_t)(((int32_t)((uint32_t)L_35)));
}
IL_00ea:
{
uint32_t* L_36 = V_3;
V_3 = (uint32_t*)((uint32_t*)il2cpp_codegen_add((intptr_t)L_36, (intptr_t)(((intptr_t)4))));
uint32_t* L_37 = V_7;
V_7 = (uint32_t*)((uint32_t*)il2cpp_codegen_add((intptr_t)L_37, (intptr_t)(((intptr_t)4))));
}
IL_00f6:
{
uint32_t* L_38 = V_3;
uint32_t* L_39 = V_4;
if ((!(((uintptr_t)L_38) >= ((uintptr_t)L_39))))
{
goto IL_008a;
}
}
{
V_0 = (uint32_t*)(((uintptr_t)0));
V_1 = (uint32_t*)(((uintptr_t)0));
V_2 = (uint32_t*)(((uintptr_t)0));
return;
}
}
// System.Void Mono.Math.BigInteger/Kernel::MultiplyMod2p32pmod(System.UInt32[],System.Int32,System.Int32,System.UInt32[],System.Int32,System.Int32,System.UInt32[],System.Int32,System.Int32)
extern "C" IL2CPP_METHOD_ATTR void Kernel_MultiplyMod2p32pmod_m451690680 (RuntimeObject * __this /* static, unused */, UInt32U5BU5D_t2770800703* ___x0, int32_t ___xOffset1, int32_t ___xLen2, UInt32U5BU5D_t2770800703* ___y3, int32_t ___yOffest4, int32_t ___yLen5, UInt32U5BU5D_t2770800703* ___d6, int32_t ___dOffset7, int32_t ___mod8, const RuntimeMethod* method)
{
uint32_t* V_0 = NULL;
uint32_t* V_1 = NULL;
uint32_t* V_2 = NULL;
uint32_t* V_3 = NULL;
uint32_t* V_4 = NULL;
uint32_t* V_5 = NULL;
uint32_t* V_6 = NULL;
uint32_t* V_7 = NULL;
uint32_t* V_8 = NULL;
uint64_t V_9 = 0;
uint32_t* V_10 = NULL;
uint32_t* V_11 = NULL;
uintptr_t G_B4_0 = 0;
uintptr_t G_B8_0 = 0;
uintptr_t G_B12_0 = 0;
{
UInt32U5BU5D_t2770800703* L_0 = ___x0;
if (!L_0)
{
goto IL_000e;
}
}
{
UInt32U5BU5D_t2770800703* L_1 = ___x0;
if ((((int32_t)((int32_t)(((RuntimeArray *)L_1)->max_length)))))
{
goto IL_0015;
}
}
IL_000e:
{
G_B4_0 = (((uintptr_t)0));
goto IL_001c;
}
IL_0015:
{
UInt32U5BU5D_t2770800703* L_2 = ___x0;
G_B4_0 = ((uintptr_t)(((L_2)->GetAddressAtUnchecked(static_cast<il2cpp_array_size_t>(0)))));
}
IL_001c:
{
V_0 = (uint32_t*)G_B4_0;
UInt32U5BU5D_t2770800703* L_3 = ___y3;
if (!L_3)
{
goto IL_002b;
}
}
{
UInt32U5BU5D_t2770800703* L_4 = ___y3;
if ((((int32_t)((int32_t)(((RuntimeArray *)L_4)->max_length)))))
{
goto IL_0032;
}
}
IL_002b:
{
G_B8_0 = (((uintptr_t)0));
goto IL_0039;
}
IL_0032:
{
UInt32U5BU5D_t2770800703* L_5 = ___y3;
G_B8_0 = ((uintptr_t)(((L_5)->GetAddressAtUnchecked(static_cast<il2cpp_array_size_t>(0)))));
}
IL_0039:
{
V_1 = (uint32_t*)G_B8_0;
UInt32U5BU5D_t2770800703* L_6 = ___d6;
if (!L_6)
{
goto IL_004a;
}
}
{
UInt32U5BU5D_t2770800703* L_7 = ___d6;
if ((((int32_t)((int32_t)(((RuntimeArray *)L_7)->max_length)))))
{
goto IL_0051;
}
}
IL_004a:
{
G_B12_0 = (((uintptr_t)0));
goto IL_0059;
}
IL_0051:
{
UInt32U5BU5D_t2770800703* L_8 = ___d6;
G_B12_0 = ((uintptr_t)(((L_8)->GetAddressAtUnchecked(static_cast<il2cpp_array_size_t>(0)))));
}
IL_0059:
{
V_2 = (uint32_t*)G_B12_0;
uint32_t* L_9 = V_0;
int32_t L_10 = ___xOffset1;
V_3 = (uint32_t*)((uint32_t*)il2cpp_codegen_add((intptr_t)L_9, (int32_t)((int32_t)il2cpp_codegen_multiply((int32_t)L_10, (int32_t)4))));
uint32_t* L_11 = V_3;
int32_t L_12 = ___xLen2;
V_4 = (uint32_t*)((uint32_t*)il2cpp_codegen_add((intptr_t)L_11, (int32_t)((int32_t)il2cpp_codegen_multiply((int32_t)L_12, (int32_t)4))));
uint32_t* L_13 = V_1;
int32_t L_14 = ___yOffest4;
V_5 = (uint32_t*)((uint32_t*)il2cpp_codegen_add((intptr_t)L_13, (int32_t)((int32_t)il2cpp_codegen_multiply((int32_t)L_14, (int32_t)4))));
uint32_t* L_15 = V_5;
int32_t L_16 = ___yLen5;
V_6 = (uint32_t*)((uint32_t*)il2cpp_codegen_add((intptr_t)L_15, (int32_t)((int32_t)il2cpp_codegen_multiply((int32_t)L_16, (int32_t)4))));
uint32_t* L_17 = V_2;
int32_t L_18 = ___dOffset7;
V_7 = (uint32_t*)((uint32_t*)il2cpp_codegen_add((intptr_t)L_17, (int32_t)((int32_t)il2cpp_codegen_multiply((int32_t)L_18, (int32_t)4))));
uint32_t* L_19 = V_7;
int32_t L_20 = ___mod8;
V_8 = (uint32_t*)((uint32_t*)il2cpp_codegen_add((intptr_t)L_19, (int32_t)((int32_t)il2cpp_codegen_multiply((int32_t)L_20, (int32_t)4))));
goto IL_010c;
}
IL_008e:
{
uint32_t* L_21 = V_3;
if ((*((uint32_t*)L_21)))
{
goto IL_009a;
}
}
{
goto IL_0100;
}
IL_009a:
{
V_9 = (((int64_t)((int64_t)0)));
uint32_t* L_22 = V_7;
V_10 = (uint32_t*)L_22;
uint32_t* L_23 = V_5;
V_11 = (uint32_t*)L_23;
goto IL_00d8;
}
IL_00ab:
{
uint64_t L_24 = V_9;
uint32_t* L_25 = V_3;
uint32_t* L_26 = V_11;
uint32_t* L_27 = V_10;
V_9 = ((int64_t)il2cpp_codegen_add((int64_t)L_24, (int64_t)((int64_t)il2cpp_codegen_add((int64_t)((int64_t)il2cpp_codegen_multiply((int64_t)(((int64_t)((uint64_t)(((uint32_t)((uint32_t)(*((uint32_t*)L_25)))))))), (int64_t)(((int64_t)((uint64_t)(((uint32_t)((uint32_t)(*((uint32_t*)L_26)))))))))), (int64_t)(((int64_t)((uint64_t)(((uint32_t)((uint32_t)(*((uint32_t*)L_27))))))))))));
uint32_t* L_28 = V_10;
uint64_t L_29 = V_9;
*((int32_t*)(L_28)) = (int32_t)(((int32_t)((uint32_t)L_29)));
uint64_t L_30 = V_9;
V_9 = ((int64_t)((uint64_t)L_30>>((int32_t)32)));
uint32_t* L_31 = V_11;
V_11 = (uint32_t*)((uint32_t*)il2cpp_codegen_add((intptr_t)L_31, (intptr_t)(((intptr_t)4))));
uint32_t* L_32 = V_10;
V_10 = (uint32_t*)((uint32_t*)il2cpp_codegen_add((intptr_t)L_32, (intptr_t)(((intptr_t)4))));
}
IL_00d8:
{
uint32_t* L_33 = V_11;
uint32_t* L_34 = V_6;
if ((!(((uintptr_t)L_33) < ((uintptr_t)L_34))))
{
goto IL_00ea;
}
}
{
uint32_t* L_35 = V_10;
uint32_t* L_36 = V_8;
if ((!(((uintptr_t)L_35) >= ((uintptr_t)L_36))))
{
goto IL_00ab;
}
}
IL_00ea:
{
uint64_t L_37 = V_9;
if (!L_37)
{
goto IL_0100;
}
}
{
uint32_t* L_38 = V_10;
uint32_t* L_39 = V_8;
if ((!(((uintptr_t)L_38) < ((uintptr_t)L_39))))
{
goto IL_0100;
}
}
{
uint32_t* L_40 = V_10;
uint64_t L_41 = V_9;
*((int32_t*)(L_40)) = (int32_t)(((int32_t)((uint32_t)L_41)));
}
IL_0100:
{
uint32_t* L_42 = V_3;
V_3 = (uint32_t*)((uint32_t*)il2cpp_codegen_add((intptr_t)L_42, (intptr_t)(((intptr_t)4))));
uint32_t* L_43 = V_7;
V_7 = (uint32_t*)((uint32_t*)il2cpp_codegen_add((intptr_t)L_43, (intptr_t)(((intptr_t)4))));
}
IL_010c:
{
uint32_t* L_44 = V_3;
uint32_t* L_45 = V_4;
if ((!(((uintptr_t)L_44) >= ((uintptr_t)L_45))))
{
goto IL_008e;
}
}
{
V_0 = (uint32_t*)(((uintptr_t)0));
V_1 = (uint32_t*)(((uintptr_t)0));
V_2 = (uint32_t*)(((uintptr_t)0));
return;
}
}
// System.UInt32 Mono.Math.BigInteger/Kernel::modInverse(Mono.Math.BigInteger,System.UInt32)
extern "C" IL2CPP_METHOD_ATTR uint32_t Kernel_modInverse_m4048046181 (RuntimeObject * __this /* static, unused */, BigInteger_t2902905090 * ___bi0, uint32_t ___modulus1, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (Kernel_modInverse_m4048046181_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
uint32_t V_0 = 0;
uint32_t V_1 = 0;
uint32_t V_2 = 0;
uint32_t V_3 = 0;
{
uint32_t L_0 = ___modulus1;
V_0 = L_0;
BigInteger_t2902905090 * L_1 = ___bi0;
uint32_t L_2 = ___modulus1;
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
uint32_t L_3 = BigInteger_op_Modulus_m3242311550(NULL /*static, unused*/, L_1, L_2, /*hidden argument*/NULL);
V_1 = L_3;
V_2 = 0;
V_3 = 1;
goto IL_004a;
}
IL_0013:
{
uint32_t L_4 = V_1;
if ((!(((uint32_t)L_4) == ((uint32_t)1))))
{
goto IL_001c;
}
}
{
uint32_t L_5 = V_3;
return L_5;
}
IL_001c:
{
uint32_t L_6 = V_2;
uint32_t L_7 = V_0;
uint32_t L_8 = V_1;
uint32_t L_9 = V_3;
V_2 = ((int32_t)il2cpp_codegen_add((int32_t)L_6, (int32_t)((int32_t)il2cpp_codegen_multiply((int32_t)((int32_t)((uint32_t)(int32_t)L_7/(uint32_t)(int32_t)L_8)), (int32_t)L_9))));
uint32_t L_10 = V_0;
uint32_t L_11 = V_1;
V_0 = ((int32_t)((uint32_t)(int32_t)L_10%(uint32_t)(int32_t)L_11));
uint32_t L_12 = V_0;
if (L_12)
{
goto IL_0033;
}
}
{
goto IL_0050;
}
IL_0033:
{
uint32_t L_13 = V_0;
if ((!(((uint32_t)L_13) == ((uint32_t)1))))
{
goto IL_003e;
}
}
{
uint32_t L_14 = ___modulus1;
uint32_t L_15 = V_2;
return ((int32_t)il2cpp_codegen_subtract((int32_t)L_14, (int32_t)L_15));
}
IL_003e:
{
uint32_t L_16 = V_3;
uint32_t L_17 = V_1;
uint32_t L_18 = V_0;
uint32_t L_19 = V_2;
V_3 = ((int32_t)il2cpp_codegen_add((int32_t)L_16, (int32_t)((int32_t)il2cpp_codegen_multiply((int32_t)((int32_t)((uint32_t)(int32_t)L_17/(uint32_t)(int32_t)L_18)), (int32_t)L_19))));
uint32_t L_20 = V_1;
uint32_t L_21 = V_0;
V_1 = ((int32_t)((uint32_t)(int32_t)L_20%(uint32_t)(int32_t)L_21));
}
IL_004a:
{
uint32_t L_22 = V_1;
if (L_22)
{
goto IL_0013;
}
}
IL_0050:
{
return 0;
}
}
// Mono.Math.BigInteger Mono.Math.BigInteger/Kernel::modInverse(Mono.Math.BigInteger,Mono.Math.BigInteger)
extern "C" IL2CPP_METHOD_ATTR BigInteger_t2902905090 * Kernel_modInverse_m652700340 (RuntimeObject * __this /* static, unused */, BigInteger_t2902905090 * ___bi0, BigInteger_t2902905090 * ___modulus1, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (Kernel_modInverse_m652700340_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
BigIntegerU5BU5D_t2349952477* V_0 = NULL;
BigIntegerU5BU5D_t2349952477* V_1 = NULL;
BigIntegerU5BU5D_t2349952477* V_2 = NULL;
int32_t V_3 = 0;
BigInteger_t2902905090 * V_4 = NULL;
BigInteger_t2902905090 * V_5 = NULL;
ModulusRing_t596511505 * V_6 = NULL;
BigInteger_t2902905090 * V_7 = NULL;
BigIntegerU5BU5D_t2349952477* V_8 = NULL;
{
BigInteger_t2902905090 * L_0 = ___modulus1;
uint32_t L_1 = L_0->get_length_0();
if ((!(((uint32_t)L_1) == ((uint32_t)1))))
{
goto IL_0020;
}
}
{
BigInteger_t2902905090 * L_2 = ___bi0;
BigInteger_t2902905090 * L_3 = ___modulus1;
UInt32U5BU5D_t2770800703* L_4 = L_3->get_data_1();
int32_t L_5 = 0;
uint32_t L_6 = (L_4)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_5));
uint32_t L_7 = Kernel_modInverse_m4048046181(NULL /*static, unused*/, L_2, L_6, /*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger_t2902905090 * L_8 = BigInteger_op_Implicit_m3414367033(NULL /*static, unused*/, L_7, /*hidden argument*/NULL);
return L_8;
}
IL_0020:
{
BigIntegerU5BU5D_t2349952477* L_9 = (BigIntegerU5BU5D_t2349952477*)SZArrayNew(BigIntegerU5BU5D_t2349952477_il2cpp_TypeInfo_var, (uint32_t)2);
BigIntegerU5BU5D_t2349952477* L_10 = L_9;
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger_t2902905090 * L_11 = BigInteger_op_Implicit_m2547142909(NULL /*static, unused*/, 0, /*hidden argument*/NULL);
ArrayElementTypeCheck (L_10, L_11);
(L_10)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(0), (BigInteger_t2902905090 *)L_11);
BigIntegerU5BU5D_t2349952477* L_12 = L_10;
BigInteger_t2902905090 * L_13 = BigInteger_op_Implicit_m2547142909(NULL /*static, unused*/, 1, /*hidden argument*/NULL);
ArrayElementTypeCheck (L_12, L_13);
(L_12)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(1), (BigInteger_t2902905090 *)L_13);
V_0 = L_12;
BigIntegerU5BU5D_t2349952477* L_14 = (BigIntegerU5BU5D_t2349952477*)SZArrayNew(BigIntegerU5BU5D_t2349952477_il2cpp_TypeInfo_var, (uint32_t)2);
V_1 = L_14;
BigIntegerU5BU5D_t2349952477* L_15 = (BigIntegerU5BU5D_t2349952477*)SZArrayNew(BigIntegerU5BU5D_t2349952477_il2cpp_TypeInfo_var, (uint32_t)2);
BigIntegerU5BU5D_t2349952477* L_16 = L_15;
BigInteger_t2902905090 * L_17 = BigInteger_op_Implicit_m2547142909(NULL /*static, unused*/, 0, /*hidden argument*/NULL);
ArrayElementTypeCheck (L_16, L_17);
(L_16)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(0), (BigInteger_t2902905090 *)L_17);
BigIntegerU5BU5D_t2349952477* L_18 = L_16;
BigInteger_t2902905090 * L_19 = BigInteger_op_Implicit_m2547142909(NULL /*static, unused*/, 0, /*hidden argument*/NULL);
ArrayElementTypeCheck (L_18, L_19);
(L_18)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(1), (BigInteger_t2902905090 *)L_19);
V_2 = L_18;
V_3 = 0;
BigInteger_t2902905090 * L_20 = ___modulus1;
V_4 = L_20;
BigInteger_t2902905090 * L_21 = ___bi0;
V_5 = L_21;
BigInteger_t2902905090 * L_22 = ___modulus1;
ModulusRing_t596511505 * L_23 = (ModulusRing_t596511505 *)il2cpp_codegen_object_new(ModulusRing_t596511505_il2cpp_TypeInfo_var);
ModulusRing__ctor_m2420310199(L_23, L_22, /*hidden argument*/NULL);
V_6 = L_23;
goto IL_00ca;
}
IL_006e:
{
int32_t L_24 = V_3;
if ((((int32_t)L_24) <= ((int32_t)1)))
{
goto IL_0097;
}
}
{
ModulusRing_t596511505 * L_25 = V_6;
BigIntegerU5BU5D_t2349952477* L_26 = V_0;
int32_t L_27 = 0;
BigInteger_t2902905090 * L_28 = (L_26)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_27));
BigIntegerU5BU5D_t2349952477* L_29 = V_0;
int32_t L_30 = 1;
BigInteger_t2902905090 * L_31 = (L_29)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_30));
BigIntegerU5BU5D_t2349952477* L_32 = V_1;
int32_t L_33 = 0;
BigInteger_t2902905090 * L_34 = (L_32)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_33));
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger_t2902905090 * L_35 = BigInteger_op_Multiply_m3683746602(NULL /*static, unused*/, L_31, L_34, /*hidden argument*/NULL);
BigInteger_t2902905090 * L_36 = ModulusRing_Difference_m3686091506(L_25, L_28, L_35, /*hidden argument*/NULL);
V_7 = L_36;
BigIntegerU5BU5D_t2349952477* L_37 = V_0;
BigIntegerU5BU5D_t2349952477* L_38 = V_0;
int32_t L_39 = 1;
BigInteger_t2902905090 * L_40 = (L_38)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_39));
ArrayElementTypeCheck (L_37, L_40);
(L_37)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(0), (BigInteger_t2902905090 *)L_40);
BigIntegerU5BU5D_t2349952477* L_41 = V_0;
BigInteger_t2902905090 * L_42 = V_7;
ArrayElementTypeCheck (L_41, L_42);
(L_41)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(1), (BigInteger_t2902905090 *)L_42);
}
IL_0097:
{
BigInteger_t2902905090 * L_43 = V_4;
BigInteger_t2902905090 * L_44 = V_5;
BigIntegerU5BU5D_t2349952477* L_45 = Kernel_multiByteDivide_m450694282(NULL /*static, unused*/, L_43, L_44, /*hidden argument*/NULL);
V_8 = L_45;
BigIntegerU5BU5D_t2349952477* L_46 = V_1;
BigIntegerU5BU5D_t2349952477* L_47 = V_1;
int32_t L_48 = 1;
BigInteger_t2902905090 * L_49 = (L_47)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_48));
ArrayElementTypeCheck (L_46, L_49);
(L_46)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(0), (BigInteger_t2902905090 *)L_49);
BigIntegerU5BU5D_t2349952477* L_50 = V_1;
BigIntegerU5BU5D_t2349952477* L_51 = V_8;
int32_t L_52 = 0;
BigInteger_t2902905090 * L_53 = (L_51)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_52));
ArrayElementTypeCheck (L_50, L_53);
(L_50)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(1), (BigInteger_t2902905090 *)L_53);
BigIntegerU5BU5D_t2349952477* L_54 = V_2;
BigIntegerU5BU5D_t2349952477* L_55 = V_2;
int32_t L_56 = 1;
BigInteger_t2902905090 * L_57 = (L_55)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_56));
ArrayElementTypeCheck (L_54, L_57);
(L_54)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(0), (BigInteger_t2902905090 *)L_57);
BigIntegerU5BU5D_t2349952477* L_58 = V_2;
BigIntegerU5BU5D_t2349952477* L_59 = V_8;
int32_t L_60 = 1;
BigInteger_t2902905090 * L_61 = (L_59)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_60));
ArrayElementTypeCheck (L_58, L_61);
(L_58)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(1), (BigInteger_t2902905090 *)L_61);
BigInteger_t2902905090 * L_62 = V_5;
V_4 = L_62;
BigIntegerU5BU5D_t2349952477* L_63 = V_8;
int32_t L_64 = 1;
BigInteger_t2902905090 * L_65 = (L_63)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_64));
V_5 = L_65;
int32_t L_66 = V_3;
V_3 = ((int32_t)il2cpp_codegen_add((int32_t)L_66, (int32_t)1));
}
IL_00ca:
{
BigInteger_t2902905090 * L_67 = V_5;
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
bool L_68 = BigInteger_op_Inequality_m3469726044(NULL /*static, unused*/, L_67, 0, /*hidden argument*/NULL);
if (L_68)
{
goto IL_006e;
}
}
{
BigIntegerU5BU5D_t2349952477* L_69 = V_2;
int32_t L_70 = 0;
BigInteger_t2902905090 * L_71 = (L_69)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_70));
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
bool L_72 = BigInteger_op_Inequality_m3469726044(NULL /*static, unused*/, L_71, 1, /*hidden argument*/NULL);
if (!L_72)
{
goto IL_00f0;
}
}
{
ArithmeticException_t4283546778 * L_73 = (ArithmeticException_t4283546778 *)il2cpp_codegen_object_new(ArithmeticException_t4283546778_il2cpp_TypeInfo_var);
ArithmeticException__ctor_m3551809662(L_73, _stringLiteral3592288577, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_73, NULL, Kernel_modInverse_m652700340_RuntimeMethod_var);
}
IL_00f0:
{
ModulusRing_t596511505 * L_74 = V_6;
BigIntegerU5BU5D_t2349952477* L_75 = V_0;
int32_t L_76 = 0;
BigInteger_t2902905090 * L_77 = (L_75)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_76));
BigIntegerU5BU5D_t2349952477* L_78 = V_0;
int32_t L_79 = 1;
BigInteger_t2902905090 * L_80 = (L_78)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_79));
BigIntegerU5BU5D_t2349952477* L_81 = V_1;
int32_t L_82 = 0;
BigInteger_t2902905090 * L_83 = (L_81)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_82));
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger_t2902905090 * L_84 = BigInteger_op_Multiply_m3683746602(NULL /*static, unused*/, L_80, L_83, /*hidden argument*/NULL);
BigInteger_t2902905090 * L_85 = ModulusRing_Difference_m3686091506(L_74, L_77, L_84, /*hidden argument*/NULL);
return L_85;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void Mono.Math.BigInteger/ModulusRing::.ctor(Mono.Math.BigInteger)
extern "C" IL2CPP_METHOD_ATTR void ModulusRing__ctor_m2420310199 (ModulusRing_t596511505 * __this, BigInteger_t2902905090 * ___modulus0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (ModulusRing__ctor_m2420310199_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
uint32_t V_0 = 0;
{
Object__ctor_m297566312(__this, /*hidden argument*/NULL);
BigInteger_t2902905090 * L_0 = ___modulus0;
__this->set_mod_0(L_0);
BigInteger_t2902905090 * L_1 = __this->get_mod_0();
uint32_t L_2 = L_1->get_length_0();
V_0 = ((int32_t)((int32_t)L_2<<(int32_t)1));
uint32_t L_3 = V_0;
BigInteger_t2902905090 * L_4 = (BigInteger_t2902905090 *)il2cpp_codegen_object_new(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger__ctor_m3473491062(L_4, 1, ((int32_t)il2cpp_codegen_add((int32_t)L_3, (int32_t)1)), /*hidden argument*/NULL);
__this->set_constant_1(L_4);
BigInteger_t2902905090 * L_5 = __this->get_constant_1();
UInt32U5BU5D_t2770800703* L_6 = L_5->get_data_1();
uint32_t L_7 = V_0;
(L_6)->SetAtUnchecked(static_cast<il2cpp_array_size_t>((((uintptr_t)L_7))), (uint32_t)1);
BigInteger_t2902905090 * L_8 = __this->get_constant_1();
BigInteger_t2902905090 * L_9 = __this->get_mod_0();
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger_t2902905090 * L_10 = BigInteger_op_Division_m3713793389(NULL /*static, unused*/, L_8, L_9, /*hidden argument*/NULL);
__this->set_constant_1(L_10);
return;
}
}
// System.Void Mono.Math.BigInteger/ModulusRing::BarrettReduction(Mono.Math.BigInteger)
extern "C" IL2CPP_METHOD_ATTR void ModulusRing_BarrettReduction_m3024442734 (ModulusRing_t596511505 * __this, BigInteger_t2902905090 * ___x0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (ModulusRing_BarrettReduction_m3024442734_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
BigInteger_t2902905090 * V_0 = NULL;
uint32_t V_1 = 0;
uint32_t V_2 = 0;
uint32_t V_3 = 0;
BigInteger_t2902905090 * V_4 = NULL;
uint32_t V_5 = 0;
BigInteger_t2902905090 * V_6 = NULL;
BigInteger_t2902905090 * V_7 = NULL;
uint32_t G_B7_0 = 0;
{
BigInteger_t2902905090 * L_0 = __this->get_mod_0();
V_0 = L_0;
BigInteger_t2902905090 * L_1 = V_0;
uint32_t L_2 = L_1->get_length_0();
V_1 = L_2;
uint32_t L_3 = V_1;
V_2 = ((int32_t)il2cpp_codegen_add((int32_t)L_3, (int32_t)1));
uint32_t L_4 = V_1;
V_3 = ((int32_t)il2cpp_codegen_subtract((int32_t)L_4, (int32_t)1));
BigInteger_t2902905090 * L_5 = ___x0;
uint32_t L_6 = L_5->get_length_0();
uint32_t L_7 = V_1;
if ((!(((uint32_t)L_6) < ((uint32_t)L_7))))
{
goto IL_0023;
}
}
{
return;
}
IL_0023:
{
BigInteger_t2902905090 * L_8 = ___x0;
UInt32U5BU5D_t2770800703* L_9 = L_8->get_data_1();
BigInteger_t2902905090 * L_10 = ___x0;
uint32_t L_11 = L_10->get_length_0();
if ((((int64_t)(((int64_t)((int64_t)(((int32_t)((int32_t)(((RuntimeArray *)L_9)->max_length)))))))) >= ((int64_t)(((int64_t)((uint64_t)L_11))))))
{
goto IL_0043;
}
}
{
IndexOutOfRangeException_t1578797820 * L_12 = (IndexOutOfRangeException_t1578797820 *)il2cpp_codegen_object_new(IndexOutOfRangeException_t1578797820_il2cpp_TypeInfo_var);
IndexOutOfRangeException__ctor_m3408750441(L_12, _stringLiteral1441813354, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_12, NULL, ModulusRing_BarrettReduction_m3024442734_RuntimeMethod_var);
}
IL_0043:
{
BigInteger_t2902905090 * L_13 = ___x0;
uint32_t L_14 = L_13->get_length_0();
uint32_t L_15 = V_3;
BigInteger_t2902905090 * L_16 = __this->get_constant_1();
uint32_t L_17 = L_16->get_length_0();
BigInteger_t2902905090 * L_18 = (BigInteger_t2902905090 *)il2cpp_codegen_object_new(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger__ctor_m3473491062(L_18, 1, ((int32_t)il2cpp_codegen_add((int32_t)((int32_t)il2cpp_codegen_subtract((int32_t)L_14, (int32_t)L_15)), (int32_t)L_17)), /*hidden argument*/NULL);
V_4 = L_18;
BigInteger_t2902905090 * L_19 = ___x0;
UInt32U5BU5D_t2770800703* L_20 = L_19->get_data_1();
uint32_t L_21 = V_3;
BigInteger_t2902905090 * L_22 = ___x0;
uint32_t L_23 = L_22->get_length_0();
uint32_t L_24 = V_3;
BigInteger_t2902905090 * L_25 = __this->get_constant_1();
UInt32U5BU5D_t2770800703* L_26 = L_25->get_data_1();
BigInteger_t2902905090 * L_27 = __this->get_constant_1();
uint32_t L_28 = L_27->get_length_0();
BigInteger_t2902905090 * L_29 = V_4;
UInt32U5BU5D_t2770800703* L_30 = L_29->get_data_1();
Kernel_Multiply_m193213393(NULL /*static, unused*/, L_20, L_21, ((int32_t)il2cpp_codegen_subtract((int32_t)L_23, (int32_t)L_24)), L_26, 0, L_28, L_30, 0, /*hidden argument*/NULL);
BigInteger_t2902905090 * L_31 = ___x0;
uint32_t L_32 = L_31->get_length_0();
uint32_t L_33 = V_2;
if ((!(((uint32_t)L_32) > ((uint32_t)L_33))))
{
goto IL_00a4;
}
}
{
uint32_t L_34 = V_2;
G_B7_0 = L_34;
goto IL_00aa;
}
IL_00a4:
{
BigInteger_t2902905090 * L_35 = ___x0;
uint32_t L_36 = L_35->get_length_0();
G_B7_0 = L_36;
}
IL_00aa:
{
V_5 = G_B7_0;
BigInteger_t2902905090 * L_37 = ___x0;
uint32_t L_38 = V_5;
L_37->set_length_0(L_38);
BigInteger_t2902905090 * L_39 = ___x0;
BigInteger_Normalize_m3021106862(L_39, /*hidden argument*/NULL);
uint32_t L_40 = V_2;
BigInteger_t2902905090 * L_41 = (BigInteger_t2902905090 *)il2cpp_codegen_object_new(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger__ctor_m3473491062(L_41, 1, L_40, /*hidden argument*/NULL);
V_6 = L_41;
BigInteger_t2902905090 * L_42 = V_4;
UInt32U5BU5D_t2770800703* L_43 = L_42->get_data_1();
uint32_t L_44 = V_2;
BigInteger_t2902905090 * L_45 = V_4;
uint32_t L_46 = L_45->get_length_0();
uint32_t L_47 = V_2;
BigInteger_t2902905090 * L_48 = V_0;
UInt32U5BU5D_t2770800703* L_49 = L_48->get_data_1();
BigInteger_t2902905090 * L_50 = V_0;
uint32_t L_51 = L_50->get_length_0();
BigInteger_t2902905090 * L_52 = V_6;
UInt32U5BU5D_t2770800703* L_53 = L_52->get_data_1();
uint32_t L_54 = V_2;
Kernel_MultiplyMod2p32pmod_m451690680(NULL /*static, unused*/, L_43, L_44, ((int32_t)il2cpp_codegen_subtract((int32_t)L_46, (int32_t)L_47)), L_49, 0, L_51, L_53, 0, L_54, /*hidden argument*/NULL);
BigInteger_t2902905090 * L_55 = V_6;
BigInteger_Normalize_m3021106862(L_55, /*hidden argument*/NULL);
BigInteger_t2902905090 * L_56 = V_6;
BigInteger_t2902905090 * L_57 = ___x0;
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
bool L_58 = BigInteger_op_LessThanOrEqual_m3925173639(NULL /*static, unused*/, L_56, L_57, /*hidden argument*/NULL);
if (!L_58)
{
goto IL_0110;
}
}
{
BigInteger_t2902905090 * L_59 = ___x0;
BigInteger_t2902905090 * L_60 = V_6;
Kernel_MinusEq_m2152832554(NULL /*static, unused*/, L_59, L_60, /*hidden argument*/NULL);
goto IL_0137;
}
IL_0110:
{
uint32_t L_61 = V_2;
BigInteger_t2902905090 * L_62 = (BigInteger_t2902905090 *)il2cpp_codegen_object_new(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger__ctor_m3473491062(L_62, 1, ((int32_t)il2cpp_codegen_add((int32_t)L_61, (int32_t)1)), /*hidden argument*/NULL);
V_7 = L_62;
BigInteger_t2902905090 * L_63 = V_7;
UInt32U5BU5D_t2770800703* L_64 = L_63->get_data_1();
uint32_t L_65 = V_2;
(L_64)->SetAtUnchecked(static_cast<il2cpp_array_size_t>((((uintptr_t)L_65))), (uint32_t)1);
BigInteger_t2902905090 * L_66 = V_7;
BigInteger_t2902905090 * L_67 = V_6;
Kernel_MinusEq_m2152832554(NULL /*static, unused*/, L_66, L_67, /*hidden argument*/NULL);
BigInteger_t2902905090 * L_68 = ___x0;
BigInteger_t2902905090 * L_69 = V_7;
Kernel_PlusEq_m136676638(NULL /*static, unused*/, L_68, L_69, /*hidden argument*/NULL);
}
IL_0137:
{
goto IL_0143;
}
IL_013c:
{
BigInteger_t2902905090 * L_70 = ___x0;
BigInteger_t2902905090 * L_71 = V_0;
Kernel_MinusEq_m2152832554(NULL /*static, unused*/, L_70, L_71, /*hidden argument*/NULL);
}
IL_0143:
{
BigInteger_t2902905090 * L_72 = ___x0;
BigInteger_t2902905090 * L_73 = V_0;
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
bool L_74 = BigInteger_op_GreaterThanOrEqual_m3313329514(NULL /*static, unused*/, L_72, L_73, /*hidden argument*/NULL);
if (L_74)
{
goto IL_013c;
}
}
{
return;
}
}
// Mono.Math.BigInteger Mono.Math.BigInteger/ModulusRing::Multiply(Mono.Math.BigInteger,Mono.Math.BigInteger)
extern "C" IL2CPP_METHOD_ATTR BigInteger_t2902905090 * ModulusRing_Multiply_m1975391470 (ModulusRing_t596511505 * __this, BigInteger_t2902905090 * ___a0, BigInteger_t2902905090 * ___b1, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (ModulusRing_Multiply_m1975391470_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
BigInteger_t2902905090 * V_0 = NULL;
{
BigInteger_t2902905090 * L_0 = ___a0;
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
bool L_1 = BigInteger_op_Equality_m3872814973(NULL /*static, unused*/, L_0, 0, /*hidden argument*/NULL);
if (L_1)
{
goto IL_0018;
}
}
{
BigInteger_t2902905090 * L_2 = ___b1;
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
bool L_3 = BigInteger_op_Equality_m3872814973(NULL /*static, unused*/, L_2, 0, /*hidden argument*/NULL);
if (!L_3)
{
goto IL_001f;
}
}
IL_0018:
{
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger_t2902905090 * L_4 = BigInteger_op_Implicit_m2547142909(NULL /*static, unused*/, 0, /*hidden argument*/NULL);
return L_4;
}
IL_001f:
{
BigInteger_t2902905090 * L_5 = ___a0;
BigInteger_t2902905090 * L_6 = __this->get_mod_0();
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
bool L_7 = BigInteger_op_GreaterThan_m2974122765(NULL /*static, unused*/, L_5, L_6, /*hidden argument*/NULL);
if (!L_7)
{
goto IL_003e;
}
}
{
BigInteger_t2902905090 * L_8 = ___a0;
BigInteger_t2902905090 * L_9 = __this->get_mod_0();
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger_t2902905090 * L_10 = BigInteger_op_Modulus_m2565477533(NULL /*static, unused*/, L_8, L_9, /*hidden argument*/NULL);
___a0 = L_10;
}
IL_003e:
{
BigInteger_t2902905090 * L_11 = ___b1;
BigInteger_t2902905090 * L_12 = __this->get_mod_0();
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
bool L_13 = BigInteger_op_GreaterThan_m2974122765(NULL /*static, unused*/, L_11, L_12, /*hidden argument*/NULL);
if (!L_13)
{
goto IL_005d;
}
}
{
BigInteger_t2902905090 * L_14 = ___b1;
BigInteger_t2902905090 * L_15 = __this->get_mod_0();
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger_t2902905090 * L_16 = BigInteger_op_Modulus_m2565477533(NULL /*static, unused*/, L_14, L_15, /*hidden argument*/NULL);
___b1 = L_16;
}
IL_005d:
{
BigInteger_t2902905090 * L_17 = ___a0;
BigInteger_t2902905090 * L_18 = ___b1;
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger_t2902905090 * L_19 = BigInteger_op_Multiply_m3683746602(NULL /*static, unused*/, L_17, L_18, /*hidden argument*/NULL);
BigInteger_t2902905090 * L_20 = (BigInteger_t2902905090 *)il2cpp_codegen_object_new(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger__ctor_m2108826647(L_20, L_19, /*hidden argument*/NULL);
V_0 = L_20;
BigInteger_t2902905090 * L_21 = V_0;
ModulusRing_BarrettReduction_m3024442734(__this, L_21, /*hidden argument*/NULL);
BigInteger_t2902905090 * L_22 = V_0;
return L_22;
}
}
// Mono.Math.BigInteger Mono.Math.BigInteger/ModulusRing::Difference(Mono.Math.BigInteger,Mono.Math.BigInteger)
extern "C" IL2CPP_METHOD_ATTR BigInteger_t2902905090 * ModulusRing_Difference_m3686091506 (ModulusRing_t596511505 * __this, BigInteger_t2902905090 * ___a0, BigInteger_t2902905090 * ___b1, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (ModulusRing_Difference_m3686091506_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
int32_t V_0 = 0;
BigInteger_t2902905090 * V_1 = NULL;
int32_t V_2 = 0;
{
BigInteger_t2902905090 * L_0 = ___a0;
BigInteger_t2902905090 * L_1 = ___b1;
int32_t L_2 = Kernel_Compare_m2669603547(NULL /*static, unused*/, L_0, L_1, /*hidden argument*/NULL);
V_0 = L_2;
int32_t L_3 = V_0;
V_2 = L_3;
int32_t L_4 = V_2;
switch (((int32_t)il2cpp_codegen_add((int32_t)L_4, (int32_t)1)))
{
case 0:
{
goto IL_0037;
}
case 1:
{
goto IL_0023;
}
case 2:
{
goto IL_002a;
}
}
}
{
goto IL_0044;
}
IL_0023:
{
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger_t2902905090 * L_5 = BigInteger_op_Implicit_m2547142909(NULL /*static, unused*/, 0, /*hidden argument*/NULL);
return L_5;
}
IL_002a:
{
BigInteger_t2902905090 * L_6 = ___a0;
BigInteger_t2902905090 * L_7 = ___b1;
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger_t2902905090 * L_8 = BigInteger_op_Subtraction_m4245834512(NULL /*static, unused*/, L_6, L_7, /*hidden argument*/NULL);
V_1 = L_8;
goto IL_004a;
}
IL_0037:
{
BigInteger_t2902905090 * L_9 = ___b1;
BigInteger_t2902905090 * L_10 = ___a0;
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger_t2902905090 * L_11 = BigInteger_op_Subtraction_m4245834512(NULL /*static, unused*/, L_9, L_10, /*hidden argument*/NULL);
V_1 = L_11;
goto IL_004a;
}
IL_0044:
{
Exception_t * L_12 = (Exception_t *)il2cpp_codegen_object_new(Exception_t_il2cpp_TypeInfo_var);
Exception__ctor_m213470898(L_12, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_12, NULL, ModulusRing_Difference_m3686091506_RuntimeMethod_var);
}
IL_004a:
{
BigInteger_t2902905090 * L_13 = V_1;
BigInteger_t2902905090 * L_14 = __this->get_mod_0();
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
bool L_15 = BigInteger_op_GreaterThanOrEqual_m3313329514(NULL /*static, unused*/, L_13, L_14, /*hidden argument*/NULL);
if (!L_15)
{
goto IL_008c;
}
}
{
BigInteger_t2902905090 * L_16 = V_1;
uint32_t L_17 = L_16->get_length_0();
BigInteger_t2902905090 * L_18 = __this->get_mod_0();
uint32_t L_19 = L_18->get_length_0();
if ((!(((uint32_t)L_17) >= ((uint32_t)((int32_t)((int32_t)L_19<<(int32_t)1))))))
{
goto IL_0085;
}
}
{
BigInteger_t2902905090 * L_20 = V_1;
BigInteger_t2902905090 * L_21 = __this->get_mod_0();
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger_t2902905090 * L_22 = BigInteger_op_Modulus_m2565477533(NULL /*static, unused*/, L_20, L_21, /*hidden argument*/NULL);
V_1 = L_22;
goto IL_008c;
}
IL_0085:
{
BigInteger_t2902905090 * L_23 = V_1;
ModulusRing_BarrettReduction_m3024442734(__this, L_23, /*hidden argument*/NULL);
}
IL_008c:
{
int32_t L_24 = V_0;
if ((!(((uint32_t)L_24) == ((uint32_t)(-1)))))
{
goto IL_00a0;
}
}
{
BigInteger_t2902905090 * L_25 = __this->get_mod_0();
BigInteger_t2902905090 * L_26 = V_1;
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger_t2902905090 * L_27 = BigInteger_op_Subtraction_m4245834512(NULL /*static, unused*/, L_25, L_26, /*hidden argument*/NULL);
V_1 = L_27;
}
IL_00a0:
{
BigInteger_t2902905090 * L_28 = V_1;
return L_28;
}
}
// Mono.Math.BigInteger Mono.Math.BigInteger/ModulusRing::Pow(Mono.Math.BigInteger,Mono.Math.BigInteger)
extern "C" IL2CPP_METHOD_ATTR BigInteger_t2902905090 * ModulusRing_Pow_m1124248336 (ModulusRing_t596511505 * __this, BigInteger_t2902905090 * ___a0, BigInteger_t2902905090 * ___k1, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (ModulusRing_Pow_m1124248336_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
BigInteger_t2902905090 * V_0 = NULL;
BigInteger_t2902905090 * V_1 = NULL;
int32_t V_2 = 0;
{
BigInteger_t2902905090 * L_0 = (BigInteger_t2902905090 *)il2cpp_codegen_object_new(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger__ctor_m2474659844(L_0, 1, /*hidden argument*/NULL);
V_0 = L_0;
BigInteger_t2902905090 * L_1 = ___k1;
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
bool L_2 = BigInteger_op_Equality_m3872814973(NULL /*static, unused*/, L_1, 0, /*hidden argument*/NULL);
if (!L_2)
{
goto IL_0015;
}
}
{
BigInteger_t2902905090 * L_3 = V_0;
return L_3;
}
IL_0015:
{
BigInteger_t2902905090 * L_4 = ___a0;
V_1 = L_4;
BigInteger_t2902905090 * L_5 = ___k1;
bool L_6 = BigInteger_TestBit_m2798226118(L_5, 0, /*hidden argument*/NULL);
if (!L_6)
{
goto IL_0025;
}
}
{
BigInteger_t2902905090 * L_7 = ___a0;
V_0 = L_7;
}
IL_0025:
{
V_2 = 1;
goto IL_004e;
}
IL_002c:
{
BigInteger_t2902905090 * L_8 = V_1;
BigInteger_t2902905090 * L_9 = V_1;
BigInteger_t2902905090 * L_10 = ModulusRing_Multiply_m1975391470(__this, L_8, L_9, /*hidden argument*/NULL);
V_1 = L_10;
BigInteger_t2902905090 * L_11 = ___k1;
int32_t L_12 = V_2;
bool L_13 = BigInteger_TestBit_m2798226118(L_11, L_12, /*hidden argument*/NULL);
if (!L_13)
{
goto IL_004a;
}
}
{
BigInteger_t2902905090 * L_14 = V_1;
BigInteger_t2902905090 * L_15 = V_0;
BigInteger_t2902905090 * L_16 = ModulusRing_Multiply_m1975391470(__this, L_14, L_15, /*hidden argument*/NULL);
V_0 = L_16;
}
IL_004a:
{
int32_t L_17 = V_2;
V_2 = ((int32_t)il2cpp_codegen_add((int32_t)L_17, (int32_t)1));
}
IL_004e:
{
int32_t L_18 = V_2;
BigInteger_t2902905090 * L_19 = ___k1;
int32_t L_20 = BigInteger_BitCount_m2055977486(L_19, /*hidden argument*/NULL);
if ((((int32_t)L_18) < ((int32_t)L_20)))
{
goto IL_002c;
}
}
{
BigInteger_t2902905090 * L_21 = V_0;
return L_21;
}
}
// Mono.Math.BigInteger Mono.Math.BigInteger/ModulusRing::Pow(System.UInt32,Mono.Math.BigInteger)
extern "C" IL2CPP_METHOD_ATTR BigInteger_t2902905090 * ModulusRing_Pow_m729002192 (ModulusRing_t596511505 * __this, uint32_t ___b0, BigInteger_t2902905090 * ___exp1, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (ModulusRing_Pow_m729002192_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
uint32_t L_0 = ___b0;
BigInteger_t2902905090 * L_1 = (BigInteger_t2902905090 *)il2cpp_codegen_object_new(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger__ctor_m2474659844(L_1, L_0, /*hidden argument*/NULL);
BigInteger_t2902905090 * L_2 = ___exp1;
BigInteger_t2902905090 * L_3 = ModulusRing_Pow_m1124248336(__this, L_1, L_2, /*hidden argument*/NULL);
return L_3;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void Mono.Math.Prime.Generator.PrimeGeneratorBase::.ctor()
extern "C" IL2CPP_METHOD_ATTR void PrimeGeneratorBase__ctor_m2423671149 (PrimeGeneratorBase_t446028867 * __this, const RuntimeMethod* method)
{
{
Object__ctor_m297566312(__this, /*hidden argument*/NULL);
return;
}
}
// Mono.Math.Prime.ConfidenceFactor Mono.Math.Prime.Generator.PrimeGeneratorBase::get_Confidence()
extern "C" IL2CPP_METHOD_ATTR int32_t PrimeGeneratorBase_get_Confidence_m3172213559 (PrimeGeneratorBase_t446028867 * __this, const RuntimeMethod* method)
{
{
return (int32_t)(2);
}
}
// Mono.Math.Prime.PrimalityTest Mono.Math.Prime.Generator.PrimeGeneratorBase::get_PrimalityTest()
extern "C" IL2CPP_METHOD_ATTR PrimalityTest_t1539325944 * PrimeGeneratorBase_get_PrimalityTest_m2487240563 (PrimeGeneratorBase_t446028867 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (PrimeGeneratorBase_get_PrimalityTest_m2487240563_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
intptr_t L_0 = (intptr_t)PrimalityTests_RabinMillerTest_m2544317101_RuntimeMethod_var;
PrimalityTest_t1539325944 * L_1 = (PrimalityTest_t1539325944 *)il2cpp_codegen_object_new(PrimalityTest_t1539325944_il2cpp_TypeInfo_var);
PrimalityTest__ctor_m763620166(L_1, NULL, L_0, /*hidden argument*/NULL);
return L_1;
}
}
// System.Int32 Mono.Math.Prime.Generator.PrimeGeneratorBase::get_TrialDivisionBounds()
extern "C" IL2CPP_METHOD_ATTR int32_t PrimeGeneratorBase_get_TrialDivisionBounds_m1980088695 (PrimeGeneratorBase_t446028867 * __this, const RuntimeMethod* method)
{
{
return ((int32_t)4000);
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void Mono.Math.Prime.Generator.SequentialSearchPrimeGeneratorBase::.ctor()
extern "C" IL2CPP_METHOD_ATTR void SequentialSearchPrimeGeneratorBase__ctor_m577913576 (SequentialSearchPrimeGeneratorBase_t2996090509 * __this, const RuntimeMethod* method)
{
{
PrimeGeneratorBase__ctor_m2423671149(__this, /*hidden argument*/NULL);
return;
}
}
// Mono.Math.BigInteger Mono.Math.Prime.Generator.SequentialSearchPrimeGeneratorBase::GenerateSearchBase(System.Int32,System.Object)
extern "C" IL2CPP_METHOD_ATTR BigInteger_t2902905090 * SequentialSearchPrimeGeneratorBase_GenerateSearchBase_m1918143664 (SequentialSearchPrimeGeneratorBase_t2996090509 * __this, int32_t ___bits0, RuntimeObject * ___context1, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (SequentialSearchPrimeGeneratorBase_GenerateSearchBase_m1918143664_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
BigInteger_t2902905090 * V_0 = NULL;
{
int32_t L_0 = ___bits0;
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger_t2902905090 * L_1 = BigInteger_GenerateRandom_m1790382084(NULL /*static, unused*/, L_0, /*hidden argument*/NULL);
V_0 = L_1;
BigInteger_t2902905090 * L_2 = V_0;
BigInteger_SetBit_m1387902198(L_2, 0, /*hidden argument*/NULL);
BigInteger_t2902905090 * L_3 = V_0;
return L_3;
}
}
// Mono.Math.BigInteger Mono.Math.Prime.Generator.SequentialSearchPrimeGeneratorBase::GenerateNewPrime(System.Int32)
extern "C" IL2CPP_METHOD_ATTR BigInteger_t2902905090 * SequentialSearchPrimeGeneratorBase_GenerateNewPrime_m907640859 (SequentialSearchPrimeGeneratorBase_t2996090509 * __this, int32_t ___bits0, const RuntimeMethod* method)
{
{
int32_t L_0 = ___bits0;
BigInteger_t2902905090 * L_1 = VirtFuncInvoker2< BigInteger_t2902905090 *, int32_t, RuntimeObject * >::Invoke(9 /* Mono.Math.BigInteger Mono.Math.Prime.Generator.SequentialSearchPrimeGeneratorBase::GenerateNewPrime(System.Int32,System.Object) */, __this, L_0, NULL);
return L_1;
}
}
// Mono.Math.BigInteger Mono.Math.Prime.Generator.SequentialSearchPrimeGeneratorBase::GenerateNewPrime(System.Int32,System.Object)
extern "C" IL2CPP_METHOD_ATTR BigInteger_t2902905090 * SequentialSearchPrimeGeneratorBase_GenerateNewPrime_m2891860459 (SequentialSearchPrimeGeneratorBase_t2996090509 * __this, int32_t ___bits0, RuntimeObject * ___context1, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (SequentialSearchPrimeGeneratorBase_GenerateNewPrime_m2891860459_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
BigInteger_t2902905090 * V_0 = NULL;
uint32_t V_1 = 0;
uint32_t V_2 = 0;
int32_t V_3 = 0;
UInt32U5BU5D_t2770800703* V_4 = NULL;
int32_t V_5 = 0;
{
int32_t L_0 = ___bits0;
RuntimeObject * L_1 = ___context1;
BigInteger_t2902905090 * L_2 = VirtFuncInvoker2< BigInteger_t2902905090 *, int32_t, RuntimeObject * >::Invoke(8 /* Mono.Math.BigInteger Mono.Math.Prime.Generator.SequentialSearchPrimeGeneratorBase::GenerateSearchBase(System.Int32,System.Object) */, __this, L_0, L_1);
V_0 = L_2;
BigInteger_t2902905090 * L_3 = V_0;
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
uint32_t L_4 = BigInteger_op_Modulus_m3242311550(NULL /*static, unused*/, L_3, ((int32_t)-1060120681), /*hidden argument*/NULL);
V_2 = L_4;
int32_t L_5 = VirtFuncInvoker0< int32_t >::Invoke(6 /* System.Int32 Mono.Math.Prime.Generator.PrimeGeneratorBase::get_TrialDivisionBounds() */, __this);
V_3 = L_5;
UInt32U5BU5D_t2770800703* L_6 = ((BigInteger_t2902905090_StaticFields*)il2cpp_codegen_static_fields_for(BigInteger_t2902905090_il2cpp_TypeInfo_var))->get_smallPrimes_2();
V_4 = L_6;
}
IL_0023:
{
uint32_t L_7 = V_2;
if (((int32_t)((uint32_t)(int32_t)L_7%(uint32_t)(int32_t)3)))
{
goto IL_0030;
}
}
{
goto IL_0105;
}
IL_0030:
{
uint32_t L_8 = V_2;
if (((int32_t)((uint32_t)(int32_t)L_8%(uint32_t)(int32_t)5)))
{
goto IL_003d;
}
}
{
goto IL_0105;
}
IL_003d:
{
uint32_t L_9 = V_2;
if (((int32_t)((uint32_t)(int32_t)L_9%(uint32_t)(int32_t)7)))
{
goto IL_004a;
}
}
{
goto IL_0105;
}
IL_004a:
{
uint32_t L_10 = V_2;
if (((int32_t)((uint32_t)(int32_t)L_10%(uint32_t)(int32_t)((int32_t)11))))
{
goto IL_0058;
}
}
{
goto IL_0105;
}
IL_0058:
{
uint32_t L_11 = V_2;
if (((int32_t)((uint32_t)(int32_t)L_11%(uint32_t)(int32_t)((int32_t)13))))
{
goto IL_0066;
}
}
{
goto IL_0105;
}
IL_0066:
{
uint32_t L_12 = V_2;
if (((int32_t)((uint32_t)(int32_t)L_12%(uint32_t)(int32_t)((int32_t)17))))
{
goto IL_0074;
}
}
{
goto IL_0105;
}
IL_0074:
{
uint32_t L_13 = V_2;
if (((int32_t)((uint32_t)(int32_t)L_13%(uint32_t)(int32_t)((int32_t)19))))
{
goto IL_0082;
}
}
{
goto IL_0105;
}
IL_0082:
{
uint32_t L_14 = V_2;
if (((int32_t)((uint32_t)(int32_t)L_14%(uint32_t)(int32_t)((int32_t)23))))
{
goto IL_0090;
}
}
{
goto IL_0105;
}
IL_0090:
{
uint32_t L_15 = V_2;
if (((int32_t)((uint32_t)(int32_t)L_15%(uint32_t)(int32_t)((int32_t)29))))
{
goto IL_009e;
}
}
{
goto IL_0105;
}
IL_009e:
{
V_5 = ((int32_t)10);
goto IL_00c2;
}
IL_00a7:
{
BigInteger_t2902905090 * L_16 = V_0;
UInt32U5BU5D_t2770800703* L_17 = V_4;
int32_t L_18 = V_5;
int32_t L_19 = L_18;
uint32_t L_20 = (L_17)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_19));
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
uint32_t L_21 = BigInteger_op_Modulus_m3242311550(NULL /*static, unused*/, L_16, L_20, /*hidden argument*/NULL);
if (L_21)
{
goto IL_00bc;
}
}
{
goto IL_0105;
}
IL_00bc:
{
int32_t L_22 = V_5;
V_5 = ((int32_t)il2cpp_codegen_add((int32_t)L_22, (int32_t)1));
}
IL_00c2:
{
int32_t L_23 = V_5;
UInt32U5BU5D_t2770800703* L_24 = V_4;
if ((((int32_t)L_23) >= ((int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_24)->max_length)))))))
{
goto IL_00da;
}
}
{
UInt32U5BU5D_t2770800703* L_25 = V_4;
int32_t L_26 = V_5;
int32_t L_27 = L_26;
uint32_t L_28 = (L_25)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_27));
int32_t L_29 = V_3;
if ((((int64_t)(((int64_t)((uint64_t)L_28)))) <= ((int64_t)(((int64_t)((int64_t)L_29))))))
{
goto IL_00a7;
}
}
IL_00da:
{
BigInteger_t2902905090 * L_30 = V_0;
RuntimeObject * L_31 = ___context1;
bool L_32 = VirtFuncInvoker2< bool, BigInteger_t2902905090 *, RuntimeObject * >::Invoke(10 /* System.Boolean Mono.Math.Prime.Generator.SequentialSearchPrimeGeneratorBase::IsPrimeAcceptable(Mono.Math.BigInteger,System.Object) */, __this, L_30, L_31);
if (L_32)
{
goto IL_00ec;
}
}
{
goto IL_0105;
}
IL_00ec:
{
PrimalityTest_t1539325944 * L_33 = VirtFuncInvoker0< PrimalityTest_t1539325944 * >::Invoke(5 /* Mono.Math.Prime.PrimalityTest Mono.Math.Prime.Generator.PrimeGeneratorBase::get_PrimalityTest() */, __this);
BigInteger_t2902905090 * L_34 = V_0;
int32_t L_35 = VirtFuncInvoker0< int32_t >::Invoke(4 /* Mono.Math.Prime.ConfidenceFactor Mono.Math.Prime.Generator.PrimeGeneratorBase::get_Confidence() */, __this);
bool L_36 = PrimalityTest_Invoke_m2948246884(L_33, L_34, L_35, /*hidden argument*/NULL);
if (!L_36)
{
goto IL_0105;
}
}
{
BigInteger_t2902905090 * L_37 = V_0;
return L_37;
}
IL_0105:
{
uint32_t L_38 = V_2;
V_2 = ((int32_t)il2cpp_codegen_add((int32_t)L_38, (int32_t)2));
uint32_t L_39 = V_2;
if ((!(((uint32_t)L_39) >= ((uint32_t)((int32_t)-1060120681)))))
{
goto IL_011c;
}
}
{
uint32_t L_40 = V_2;
V_2 = ((int32_t)il2cpp_codegen_subtract((int32_t)L_40, (int32_t)((int32_t)-1060120681)));
}
IL_011c:
{
BigInteger_t2902905090 * L_41 = V_0;
BigInteger_Incr2_m1531167978(L_41, /*hidden argument*/NULL);
goto IL_0023;
}
}
// System.Boolean Mono.Math.Prime.Generator.SequentialSearchPrimeGeneratorBase::IsPrimeAcceptable(Mono.Math.BigInteger,System.Object)
extern "C" IL2CPP_METHOD_ATTR bool SequentialSearchPrimeGeneratorBase_IsPrimeAcceptable_m1127740833 (SequentialSearchPrimeGeneratorBase_t2996090509 * __this, BigInteger_t2902905090 * ___bi0, RuntimeObject * ___context1, const RuntimeMethod* method)
{
{
return (bool)1;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void Mono.Math.Prime.PrimalityTest::.ctor(System.Object,System.IntPtr)
extern "C" IL2CPP_METHOD_ATTR void PrimalityTest__ctor_m763620166 (PrimalityTest_t1539325944 * __this, RuntimeObject * ___object0, intptr_t ___method1, const RuntimeMethod* method)
{
__this->set_method_ptr_0(il2cpp_codegen_get_method_pointer((RuntimeMethod*)___method1));
__this->set_method_3(___method1);
__this->set_m_target_2(___object0);
}
// System.Boolean Mono.Math.Prime.PrimalityTest::Invoke(Mono.Math.BigInteger,Mono.Math.Prime.ConfidenceFactor)
extern "C" IL2CPP_METHOD_ATTR bool PrimalityTest_Invoke_m2948246884 (PrimalityTest_t1539325944 * __this, BigInteger_t2902905090 * ___bi0, int32_t ___confidence1, const RuntimeMethod* method)
{
bool result = false;
if(__this->get_prev_9() != NULL)
{
PrimalityTest_Invoke_m2948246884((PrimalityTest_t1539325944 *)__this->get_prev_9(), ___bi0, ___confidence1, method);
}
Il2CppMethodPointer targetMethodPointer = __this->get_method_ptr_0();
RuntimeMethod* targetMethod = (RuntimeMethod*)(__this->get_method_3());
RuntimeObject* targetThis = __this->get_m_target_2();
il2cpp_codegen_raise_execution_engine_exception_if_method_is_not_found(targetMethod);
bool ___methodIsStatic = MethodIsStatic(targetMethod);
if (___methodIsStatic)
{
if (il2cpp_codegen_method_parameter_count(targetMethod) == 2)
{
// open
{
typedef bool (*FunctionPointerType) (RuntimeObject *, BigInteger_t2902905090 *, int32_t, const RuntimeMethod*);
result = ((FunctionPointerType)targetMethodPointer)(NULL, ___bi0, ___confidence1, targetMethod);
}
}
else
{
// closed
{
typedef bool (*FunctionPointerType) (RuntimeObject *, void*, BigInteger_t2902905090 *, int32_t, const RuntimeMethod*);
result = ((FunctionPointerType)targetMethodPointer)(NULL, targetThis, ___bi0, ___confidence1, targetMethod);
}
}
}
else
{
if (il2cpp_codegen_method_parameter_count(targetMethod) == 2)
{
// closed
if (il2cpp_codegen_method_is_virtual(targetMethod) && !il2cpp_codegen_object_is_of_sealed_type(targetThis) && il2cpp_codegen_delegate_has_invoker((Il2CppDelegate*)__this))
{
if (il2cpp_codegen_method_is_generic_instance(targetMethod))
{
if (il2cpp_codegen_method_is_interface_method(targetMethod))
result = GenericInterfaceFuncInvoker2< bool, BigInteger_t2902905090 *, int32_t >::Invoke(targetMethod, targetThis, ___bi0, ___confidence1);
else
result = GenericVirtFuncInvoker2< bool, BigInteger_t2902905090 *, int32_t >::Invoke(targetMethod, targetThis, ___bi0, ___confidence1);
}
else
{
if (il2cpp_codegen_method_is_interface_method(targetMethod))
result = InterfaceFuncInvoker2< bool, BigInteger_t2902905090 *, int32_t >::Invoke(il2cpp_codegen_method_get_slot(targetMethod), il2cpp_codegen_method_get_declaring_type(targetMethod), targetThis, ___bi0, ___confidence1);
else
result = VirtFuncInvoker2< bool, BigInteger_t2902905090 *, int32_t >::Invoke(il2cpp_codegen_method_get_slot(targetMethod), targetThis, ___bi0, ___confidence1);
}
}
else
{
typedef bool (*FunctionPointerType) (void*, BigInteger_t2902905090 *, int32_t, const RuntimeMethod*);
result = ((FunctionPointerType)targetMethodPointer)(targetThis, ___bi0, ___confidence1, targetMethod);
}
}
else
{
// open
if (il2cpp_codegen_method_is_virtual(targetMethod) && !il2cpp_codegen_object_is_of_sealed_type(targetThis) && il2cpp_codegen_delegate_has_invoker((Il2CppDelegate*)__this))
{
if (il2cpp_codegen_method_is_generic_instance(targetMethod))
{
if (il2cpp_codegen_method_is_interface_method(targetMethod))
result = GenericInterfaceFuncInvoker1< bool, int32_t >::Invoke(targetMethod, ___bi0, ___confidence1);
else
result = GenericVirtFuncInvoker1< bool, int32_t >::Invoke(targetMethod, ___bi0, ___confidence1);
}
else
{
if (il2cpp_codegen_method_is_interface_method(targetMethod))
result = InterfaceFuncInvoker1< bool, int32_t >::Invoke(il2cpp_codegen_method_get_slot(targetMethod), il2cpp_codegen_method_get_declaring_type(targetMethod), ___bi0, ___confidence1);
else
result = VirtFuncInvoker1< bool, int32_t >::Invoke(il2cpp_codegen_method_get_slot(targetMethod), ___bi0, ___confidence1);
}
}
else
{
typedef bool (*FunctionPointerType) (BigInteger_t2902905090 *, int32_t, const RuntimeMethod*);
result = ((FunctionPointerType)targetMethodPointer)(___bi0, ___confidence1, targetMethod);
}
}
}
return result;
}
// System.IAsyncResult Mono.Math.Prime.PrimalityTest::BeginInvoke(Mono.Math.BigInteger,Mono.Math.Prime.ConfidenceFactor,System.AsyncCallback,System.Object)
extern "C" IL2CPP_METHOD_ATTR RuntimeObject* PrimalityTest_BeginInvoke_m742423211 (PrimalityTest_t1539325944 * __this, BigInteger_t2902905090 * ___bi0, int32_t ___confidence1, AsyncCallback_t3962456242 * ___callback2, RuntimeObject * ___object3, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (PrimalityTest_BeginInvoke_m742423211_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
void *__d_args[3] = {0};
__d_args[0] = ___bi0;
__d_args[1] = Box(ConfidenceFactor_t2516000286_il2cpp_TypeInfo_var, &___confidence1);
return (RuntimeObject*)il2cpp_codegen_delegate_begin_invoke((RuntimeDelegate*)__this, __d_args, (RuntimeDelegate*)___callback2, (RuntimeObject*)___object3);
}
// System.Boolean Mono.Math.Prime.PrimalityTest::EndInvoke(System.IAsyncResult)
extern "C" IL2CPP_METHOD_ATTR bool PrimalityTest_EndInvoke_m1035389364 (PrimalityTest_t1539325944 * __this, RuntimeObject* ___result0, const RuntimeMethod* method)
{
RuntimeObject *__result = il2cpp_codegen_delegate_end_invoke((Il2CppAsyncResult*) ___result0, 0);
return *(bool*)UnBox ((RuntimeObject*)__result);
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Int32 Mono.Math.Prime.PrimalityTests::GetSPPRounds(Mono.Math.BigInteger,Mono.Math.Prime.ConfidenceFactor)
extern "C" IL2CPP_METHOD_ATTR int32_t PrimalityTests_GetSPPRounds_m2558073743 (RuntimeObject * __this /* static, unused */, BigInteger_t2902905090 * ___bi0, int32_t ___confidence1, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (PrimalityTests_GetSPPRounds_m2558073743_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
int32_t V_0 = 0;
int32_t V_1 = 0;
int32_t V_2 = 0;
int32_t G_B28_0 = 0;
int32_t G_B32_0 = 0;
{
BigInteger_t2902905090 * L_0 = ___bi0;
int32_t L_1 = BigInteger_BitCount_m2055977486(L_0, /*hidden argument*/NULL);
V_0 = L_1;
int32_t L_2 = V_0;
if ((((int32_t)L_2) > ((int32_t)((int32_t)100))))
{
goto IL_0017;
}
}
{
V_1 = ((int32_t)27);
goto IL_00d1;
}
IL_0017:
{
int32_t L_3 = V_0;
if ((((int32_t)L_3) > ((int32_t)((int32_t)150))))
{
goto IL_002a;
}
}
{
V_1 = ((int32_t)18);
goto IL_00d1;
}
IL_002a:
{
int32_t L_4 = V_0;
if ((((int32_t)L_4) > ((int32_t)((int32_t)200))))
{
goto IL_003d;
}
}
{
V_1 = ((int32_t)15);
goto IL_00d1;
}
IL_003d:
{
int32_t L_5 = V_0;
if ((((int32_t)L_5) > ((int32_t)((int32_t)250))))
{
goto IL_0050;
}
}
{
V_1 = ((int32_t)12);
goto IL_00d1;
}
IL_0050:
{
int32_t L_6 = V_0;
if ((((int32_t)L_6) > ((int32_t)((int32_t)300))))
{
goto IL_0063;
}
}
{
V_1 = ((int32_t)9);
goto IL_00d1;
}
IL_0063:
{
int32_t L_7 = V_0;
if ((((int32_t)L_7) > ((int32_t)((int32_t)350))))
{
goto IL_0075;
}
}
{
V_1 = 8;
goto IL_00d1;
}
IL_0075:
{
int32_t L_8 = V_0;
if ((((int32_t)L_8) > ((int32_t)((int32_t)400))))
{
goto IL_0087;
}
}
{
V_1 = 7;
goto IL_00d1;
}
IL_0087:
{
int32_t L_9 = V_0;
if ((((int32_t)L_9) > ((int32_t)((int32_t)500))))
{
goto IL_0099;
}
}
{
V_1 = 6;
goto IL_00d1;
}
IL_0099:
{
int32_t L_10 = V_0;
if ((((int32_t)L_10) > ((int32_t)((int32_t)600))))
{
goto IL_00ab;
}
}
{
V_1 = 5;
goto IL_00d1;
}
IL_00ab:
{
int32_t L_11 = V_0;
if ((((int32_t)L_11) > ((int32_t)((int32_t)800))))
{
goto IL_00bd;
}
}
{
V_1 = 4;
goto IL_00d1;
}
IL_00bd:
{
int32_t L_12 = V_0;
if ((((int32_t)L_12) > ((int32_t)((int32_t)1250))))
{
goto IL_00cf;
}
}
{
V_1 = 3;
goto IL_00d1;
}
IL_00cf:
{
V_1 = 2;
}
IL_00d1:
{
int32_t L_13 = ___confidence1;
V_2 = L_13;
int32_t L_14 = V_2;
switch (L_14)
{
case 0:
{
goto IL_00f6;
}
case 1:
{
goto IL_0108;
}
case 2:
{
goto IL_011a;
}
case 3:
{
goto IL_011c;
}
case 4:
{
goto IL_0120;
}
case 5:
{
goto IL_0124;
}
}
}
{
goto IL_012f;
}
IL_00f6:
{
int32_t L_15 = V_1;
V_1 = ((int32_t)((int32_t)L_15>>(int32_t)2));
int32_t L_16 = V_1;
if (!L_16)
{
goto IL_0106;
}
}
{
int32_t L_17 = V_1;
G_B28_0 = L_17;
goto IL_0107;
}
IL_0106:
{
G_B28_0 = 1;
}
IL_0107:
{
return G_B28_0;
}
IL_0108:
{
int32_t L_18 = V_1;
V_1 = ((int32_t)((int32_t)L_18>>(int32_t)1));
int32_t L_19 = V_1;
if (!L_19)
{
goto IL_0118;
}
}
{
int32_t L_20 = V_1;
G_B32_0 = L_20;
goto IL_0119;
}
IL_0118:
{
G_B32_0 = 1;
}
IL_0119:
{
return G_B32_0;
}
IL_011a:
{
int32_t L_21 = V_1;
return L_21;
}
IL_011c:
{
int32_t L_22 = V_1;
return ((int32_t)((int32_t)L_22<<(int32_t)1));
}
IL_0120:
{
int32_t L_23 = V_1;
return ((int32_t)((int32_t)L_23<<(int32_t)2));
}
IL_0124:
{
Exception_t * L_24 = (Exception_t *)il2cpp_codegen_object_new(Exception_t_il2cpp_TypeInfo_var);
Exception__ctor_m1152696503(L_24, _stringLiteral2000707595, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_24, NULL, PrimalityTests_GetSPPRounds_m2558073743_RuntimeMethod_var);
}
IL_012f:
{
ArgumentOutOfRangeException_t777629997 * L_25 = (ArgumentOutOfRangeException_t777629997 *)il2cpp_codegen_object_new(ArgumentOutOfRangeException_t777629997_il2cpp_TypeInfo_var);
ArgumentOutOfRangeException__ctor_m3628145864(L_25, _stringLiteral3535070725, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_25, NULL, PrimalityTests_GetSPPRounds_m2558073743_RuntimeMethod_var);
}
}
// System.Boolean Mono.Math.Prime.PrimalityTests::RabinMillerTest(Mono.Math.BigInteger,Mono.Math.Prime.ConfidenceFactor)
extern "C" IL2CPP_METHOD_ATTR bool PrimalityTests_RabinMillerTest_m2544317101 (RuntimeObject * __this /* static, unused */, BigInteger_t2902905090 * ___n0, int32_t ___confidence1, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (PrimalityTests_RabinMillerTest_m2544317101_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
int32_t V_0 = 0;
int32_t V_1 = 0;
BigInteger_t2902905090 * V_2 = NULL;
int32_t V_3 = 0;
BigInteger_t2902905090 * V_4 = NULL;
ModulusRing_t596511505 * V_5 = NULL;
BigInteger_t2902905090 * V_6 = NULL;
int32_t V_7 = 0;
BigInteger_t2902905090 * V_8 = NULL;
int32_t V_9 = 0;
{
BigInteger_t2902905090 * L_0 = ___n0;
int32_t L_1 = BigInteger_BitCount_m2055977486(L_0, /*hidden argument*/NULL);
V_0 = L_1;
int32_t L_2 = V_0;
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger_t2902905090 * L_3 = BigInteger_op_Implicit_m2547142909(NULL /*static, unused*/, L_2, /*hidden argument*/NULL);
int32_t L_4 = ___confidence1;
int32_t L_5 = PrimalityTests_GetSPPRounds_m2558073743(NULL /*static, unused*/, L_3, L_4, /*hidden argument*/NULL);
V_1 = L_5;
BigInteger_t2902905090 * L_6 = ___n0;
BigInteger_t2902905090 * L_7 = BigInteger_op_Implicit_m2547142909(NULL /*static, unused*/, 1, /*hidden argument*/NULL);
BigInteger_t2902905090 * L_8 = BigInteger_op_Subtraction_m4245834512(NULL /*static, unused*/, L_6, L_7, /*hidden argument*/NULL);
V_2 = L_8;
BigInteger_t2902905090 * L_9 = V_2;
int32_t L_10 = BigInteger_LowestSetBit_m1199244228(L_9, /*hidden argument*/NULL);
V_3 = L_10;
BigInteger_t2902905090 * L_11 = V_2;
int32_t L_12 = V_3;
BigInteger_t2902905090 * L_13 = BigInteger_op_RightShift_m460065452(NULL /*static, unused*/, L_11, L_12, /*hidden argument*/NULL);
V_4 = L_13;
BigInteger_t2902905090 * L_14 = ___n0;
ModulusRing_t596511505 * L_15 = (ModulusRing_t596511505 *)il2cpp_codegen_object_new(ModulusRing_t596511505_il2cpp_TypeInfo_var);
ModulusRing__ctor_m2420310199(L_15, L_14, /*hidden argument*/NULL);
V_5 = L_15;
V_6 = (BigInteger_t2902905090 *)NULL;
BigInteger_t2902905090 * L_16 = ___n0;
int32_t L_17 = BigInteger_BitCount_m2055977486(L_16, /*hidden argument*/NULL);
if ((((int32_t)L_17) <= ((int32_t)((int32_t)100))))
{
goto IL_0055;
}
}
{
ModulusRing_t596511505 * L_18 = V_5;
BigInteger_t2902905090 * L_19 = V_4;
BigInteger_t2902905090 * L_20 = ModulusRing_Pow_m729002192(L_18, 2, L_19, /*hidden argument*/NULL);
V_6 = L_20;
}
IL_0055:
{
V_7 = 0;
goto IL_0113;
}
IL_005d:
{
int32_t L_21 = V_7;
if ((((int32_t)L_21) > ((int32_t)0)))
{
goto IL_0072;
}
}
{
BigInteger_t2902905090 * L_22 = V_6;
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
bool L_23 = BigInteger_op_Equality_m1194739960(NULL /*static, unused*/, L_22, (BigInteger_t2902905090 *)NULL, /*hidden argument*/NULL);
if (!L_23)
{
goto IL_00a9;
}
}
IL_0072:
{
V_8 = (BigInteger_t2902905090 *)NULL;
}
IL_0075:
{
int32_t L_24 = V_0;
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger_t2902905090 * L_25 = BigInteger_GenerateRandom_m1790382084(NULL /*static, unused*/, L_24, /*hidden argument*/NULL);
V_8 = L_25;
BigInteger_t2902905090 * L_26 = V_8;
BigInteger_t2902905090 * L_27 = BigInteger_op_Implicit_m2547142909(NULL /*static, unused*/, 2, /*hidden argument*/NULL);
bool L_28 = BigInteger_op_LessThanOrEqual_m3925173639(NULL /*static, unused*/, L_26, L_27, /*hidden argument*/NULL);
if (!L_28)
{
goto IL_009c;
}
}
{
BigInteger_t2902905090 * L_29 = V_8;
BigInteger_t2902905090 * L_30 = V_2;
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
bool L_31 = BigInteger_op_GreaterThanOrEqual_m3313329514(NULL /*static, unused*/, L_29, L_30, /*hidden argument*/NULL);
if (L_31)
{
goto IL_0075;
}
}
IL_009c:
{
ModulusRing_t596511505 * L_32 = V_5;
BigInteger_t2902905090 * L_33 = V_8;
BigInteger_t2902905090 * L_34 = V_4;
BigInteger_t2902905090 * L_35 = ModulusRing_Pow_m1124248336(L_32, L_33, L_34, /*hidden argument*/NULL);
V_6 = L_35;
}
IL_00a9:
{
BigInteger_t2902905090 * L_36 = V_6;
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
bool L_37 = BigInteger_op_Equality_m3872814973(NULL /*static, unused*/, L_36, 1, /*hidden argument*/NULL);
if (!L_37)
{
goto IL_00bb;
}
}
{
goto IL_010d;
}
IL_00bb:
{
V_9 = 0;
goto IL_00e9;
}
IL_00c3:
{
ModulusRing_t596511505 * L_38 = V_5;
BigInteger_t2902905090 * L_39 = V_6;
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger_t2902905090 * L_40 = BigInteger_op_Implicit_m2547142909(NULL /*static, unused*/, 2, /*hidden argument*/NULL);
BigInteger_t2902905090 * L_41 = ModulusRing_Pow_m1124248336(L_38, L_39, L_40, /*hidden argument*/NULL);
V_6 = L_41;
BigInteger_t2902905090 * L_42 = V_6;
bool L_43 = BigInteger_op_Equality_m3872814973(NULL /*static, unused*/, L_42, 1, /*hidden argument*/NULL);
if (!L_43)
{
goto IL_00e3;
}
}
{
return (bool)0;
}
IL_00e3:
{
int32_t L_44 = V_9;
V_9 = ((int32_t)il2cpp_codegen_add((int32_t)L_44, (int32_t)1));
}
IL_00e9:
{
int32_t L_45 = V_9;
int32_t L_46 = V_3;
if ((((int32_t)L_45) >= ((int32_t)L_46)))
{
goto IL_00fe;
}
}
{
BigInteger_t2902905090 * L_47 = V_6;
BigInteger_t2902905090 * L_48 = V_2;
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
bool L_49 = BigInteger_op_Inequality_m2697143438(NULL /*static, unused*/, L_47, L_48, /*hidden argument*/NULL);
if (L_49)
{
goto IL_00c3;
}
}
IL_00fe:
{
BigInteger_t2902905090 * L_50 = V_6;
BigInteger_t2902905090 * L_51 = V_2;
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
bool L_52 = BigInteger_op_Inequality_m2697143438(NULL /*static, unused*/, L_50, L_51, /*hidden argument*/NULL);
if (!L_52)
{
goto IL_010d;
}
}
{
return (bool)0;
}
IL_010d:
{
int32_t L_53 = V_7;
V_7 = ((int32_t)il2cpp_codegen_add((int32_t)L_53, (int32_t)1));
}
IL_0113:
{
int32_t L_54 = V_7;
int32_t L_55 = V_1;
if ((((int32_t)L_54) < ((int32_t)L_55)))
{
goto IL_005d;
}
}
{
return (bool)1;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void Mono.Security.ASN1::.ctor(System.Byte)
extern "C" IL2CPP_METHOD_ATTR void ASN1__ctor_m1239252869 (ASN1_t2114160833 * __this, uint8_t ___tag0, const RuntimeMethod* method)
{
{
uint8_t L_0 = ___tag0;
ASN1__ctor_m682794872(__this, L_0, (ByteU5BU5D_t4116647657*)(ByteU5BU5D_t4116647657*)NULL, /*hidden argument*/NULL);
return;
}
}
// System.Void Mono.Security.ASN1::.ctor(System.Byte,System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void ASN1__ctor_m682794872 (ASN1_t2114160833 * __this, uint8_t ___tag0, ByteU5BU5D_t4116647657* ___data1, const RuntimeMethod* method)
{
{
Object__ctor_m297566312(__this, /*hidden argument*/NULL);
uint8_t L_0 = ___tag0;
__this->set_m_nTag_0(L_0);
ByteU5BU5D_t4116647657* L_1 = ___data1;
__this->set_m_aValue_1(L_1);
return;
}
}
// System.Void Mono.Security.ASN1::.ctor(System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void ASN1__ctor_m1638893325 (ASN1_t2114160833 * __this, ByteU5BU5D_t4116647657* ___data0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (ASN1__ctor_m1638893325_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
int32_t V_0 = 0;
int32_t V_1 = 0;
int32_t V_2 = 0;
int32_t V_3 = 0;
{
Object__ctor_m297566312(__this, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_0 = ___data0;
int32_t L_1 = 0;
uint8_t L_2 = (L_0)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_1));
__this->set_m_nTag_0(L_2);
V_0 = 0;
ByteU5BU5D_t4116647657* L_3 = ___data0;
int32_t L_4 = 1;
uint8_t L_5 = (L_3)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_4));
V_1 = L_5;
int32_t L_6 = V_1;
if ((((int32_t)L_6) <= ((int32_t)((int32_t)128))))
{
goto IL_0051;
}
}
{
int32_t L_7 = V_1;
V_0 = ((int32_t)il2cpp_codegen_subtract((int32_t)L_7, (int32_t)((int32_t)128)));
V_1 = 0;
V_2 = 0;
goto IL_0045;
}
IL_0031:
{
int32_t L_8 = V_1;
V_1 = ((int32_t)il2cpp_codegen_multiply((int32_t)L_8, (int32_t)((int32_t)256)));
int32_t L_9 = V_1;
ByteU5BU5D_t4116647657* L_10 = ___data0;
int32_t L_11 = V_2;
int32_t L_12 = ((int32_t)il2cpp_codegen_add((int32_t)L_11, (int32_t)2));
uint8_t L_13 = (L_10)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_12));
V_1 = ((int32_t)il2cpp_codegen_add((int32_t)L_9, (int32_t)L_13));
int32_t L_14 = V_2;
V_2 = ((int32_t)il2cpp_codegen_add((int32_t)L_14, (int32_t)1));
}
IL_0045:
{
int32_t L_15 = V_2;
int32_t L_16 = V_0;
if ((((int32_t)L_15) < ((int32_t)L_16)))
{
goto IL_0031;
}
}
{
goto IL_0067;
}
IL_0051:
{
int32_t L_17 = V_1;
if ((!(((uint32_t)L_17) == ((uint32_t)((int32_t)128)))))
{
goto IL_0067;
}
}
{
NotSupportedException_t1314879016 * L_18 = (NotSupportedException_t1314879016 *)il2cpp_codegen_object_new(NotSupportedException_t1314879016_il2cpp_TypeInfo_var);
NotSupportedException__ctor_m2494070935(L_18, _stringLiteral2861664389, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_18, NULL, ASN1__ctor_m1638893325_RuntimeMethod_var);
}
IL_0067:
{
int32_t L_19 = V_1;
ByteU5BU5D_t4116647657* L_20 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)L_19);
__this->set_m_aValue_1(L_20);
ByteU5BU5D_t4116647657* L_21 = ___data0;
int32_t L_22 = V_0;
ByteU5BU5D_t4116647657* L_23 = __this->get_m_aValue_1();
int32_t L_24 = V_1;
Buffer_BlockCopy_m2884209081(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_21, ((int32_t)il2cpp_codegen_add((int32_t)2, (int32_t)L_22)), (RuntimeArray *)(RuntimeArray *)L_23, 0, L_24, /*hidden argument*/NULL);
uint8_t L_25 = __this->get_m_nTag_0();
if ((!(((uint32_t)((int32_t)((int32_t)L_25&(int32_t)((int32_t)32)))) == ((uint32_t)((int32_t)32)))))
{
goto IL_00a4;
}
}
{
int32_t L_26 = V_0;
V_3 = ((int32_t)il2cpp_codegen_add((int32_t)2, (int32_t)L_26));
ByteU5BU5D_t4116647657* L_27 = ___data0;
ByteU5BU5D_t4116647657* L_28 = ___data0;
ASN1_Decode_m1245286596(__this, L_27, (int32_t*)(&V_3), (((int32_t)((int32_t)(((RuntimeArray *)L_28)->max_length)))), /*hidden argument*/NULL);
}
IL_00a4:
{
return;
}
}
// System.Int32 Mono.Security.ASN1::get_Count()
extern "C" IL2CPP_METHOD_ATTR int32_t ASN1_get_Count_m1789520042 (ASN1_t2114160833 * __this, const RuntimeMethod* method)
{
{
ArrayList_t2718874744 * L_0 = __this->get_elist_2();
if (L_0)
{
goto IL_000d;
}
}
{
return 0;
}
IL_000d:
{
ArrayList_t2718874744 * L_1 = __this->get_elist_2();
int32_t L_2 = VirtFuncInvoker0< int32_t >::Invoke(23 /* System.Int32 System.Collections.ArrayList::get_Count() */, L_1);
return L_2;
}
}
// System.Byte Mono.Security.ASN1::get_Tag()
extern "C" IL2CPP_METHOD_ATTR uint8_t ASN1_get_Tag_m2789147236 (ASN1_t2114160833 * __this, const RuntimeMethod* method)
{
{
uint8_t L_0 = __this->get_m_nTag_0();
return L_0;
}
}
// System.Int32 Mono.Security.ASN1::get_Length()
extern "C" IL2CPP_METHOD_ATTR int32_t ASN1_get_Length_m3269728307 (ASN1_t2114160833 * __this, const RuntimeMethod* method)
{
{
ByteU5BU5D_t4116647657* L_0 = __this->get_m_aValue_1();
if (!L_0)
{
goto IL_0014;
}
}
{
ByteU5BU5D_t4116647657* L_1 = __this->get_m_aValue_1();
return (((int32_t)((int32_t)(((RuntimeArray *)L_1)->max_length))));
}
IL_0014:
{
return 0;
}
}
// System.Byte[] Mono.Security.ASN1::get_Value()
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* ASN1_get_Value_m63296490 (ASN1_t2114160833 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (ASN1_get_Value_m63296490_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
ByteU5BU5D_t4116647657* L_0 = __this->get_m_aValue_1();
if (L_0)
{
goto IL_0012;
}
}
{
VirtFuncInvoker0< ByteU5BU5D_t4116647657* >::Invoke(4 /* System.Byte[] Mono.Security.ASN1::GetBytes() */, __this);
}
IL_0012:
{
ByteU5BU5D_t4116647657* L_1 = __this->get_m_aValue_1();
RuntimeObject * L_2 = Array_Clone_m2672907798((RuntimeArray *)(RuntimeArray *)L_1, /*hidden argument*/NULL);
return ((ByteU5BU5D_t4116647657*)Castclass((RuntimeObject*)L_2, ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var));
}
}
// System.Void Mono.Security.ASN1::set_Value(System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void ASN1_set_Value_m647861841 (ASN1_t2114160833 * __this, ByteU5BU5D_t4116647657* ___value0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (ASN1_set_Value_m647861841_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
ByteU5BU5D_t4116647657* L_0 = ___value0;
if (!L_0)
{
goto IL_0017;
}
}
{
ByteU5BU5D_t4116647657* L_1 = ___value0;
RuntimeObject * L_2 = Array_Clone_m2672907798((RuntimeArray *)(RuntimeArray *)L_1, /*hidden argument*/NULL);
__this->set_m_aValue_1(((ByteU5BU5D_t4116647657*)Castclass((RuntimeObject*)L_2, ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var)));
}
IL_0017:
{
return;
}
}
// System.Boolean Mono.Security.ASN1::CompareArray(System.Byte[],System.Byte[])
extern "C" IL2CPP_METHOD_ATTR bool ASN1_CompareArray_m3928975006 (ASN1_t2114160833 * __this, ByteU5BU5D_t4116647657* ___array10, ByteU5BU5D_t4116647657* ___array21, const RuntimeMethod* method)
{
bool V_0 = false;
int32_t V_1 = 0;
{
ByteU5BU5D_t4116647657* L_0 = ___array10;
ByteU5BU5D_t4116647657* L_1 = ___array21;
V_0 = (bool)((((int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_0)->max_length))))) == ((int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_1)->max_length))))))? 1 : 0);
bool L_2 = V_0;
if (!L_2)
{
goto IL_0030;
}
}
{
V_1 = 0;
goto IL_0027;
}
IL_0016:
{
ByteU5BU5D_t4116647657* L_3 = ___array10;
int32_t L_4 = V_1;
int32_t L_5 = L_4;
uint8_t L_6 = (L_3)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_5));
ByteU5BU5D_t4116647657* L_7 = ___array21;
int32_t L_8 = V_1;
int32_t L_9 = L_8;
uint8_t L_10 = (L_7)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_9));
if ((((int32_t)L_6) == ((int32_t)L_10)))
{
goto IL_0023;
}
}
{
return (bool)0;
}
IL_0023:
{
int32_t L_11 = V_1;
V_1 = ((int32_t)il2cpp_codegen_add((int32_t)L_11, (int32_t)1));
}
IL_0027:
{
int32_t L_12 = V_1;
ByteU5BU5D_t4116647657* L_13 = ___array10;
if ((((int32_t)L_12) < ((int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_13)->max_length)))))))
{
goto IL_0016;
}
}
IL_0030:
{
bool L_14 = V_0;
return L_14;
}
}
// System.Boolean Mono.Security.ASN1::CompareValue(System.Byte[])
extern "C" IL2CPP_METHOD_ATTR bool ASN1_CompareValue_m1642100296 (ASN1_t2114160833 * __this, ByteU5BU5D_t4116647657* ___value0, const RuntimeMethod* method)
{
{
ByteU5BU5D_t4116647657* L_0 = __this->get_m_aValue_1();
ByteU5BU5D_t4116647657* L_1 = ___value0;
bool L_2 = ASN1_CompareArray_m3928975006(__this, L_0, L_1, /*hidden argument*/NULL);
return L_2;
}
}
// Mono.Security.ASN1 Mono.Security.ASN1::Add(Mono.Security.ASN1)
extern "C" IL2CPP_METHOD_ATTR ASN1_t2114160833 * ASN1_Add_m2431139999 (ASN1_t2114160833 * __this, ASN1_t2114160833 * ___asn10, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (ASN1_Add_m2431139999_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
ASN1_t2114160833 * L_0 = ___asn10;
if (!L_0)
{
goto IL_0029;
}
}
{
ArrayList_t2718874744 * L_1 = __this->get_elist_2();
if (L_1)
{
goto IL_001c;
}
}
{
ArrayList_t2718874744 * L_2 = (ArrayList_t2718874744 *)il2cpp_codegen_object_new(ArrayList_t2718874744_il2cpp_TypeInfo_var);
ArrayList__ctor_m4254721275(L_2, /*hidden argument*/NULL);
__this->set_elist_2(L_2);
}
IL_001c:
{
ArrayList_t2718874744 * L_3 = __this->get_elist_2();
ASN1_t2114160833 * L_4 = ___asn10;
VirtFuncInvoker1< int32_t, RuntimeObject * >::Invoke(30 /* System.Int32 System.Collections.ArrayList::Add(System.Object) */, L_3, L_4);
}
IL_0029:
{
ASN1_t2114160833 * L_5 = ___asn10;
return L_5;
}
}
// System.Byte[] Mono.Security.ASN1::GetBytes()
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* ASN1_GetBytes_m1968380955 (ASN1_t2114160833 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (ASN1_GetBytes_m1968380955_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
ByteU5BU5D_t4116647657* V_0 = NULL;
int32_t V_1 = 0;
ArrayList_t2718874744 * V_2 = NULL;
ASN1_t2114160833 * V_3 = NULL;
RuntimeObject* V_4 = NULL;
ByteU5BU5D_t4116647657* V_5 = NULL;
int32_t V_6 = 0;
int32_t V_7 = 0;
ByteU5BU5D_t4116647657* V_8 = NULL;
ByteU5BU5D_t4116647657* V_9 = NULL;
int32_t V_10 = 0;
int32_t V_11 = 0;
RuntimeObject* V_12 = NULL;
Exception_t * __last_unhandled_exception = 0;
NO_UNUSED_WARNING (__last_unhandled_exception);
Exception_t * __exception_local = 0;
NO_UNUSED_WARNING (__exception_local);
int32_t __leave_target = -1;
NO_UNUSED_WARNING (__leave_target);
{
V_0 = (ByteU5BU5D_t4116647657*)NULL;
int32_t L_0 = ASN1_get_Count_m1789520042(__this, /*hidden argument*/NULL);
if ((((int32_t)L_0) <= ((int32_t)0)))
{
goto IL_00ca;
}
}
{
V_1 = 0;
ArrayList_t2718874744 * L_1 = (ArrayList_t2718874744 *)il2cpp_codegen_object_new(ArrayList_t2718874744_il2cpp_TypeInfo_var);
ArrayList__ctor_m4254721275(L_1, /*hidden argument*/NULL);
V_2 = L_1;
ArrayList_t2718874744 * L_2 = __this->get_elist_2();
RuntimeObject* L_3 = VirtFuncInvoker0< RuntimeObject* >::Invoke(43 /* System.Collections.IEnumerator System.Collections.ArrayList::GetEnumerator() */, L_2);
V_4 = L_3;
}
IL_0023:
try
{ // begin try (depth: 1)
{
goto IL_004d;
}
IL_0028:
{
RuntimeObject* L_4 = V_4;
RuntimeObject * L_5 = InterfaceFuncInvoker0< RuntimeObject * >::Invoke(0 /* System.Object System.Collections.IEnumerator::get_Current() */, IEnumerator_t1853284238_il2cpp_TypeInfo_var, L_4);
V_3 = ((ASN1_t2114160833 *)CastclassClass((RuntimeObject*)L_5, ASN1_t2114160833_il2cpp_TypeInfo_var));
ASN1_t2114160833 * L_6 = V_3;
ByteU5BU5D_t4116647657* L_7 = VirtFuncInvoker0< ByteU5BU5D_t4116647657* >::Invoke(4 /* System.Byte[] Mono.Security.ASN1::GetBytes() */, L_6);
V_5 = L_7;
ArrayList_t2718874744 * L_8 = V_2;
ByteU5BU5D_t4116647657* L_9 = V_5;
VirtFuncInvoker1< int32_t, RuntimeObject * >::Invoke(30 /* System.Int32 System.Collections.ArrayList::Add(System.Object) */, L_8, (RuntimeObject *)(RuntimeObject *)L_9);
int32_t L_10 = V_1;
ByteU5BU5D_t4116647657* L_11 = V_5;
V_1 = ((int32_t)il2cpp_codegen_add((int32_t)L_10, (int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_11)->max_length))))));
}
IL_004d:
{
RuntimeObject* L_12 = V_4;
bool L_13 = InterfaceFuncInvoker0< bool >::Invoke(1 /* System.Boolean System.Collections.IEnumerator::MoveNext() */, IEnumerator_t1853284238_il2cpp_TypeInfo_var, L_12);
if (L_13)
{
goto IL_0028;
}
}
IL_0059:
{
IL2CPP_LEAVE(0x74, FINALLY_005e);
}
} // end try (depth: 1)
catch(Il2CppExceptionWrapper& e)
{
__last_unhandled_exception = (Exception_t *)e.ex;
goto FINALLY_005e;
}
FINALLY_005e:
{ // begin finally (depth: 1)
{
RuntimeObject* L_14 = V_4;
V_12 = ((RuntimeObject*)IsInst((RuntimeObject*)L_14, IDisposable_t3640265483_il2cpp_TypeInfo_var));
RuntimeObject* L_15 = V_12;
if (L_15)
{
goto IL_006c;
}
}
IL_006b:
{
IL2CPP_END_FINALLY(94)
}
IL_006c:
{
RuntimeObject* L_16 = V_12;
InterfaceActionInvoker0::Invoke(0 /* System.Void System.IDisposable::Dispose() */, IDisposable_t3640265483_il2cpp_TypeInfo_var, L_16);
IL2CPP_END_FINALLY(94)
}
} // end finally (depth: 1)
IL2CPP_CLEANUP(94)
{
IL2CPP_JUMP_TBL(0x74, IL_0074)
IL2CPP_RETHROW_IF_UNHANDLED(Exception_t *)
}
IL_0074:
{
int32_t L_17 = V_1;
ByteU5BU5D_t4116647657* L_18 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)L_17);
V_0 = L_18;
V_6 = 0;
V_7 = 0;
goto IL_00b3;
}
IL_0086:
{
ArrayList_t2718874744 * L_19 = V_2;
int32_t L_20 = V_7;
RuntimeObject * L_21 = VirtFuncInvoker1< RuntimeObject *, int32_t >::Invoke(21 /* System.Object System.Collections.ArrayList::get_Item(System.Int32) */, L_19, L_20);
V_8 = ((ByteU5BU5D_t4116647657*)Castclass((RuntimeObject*)L_21, ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var));
ByteU5BU5D_t4116647657* L_22 = V_8;
ByteU5BU5D_t4116647657* L_23 = V_0;
int32_t L_24 = V_6;
ByteU5BU5D_t4116647657* L_25 = V_8;
Buffer_BlockCopy_m2884209081(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_22, 0, (RuntimeArray *)(RuntimeArray *)L_23, L_24, (((int32_t)((int32_t)(((RuntimeArray *)L_25)->max_length)))), /*hidden argument*/NULL);
int32_t L_26 = V_6;
ByteU5BU5D_t4116647657* L_27 = V_8;
V_6 = ((int32_t)il2cpp_codegen_add((int32_t)L_26, (int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_27)->max_length))))));
int32_t L_28 = V_7;
V_7 = ((int32_t)il2cpp_codegen_add((int32_t)L_28, (int32_t)1));
}
IL_00b3:
{
int32_t L_29 = V_7;
ArrayList_t2718874744 * L_30 = __this->get_elist_2();
int32_t L_31 = VirtFuncInvoker0< int32_t >::Invoke(23 /* System.Int32 System.Collections.ArrayList::get_Count() */, L_30);
if ((((int32_t)L_29) < ((int32_t)L_31)))
{
goto IL_0086;
}
}
{
goto IL_00dc;
}
IL_00ca:
{
ByteU5BU5D_t4116647657* L_32 = __this->get_m_aValue_1();
if (!L_32)
{
goto IL_00dc;
}
}
{
ByteU5BU5D_t4116647657* L_33 = __this->get_m_aValue_1();
V_0 = L_33;
}
IL_00dc:
{
V_10 = 0;
ByteU5BU5D_t4116647657* L_34 = V_0;
if (!L_34)
{
goto IL_022a;
}
}
{
ByteU5BU5D_t4116647657* L_35 = V_0;
V_11 = (((int32_t)((int32_t)(((RuntimeArray *)L_35)->max_length))));
int32_t L_36 = V_11;
if ((((int32_t)L_36) <= ((int32_t)((int32_t)127))))
{
goto IL_01f8;
}
}
{
int32_t L_37 = V_11;
if ((((int32_t)L_37) > ((int32_t)((int32_t)255))))
{
goto IL_0129;
}
}
{
int32_t L_38 = V_11;
ByteU5BU5D_t4116647657* L_39 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)((int32_t)il2cpp_codegen_add((int32_t)3, (int32_t)L_38)));
V_9 = L_39;
ByteU5BU5D_t4116647657* L_40 = V_0;
ByteU5BU5D_t4116647657* L_41 = V_9;
int32_t L_42 = V_11;
Buffer_BlockCopy_m2884209081(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_40, 0, (RuntimeArray *)(RuntimeArray *)L_41, 3, L_42, /*hidden argument*/NULL);
V_10 = ((int32_t)129);
ByteU5BU5D_t4116647657* L_43 = V_9;
int32_t L_44 = V_11;
(L_43)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(2), (uint8_t)(((int32_t)((uint8_t)L_44))));
goto IL_01f3;
}
IL_0129:
{
int32_t L_45 = V_11;
if ((((int32_t)L_45) > ((int32_t)((int32_t)65535))))
{
goto IL_0168;
}
}
{
int32_t L_46 = V_11;
ByteU5BU5D_t4116647657* L_47 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)((int32_t)il2cpp_codegen_add((int32_t)4, (int32_t)L_46)));
V_9 = L_47;
ByteU5BU5D_t4116647657* L_48 = V_0;
ByteU5BU5D_t4116647657* L_49 = V_9;
int32_t L_50 = V_11;
Buffer_BlockCopy_m2884209081(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_48, 0, (RuntimeArray *)(RuntimeArray *)L_49, 4, L_50, /*hidden argument*/NULL);
V_10 = ((int32_t)130);
ByteU5BU5D_t4116647657* L_51 = V_9;
int32_t L_52 = V_11;
(L_51)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(2), (uint8_t)(((int32_t)((uint8_t)((int32_t)((int32_t)L_52>>(int32_t)8))))));
ByteU5BU5D_t4116647657* L_53 = V_9;
int32_t L_54 = V_11;
(L_53)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(3), (uint8_t)(((int32_t)((uint8_t)L_54))));
goto IL_01f3;
}
IL_0168:
{
int32_t L_55 = V_11;
if ((((int32_t)L_55) > ((int32_t)((int32_t)16777215))))
{
goto IL_01b1;
}
}
{
int32_t L_56 = V_11;
ByteU5BU5D_t4116647657* L_57 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)((int32_t)il2cpp_codegen_add((int32_t)5, (int32_t)L_56)));
V_9 = L_57;
ByteU5BU5D_t4116647657* L_58 = V_0;
ByteU5BU5D_t4116647657* L_59 = V_9;
int32_t L_60 = V_11;
Buffer_BlockCopy_m2884209081(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_58, 0, (RuntimeArray *)(RuntimeArray *)L_59, 5, L_60, /*hidden argument*/NULL);
V_10 = ((int32_t)131);
ByteU5BU5D_t4116647657* L_61 = V_9;
int32_t L_62 = V_11;
(L_61)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(2), (uint8_t)(((int32_t)((uint8_t)((int32_t)((int32_t)L_62>>(int32_t)((int32_t)16)))))));
ByteU5BU5D_t4116647657* L_63 = V_9;
int32_t L_64 = V_11;
(L_63)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(3), (uint8_t)(((int32_t)((uint8_t)((int32_t)((int32_t)L_64>>(int32_t)8))))));
ByteU5BU5D_t4116647657* L_65 = V_9;
int32_t L_66 = V_11;
(L_65)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(4), (uint8_t)(((int32_t)((uint8_t)L_66))));
goto IL_01f3;
}
IL_01b1:
{
int32_t L_67 = V_11;
ByteU5BU5D_t4116647657* L_68 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)((int32_t)il2cpp_codegen_add((int32_t)6, (int32_t)L_67)));
V_9 = L_68;
ByteU5BU5D_t4116647657* L_69 = V_0;
ByteU5BU5D_t4116647657* L_70 = V_9;
int32_t L_71 = V_11;
Buffer_BlockCopy_m2884209081(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_69, 0, (RuntimeArray *)(RuntimeArray *)L_70, 6, L_71, /*hidden argument*/NULL);
V_10 = ((int32_t)132);
ByteU5BU5D_t4116647657* L_72 = V_9;
int32_t L_73 = V_11;
(L_72)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(2), (uint8_t)(((int32_t)((uint8_t)((int32_t)((int32_t)L_73>>(int32_t)((int32_t)24)))))));
ByteU5BU5D_t4116647657* L_74 = V_9;
int32_t L_75 = V_11;
(L_74)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(3), (uint8_t)(((int32_t)((uint8_t)((int32_t)((int32_t)L_75>>(int32_t)((int32_t)16)))))));
ByteU5BU5D_t4116647657* L_76 = V_9;
int32_t L_77 = V_11;
(L_76)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(4), (uint8_t)(((int32_t)((uint8_t)((int32_t)((int32_t)L_77>>(int32_t)8))))));
ByteU5BU5D_t4116647657* L_78 = V_9;
int32_t L_79 = V_11;
(L_78)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(5), (uint8_t)(((int32_t)((uint8_t)L_79))));
}
IL_01f3:
{
goto IL_0213;
}
IL_01f8:
{
int32_t L_80 = V_11;
ByteU5BU5D_t4116647657* L_81 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)((int32_t)il2cpp_codegen_add((int32_t)2, (int32_t)L_80)));
V_9 = L_81;
ByteU5BU5D_t4116647657* L_82 = V_0;
ByteU5BU5D_t4116647657* L_83 = V_9;
int32_t L_84 = V_11;
Buffer_BlockCopy_m2884209081(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_82, 0, (RuntimeArray *)(RuntimeArray *)L_83, 2, L_84, /*hidden argument*/NULL);
int32_t L_85 = V_11;
V_10 = L_85;
}
IL_0213:
{
ByteU5BU5D_t4116647657* L_86 = __this->get_m_aValue_1();
if (L_86)
{
goto IL_0225;
}
}
{
ByteU5BU5D_t4116647657* L_87 = V_0;
__this->set_m_aValue_1(L_87);
}
IL_0225:
{
goto IL_0232;
}
IL_022a:
{
ByteU5BU5D_t4116647657* L_88 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)2);
V_9 = L_88;
}
IL_0232:
{
ByteU5BU5D_t4116647657* L_89 = V_9;
uint8_t L_90 = __this->get_m_nTag_0();
(L_89)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(0), (uint8_t)L_90);
ByteU5BU5D_t4116647657* L_91 = V_9;
int32_t L_92 = V_10;
(L_91)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(1), (uint8_t)(((int32_t)((uint8_t)L_92))));
ByteU5BU5D_t4116647657* L_93 = V_9;
return L_93;
}
}
// System.Void Mono.Security.ASN1::Decode(System.Byte[],System.Int32&,System.Int32)
extern "C" IL2CPP_METHOD_ATTR void ASN1_Decode_m1245286596 (ASN1_t2114160833 * __this, ByteU5BU5D_t4116647657* ___asn10, int32_t* ___anPos1, int32_t ___anLength2, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (ASN1_Decode_m1245286596_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
uint8_t V_0 = 0x0;
int32_t V_1 = 0;
ByteU5BU5D_t4116647657* V_2 = NULL;
ASN1_t2114160833 * V_3 = NULL;
int32_t V_4 = 0;
{
goto IL_004e;
}
IL_0005:
{
ByteU5BU5D_t4116647657* L_0 = ___asn10;
int32_t* L_1 = ___anPos1;
ASN1_DecodeTLV_m3927350254(__this, L_0, (int32_t*)L_1, (uint8_t*)(&V_0), (int32_t*)(&V_1), (ByteU5BU5D_t4116647657**)(&V_2), /*hidden argument*/NULL);
uint8_t L_2 = V_0;
if (L_2)
{
goto IL_001e;
}
}
{
goto IL_004e;
}
IL_001e:
{
uint8_t L_3 = V_0;
ByteU5BU5D_t4116647657* L_4 = V_2;
ASN1_t2114160833 * L_5 = (ASN1_t2114160833 *)il2cpp_codegen_object_new(ASN1_t2114160833_il2cpp_TypeInfo_var);
ASN1__ctor_m682794872(L_5, L_3, L_4, /*hidden argument*/NULL);
ASN1_t2114160833 * L_6 = ASN1_Add_m2431139999(__this, L_5, /*hidden argument*/NULL);
V_3 = L_6;
uint8_t L_7 = V_0;
if ((!(((uint32_t)((int32_t)((int32_t)L_7&(int32_t)((int32_t)32)))) == ((uint32_t)((int32_t)32)))))
{
goto IL_0048;
}
}
{
int32_t* L_8 = ___anPos1;
V_4 = (*((int32_t*)L_8));
ASN1_t2114160833 * L_9 = V_3;
ByteU5BU5D_t4116647657* L_10 = ___asn10;
int32_t L_11 = V_4;
int32_t L_12 = V_1;
ASN1_Decode_m1245286596(L_9, L_10, (int32_t*)(&V_4), ((int32_t)il2cpp_codegen_add((int32_t)L_11, (int32_t)L_12)), /*hidden argument*/NULL);
}
IL_0048:
{
int32_t* L_13 = ___anPos1;
int32_t* L_14 = ___anPos1;
int32_t L_15 = V_1;
*((int32_t*)(L_13)) = (int32_t)((int32_t)il2cpp_codegen_add((int32_t)(*((int32_t*)L_14)), (int32_t)L_15));
}
IL_004e:
{
int32_t* L_16 = ___anPos1;
int32_t L_17 = ___anLength2;
if ((((int32_t)(*((int32_t*)L_16))) < ((int32_t)((int32_t)il2cpp_codegen_subtract((int32_t)L_17, (int32_t)1)))))
{
goto IL_0005;
}
}
{
return;
}
}
// System.Void Mono.Security.ASN1::DecodeTLV(System.Byte[],System.Int32&,System.Byte&,System.Int32&,System.Byte[]&)
extern "C" IL2CPP_METHOD_ATTR void ASN1_DecodeTLV_m3927350254 (ASN1_t2114160833 * __this, ByteU5BU5D_t4116647657* ___asn10, int32_t* ___pos1, uint8_t* ___tag2, int32_t* ___length3, ByteU5BU5D_t4116647657** ___content4, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (ASN1_DecodeTLV_m3927350254_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
int32_t V_0 = 0;
int32_t V_1 = 0;
int32_t V_2 = 0;
{
uint8_t* L_0 = ___tag2;
ByteU5BU5D_t4116647657* L_1 = ___asn10;
int32_t* L_2 = ___pos1;
int32_t* L_3 = ___pos1;
int32_t L_4 = (*((int32_t*)L_3));
V_2 = L_4;
*((int32_t*)(L_2)) = (int32_t)((int32_t)il2cpp_codegen_add((int32_t)L_4, (int32_t)1));
int32_t L_5 = V_2;
int32_t L_6 = L_5;
uint8_t L_7 = (L_1)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_6));
*((int8_t*)(L_0)) = (int8_t)L_7;
int32_t* L_8 = ___length3;
ByteU5BU5D_t4116647657* L_9 = ___asn10;
int32_t* L_10 = ___pos1;
int32_t* L_11 = ___pos1;
int32_t L_12 = (*((int32_t*)L_11));
V_2 = L_12;
*((int32_t*)(L_10)) = (int32_t)((int32_t)il2cpp_codegen_add((int32_t)L_12, (int32_t)1));
int32_t L_13 = V_2;
int32_t L_14 = L_13;
uint8_t L_15 = (L_9)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_14));
*((int32_t*)(L_8)) = (int32_t)L_15;
int32_t* L_16 = ___length3;
if ((!(((uint32_t)((int32_t)((int32_t)(*((int32_t*)L_16))&(int32_t)((int32_t)128)))) == ((uint32_t)((int32_t)128)))))
{
goto IL_0063;
}
}
{
int32_t* L_17 = ___length3;
V_0 = ((int32_t)((int32_t)(*((int32_t*)L_17))&(int32_t)((int32_t)127)));
int32_t* L_18 = ___length3;
*((int32_t*)(L_18)) = (int32_t)0;
V_1 = 0;
goto IL_005c;
}
IL_0040:
{
int32_t* L_19 = ___length3;
int32_t* L_20 = ___length3;
ByteU5BU5D_t4116647657* L_21 = ___asn10;
int32_t* L_22 = ___pos1;
int32_t* L_23 = ___pos1;
int32_t L_24 = (*((int32_t*)L_23));
V_2 = L_24;
*((int32_t*)(L_22)) = (int32_t)((int32_t)il2cpp_codegen_add((int32_t)L_24, (int32_t)1));
int32_t L_25 = V_2;
int32_t L_26 = L_25;
uint8_t L_27 = (L_21)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_26));
*((int32_t*)(L_19)) = (int32_t)((int32_t)il2cpp_codegen_add((int32_t)((int32_t)il2cpp_codegen_multiply((int32_t)(*((int32_t*)L_20)), (int32_t)((int32_t)256))), (int32_t)L_27));
int32_t L_28 = V_1;
V_1 = ((int32_t)il2cpp_codegen_add((int32_t)L_28, (int32_t)1));
}
IL_005c:
{
int32_t L_29 = V_1;
int32_t L_30 = V_0;
if ((((int32_t)L_29) < ((int32_t)L_30)))
{
goto IL_0040;
}
}
IL_0063:
{
ByteU5BU5D_t4116647657** L_31 = ___content4;
int32_t* L_32 = ___length3;
ByteU5BU5D_t4116647657* L_33 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)(*((int32_t*)L_32)));
*((RuntimeObject **)(L_31)) = (RuntimeObject *)L_33;
Il2CppCodeGenWriteBarrier((RuntimeObject **)(L_31), (RuntimeObject *)L_33);
ByteU5BU5D_t4116647657* L_34 = ___asn10;
int32_t* L_35 = ___pos1;
ByteU5BU5D_t4116647657** L_36 = ___content4;
ByteU5BU5D_t4116647657* L_37 = *((ByteU5BU5D_t4116647657**)L_36);
int32_t* L_38 = ___length3;
Buffer_BlockCopy_m2884209081(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_34, (*((int32_t*)L_35)), (RuntimeArray *)(RuntimeArray *)L_37, 0, (*((int32_t*)L_38)), /*hidden argument*/NULL);
return;
}
}
// Mono.Security.ASN1 Mono.Security.ASN1::get_Item(System.Int32)
extern "C" IL2CPP_METHOD_ATTR ASN1_t2114160833 * ASN1_get_Item_m2255075813 (ASN1_t2114160833 * __this, int32_t ___index0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (ASN1_get_Item_m2255075813_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
ASN1_t2114160833 * V_0 = NULL;
Exception_t * __last_unhandled_exception = 0;
NO_UNUSED_WARNING (__last_unhandled_exception);
Exception_t * __exception_local = 0;
NO_UNUSED_WARNING (__exception_local);
int32_t __leave_target = -1;
NO_UNUSED_WARNING (__leave_target);
IL_0000:
try
{ // begin try (depth: 1)
{
ArrayList_t2718874744 * L_0 = __this->get_elist_2();
if (!L_0)
{
goto IL_001c;
}
}
IL_000b:
{
int32_t L_1 = ___index0;
ArrayList_t2718874744 * L_2 = __this->get_elist_2();
int32_t L_3 = VirtFuncInvoker0< int32_t >::Invoke(23 /* System.Int32 System.Collections.ArrayList::get_Count() */, L_2);
if ((((int32_t)L_1) < ((int32_t)L_3)))
{
goto IL_0023;
}
}
IL_001c:
{
V_0 = (ASN1_t2114160833 *)NULL;
goto IL_004c;
}
IL_0023:
{
ArrayList_t2718874744 * L_4 = __this->get_elist_2();
int32_t L_5 = ___index0;
RuntimeObject * L_6 = VirtFuncInvoker1< RuntimeObject *, int32_t >::Invoke(21 /* System.Object System.Collections.ArrayList::get_Item(System.Int32) */, L_4, L_5);
V_0 = ((ASN1_t2114160833 *)CastclassClass((RuntimeObject*)L_6, ASN1_t2114160833_il2cpp_TypeInfo_var));
goto IL_004c;
}
IL_003a:
{
; // IL_003a: leave IL_004c
}
} // end try (depth: 1)
catch(Il2CppExceptionWrapper& e)
{
__exception_local = (Exception_t *)e.ex;
if(il2cpp_codegen_class_is_assignable_from (ArgumentOutOfRangeException_t777629997_il2cpp_TypeInfo_var, il2cpp_codegen_object_class(e.ex)))
goto CATCH_003f;
throw e;
}
CATCH_003f:
{ // begin catch(System.ArgumentOutOfRangeException)
{
V_0 = (ASN1_t2114160833 *)NULL;
goto IL_004c;
}
IL_0047:
{
; // IL_0047: leave IL_004c
}
} // end catch (depth: 1)
IL_004c:
{
ASN1_t2114160833 * L_7 = V_0;
return L_7;
}
}
// Mono.Security.ASN1 Mono.Security.ASN1::Element(System.Int32,System.Byte)
extern "C" IL2CPP_METHOD_ATTR ASN1_t2114160833 * ASN1_Element_m4088315026 (ASN1_t2114160833 * __this, int32_t ___index0, uint8_t ___anTag1, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (ASN1_Element_m4088315026_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
ASN1_t2114160833 * V_0 = NULL;
ASN1_t2114160833 * V_1 = NULL;
Exception_t * __last_unhandled_exception = 0;
NO_UNUSED_WARNING (__last_unhandled_exception);
Exception_t * __exception_local = 0;
NO_UNUSED_WARNING (__exception_local);
int32_t __leave_target = -1;
NO_UNUSED_WARNING (__leave_target);
IL_0000:
try
{ // begin try (depth: 1)
{
ArrayList_t2718874744 * L_0 = __this->get_elist_2();
if (!L_0)
{
goto IL_001c;
}
}
IL_000b:
{
int32_t L_1 = ___index0;
ArrayList_t2718874744 * L_2 = __this->get_elist_2();
int32_t L_3 = VirtFuncInvoker0< int32_t >::Invoke(23 /* System.Int32 System.Collections.ArrayList::get_Count() */, L_2);
if ((((int32_t)L_1) < ((int32_t)L_3)))
{
goto IL_0023;
}
}
IL_001c:
{
V_1 = (ASN1_t2114160833 *)NULL;
goto IL_0061;
}
IL_0023:
{
ArrayList_t2718874744 * L_4 = __this->get_elist_2();
int32_t L_5 = ___index0;
RuntimeObject * L_6 = VirtFuncInvoker1< RuntimeObject *, int32_t >::Invoke(21 /* System.Object System.Collections.ArrayList::get_Item(System.Int32) */, L_4, L_5);
V_0 = ((ASN1_t2114160833 *)CastclassClass((RuntimeObject*)L_6, ASN1_t2114160833_il2cpp_TypeInfo_var));
ASN1_t2114160833 * L_7 = V_0;
uint8_t L_8 = ASN1_get_Tag_m2789147236(L_7, /*hidden argument*/NULL);
uint8_t L_9 = ___anTag1;
if ((!(((uint32_t)L_8) == ((uint32_t)L_9))))
{
goto IL_0048;
}
}
IL_0041:
{
ASN1_t2114160833 * L_10 = V_0;
V_1 = L_10;
goto IL_0061;
}
IL_0048:
{
V_1 = (ASN1_t2114160833 *)NULL;
goto IL_0061;
}
IL_004f:
{
; // IL_004f: leave IL_0061
}
} // end try (depth: 1)
catch(Il2CppExceptionWrapper& e)
{
__exception_local = (Exception_t *)e.ex;
if(il2cpp_codegen_class_is_assignable_from (ArgumentOutOfRangeException_t777629997_il2cpp_TypeInfo_var, il2cpp_codegen_object_class(e.ex)))
goto CATCH_0054;
throw e;
}
CATCH_0054:
{ // begin catch(System.ArgumentOutOfRangeException)
{
V_1 = (ASN1_t2114160833 *)NULL;
goto IL_0061;
}
IL_005c:
{
; // IL_005c: leave IL_0061
}
} // end catch (depth: 1)
IL_0061:
{
ASN1_t2114160833 * L_11 = V_1;
return L_11;
}
}
// System.String Mono.Security.ASN1::ToString()
extern "C" IL2CPP_METHOD_ATTR String_t* ASN1_ToString_m45458043 (ASN1_t2114160833 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (ASN1_ToString_m45458043_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
StringBuilder_t * V_0 = NULL;
int32_t V_1 = 0;
{
StringBuilder_t * L_0 = (StringBuilder_t *)il2cpp_codegen_object_new(StringBuilder_t_il2cpp_TypeInfo_var);
StringBuilder__ctor_m3121283359(L_0, /*hidden argument*/NULL);
V_0 = L_0;
StringBuilder_t * L_1 = V_0;
uint8_t* L_2 = __this->get_address_of_m_nTag_0();
String_t* L_3 = Byte_ToString_m3735479648((uint8_t*)L_2, _stringLiteral3451435000, /*hidden argument*/NULL);
String_t* L_4 = Environment_get_NewLine_m3211016485(NULL /*static, unused*/, /*hidden argument*/NULL);
StringBuilder_AppendFormat_m3255666490(L_1, _stringLiteral1285239904, L_3, L_4, /*hidden argument*/NULL);
StringBuilder_t * L_5 = V_0;
ByteU5BU5D_t4116647657* L_6 = ASN1_get_Value_m63296490(__this, /*hidden argument*/NULL);
int32_t L_7 = (((int32_t)((int32_t)(((RuntimeArray *)L_6)->max_length))));
RuntimeObject * L_8 = Box(Int32_t2950945753_il2cpp_TypeInfo_var, &L_7);
String_t* L_9 = Environment_get_NewLine_m3211016485(NULL /*static, unused*/, /*hidden argument*/NULL);
StringBuilder_AppendFormat_m3255666490(L_5, _stringLiteral2514902888, L_8, L_9, /*hidden argument*/NULL);
StringBuilder_t * L_10 = V_0;
StringBuilder_Append_m1965104174(L_10, _stringLiteral3013462727, /*hidden argument*/NULL);
StringBuilder_t * L_11 = V_0;
String_t* L_12 = Environment_get_NewLine_m3211016485(NULL /*static, unused*/, /*hidden argument*/NULL);
StringBuilder_Append_m1965104174(L_11, L_12, /*hidden argument*/NULL);
V_1 = 0;
goto IL_00a7;
}
IL_0064:
{
StringBuilder_t * L_13 = V_0;
ByteU5BU5D_t4116647657* L_14 = ASN1_get_Value_m63296490(__this, /*hidden argument*/NULL);
int32_t L_15 = V_1;
String_t* L_16 = Byte_ToString_m3735479648((uint8_t*)((L_14)->GetAddressAtUnchecked(static_cast<il2cpp_array_size_t>(L_15))), _stringLiteral3451435000, /*hidden argument*/NULL);
StringBuilder_AppendFormat_m3016532472(L_13, _stringLiteral3100627678, L_16, /*hidden argument*/NULL);
int32_t L_17 = V_1;
if (((int32_t)((int32_t)((int32_t)il2cpp_codegen_add((int32_t)L_17, (int32_t)1))%(int32_t)((int32_t)16))))
{
goto IL_00a3;
}
}
{
StringBuilder_t * L_18 = V_0;
String_t* L_19 = Environment_get_NewLine_m3211016485(NULL /*static, unused*/, /*hidden argument*/NULL);
ObjectU5BU5D_t2843939325* L_20 = (ObjectU5BU5D_t2843939325*)SZArrayNew(ObjectU5BU5D_t2843939325_il2cpp_TypeInfo_var, (uint32_t)0);
StringBuilder_AppendFormat_m921870684(L_18, L_19, L_20, /*hidden argument*/NULL);
}
IL_00a3:
{
int32_t L_21 = V_1;
V_1 = ((int32_t)il2cpp_codegen_add((int32_t)L_21, (int32_t)1));
}
IL_00a7:
{
int32_t L_22 = V_1;
ByteU5BU5D_t4116647657* L_23 = ASN1_get_Value_m63296490(__this, /*hidden argument*/NULL);
if ((((int32_t)L_22) < ((int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_23)->max_length)))))))
{
goto IL_0064;
}
}
{
StringBuilder_t * L_24 = V_0;
String_t* L_25 = StringBuilder_ToString_m3317489284(L_24, /*hidden argument*/NULL);
return L_25;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.ASN1 Mono.Security.ASN1Convert::FromInt32(System.Int32)
extern "C" IL2CPP_METHOD_ATTR ASN1_t2114160833 * ASN1Convert_FromInt32_m1154451899 (RuntimeObject * __this /* static, unused */, int32_t ___value0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (ASN1Convert_FromInt32_m1154451899_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
ByteU5BU5D_t4116647657* V_0 = NULL;
int32_t V_1 = 0;
ASN1_t2114160833 * V_2 = NULL;
ByteU5BU5D_t4116647657* V_3 = NULL;
int32_t V_4 = 0;
{
int32_t L_0 = ___value0;
ByteU5BU5D_t4116647657* L_1 = BitConverterLE_GetBytes_m3268825786(NULL /*static, unused*/, L_0, /*hidden argument*/NULL);
V_0 = L_1;
ByteU5BU5D_t4116647657* L_2 = V_0;
Array_Reverse_m3714848183(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_2, /*hidden argument*/NULL);
V_1 = 0;
goto IL_0018;
}
IL_0014:
{
int32_t L_3 = V_1;
V_1 = ((int32_t)il2cpp_codegen_add((int32_t)L_3, (int32_t)1));
}
IL_0018:
{
int32_t L_4 = V_1;
ByteU5BU5D_t4116647657* L_5 = V_0;
if ((((int32_t)L_4) >= ((int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_5)->max_length)))))))
{
goto IL_0029;
}
}
{
ByteU5BU5D_t4116647657* L_6 = V_0;
int32_t L_7 = V_1;
int32_t L_8 = L_7;
uint8_t L_9 = (L_6)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_8));
if (!L_9)
{
goto IL_0014;
}
}
IL_0029:
{
ASN1_t2114160833 * L_10 = (ASN1_t2114160833 *)il2cpp_codegen_object_new(ASN1_t2114160833_il2cpp_TypeInfo_var);
ASN1__ctor_m1239252869(L_10, (uint8_t)2, /*hidden argument*/NULL);
V_2 = L_10;
int32_t L_11 = V_1;
V_4 = L_11;
int32_t L_12 = V_4;
if (!L_12)
{
goto IL_0047;
}
}
{
int32_t L_13 = V_4;
if ((((int32_t)L_13) == ((int32_t)4)))
{
goto IL_0053;
}
}
{
goto IL_0064;
}
IL_0047:
{
ASN1_t2114160833 * L_14 = V_2;
ByteU5BU5D_t4116647657* L_15 = V_0;
ASN1_set_Value_m647861841(L_14, L_15, /*hidden argument*/NULL);
goto IL_0085;
}
IL_0053:
{
ASN1_t2114160833 * L_16 = V_2;
ByteU5BU5D_t4116647657* L_17 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)1);
ASN1_set_Value_m647861841(L_16, L_17, /*hidden argument*/NULL);
goto IL_0085;
}
IL_0064:
{
int32_t L_18 = V_1;
ByteU5BU5D_t4116647657* L_19 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)((int32_t)il2cpp_codegen_subtract((int32_t)4, (int32_t)L_18)));
V_3 = L_19;
ByteU5BU5D_t4116647657* L_20 = V_0;
int32_t L_21 = V_1;
ByteU5BU5D_t4116647657* L_22 = V_3;
ByteU5BU5D_t4116647657* L_23 = V_3;
Buffer_BlockCopy_m2884209081(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_20, L_21, (RuntimeArray *)(RuntimeArray *)L_22, 0, (((int32_t)((int32_t)(((RuntimeArray *)L_23)->max_length)))), /*hidden argument*/NULL);
ASN1_t2114160833 * L_24 = V_2;
ByteU5BU5D_t4116647657* L_25 = V_3;
ASN1_set_Value_m647861841(L_24, L_25, /*hidden argument*/NULL);
goto IL_0085;
}
IL_0085:
{
ASN1_t2114160833 * L_26 = V_2;
return L_26;
}
}
// Mono.Security.ASN1 Mono.Security.ASN1Convert::FromOid(System.String)
extern "C" IL2CPP_METHOD_ATTR ASN1_t2114160833 * ASN1Convert_FromOid_m3844102704 (RuntimeObject * __this /* static, unused */, String_t* ___oid0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (ASN1Convert_FromOid_m3844102704_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
String_t* L_0 = ___oid0;
if (L_0)
{
goto IL_0011;
}
}
{
ArgumentNullException_t1615371798 * L_1 = (ArgumentNullException_t1615371798 *)il2cpp_codegen_object_new(ArgumentNullException_t1615371798_il2cpp_TypeInfo_var);
ArgumentNullException__ctor_m1170824041(L_1, _stringLiteral3266464951, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_1, NULL, ASN1Convert_FromOid_m3844102704_RuntimeMethod_var);
}
IL_0011:
{
String_t* L_2 = ___oid0;
IL2CPP_RUNTIME_CLASS_INIT(CryptoConfig_t4201145714_il2cpp_TypeInfo_var);
ByteU5BU5D_t4116647657* L_3 = CryptoConfig_EncodeOID_m2635914623(NULL /*static, unused*/, L_2, /*hidden argument*/NULL);
ASN1_t2114160833 * L_4 = (ASN1_t2114160833 *)il2cpp_codegen_object_new(ASN1_t2114160833_il2cpp_TypeInfo_var);
ASN1__ctor_m1638893325(L_4, L_3, /*hidden argument*/NULL);
return L_4;
}
}
// System.Int32 Mono.Security.ASN1Convert::ToInt32(Mono.Security.ASN1)
extern "C" IL2CPP_METHOD_ATTR int32_t ASN1Convert_ToInt32_m1017403318 (RuntimeObject * __this /* static, unused */, ASN1_t2114160833 * ___asn10, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (ASN1Convert_ToInt32_m1017403318_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
int32_t V_0 = 0;
int32_t V_1 = 0;
{
ASN1_t2114160833 * L_0 = ___asn10;
if (L_0)
{
goto IL_0011;
}
}
{
ArgumentNullException_t1615371798 * L_1 = (ArgumentNullException_t1615371798 *)il2cpp_codegen_object_new(ArgumentNullException_t1615371798_il2cpp_TypeInfo_var);
ArgumentNullException__ctor_m1170824041(L_1, _stringLiteral2971046163, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_1, NULL, ASN1Convert_ToInt32_m1017403318_RuntimeMethod_var);
}
IL_0011:
{
ASN1_t2114160833 * L_2 = ___asn10;
uint8_t L_3 = ASN1_get_Tag_m2789147236(L_2, /*hidden argument*/NULL);
if ((((int32_t)L_3) == ((int32_t)2)))
{
goto IL_0028;
}
}
{
FormatException_t154580423 * L_4 = (FormatException_t154580423 *)il2cpp_codegen_object_new(FormatException_t154580423_il2cpp_TypeInfo_var);
FormatException__ctor_m4049685996(L_4, _stringLiteral1968993200, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_4, NULL, ASN1Convert_ToInt32_m1017403318_RuntimeMethod_var);
}
IL_0028:
{
V_0 = 0;
V_1 = 0;
goto IL_0042;
}
IL_0031:
{
int32_t L_5 = V_0;
ASN1_t2114160833 * L_6 = ___asn10;
ByteU5BU5D_t4116647657* L_7 = ASN1_get_Value_m63296490(L_6, /*hidden argument*/NULL);
int32_t L_8 = V_1;
int32_t L_9 = L_8;
uint8_t L_10 = (L_7)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_9));
V_0 = ((int32_t)il2cpp_codegen_add((int32_t)((int32_t)((int32_t)L_5<<(int32_t)8)), (int32_t)L_10));
int32_t L_11 = V_1;
V_1 = ((int32_t)il2cpp_codegen_add((int32_t)L_11, (int32_t)1));
}
IL_0042:
{
int32_t L_12 = V_1;
ASN1_t2114160833 * L_13 = ___asn10;
ByteU5BU5D_t4116647657* L_14 = ASN1_get_Value_m63296490(L_13, /*hidden argument*/NULL);
if ((((int32_t)L_12) < ((int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_14)->max_length)))))))
{
goto IL_0031;
}
}
{
int32_t L_15 = V_0;
return L_15;
}
}
// System.String Mono.Security.ASN1Convert::ToOid(Mono.Security.ASN1)
extern "C" IL2CPP_METHOD_ATTR String_t* ASN1Convert_ToOid_m3847701408 (RuntimeObject * __this /* static, unused */, ASN1_t2114160833 * ___asn10, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (ASN1Convert_ToOid_m3847701408_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
ByteU5BU5D_t4116647657* V_0 = NULL;
StringBuilder_t * V_1 = NULL;
uint8_t V_2 = 0x0;
uint8_t V_3 = 0x0;
uint64_t V_4 = 0;
{
ASN1_t2114160833 * L_0 = ___asn10;
if (L_0)
{
goto IL_0011;
}
}
{
ArgumentNullException_t1615371798 * L_1 = (ArgumentNullException_t1615371798 *)il2cpp_codegen_object_new(ArgumentNullException_t1615371798_il2cpp_TypeInfo_var);
ArgumentNullException__ctor_m1170824041(L_1, _stringLiteral2971046163, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_1, NULL, ASN1Convert_ToOid_m3847701408_RuntimeMethod_var);
}
IL_0011:
{
ASN1_t2114160833 * L_2 = ___asn10;
ByteU5BU5D_t4116647657* L_3 = ASN1_get_Value_m63296490(L_2, /*hidden argument*/NULL);
V_0 = L_3;
StringBuilder_t * L_4 = (StringBuilder_t *)il2cpp_codegen_object_new(StringBuilder_t_il2cpp_TypeInfo_var);
StringBuilder__ctor_m3121283359(L_4, /*hidden argument*/NULL);
V_1 = L_4;
ByteU5BU5D_t4116647657* L_5 = V_0;
int32_t L_6 = 0;
uint8_t L_7 = (L_5)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_6));
V_2 = (uint8_t)(((int32_t)((uint8_t)((int32_t)((int32_t)L_7/(int32_t)((int32_t)40))))));
ByteU5BU5D_t4116647657* L_8 = V_0;
int32_t L_9 = 0;
uint8_t L_10 = (L_8)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_9));
V_3 = (uint8_t)(((int32_t)((uint8_t)((int32_t)((int32_t)L_10%(int32_t)((int32_t)40))))));
uint8_t L_11 = V_2;
if ((((int32_t)L_11) <= ((int32_t)2)))
{
goto IL_0042;
}
}
{
uint8_t L_12 = V_3;
uint8_t L_13 = V_2;
V_3 = (uint8_t)(((int32_t)((uint8_t)((int32_t)il2cpp_codegen_add((int32_t)L_12, (int32_t)(((int32_t)((uint8_t)((int32_t)il2cpp_codegen_multiply((int32_t)((int32_t)il2cpp_codegen_subtract((int32_t)L_13, (int32_t)2)), (int32_t)((int32_t)40)))))))))));
V_2 = (uint8_t)2;
}
IL_0042:
{
StringBuilder_t * L_14 = V_1;
IL2CPP_RUNTIME_CLASS_INIT(CultureInfo_t4157843068_il2cpp_TypeInfo_var);
CultureInfo_t4157843068 * L_15 = CultureInfo_get_InvariantCulture_m3532445182(NULL /*static, unused*/, /*hidden argument*/NULL);
String_t* L_16 = Byte_ToString_m2335342258((uint8_t*)(&V_2), L_15, /*hidden argument*/NULL);
StringBuilder_Append_m1965104174(L_14, L_16, /*hidden argument*/NULL);
StringBuilder_t * L_17 = V_1;
StringBuilder_Append_m1965104174(L_17, _stringLiteral3452614530, /*hidden argument*/NULL);
StringBuilder_t * L_18 = V_1;
CultureInfo_t4157843068 * L_19 = CultureInfo_get_InvariantCulture_m3532445182(NULL /*static, unused*/, /*hidden argument*/NULL);
String_t* L_20 = Byte_ToString_m2335342258((uint8_t*)(&V_3), L_19, /*hidden argument*/NULL);
StringBuilder_Append_m1965104174(L_18, L_20, /*hidden argument*/NULL);
V_4 = (((int64_t)((int64_t)0)));
V_2 = (uint8_t)1;
goto IL_00c9;
}
IL_007f:
{
uint64_t L_21 = V_4;
ByteU5BU5D_t4116647657* L_22 = V_0;
uint8_t L_23 = V_2;
uint8_t L_24 = L_23;
uint8_t L_25 = (L_22)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_24));
V_4 = ((int64_t)((int64_t)((int64_t)((int64_t)L_21<<(int32_t)7))|(int64_t)(((int64_t)((uint64_t)(((uint32_t)((uint32_t)(((int32_t)((uint8_t)((int32_t)((int32_t)L_25&(int32_t)((int32_t)127))))))))))))));
ByteU5BU5D_t4116647657* L_26 = V_0;
uint8_t L_27 = V_2;
uint8_t L_28 = L_27;
uint8_t L_29 = (L_26)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_28));
if ((((int32_t)((int32_t)((int32_t)L_29&(int32_t)((int32_t)128)))) == ((int32_t)((int32_t)128))))
{
goto IL_00c4;
}
}
{
StringBuilder_t * L_30 = V_1;
StringBuilder_Append_m1965104174(L_30, _stringLiteral3452614530, /*hidden argument*/NULL);
StringBuilder_t * L_31 = V_1;
IL2CPP_RUNTIME_CLASS_INIT(CultureInfo_t4157843068_il2cpp_TypeInfo_var);
CultureInfo_t4157843068 * L_32 = CultureInfo_get_InvariantCulture_m3532445182(NULL /*static, unused*/, /*hidden argument*/NULL);
String_t* L_33 = UInt64_ToString_m2623377370((uint64_t*)(&V_4), L_32, /*hidden argument*/NULL);
StringBuilder_Append_m1965104174(L_31, L_33, /*hidden argument*/NULL);
V_4 = (((int64_t)((int64_t)0)));
}
IL_00c4:
{
uint8_t L_34 = V_2;
V_2 = (uint8_t)(((int32_t)((uint8_t)((int32_t)il2cpp_codegen_add((int32_t)L_34, (int32_t)1)))));
}
IL_00c9:
{
uint8_t L_35 = V_2;
ByteU5BU5D_t4116647657* L_36 = V_0;
if ((((int32_t)L_35) < ((int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_36)->max_length)))))))
{
goto IL_007f;
}
}
{
StringBuilder_t * L_37 = V_1;
String_t* L_38 = StringBuilder_ToString_m3317489284(L_37, /*hidden argument*/NULL);
return L_38;
}
}
// System.DateTime Mono.Security.ASN1Convert::ToDateTime(Mono.Security.ASN1)
extern "C" IL2CPP_METHOD_ATTR DateTime_t3738529785 ASN1Convert_ToDateTime_m1246060840 (RuntimeObject * __this /* static, unused */, ASN1_t2114160833 * ___time0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (ASN1Convert_ToDateTime_m1246060840_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
String_t* V_0 = NULL;
String_t* V_1 = NULL;
int32_t V_2 = 0;
String_t* V_3 = NULL;
Il2CppChar V_4 = 0x0;
int32_t V_5 = 0;
String_t* G_B13_0 = NULL;
int32_t G_B16_0 = 0;
{
ASN1_t2114160833 * L_0 = ___time0;
if (L_0)
{
goto IL_0011;
}
}
{
ArgumentNullException_t1615371798 * L_1 = (ArgumentNullException_t1615371798 *)il2cpp_codegen_object_new(ArgumentNullException_t1615371798_il2cpp_TypeInfo_var);
ArgumentNullException__ctor_m1170824041(L_1, _stringLiteral63249541, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_1, NULL, ASN1Convert_ToDateTime_m1246060840_RuntimeMethod_var);
}
IL_0011:
{
IL2CPP_RUNTIME_CLASS_INIT(Encoding_t1523322056_il2cpp_TypeInfo_var);
Encoding_t1523322056 * L_2 = Encoding_get_ASCII_m3595602635(NULL /*static, unused*/, /*hidden argument*/NULL);
ASN1_t2114160833 * L_3 = ___time0;
ByteU5BU5D_t4116647657* L_4 = ASN1_get_Value_m63296490(L_3, /*hidden argument*/NULL);
String_t* L_5 = VirtFuncInvoker1< String_t*, ByteU5BU5D_t4116647657* >::Invoke(22 /* System.String System.Text.Encoding::GetString(System.Byte[]) */, L_2, L_4);
V_0 = L_5;
V_1 = (String_t*)NULL;
String_t* L_6 = V_0;
int32_t L_7 = String_get_Length_m3847582255(L_6, /*hidden argument*/NULL);
V_5 = L_7;
int32_t L_8 = V_5;
switch (((int32_t)il2cpp_codegen_subtract((int32_t)L_8, (int32_t)((int32_t)11))))
{
case 0:
{
goto IL_0057;
}
case 1:
{
goto IL_016b;
}
case 2:
{
goto IL_0062;
}
case 3:
{
goto IL_016b;
}
case 4:
{
goto IL_00a5;
}
case 5:
{
goto IL_016b;
}
case 6:
{
goto IL_00b0;
}
}
}
{
goto IL_016b;
}
IL_0057:
{
V_1 = _stringLiteral3346400495;
goto IL_016b;
}
IL_0062:
{
String_t* L_9 = V_0;
String_t* L_10 = String_Substring_m1610150815(L_9, 0, 2, /*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(CultureInfo_t4157843068_il2cpp_TypeInfo_var);
CultureInfo_t4157843068 * L_11 = CultureInfo_get_InvariantCulture_m3532445182(NULL /*static, unused*/, /*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(Convert_t2465617642_il2cpp_TypeInfo_var);
int16_t L_12 = Convert_ToInt16_m3185404879(NULL /*static, unused*/, L_10, L_11, /*hidden argument*/NULL);
V_2 = L_12;
int32_t L_13 = V_2;
if ((((int32_t)L_13) < ((int32_t)((int32_t)50))))
{
goto IL_008e;
}
}
{
String_t* L_14 = V_0;
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_15 = String_Concat_m3937257545(NULL /*static, unused*/, _stringLiteral3452024719, L_14, /*hidden argument*/NULL);
V_0 = L_15;
goto IL_009a;
}
IL_008e:
{
String_t* L_16 = V_0;
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_17 = String_Concat_m3937257545(NULL /*static, unused*/, _stringLiteral3451565966, L_16, /*hidden argument*/NULL);
V_0 = L_17;
}
IL_009a:
{
V_1 = _stringLiteral924502160;
goto IL_016b;
}
IL_00a5:
{
V_1 = _stringLiteral924502160;
goto IL_016b;
}
IL_00b0:
{
String_t* L_18 = V_0;
String_t* L_19 = String_Substring_m1610150815(L_18, 0, 2, /*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(CultureInfo_t4157843068_il2cpp_TypeInfo_var);
CultureInfo_t4157843068 * L_20 = CultureInfo_get_InvariantCulture_m3532445182(NULL /*static, unused*/, /*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(Convert_t2465617642_il2cpp_TypeInfo_var);
int16_t L_21 = Convert_ToInt16_m3185404879(NULL /*static, unused*/, L_19, L_20, /*hidden argument*/NULL);
V_2 = L_21;
int32_t L_22 = V_2;
if ((((int32_t)L_22) < ((int32_t)((int32_t)50))))
{
goto IL_00d5;
}
}
{
G_B13_0 = _stringLiteral3452024719;
goto IL_00da;
}
IL_00d5:
{
G_B13_0 = _stringLiteral3451565966;
}
IL_00da:
{
V_3 = G_B13_0;
String_t* L_23 = V_0;
Il2CppChar L_24 = String_get_Chars_m2986988803(L_23, ((int32_t)12), /*hidden argument*/NULL);
if ((!(((uint32_t)L_24) == ((uint32_t)((int32_t)43)))))
{
goto IL_00f1;
}
}
{
G_B16_0 = ((int32_t)45);
goto IL_00f3;
}
IL_00f1:
{
G_B16_0 = ((int32_t)43);
}
IL_00f3:
{
V_4 = G_B16_0;
ObjectU5BU5D_t2843939325* L_25 = (ObjectU5BU5D_t2843939325*)SZArrayNew(ObjectU5BU5D_t2843939325_il2cpp_TypeInfo_var, (uint32_t)7);
ObjectU5BU5D_t2843939325* L_26 = L_25;
String_t* L_27 = V_3;
ArrayElementTypeCheck (L_26, L_27);
(L_26)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(0), (RuntimeObject *)L_27);
ObjectU5BU5D_t2843939325* L_28 = L_26;
String_t* L_29 = V_0;
String_t* L_30 = String_Substring_m1610150815(L_29, 0, ((int32_t)12), /*hidden argument*/NULL);
ArrayElementTypeCheck (L_28, L_30);
(L_28)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(1), (RuntimeObject *)L_30);
ObjectU5BU5D_t2843939325* L_31 = L_28;
Il2CppChar L_32 = V_4;
Il2CppChar L_33 = L_32;
RuntimeObject * L_34 = Box(Char_t3634460470_il2cpp_TypeInfo_var, &L_33);
ArrayElementTypeCheck (L_31, L_34);
(L_31)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(2), (RuntimeObject *)L_34);
ObjectU5BU5D_t2843939325* L_35 = L_31;
String_t* L_36 = V_0;
Il2CppChar L_37 = String_get_Chars_m2986988803(L_36, ((int32_t)13), /*hidden argument*/NULL);
Il2CppChar L_38 = L_37;
RuntimeObject * L_39 = Box(Char_t3634460470_il2cpp_TypeInfo_var, &L_38);
ArrayElementTypeCheck (L_35, L_39);
(L_35)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(3), (RuntimeObject *)L_39);
ObjectU5BU5D_t2843939325* L_40 = L_35;
String_t* L_41 = V_0;
Il2CppChar L_42 = String_get_Chars_m2986988803(L_41, ((int32_t)14), /*hidden argument*/NULL);
Il2CppChar L_43 = L_42;
RuntimeObject * L_44 = Box(Char_t3634460470_il2cpp_TypeInfo_var, &L_43);
ArrayElementTypeCheck (L_40, L_44);
(L_40)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(4), (RuntimeObject *)L_44);
ObjectU5BU5D_t2843939325* L_45 = L_40;
String_t* L_46 = V_0;
Il2CppChar L_47 = String_get_Chars_m2986988803(L_46, ((int32_t)15), /*hidden argument*/NULL);
Il2CppChar L_48 = L_47;
RuntimeObject * L_49 = Box(Char_t3634460470_il2cpp_TypeInfo_var, &L_48);
ArrayElementTypeCheck (L_45, L_49);
(L_45)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(5), (RuntimeObject *)L_49);
ObjectU5BU5D_t2843939325* L_50 = L_45;
String_t* L_51 = V_0;
Il2CppChar L_52 = String_get_Chars_m2986988803(L_51, ((int32_t)16), /*hidden argument*/NULL);
Il2CppChar L_53 = L_52;
RuntimeObject * L_54 = Box(Char_t3634460470_il2cpp_TypeInfo_var, &L_53);
ArrayElementTypeCheck (L_50, L_54);
(L_50)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(6), (RuntimeObject *)L_54);
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_55 = String_Format_m630303134(NULL /*static, unused*/, _stringLiteral3005829114, L_50, /*hidden argument*/NULL);
V_0 = L_55;
V_1 = _stringLiteral587613957;
goto IL_016b;
}
IL_016b:
{
String_t* L_56 = V_0;
String_t* L_57 = V_1;
IL2CPP_RUNTIME_CLASS_INIT(CultureInfo_t4157843068_il2cpp_TypeInfo_var);
CultureInfo_t4157843068 * L_58 = CultureInfo_get_InvariantCulture_m3532445182(NULL /*static, unused*/, /*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(DateTime_t3738529785_il2cpp_TypeInfo_var);
DateTime_t3738529785 L_59 = DateTime_ParseExact_m2711902273(NULL /*static, unused*/, L_56, L_57, L_58, ((int32_t)16), /*hidden argument*/NULL);
return L_59;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Byte[] Mono.Security.BitConverterLE::GetUIntBytes(System.Byte*)
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* BitConverterLE_GetUIntBytes_m795219058 (RuntimeObject * __this /* static, unused */, uint8_t* ___bytes0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (BitConverterLE_GetUIntBytes_m795219058_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
IL2CPP_RUNTIME_CLASS_INIT(BitConverter_t3118986983_il2cpp_TypeInfo_var);
bool L_0 = ((BitConverter_t3118986983_StaticFields*)il2cpp_codegen_static_fields_for(BitConverter_t3118986983_il2cpp_TypeInfo_var))->get_IsLittleEndian_1();
if (!L_0)
{
goto IL_002b;
}
}
{
ByteU5BU5D_t4116647657* L_1 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)4);
ByteU5BU5D_t4116647657* L_2 = L_1;
uint8_t* L_3 = ___bytes0;
(L_2)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(0), (uint8_t)(*((uint8_t*)L_3)));
ByteU5BU5D_t4116647657* L_4 = L_2;
uint8_t* L_5 = ___bytes0;
(L_4)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(1), (uint8_t)(*((uint8_t*)((uint8_t*)il2cpp_codegen_add((intptr_t)L_5, (int32_t)1)))));
ByteU5BU5D_t4116647657* L_6 = L_4;
uint8_t* L_7 = ___bytes0;
(L_6)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(2), (uint8_t)(*((uint8_t*)((uint8_t*)il2cpp_codegen_add((intptr_t)L_7, (int32_t)2)))));
ByteU5BU5D_t4116647657* L_8 = L_6;
uint8_t* L_9 = ___bytes0;
(L_8)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(3), (uint8_t)(*((uint8_t*)((uint8_t*)il2cpp_codegen_add((intptr_t)L_9, (int32_t)3)))));
return L_8;
}
IL_002b:
{
ByteU5BU5D_t4116647657* L_10 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)4);
ByteU5BU5D_t4116647657* L_11 = L_10;
uint8_t* L_12 = ___bytes0;
(L_11)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(0), (uint8_t)(*((uint8_t*)((uint8_t*)il2cpp_codegen_add((intptr_t)L_12, (int32_t)3)))));
ByteU5BU5D_t4116647657* L_13 = L_11;
uint8_t* L_14 = ___bytes0;
(L_13)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(1), (uint8_t)(*((uint8_t*)((uint8_t*)il2cpp_codegen_add((intptr_t)L_14, (int32_t)2)))));
ByteU5BU5D_t4116647657* L_15 = L_13;
uint8_t* L_16 = ___bytes0;
(L_15)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(2), (uint8_t)(*((uint8_t*)((uint8_t*)il2cpp_codegen_add((intptr_t)L_16, (int32_t)1)))));
ByteU5BU5D_t4116647657* L_17 = L_15;
uint8_t* L_18 = ___bytes0;
(L_17)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(3), (uint8_t)(*((uint8_t*)L_18)));
return L_17;
}
}
// System.Byte[] Mono.Security.BitConverterLE::GetBytes(System.Int32)
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* BitConverterLE_GetBytes_m3268825786 (RuntimeObject * __this /* static, unused */, int32_t ___value0, const RuntimeMethod* method)
{
{
ByteU5BU5D_t4116647657* L_0 = BitConverterLE_GetUIntBytes_m795219058(NULL /*static, unused*/, (uint8_t*)(uint8_t*)(&___value0), /*hidden argument*/NULL);
return L_0;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void Mono.Security.Cryptography.ARC4Managed::.ctor()
extern "C" IL2CPP_METHOD_ATTR void ARC4Managed__ctor_m2553537404 (ARC4Managed_t2641858452 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (ARC4Managed__ctor_m2553537404_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
IL2CPP_RUNTIME_CLASS_INIT(RC4_t2752556436_il2cpp_TypeInfo_var);
RC4__ctor_m3531760091(__this, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_0 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)((int32_t)256));
__this->set_state_13(L_0);
__this->set_m_disposed_16((bool)0);
return;
}
}
// System.Void Mono.Security.Cryptography.ARC4Managed::Finalize()
extern "C" IL2CPP_METHOD_ATTR void ARC4Managed_Finalize_m315143160 (ARC4Managed_t2641858452 * __this, const RuntimeMethod* method)
{
Exception_t * __last_unhandled_exception = 0;
NO_UNUSED_WARNING (__last_unhandled_exception);
Exception_t * __exception_local = 0;
NO_UNUSED_WARNING (__exception_local);
int32_t __leave_target = -1;
NO_UNUSED_WARNING (__leave_target);
IL_0000:
try
{ // begin try (depth: 1)
VirtActionInvoker1< bool >::Invoke(5 /* System.Void Mono.Security.Cryptography.ARC4Managed::Dispose(System.Boolean) */, __this, (bool)1);
IL2CPP_LEAVE(0x13, FINALLY_000c);
} // end try (depth: 1)
catch(Il2CppExceptionWrapper& e)
{
__last_unhandled_exception = (Exception_t *)e.ex;
goto FINALLY_000c;
}
FINALLY_000c:
{ // begin finally (depth: 1)
SymmetricAlgorithm_Finalize_m2361523015(__this, /*hidden argument*/NULL);
IL2CPP_END_FINALLY(12)
} // end finally (depth: 1)
IL2CPP_CLEANUP(12)
{
IL2CPP_JUMP_TBL(0x13, IL_0013)
IL2CPP_RETHROW_IF_UNHANDLED(Exception_t *)
}
IL_0013:
{
return;
}
}
// System.Void Mono.Security.Cryptography.ARC4Managed::Dispose(System.Boolean)
extern "C" IL2CPP_METHOD_ATTR void ARC4Managed_Dispose_m3340445210 (ARC4Managed_t2641858452 * __this, bool ___disposing0, const RuntimeMethod* method)
{
{
bool L_0 = __this->get_m_disposed_16();
if (L_0)
{
goto IL_0067;
}
}
{
__this->set_x_14((uint8_t)0);
__this->set_y_15((uint8_t)0);
ByteU5BU5D_t4116647657* L_1 = __this->get_key_12();
if (!L_1)
{
goto IL_003f;
}
}
{
ByteU5BU5D_t4116647657* L_2 = __this->get_key_12();
ByteU5BU5D_t4116647657* L_3 = __this->get_key_12();
Array_Clear_m2231608178(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_2, 0, (((int32_t)((int32_t)(((RuntimeArray *)L_3)->max_length)))), /*hidden argument*/NULL);
__this->set_key_12((ByteU5BU5D_t4116647657*)NULL);
}
IL_003f:
{
ByteU5BU5D_t4116647657* L_4 = __this->get_state_13();
ByteU5BU5D_t4116647657* L_5 = __this->get_state_13();
Array_Clear_m2231608178(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_4, 0, (((int32_t)((int32_t)(((RuntimeArray *)L_5)->max_length)))), /*hidden argument*/NULL);
__this->set_state_13((ByteU5BU5D_t4116647657*)NULL);
GC_SuppressFinalize_m1177400158(NULL /*static, unused*/, __this, /*hidden argument*/NULL);
__this->set_m_disposed_16((bool)1);
}
IL_0067:
{
return;
}
}
// System.Byte[] Mono.Security.Cryptography.ARC4Managed::get_Key()
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* ARC4Managed_get_Key_m2476146969 (ARC4Managed_t2641858452 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (ARC4Managed_get_Key_m2476146969_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
ByteU5BU5D_t4116647657* L_0 = __this->get_key_12();
RuntimeObject * L_1 = Array_Clone_m2672907798((RuntimeArray *)(RuntimeArray *)L_0, /*hidden argument*/NULL);
return ((ByteU5BU5D_t4116647657*)Castclass((RuntimeObject*)L_1, ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var));
}
}
// System.Void Mono.Security.Cryptography.ARC4Managed::set_Key(System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void ARC4Managed_set_Key_m859266296 (ARC4Managed_t2641858452 * __this, ByteU5BU5D_t4116647657* ___value0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (ARC4Managed_set_Key_m859266296_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
ByteU5BU5D_t4116647657* L_0 = ___value0;
RuntimeObject * L_1 = Array_Clone_m2672907798((RuntimeArray *)(RuntimeArray *)L_0, /*hidden argument*/NULL);
__this->set_key_12(((ByteU5BU5D_t4116647657*)Castclass((RuntimeObject*)L_1, ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var)));
ByteU5BU5D_t4116647657* L_2 = __this->get_key_12();
ARC4Managed_KeySetup_m2449315676(__this, L_2, /*hidden argument*/NULL);
return;
}
}
// System.Boolean Mono.Security.Cryptography.ARC4Managed::get_CanReuseTransform()
extern "C" IL2CPP_METHOD_ATTR bool ARC4Managed_get_CanReuseTransform_m1145713138 (ARC4Managed_t2641858452 * __this, const RuntimeMethod* method)
{
{
return (bool)0;
}
}
// System.Security.Cryptography.ICryptoTransform Mono.Security.Cryptography.ARC4Managed::CreateEncryptor(System.Byte[],System.Byte[])
extern "C" IL2CPP_METHOD_ATTR RuntimeObject* ARC4Managed_CreateEncryptor_m2249585492 (ARC4Managed_t2641858452 * __this, ByteU5BU5D_t4116647657* ___rgbKey0, ByteU5BU5D_t4116647657* ___rgvIV1, const RuntimeMethod* method)
{
{
ByteU5BU5D_t4116647657* L_0 = ___rgbKey0;
VirtActionInvoker1< ByteU5BU5D_t4116647657* >::Invoke(12 /* System.Void Mono.Security.Cryptography.ARC4Managed::set_Key(System.Byte[]) */, __this, L_0);
return __this;
}
}
// System.Security.Cryptography.ICryptoTransform Mono.Security.Cryptography.ARC4Managed::CreateDecryptor(System.Byte[],System.Byte[])
extern "C" IL2CPP_METHOD_ATTR RuntimeObject* ARC4Managed_CreateDecryptor_m1966583816 (ARC4Managed_t2641858452 * __this, ByteU5BU5D_t4116647657* ___rgbKey0, ByteU5BU5D_t4116647657* ___rgvIV1, const RuntimeMethod* method)
{
{
ByteU5BU5D_t4116647657* L_0 = ___rgbKey0;
VirtActionInvoker1< ByteU5BU5D_t4116647657* >::Invoke(12 /* System.Void Mono.Security.Cryptography.ARC4Managed::set_Key(System.Byte[]) */, __this, L_0);
RuntimeObject* L_1 = VirtFuncInvoker0< RuntimeObject* >::Invoke(22 /* System.Security.Cryptography.ICryptoTransform System.Security.Cryptography.SymmetricAlgorithm::CreateEncryptor() */, __this);
return L_1;
}
}
// System.Void Mono.Security.Cryptography.ARC4Managed::GenerateIV()
extern "C" IL2CPP_METHOD_ATTR void ARC4Managed_GenerateIV_m2029637723 (ARC4Managed_t2641858452 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (ARC4Managed_GenerateIV_m2029637723_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
ByteU5BU5D_t4116647657* L_0 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)0);
VirtActionInvoker1< ByteU5BU5D_t4116647657* >::Invoke(10 /* System.Void Mono.Security.Cryptography.RC4::set_IV(System.Byte[]) */, __this, L_0);
return;
}
}
// System.Void Mono.Security.Cryptography.ARC4Managed::GenerateKey()
extern "C" IL2CPP_METHOD_ATTR void ARC4Managed_GenerateKey_m1607343060 (ARC4Managed_t2641858452 * __this, const RuntimeMethod* method)
{
{
int32_t L_0 = ((SymmetricAlgorithm_t4254223087 *)__this)->get_KeySizeValue_2();
ByteU5BU5D_t4116647657* L_1 = KeyBuilder_Key_m1482371611(NULL /*static, unused*/, ((int32_t)((int32_t)L_0>>(int32_t)3)), /*hidden argument*/NULL);
VirtActionInvoker1< ByteU5BU5D_t4116647657* >::Invoke(12 /* System.Void Mono.Security.Cryptography.ARC4Managed::set_Key(System.Byte[]) */, __this, L_1);
return;
}
}
// System.Void Mono.Security.Cryptography.ARC4Managed::KeySetup(System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void ARC4Managed_KeySetup_m2449315676 (ARC4Managed_t2641858452 * __this, ByteU5BU5D_t4116647657* ___key0, const RuntimeMethod* method)
{
uint8_t V_0 = 0x0;
uint8_t V_1 = 0x0;
int32_t V_2 = 0;
int32_t V_3 = 0;
uint8_t V_4 = 0x0;
{
V_0 = (uint8_t)0;
V_1 = (uint8_t)0;
V_2 = 0;
goto IL_0019;
}
IL_000b:
{
ByteU5BU5D_t4116647657* L_0 = __this->get_state_13();
int32_t L_1 = V_2;
int32_t L_2 = V_2;
(L_0)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(L_1), (uint8_t)(((int32_t)((uint8_t)L_2))));
int32_t L_3 = V_2;
V_2 = ((int32_t)il2cpp_codegen_add((int32_t)L_3, (int32_t)1));
}
IL_0019:
{
int32_t L_4 = V_2;
if ((((int32_t)L_4) < ((int32_t)((int32_t)256))))
{
goto IL_000b;
}
}
{
__this->set_x_14((uint8_t)0);
__this->set_y_15((uint8_t)0);
V_3 = 0;
goto IL_007a;
}
IL_0039:
{
ByteU5BU5D_t4116647657* L_5 = ___key0;
uint8_t L_6 = V_0;
uint8_t L_7 = L_6;
uint8_t L_8 = (L_5)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_7));
ByteU5BU5D_t4116647657* L_9 = __this->get_state_13();
int32_t L_10 = V_3;
int32_t L_11 = L_10;
uint8_t L_12 = (L_9)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_11));
uint8_t L_13 = V_1;
V_1 = (uint8_t)(((int32_t)((uint8_t)((int32_t)il2cpp_codegen_add((int32_t)((int32_t)il2cpp_codegen_add((int32_t)L_8, (int32_t)L_12)), (int32_t)L_13)))));
ByteU5BU5D_t4116647657* L_14 = __this->get_state_13();
int32_t L_15 = V_3;
int32_t L_16 = L_15;
uint8_t L_17 = (L_14)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_16));
V_4 = L_17;
ByteU5BU5D_t4116647657* L_18 = __this->get_state_13();
int32_t L_19 = V_3;
ByteU5BU5D_t4116647657* L_20 = __this->get_state_13();
uint8_t L_21 = V_1;
uint8_t L_22 = L_21;
uint8_t L_23 = (L_20)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_22));
(L_18)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(L_19), (uint8_t)L_23);
ByteU5BU5D_t4116647657* L_24 = __this->get_state_13();
uint8_t L_25 = V_1;
uint8_t L_26 = V_4;
(L_24)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(L_25), (uint8_t)L_26);
uint8_t L_27 = V_0;
ByteU5BU5D_t4116647657* L_28 = ___key0;
V_0 = (uint8_t)(((int32_t)((uint8_t)((int32_t)((int32_t)((int32_t)il2cpp_codegen_add((int32_t)L_27, (int32_t)1))%(int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_28)->max_length)))))))));
int32_t L_29 = V_3;
V_3 = ((int32_t)il2cpp_codegen_add((int32_t)L_29, (int32_t)1));
}
IL_007a:
{
int32_t L_30 = V_3;
if ((((int32_t)L_30) < ((int32_t)((int32_t)256))))
{
goto IL_0039;
}
}
{
return;
}
}
// System.Void Mono.Security.Cryptography.ARC4Managed::CheckInput(System.Byte[],System.Int32,System.Int32)
extern "C" IL2CPP_METHOD_ATTR void ARC4Managed_CheckInput_m1562172012 (ARC4Managed_t2641858452 * __this, ByteU5BU5D_t4116647657* ___inputBuffer0, int32_t ___inputOffset1, int32_t ___inputCount2, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (ARC4Managed_CheckInput_m1562172012_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
ByteU5BU5D_t4116647657* L_0 = ___inputBuffer0;
if (L_0)
{
goto IL_0011;
}
}
{
ArgumentNullException_t1615371798 * L_1 = (ArgumentNullException_t1615371798 *)il2cpp_codegen_object_new(ArgumentNullException_t1615371798_il2cpp_TypeInfo_var);
ArgumentNullException__ctor_m1170824041(L_1, _stringLiteral3152468735, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_1, NULL, ARC4Managed_CheckInput_m1562172012_RuntimeMethod_var);
}
IL_0011:
{
int32_t L_2 = ___inputOffset1;
if ((((int32_t)L_2) >= ((int32_t)0)))
{
goto IL_0028;
}
}
{
ArgumentOutOfRangeException_t777629997 * L_3 = (ArgumentOutOfRangeException_t777629997 *)il2cpp_codegen_object_new(ArgumentOutOfRangeException_t777629997_il2cpp_TypeInfo_var);
ArgumentOutOfRangeException__ctor_m282481429(L_3, _stringLiteral2167393519, _stringLiteral3073595182, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_3, NULL, ARC4Managed_CheckInput_m1562172012_RuntimeMethod_var);
}
IL_0028:
{
int32_t L_4 = ___inputCount2;
if ((((int32_t)L_4) >= ((int32_t)0)))
{
goto IL_003f;
}
}
{
ArgumentOutOfRangeException_t777629997 * L_5 = (ArgumentOutOfRangeException_t777629997 *)il2cpp_codegen_object_new(ArgumentOutOfRangeException_t777629997_il2cpp_TypeInfo_var);
ArgumentOutOfRangeException__ctor_m282481429(L_5, _stringLiteral438779933, _stringLiteral3073595182, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_5, NULL, ARC4Managed_CheckInput_m1562172012_RuntimeMethod_var);
}
IL_003f:
{
int32_t L_6 = ___inputOffset1;
ByteU5BU5D_t4116647657* L_7 = ___inputBuffer0;
int32_t L_8 = ___inputCount2;
if ((((int32_t)L_6) <= ((int32_t)((int32_t)il2cpp_codegen_subtract((int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_7)->max_length)))), (int32_t)L_8)))))
{
goto IL_005f;
}
}
{
String_t* L_9 = Locale_GetText_m3520169047(NULL /*static, unused*/, _stringLiteral251636811, /*hidden argument*/NULL);
ArgumentException_t132251570 * L_10 = (ArgumentException_t132251570 *)il2cpp_codegen_object_new(ArgumentException_t132251570_il2cpp_TypeInfo_var);
ArgumentException__ctor_m1216717135(L_10, _stringLiteral3152468735, L_9, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_10, NULL, ARC4Managed_CheckInput_m1562172012_RuntimeMethod_var);
}
IL_005f:
{
return;
}
}
// System.Int32 Mono.Security.Cryptography.ARC4Managed::TransformBlock(System.Byte[],System.Int32,System.Int32,System.Byte[],System.Int32)
extern "C" IL2CPP_METHOD_ATTR int32_t ARC4Managed_TransformBlock_m1687647868 (ARC4Managed_t2641858452 * __this, ByteU5BU5D_t4116647657* ___inputBuffer0, int32_t ___inputOffset1, int32_t ___inputCount2, ByteU5BU5D_t4116647657* ___outputBuffer3, int32_t ___outputOffset4, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (ARC4Managed_TransformBlock_m1687647868_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
ByteU5BU5D_t4116647657* L_0 = ___inputBuffer0;
int32_t L_1 = ___inputOffset1;
int32_t L_2 = ___inputCount2;
ARC4Managed_CheckInput_m1562172012(__this, L_0, L_1, L_2, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_3 = ___outputBuffer3;
if (L_3)
{
goto IL_001b;
}
}
{
ArgumentNullException_t1615371798 * L_4 = (ArgumentNullException_t1615371798 *)il2cpp_codegen_object_new(ArgumentNullException_t1615371798_il2cpp_TypeInfo_var);
ArgumentNullException__ctor_m1170824041(L_4, _stringLiteral2053830539, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_4, NULL, ARC4Managed_TransformBlock_m1687647868_RuntimeMethod_var);
}
IL_001b:
{
int32_t L_5 = ___outputOffset4;
if ((((int32_t)L_5) >= ((int32_t)0)))
{
goto IL_0033;
}
}
{
ArgumentOutOfRangeException_t777629997 * L_6 = (ArgumentOutOfRangeException_t777629997 *)il2cpp_codegen_object_new(ArgumentOutOfRangeException_t777629997_il2cpp_TypeInfo_var);
ArgumentOutOfRangeException__ctor_m282481429(L_6, _stringLiteral1561769044, _stringLiteral3073595182, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_6, NULL, ARC4Managed_TransformBlock_m1687647868_RuntimeMethod_var);
}
IL_0033:
{
int32_t L_7 = ___outputOffset4;
ByteU5BU5D_t4116647657* L_8 = ___outputBuffer3;
int32_t L_9 = ___inputCount2;
if ((((int32_t)L_7) <= ((int32_t)((int32_t)il2cpp_codegen_subtract((int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_8)->max_length)))), (int32_t)L_9)))))
{
goto IL_0055;
}
}
{
String_t* L_10 = Locale_GetText_m3520169047(NULL /*static, unused*/, _stringLiteral251636811, /*hidden argument*/NULL);
ArgumentException_t132251570 * L_11 = (ArgumentException_t132251570 *)il2cpp_codegen_object_new(ArgumentException_t132251570_il2cpp_TypeInfo_var);
ArgumentException__ctor_m1216717135(L_11, _stringLiteral2053830539, L_10, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_11, NULL, ARC4Managed_TransformBlock_m1687647868_RuntimeMethod_var);
}
IL_0055:
{
ByteU5BU5D_t4116647657* L_12 = ___inputBuffer0;
int32_t L_13 = ___inputOffset1;
int32_t L_14 = ___inputCount2;
ByteU5BU5D_t4116647657* L_15 = ___outputBuffer3;
int32_t L_16 = ___outputOffset4;
int32_t L_17 = ARC4Managed_InternalTransformBlock_m1047162329(__this, L_12, L_13, L_14, L_15, L_16, /*hidden argument*/NULL);
return L_17;
}
}
// System.Int32 Mono.Security.Cryptography.ARC4Managed::InternalTransformBlock(System.Byte[],System.Int32,System.Int32,System.Byte[],System.Int32)
extern "C" IL2CPP_METHOD_ATTR int32_t ARC4Managed_InternalTransformBlock_m1047162329 (ARC4Managed_t2641858452 * __this, ByteU5BU5D_t4116647657* ___inputBuffer0, int32_t ___inputOffset1, int32_t ___inputCount2, ByteU5BU5D_t4116647657* ___outputBuffer3, int32_t ___outputOffset4, const RuntimeMethod* method)
{
uint8_t V_0 = 0x0;
int32_t V_1 = 0;
uint8_t V_2 = 0x0;
{
V_1 = 0;
goto IL_009e;
}
IL_0007:
{
uint8_t L_0 = __this->get_x_14();
__this->set_x_14((uint8_t)(((int32_t)((uint8_t)((int32_t)il2cpp_codegen_add((int32_t)L_0, (int32_t)1))))));
ByteU5BU5D_t4116647657* L_1 = __this->get_state_13();
uint8_t L_2 = __this->get_x_14();
uint8_t L_3 = L_2;
uint8_t L_4 = (L_1)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_3));
uint8_t L_5 = __this->get_y_15();
__this->set_y_15((uint8_t)(((int32_t)((uint8_t)((int32_t)il2cpp_codegen_add((int32_t)L_4, (int32_t)L_5))))));
ByteU5BU5D_t4116647657* L_6 = __this->get_state_13();
uint8_t L_7 = __this->get_x_14();
uint8_t L_8 = L_7;
uint8_t L_9 = (L_6)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_8));
V_2 = L_9;
ByteU5BU5D_t4116647657* L_10 = __this->get_state_13();
uint8_t L_11 = __this->get_x_14();
ByteU5BU5D_t4116647657* L_12 = __this->get_state_13();
uint8_t L_13 = __this->get_y_15();
uint8_t L_14 = L_13;
uint8_t L_15 = (L_12)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_14));
(L_10)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(L_11), (uint8_t)L_15);
ByteU5BU5D_t4116647657* L_16 = __this->get_state_13();
uint8_t L_17 = __this->get_y_15();
uint8_t L_18 = V_2;
(L_16)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(L_17), (uint8_t)L_18);
ByteU5BU5D_t4116647657* L_19 = __this->get_state_13();
uint8_t L_20 = __this->get_x_14();
uint8_t L_21 = L_20;
uint8_t L_22 = (L_19)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_21));
ByteU5BU5D_t4116647657* L_23 = __this->get_state_13();
uint8_t L_24 = __this->get_y_15();
uint8_t L_25 = L_24;
uint8_t L_26 = (L_23)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_25));
V_0 = (uint8_t)(((int32_t)((uint8_t)((int32_t)il2cpp_codegen_add((int32_t)L_22, (int32_t)L_26)))));
ByteU5BU5D_t4116647657* L_27 = ___outputBuffer3;
int32_t L_28 = ___outputOffset4;
int32_t L_29 = V_1;
ByteU5BU5D_t4116647657* L_30 = ___inputBuffer0;
int32_t L_31 = ___inputOffset1;
int32_t L_32 = V_1;
int32_t L_33 = ((int32_t)il2cpp_codegen_add((int32_t)L_31, (int32_t)L_32));
uint8_t L_34 = (L_30)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_33));
ByteU5BU5D_t4116647657* L_35 = __this->get_state_13();
uint8_t L_36 = V_0;
uint8_t L_37 = L_36;
uint8_t L_38 = (L_35)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_37));
(L_27)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(((int32_t)il2cpp_codegen_add((int32_t)L_28, (int32_t)L_29))), (uint8_t)(((int32_t)((uint8_t)((int32_t)((int32_t)L_34^(int32_t)L_38))))));
int32_t L_39 = V_1;
V_1 = ((int32_t)il2cpp_codegen_add((int32_t)L_39, (int32_t)1));
}
IL_009e:
{
int32_t L_40 = V_1;
int32_t L_41 = ___inputCount2;
if ((((int32_t)L_40) < ((int32_t)L_41)))
{
goto IL_0007;
}
}
{
int32_t L_42 = ___inputCount2;
return L_42;
}
}
// System.Byte[] Mono.Security.Cryptography.ARC4Managed::TransformFinalBlock(System.Byte[],System.Int32,System.Int32)
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* ARC4Managed_TransformFinalBlock_m2223084380 (ARC4Managed_t2641858452 * __this, ByteU5BU5D_t4116647657* ___inputBuffer0, int32_t ___inputOffset1, int32_t ___inputCount2, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (ARC4Managed_TransformFinalBlock_m2223084380_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
ByteU5BU5D_t4116647657* V_0 = NULL;
{
ByteU5BU5D_t4116647657* L_0 = ___inputBuffer0;
int32_t L_1 = ___inputOffset1;
int32_t L_2 = ___inputCount2;
ARC4Managed_CheckInput_m1562172012(__this, L_0, L_1, L_2, /*hidden argument*/NULL);
int32_t L_3 = ___inputCount2;
ByteU5BU5D_t4116647657* L_4 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)L_3);
V_0 = L_4;
ByteU5BU5D_t4116647657* L_5 = ___inputBuffer0;
int32_t L_6 = ___inputOffset1;
int32_t L_7 = ___inputCount2;
ByteU5BU5D_t4116647657* L_8 = V_0;
ARC4Managed_InternalTransformBlock_m1047162329(__this, L_5, L_6, L_7, L_8, 0, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_9 = V_0;
return L_9;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.String Mono.Security.Cryptography.CryptoConvert::ToHex(System.Byte[])
extern "C" IL2CPP_METHOD_ATTR String_t* CryptoConvert_ToHex_m4034982758 (RuntimeObject * __this /* static, unused */, ByteU5BU5D_t4116647657* ___input0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (CryptoConvert_ToHex_m4034982758_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
StringBuilder_t * V_0 = NULL;
uint8_t V_1 = 0x0;
ByteU5BU5D_t4116647657* V_2 = NULL;
int32_t V_3 = 0;
{
ByteU5BU5D_t4116647657* L_0 = ___input0;
if (L_0)
{
goto IL_0008;
}
}
{
return (String_t*)NULL;
}
IL_0008:
{
ByteU5BU5D_t4116647657* L_1 = ___input0;
StringBuilder_t * L_2 = (StringBuilder_t *)il2cpp_codegen_object_new(StringBuilder_t_il2cpp_TypeInfo_var);
StringBuilder__ctor_m2367297767(L_2, ((int32_t)il2cpp_codegen_multiply((int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_1)->max_length)))), (int32_t)2)), /*hidden argument*/NULL);
V_0 = L_2;
ByteU5BU5D_t4116647657* L_3 = ___input0;
V_2 = L_3;
V_3 = 0;
goto IL_003c;
}
IL_001c:
{
ByteU5BU5D_t4116647657* L_4 = V_2;
int32_t L_5 = V_3;
int32_t L_6 = L_5;
uint8_t L_7 = (L_4)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_6));
V_1 = L_7;
StringBuilder_t * L_8 = V_0;
IL2CPP_RUNTIME_CLASS_INIT(CultureInfo_t4157843068_il2cpp_TypeInfo_var);
CultureInfo_t4157843068 * L_9 = CultureInfo_get_InvariantCulture_m3532445182(NULL /*static, unused*/, /*hidden argument*/NULL);
String_t* L_10 = Byte_ToString_m4063101981((uint8_t*)(&V_1), _stringLiteral3451435000, L_9, /*hidden argument*/NULL);
StringBuilder_Append_m1965104174(L_8, L_10, /*hidden argument*/NULL);
int32_t L_11 = V_3;
V_3 = ((int32_t)il2cpp_codegen_add((int32_t)L_11, (int32_t)1));
}
IL_003c:
{
int32_t L_12 = V_3;
ByteU5BU5D_t4116647657* L_13 = V_2;
if ((((int32_t)L_12) < ((int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_13)->max_length)))))))
{
goto IL_001c;
}
}
{
StringBuilder_t * L_14 = V_0;
String_t* L_15 = StringBuilder_ToString_m3317489284(L_14, /*hidden argument*/NULL);
return L_15;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void Mono.Security.Cryptography.HMAC::.ctor(System.String,System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void HMAC__ctor_m775015853 (HMAC_t3689525210 * __this, String_t* ___hashName0, ByteU5BU5D_t4116647657* ___rgbKey1, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (HMAC__ctor_m775015853_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
KeyedHashAlgorithm__ctor_m4053775756(__this, /*hidden argument*/NULL);
String_t* L_0 = ___hashName0;
if (!L_0)
{
goto IL_0017;
}
}
{
String_t* L_1 = ___hashName0;
int32_t L_2 = String_get_Length_m3847582255(L_1, /*hidden argument*/NULL);
if (L_2)
{
goto IL_001e;
}
}
IL_0017:
{
___hashName0 = _stringLiteral3839139460;
}
IL_001e:
{
String_t* L_3 = ___hashName0;
HashAlgorithm_t1432317219 * L_4 = HashAlgorithm_Create_m644612360(NULL /*static, unused*/, L_3, /*hidden argument*/NULL);
__this->set_hash_5(L_4);
HashAlgorithm_t1432317219 * L_5 = __this->get_hash_5();
int32_t L_6 = VirtFuncInvoker0< int32_t >::Invoke(12 /* System.Int32 System.Security.Cryptography.HashAlgorithm::get_HashSize() */, L_5);
((HashAlgorithm_t1432317219 *)__this)->set_HashSizeValue_1(L_6);
ByteU5BU5D_t4116647657* L_7 = ___rgbKey1;
if ((((int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_7)->max_length))))) <= ((int32_t)((int32_t)64))))
{
goto IL_005c;
}
}
{
HashAlgorithm_t1432317219 * L_8 = __this->get_hash_5();
ByteU5BU5D_t4116647657* L_9 = ___rgbKey1;
ByteU5BU5D_t4116647657* L_10 = HashAlgorithm_ComputeHash_m2825542963(L_8, L_9, /*hidden argument*/NULL);
((KeyedHashAlgorithm_t112861511 *)__this)->set_KeyValue_4(L_10);
goto IL_006d;
}
IL_005c:
{
ByteU5BU5D_t4116647657* L_11 = ___rgbKey1;
RuntimeObject * L_12 = Array_Clone_m2672907798((RuntimeArray *)(RuntimeArray *)L_11, /*hidden argument*/NULL);
((KeyedHashAlgorithm_t112861511 *)__this)->set_KeyValue_4(((ByteU5BU5D_t4116647657*)Castclass((RuntimeObject*)L_12, ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var)));
}
IL_006d:
{
VirtActionInvoker0::Invoke(13 /* System.Void Mono.Security.Cryptography.HMAC::Initialize() */, __this);
return;
}
}
// System.Byte[] Mono.Security.Cryptography.HMAC::get_Key()
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* HMAC_get_Key_m1410673610 (HMAC_t3689525210 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (HMAC_get_Key_m1410673610_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
ByteU5BU5D_t4116647657* L_0 = ((KeyedHashAlgorithm_t112861511 *)__this)->get_KeyValue_4();
RuntimeObject * L_1 = Array_Clone_m2672907798((RuntimeArray *)(RuntimeArray *)L_0, /*hidden argument*/NULL);
return ((ByteU5BU5D_t4116647657*)Castclass((RuntimeObject*)L_1, ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var));
}
}
// System.Void Mono.Security.Cryptography.HMAC::set_Key(System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void HMAC_set_Key_m3535779141 (HMAC_t3689525210 * __this, ByteU5BU5D_t4116647657* ___value0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (HMAC_set_Key_m3535779141_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
bool L_0 = __this->get_hashing_6();
if (!L_0)
{
goto IL_0016;
}
}
{
Exception_t * L_1 = (Exception_t *)il2cpp_codegen_object_new(Exception_t_il2cpp_TypeInfo_var);
Exception__ctor_m1152696503(L_1, _stringLiteral3906129098, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_1, NULL, HMAC_set_Key_m3535779141_RuntimeMethod_var);
}
IL_0016:
{
ByteU5BU5D_t4116647657* L_2 = ___value0;
if ((((int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_2)->max_length))))) <= ((int32_t)((int32_t)64))))
{
goto IL_0037;
}
}
{
HashAlgorithm_t1432317219 * L_3 = __this->get_hash_5();
ByteU5BU5D_t4116647657* L_4 = ___value0;
ByteU5BU5D_t4116647657* L_5 = HashAlgorithm_ComputeHash_m2825542963(L_3, L_4, /*hidden argument*/NULL);
((KeyedHashAlgorithm_t112861511 *)__this)->set_KeyValue_4(L_5);
goto IL_0048;
}
IL_0037:
{
ByteU5BU5D_t4116647657* L_6 = ___value0;
RuntimeObject * L_7 = Array_Clone_m2672907798((RuntimeArray *)(RuntimeArray *)L_6, /*hidden argument*/NULL);
((KeyedHashAlgorithm_t112861511 *)__this)->set_KeyValue_4(((ByteU5BU5D_t4116647657*)Castclass((RuntimeObject*)L_7, ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var)));
}
IL_0048:
{
HMAC_initializePad_m59014980(__this, /*hidden argument*/NULL);
return;
}
}
// System.Void Mono.Security.Cryptography.HMAC::Initialize()
extern "C" IL2CPP_METHOD_ATTR void HMAC_Initialize_m4068357959 (HMAC_t3689525210 * __this, const RuntimeMethod* method)
{
{
HashAlgorithm_t1432317219 * L_0 = __this->get_hash_5();
VirtActionInvoker0::Invoke(13 /* System.Void System.Security.Cryptography.HashAlgorithm::Initialize() */, L_0);
HMAC_initializePad_m59014980(__this, /*hidden argument*/NULL);
__this->set_hashing_6((bool)0);
return;
}
}
// System.Byte[] Mono.Security.Cryptography.HMAC::HashFinal()
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* HMAC_HashFinal_m1453827676 (HMAC_t3689525210 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (HMAC_HashFinal_m1453827676_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
ByteU5BU5D_t4116647657* V_0 = NULL;
{
bool L_0 = __this->get_hashing_6();
if (L_0)
{
goto IL_0034;
}
}
{
HashAlgorithm_t1432317219 * L_1 = __this->get_hash_5();
ByteU5BU5D_t4116647657* L_2 = __this->get_innerPad_7();
ByteU5BU5D_t4116647657* L_3 = __this->get_innerPad_7();
ByteU5BU5D_t4116647657* L_4 = __this->get_innerPad_7();
HashAlgorithm_TransformBlock_m4006041779(L_1, L_2, 0, (((int32_t)((int32_t)(((RuntimeArray *)L_3)->max_length)))), L_4, 0, /*hidden argument*/NULL);
__this->set_hashing_6((bool)1);
}
IL_0034:
{
HashAlgorithm_t1432317219 * L_5 = __this->get_hash_5();
ByteU5BU5D_t4116647657* L_6 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)0);
HashAlgorithm_TransformFinalBlock_m3005451348(L_5, L_6, 0, 0, /*hidden argument*/NULL);
HashAlgorithm_t1432317219 * L_7 = __this->get_hash_5();
ByteU5BU5D_t4116647657* L_8 = VirtFuncInvoker0< ByteU5BU5D_t4116647657* >::Invoke(9 /* System.Byte[] System.Security.Cryptography.HashAlgorithm::get_Hash() */, L_7);
V_0 = L_8;
HashAlgorithm_t1432317219 * L_9 = __this->get_hash_5();
VirtActionInvoker0::Invoke(13 /* System.Void System.Security.Cryptography.HashAlgorithm::Initialize() */, L_9);
HashAlgorithm_t1432317219 * L_10 = __this->get_hash_5();
ByteU5BU5D_t4116647657* L_11 = __this->get_outerPad_8();
ByteU5BU5D_t4116647657* L_12 = __this->get_outerPad_8();
ByteU5BU5D_t4116647657* L_13 = __this->get_outerPad_8();
HashAlgorithm_TransformBlock_m4006041779(L_10, L_11, 0, (((int32_t)((int32_t)(((RuntimeArray *)L_12)->max_length)))), L_13, 0, /*hidden argument*/NULL);
HashAlgorithm_t1432317219 * L_14 = __this->get_hash_5();
ByteU5BU5D_t4116647657* L_15 = V_0;
ByteU5BU5D_t4116647657* L_16 = V_0;
HashAlgorithm_TransformFinalBlock_m3005451348(L_14, L_15, 0, (((int32_t)((int32_t)(((RuntimeArray *)L_16)->max_length)))), /*hidden argument*/NULL);
VirtActionInvoker0::Invoke(13 /* System.Void Mono.Security.Cryptography.HMAC::Initialize() */, __this);
HashAlgorithm_t1432317219 * L_17 = __this->get_hash_5();
ByteU5BU5D_t4116647657* L_18 = VirtFuncInvoker0< ByteU5BU5D_t4116647657* >::Invoke(9 /* System.Byte[] System.Security.Cryptography.HashAlgorithm::get_Hash() */, L_17);
return L_18;
}
}
// System.Void Mono.Security.Cryptography.HMAC::HashCore(System.Byte[],System.Int32,System.Int32)
extern "C" IL2CPP_METHOD_ATTR void HMAC_HashCore_m1045651335 (HMAC_t3689525210 * __this, ByteU5BU5D_t4116647657* ___array0, int32_t ___ibStart1, int32_t ___cbSize2, const RuntimeMethod* method)
{
{
bool L_0 = __this->get_hashing_6();
if (L_0)
{
goto IL_0034;
}
}
{
HashAlgorithm_t1432317219 * L_1 = __this->get_hash_5();
ByteU5BU5D_t4116647657* L_2 = __this->get_innerPad_7();
ByteU5BU5D_t4116647657* L_3 = __this->get_innerPad_7();
ByteU5BU5D_t4116647657* L_4 = __this->get_innerPad_7();
HashAlgorithm_TransformBlock_m4006041779(L_1, L_2, 0, (((int32_t)((int32_t)(((RuntimeArray *)L_3)->max_length)))), L_4, 0, /*hidden argument*/NULL);
__this->set_hashing_6((bool)1);
}
IL_0034:
{
HashAlgorithm_t1432317219 * L_5 = __this->get_hash_5();
ByteU5BU5D_t4116647657* L_6 = ___array0;
int32_t L_7 = ___ibStart1;
int32_t L_8 = ___cbSize2;
ByteU5BU5D_t4116647657* L_9 = ___array0;
int32_t L_10 = ___ibStart1;
HashAlgorithm_TransformBlock_m4006041779(L_5, L_6, L_7, L_8, L_9, L_10, /*hidden argument*/NULL);
return;
}
}
// System.Void Mono.Security.Cryptography.HMAC::initializePad()
extern "C" IL2CPP_METHOD_ATTR void HMAC_initializePad_m59014980 (HMAC_t3689525210 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (HMAC_initializePad_m59014980_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
int32_t V_0 = 0;
int32_t V_1 = 0;
{
ByteU5BU5D_t4116647657* L_0 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)((int32_t)64));
__this->set_innerPad_7(L_0);
ByteU5BU5D_t4116647657* L_1 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)((int32_t)64));
__this->set_outerPad_8(L_1);
V_0 = 0;
goto IL_004d;
}
IL_0021:
{
ByteU5BU5D_t4116647657* L_2 = __this->get_innerPad_7();
int32_t L_3 = V_0;
ByteU5BU5D_t4116647657* L_4 = ((KeyedHashAlgorithm_t112861511 *)__this)->get_KeyValue_4();
int32_t L_5 = V_0;
int32_t L_6 = L_5;
uint8_t L_7 = (L_4)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_6));
(L_2)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(L_3), (uint8_t)(((int32_t)((uint8_t)((int32_t)((int32_t)L_7^(int32_t)((int32_t)54)))))));
ByteU5BU5D_t4116647657* L_8 = __this->get_outerPad_8();
int32_t L_9 = V_0;
ByteU5BU5D_t4116647657* L_10 = ((KeyedHashAlgorithm_t112861511 *)__this)->get_KeyValue_4();
int32_t L_11 = V_0;
int32_t L_12 = L_11;
uint8_t L_13 = (L_10)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_12));
(L_8)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(L_9), (uint8_t)(((int32_t)((uint8_t)((int32_t)((int32_t)L_13^(int32_t)((int32_t)92)))))));
int32_t L_14 = V_0;
V_0 = ((int32_t)il2cpp_codegen_add((int32_t)L_14, (int32_t)1));
}
IL_004d:
{
int32_t L_15 = V_0;
ByteU5BU5D_t4116647657* L_16 = ((KeyedHashAlgorithm_t112861511 *)__this)->get_KeyValue_4();
if ((((int32_t)L_15) < ((int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_16)->max_length)))))))
{
goto IL_0021;
}
}
{
ByteU5BU5D_t4116647657* L_17 = ((KeyedHashAlgorithm_t112861511 *)__this)->get_KeyValue_4();
V_1 = (((int32_t)((int32_t)(((RuntimeArray *)L_17)->max_length))));
goto IL_0081;
}
IL_0069:
{
ByteU5BU5D_t4116647657* L_18 = __this->get_innerPad_7();
int32_t L_19 = V_1;
(L_18)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(L_19), (uint8_t)((int32_t)54));
ByteU5BU5D_t4116647657* L_20 = __this->get_outerPad_8();
int32_t L_21 = V_1;
(L_20)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(L_21), (uint8_t)((int32_t)92));
int32_t L_22 = V_1;
V_1 = ((int32_t)il2cpp_codegen_add((int32_t)L_22, (int32_t)1));
}
IL_0081:
{
int32_t L_23 = V_1;
if ((((int32_t)L_23) < ((int32_t)((int32_t)64))))
{
goto IL_0069;
}
}
{
return;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Security.Cryptography.RandomNumberGenerator Mono.Security.Cryptography.KeyBuilder::get_Rng()
extern "C" IL2CPP_METHOD_ATTR RandomNumberGenerator_t386037858 * KeyBuilder_get_Rng_m983065666 (RuntimeObject * __this /* static, unused */, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (KeyBuilder_get_Rng_m983065666_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
RandomNumberGenerator_t386037858 * L_0 = ((KeyBuilder_t2049230355_StaticFields*)il2cpp_codegen_static_fields_for(KeyBuilder_t2049230355_il2cpp_TypeInfo_var))->get_rng_0();
if (L_0)
{
goto IL_0014;
}
}
{
RandomNumberGenerator_t386037858 * L_1 = RandomNumberGenerator_Create_m4162970280(NULL /*static, unused*/, /*hidden argument*/NULL);
((KeyBuilder_t2049230355_StaticFields*)il2cpp_codegen_static_fields_for(KeyBuilder_t2049230355_il2cpp_TypeInfo_var))->set_rng_0(L_1);
}
IL_0014:
{
RandomNumberGenerator_t386037858 * L_2 = ((KeyBuilder_t2049230355_StaticFields*)il2cpp_codegen_static_fields_for(KeyBuilder_t2049230355_il2cpp_TypeInfo_var))->get_rng_0();
return L_2;
}
}
// System.Byte[] Mono.Security.Cryptography.KeyBuilder::Key(System.Int32)
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* KeyBuilder_Key_m1482371611 (RuntimeObject * __this /* static, unused */, int32_t ___size0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (KeyBuilder_Key_m1482371611_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
ByteU5BU5D_t4116647657* V_0 = NULL;
{
int32_t L_0 = ___size0;
ByteU5BU5D_t4116647657* L_1 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)L_0);
V_0 = L_1;
RandomNumberGenerator_t386037858 * L_2 = KeyBuilder_get_Rng_m983065666(NULL /*static, unused*/, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_3 = V_0;
VirtActionInvoker1< ByteU5BU5D_t4116647657* >::Invoke(4 /* System.Void System.Security.Cryptography.RandomNumberGenerator::GetBytes(System.Byte[]) */, L_2, L_3);
ByteU5BU5D_t4116647657* L_4 = V_0;
return L_4;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void Mono.Security.Cryptography.MD2::.ctor()
extern "C" IL2CPP_METHOD_ATTR void MD2__ctor_m2402458789 (MD2_t1561046427 * __this, const RuntimeMethod* method)
{
{
HashAlgorithm__ctor_m190815979(__this, /*hidden argument*/NULL);
((HashAlgorithm_t1432317219 *)__this)->set_HashSizeValue_1(((int32_t)128));
return;
}
}
// Mono.Security.Cryptography.MD2 Mono.Security.Cryptography.MD2::Create()
extern "C" IL2CPP_METHOD_ATTR MD2_t1561046427 * MD2_Create_m3511476020 (RuntimeObject * __this /* static, unused */, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (MD2_Create_m3511476020_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
MD2_t1561046427 * L_0 = MD2_Create_m1292792200(NULL /*static, unused*/, _stringLiteral4242423987, /*hidden argument*/NULL);
return L_0;
}
}
// Mono.Security.Cryptography.MD2 Mono.Security.Cryptography.MD2::Create(System.String)
extern "C" IL2CPP_METHOD_ATTR MD2_t1561046427 * MD2_Create_m1292792200 (RuntimeObject * __this /* static, unused */, String_t* ___hashName0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (MD2_Create_m1292792200_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
RuntimeObject * V_0 = NULL;
{
String_t* L_0 = ___hashName0;
IL2CPP_RUNTIME_CLASS_INIT(CryptoConfig_t4201145714_il2cpp_TypeInfo_var);
RuntimeObject * L_1 = CryptoConfig_CreateFromName_m1538277313(NULL /*static, unused*/, L_0, /*hidden argument*/NULL);
V_0 = L_1;
RuntimeObject * L_2 = V_0;
if (L_2)
{
goto IL_0013;
}
}
{
MD2Managed_t1377101535 * L_3 = (MD2Managed_t1377101535 *)il2cpp_codegen_object_new(MD2Managed_t1377101535_il2cpp_TypeInfo_var);
MD2Managed__ctor_m3243422744(L_3, /*hidden argument*/NULL);
V_0 = L_3;
}
IL_0013:
{
RuntimeObject * L_4 = V_0;
return ((MD2_t1561046427 *)CastclassClass((RuntimeObject*)L_4, MD2_t1561046427_il2cpp_TypeInfo_var));
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void Mono.Security.Cryptography.MD2Managed::.ctor()
extern "C" IL2CPP_METHOD_ATTR void MD2Managed__ctor_m3243422744 (MD2Managed_t1377101535 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (MD2Managed__ctor_m3243422744_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
MD2__ctor_m2402458789(__this, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_0 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)((int32_t)16));
__this->set_state_4(L_0);
ByteU5BU5D_t4116647657* L_1 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)((int32_t)16));
__this->set_checksum_5(L_1);
ByteU5BU5D_t4116647657* L_2 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)((int32_t)16));
__this->set_buffer_6(L_2);
ByteU5BU5D_t4116647657* L_3 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)((int32_t)48));
__this->set_x_8(L_3);
VirtActionInvoker0::Invoke(13 /* System.Void Mono.Security.Cryptography.MD2Managed::Initialize() */, __this);
return;
}
}
// System.Void Mono.Security.Cryptography.MD2Managed::.cctor()
extern "C" IL2CPP_METHOD_ATTR void MD2Managed__cctor_m1915574725 (RuntimeObject * __this /* static, unused */, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (MD2Managed__cctor_m1915574725_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
ByteU5BU5D_t4116647657* L_0 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)((int32_t)256));
ByteU5BU5D_t4116647657* L_1 = L_0;
RuntimeFieldHandle_t1871169219 L_2 = { reinterpret_cast<intptr_t> (U3CPrivateImplementationDetailsU3E_t3057255363____U24U24fieldU2D5_1_FieldInfo_var) };
RuntimeHelpers_InitializeArray_m3117905507(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_1, L_2, /*hidden argument*/NULL);
((MD2Managed_t1377101535_StaticFields*)il2cpp_codegen_static_fields_for(MD2Managed_t1377101535_il2cpp_TypeInfo_var))->set_PI_SUBST_9(L_1);
return;
}
}
// System.Byte[] Mono.Security.Cryptography.MD2Managed::Padding(System.Int32)
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* MD2Managed_Padding_m1334210368 (MD2Managed_t1377101535 * __this, int32_t ___nLength0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (MD2Managed_Padding_m1334210368_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
ByteU5BU5D_t4116647657* V_0 = NULL;
int32_t V_1 = 0;
{
int32_t L_0 = ___nLength0;
if ((((int32_t)L_0) <= ((int32_t)0)))
{
goto IL_0029;
}
}
{
int32_t L_1 = ___nLength0;
ByteU5BU5D_t4116647657* L_2 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)L_1);
V_0 = L_2;
V_1 = 0;
goto IL_001e;
}
IL_0015:
{
ByteU5BU5D_t4116647657* L_3 = V_0;
int32_t L_4 = V_1;
int32_t L_5 = ___nLength0;
(L_3)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(L_4), (uint8_t)(((int32_t)((uint8_t)L_5))));
int32_t L_6 = V_1;
V_1 = ((int32_t)il2cpp_codegen_add((int32_t)L_6, (int32_t)1));
}
IL_001e:
{
int32_t L_7 = V_1;
ByteU5BU5D_t4116647657* L_8 = V_0;
if ((((int32_t)L_7) < ((int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_8)->max_length)))))))
{
goto IL_0015;
}
}
{
ByteU5BU5D_t4116647657* L_9 = V_0;
return L_9;
}
IL_0029:
{
return (ByteU5BU5D_t4116647657*)NULL;
}
}
// System.Void Mono.Security.Cryptography.MD2Managed::Initialize()
extern "C" IL2CPP_METHOD_ATTR void MD2Managed_Initialize_m2341076836 (MD2Managed_t1377101535 * __this, const RuntimeMethod* method)
{
{
__this->set_count_7(0);
ByteU5BU5D_t4116647657* L_0 = __this->get_state_4();
Array_Clear_m2231608178(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_0, 0, ((int32_t)16), /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_1 = __this->get_checksum_5();
Array_Clear_m2231608178(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_1, 0, ((int32_t)16), /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_2 = __this->get_buffer_6();
Array_Clear_m2231608178(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_2, 0, ((int32_t)16), /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_3 = __this->get_x_8();
Array_Clear_m2231608178(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_3, 0, ((int32_t)48), /*hidden argument*/NULL);
return;
}
}
// System.Void Mono.Security.Cryptography.MD2Managed::HashCore(System.Byte[],System.Int32,System.Int32)
extern "C" IL2CPP_METHOD_ATTR void MD2Managed_HashCore_m1280598655 (MD2Managed_t1377101535 * __this, ByteU5BU5D_t4116647657* ___array0, int32_t ___ibStart1, int32_t ___cbSize2, const RuntimeMethod* method)
{
int32_t V_0 = 0;
int32_t V_1 = 0;
int32_t V_2 = 0;
{
int32_t L_0 = __this->get_count_7();
V_1 = L_0;
int32_t L_1 = V_1;
int32_t L_2 = ___cbSize2;
__this->set_count_7(((int32_t)((int32_t)((int32_t)il2cpp_codegen_add((int32_t)L_1, (int32_t)L_2))&(int32_t)((int32_t)15))));
int32_t L_3 = V_1;
V_2 = ((int32_t)il2cpp_codegen_subtract((int32_t)((int32_t)16), (int32_t)L_3));
int32_t L_4 = ___cbSize2;
int32_t L_5 = V_2;
if ((((int32_t)L_4) < ((int32_t)L_5)))
{
goto IL_0078;
}
}
{
ByteU5BU5D_t4116647657* L_6 = ___array0;
int32_t L_7 = ___ibStart1;
ByteU5BU5D_t4116647657* L_8 = __this->get_buffer_6();
int32_t L_9 = V_1;
int32_t L_10 = V_2;
Buffer_BlockCopy_m2884209081(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_6, L_7, (RuntimeArray *)(RuntimeArray *)L_8, L_9, L_10, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_11 = __this->get_state_4();
ByteU5BU5D_t4116647657* L_12 = __this->get_checksum_5();
ByteU5BU5D_t4116647657* L_13 = __this->get_buffer_6();
MD2Managed_MD2Transform_m3143426291(__this, L_11, L_12, L_13, 0, /*hidden argument*/NULL);
int32_t L_14 = V_2;
V_0 = L_14;
goto IL_0067;
}
IL_004e:
{
ByteU5BU5D_t4116647657* L_15 = __this->get_state_4();
ByteU5BU5D_t4116647657* L_16 = __this->get_checksum_5();
ByteU5BU5D_t4116647657* L_17 = ___array0;
int32_t L_18 = V_0;
MD2Managed_MD2Transform_m3143426291(__this, L_15, L_16, L_17, L_18, /*hidden argument*/NULL);
int32_t L_19 = V_0;
V_0 = ((int32_t)il2cpp_codegen_add((int32_t)L_19, (int32_t)((int32_t)16)));
}
IL_0067:
{
int32_t L_20 = V_0;
int32_t L_21 = ___cbSize2;
if ((((int32_t)((int32_t)il2cpp_codegen_add((int32_t)L_20, (int32_t)((int32_t)15)))) < ((int32_t)L_21)))
{
goto IL_004e;
}
}
{
V_1 = 0;
goto IL_007a;
}
IL_0078:
{
V_0 = 0;
}
IL_007a:
{
ByteU5BU5D_t4116647657* L_22 = ___array0;
int32_t L_23 = ___ibStart1;
int32_t L_24 = V_0;
ByteU5BU5D_t4116647657* L_25 = __this->get_buffer_6();
int32_t L_26 = V_1;
int32_t L_27 = ___cbSize2;
int32_t L_28 = V_0;
Buffer_BlockCopy_m2884209081(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_22, ((int32_t)il2cpp_codegen_add((int32_t)L_23, (int32_t)L_24)), (RuntimeArray *)(RuntimeArray *)L_25, L_26, ((int32_t)il2cpp_codegen_subtract((int32_t)L_27, (int32_t)L_28)), /*hidden argument*/NULL);
return;
}
}
// System.Byte[] Mono.Security.Cryptography.MD2Managed::HashFinal()
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* MD2Managed_HashFinal_m808964912 (MD2Managed_t1377101535 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (MD2Managed_HashFinal_m808964912_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
int32_t V_0 = 0;
int32_t V_1 = 0;
ByteU5BU5D_t4116647657* V_2 = NULL;
{
int32_t L_0 = __this->get_count_7();
V_0 = L_0;
int32_t L_1 = V_0;
V_1 = ((int32_t)il2cpp_codegen_subtract((int32_t)((int32_t)16), (int32_t)L_1));
int32_t L_2 = V_1;
if ((((int32_t)L_2) <= ((int32_t)0)))
{
goto IL_0022;
}
}
{
int32_t L_3 = V_1;
ByteU5BU5D_t4116647657* L_4 = MD2Managed_Padding_m1334210368(__this, L_3, /*hidden argument*/NULL);
int32_t L_5 = V_1;
VirtActionInvoker3< ByteU5BU5D_t4116647657*, int32_t, int32_t >::Invoke(10 /* System.Void Mono.Security.Cryptography.MD2Managed::HashCore(System.Byte[],System.Int32,System.Int32) */, __this, L_4, 0, L_5);
}
IL_0022:
{
ByteU5BU5D_t4116647657* L_6 = __this->get_checksum_5();
VirtActionInvoker3< ByteU5BU5D_t4116647657*, int32_t, int32_t >::Invoke(10 /* System.Void Mono.Security.Cryptography.MD2Managed::HashCore(System.Byte[],System.Int32,System.Int32) */, __this, L_6, 0, ((int32_t)16));
ByteU5BU5D_t4116647657* L_7 = __this->get_state_4();
RuntimeObject * L_8 = Array_Clone_m2672907798((RuntimeArray *)(RuntimeArray *)L_7, /*hidden argument*/NULL);
V_2 = ((ByteU5BU5D_t4116647657*)Castclass((RuntimeObject*)L_8, ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var));
VirtActionInvoker0::Invoke(13 /* System.Void Mono.Security.Cryptography.MD2Managed::Initialize() */, __this);
ByteU5BU5D_t4116647657* L_9 = V_2;
return L_9;
}
}
// System.Void Mono.Security.Cryptography.MD2Managed::MD2Transform(System.Byte[],System.Byte[],System.Byte[],System.Int32)
extern "C" IL2CPP_METHOD_ATTR void MD2Managed_MD2Transform_m3143426291 (MD2Managed_t1377101535 * __this, ByteU5BU5D_t4116647657* ___state0, ByteU5BU5D_t4116647657* ___checksum1, ByteU5BU5D_t4116647657* ___block2, int32_t ___index3, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (MD2Managed_MD2Transform_m3143426291_MetadataUsageId);
s_Il2CppMethodInitialized = 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;
uint8_t V_5 = 0x0;
{
ByteU5BU5D_t4116647657* L_0 = ___state0;
ByteU5BU5D_t4116647657* L_1 = __this->get_x_8();
Buffer_BlockCopy_m2884209081(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_0, 0, (RuntimeArray *)(RuntimeArray *)L_1, 0, ((int32_t)16), /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_2 = ___block2;
int32_t L_3 = ___index3;
ByteU5BU5D_t4116647657* L_4 = __this->get_x_8();
Buffer_BlockCopy_m2884209081(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_2, L_3, (RuntimeArray *)(RuntimeArray *)L_4, ((int32_t)16), ((int32_t)16), /*hidden argument*/NULL);
V_0 = 0;
goto IL_0043;
}
IL_0029:
{
ByteU5BU5D_t4116647657* L_5 = __this->get_x_8();
int32_t L_6 = V_0;
ByteU5BU5D_t4116647657* L_7 = ___state0;
int32_t L_8 = V_0;
int32_t L_9 = L_8;
uint8_t L_10 = (L_7)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_9));
ByteU5BU5D_t4116647657* L_11 = ___block2;
int32_t L_12 = ___index3;
int32_t L_13 = V_0;
int32_t L_14 = ((int32_t)il2cpp_codegen_add((int32_t)L_12, (int32_t)L_13));
uint8_t L_15 = (L_11)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_14));
(L_5)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(((int32_t)il2cpp_codegen_add((int32_t)L_6, (int32_t)((int32_t)32)))), (uint8_t)(((int32_t)((uint8_t)((int32_t)((int32_t)L_10^(int32_t)L_15))))));
int32_t L_16 = V_0;
V_0 = ((int32_t)il2cpp_codegen_add((int32_t)L_16, (int32_t)1));
}
IL_0043:
{
int32_t L_17 = V_0;
if ((((int32_t)L_17) < ((int32_t)((int32_t)16))))
{
goto IL_0029;
}
}
{
V_1 = 0;
V_2 = 0;
goto IL_0093;
}
IL_0054:
{
V_3 = 0;
goto IL_007d;
}
IL_005b:
{
ByteU5BU5D_t4116647657* L_18 = __this->get_x_8();
int32_t L_19 = V_3;
uint8_t* L_20 = ((L_18)->GetAddressAtUnchecked(static_cast<il2cpp_array_size_t>(L_19)));
IL2CPP_RUNTIME_CLASS_INIT(MD2Managed_t1377101535_il2cpp_TypeInfo_var);
ByteU5BU5D_t4116647657* L_21 = ((MD2Managed_t1377101535_StaticFields*)il2cpp_codegen_static_fields_for(MD2Managed_t1377101535_il2cpp_TypeInfo_var))->get_PI_SUBST_9();
int32_t L_22 = V_1;
int32_t L_23 = L_22;
uint8_t L_24 = (L_21)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_23));
int32_t L_25 = (((int32_t)((uint8_t)((int32_t)((int32_t)(*((uint8_t*)L_20))^(int32_t)L_24)))));
V_5 = (uint8_t)L_25;
*((int8_t*)(L_20)) = (int8_t)L_25;
uint8_t L_26 = V_5;
V_1 = L_26;
int32_t L_27 = V_3;
V_3 = ((int32_t)il2cpp_codegen_add((int32_t)L_27, (int32_t)1));
}
IL_007d:
{
int32_t L_28 = V_3;
if ((((int32_t)L_28) < ((int32_t)((int32_t)48))))
{
goto IL_005b;
}
}
{
int32_t L_29 = V_1;
int32_t L_30 = V_2;
V_1 = ((int32_t)((int32_t)((int32_t)il2cpp_codegen_add((int32_t)L_29, (int32_t)L_30))&(int32_t)((int32_t)255)));
int32_t L_31 = V_2;
V_2 = ((int32_t)il2cpp_codegen_add((int32_t)L_31, (int32_t)1));
}
IL_0093:
{
int32_t L_32 = V_2;
if ((((int32_t)L_32) < ((int32_t)((int32_t)18))))
{
goto IL_0054;
}
}
{
ByteU5BU5D_t4116647657* L_33 = __this->get_x_8();
ByteU5BU5D_t4116647657* L_34 = ___state0;
Buffer_BlockCopy_m2884209081(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_33, 0, (RuntimeArray *)(RuntimeArray *)L_34, 0, ((int32_t)16), /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_35 = ___checksum1;
int32_t L_36 = ((int32_t)15);
uint8_t L_37 = (L_35)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_36));
V_1 = L_37;
V_4 = 0;
goto IL_00e0;
}
IL_00b8:
{
ByteU5BU5D_t4116647657* L_38 = ___checksum1;
int32_t L_39 = V_4;
uint8_t* L_40 = ((L_38)->GetAddressAtUnchecked(static_cast<il2cpp_array_size_t>(L_39)));
IL2CPP_RUNTIME_CLASS_INIT(MD2Managed_t1377101535_il2cpp_TypeInfo_var);
ByteU5BU5D_t4116647657* L_41 = ((MD2Managed_t1377101535_StaticFields*)il2cpp_codegen_static_fields_for(MD2Managed_t1377101535_il2cpp_TypeInfo_var))->get_PI_SUBST_9();
ByteU5BU5D_t4116647657* L_42 = ___block2;
int32_t L_43 = ___index3;
int32_t L_44 = V_4;
int32_t L_45 = ((int32_t)il2cpp_codegen_add((int32_t)L_43, (int32_t)L_44));
uint8_t L_46 = (L_42)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_45));
int32_t L_47 = V_1;
int32_t L_48 = ((int32_t)((int32_t)L_46^(int32_t)L_47));
uint8_t L_49 = (L_41)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_48));
int32_t L_50 = (((int32_t)((uint8_t)((int32_t)((int32_t)(*((uint8_t*)L_40))^(int32_t)L_49)))));
V_5 = (uint8_t)L_50;
*((int8_t*)(L_40)) = (int8_t)L_50;
uint8_t L_51 = V_5;
V_1 = L_51;
int32_t L_52 = V_4;
V_4 = ((int32_t)il2cpp_codegen_add((int32_t)L_52, (int32_t)1));
}
IL_00e0:
{
int32_t L_53 = V_4;
if ((((int32_t)L_53) < ((int32_t)((int32_t)16))))
{
goto IL_00b8;
}
}
{
return;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void Mono.Security.Cryptography.MD4::.ctor()
extern "C" IL2CPP_METHOD_ATTR void MD4__ctor_m919379109 (MD4_t1560915355 * __this, const RuntimeMethod* method)
{
{
HashAlgorithm__ctor_m190815979(__this, /*hidden argument*/NULL);
((HashAlgorithm_t1432317219 *)__this)->set_HashSizeValue_1(((int32_t)128));
return;
}
}
// Mono.Security.Cryptography.MD4 Mono.Security.Cryptography.MD4::Create()
extern "C" IL2CPP_METHOD_ATTR MD4_t1560915355 * MD4_Create_m1588482044 (RuntimeObject * __this /* static, unused */, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (MD4_Create_m1588482044_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
MD4_t1560915355 * L_0 = MD4_Create_m4111026039(NULL /*static, unused*/, _stringLiteral1110256105, /*hidden argument*/NULL);
return L_0;
}
}
// Mono.Security.Cryptography.MD4 Mono.Security.Cryptography.MD4::Create(System.String)
extern "C" IL2CPP_METHOD_ATTR MD4_t1560915355 * MD4_Create_m4111026039 (RuntimeObject * __this /* static, unused */, String_t* ___hashName0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (MD4_Create_m4111026039_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
RuntimeObject * V_0 = NULL;
{
String_t* L_0 = ___hashName0;
IL2CPP_RUNTIME_CLASS_INIT(CryptoConfig_t4201145714_il2cpp_TypeInfo_var);
RuntimeObject * L_1 = CryptoConfig_CreateFromName_m1538277313(NULL /*static, unused*/, L_0, /*hidden argument*/NULL);
V_0 = L_1;
RuntimeObject * L_2 = V_0;
if (L_2)
{
goto IL_0013;
}
}
{
MD4Managed_t957540063 * L_3 = (MD4Managed_t957540063 *)il2cpp_codegen_object_new(MD4Managed_t957540063_il2cpp_TypeInfo_var);
MD4Managed__ctor_m2284724408(L_3, /*hidden argument*/NULL);
V_0 = L_3;
}
IL_0013:
{
RuntimeObject * L_4 = V_0;
return ((MD4_t1560915355 *)CastclassClass((RuntimeObject*)L_4, MD4_t1560915355_il2cpp_TypeInfo_var));
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void Mono.Security.Cryptography.MD4Managed::.ctor()
extern "C" IL2CPP_METHOD_ATTR void MD4Managed__ctor_m2284724408 (MD4Managed_t957540063 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (MD4Managed__ctor_m2284724408_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
MD4__ctor_m919379109(__this, /*hidden argument*/NULL);
UInt32U5BU5D_t2770800703* L_0 = (UInt32U5BU5D_t2770800703*)SZArrayNew(UInt32U5BU5D_t2770800703_il2cpp_TypeInfo_var, (uint32_t)4);
__this->set_state_4(L_0);
UInt32U5BU5D_t2770800703* L_1 = (UInt32U5BU5D_t2770800703*)SZArrayNew(UInt32U5BU5D_t2770800703_il2cpp_TypeInfo_var, (uint32_t)2);
__this->set_count_6(L_1);
ByteU5BU5D_t4116647657* L_2 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)((int32_t)64));
__this->set_buffer_5(L_2);
ByteU5BU5D_t4116647657* L_3 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)((int32_t)16));
__this->set_digest_8(L_3);
UInt32U5BU5D_t2770800703* L_4 = (UInt32U5BU5D_t2770800703*)SZArrayNew(UInt32U5BU5D_t2770800703_il2cpp_TypeInfo_var, (uint32_t)((int32_t)16));
__this->set_x_7(L_4);
VirtActionInvoker0::Invoke(13 /* System.Void Mono.Security.Cryptography.MD4Managed::Initialize() */, __this);
return;
}
}
// System.Void Mono.Security.Cryptography.MD4Managed::Initialize()
extern "C" IL2CPP_METHOD_ATTR void MD4Managed_Initialize_m469436465 (MD4Managed_t957540063 * __this, const RuntimeMethod* method)
{
{
UInt32U5BU5D_t2770800703* L_0 = __this->get_count_6();
(L_0)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(0), (uint32_t)0);
UInt32U5BU5D_t2770800703* L_1 = __this->get_count_6();
(L_1)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(1), (uint32_t)0);
UInt32U5BU5D_t2770800703* L_2 = __this->get_state_4();
(L_2)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(0), (uint32_t)((int32_t)1732584193));
UInt32U5BU5D_t2770800703* L_3 = __this->get_state_4();
(L_3)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(1), (uint32_t)((int32_t)-271733879));
UInt32U5BU5D_t2770800703* L_4 = __this->get_state_4();
(L_4)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(2), (uint32_t)((int32_t)-1732584194));
UInt32U5BU5D_t2770800703* L_5 = __this->get_state_4();
(L_5)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(3), (uint32_t)((int32_t)271733878));
ByteU5BU5D_t4116647657* L_6 = __this->get_buffer_5();
Array_Clear_m2231608178(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_6, 0, ((int32_t)64), /*hidden argument*/NULL);
UInt32U5BU5D_t2770800703* L_7 = __this->get_x_7();
Array_Clear_m2231608178(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_7, 0, ((int32_t)16), /*hidden argument*/NULL);
return;
}
}
// System.Void Mono.Security.Cryptography.MD4Managed::HashCore(System.Byte[],System.Int32,System.Int32)
extern "C" IL2CPP_METHOD_ATTR void MD4Managed_HashCore_m3384203071 (MD4Managed_t957540063 * __this, ByteU5BU5D_t4116647657* ___array0, int32_t ___ibStart1, int32_t ___cbSize2, const RuntimeMethod* method)
{
int32_t V_0 = 0;
int32_t V_1 = 0;
int32_t V_2 = 0;
{
UInt32U5BU5D_t2770800703* L_0 = __this->get_count_6();
int32_t L_1 = 0;
uint32_t L_2 = (L_0)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_1));
V_0 = ((int32_t)((int32_t)((int32_t)((uint32_t)L_2>>3))&(int32_t)((int32_t)63)));
UInt32U5BU5D_t2770800703* L_3 = __this->get_count_6();
uint32_t* L_4 = ((L_3)->GetAddressAtUnchecked(static_cast<il2cpp_array_size_t>(0)));
int32_t L_5 = ___cbSize2;
*((int32_t*)(L_4)) = (int32_t)((int32_t)il2cpp_codegen_add((int32_t)(*((uint32_t*)L_4)), (int32_t)((int32_t)((int32_t)L_5<<(int32_t)3))));
UInt32U5BU5D_t2770800703* L_6 = __this->get_count_6();
int32_t L_7 = 0;
uint32_t L_8 = (L_6)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_7));
int32_t L_9 = ___cbSize2;
if ((((int64_t)(((int64_t)((uint64_t)L_8)))) >= ((int64_t)(((int64_t)((int64_t)((int32_t)((int32_t)L_9<<(int32_t)3))))))))
{
goto IL_0044;
}
}
{
UInt32U5BU5D_t2770800703* L_10 = __this->get_count_6();
uint32_t* L_11 = ((L_10)->GetAddressAtUnchecked(static_cast<il2cpp_array_size_t>(1)));
*((int32_t*)(L_11)) = (int32_t)((int32_t)il2cpp_codegen_add((int32_t)(*((uint32_t*)L_11)), (int32_t)1));
}
IL_0044:
{
UInt32U5BU5D_t2770800703* L_12 = __this->get_count_6();
uint32_t* L_13 = ((L_12)->GetAddressAtUnchecked(static_cast<il2cpp_array_size_t>(1)));
int32_t L_14 = ___cbSize2;
*((int32_t*)(L_13)) = (int32_t)((int32_t)il2cpp_codegen_add((int32_t)(*((uint32_t*)L_13)), (int32_t)((int32_t)((int32_t)L_14>>(int32_t)((int32_t)29)))));
int32_t L_15 = V_0;
V_1 = ((int32_t)il2cpp_codegen_subtract((int32_t)((int32_t)64), (int32_t)L_15));
V_2 = 0;
int32_t L_16 = ___cbSize2;
int32_t L_17 = V_1;
if ((((int32_t)L_16) < ((int32_t)L_17)))
{
goto IL_00ae;
}
}
{
ByteU5BU5D_t4116647657* L_18 = ___array0;
int32_t L_19 = ___ibStart1;
ByteU5BU5D_t4116647657* L_20 = __this->get_buffer_5();
int32_t L_21 = V_0;
int32_t L_22 = V_1;
Buffer_BlockCopy_m2884209081(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_18, L_19, (RuntimeArray *)(RuntimeArray *)L_20, L_21, L_22, /*hidden argument*/NULL);
UInt32U5BU5D_t2770800703* L_23 = __this->get_state_4();
ByteU5BU5D_t4116647657* L_24 = __this->get_buffer_5();
MD4Managed_MD4Transform_m1101832482(__this, L_23, L_24, 0, /*hidden argument*/NULL);
int32_t L_25 = V_1;
V_2 = L_25;
goto IL_00a2;
}
IL_008f:
{
UInt32U5BU5D_t2770800703* L_26 = __this->get_state_4();
ByteU5BU5D_t4116647657* L_27 = ___array0;
int32_t L_28 = V_2;
MD4Managed_MD4Transform_m1101832482(__this, L_26, L_27, L_28, /*hidden argument*/NULL);
int32_t L_29 = V_2;
V_2 = ((int32_t)il2cpp_codegen_add((int32_t)L_29, (int32_t)((int32_t)64)));
}
IL_00a2:
{
int32_t L_30 = V_2;
int32_t L_31 = ___cbSize2;
if ((((int32_t)((int32_t)il2cpp_codegen_add((int32_t)L_30, (int32_t)((int32_t)63)))) < ((int32_t)L_31)))
{
goto IL_008f;
}
}
{
V_0 = 0;
}
IL_00ae:
{
ByteU5BU5D_t4116647657* L_32 = ___array0;
int32_t L_33 = ___ibStart1;
int32_t L_34 = V_2;
ByteU5BU5D_t4116647657* L_35 = __this->get_buffer_5();
int32_t L_36 = V_0;
int32_t L_37 = ___cbSize2;
int32_t L_38 = V_2;
Buffer_BlockCopy_m2884209081(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_32, ((int32_t)il2cpp_codegen_add((int32_t)L_33, (int32_t)L_34)), (RuntimeArray *)(RuntimeArray *)L_35, L_36, ((int32_t)il2cpp_codegen_subtract((int32_t)L_37, (int32_t)L_38)), /*hidden argument*/NULL);
return;
}
}
// System.Byte[] Mono.Security.Cryptography.MD4Managed::HashFinal()
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* MD4Managed_HashFinal_m3850238392 (MD4Managed_t957540063 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (MD4Managed_HashFinal_m3850238392_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
ByteU5BU5D_t4116647657* V_0 = NULL;
uint32_t V_1 = 0;
int32_t V_2 = 0;
int32_t G_B3_0 = 0;
{
ByteU5BU5D_t4116647657* L_0 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)8);
V_0 = L_0;
ByteU5BU5D_t4116647657* L_1 = V_0;
UInt32U5BU5D_t2770800703* L_2 = __this->get_count_6();
MD4Managed_Encode_m386285215(__this, L_1, L_2, /*hidden argument*/NULL);
UInt32U5BU5D_t2770800703* L_3 = __this->get_count_6();
int32_t L_4 = 0;
uint32_t L_5 = (L_3)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_4));
V_1 = ((int32_t)((int32_t)((int32_t)((uint32_t)L_5>>3))&(int32_t)((int32_t)63)));
uint32_t L_6 = V_1;
if ((!(((uint32_t)L_6) < ((uint32_t)((int32_t)56)))))
{
goto IL_0033;
}
}
{
uint32_t L_7 = V_1;
G_B3_0 = ((int32_t)il2cpp_codegen_subtract((int32_t)((int32_t)56), (int32_t)L_7));
goto IL_0037;
}
IL_0033:
{
uint32_t L_8 = V_1;
G_B3_0 = ((int32_t)il2cpp_codegen_subtract((int32_t)((int32_t)120), (int32_t)L_8));
}
IL_0037:
{
V_2 = G_B3_0;
int32_t L_9 = V_2;
ByteU5BU5D_t4116647657* L_10 = MD4Managed_Padding_m3091724296(__this, L_9, /*hidden argument*/NULL);
int32_t L_11 = V_2;
VirtActionInvoker3< ByteU5BU5D_t4116647657*, int32_t, int32_t >::Invoke(10 /* System.Void Mono.Security.Cryptography.MD4Managed::HashCore(System.Byte[],System.Int32,System.Int32) */, __this, L_10, 0, L_11);
ByteU5BU5D_t4116647657* L_12 = V_0;
VirtActionInvoker3< ByteU5BU5D_t4116647657*, int32_t, int32_t >::Invoke(10 /* System.Void Mono.Security.Cryptography.MD4Managed::HashCore(System.Byte[],System.Int32,System.Int32) */, __this, L_12, 0, 8);
ByteU5BU5D_t4116647657* L_13 = __this->get_digest_8();
UInt32U5BU5D_t2770800703* L_14 = __this->get_state_4();
MD4Managed_Encode_m386285215(__this, L_13, L_14, /*hidden argument*/NULL);
VirtActionInvoker0::Invoke(13 /* System.Void Mono.Security.Cryptography.MD4Managed::Initialize() */, __this);
ByteU5BU5D_t4116647657* L_15 = __this->get_digest_8();
return L_15;
}
}
// System.Byte[] Mono.Security.Cryptography.MD4Managed::Padding(System.Int32)
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* MD4Managed_Padding_m3091724296 (MD4Managed_t957540063 * __this, int32_t ___nLength0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (MD4Managed_Padding_m3091724296_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
ByteU5BU5D_t4116647657* V_0 = NULL;
{
int32_t L_0 = ___nLength0;
if ((((int32_t)L_0) <= ((int32_t)0)))
{
goto IL_0018;
}
}
{
int32_t L_1 = ___nLength0;
ByteU5BU5D_t4116647657* L_2 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)L_1);
V_0 = L_2;
ByteU5BU5D_t4116647657* L_3 = V_0;
(L_3)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(0), (uint8_t)((int32_t)128));
ByteU5BU5D_t4116647657* L_4 = V_0;
return L_4;
}
IL_0018:
{
return (ByteU5BU5D_t4116647657*)NULL;
}
}
// System.UInt32 Mono.Security.Cryptography.MD4Managed::F(System.UInt32,System.UInt32,System.UInt32)
extern "C" IL2CPP_METHOD_ATTR uint32_t MD4Managed_F_m2794461001 (MD4Managed_t957540063 * __this, uint32_t ___x0, uint32_t ___y1, uint32_t ___z2, const RuntimeMethod* method)
{
{
uint32_t L_0 = ___x0;
uint32_t L_1 = ___y1;
uint32_t L_2 = ___x0;
uint32_t L_3 = ___z2;
return ((int32_t)((int32_t)((int32_t)((int32_t)L_0&(int32_t)L_1))|(int32_t)((int32_t)((int32_t)((~L_2))&(int32_t)L_3))));
}
}
// System.UInt32 Mono.Security.Cryptography.MD4Managed::G(System.UInt32,System.UInt32,System.UInt32)
extern "C" IL2CPP_METHOD_ATTR uint32_t MD4Managed_G_m2118206422 (MD4Managed_t957540063 * __this, uint32_t ___x0, uint32_t ___y1, uint32_t ___z2, const RuntimeMethod* method)
{
{
uint32_t L_0 = ___x0;
uint32_t L_1 = ___y1;
uint32_t L_2 = ___x0;
uint32_t L_3 = ___z2;
uint32_t L_4 = ___y1;
uint32_t L_5 = ___z2;
return ((int32_t)((int32_t)((int32_t)((int32_t)((int32_t)((int32_t)L_0&(int32_t)L_1))|(int32_t)((int32_t)((int32_t)L_2&(int32_t)L_3))))|(int32_t)((int32_t)((int32_t)L_4&(int32_t)L_5))));
}
}
// System.UInt32 Mono.Security.Cryptography.MD4Managed::H(System.UInt32,System.UInt32,System.UInt32)
extern "C" IL2CPP_METHOD_ATTR uint32_t MD4Managed_H_m213605525 (MD4Managed_t957540063 * __this, uint32_t ___x0, uint32_t ___y1, uint32_t ___z2, const RuntimeMethod* method)
{
{
uint32_t L_0 = ___x0;
uint32_t L_1 = ___y1;
uint32_t L_2 = ___z2;
return ((int32_t)((int32_t)((int32_t)((int32_t)L_0^(int32_t)L_1))^(int32_t)L_2));
}
}
// System.UInt32 Mono.Security.Cryptography.MD4Managed::ROL(System.UInt32,System.Byte)
extern "C" IL2CPP_METHOD_ATTR uint32_t MD4Managed_ROL_m691796253 (MD4Managed_t957540063 * __this, uint32_t ___x0, uint8_t ___n1, const RuntimeMethod* method)
{
{
uint32_t L_0 = ___x0;
uint8_t L_1 = ___n1;
uint32_t L_2 = ___x0;
uint8_t L_3 = ___n1;
return ((int32_t)((int32_t)((int32_t)((int32_t)L_0<<(int32_t)((int32_t)((int32_t)L_1&(int32_t)((int32_t)31)))))|(int32_t)((int32_t)((uint32_t)L_2>>((int32_t)((int32_t)((int32_t)il2cpp_codegen_subtract((int32_t)((int32_t)32), (int32_t)L_3))&(int32_t)((int32_t)31)))))));
}
}
// System.Void Mono.Security.Cryptography.MD4Managed::FF(System.UInt32&,System.UInt32,System.UInt32,System.UInt32,System.UInt32,System.Byte)
extern "C" IL2CPP_METHOD_ATTR void MD4Managed_FF_m3294771481 (MD4Managed_t957540063 * __this, uint32_t* ___a0, uint32_t ___b1, uint32_t ___c2, uint32_t ___d3, uint32_t ___x4, uint8_t ___s5, const RuntimeMethod* method)
{
{
uint32_t* L_0 = ___a0;
uint32_t* L_1 = ___a0;
uint32_t L_2 = ___b1;
uint32_t L_3 = ___c2;
uint32_t L_4 = ___d3;
uint32_t L_5 = MD4Managed_F_m2794461001(__this, L_2, L_3, L_4, /*hidden argument*/NULL);
uint32_t L_6 = ___x4;
*((int32_t*)(L_0)) = (int32_t)((int32_t)il2cpp_codegen_add((int32_t)(*((uint32_t*)L_1)), (int32_t)((int32_t)il2cpp_codegen_add((int32_t)L_5, (int32_t)L_6))));
uint32_t* L_7 = ___a0;
uint32_t* L_8 = ___a0;
uint8_t L_9 = ___s5;
uint32_t L_10 = MD4Managed_ROL_m691796253(__this, (*((uint32_t*)L_8)), L_9, /*hidden argument*/NULL);
*((int32_t*)(L_7)) = (int32_t)L_10;
return;
}
}
// System.Void Mono.Security.Cryptography.MD4Managed::GG(System.UInt32&,System.UInt32,System.UInt32,System.UInt32,System.UInt32,System.Byte)
extern "C" IL2CPP_METHOD_ATTR void MD4Managed_GG_m1845276249 (MD4Managed_t957540063 * __this, uint32_t* ___a0, uint32_t ___b1, uint32_t ___c2, uint32_t ___d3, uint32_t ___x4, uint8_t ___s5, const RuntimeMethod* method)
{
{
uint32_t* L_0 = ___a0;
uint32_t* L_1 = ___a0;
uint32_t L_2 = ___b1;
uint32_t L_3 = ___c2;
uint32_t L_4 = ___d3;
uint32_t L_5 = MD4Managed_G_m2118206422(__this, L_2, L_3, L_4, /*hidden argument*/NULL);
uint32_t L_6 = ___x4;
*((int32_t*)(L_0)) = (int32_t)((int32_t)il2cpp_codegen_add((int32_t)(*((uint32_t*)L_1)), (int32_t)((int32_t)il2cpp_codegen_add((int32_t)((int32_t)il2cpp_codegen_add((int32_t)L_5, (int32_t)L_6)), (int32_t)((int32_t)1518500249)))));
uint32_t* L_7 = ___a0;
uint32_t* L_8 = ___a0;
uint8_t L_9 = ___s5;
uint32_t L_10 = MD4Managed_ROL_m691796253(__this, (*((uint32_t*)L_8)), L_9, /*hidden argument*/NULL);
*((int32_t*)(L_7)) = (int32_t)L_10;
return;
}
}
// System.Void Mono.Security.Cryptography.MD4Managed::HH(System.UInt32&,System.UInt32,System.UInt32,System.UInt32,System.UInt32,System.Byte)
extern "C" IL2CPP_METHOD_ATTR void MD4Managed_HH_m2535673516 (MD4Managed_t957540063 * __this, uint32_t* ___a0, uint32_t ___b1, uint32_t ___c2, uint32_t ___d3, uint32_t ___x4, uint8_t ___s5, const RuntimeMethod* method)
{
{
uint32_t* L_0 = ___a0;
uint32_t* L_1 = ___a0;
uint32_t L_2 = ___b1;
uint32_t L_3 = ___c2;
uint32_t L_4 = ___d3;
uint32_t L_5 = MD4Managed_H_m213605525(__this, L_2, L_3, L_4, /*hidden argument*/NULL);
uint32_t L_6 = ___x4;
*((int32_t*)(L_0)) = (int32_t)((int32_t)il2cpp_codegen_add((int32_t)(*((uint32_t*)L_1)), (int32_t)((int32_t)il2cpp_codegen_add((int32_t)((int32_t)il2cpp_codegen_add((int32_t)L_5, (int32_t)L_6)), (int32_t)((int32_t)1859775393)))));
uint32_t* L_7 = ___a0;
uint32_t* L_8 = ___a0;
uint8_t L_9 = ___s5;
uint32_t L_10 = MD4Managed_ROL_m691796253(__this, (*((uint32_t*)L_8)), L_9, /*hidden argument*/NULL);
*((int32_t*)(L_7)) = (int32_t)L_10;
return;
}
}
// System.Void Mono.Security.Cryptography.MD4Managed::Encode(System.Byte[],System.UInt32[])
extern "C" IL2CPP_METHOD_ATTR void MD4Managed_Encode_m386285215 (MD4Managed_t957540063 * __this, ByteU5BU5D_t4116647657* ___output0, UInt32U5BU5D_t2770800703* ___input1, const RuntimeMethod* method)
{
int32_t V_0 = 0;
int32_t V_1 = 0;
{
V_0 = 0;
V_1 = 0;
goto IL_003b;
}
IL_0009:
{
ByteU5BU5D_t4116647657* L_0 = ___output0;
int32_t L_1 = V_1;
UInt32U5BU5D_t2770800703* L_2 = ___input1;
int32_t L_3 = V_0;
int32_t L_4 = L_3;
uint32_t L_5 = (L_2)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_4));
(L_0)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(L_1), (uint8_t)(((int32_t)((uint8_t)L_5))));
ByteU5BU5D_t4116647657* L_6 = ___output0;
int32_t L_7 = V_1;
UInt32U5BU5D_t2770800703* L_8 = ___input1;
int32_t L_9 = V_0;
int32_t L_10 = L_9;
uint32_t L_11 = (L_8)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_10));
(L_6)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(((int32_t)il2cpp_codegen_add((int32_t)L_7, (int32_t)1))), (uint8_t)(((int32_t)((uint8_t)((int32_t)((uint32_t)L_11>>8))))));
ByteU5BU5D_t4116647657* L_12 = ___output0;
int32_t L_13 = V_1;
UInt32U5BU5D_t2770800703* L_14 = ___input1;
int32_t L_15 = V_0;
int32_t L_16 = L_15;
uint32_t L_17 = (L_14)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_16));
(L_12)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(((int32_t)il2cpp_codegen_add((int32_t)L_13, (int32_t)2))), (uint8_t)(((int32_t)((uint8_t)((int32_t)((uint32_t)L_17>>((int32_t)16)))))));
ByteU5BU5D_t4116647657* L_18 = ___output0;
int32_t L_19 = V_1;
UInt32U5BU5D_t2770800703* L_20 = ___input1;
int32_t L_21 = V_0;
int32_t L_22 = L_21;
uint32_t L_23 = (L_20)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_22));
(L_18)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(((int32_t)il2cpp_codegen_add((int32_t)L_19, (int32_t)3))), (uint8_t)(((int32_t)((uint8_t)((int32_t)((uint32_t)L_23>>((int32_t)24)))))));
int32_t L_24 = V_0;
V_0 = ((int32_t)il2cpp_codegen_add((int32_t)L_24, (int32_t)1));
int32_t L_25 = V_1;
V_1 = ((int32_t)il2cpp_codegen_add((int32_t)L_25, (int32_t)4));
}
IL_003b:
{
int32_t L_26 = V_1;
ByteU5BU5D_t4116647657* L_27 = ___output0;
if ((((int32_t)L_26) < ((int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_27)->max_length)))))))
{
goto IL_0009;
}
}
{
return;
}
}
// System.Void Mono.Security.Cryptography.MD4Managed::Decode(System.UInt32[],System.Byte[],System.Int32)
extern "C" IL2CPP_METHOD_ATTR void MD4Managed_Decode_m4273685594 (MD4Managed_t957540063 * __this, UInt32U5BU5D_t2770800703* ___output0, ByteU5BU5D_t4116647657* ___input1, int32_t ___index2, const RuntimeMethod* method)
{
int32_t V_0 = 0;
int32_t V_1 = 0;
{
V_0 = 0;
int32_t L_0 = ___index2;
V_1 = L_0;
goto IL_0031;
}
IL_0009:
{
UInt32U5BU5D_t2770800703* L_1 = ___output0;
int32_t L_2 = V_0;
ByteU5BU5D_t4116647657* L_3 = ___input1;
int32_t L_4 = V_1;
int32_t L_5 = L_4;
uint8_t L_6 = (L_3)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_5));
ByteU5BU5D_t4116647657* L_7 = ___input1;
int32_t L_8 = V_1;
int32_t L_9 = ((int32_t)il2cpp_codegen_add((int32_t)L_8, (int32_t)1));
uint8_t L_10 = (L_7)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_9));
ByteU5BU5D_t4116647657* L_11 = ___input1;
int32_t L_12 = V_1;
int32_t L_13 = ((int32_t)il2cpp_codegen_add((int32_t)L_12, (int32_t)2));
uint8_t L_14 = (L_11)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_13));
ByteU5BU5D_t4116647657* L_15 = ___input1;
int32_t L_16 = V_1;
int32_t L_17 = ((int32_t)il2cpp_codegen_add((int32_t)L_16, (int32_t)3));
uint8_t L_18 = (L_15)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_17));
(L_1)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(L_2), (uint32_t)((int32_t)((int32_t)((int32_t)((int32_t)((int32_t)((int32_t)L_6|(int32_t)((int32_t)((int32_t)L_10<<(int32_t)8))))|(int32_t)((int32_t)((int32_t)L_14<<(int32_t)((int32_t)16)))))|(int32_t)((int32_t)((int32_t)L_18<<(int32_t)((int32_t)24))))));
int32_t L_19 = V_0;
V_0 = ((int32_t)il2cpp_codegen_add((int32_t)L_19, (int32_t)1));
int32_t L_20 = V_1;
V_1 = ((int32_t)il2cpp_codegen_add((int32_t)L_20, (int32_t)4));
}
IL_0031:
{
int32_t L_21 = V_0;
UInt32U5BU5D_t2770800703* L_22 = ___output0;
if ((((int32_t)L_21) < ((int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_22)->max_length)))))))
{
goto IL_0009;
}
}
{
return;
}
}
// System.Void Mono.Security.Cryptography.MD4Managed::MD4Transform(System.UInt32[],System.Byte[],System.Int32)
extern "C" IL2CPP_METHOD_ATTR void MD4Managed_MD4Transform_m1101832482 (MD4Managed_t957540063 * __this, UInt32U5BU5D_t2770800703* ___state0, ByteU5BU5D_t4116647657* ___block1, int32_t ___index2, const RuntimeMethod* method)
{
uint32_t V_0 = 0;
uint32_t V_1 = 0;
uint32_t V_2 = 0;
uint32_t V_3 = 0;
{
UInt32U5BU5D_t2770800703* L_0 = ___state0;
int32_t L_1 = 0;
uint32_t L_2 = (L_0)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_1));
V_0 = L_2;
UInt32U5BU5D_t2770800703* L_3 = ___state0;
int32_t L_4 = 1;
uint32_t L_5 = (L_3)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_4));
V_1 = L_5;
UInt32U5BU5D_t2770800703* L_6 = ___state0;
int32_t L_7 = 2;
uint32_t L_8 = (L_6)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_7));
V_2 = L_8;
UInt32U5BU5D_t2770800703* L_9 = ___state0;
int32_t L_10 = 3;
uint32_t L_11 = (L_9)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_10));
V_3 = L_11;
UInt32U5BU5D_t2770800703* L_12 = __this->get_x_7();
ByteU5BU5D_t4116647657* L_13 = ___block1;
int32_t L_14 = ___index2;
MD4Managed_Decode_m4273685594(__this, L_12, L_13, L_14, /*hidden argument*/NULL);
uint32_t L_15 = V_1;
uint32_t L_16 = V_2;
uint32_t L_17 = V_3;
UInt32U5BU5D_t2770800703* L_18 = __this->get_x_7();
int32_t L_19 = 0;
uint32_t L_20 = (L_18)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_19));
MD4Managed_FF_m3294771481(__this, (uint32_t*)(&V_0), L_15, L_16, L_17, L_20, (uint8_t)3, /*hidden argument*/NULL);
uint32_t L_21 = V_0;
uint32_t L_22 = V_1;
uint32_t L_23 = V_2;
UInt32U5BU5D_t2770800703* L_24 = __this->get_x_7();
int32_t L_25 = 1;
uint32_t L_26 = (L_24)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_25));
MD4Managed_FF_m3294771481(__this, (uint32_t*)(&V_3), L_21, L_22, L_23, L_26, (uint8_t)7, /*hidden argument*/NULL);
uint32_t L_27 = V_3;
uint32_t L_28 = V_0;
uint32_t L_29 = V_1;
UInt32U5BU5D_t2770800703* L_30 = __this->get_x_7();
int32_t L_31 = 2;
uint32_t L_32 = (L_30)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_31));
MD4Managed_FF_m3294771481(__this, (uint32_t*)(&V_2), L_27, L_28, L_29, L_32, (uint8_t)((int32_t)11), /*hidden argument*/NULL);
uint32_t L_33 = V_2;
uint32_t L_34 = V_3;
uint32_t L_35 = V_0;
UInt32U5BU5D_t2770800703* L_36 = __this->get_x_7();
int32_t L_37 = 3;
uint32_t L_38 = (L_36)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_37));
MD4Managed_FF_m3294771481(__this, (uint32_t*)(&V_1), L_33, L_34, L_35, L_38, (uint8_t)((int32_t)19), /*hidden argument*/NULL);
uint32_t L_39 = V_1;
uint32_t L_40 = V_2;
uint32_t L_41 = V_3;
UInt32U5BU5D_t2770800703* L_42 = __this->get_x_7();
int32_t L_43 = 4;
uint32_t L_44 = (L_42)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_43));
MD4Managed_FF_m3294771481(__this, (uint32_t*)(&V_0), L_39, L_40, L_41, L_44, (uint8_t)3, /*hidden argument*/NULL);
uint32_t L_45 = V_0;
uint32_t L_46 = V_1;
uint32_t L_47 = V_2;
UInt32U5BU5D_t2770800703* L_48 = __this->get_x_7();
int32_t L_49 = 5;
uint32_t L_50 = (L_48)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_49));
MD4Managed_FF_m3294771481(__this, (uint32_t*)(&V_3), L_45, L_46, L_47, L_50, (uint8_t)7, /*hidden argument*/NULL);
uint32_t L_51 = V_3;
uint32_t L_52 = V_0;
uint32_t L_53 = V_1;
UInt32U5BU5D_t2770800703* L_54 = __this->get_x_7();
int32_t L_55 = 6;
uint32_t L_56 = (L_54)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_55));
MD4Managed_FF_m3294771481(__this, (uint32_t*)(&V_2), L_51, L_52, L_53, L_56, (uint8_t)((int32_t)11), /*hidden argument*/NULL);
uint32_t L_57 = V_2;
uint32_t L_58 = V_3;
uint32_t L_59 = V_0;
UInt32U5BU5D_t2770800703* L_60 = __this->get_x_7();
int32_t L_61 = 7;
uint32_t L_62 = (L_60)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_61));
MD4Managed_FF_m3294771481(__this, (uint32_t*)(&V_1), L_57, L_58, L_59, L_62, (uint8_t)((int32_t)19), /*hidden argument*/NULL);
uint32_t L_63 = V_1;
uint32_t L_64 = V_2;
uint32_t L_65 = V_3;
UInt32U5BU5D_t2770800703* L_66 = __this->get_x_7();
int32_t L_67 = 8;
uint32_t L_68 = (L_66)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_67));
MD4Managed_FF_m3294771481(__this, (uint32_t*)(&V_0), L_63, L_64, L_65, L_68, (uint8_t)3, /*hidden argument*/NULL);
uint32_t L_69 = V_0;
uint32_t L_70 = V_1;
uint32_t L_71 = V_2;
UInt32U5BU5D_t2770800703* L_72 = __this->get_x_7();
int32_t L_73 = ((int32_t)9);
uint32_t L_74 = (L_72)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_73));
MD4Managed_FF_m3294771481(__this, (uint32_t*)(&V_3), L_69, L_70, L_71, L_74, (uint8_t)7, /*hidden argument*/NULL);
uint32_t L_75 = V_3;
uint32_t L_76 = V_0;
uint32_t L_77 = V_1;
UInt32U5BU5D_t2770800703* L_78 = __this->get_x_7();
int32_t L_79 = ((int32_t)10);
uint32_t L_80 = (L_78)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_79));
MD4Managed_FF_m3294771481(__this, (uint32_t*)(&V_2), L_75, L_76, L_77, L_80, (uint8_t)((int32_t)11), /*hidden argument*/NULL);
uint32_t L_81 = V_2;
uint32_t L_82 = V_3;
uint32_t L_83 = V_0;
UInt32U5BU5D_t2770800703* L_84 = __this->get_x_7();
int32_t L_85 = ((int32_t)11);
uint32_t L_86 = (L_84)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_85));
MD4Managed_FF_m3294771481(__this, (uint32_t*)(&V_1), L_81, L_82, L_83, L_86, (uint8_t)((int32_t)19), /*hidden argument*/NULL);
uint32_t L_87 = V_1;
uint32_t L_88 = V_2;
uint32_t L_89 = V_3;
UInt32U5BU5D_t2770800703* L_90 = __this->get_x_7();
int32_t L_91 = ((int32_t)12);
uint32_t L_92 = (L_90)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_91));
MD4Managed_FF_m3294771481(__this, (uint32_t*)(&V_0), L_87, L_88, L_89, L_92, (uint8_t)3, /*hidden argument*/NULL);
uint32_t L_93 = V_0;
uint32_t L_94 = V_1;
uint32_t L_95 = V_2;
UInt32U5BU5D_t2770800703* L_96 = __this->get_x_7();
int32_t L_97 = ((int32_t)13);
uint32_t L_98 = (L_96)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_97));
MD4Managed_FF_m3294771481(__this, (uint32_t*)(&V_3), L_93, L_94, L_95, L_98, (uint8_t)7, /*hidden argument*/NULL);
uint32_t L_99 = V_3;
uint32_t L_100 = V_0;
uint32_t L_101 = V_1;
UInt32U5BU5D_t2770800703* L_102 = __this->get_x_7();
int32_t L_103 = ((int32_t)14);
uint32_t L_104 = (L_102)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_103));
MD4Managed_FF_m3294771481(__this, (uint32_t*)(&V_2), L_99, L_100, L_101, L_104, (uint8_t)((int32_t)11), /*hidden argument*/NULL);
uint32_t L_105 = V_2;
uint32_t L_106 = V_3;
uint32_t L_107 = V_0;
UInt32U5BU5D_t2770800703* L_108 = __this->get_x_7();
int32_t L_109 = ((int32_t)15);
uint32_t L_110 = (L_108)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_109));
MD4Managed_FF_m3294771481(__this, (uint32_t*)(&V_1), L_105, L_106, L_107, L_110, (uint8_t)((int32_t)19), /*hidden argument*/NULL);
uint32_t L_111 = V_1;
uint32_t L_112 = V_2;
uint32_t L_113 = V_3;
UInt32U5BU5D_t2770800703* L_114 = __this->get_x_7();
int32_t L_115 = 0;
uint32_t L_116 = (L_114)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_115));
MD4Managed_GG_m1845276249(__this, (uint32_t*)(&V_0), L_111, L_112, L_113, L_116, (uint8_t)3, /*hidden argument*/NULL);
uint32_t L_117 = V_0;
uint32_t L_118 = V_1;
uint32_t L_119 = V_2;
UInt32U5BU5D_t2770800703* L_120 = __this->get_x_7();
int32_t L_121 = 4;
uint32_t L_122 = (L_120)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_121));
MD4Managed_GG_m1845276249(__this, (uint32_t*)(&V_3), L_117, L_118, L_119, L_122, (uint8_t)5, /*hidden argument*/NULL);
uint32_t L_123 = V_3;
uint32_t L_124 = V_0;
uint32_t L_125 = V_1;
UInt32U5BU5D_t2770800703* L_126 = __this->get_x_7();
int32_t L_127 = 8;
uint32_t L_128 = (L_126)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_127));
MD4Managed_GG_m1845276249(__this, (uint32_t*)(&V_2), L_123, L_124, L_125, L_128, (uint8_t)((int32_t)9), /*hidden argument*/NULL);
uint32_t L_129 = V_2;
uint32_t L_130 = V_3;
uint32_t L_131 = V_0;
UInt32U5BU5D_t2770800703* L_132 = __this->get_x_7();
int32_t L_133 = ((int32_t)12);
uint32_t L_134 = (L_132)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_133));
MD4Managed_GG_m1845276249(__this, (uint32_t*)(&V_1), L_129, L_130, L_131, L_134, (uint8_t)((int32_t)13), /*hidden argument*/NULL);
uint32_t L_135 = V_1;
uint32_t L_136 = V_2;
uint32_t L_137 = V_3;
UInt32U5BU5D_t2770800703* L_138 = __this->get_x_7();
int32_t L_139 = 1;
uint32_t L_140 = (L_138)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_139));
MD4Managed_GG_m1845276249(__this, (uint32_t*)(&V_0), L_135, L_136, L_137, L_140, (uint8_t)3, /*hidden argument*/NULL);
uint32_t L_141 = V_0;
uint32_t L_142 = V_1;
uint32_t L_143 = V_2;
UInt32U5BU5D_t2770800703* L_144 = __this->get_x_7();
int32_t L_145 = 5;
uint32_t L_146 = (L_144)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_145));
MD4Managed_GG_m1845276249(__this, (uint32_t*)(&V_3), L_141, L_142, L_143, L_146, (uint8_t)5, /*hidden argument*/NULL);
uint32_t L_147 = V_3;
uint32_t L_148 = V_0;
uint32_t L_149 = V_1;
UInt32U5BU5D_t2770800703* L_150 = __this->get_x_7();
int32_t L_151 = ((int32_t)9);
uint32_t L_152 = (L_150)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_151));
MD4Managed_GG_m1845276249(__this, (uint32_t*)(&V_2), L_147, L_148, L_149, L_152, (uint8_t)((int32_t)9), /*hidden argument*/NULL);
uint32_t L_153 = V_2;
uint32_t L_154 = V_3;
uint32_t L_155 = V_0;
UInt32U5BU5D_t2770800703* L_156 = __this->get_x_7();
int32_t L_157 = ((int32_t)13);
uint32_t L_158 = (L_156)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_157));
MD4Managed_GG_m1845276249(__this, (uint32_t*)(&V_1), L_153, L_154, L_155, L_158, (uint8_t)((int32_t)13), /*hidden argument*/NULL);
uint32_t L_159 = V_1;
uint32_t L_160 = V_2;
uint32_t L_161 = V_3;
UInt32U5BU5D_t2770800703* L_162 = __this->get_x_7();
int32_t L_163 = 2;
uint32_t L_164 = (L_162)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_163));
MD4Managed_GG_m1845276249(__this, (uint32_t*)(&V_0), L_159, L_160, L_161, L_164, (uint8_t)3, /*hidden argument*/NULL);
uint32_t L_165 = V_0;
uint32_t L_166 = V_1;
uint32_t L_167 = V_2;
UInt32U5BU5D_t2770800703* L_168 = __this->get_x_7();
int32_t L_169 = 6;
uint32_t L_170 = (L_168)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_169));
MD4Managed_GG_m1845276249(__this, (uint32_t*)(&V_3), L_165, L_166, L_167, L_170, (uint8_t)5, /*hidden argument*/NULL);
uint32_t L_171 = V_3;
uint32_t L_172 = V_0;
uint32_t L_173 = V_1;
UInt32U5BU5D_t2770800703* L_174 = __this->get_x_7();
int32_t L_175 = ((int32_t)10);
uint32_t L_176 = (L_174)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_175));
MD4Managed_GG_m1845276249(__this, (uint32_t*)(&V_2), L_171, L_172, L_173, L_176, (uint8_t)((int32_t)9), /*hidden argument*/NULL);
uint32_t L_177 = V_2;
uint32_t L_178 = V_3;
uint32_t L_179 = V_0;
UInt32U5BU5D_t2770800703* L_180 = __this->get_x_7();
int32_t L_181 = ((int32_t)14);
uint32_t L_182 = (L_180)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_181));
MD4Managed_GG_m1845276249(__this, (uint32_t*)(&V_1), L_177, L_178, L_179, L_182, (uint8_t)((int32_t)13), /*hidden argument*/NULL);
uint32_t L_183 = V_1;
uint32_t L_184 = V_2;
uint32_t L_185 = V_3;
UInt32U5BU5D_t2770800703* L_186 = __this->get_x_7();
int32_t L_187 = 3;
uint32_t L_188 = (L_186)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_187));
MD4Managed_GG_m1845276249(__this, (uint32_t*)(&V_0), L_183, L_184, L_185, L_188, (uint8_t)3, /*hidden argument*/NULL);
uint32_t L_189 = V_0;
uint32_t L_190 = V_1;
uint32_t L_191 = V_2;
UInt32U5BU5D_t2770800703* L_192 = __this->get_x_7();
int32_t L_193 = 7;
uint32_t L_194 = (L_192)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_193));
MD4Managed_GG_m1845276249(__this, (uint32_t*)(&V_3), L_189, L_190, L_191, L_194, (uint8_t)5, /*hidden argument*/NULL);
uint32_t L_195 = V_3;
uint32_t L_196 = V_0;
uint32_t L_197 = V_1;
UInt32U5BU5D_t2770800703* L_198 = __this->get_x_7();
int32_t L_199 = ((int32_t)11);
uint32_t L_200 = (L_198)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_199));
MD4Managed_GG_m1845276249(__this, (uint32_t*)(&V_2), L_195, L_196, L_197, L_200, (uint8_t)((int32_t)9), /*hidden argument*/NULL);
uint32_t L_201 = V_2;
uint32_t L_202 = V_3;
uint32_t L_203 = V_0;
UInt32U5BU5D_t2770800703* L_204 = __this->get_x_7();
int32_t L_205 = ((int32_t)15);
uint32_t L_206 = (L_204)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_205));
MD4Managed_GG_m1845276249(__this, (uint32_t*)(&V_1), L_201, L_202, L_203, L_206, (uint8_t)((int32_t)13), /*hidden argument*/NULL);
uint32_t L_207 = V_1;
uint32_t L_208 = V_2;
uint32_t L_209 = V_3;
UInt32U5BU5D_t2770800703* L_210 = __this->get_x_7();
int32_t L_211 = 0;
uint32_t L_212 = (L_210)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_211));
MD4Managed_HH_m2535673516(__this, (uint32_t*)(&V_0), L_207, L_208, L_209, L_212, (uint8_t)3, /*hidden argument*/NULL);
uint32_t L_213 = V_0;
uint32_t L_214 = V_1;
uint32_t L_215 = V_2;
UInt32U5BU5D_t2770800703* L_216 = __this->get_x_7();
int32_t L_217 = 8;
uint32_t L_218 = (L_216)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_217));
MD4Managed_HH_m2535673516(__this, (uint32_t*)(&V_3), L_213, L_214, L_215, L_218, (uint8_t)((int32_t)9), /*hidden argument*/NULL);
uint32_t L_219 = V_3;
uint32_t L_220 = V_0;
uint32_t L_221 = V_1;
UInt32U5BU5D_t2770800703* L_222 = __this->get_x_7();
int32_t L_223 = 4;
uint32_t L_224 = (L_222)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_223));
MD4Managed_HH_m2535673516(__this, (uint32_t*)(&V_2), L_219, L_220, L_221, L_224, (uint8_t)((int32_t)11), /*hidden argument*/NULL);
uint32_t L_225 = V_2;
uint32_t L_226 = V_3;
uint32_t L_227 = V_0;
UInt32U5BU5D_t2770800703* L_228 = __this->get_x_7();
int32_t L_229 = ((int32_t)12);
uint32_t L_230 = (L_228)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_229));
MD4Managed_HH_m2535673516(__this, (uint32_t*)(&V_1), L_225, L_226, L_227, L_230, (uint8_t)((int32_t)15), /*hidden argument*/NULL);
uint32_t L_231 = V_1;
uint32_t L_232 = V_2;
uint32_t L_233 = V_3;
UInt32U5BU5D_t2770800703* L_234 = __this->get_x_7();
int32_t L_235 = 2;
uint32_t L_236 = (L_234)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_235));
MD4Managed_HH_m2535673516(__this, (uint32_t*)(&V_0), L_231, L_232, L_233, L_236, (uint8_t)3, /*hidden argument*/NULL);
uint32_t L_237 = V_0;
uint32_t L_238 = V_1;
uint32_t L_239 = V_2;
UInt32U5BU5D_t2770800703* L_240 = __this->get_x_7();
int32_t L_241 = ((int32_t)10);
uint32_t L_242 = (L_240)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_241));
MD4Managed_HH_m2535673516(__this, (uint32_t*)(&V_3), L_237, L_238, L_239, L_242, (uint8_t)((int32_t)9), /*hidden argument*/NULL);
uint32_t L_243 = V_3;
uint32_t L_244 = V_0;
uint32_t L_245 = V_1;
UInt32U5BU5D_t2770800703* L_246 = __this->get_x_7();
int32_t L_247 = 6;
uint32_t L_248 = (L_246)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_247));
MD4Managed_HH_m2535673516(__this, (uint32_t*)(&V_2), L_243, L_244, L_245, L_248, (uint8_t)((int32_t)11), /*hidden argument*/NULL);
uint32_t L_249 = V_2;
uint32_t L_250 = V_3;
uint32_t L_251 = V_0;
UInt32U5BU5D_t2770800703* L_252 = __this->get_x_7();
int32_t L_253 = ((int32_t)14);
uint32_t L_254 = (L_252)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_253));
MD4Managed_HH_m2535673516(__this, (uint32_t*)(&V_1), L_249, L_250, L_251, L_254, (uint8_t)((int32_t)15), /*hidden argument*/NULL);
uint32_t L_255 = V_1;
uint32_t L_256 = V_2;
uint32_t L_257 = V_3;
UInt32U5BU5D_t2770800703* L_258 = __this->get_x_7();
int32_t L_259 = 1;
uint32_t L_260 = (L_258)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_259));
MD4Managed_HH_m2535673516(__this, (uint32_t*)(&V_0), L_255, L_256, L_257, L_260, (uint8_t)3, /*hidden argument*/NULL);
uint32_t L_261 = V_0;
uint32_t L_262 = V_1;
uint32_t L_263 = V_2;
UInt32U5BU5D_t2770800703* L_264 = __this->get_x_7();
int32_t L_265 = ((int32_t)9);
uint32_t L_266 = (L_264)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_265));
MD4Managed_HH_m2535673516(__this, (uint32_t*)(&V_3), L_261, L_262, L_263, L_266, (uint8_t)((int32_t)9), /*hidden argument*/NULL);
uint32_t L_267 = V_3;
uint32_t L_268 = V_0;
uint32_t L_269 = V_1;
UInt32U5BU5D_t2770800703* L_270 = __this->get_x_7();
int32_t L_271 = 5;
uint32_t L_272 = (L_270)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_271));
MD4Managed_HH_m2535673516(__this, (uint32_t*)(&V_2), L_267, L_268, L_269, L_272, (uint8_t)((int32_t)11), /*hidden argument*/NULL);
uint32_t L_273 = V_2;
uint32_t L_274 = V_3;
uint32_t L_275 = V_0;
UInt32U5BU5D_t2770800703* L_276 = __this->get_x_7();
int32_t L_277 = ((int32_t)13);
uint32_t L_278 = (L_276)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_277));
MD4Managed_HH_m2535673516(__this, (uint32_t*)(&V_1), L_273, L_274, L_275, L_278, (uint8_t)((int32_t)15), /*hidden argument*/NULL);
uint32_t L_279 = V_1;
uint32_t L_280 = V_2;
uint32_t L_281 = V_3;
UInt32U5BU5D_t2770800703* L_282 = __this->get_x_7();
int32_t L_283 = 3;
uint32_t L_284 = (L_282)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_283));
MD4Managed_HH_m2535673516(__this, (uint32_t*)(&V_0), L_279, L_280, L_281, L_284, (uint8_t)3, /*hidden argument*/NULL);
uint32_t L_285 = V_0;
uint32_t L_286 = V_1;
uint32_t L_287 = V_2;
UInt32U5BU5D_t2770800703* L_288 = __this->get_x_7();
int32_t L_289 = ((int32_t)11);
uint32_t L_290 = (L_288)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_289));
MD4Managed_HH_m2535673516(__this, (uint32_t*)(&V_3), L_285, L_286, L_287, L_290, (uint8_t)((int32_t)9), /*hidden argument*/NULL);
uint32_t L_291 = V_3;
uint32_t L_292 = V_0;
uint32_t L_293 = V_1;
UInt32U5BU5D_t2770800703* L_294 = __this->get_x_7();
int32_t L_295 = 7;
uint32_t L_296 = (L_294)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_295));
MD4Managed_HH_m2535673516(__this, (uint32_t*)(&V_2), L_291, L_292, L_293, L_296, (uint8_t)((int32_t)11), /*hidden argument*/NULL);
uint32_t L_297 = V_2;
uint32_t L_298 = V_3;
uint32_t L_299 = V_0;
UInt32U5BU5D_t2770800703* L_300 = __this->get_x_7();
int32_t L_301 = ((int32_t)15);
uint32_t L_302 = (L_300)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_301));
MD4Managed_HH_m2535673516(__this, (uint32_t*)(&V_1), L_297, L_298, L_299, L_302, (uint8_t)((int32_t)15), /*hidden argument*/NULL);
UInt32U5BU5D_t2770800703* L_303 = ___state0;
uint32_t* L_304 = ((L_303)->GetAddressAtUnchecked(static_cast<il2cpp_array_size_t>(0)));
uint32_t L_305 = V_0;
*((int32_t*)(L_304)) = (int32_t)((int32_t)il2cpp_codegen_add((int32_t)(*((uint32_t*)L_304)), (int32_t)L_305));
UInt32U5BU5D_t2770800703* L_306 = ___state0;
uint32_t* L_307 = ((L_306)->GetAddressAtUnchecked(static_cast<il2cpp_array_size_t>(1)));
uint32_t L_308 = V_1;
*((int32_t*)(L_307)) = (int32_t)((int32_t)il2cpp_codegen_add((int32_t)(*((uint32_t*)L_307)), (int32_t)L_308));
UInt32U5BU5D_t2770800703* L_309 = ___state0;
uint32_t* L_310 = ((L_309)->GetAddressAtUnchecked(static_cast<il2cpp_array_size_t>(2)));
uint32_t L_311 = V_2;
*((int32_t*)(L_310)) = (int32_t)((int32_t)il2cpp_codegen_add((int32_t)(*((uint32_t*)L_310)), (int32_t)L_311));
UInt32U5BU5D_t2770800703* L_312 = ___state0;
uint32_t* L_313 = ((L_312)->GetAddressAtUnchecked(static_cast<il2cpp_array_size_t>(3)));
uint32_t L_314 = V_3;
*((int32_t*)(L_313)) = (int32_t)((int32_t)il2cpp_codegen_add((int32_t)(*((uint32_t*)L_313)), (int32_t)L_314));
return;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void Mono.Security.Cryptography.MD5SHA1::.ctor()
extern "C" IL2CPP_METHOD_ATTR void MD5SHA1__ctor_m4081016482 (MD5SHA1_t723838944 * __this, const RuntimeMethod* method)
{
{
HashAlgorithm__ctor_m190815979(__this, /*hidden argument*/NULL);
MD5_t3177620429 * L_0 = MD5_Create_m3522414168(NULL /*static, unused*/, /*hidden argument*/NULL);
__this->set_md5_4(L_0);
SHA1_t1803193667 * L_1 = SHA1_Create_m1390871308(NULL /*static, unused*/, /*hidden argument*/NULL);
__this->set_sha_5(L_1);
HashAlgorithm_t1432317219 * L_2 = __this->get_md5_4();
int32_t L_3 = VirtFuncInvoker0< int32_t >::Invoke(12 /* System.Int32 System.Security.Cryptography.HashAlgorithm::get_HashSize() */, L_2);
HashAlgorithm_t1432317219 * L_4 = __this->get_sha_5();
int32_t L_5 = VirtFuncInvoker0< int32_t >::Invoke(12 /* System.Int32 System.Security.Cryptography.HashAlgorithm::get_HashSize() */, L_4);
((HashAlgorithm_t1432317219 *)__this)->set_HashSizeValue_1(((int32_t)il2cpp_codegen_add((int32_t)L_3, (int32_t)L_5)));
return;
}
}
// System.Void Mono.Security.Cryptography.MD5SHA1::Initialize()
extern "C" IL2CPP_METHOD_ATTR void MD5SHA1_Initialize_m675470944 (MD5SHA1_t723838944 * __this, const RuntimeMethod* method)
{
{
HashAlgorithm_t1432317219 * L_0 = __this->get_md5_4();
VirtActionInvoker0::Invoke(13 /* System.Void System.Security.Cryptography.HashAlgorithm::Initialize() */, L_0);
HashAlgorithm_t1432317219 * L_1 = __this->get_sha_5();
VirtActionInvoker0::Invoke(13 /* System.Void System.Security.Cryptography.HashAlgorithm::Initialize() */, L_1);
__this->set_hashing_6((bool)0);
return;
}
}
// System.Byte[] Mono.Security.Cryptography.MD5SHA1::HashFinal()
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* MD5SHA1_HashFinal_m4115488658 (MD5SHA1_t723838944 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (MD5SHA1_HashFinal_m4115488658_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
ByteU5BU5D_t4116647657* V_0 = NULL;
{
bool L_0 = __this->get_hashing_6();
if (L_0)
{
goto IL_0012;
}
}
{
__this->set_hashing_6((bool)1);
}
IL_0012:
{
HashAlgorithm_t1432317219 * L_1 = __this->get_md5_4();
ByteU5BU5D_t4116647657* L_2 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)0);
HashAlgorithm_TransformFinalBlock_m3005451348(L_1, L_2, 0, 0, /*hidden argument*/NULL);
HashAlgorithm_t1432317219 * L_3 = __this->get_sha_5();
ByteU5BU5D_t4116647657* L_4 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)0);
HashAlgorithm_TransformFinalBlock_m3005451348(L_3, L_4, 0, 0, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_5 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)((int32_t)36));
V_0 = L_5;
HashAlgorithm_t1432317219 * L_6 = __this->get_md5_4();
ByteU5BU5D_t4116647657* L_7 = VirtFuncInvoker0< ByteU5BU5D_t4116647657* >::Invoke(9 /* System.Byte[] System.Security.Cryptography.HashAlgorithm::get_Hash() */, L_6);
ByteU5BU5D_t4116647657* L_8 = V_0;
Buffer_BlockCopy_m2884209081(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_7, 0, (RuntimeArray *)(RuntimeArray *)L_8, 0, ((int32_t)16), /*hidden argument*/NULL);
HashAlgorithm_t1432317219 * L_9 = __this->get_sha_5();
ByteU5BU5D_t4116647657* L_10 = VirtFuncInvoker0< ByteU5BU5D_t4116647657* >::Invoke(9 /* System.Byte[] System.Security.Cryptography.HashAlgorithm::get_Hash() */, L_9);
ByteU5BU5D_t4116647657* L_11 = V_0;
Buffer_BlockCopy_m2884209081(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_10, 0, (RuntimeArray *)(RuntimeArray *)L_11, ((int32_t)16), ((int32_t)20), /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_12 = V_0;
return L_12;
}
}
// System.Void Mono.Security.Cryptography.MD5SHA1::HashCore(System.Byte[],System.Int32,System.Int32)
extern "C" IL2CPP_METHOD_ATTR void MD5SHA1_HashCore_m4171647335 (MD5SHA1_t723838944 * __this, ByteU5BU5D_t4116647657* ___array0, int32_t ___ibStart1, int32_t ___cbSize2, const RuntimeMethod* method)
{
{
bool L_0 = __this->get_hashing_6();
if (L_0)
{
goto IL_0012;
}
}
{
__this->set_hashing_6((bool)1);
}
IL_0012:
{
HashAlgorithm_t1432317219 * L_1 = __this->get_md5_4();
ByteU5BU5D_t4116647657* L_2 = ___array0;
int32_t L_3 = ___ibStart1;
int32_t L_4 = ___cbSize2;
ByteU5BU5D_t4116647657* L_5 = ___array0;
int32_t L_6 = ___ibStart1;
HashAlgorithm_TransformBlock_m4006041779(L_1, L_2, L_3, L_4, L_5, L_6, /*hidden argument*/NULL);
HashAlgorithm_t1432317219 * L_7 = __this->get_sha_5();
ByteU5BU5D_t4116647657* L_8 = ___array0;
int32_t L_9 = ___ibStart1;
int32_t L_10 = ___cbSize2;
ByteU5BU5D_t4116647657* L_11 = ___array0;
int32_t L_12 = ___ibStart1;
HashAlgorithm_TransformBlock_m4006041779(L_7, L_8, L_9, L_10, L_11, L_12, /*hidden argument*/NULL);
return;
}
}
// System.Byte[] Mono.Security.Cryptography.MD5SHA1::CreateSignature(System.Security.Cryptography.RSA)
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* MD5SHA1_CreateSignature_m3583449066 (MD5SHA1_t723838944 * __this, RSA_t2385438082 * ___rsa0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (MD5SHA1_CreateSignature_m3583449066_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
RSASslSignatureFormatter_t2709678514 * V_0 = NULL;
{
RSA_t2385438082 * L_0 = ___rsa0;
if (L_0)
{
goto IL_0011;
}
}
{
CryptographicUnexpectedOperationException_t2790575154 * L_1 = (CryptographicUnexpectedOperationException_t2790575154 *)il2cpp_codegen_object_new(CryptographicUnexpectedOperationException_t2790575154_il2cpp_TypeInfo_var);
CryptographicUnexpectedOperationException__ctor_m2381988196(L_1, _stringLiteral1813429223, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_1, NULL, MD5SHA1_CreateSignature_m3583449066_RuntimeMethod_var);
}
IL_0011:
{
RSA_t2385438082 * L_2 = ___rsa0;
RSASslSignatureFormatter_t2709678514 * L_3 = (RSASslSignatureFormatter_t2709678514 *)il2cpp_codegen_object_new(RSASslSignatureFormatter_t2709678514_il2cpp_TypeInfo_var);
RSASslSignatureFormatter__ctor_m1299283008(L_3, L_2, /*hidden argument*/NULL);
V_0 = L_3;
RSASslSignatureFormatter_t2709678514 * L_4 = V_0;
VirtActionInvoker1< String_t* >::Invoke(4 /* System.Void Mono.Security.Protocol.Tls.RSASslSignatureFormatter::SetHashAlgorithm(System.String) */, L_4, _stringLiteral1361554341);
RSASslSignatureFormatter_t2709678514 * L_5 = V_0;
ByteU5BU5D_t4116647657* L_6 = VirtFuncInvoker0< ByteU5BU5D_t4116647657* >::Invoke(9 /* System.Byte[] System.Security.Cryptography.HashAlgorithm::get_Hash() */, __this);
ByteU5BU5D_t4116647657* L_7 = VirtFuncInvoker1< ByteU5BU5D_t4116647657*, ByteU5BU5D_t4116647657* >::Invoke(6 /* System.Byte[] Mono.Security.Protocol.Tls.RSASslSignatureFormatter::CreateSignature(System.Byte[]) */, L_5, L_6);
return L_7;
}
}
// System.Boolean Mono.Security.Cryptography.MD5SHA1::VerifySignature(System.Security.Cryptography.RSA,System.Byte[])
extern "C" IL2CPP_METHOD_ATTR bool MD5SHA1_VerifySignature_m915115209 (MD5SHA1_t723838944 * __this, RSA_t2385438082 * ___rsa0, ByteU5BU5D_t4116647657* ___rgbSignature1, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (MD5SHA1_VerifySignature_m915115209_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
RSASslSignatureDeformatter_t3558097625 * V_0 = NULL;
{
RSA_t2385438082 * L_0 = ___rsa0;
if (L_0)
{
goto IL_0011;
}
}
{
CryptographicUnexpectedOperationException_t2790575154 * L_1 = (CryptographicUnexpectedOperationException_t2790575154 *)il2cpp_codegen_object_new(CryptographicUnexpectedOperationException_t2790575154_il2cpp_TypeInfo_var);
CryptographicUnexpectedOperationException__ctor_m2381988196(L_1, _stringLiteral1813429223, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_1, NULL, MD5SHA1_VerifySignature_m915115209_RuntimeMethod_var);
}
IL_0011:
{
ByteU5BU5D_t4116647657* L_2 = ___rgbSignature1;
if (L_2)
{
goto IL_0022;
}
}
{
ArgumentNullException_t1615371798 * L_3 = (ArgumentNullException_t1615371798 *)il2cpp_codegen_object_new(ArgumentNullException_t1615371798_il2cpp_TypeInfo_var);
ArgumentNullException__ctor_m1170824041(L_3, _stringLiteral3170101360, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_3, NULL, MD5SHA1_VerifySignature_m915115209_RuntimeMethod_var);
}
IL_0022:
{
RSA_t2385438082 * L_4 = ___rsa0;
RSASslSignatureDeformatter_t3558097625 * L_5 = (RSASslSignatureDeformatter_t3558097625 *)il2cpp_codegen_object_new(RSASslSignatureDeformatter_t3558097625_il2cpp_TypeInfo_var);
RSASslSignatureDeformatter__ctor_m4026549112(L_5, L_4, /*hidden argument*/NULL);
V_0 = L_5;
RSASslSignatureDeformatter_t3558097625 * L_6 = V_0;
VirtActionInvoker1< String_t* >::Invoke(4 /* System.Void Mono.Security.Protocol.Tls.RSASslSignatureDeformatter::SetHashAlgorithm(System.String) */, L_6, _stringLiteral1361554341);
RSASslSignatureDeformatter_t3558097625 * L_7 = V_0;
ByteU5BU5D_t4116647657* L_8 = VirtFuncInvoker0< ByteU5BU5D_t4116647657* >::Invoke(9 /* System.Byte[] System.Security.Cryptography.HashAlgorithm::get_Hash() */, __this);
ByteU5BU5D_t4116647657* L_9 = ___rgbSignature1;
bool L_10 = VirtFuncInvoker2< bool, ByteU5BU5D_t4116647657*, ByteU5BU5D_t4116647657* >::Invoke(6 /* System.Boolean Mono.Security.Protocol.Tls.RSASslSignatureDeformatter::VerifySignature(System.Byte[],System.Byte[]) */, L_7, L_8, L_9);
return L_10;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void Mono.Security.Cryptography.PKCS1::.cctor()
extern "C" IL2CPP_METHOD_ATTR void PKCS1__cctor_m2848504824 (RuntimeObject * __this /* static, unused */, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (PKCS1__cctor_m2848504824_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
ByteU5BU5D_t4116647657* L_0 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)((int32_t)20));
ByteU5BU5D_t4116647657* L_1 = L_0;
RuntimeFieldHandle_t1871169219 L_2 = { reinterpret_cast<intptr_t> (U3CPrivateImplementationDetailsU3E_t3057255363____U24U24fieldU2D6_2_FieldInfo_var) };
RuntimeHelpers_InitializeArray_m3117905507(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_1, L_2, /*hidden argument*/NULL);
((PKCS1_t1505584677_StaticFields*)il2cpp_codegen_static_fields_for(PKCS1_t1505584677_il2cpp_TypeInfo_var))->set_emptySHA1_0(L_1);
ByteU5BU5D_t4116647657* L_3 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)((int32_t)32));
ByteU5BU5D_t4116647657* L_4 = L_3;
RuntimeFieldHandle_t1871169219 L_5 = { reinterpret_cast<intptr_t> (U3CPrivateImplementationDetailsU3E_t3057255363____U24U24fieldU2D7_3_FieldInfo_var) };
RuntimeHelpers_InitializeArray_m3117905507(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_4, L_5, /*hidden argument*/NULL);
((PKCS1_t1505584677_StaticFields*)il2cpp_codegen_static_fields_for(PKCS1_t1505584677_il2cpp_TypeInfo_var))->set_emptySHA256_1(L_4);
ByteU5BU5D_t4116647657* L_6 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)((int32_t)48));
ByteU5BU5D_t4116647657* L_7 = L_6;
RuntimeFieldHandle_t1871169219 L_8 = { reinterpret_cast<intptr_t> (U3CPrivateImplementationDetailsU3E_t3057255363____U24U24fieldU2D8_4_FieldInfo_var) };
RuntimeHelpers_InitializeArray_m3117905507(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_7, L_8, /*hidden argument*/NULL);
((PKCS1_t1505584677_StaticFields*)il2cpp_codegen_static_fields_for(PKCS1_t1505584677_il2cpp_TypeInfo_var))->set_emptySHA384_2(L_7);
ByteU5BU5D_t4116647657* L_9 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)((int32_t)64));
ByteU5BU5D_t4116647657* L_10 = L_9;
RuntimeFieldHandle_t1871169219 L_11 = { reinterpret_cast<intptr_t> (U3CPrivateImplementationDetailsU3E_t3057255363____U24U24fieldU2D9_5_FieldInfo_var) };
RuntimeHelpers_InitializeArray_m3117905507(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_10, L_11, /*hidden argument*/NULL);
((PKCS1_t1505584677_StaticFields*)il2cpp_codegen_static_fields_for(PKCS1_t1505584677_il2cpp_TypeInfo_var))->set_emptySHA512_3(L_10);
return;
}
}
// System.Boolean Mono.Security.Cryptography.PKCS1::Compare(System.Byte[],System.Byte[])
extern "C" IL2CPP_METHOD_ATTR bool PKCS1_Compare_m8562819 (RuntimeObject * __this /* static, unused */, ByteU5BU5D_t4116647657* ___array10, ByteU5BU5D_t4116647657* ___array21, const RuntimeMethod* method)
{
bool V_0 = false;
int32_t V_1 = 0;
{
ByteU5BU5D_t4116647657* L_0 = ___array10;
ByteU5BU5D_t4116647657* L_1 = ___array21;
V_0 = (bool)((((int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_0)->max_length))))) == ((int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_1)->max_length))))))? 1 : 0);
bool L_2 = V_0;
if (!L_2)
{
goto IL_0030;
}
}
{
V_1 = 0;
goto IL_0027;
}
IL_0016:
{
ByteU5BU5D_t4116647657* L_3 = ___array10;
int32_t L_4 = V_1;
int32_t L_5 = L_4;
uint8_t L_6 = (L_3)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_5));
ByteU5BU5D_t4116647657* L_7 = ___array21;
int32_t L_8 = V_1;
int32_t L_9 = L_8;
uint8_t L_10 = (L_7)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_9));
if ((((int32_t)L_6) == ((int32_t)L_10)))
{
goto IL_0023;
}
}
{
return (bool)0;
}
IL_0023:
{
int32_t L_11 = V_1;
V_1 = ((int32_t)il2cpp_codegen_add((int32_t)L_11, (int32_t)1));
}
IL_0027:
{
int32_t L_12 = V_1;
ByteU5BU5D_t4116647657* L_13 = ___array10;
if ((((int32_t)L_12) < ((int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_13)->max_length)))))))
{
goto IL_0016;
}
}
IL_0030:
{
bool L_14 = V_0;
return L_14;
}
}
// System.Byte[] Mono.Security.Cryptography.PKCS1::I2OSP(System.Byte[],System.Int32)
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* PKCS1_I2OSP_m2559784711 (RuntimeObject * __this /* static, unused */, ByteU5BU5D_t4116647657* ___x0, int32_t ___size1, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (PKCS1_I2OSP_m2559784711_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
ByteU5BU5D_t4116647657* V_0 = NULL;
{
int32_t L_0 = ___size1;
ByteU5BU5D_t4116647657* L_1 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)L_0);
V_0 = L_1;
ByteU5BU5D_t4116647657* L_2 = ___x0;
ByteU5BU5D_t4116647657* L_3 = V_0;
ByteU5BU5D_t4116647657* L_4 = V_0;
ByteU5BU5D_t4116647657* L_5 = ___x0;
ByteU5BU5D_t4116647657* L_6 = ___x0;
Buffer_BlockCopy_m2884209081(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_2, 0, (RuntimeArray *)(RuntimeArray *)L_3, ((int32_t)il2cpp_codegen_subtract((int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_4)->max_length)))), (int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_5)->max_length)))))), (((int32_t)((int32_t)(((RuntimeArray *)L_6)->max_length)))), /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_7 = V_0;
return L_7;
}
}
// System.Byte[] Mono.Security.Cryptography.PKCS1::OS2IP(System.Byte[])
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* PKCS1_OS2IP_m1443067185 (RuntimeObject * __this /* static, unused */, ByteU5BU5D_t4116647657* ___x0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (PKCS1_OS2IP_m1443067185_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
int32_t V_0 = 0;
ByteU5BU5D_t4116647657* V_1 = NULL;
{
V_0 = 0;
goto IL_0007;
}
IL_0007:
{
ByteU5BU5D_t4116647657* L_0 = ___x0;
int32_t L_1 = V_0;
int32_t L_2 = L_1;
V_0 = ((int32_t)il2cpp_codegen_add((int32_t)L_2, (int32_t)1));
int32_t L_3 = L_2;
uint8_t L_4 = (L_0)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_3));
if (L_4)
{
goto IL_001c;
}
}
{
int32_t L_5 = V_0;
ByteU5BU5D_t4116647657* L_6 = ___x0;
if ((((int32_t)L_5) < ((int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_6)->max_length)))))))
{
goto IL_0007;
}
}
IL_001c:
{
int32_t L_7 = V_0;
V_0 = ((int32_t)il2cpp_codegen_subtract((int32_t)L_7, (int32_t)1));
int32_t L_8 = V_0;
if ((((int32_t)L_8) <= ((int32_t)0)))
{
goto IL_0040;
}
}
{
ByteU5BU5D_t4116647657* L_9 = ___x0;
int32_t L_10 = V_0;
ByteU5BU5D_t4116647657* L_11 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)((int32_t)il2cpp_codegen_subtract((int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_9)->max_length)))), (int32_t)L_10)));
V_1 = L_11;
ByteU5BU5D_t4116647657* L_12 = ___x0;
int32_t L_13 = V_0;
ByteU5BU5D_t4116647657* L_14 = V_1;
ByteU5BU5D_t4116647657* L_15 = V_1;
Buffer_BlockCopy_m2884209081(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_12, L_13, (RuntimeArray *)(RuntimeArray *)L_14, 0, (((int32_t)((int32_t)(((RuntimeArray *)L_15)->max_length)))), /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_16 = V_1;
return L_16;
}
IL_0040:
{
ByteU5BU5D_t4116647657* L_17 = ___x0;
return L_17;
}
}
// System.Byte[] Mono.Security.Cryptography.PKCS1::RSASP1(System.Security.Cryptography.RSA,System.Byte[])
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* PKCS1_RSASP1_m4286349561 (RuntimeObject * __this /* static, unused */, RSA_t2385438082 * ___rsa0, ByteU5BU5D_t4116647657* ___m1, const RuntimeMethod* method)
{
{
RSA_t2385438082 * L_0 = ___rsa0;
ByteU5BU5D_t4116647657* L_1 = ___m1;
ByteU5BU5D_t4116647657* L_2 = VirtFuncInvoker1< ByteU5BU5D_t4116647657*, ByteU5BU5D_t4116647657* >::Invoke(11 /* System.Byte[] System.Security.Cryptography.RSA::DecryptValue(System.Byte[]) */, L_0, L_1);
return L_2;
}
}
// System.Byte[] Mono.Security.Cryptography.PKCS1::RSAVP1(System.Security.Cryptography.RSA,System.Byte[])
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* PKCS1_RSAVP1_m43771175 (RuntimeObject * __this /* static, unused */, RSA_t2385438082 * ___rsa0, ByteU5BU5D_t4116647657* ___s1, const RuntimeMethod* method)
{
{
RSA_t2385438082 * L_0 = ___rsa0;
ByteU5BU5D_t4116647657* L_1 = ___s1;
ByteU5BU5D_t4116647657* L_2 = VirtFuncInvoker1< ByteU5BU5D_t4116647657*, ByteU5BU5D_t4116647657* >::Invoke(10 /* System.Byte[] System.Security.Cryptography.RSA::EncryptValue(System.Byte[]) */, L_0, L_1);
return L_2;
}
}
// System.Byte[] Mono.Security.Cryptography.PKCS1::Sign_v15(System.Security.Cryptography.RSA,System.Security.Cryptography.HashAlgorithm,System.Byte[])
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* PKCS1_Sign_v15_m3459793192 (RuntimeObject * __this /* static, unused */, RSA_t2385438082 * ___rsa0, HashAlgorithm_t1432317219 * ___hash1, ByteU5BU5D_t4116647657* ___hashValue2, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (PKCS1_Sign_v15_m3459793192_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
int32_t V_0 = 0;
ByteU5BU5D_t4116647657* V_1 = NULL;
ByteU5BU5D_t4116647657* V_2 = NULL;
ByteU5BU5D_t4116647657* V_3 = NULL;
ByteU5BU5D_t4116647657* V_4 = NULL;
{
RSA_t2385438082 * L_0 = ___rsa0;
int32_t L_1 = VirtFuncInvoker0< int32_t >::Invoke(5 /* System.Int32 System.Security.Cryptography.AsymmetricAlgorithm::get_KeySize() */, L_0);
V_0 = ((int32_t)((int32_t)L_1>>(int32_t)3));
HashAlgorithm_t1432317219 * L_2 = ___hash1;
ByteU5BU5D_t4116647657* L_3 = ___hashValue2;
int32_t L_4 = V_0;
IL2CPP_RUNTIME_CLASS_INIT(PKCS1_t1505584677_il2cpp_TypeInfo_var);
ByteU5BU5D_t4116647657* L_5 = PKCS1_Encode_v15_m2077073129(NULL /*static, unused*/, L_2, L_3, L_4, /*hidden argument*/NULL);
V_1 = L_5;
ByteU5BU5D_t4116647657* L_6 = V_1;
ByteU5BU5D_t4116647657* L_7 = PKCS1_OS2IP_m1443067185(NULL /*static, unused*/, L_6, /*hidden argument*/NULL);
V_2 = L_7;
RSA_t2385438082 * L_8 = ___rsa0;
ByteU5BU5D_t4116647657* L_9 = V_2;
ByteU5BU5D_t4116647657* L_10 = PKCS1_RSASP1_m4286349561(NULL /*static, unused*/, L_8, L_9, /*hidden argument*/NULL);
V_3 = L_10;
ByteU5BU5D_t4116647657* L_11 = V_3;
int32_t L_12 = V_0;
ByteU5BU5D_t4116647657* L_13 = PKCS1_I2OSP_m2559784711(NULL /*static, unused*/, L_11, L_12, /*hidden argument*/NULL);
V_4 = L_13;
ByteU5BU5D_t4116647657* L_14 = V_4;
return L_14;
}
}
// System.Boolean Mono.Security.Cryptography.PKCS1::Verify_v15(System.Security.Cryptography.RSA,System.Security.Cryptography.HashAlgorithm,System.Byte[],System.Byte[])
extern "C" IL2CPP_METHOD_ATTR bool PKCS1_Verify_v15_m4192025173 (RuntimeObject * __this /* static, unused */, RSA_t2385438082 * ___rsa0, HashAlgorithm_t1432317219 * ___hash1, ByteU5BU5D_t4116647657* ___hashValue2, ByteU5BU5D_t4116647657* ___signature3, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (PKCS1_Verify_v15_m4192025173_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
RSA_t2385438082 * L_0 = ___rsa0;
HashAlgorithm_t1432317219 * L_1 = ___hash1;
ByteU5BU5D_t4116647657* L_2 = ___hashValue2;
ByteU5BU5D_t4116647657* L_3 = ___signature3;
IL2CPP_RUNTIME_CLASS_INIT(PKCS1_t1505584677_il2cpp_TypeInfo_var);
bool L_4 = PKCS1_Verify_v15_m400093581(NULL /*static, unused*/, L_0, L_1, L_2, L_3, (bool)0, /*hidden argument*/NULL);
return L_4;
}
}
// System.Boolean Mono.Security.Cryptography.PKCS1::Verify_v15(System.Security.Cryptography.RSA,System.Security.Cryptography.HashAlgorithm,System.Byte[],System.Byte[],System.Boolean)
extern "C" IL2CPP_METHOD_ATTR bool PKCS1_Verify_v15_m400093581 (RuntimeObject * __this /* static, unused */, RSA_t2385438082 * ___rsa0, HashAlgorithm_t1432317219 * ___hash1, ByteU5BU5D_t4116647657* ___hashValue2, ByteU5BU5D_t4116647657* ___signature3, bool ___tryNonStandardEncoding4, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (PKCS1_Verify_v15_m400093581_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
int32_t V_0 = 0;
ByteU5BU5D_t4116647657* V_1 = NULL;
ByteU5BU5D_t4116647657* V_2 = NULL;
ByteU5BU5D_t4116647657* V_3 = NULL;
ByteU5BU5D_t4116647657* V_4 = NULL;
bool V_5 = false;
int32_t V_6 = 0;
ByteU5BU5D_t4116647657* V_7 = NULL;
{
RSA_t2385438082 * L_0 = ___rsa0;
int32_t L_1 = VirtFuncInvoker0< int32_t >::Invoke(5 /* System.Int32 System.Security.Cryptography.AsymmetricAlgorithm::get_KeySize() */, L_0);
V_0 = ((int32_t)((int32_t)L_1>>(int32_t)3));
ByteU5BU5D_t4116647657* L_2 = ___signature3;
IL2CPP_RUNTIME_CLASS_INIT(PKCS1_t1505584677_il2cpp_TypeInfo_var);
ByteU5BU5D_t4116647657* L_3 = PKCS1_OS2IP_m1443067185(NULL /*static, unused*/, L_2, /*hidden argument*/NULL);
V_1 = L_3;
RSA_t2385438082 * L_4 = ___rsa0;
ByteU5BU5D_t4116647657* L_5 = V_1;
ByteU5BU5D_t4116647657* L_6 = PKCS1_RSAVP1_m43771175(NULL /*static, unused*/, L_4, L_5, /*hidden argument*/NULL);
V_2 = L_6;
ByteU5BU5D_t4116647657* L_7 = V_2;
int32_t L_8 = V_0;
ByteU5BU5D_t4116647657* L_9 = PKCS1_I2OSP_m2559784711(NULL /*static, unused*/, L_7, L_8, /*hidden argument*/NULL);
V_3 = L_9;
HashAlgorithm_t1432317219 * L_10 = ___hash1;
ByteU5BU5D_t4116647657* L_11 = ___hashValue2;
int32_t L_12 = V_0;
ByteU5BU5D_t4116647657* L_13 = PKCS1_Encode_v15_m2077073129(NULL /*static, unused*/, L_10, L_11, L_12, /*hidden argument*/NULL);
V_4 = L_13;
ByteU5BU5D_t4116647657* L_14 = V_4;
ByteU5BU5D_t4116647657* L_15 = V_3;
bool L_16 = PKCS1_Compare_m8562819(NULL /*static, unused*/, L_14, L_15, /*hidden argument*/NULL);
V_5 = L_16;
bool L_17 = V_5;
if (L_17)
{
goto IL_0042;
}
}
{
bool L_18 = ___tryNonStandardEncoding4;
if (L_18)
{
goto IL_0045;
}
}
IL_0042:
{
bool L_19 = V_5;
return L_19;
}
IL_0045:
{
ByteU5BU5D_t4116647657* L_20 = V_3;
int32_t L_21 = 0;
uint8_t L_22 = (L_20)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_21));
if (L_22)
{
goto IL_0056;
}
}
{
ByteU5BU5D_t4116647657* L_23 = V_3;
int32_t L_24 = 1;
uint8_t L_25 = (L_23)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_24));
if ((((int32_t)L_25) == ((int32_t)1)))
{
goto IL_0058;
}
}
IL_0056:
{
return (bool)0;
}
IL_0058:
{
V_6 = 2;
goto IL_0076;
}
IL_0060:
{
ByteU5BU5D_t4116647657* L_26 = V_3;
int32_t L_27 = V_6;
int32_t L_28 = L_27;
uint8_t L_29 = (L_26)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_28));
if ((((int32_t)L_29) == ((int32_t)((int32_t)255))))
{
goto IL_0070;
}
}
{
return (bool)0;
}
IL_0070:
{
int32_t L_30 = V_6;
V_6 = ((int32_t)il2cpp_codegen_add((int32_t)L_30, (int32_t)1));
}
IL_0076:
{
int32_t L_31 = V_6;
ByteU5BU5D_t4116647657* L_32 = V_3;
ByteU5BU5D_t4116647657* L_33 = ___hashValue2;
if ((((int32_t)L_31) < ((int32_t)((int32_t)il2cpp_codegen_subtract((int32_t)((int32_t)il2cpp_codegen_subtract((int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_32)->max_length)))), (int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_33)->max_length)))))), (int32_t)1)))))
{
goto IL_0060;
}
}
{
ByteU5BU5D_t4116647657* L_34 = V_3;
int32_t L_35 = V_6;
int32_t L_36 = L_35;
V_6 = ((int32_t)il2cpp_codegen_add((int32_t)L_36, (int32_t)1));
int32_t L_37 = L_36;
uint8_t L_38 = (L_34)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_37));
if (!L_38)
{
goto IL_0096;
}
}
{
return (bool)0;
}
IL_0096:
{
ByteU5BU5D_t4116647657* L_39 = ___hashValue2;
ByteU5BU5D_t4116647657* L_40 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_39)->max_length)))));
V_7 = L_40;
ByteU5BU5D_t4116647657* L_41 = V_3;
int32_t L_42 = V_6;
ByteU5BU5D_t4116647657* L_43 = V_7;
ByteU5BU5D_t4116647657* L_44 = V_7;
Buffer_BlockCopy_m2884209081(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_41, L_42, (RuntimeArray *)(RuntimeArray *)L_43, 0, (((int32_t)((int32_t)(((RuntimeArray *)L_44)->max_length)))), /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_45 = V_7;
ByteU5BU5D_t4116647657* L_46 = ___hashValue2;
IL2CPP_RUNTIME_CLASS_INIT(PKCS1_t1505584677_il2cpp_TypeInfo_var);
bool L_47 = PKCS1_Compare_m8562819(NULL /*static, unused*/, L_45, L_46, /*hidden argument*/NULL);
return L_47;
}
}
// System.Byte[] Mono.Security.Cryptography.PKCS1::Encode_v15(System.Security.Cryptography.HashAlgorithm,System.Byte[],System.Int32)
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* PKCS1_Encode_v15_m2077073129 (RuntimeObject * __this /* static, unused */, HashAlgorithm_t1432317219 * ___hash0, ByteU5BU5D_t4116647657* ___hashValue1, int32_t ___emLength2, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (PKCS1_Encode_v15_m2077073129_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
ByteU5BU5D_t4116647657* V_0 = NULL;
String_t* V_1 = NULL;
ASN1_t2114160833 * V_2 = NULL;
ASN1_t2114160833 * V_3 = NULL;
ASN1_t2114160833 * V_4 = NULL;
int32_t V_5 = 0;
ByteU5BU5D_t4116647657* V_6 = NULL;
int32_t V_7 = 0;
{
ByteU5BU5D_t4116647657* L_0 = ___hashValue1;
HashAlgorithm_t1432317219 * L_1 = ___hash0;
int32_t L_2 = VirtFuncInvoker0< int32_t >::Invoke(12 /* System.Int32 System.Security.Cryptography.HashAlgorithm::get_HashSize() */, L_1);
if ((((int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_0)->max_length))))) == ((int32_t)((int32_t)((int32_t)L_2>>(int32_t)3)))))
{
goto IL_0026;
}
}
{
HashAlgorithm_t1432317219 * L_3 = ___hash0;
String_t* L_4 = VirtFuncInvoker0< String_t* >::Invoke(3 /* System.String System.Object::ToString() */, L_3);
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_5 = String_Concat_m3937257545(NULL /*static, unused*/, _stringLiteral491063406, L_4, /*hidden argument*/NULL);
CryptographicException_t248831461 * L_6 = (CryptographicException_t248831461 *)il2cpp_codegen_object_new(CryptographicException_t248831461_il2cpp_TypeInfo_var);
CryptographicException__ctor_m503735289(L_6, L_5, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_6, NULL, PKCS1_Encode_v15_m2077073129_RuntimeMethod_var);
}
IL_0026:
{
V_0 = (ByteU5BU5D_t4116647657*)NULL;
HashAlgorithm_t1432317219 * L_7 = ___hash0;
String_t* L_8 = VirtFuncInvoker0< String_t* >::Invoke(3 /* System.String System.Object::ToString() */, L_7);
IL2CPP_RUNTIME_CLASS_INIT(CryptoConfig_t4201145714_il2cpp_TypeInfo_var);
String_t* L_9 = CryptoConfig_MapNameToOID_m2044758263(NULL /*static, unused*/, L_8, /*hidden argument*/NULL);
V_1 = L_9;
String_t* L_10 = V_1;
if (!L_10)
{
goto IL_0091;
}
}
{
ASN1_t2114160833 * L_11 = (ASN1_t2114160833 *)il2cpp_codegen_object_new(ASN1_t2114160833_il2cpp_TypeInfo_var);
ASN1__ctor_m1239252869(L_11, (uint8_t)((int32_t)48), /*hidden argument*/NULL);
V_2 = L_11;
ASN1_t2114160833 * L_12 = V_2;
String_t* L_13 = V_1;
IL2CPP_RUNTIME_CLASS_INIT(CryptoConfig_t4201145714_il2cpp_TypeInfo_var);
ByteU5BU5D_t4116647657* L_14 = CryptoConfig_EncodeOID_m2635914623(NULL /*static, unused*/, L_13, /*hidden argument*/NULL);
ASN1_t2114160833 * L_15 = (ASN1_t2114160833 *)il2cpp_codegen_object_new(ASN1_t2114160833_il2cpp_TypeInfo_var);
ASN1__ctor_m1638893325(L_15, L_14, /*hidden argument*/NULL);
ASN1_Add_m2431139999(L_12, L_15, /*hidden argument*/NULL);
ASN1_t2114160833 * L_16 = V_2;
ASN1_t2114160833 * L_17 = (ASN1_t2114160833 *)il2cpp_codegen_object_new(ASN1_t2114160833_il2cpp_TypeInfo_var);
ASN1__ctor_m1239252869(L_17, (uint8_t)5, /*hidden argument*/NULL);
ASN1_Add_m2431139999(L_16, L_17, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_18 = ___hashValue1;
ASN1_t2114160833 * L_19 = (ASN1_t2114160833 *)il2cpp_codegen_object_new(ASN1_t2114160833_il2cpp_TypeInfo_var);
ASN1__ctor_m682794872(L_19, (uint8_t)4, L_18, /*hidden argument*/NULL);
V_3 = L_19;
ASN1_t2114160833 * L_20 = (ASN1_t2114160833 *)il2cpp_codegen_object_new(ASN1_t2114160833_il2cpp_TypeInfo_var);
ASN1__ctor_m1239252869(L_20, (uint8_t)((int32_t)48), /*hidden argument*/NULL);
V_4 = L_20;
ASN1_t2114160833 * L_21 = V_4;
ASN1_t2114160833 * L_22 = V_2;
ASN1_Add_m2431139999(L_21, L_22, /*hidden argument*/NULL);
ASN1_t2114160833 * L_23 = V_4;
ASN1_t2114160833 * L_24 = V_3;
ASN1_Add_m2431139999(L_23, L_24, /*hidden argument*/NULL);
ASN1_t2114160833 * L_25 = V_4;
ByteU5BU5D_t4116647657* L_26 = VirtFuncInvoker0< ByteU5BU5D_t4116647657* >::Invoke(4 /* System.Byte[] Mono.Security.ASN1::GetBytes() */, L_25);
V_0 = L_26;
goto IL_0093;
}
IL_0091:
{
ByteU5BU5D_t4116647657* L_27 = ___hashValue1;
V_0 = L_27;
}
IL_0093:
{
ByteU5BU5D_t4116647657* L_28 = ___hashValue1;
ByteU5BU5D_t4116647657* L_29 = V_0;
ByteU5BU5D_t4116647657* L_30 = V_0;
ByteU5BU5D_t4116647657* L_31 = ___hashValue1;
ByteU5BU5D_t4116647657* L_32 = ___hashValue1;
Buffer_BlockCopy_m2884209081(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_28, 0, (RuntimeArray *)(RuntimeArray *)L_29, ((int32_t)il2cpp_codegen_subtract((int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_30)->max_length)))), (int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_31)->max_length)))))), (((int32_t)((int32_t)(((RuntimeArray *)L_32)->max_length)))), /*hidden argument*/NULL);
int32_t L_33 = ___emLength2;
ByteU5BU5D_t4116647657* L_34 = V_0;
int32_t L_35 = Math_Max_m1873195862(NULL /*static, unused*/, 8, ((int32_t)il2cpp_codegen_subtract((int32_t)((int32_t)il2cpp_codegen_subtract((int32_t)L_33, (int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_34)->max_length)))))), (int32_t)3)), /*hidden argument*/NULL);
V_5 = L_35;
int32_t L_36 = V_5;
ByteU5BU5D_t4116647657* L_37 = V_0;
ByteU5BU5D_t4116647657* L_38 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)((int32_t)il2cpp_codegen_add((int32_t)((int32_t)il2cpp_codegen_add((int32_t)L_36, (int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_37)->max_length)))))), (int32_t)3)));
V_6 = L_38;
ByteU5BU5D_t4116647657* L_39 = V_6;
(L_39)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(1), (uint8_t)1);
V_7 = 2;
goto IL_00e0;
}
IL_00d0:
{
ByteU5BU5D_t4116647657* L_40 = V_6;
int32_t L_41 = V_7;
(L_40)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(L_41), (uint8_t)((int32_t)255));
int32_t L_42 = V_7;
V_7 = ((int32_t)il2cpp_codegen_add((int32_t)L_42, (int32_t)1));
}
IL_00e0:
{
int32_t L_43 = V_7;
int32_t L_44 = V_5;
if ((((int32_t)L_43) < ((int32_t)((int32_t)il2cpp_codegen_add((int32_t)L_44, (int32_t)2)))))
{
goto IL_00d0;
}
}
{
ByteU5BU5D_t4116647657* L_45 = V_0;
ByteU5BU5D_t4116647657* L_46 = V_6;
int32_t L_47 = V_5;
ByteU5BU5D_t4116647657* L_48 = V_0;
Buffer_BlockCopy_m2884209081(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_45, 0, (RuntimeArray *)(RuntimeArray *)L_46, ((int32_t)il2cpp_codegen_add((int32_t)L_47, (int32_t)3)), (((int32_t)((int32_t)(((RuntimeArray *)L_48)->max_length)))), /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_49 = V_6;
return L_49;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void Mono.Security.Cryptography.PKCS8/EncryptedPrivateKeyInfo::.ctor()
extern "C" IL2CPP_METHOD_ATTR void EncryptedPrivateKeyInfo__ctor_m3415744930 (EncryptedPrivateKeyInfo_t862116836 * __this, const RuntimeMethod* method)
{
{
Object__ctor_m297566312(__this, /*hidden argument*/NULL);
return;
}
}
// System.Void Mono.Security.Cryptography.PKCS8/EncryptedPrivateKeyInfo::.ctor(System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void EncryptedPrivateKeyInfo__ctor_m25839594 (EncryptedPrivateKeyInfo_t862116836 * __this, ByteU5BU5D_t4116647657* ___data0, const RuntimeMethod* method)
{
{
EncryptedPrivateKeyInfo__ctor_m3415744930(__this, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_0 = ___data0;
EncryptedPrivateKeyInfo_Decode_m3008916518(__this, L_0, /*hidden argument*/NULL);
return;
}
}
// System.String Mono.Security.Cryptography.PKCS8/EncryptedPrivateKeyInfo::get_Algorithm()
extern "C" IL2CPP_METHOD_ATTR String_t* EncryptedPrivateKeyInfo_get_Algorithm_m3027828440 (EncryptedPrivateKeyInfo_t862116836 * __this, const RuntimeMethod* method)
{
{
String_t* L_0 = __this->get__algorithm_0();
return L_0;
}
}
// System.Byte[] Mono.Security.Cryptography.PKCS8/EncryptedPrivateKeyInfo::get_EncryptedData()
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* EncryptedPrivateKeyInfo_get_EncryptedData_m491452551 (EncryptedPrivateKeyInfo_t862116836 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (EncryptedPrivateKeyInfo_get_EncryptedData_m491452551_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
ByteU5BU5D_t4116647657* G_B3_0 = NULL;
{
ByteU5BU5D_t4116647657* L_0 = __this->get__data_3();
if (L_0)
{
goto IL_0011;
}
}
{
G_B3_0 = ((ByteU5BU5D_t4116647657*)(NULL));
goto IL_0021;
}
IL_0011:
{
ByteU5BU5D_t4116647657* L_1 = __this->get__data_3();
RuntimeObject * L_2 = Array_Clone_m2672907798((RuntimeArray *)(RuntimeArray *)L_1, /*hidden argument*/NULL);
G_B3_0 = ((ByteU5BU5D_t4116647657*)Castclass((RuntimeObject*)L_2, ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var));
}
IL_0021:
{
return G_B3_0;
}
}
// System.Byte[] Mono.Security.Cryptography.PKCS8/EncryptedPrivateKeyInfo::get_Salt()
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* EncryptedPrivateKeyInfo_get_Salt_m1261804721 (EncryptedPrivateKeyInfo_t862116836 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (EncryptedPrivateKeyInfo_get_Salt_m1261804721_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
RandomNumberGenerator_t386037858 * V_0 = NULL;
{
ByteU5BU5D_t4116647657* L_0 = __this->get__salt_1();
if (L_0)
{
goto IL_0029;
}
}
{
RandomNumberGenerator_t386037858 * L_1 = RandomNumberGenerator_Create_m4162970280(NULL /*static, unused*/, /*hidden argument*/NULL);
V_0 = L_1;
ByteU5BU5D_t4116647657* L_2 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)8);
__this->set__salt_1(L_2);
RandomNumberGenerator_t386037858 * L_3 = V_0;
ByteU5BU5D_t4116647657* L_4 = __this->get__salt_1();
VirtActionInvoker1< ByteU5BU5D_t4116647657* >::Invoke(4 /* System.Void System.Security.Cryptography.RandomNumberGenerator::GetBytes(System.Byte[]) */, L_3, L_4);
}
IL_0029:
{
ByteU5BU5D_t4116647657* L_5 = __this->get__salt_1();
RuntimeObject * L_6 = Array_Clone_m2672907798((RuntimeArray *)(RuntimeArray *)L_5, /*hidden argument*/NULL);
return ((ByteU5BU5D_t4116647657*)Castclass((RuntimeObject*)L_6, ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var));
}
}
// System.Int32 Mono.Security.Cryptography.PKCS8/EncryptedPrivateKeyInfo::get_IterationCount()
extern "C" IL2CPP_METHOD_ATTR int32_t EncryptedPrivateKeyInfo_get_IterationCount_m2912222740 (EncryptedPrivateKeyInfo_t862116836 * __this, const RuntimeMethod* method)
{
{
int32_t L_0 = __this->get__iterations_2();
return L_0;
}
}
// System.Void Mono.Security.Cryptography.PKCS8/EncryptedPrivateKeyInfo::Decode(System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void EncryptedPrivateKeyInfo_Decode_m3008916518 (EncryptedPrivateKeyInfo_t862116836 * __this, ByteU5BU5D_t4116647657* ___data0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (EncryptedPrivateKeyInfo_Decode_m3008916518_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
ASN1_t2114160833 * V_0 = NULL;
ASN1_t2114160833 * V_1 = NULL;
ASN1_t2114160833 * V_2 = NULL;
ASN1_t2114160833 * V_3 = NULL;
ASN1_t2114160833 * V_4 = NULL;
ASN1_t2114160833 * V_5 = NULL;
ASN1_t2114160833 * V_6 = NULL;
{
ByteU5BU5D_t4116647657* L_0 = ___data0;
ASN1_t2114160833 * L_1 = (ASN1_t2114160833 *)il2cpp_codegen_object_new(ASN1_t2114160833_il2cpp_TypeInfo_var);
ASN1__ctor_m1638893325(L_1, L_0, /*hidden argument*/NULL);
V_0 = L_1;
ASN1_t2114160833 * L_2 = V_0;
uint8_t L_3 = ASN1_get_Tag_m2789147236(L_2, /*hidden argument*/NULL);
if ((((int32_t)L_3) == ((int32_t)((int32_t)48))))
{
goto IL_001f;
}
}
{
CryptographicException_t248831461 * L_4 = (CryptographicException_t248831461 *)il2cpp_codegen_object_new(CryptographicException_t248831461_il2cpp_TypeInfo_var);
CryptographicException__ctor_m503735289(L_4, _stringLiteral2449489188, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_4, NULL, EncryptedPrivateKeyInfo_Decode_m3008916518_RuntimeMethod_var);
}
IL_001f:
{
ASN1_t2114160833 * L_5 = V_0;
ASN1_t2114160833 * L_6 = ASN1_get_Item_m2255075813(L_5, 0, /*hidden argument*/NULL);
V_1 = L_6;
ASN1_t2114160833 * L_7 = V_1;
uint8_t L_8 = ASN1_get_Tag_m2789147236(L_7, /*hidden argument*/NULL);
if ((((int32_t)L_8) == ((int32_t)((int32_t)48))))
{
goto IL_003f;
}
}
{
CryptographicException_t248831461 * L_9 = (CryptographicException_t248831461 *)il2cpp_codegen_object_new(CryptographicException_t248831461_il2cpp_TypeInfo_var);
CryptographicException__ctor_m503735289(L_9, _stringLiteral2471616411, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_9, NULL, EncryptedPrivateKeyInfo_Decode_m3008916518_RuntimeMethod_var);
}
IL_003f:
{
ASN1_t2114160833 * L_10 = V_1;
ASN1_t2114160833 * L_11 = ASN1_get_Item_m2255075813(L_10, 0, /*hidden argument*/NULL);
V_2 = L_11;
ASN1_t2114160833 * L_12 = V_2;
uint8_t L_13 = ASN1_get_Tag_m2789147236(L_12, /*hidden argument*/NULL);
if ((((int32_t)L_13) == ((int32_t)6)))
{
goto IL_005e;
}
}
{
CryptographicException_t248831461 * L_14 = (CryptographicException_t248831461 *)il2cpp_codegen_object_new(CryptographicException_t248831461_il2cpp_TypeInfo_var);
CryptographicException__ctor_m503735289(L_14, _stringLiteral1133397176, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_14, NULL, EncryptedPrivateKeyInfo_Decode_m3008916518_RuntimeMethod_var);
}
IL_005e:
{
ASN1_t2114160833 * L_15 = V_2;
String_t* L_16 = ASN1Convert_ToOid_m3847701408(NULL /*static, unused*/, L_15, /*hidden argument*/NULL);
__this->set__algorithm_0(L_16);
ASN1_t2114160833 * L_17 = V_1;
int32_t L_18 = ASN1_get_Count_m1789520042(L_17, /*hidden argument*/NULL);
if ((((int32_t)L_18) <= ((int32_t)1)))
{
goto IL_00f2;
}
}
{
ASN1_t2114160833 * L_19 = V_1;
ASN1_t2114160833 * L_20 = ASN1_get_Item_m2255075813(L_19, 1, /*hidden argument*/NULL);
V_3 = L_20;
ASN1_t2114160833 * L_21 = V_3;
uint8_t L_22 = ASN1_get_Tag_m2789147236(L_21, /*hidden argument*/NULL);
if ((((int32_t)L_22) == ((int32_t)((int32_t)48))))
{
goto IL_0096;
}
}
{
CryptographicException_t248831461 * L_23 = (CryptographicException_t248831461 *)il2cpp_codegen_object_new(CryptographicException_t248831461_il2cpp_TypeInfo_var);
CryptographicException__ctor_m503735289(L_23, _stringLiteral2479900804, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_23, NULL, EncryptedPrivateKeyInfo_Decode_m3008916518_RuntimeMethod_var);
}
IL_0096:
{
ASN1_t2114160833 * L_24 = V_3;
ASN1_t2114160833 * L_25 = ASN1_get_Item_m2255075813(L_24, 0, /*hidden argument*/NULL);
V_4 = L_25;
ASN1_t2114160833 * L_26 = V_4;
uint8_t L_27 = ASN1_get_Tag_m2789147236(L_26, /*hidden argument*/NULL);
if ((((int32_t)L_27) == ((int32_t)4)))
{
goto IL_00b7;
}
}
{
CryptographicException_t248831461 * L_28 = (CryptographicException_t248831461 *)il2cpp_codegen_object_new(CryptographicException_t248831461_il2cpp_TypeInfo_var);
CryptographicException__ctor_m503735289(L_28, _stringLiteral2581649682, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_28, NULL, EncryptedPrivateKeyInfo_Decode_m3008916518_RuntimeMethod_var);
}
IL_00b7:
{
ASN1_t2114160833 * L_29 = V_4;
ByteU5BU5D_t4116647657* L_30 = ASN1_get_Value_m63296490(L_29, /*hidden argument*/NULL);
__this->set__salt_1(L_30);
ASN1_t2114160833 * L_31 = V_3;
ASN1_t2114160833 * L_32 = ASN1_get_Item_m2255075813(L_31, 1, /*hidden argument*/NULL);
V_5 = L_32;
ASN1_t2114160833 * L_33 = V_5;
uint8_t L_34 = ASN1_get_Tag_m2789147236(L_33, /*hidden argument*/NULL);
if ((((int32_t)L_34) == ((int32_t)2)))
{
goto IL_00e5;
}
}
{
CryptographicException_t248831461 * L_35 = (CryptographicException_t248831461 *)il2cpp_codegen_object_new(CryptographicException_t248831461_il2cpp_TypeInfo_var);
CryptographicException__ctor_m503735289(L_35, _stringLiteral1189022210, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_35, NULL, EncryptedPrivateKeyInfo_Decode_m3008916518_RuntimeMethod_var);
}
IL_00e5:
{
ASN1_t2114160833 * L_36 = V_5;
int32_t L_37 = ASN1Convert_ToInt32_m1017403318(NULL /*static, unused*/, L_36, /*hidden argument*/NULL);
__this->set__iterations_2(L_37);
}
IL_00f2:
{
ASN1_t2114160833 * L_38 = V_0;
ASN1_t2114160833 * L_39 = ASN1_get_Item_m2255075813(L_38, 1, /*hidden argument*/NULL);
V_6 = L_39;
ASN1_t2114160833 * L_40 = V_6;
uint8_t L_41 = ASN1_get_Tag_m2789147236(L_40, /*hidden argument*/NULL);
if ((((int32_t)L_41) == ((int32_t)4)))
{
goto IL_0113;
}
}
{
CryptographicException_t248831461 * L_42 = (CryptographicException_t248831461 *)il2cpp_codegen_object_new(CryptographicException_t248831461_il2cpp_TypeInfo_var);
CryptographicException__ctor_m503735289(L_42, _stringLiteral3895113801, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_42, NULL, EncryptedPrivateKeyInfo_Decode_m3008916518_RuntimeMethod_var);
}
IL_0113:
{
ASN1_t2114160833 * L_43 = V_6;
ByteU5BU5D_t4116647657* L_44 = ASN1_get_Value_m63296490(L_43, /*hidden argument*/NULL);
__this->set__data_3(L_44);
return;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void Mono.Security.Cryptography.PKCS8/PrivateKeyInfo::.ctor()
extern "C" IL2CPP_METHOD_ATTR void PrivateKeyInfo__ctor_m3331475997 (PrivateKeyInfo_t668027993 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (PrivateKeyInfo__ctor_m3331475997_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
Object__ctor_m297566312(__this, /*hidden argument*/NULL);
__this->set__version_0(0);
ArrayList_t2718874744 * L_0 = (ArrayList_t2718874744 *)il2cpp_codegen_object_new(ArrayList_t2718874744_il2cpp_TypeInfo_var);
ArrayList__ctor_m4254721275(L_0, /*hidden argument*/NULL);
__this->set__list_3(L_0);
return;
}
}
// System.Void Mono.Security.Cryptography.PKCS8/PrivateKeyInfo::.ctor(System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void PrivateKeyInfo__ctor_m2715455038 (PrivateKeyInfo_t668027993 * __this, ByteU5BU5D_t4116647657* ___data0, const RuntimeMethod* method)
{
{
PrivateKeyInfo__ctor_m3331475997(__this, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_0 = ___data0;
PrivateKeyInfo_Decode_m986145117(__this, L_0, /*hidden argument*/NULL);
return;
}
}
// System.Byte[] Mono.Security.Cryptography.PKCS8/PrivateKeyInfo::get_PrivateKey()
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* PrivateKeyInfo_get_PrivateKey_m3647771102 (PrivateKeyInfo_t668027993 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (PrivateKeyInfo_get_PrivateKey_m3647771102_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
ByteU5BU5D_t4116647657* L_0 = __this->get__key_2();
if (L_0)
{
goto IL_000d;
}
}
{
return (ByteU5BU5D_t4116647657*)NULL;
}
IL_000d:
{
ByteU5BU5D_t4116647657* L_1 = __this->get__key_2();
RuntimeObject * L_2 = Array_Clone_m2672907798((RuntimeArray *)(RuntimeArray *)L_1, /*hidden argument*/NULL);
return ((ByteU5BU5D_t4116647657*)Castclass((RuntimeObject*)L_2, ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var));
}
}
// System.Void Mono.Security.Cryptography.PKCS8/PrivateKeyInfo::Decode(System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void PrivateKeyInfo_Decode_m986145117 (PrivateKeyInfo_t668027993 * __this, ByteU5BU5D_t4116647657* ___data0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (PrivateKeyInfo_Decode_m986145117_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
ASN1_t2114160833 * V_0 = NULL;
ASN1_t2114160833 * V_1 = NULL;
ASN1_t2114160833 * V_2 = NULL;
ASN1_t2114160833 * V_3 = NULL;
ASN1_t2114160833 * V_4 = NULL;
ASN1_t2114160833 * V_5 = NULL;
int32_t V_6 = 0;
{
ByteU5BU5D_t4116647657* L_0 = ___data0;
ASN1_t2114160833 * L_1 = (ASN1_t2114160833 *)il2cpp_codegen_object_new(ASN1_t2114160833_il2cpp_TypeInfo_var);
ASN1__ctor_m1638893325(L_1, L_0, /*hidden argument*/NULL);
V_0 = L_1;
ASN1_t2114160833 * L_2 = V_0;
uint8_t L_3 = ASN1_get_Tag_m2789147236(L_2, /*hidden argument*/NULL);
if ((((int32_t)L_3) == ((int32_t)((int32_t)48))))
{
goto IL_001f;
}
}
{
CryptographicException_t248831461 * L_4 = (CryptographicException_t248831461 *)il2cpp_codegen_object_new(CryptographicException_t248831461_il2cpp_TypeInfo_var);
CryptographicException__ctor_m503735289(L_4, _stringLiteral3860840281, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_4, NULL, PrivateKeyInfo_Decode_m986145117_RuntimeMethod_var);
}
IL_001f:
{
ASN1_t2114160833 * L_5 = V_0;
ASN1_t2114160833 * L_6 = ASN1_get_Item_m2255075813(L_5, 0, /*hidden argument*/NULL);
V_1 = L_6;
ASN1_t2114160833 * L_7 = V_1;
uint8_t L_8 = ASN1_get_Tag_m2789147236(L_7, /*hidden argument*/NULL);
if ((((int32_t)L_8) == ((int32_t)2)))
{
goto IL_003e;
}
}
{
CryptographicException_t248831461 * L_9 = (CryptographicException_t248831461 *)il2cpp_codegen_object_new(CryptographicException_t248831461_il2cpp_TypeInfo_var);
CryptographicException__ctor_m503735289(L_9, _stringLiteral1111651387, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_9, NULL, PrivateKeyInfo_Decode_m986145117_RuntimeMethod_var);
}
IL_003e:
{
ASN1_t2114160833 * L_10 = V_1;
ByteU5BU5D_t4116647657* L_11 = ASN1_get_Value_m63296490(L_10, /*hidden argument*/NULL);
int32_t L_12 = 0;
uint8_t L_13 = (L_11)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_12));
__this->set__version_0(L_13);
ASN1_t2114160833 * L_14 = V_0;
ASN1_t2114160833 * L_15 = ASN1_get_Item_m2255075813(L_14, 1, /*hidden argument*/NULL);
V_2 = L_15;
ASN1_t2114160833 * L_16 = V_2;
uint8_t L_17 = ASN1_get_Tag_m2789147236(L_16, /*hidden argument*/NULL);
if ((((int32_t)L_17) == ((int32_t)((int32_t)48))))
{
goto IL_006c;
}
}
{
CryptographicException_t248831461 * L_18 = (CryptographicException_t248831461 *)il2cpp_codegen_object_new(CryptographicException_t248831461_il2cpp_TypeInfo_var);
CryptographicException__ctor_m503735289(L_18, _stringLiteral1133397176, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_18, NULL, PrivateKeyInfo_Decode_m986145117_RuntimeMethod_var);
}
IL_006c:
{
ASN1_t2114160833 * L_19 = V_2;
ASN1_t2114160833 * L_20 = ASN1_get_Item_m2255075813(L_19, 0, /*hidden argument*/NULL);
V_3 = L_20;
ASN1_t2114160833 * L_21 = V_3;
uint8_t L_22 = ASN1_get_Tag_m2789147236(L_21, /*hidden argument*/NULL);
if ((((int32_t)L_22) == ((int32_t)6)))
{
goto IL_008b;
}
}
{
CryptographicException_t248831461 * L_23 = (CryptographicException_t248831461 *)il2cpp_codegen_object_new(CryptographicException_t248831461_il2cpp_TypeInfo_var);
CryptographicException__ctor_m503735289(L_23, _stringLiteral3055172879, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_23, NULL, PrivateKeyInfo_Decode_m986145117_RuntimeMethod_var);
}
IL_008b:
{
ASN1_t2114160833 * L_24 = V_3;
String_t* L_25 = ASN1Convert_ToOid_m3847701408(NULL /*static, unused*/, L_24, /*hidden argument*/NULL);
__this->set__algorithm_1(L_25);
ASN1_t2114160833 * L_26 = V_0;
ASN1_t2114160833 * L_27 = ASN1_get_Item_m2255075813(L_26, 2, /*hidden argument*/NULL);
V_4 = L_27;
ASN1_t2114160833 * L_28 = V_4;
ByteU5BU5D_t4116647657* L_29 = ASN1_get_Value_m63296490(L_28, /*hidden argument*/NULL);
__this->set__key_2(L_29);
ASN1_t2114160833 * L_30 = V_0;
int32_t L_31 = ASN1_get_Count_m1789520042(L_30, /*hidden argument*/NULL);
if ((((int32_t)L_31) <= ((int32_t)3)))
{
goto IL_00f3;
}
}
{
ASN1_t2114160833 * L_32 = V_0;
ASN1_t2114160833 * L_33 = ASN1_get_Item_m2255075813(L_32, 3, /*hidden argument*/NULL);
V_5 = L_33;
V_6 = 0;
goto IL_00e5;
}
IL_00ca:
{
ArrayList_t2718874744 * L_34 = __this->get__list_3();
ASN1_t2114160833 * L_35 = V_5;
int32_t L_36 = V_6;
ASN1_t2114160833 * L_37 = ASN1_get_Item_m2255075813(L_35, L_36, /*hidden argument*/NULL);
VirtFuncInvoker1< int32_t, RuntimeObject * >::Invoke(30 /* System.Int32 System.Collections.ArrayList::Add(System.Object) */, L_34, L_37);
int32_t L_38 = V_6;
V_6 = ((int32_t)il2cpp_codegen_add((int32_t)L_38, (int32_t)1));
}
IL_00e5:
{
int32_t L_39 = V_6;
ASN1_t2114160833 * L_40 = V_5;
int32_t L_41 = ASN1_get_Count_m1789520042(L_40, /*hidden argument*/NULL);
if ((((int32_t)L_39) < ((int32_t)L_41)))
{
goto IL_00ca;
}
}
IL_00f3:
{
return;
}
}
// System.Byte[] Mono.Security.Cryptography.PKCS8/PrivateKeyInfo::RemoveLeadingZero(System.Byte[])
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* PrivateKeyInfo_RemoveLeadingZero_m3592760008 (RuntimeObject * __this /* static, unused */, ByteU5BU5D_t4116647657* ___bigInt0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (PrivateKeyInfo_RemoveLeadingZero_m3592760008_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
int32_t V_0 = 0;
int32_t V_1 = 0;
ByteU5BU5D_t4116647657* V_2 = NULL;
{
V_0 = 0;
ByteU5BU5D_t4116647657* L_0 = ___bigInt0;
V_1 = (((int32_t)((int32_t)(((RuntimeArray *)L_0)->max_length))));
ByteU5BU5D_t4116647657* L_1 = ___bigInt0;
int32_t L_2 = 0;
uint8_t L_3 = (L_1)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_2));
if (L_3)
{
goto IL_0014;
}
}
{
V_0 = 1;
int32_t L_4 = V_1;
V_1 = ((int32_t)il2cpp_codegen_subtract((int32_t)L_4, (int32_t)1));
}
IL_0014:
{
int32_t L_5 = V_1;
ByteU5BU5D_t4116647657* L_6 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)L_5);
V_2 = L_6;
ByteU5BU5D_t4116647657* L_7 = ___bigInt0;
int32_t L_8 = V_0;
ByteU5BU5D_t4116647657* L_9 = V_2;
int32_t L_10 = V_1;
Buffer_BlockCopy_m2884209081(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_7, L_8, (RuntimeArray *)(RuntimeArray *)L_9, 0, L_10, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_11 = V_2;
return L_11;
}
}
// System.Byte[] Mono.Security.Cryptography.PKCS8/PrivateKeyInfo::Normalize(System.Byte[],System.Int32)
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* PrivateKeyInfo_Normalize_m2274647848 (RuntimeObject * __this /* static, unused */, ByteU5BU5D_t4116647657* ___bigInt0, int32_t ___length1, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (PrivateKeyInfo_Normalize_m2274647848_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
ByteU5BU5D_t4116647657* V_0 = NULL;
{
ByteU5BU5D_t4116647657* L_0 = ___bigInt0;
int32_t L_1 = ___length1;
if ((!(((uint32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_0)->max_length))))) == ((uint32_t)L_1))))
{
goto IL_000b;
}
}
{
ByteU5BU5D_t4116647657* L_2 = ___bigInt0;
return L_2;
}
IL_000b:
{
ByteU5BU5D_t4116647657* L_3 = ___bigInt0;
int32_t L_4 = ___length1;
if ((((int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_3)->max_length))))) <= ((int32_t)L_4)))
{
goto IL_001b;
}
}
{
ByteU5BU5D_t4116647657* L_5 = ___bigInt0;
ByteU5BU5D_t4116647657* L_6 = PrivateKeyInfo_RemoveLeadingZero_m3592760008(NULL /*static, unused*/, L_5, /*hidden argument*/NULL);
return L_6;
}
IL_001b:
{
int32_t L_7 = ___length1;
ByteU5BU5D_t4116647657* L_8 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)L_7);
V_0 = L_8;
ByteU5BU5D_t4116647657* L_9 = ___bigInt0;
ByteU5BU5D_t4116647657* L_10 = V_0;
int32_t L_11 = ___length1;
ByteU5BU5D_t4116647657* L_12 = ___bigInt0;
ByteU5BU5D_t4116647657* L_13 = ___bigInt0;
Buffer_BlockCopy_m2884209081(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_9, 0, (RuntimeArray *)(RuntimeArray *)L_10, ((int32_t)il2cpp_codegen_subtract((int32_t)L_11, (int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_12)->max_length)))))), (((int32_t)((int32_t)(((RuntimeArray *)L_13)->max_length)))), /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_14 = V_0;
return L_14;
}
}
// System.Security.Cryptography.RSA Mono.Security.Cryptography.PKCS8/PrivateKeyInfo::DecodeRSA(System.Byte[])
extern "C" IL2CPP_METHOD_ATTR RSA_t2385438082 * PrivateKeyInfo_DecodeRSA_m4129124827 (RuntimeObject * __this /* static, unused */, ByteU5BU5D_t4116647657* ___keypair0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (PrivateKeyInfo_DecodeRSA_m4129124827_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
ASN1_t2114160833 * V_0 = NULL;
ASN1_t2114160833 * V_1 = NULL;
RSAParameters_t1728406613 V_2;
memset(&V_2, 0, sizeof(V_2));
int32_t V_3 = 0;
int32_t V_4 = 0;
RSA_t2385438082 * V_5 = NULL;
CspParameters_t239852639 * V_6 = NULL;
Exception_t * __last_unhandled_exception = 0;
NO_UNUSED_WARNING (__last_unhandled_exception);
Exception_t * __exception_local = 0;
NO_UNUSED_WARNING (__exception_local);
int32_t __leave_target = -1;
NO_UNUSED_WARNING (__leave_target);
{
ByteU5BU5D_t4116647657* L_0 = ___keypair0;
ASN1_t2114160833 * L_1 = (ASN1_t2114160833 *)il2cpp_codegen_object_new(ASN1_t2114160833_il2cpp_TypeInfo_var);
ASN1__ctor_m1638893325(L_1, L_0, /*hidden argument*/NULL);
V_0 = L_1;
ASN1_t2114160833 * L_2 = V_0;
uint8_t L_3 = ASN1_get_Tag_m2789147236(L_2, /*hidden argument*/NULL);
if ((((int32_t)L_3) == ((int32_t)((int32_t)48))))
{
goto IL_001f;
}
}
{
CryptographicException_t248831461 * L_4 = (CryptographicException_t248831461 *)il2cpp_codegen_object_new(CryptographicException_t248831461_il2cpp_TypeInfo_var);
CryptographicException__ctor_m503735289(L_4, _stringLiteral2973183703, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_4, NULL, PrivateKeyInfo_DecodeRSA_m4129124827_RuntimeMethod_var);
}
IL_001f:
{
ASN1_t2114160833 * L_5 = V_0;
ASN1_t2114160833 * L_6 = ASN1_get_Item_m2255075813(L_5, 0, /*hidden argument*/NULL);
V_1 = L_6;
ASN1_t2114160833 * L_7 = V_1;
uint8_t L_8 = ASN1_get_Tag_m2789147236(L_7, /*hidden argument*/NULL);
if ((((int32_t)L_8) == ((int32_t)2)))
{
goto IL_003e;
}
}
{
CryptographicException_t248831461 * L_9 = (CryptographicException_t248831461 *)il2cpp_codegen_object_new(CryptographicException_t248831461_il2cpp_TypeInfo_var);
CryptographicException__ctor_m503735289(L_9, _stringLiteral3023545426, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_9, NULL, PrivateKeyInfo_DecodeRSA_m4129124827_RuntimeMethod_var);
}
IL_003e:
{
ASN1_t2114160833 * L_10 = V_0;
int32_t L_11 = ASN1_get_Count_m1789520042(L_10, /*hidden argument*/NULL);
if ((((int32_t)L_11) >= ((int32_t)((int32_t)9))))
{
goto IL_0056;
}
}
{
CryptographicException_t248831461 * L_12 = (CryptographicException_t248831461 *)il2cpp_codegen_object_new(CryptographicException_t248831461_il2cpp_TypeInfo_var);
CryptographicException__ctor_m503735289(L_12, _stringLiteral470035263, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_12, NULL, PrivateKeyInfo_DecodeRSA_m4129124827_RuntimeMethod_var);
}
IL_0056:
{
il2cpp_codegen_initobj((&V_2), sizeof(RSAParameters_t1728406613 ));
ASN1_t2114160833 * L_13 = V_0;
ASN1_t2114160833 * L_14 = ASN1_get_Item_m2255075813(L_13, 1, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_15 = ASN1_get_Value_m63296490(L_14, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_16 = PrivateKeyInfo_RemoveLeadingZero_m3592760008(NULL /*static, unused*/, L_15, /*hidden argument*/NULL);
(&V_2)->set_Modulus_6(L_16);
ByteU5BU5D_t4116647657* L_17 = (&V_2)->get_Modulus_6();
V_3 = (((int32_t)((int32_t)(((RuntimeArray *)L_17)->max_length))));
int32_t L_18 = V_3;
V_4 = ((int32_t)((int32_t)L_18>>(int32_t)1));
ASN1_t2114160833 * L_19 = V_0;
ASN1_t2114160833 * L_20 = ASN1_get_Item_m2255075813(L_19, 3, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_21 = ASN1_get_Value_m63296490(L_20, /*hidden argument*/NULL);
int32_t L_22 = V_3;
ByteU5BU5D_t4116647657* L_23 = PrivateKeyInfo_Normalize_m2274647848(NULL /*static, unused*/, L_21, L_22, /*hidden argument*/NULL);
(&V_2)->set_D_2(L_23);
ASN1_t2114160833 * L_24 = V_0;
ASN1_t2114160833 * L_25 = ASN1_get_Item_m2255075813(L_24, 6, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_26 = ASN1_get_Value_m63296490(L_25, /*hidden argument*/NULL);
int32_t L_27 = V_4;
ByteU5BU5D_t4116647657* L_28 = PrivateKeyInfo_Normalize_m2274647848(NULL /*static, unused*/, L_26, L_27, /*hidden argument*/NULL);
(&V_2)->set_DP_3(L_28);
ASN1_t2114160833 * L_29 = V_0;
ASN1_t2114160833 * L_30 = ASN1_get_Item_m2255075813(L_29, 7, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_31 = ASN1_get_Value_m63296490(L_30, /*hidden argument*/NULL);
int32_t L_32 = V_4;
ByteU5BU5D_t4116647657* L_33 = PrivateKeyInfo_Normalize_m2274647848(NULL /*static, unused*/, L_31, L_32, /*hidden argument*/NULL);
(&V_2)->set_DQ_4(L_33);
ASN1_t2114160833 * L_34 = V_0;
ASN1_t2114160833 * L_35 = ASN1_get_Item_m2255075813(L_34, 2, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_36 = ASN1_get_Value_m63296490(L_35, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_37 = PrivateKeyInfo_RemoveLeadingZero_m3592760008(NULL /*static, unused*/, L_36, /*hidden argument*/NULL);
(&V_2)->set_Exponent_7(L_37);
ASN1_t2114160833 * L_38 = V_0;
ASN1_t2114160833 * L_39 = ASN1_get_Item_m2255075813(L_38, 8, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_40 = ASN1_get_Value_m63296490(L_39, /*hidden argument*/NULL);
int32_t L_41 = V_4;
ByteU5BU5D_t4116647657* L_42 = PrivateKeyInfo_Normalize_m2274647848(NULL /*static, unused*/, L_40, L_41, /*hidden argument*/NULL);
(&V_2)->set_InverseQ_5(L_42);
ASN1_t2114160833 * L_43 = V_0;
ASN1_t2114160833 * L_44 = ASN1_get_Item_m2255075813(L_43, 4, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_45 = ASN1_get_Value_m63296490(L_44, /*hidden argument*/NULL);
int32_t L_46 = V_4;
ByteU5BU5D_t4116647657* L_47 = PrivateKeyInfo_Normalize_m2274647848(NULL /*static, unused*/, L_45, L_46, /*hidden argument*/NULL);
(&V_2)->set_P_0(L_47);
ASN1_t2114160833 * L_48 = V_0;
ASN1_t2114160833 * L_49 = ASN1_get_Item_m2255075813(L_48, 5, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_50 = ASN1_get_Value_m63296490(L_49, /*hidden argument*/NULL);
int32_t L_51 = V_4;
ByteU5BU5D_t4116647657* L_52 = PrivateKeyInfo_Normalize_m2274647848(NULL /*static, unused*/, L_50, L_51, /*hidden argument*/NULL);
(&V_2)->set_Q_1(L_52);
V_5 = (RSA_t2385438082 *)NULL;
}
IL_013b:
try
{ // begin try (depth: 1)
RSA_t2385438082 * L_53 = RSA_Create_m4065275734(NULL /*static, unused*/, /*hidden argument*/NULL);
V_5 = L_53;
RSA_t2385438082 * L_54 = V_5;
RSAParameters_t1728406613 L_55 = V_2;
VirtActionInvoker1< RSAParameters_t1728406613 >::Invoke(13 /* System.Void System.Security.Cryptography.RSA::ImportParameters(System.Security.Cryptography.RSAParameters) */, L_54, L_55);
goto IL_0175;
} // end try (depth: 1)
catch(Il2CppExceptionWrapper& e)
{
__exception_local = (Exception_t *)e.ex;
if(il2cpp_codegen_class_is_assignable_from (CryptographicException_t248831461_il2cpp_TypeInfo_var, il2cpp_codegen_object_class(e.ex)))
goto CATCH_014f;
throw e;
}
CATCH_014f:
{ // begin catch(System.Security.Cryptography.CryptographicException)
CspParameters_t239852639 * L_56 = (CspParameters_t239852639 *)il2cpp_codegen_object_new(CspParameters_t239852639_il2cpp_TypeInfo_var);
CspParameters__ctor_m277845443(L_56, /*hidden argument*/NULL);
V_6 = L_56;
CspParameters_t239852639 * L_57 = V_6;
CspParameters_set_Flags_m397261363(L_57, 1, /*hidden argument*/NULL);
CspParameters_t239852639 * L_58 = V_6;
RSACryptoServiceProvider_t2683512874 * L_59 = (RSACryptoServiceProvider_t2683512874 *)il2cpp_codegen_object_new(RSACryptoServiceProvider_t2683512874_il2cpp_TypeInfo_var);
RSACryptoServiceProvider__ctor_m357386130(L_59, L_58, /*hidden argument*/NULL);
V_5 = L_59;
RSA_t2385438082 * L_60 = V_5;
RSAParameters_t1728406613 L_61 = V_2;
VirtActionInvoker1< RSAParameters_t1728406613 >::Invoke(13 /* System.Void System.Security.Cryptography.RSA::ImportParameters(System.Security.Cryptography.RSAParameters) */, L_60, L_61);
goto IL_0175;
} // end catch (depth: 1)
IL_0175:
{
RSA_t2385438082 * L_62 = V_5;
return L_62;
}
}
// System.Security.Cryptography.DSA Mono.Security.Cryptography.PKCS8/PrivateKeyInfo::DecodeDSA(System.Byte[],System.Security.Cryptography.DSAParameters)
extern "C" IL2CPP_METHOD_ATTR DSA_t2386879874 * PrivateKeyInfo_DecodeDSA_m2335813142 (RuntimeObject * __this /* static, unused */, ByteU5BU5D_t4116647657* ___privateKey0, DSAParameters_t1885824122 ___dsaParameters1, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (PrivateKeyInfo_DecodeDSA_m2335813142_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
ASN1_t2114160833 * V_0 = NULL;
DSA_t2386879874 * V_1 = NULL;
{
ByteU5BU5D_t4116647657* L_0 = ___privateKey0;
ASN1_t2114160833 * L_1 = (ASN1_t2114160833 *)il2cpp_codegen_object_new(ASN1_t2114160833_il2cpp_TypeInfo_var);
ASN1__ctor_m1638893325(L_1, L_0, /*hidden argument*/NULL);
V_0 = L_1;
ASN1_t2114160833 * L_2 = V_0;
uint8_t L_3 = ASN1_get_Tag_m2789147236(L_2, /*hidden argument*/NULL);
if ((((int32_t)L_3) == ((int32_t)2)))
{
goto IL_001e;
}
}
{
CryptographicException_t248831461 * L_4 = (CryptographicException_t248831461 *)il2cpp_codegen_object_new(CryptographicException_t248831461_il2cpp_TypeInfo_var);
CryptographicException__ctor_m503735289(L_4, _stringLiteral2973183703, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_4, NULL, PrivateKeyInfo_DecodeDSA_m2335813142_RuntimeMethod_var);
}
IL_001e:
{
ASN1_t2114160833 * L_5 = V_0;
ByteU5BU5D_t4116647657* L_6 = ASN1_get_Value_m63296490(L_5, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_7 = PrivateKeyInfo_Normalize_m2274647848(NULL /*static, unused*/, L_6, ((int32_t)20), /*hidden argument*/NULL);
(&___dsaParameters1)->set_X_6(L_7);
DSA_t2386879874 * L_8 = DSA_Create_m1220983153(NULL /*static, unused*/, /*hidden argument*/NULL);
V_1 = L_8;
DSA_t2386879874 * L_9 = V_1;
DSAParameters_t1885824122 L_10 = ___dsaParameters1;
VirtActionInvoker1< DSAParameters_t1885824122 >::Invoke(12 /* System.Void System.Security.Cryptography.DSA::ImportParameters(System.Security.Cryptography.DSAParameters) */, L_9, L_10);
DSA_t2386879874 * L_11 = V_1;
return L_11;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void Mono.Security.Cryptography.RC4::.ctor()
extern "C" IL2CPP_METHOD_ATTR void RC4__ctor_m3531760091 (RC4_t2752556436 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (RC4__ctor_m3531760091_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
SymmetricAlgorithm__ctor_m467277132(__this, /*hidden argument*/NULL);
((SymmetricAlgorithm_t4254223087 *)__this)->set_KeySizeValue_2(((int32_t)128));
((SymmetricAlgorithm_t4254223087 *)__this)->set_BlockSizeValue_0(((int32_t)64));
int32_t L_0 = ((SymmetricAlgorithm_t4254223087 *)__this)->get_BlockSizeValue_0();
((SymmetricAlgorithm_t4254223087 *)__this)->set_FeedbackSizeValue_6(L_0);
IL2CPP_RUNTIME_CLASS_INIT(RC4_t2752556436_il2cpp_TypeInfo_var);
KeySizesU5BU5D_t722666473* L_1 = ((RC4_t2752556436_StaticFields*)il2cpp_codegen_static_fields_for(RC4_t2752556436_il2cpp_TypeInfo_var))->get_s_legalBlockSizes_10();
((SymmetricAlgorithm_t4254223087 *)__this)->set_LegalBlockSizesValue_4(L_1);
KeySizesU5BU5D_t722666473* L_2 = ((RC4_t2752556436_StaticFields*)il2cpp_codegen_static_fields_for(RC4_t2752556436_il2cpp_TypeInfo_var))->get_s_legalKeySizes_11();
((SymmetricAlgorithm_t4254223087 *)__this)->set_LegalKeySizesValue_5(L_2);
return;
}
}
// System.Void Mono.Security.Cryptography.RC4::.cctor()
extern "C" IL2CPP_METHOD_ATTR void RC4__cctor_m362546962 (RuntimeObject * __this /* static, unused */, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (RC4__cctor_m362546962_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
KeySizesU5BU5D_t722666473* L_0 = (KeySizesU5BU5D_t722666473*)SZArrayNew(KeySizesU5BU5D_t722666473_il2cpp_TypeInfo_var, (uint32_t)1);
KeySizesU5BU5D_t722666473* L_1 = L_0;
KeySizes_t85027896 * L_2 = (KeySizes_t85027896 *)il2cpp_codegen_object_new(KeySizes_t85027896_il2cpp_TypeInfo_var);
KeySizes__ctor_m3113946058(L_2, ((int32_t)64), ((int32_t)64), 0, /*hidden argument*/NULL);
ArrayElementTypeCheck (L_1, L_2);
(L_1)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(0), (KeySizes_t85027896 *)L_2);
((RC4_t2752556436_StaticFields*)il2cpp_codegen_static_fields_for(RC4_t2752556436_il2cpp_TypeInfo_var))->set_s_legalBlockSizes_10(L_1);
KeySizesU5BU5D_t722666473* L_3 = (KeySizesU5BU5D_t722666473*)SZArrayNew(KeySizesU5BU5D_t722666473_il2cpp_TypeInfo_var, (uint32_t)1);
KeySizesU5BU5D_t722666473* L_4 = L_3;
KeySizes_t85027896 * L_5 = (KeySizes_t85027896 *)il2cpp_codegen_object_new(KeySizes_t85027896_il2cpp_TypeInfo_var);
KeySizes__ctor_m3113946058(L_5, ((int32_t)40), ((int32_t)2048), 8, /*hidden argument*/NULL);
ArrayElementTypeCheck (L_4, L_5);
(L_4)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(0), (KeySizes_t85027896 *)L_5);
((RC4_t2752556436_StaticFields*)il2cpp_codegen_static_fields_for(RC4_t2752556436_il2cpp_TypeInfo_var))->set_s_legalKeySizes_11(L_4);
return;
}
}
// System.Byte[] Mono.Security.Cryptography.RC4::get_IV()
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* RC4_get_IV_m2290186270 (RC4_t2752556436 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (RC4_get_IV_m2290186270_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
ByteU5BU5D_t4116647657* L_0 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)0);
return L_0;
}
}
// System.Void Mono.Security.Cryptography.RC4::set_IV(System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void RC4_set_IV_m844219403 (RC4_t2752556436 * __this, ByteU5BU5D_t4116647657* ___value0, const RuntimeMethod* method)
{
{
return;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void Mono.Security.Cryptography.RSAManaged::.ctor()
extern "C" IL2CPP_METHOD_ATTR void RSAManaged__ctor_m3504773110 (RSAManaged_t1757093820 * __this, const RuntimeMethod* method)
{
{
RSAManaged__ctor_m350841446(__this, ((int32_t)1024), /*hidden argument*/NULL);
return;
}
}
// System.Void Mono.Security.Cryptography.RSAManaged::.ctor(System.Int32)
extern "C" IL2CPP_METHOD_ATTR void RSAManaged__ctor_m350841446 (RSAManaged_t1757093820 * __this, int32_t ___keySize0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (RSAManaged__ctor_m350841446_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
__this->set_keyBlinding_3((bool)1);
RSA__ctor_m2923348713(__this, /*hidden argument*/NULL);
KeySizesU5BU5D_t722666473* L_0 = (KeySizesU5BU5D_t722666473*)SZArrayNew(KeySizesU5BU5D_t722666473_il2cpp_TypeInfo_var, (uint32_t)1);
((AsymmetricAlgorithm_t932037087 *)__this)->set_LegalKeySizesValue_1(L_0);
KeySizesU5BU5D_t722666473* L_1 = ((AsymmetricAlgorithm_t932037087 *)__this)->get_LegalKeySizesValue_1();
KeySizes_t85027896 * L_2 = (KeySizes_t85027896 *)il2cpp_codegen_object_new(KeySizes_t85027896_il2cpp_TypeInfo_var);
KeySizes__ctor_m3113946058(L_2, ((int32_t)384), ((int32_t)16384), 8, /*hidden argument*/NULL);
ArrayElementTypeCheck (L_1, L_2);
(L_1)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(0), (KeySizes_t85027896 *)L_2);
int32_t L_3 = ___keySize0;
AsymmetricAlgorithm_set_KeySize_m2163393617(__this, L_3, /*hidden argument*/NULL);
return;
}
}
// System.Void Mono.Security.Cryptography.RSAManaged::Finalize()
extern "C" IL2CPP_METHOD_ATTR void RSAManaged_Finalize_m297255587 (RSAManaged_t1757093820 * __this, const RuntimeMethod* method)
{
Exception_t * __last_unhandled_exception = 0;
NO_UNUSED_WARNING (__last_unhandled_exception);
Exception_t * __exception_local = 0;
NO_UNUSED_WARNING (__exception_local);
int32_t __leave_target = -1;
NO_UNUSED_WARNING (__leave_target);
IL_0000:
try
{ // begin try (depth: 1)
VirtActionInvoker1< bool >::Invoke(7 /* System.Void Mono.Security.Cryptography.RSAManaged::Dispose(System.Boolean) */, __this, (bool)0);
IL2CPP_LEAVE(0x13, FINALLY_000c);
} // end try (depth: 1)
catch(Il2CppExceptionWrapper& e)
{
__last_unhandled_exception = (Exception_t *)e.ex;
goto FINALLY_000c;
}
FINALLY_000c:
{ // begin finally (depth: 1)
Object_Finalize_m3076187857(__this, /*hidden argument*/NULL);
IL2CPP_END_FINALLY(12)
} // end finally (depth: 1)
IL2CPP_CLEANUP(12)
{
IL2CPP_JUMP_TBL(0x13, IL_0013)
IL2CPP_RETHROW_IF_UNHANDLED(Exception_t *)
}
IL_0013:
{
return;
}
}
// System.Void Mono.Security.Cryptography.RSAManaged::GenerateKeyPair()
extern "C" IL2CPP_METHOD_ATTR void RSAManaged_GenerateKeyPair_m2364618953 (RSAManaged_t1757093820 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (RSAManaged_GenerateKeyPair_m2364618953_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
int32_t V_0 = 0;
int32_t V_1 = 0;
uint32_t V_2 = 0;
BigInteger_t2902905090 * V_3 = NULL;
BigInteger_t2902905090 * V_4 = NULL;
BigInteger_t2902905090 * V_5 = NULL;
{
int32_t L_0 = VirtFuncInvoker0< int32_t >::Invoke(5 /* System.Int32 Mono.Security.Cryptography.RSAManaged::get_KeySize() */, __this);
V_0 = ((int32_t)((int32_t)((int32_t)il2cpp_codegen_add((int32_t)L_0, (int32_t)1))>>(int32_t)1));
int32_t L_1 = VirtFuncInvoker0< int32_t >::Invoke(5 /* System.Int32 Mono.Security.Cryptography.RSAManaged::get_KeySize() */, __this);
int32_t L_2 = V_0;
V_1 = ((int32_t)il2cpp_codegen_subtract((int32_t)L_1, (int32_t)L_2));
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger_t2902905090 * L_3 = BigInteger_op_Implicit_m3414367033(NULL /*static, unused*/, ((int32_t)17), /*hidden argument*/NULL);
__this->set_e_13(L_3);
goto IL_004a;
}
IL_0026:
{
int32_t L_4 = V_0;
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger_t2902905090 * L_5 = BigInteger_GeneratePseudoPrime_m2547138838(NULL /*static, unused*/, L_4, /*hidden argument*/NULL);
__this->set_p_7(L_5);
BigInteger_t2902905090 * L_6 = __this->get_p_7();
uint32_t L_7 = BigInteger_op_Modulus_m3242311550(NULL /*static, unused*/, L_6, ((int32_t)17), /*hidden argument*/NULL);
if ((((int32_t)L_7) == ((int32_t)1)))
{
goto IL_004a;
}
}
{
goto IL_004f;
}
IL_004a:
{
goto IL_0026;
}
IL_004f:
{
goto IL_00ec;
}
IL_0054:
{
goto IL_0093;
}
IL_0059:
{
int32_t L_8 = V_1;
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger_t2902905090 * L_9 = BigInteger_GeneratePseudoPrime_m2547138838(NULL /*static, unused*/, L_8, /*hidden argument*/NULL);
__this->set_q_8(L_9);
BigInteger_t2902905090 * L_10 = __this->get_q_8();
uint32_t L_11 = BigInteger_op_Modulus_m3242311550(NULL /*static, unused*/, L_10, ((int32_t)17), /*hidden argument*/NULL);
if ((((int32_t)L_11) == ((int32_t)1)))
{
goto IL_0093;
}
}
{
BigInteger_t2902905090 * L_12 = __this->get_p_7();
BigInteger_t2902905090 * L_13 = __this->get_q_8();
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
bool L_14 = BigInteger_op_Inequality_m2697143438(NULL /*static, unused*/, L_12, L_13, /*hidden argument*/NULL);
if (!L_14)
{
goto IL_0093;
}
}
{
goto IL_0098;
}
IL_0093:
{
goto IL_0059;
}
IL_0098:
{
BigInteger_t2902905090 * L_15 = __this->get_p_7();
BigInteger_t2902905090 * L_16 = __this->get_q_8();
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger_t2902905090 * L_17 = BigInteger_op_Multiply_m3683746602(NULL /*static, unused*/, L_15, L_16, /*hidden argument*/NULL);
__this->set_n_12(L_17);
BigInteger_t2902905090 * L_18 = __this->get_n_12();
int32_t L_19 = BigInteger_BitCount_m2055977486(L_18, /*hidden argument*/NULL);
int32_t L_20 = VirtFuncInvoker0< int32_t >::Invoke(5 /* System.Int32 Mono.Security.Cryptography.RSAManaged::get_KeySize() */, __this);
if ((!(((uint32_t)L_19) == ((uint32_t)L_20))))
{
goto IL_00ca;
}
}
{
goto IL_00f1;
}
IL_00ca:
{
BigInteger_t2902905090 * L_21 = __this->get_p_7();
BigInteger_t2902905090 * L_22 = __this->get_q_8();
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
bool L_23 = BigInteger_op_LessThan_m463398176(NULL /*static, unused*/, L_21, L_22, /*hidden argument*/NULL);
if (!L_23)
{
goto IL_00ec;
}
}
{
BigInteger_t2902905090 * L_24 = __this->get_q_8();
__this->set_p_7(L_24);
}
IL_00ec:
{
goto IL_0054;
}
IL_00f1:
{
BigInteger_t2902905090 * L_25 = __this->get_p_7();
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger_t2902905090 * L_26 = BigInteger_op_Implicit_m2547142909(NULL /*static, unused*/, 1, /*hidden argument*/NULL);
BigInteger_t2902905090 * L_27 = BigInteger_op_Subtraction_m4245834512(NULL /*static, unused*/, L_25, L_26, /*hidden argument*/NULL);
V_3 = L_27;
BigInteger_t2902905090 * L_28 = __this->get_q_8();
BigInteger_t2902905090 * L_29 = BigInteger_op_Implicit_m2547142909(NULL /*static, unused*/, 1, /*hidden argument*/NULL);
BigInteger_t2902905090 * L_30 = BigInteger_op_Subtraction_m4245834512(NULL /*static, unused*/, L_28, L_29, /*hidden argument*/NULL);
V_4 = L_30;
BigInteger_t2902905090 * L_31 = V_3;
BigInteger_t2902905090 * L_32 = V_4;
BigInteger_t2902905090 * L_33 = BigInteger_op_Multiply_m3683746602(NULL /*static, unused*/, L_31, L_32, /*hidden argument*/NULL);
V_5 = L_33;
BigInteger_t2902905090 * L_34 = __this->get_e_13();
BigInteger_t2902905090 * L_35 = V_5;
BigInteger_t2902905090 * L_36 = BigInteger_ModInverse_m2426215562(L_34, L_35, /*hidden argument*/NULL);
__this->set_d_6(L_36);
BigInteger_t2902905090 * L_37 = __this->get_d_6();
BigInteger_t2902905090 * L_38 = V_3;
BigInteger_t2902905090 * L_39 = BigInteger_op_Modulus_m2565477533(NULL /*static, unused*/, L_37, L_38, /*hidden argument*/NULL);
__this->set_dp_9(L_39);
BigInteger_t2902905090 * L_40 = __this->get_d_6();
BigInteger_t2902905090 * L_41 = V_4;
BigInteger_t2902905090 * L_42 = BigInteger_op_Modulus_m2565477533(NULL /*static, unused*/, L_40, L_41, /*hidden argument*/NULL);
__this->set_dq_10(L_42);
BigInteger_t2902905090 * L_43 = __this->get_q_8();
BigInteger_t2902905090 * L_44 = __this->get_p_7();
BigInteger_t2902905090 * L_45 = BigInteger_ModInverse_m2426215562(L_43, L_44, /*hidden argument*/NULL);
__this->set_qInv_11(L_45);
__this->set_keypairGenerated_4((bool)1);
__this->set_isCRTpossible_2((bool)1);
KeyGeneratedEventHandler_t3064139578 * L_46 = __this->get_KeyGenerated_14();
if (!L_46)
{
goto IL_0195;
}
}
{
KeyGeneratedEventHandler_t3064139578 * L_47 = __this->get_KeyGenerated_14();
KeyGeneratedEventHandler_Invoke_m99769071(L_47, __this, (EventArgs_t3591816995 *)NULL, /*hidden argument*/NULL);
}
IL_0195:
{
return;
}
}
// System.Int32 Mono.Security.Cryptography.RSAManaged::get_KeySize()
extern "C" IL2CPP_METHOD_ATTR int32_t RSAManaged_get_KeySize_m1441482916 (RSAManaged_t1757093820 * __this, const RuntimeMethod* method)
{
int32_t V_0 = 0;
{
bool L_0 = __this->get_keypairGenerated_4();
if (!L_0)
{
goto IL_0029;
}
}
{
BigInteger_t2902905090 * L_1 = __this->get_n_12();
int32_t L_2 = BigInteger_BitCount_m2055977486(L_1, /*hidden argument*/NULL);
V_0 = L_2;
int32_t L_3 = V_0;
if (!((int32_t)((int32_t)L_3&(int32_t)7)))
{
goto IL_0027;
}
}
{
int32_t L_4 = V_0;
int32_t L_5 = V_0;
V_0 = ((int32_t)il2cpp_codegen_add((int32_t)L_4, (int32_t)((int32_t)il2cpp_codegen_subtract((int32_t)8, (int32_t)((int32_t)((int32_t)L_5&(int32_t)7))))));
}
IL_0027:
{
int32_t L_6 = V_0;
return L_6;
}
IL_0029:
{
int32_t L_7 = AsymmetricAlgorithm_get_KeySize_m2113907895(__this, /*hidden argument*/NULL);
return L_7;
}
}
// System.Boolean Mono.Security.Cryptography.RSAManaged::get_PublicOnly()
extern "C" IL2CPP_METHOD_ATTR bool RSAManaged_get_PublicOnly_m405847294 (RSAManaged_t1757093820 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (RSAManaged_get_PublicOnly_m405847294_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
int32_t G_B4_0 = 0;
int32_t G_B6_0 = 0;
{
bool L_0 = __this->get_keypairGenerated_4();
if (!L_0)
{
goto IL_002d;
}
}
{
BigInteger_t2902905090 * L_1 = __this->get_d_6();
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
bool L_2 = BigInteger_op_Equality_m1194739960(NULL /*static, unused*/, L_1, (BigInteger_t2902905090 *)NULL, /*hidden argument*/NULL);
if (L_2)
{
goto IL_002a;
}
}
{
BigInteger_t2902905090 * L_3 = __this->get_n_12();
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
bool L_4 = BigInteger_op_Equality_m1194739960(NULL /*static, unused*/, L_3, (BigInteger_t2902905090 *)NULL, /*hidden argument*/NULL);
G_B4_0 = ((int32_t)(L_4));
goto IL_002b;
}
IL_002a:
{
G_B4_0 = 1;
}
IL_002b:
{
G_B6_0 = G_B4_0;
goto IL_002e;
}
IL_002d:
{
G_B6_0 = 0;
}
IL_002e:
{
return (bool)G_B6_0;
}
}
// System.Byte[] Mono.Security.Cryptography.RSAManaged::DecryptValue(System.Byte[])
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* RSAManaged_DecryptValue_m1804388365 (RSAManaged_t1757093820 * __this, ByteU5BU5D_t4116647657* ___rgb0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (RSAManaged_DecryptValue_m1804388365_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
BigInteger_t2902905090 * V_0 = NULL;
BigInteger_t2902905090 * V_1 = NULL;
BigInteger_t2902905090 * V_2 = NULL;
BigInteger_t2902905090 * V_3 = NULL;
BigInteger_t2902905090 * V_4 = NULL;
BigInteger_t2902905090 * V_5 = NULL;
ByteU5BU5D_t4116647657* V_6 = NULL;
{
bool L_0 = __this->get_m_disposed_5();
if (!L_0)
{
goto IL_0016;
}
}
{
ObjectDisposedException_t21392786 * L_1 = (ObjectDisposedException_t21392786 *)il2cpp_codegen_object_new(ObjectDisposedException_t21392786_il2cpp_TypeInfo_var);
ObjectDisposedException__ctor_m3603759869(L_1, _stringLiteral2186307263, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_1, NULL, RSAManaged_DecryptValue_m1804388365_RuntimeMethod_var);
}
IL_0016:
{
bool L_2 = __this->get_keypairGenerated_4();
if (L_2)
{
goto IL_0027;
}
}
{
RSAManaged_GenerateKeyPair_m2364618953(__this, /*hidden argument*/NULL);
}
IL_0027:
{
ByteU5BU5D_t4116647657* L_3 = ___rgb0;
BigInteger_t2902905090 * L_4 = (BigInteger_t2902905090 *)il2cpp_codegen_object_new(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger__ctor_m2601366464(L_4, L_3, /*hidden argument*/NULL);
V_0 = L_4;
V_1 = (BigInteger_t2902905090 *)NULL;
bool L_5 = __this->get_keyBlinding_3();
if (!L_5)
{
goto IL_0070;
}
}
{
BigInteger_t2902905090 * L_6 = __this->get_n_12();
int32_t L_7 = BigInteger_BitCount_m2055977486(L_6, /*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger_t2902905090 * L_8 = BigInteger_GenerateRandom_m1790382084(NULL /*static, unused*/, L_7, /*hidden argument*/NULL);
V_1 = L_8;
BigInteger_t2902905090 * L_9 = V_1;
BigInteger_t2902905090 * L_10 = __this->get_e_13();
BigInteger_t2902905090 * L_11 = __this->get_n_12();
BigInteger_t2902905090 * L_12 = BigInteger_ModPow_m3776562770(L_9, L_10, L_11, /*hidden argument*/NULL);
BigInteger_t2902905090 * L_13 = V_0;
BigInteger_t2902905090 * L_14 = BigInteger_op_Multiply_m3683746602(NULL /*static, unused*/, L_12, L_13, /*hidden argument*/NULL);
BigInteger_t2902905090 * L_15 = __this->get_n_12();
BigInteger_t2902905090 * L_16 = BigInteger_op_Modulus_m2565477533(NULL /*static, unused*/, L_14, L_15, /*hidden argument*/NULL);
V_0 = L_16;
}
IL_0070:
{
bool L_17 = __this->get_isCRTpossible_2();
if (!L_17)
{
goto IL_012e;
}
}
{
BigInteger_t2902905090 * L_18 = V_0;
BigInteger_t2902905090 * L_19 = __this->get_dp_9();
BigInteger_t2902905090 * L_20 = __this->get_p_7();
BigInteger_t2902905090 * L_21 = BigInteger_ModPow_m3776562770(L_18, L_19, L_20, /*hidden argument*/NULL);
V_3 = L_21;
BigInteger_t2902905090 * L_22 = V_0;
BigInteger_t2902905090 * L_23 = __this->get_dq_10();
BigInteger_t2902905090 * L_24 = __this->get_q_8();
BigInteger_t2902905090 * L_25 = BigInteger_ModPow_m3776562770(L_22, L_23, L_24, /*hidden argument*/NULL);
V_4 = L_25;
BigInteger_t2902905090 * L_26 = V_4;
BigInteger_t2902905090 * L_27 = V_3;
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
bool L_28 = BigInteger_op_GreaterThan_m2974122765(NULL /*static, unused*/, L_26, L_27, /*hidden argument*/NULL);
if (!L_28)
{
goto IL_00f4;
}
}
{
BigInteger_t2902905090 * L_29 = __this->get_p_7();
BigInteger_t2902905090 * L_30 = V_4;
BigInteger_t2902905090 * L_31 = V_3;
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger_t2902905090 * L_32 = BigInteger_op_Subtraction_m4245834512(NULL /*static, unused*/, L_30, L_31, /*hidden argument*/NULL);
BigInteger_t2902905090 * L_33 = __this->get_qInv_11();
BigInteger_t2902905090 * L_34 = BigInteger_op_Multiply_m3683746602(NULL /*static, unused*/, L_32, L_33, /*hidden argument*/NULL);
BigInteger_t2902905090 * L_35 = __this->get_p_7();
BigInteger_t2902905090 * L_36 = BigInteger_op_Modulus_m2565477533(NULL /*static, unused*/, L_34, L_35, /*hidden argument*/NULL);
BigInteger_t2902905090 * L_37 = BigInteger_op_Subtraction_m4245834512(NULL /*static, unused*/, L_29, L_36, /*hidden argument*/NULL);
V_5 = L_37;
BigInteger_t2902905090 * L_38 = V_4;
BigInteger_t2902905090 * L_39 = __this->get_q_8();
BigInteger_t2902905090 * L_40 = V_5;
BigInteger_t2902905090 * L_41 = BigInteger_op_Multiply_m3683746602(NULL /*static, unused*/, L_39, L_40, /*hidden argument*/NULL);
BigInteger_t2902905090 * L_42 = BigInteger_op_Addition_m1114527046(NULL /*static, unused*/, L_38, L_41, /*hidden argument*/NULL);
V_2 = L_42;
goto IL_0129;
}
IL_00f4:
{
BigInteger_t2902905090 * L_43 = V_3;
BigInteger_t2902905090 * L_44 = V_4;
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger_t2902905090 * L_45 = BigInteger_op_Subtraction_m4245834512(NULL /*static, unused*/, L_43, L_44, /*hidden argument*/NULL);
BigInteger_t2902905090 * L_46 = __this->get_qInv_11();
BigInteger_t2902905090 * L_47 = BigInteger_op_Multiply_m3683746602(NULL /*static, unused*/, L_45, L_46, /*hidden argument*/NULL);
BigInteger_t2902905090 * L_48 = __this->get_p_7();
BigInteger_t2902905090 * L_49 = BigInteger_op_Modulus_m2565477533(NULL /*static, unused*/, L_47, L_48, /*hidden argument*/NULL);
V_5 = L_49;
BigInteger_t2902905090 * L_50 = V_4;
BigInteger_t2902905090 * L_51 = __this->get_q_8();
BigInteger_t2902905090 * L_52 = V_5;
BigInteger_t2902905090 * L_53 = BigInteger_op_Multiply_m3683746602(NULL /*static, unused*/, L_51, L_52, /*hidden argument*/NULL);
BigInteger_t2902905090 * L_54 = BigInteger_op_Addition_m1114527046(NULL /*static, unused*/, L_50, L_53, /*hidden argument*/NULL);
V_2 = L_54;
}
IL_0129:
{
goto IL_0161;
}
IL_012e:
{
bool L_55 = RSAManaged_get_PublicOnly_m405847294(__this, /*hidden argument*/NULL);
if (L_55)
{
goto IL_0151;
}
}
{
BigInteger_t2902905090 * L_56 = V_0;
BigInteger_t2902905090 * L_57 = __this->get_d_6();
BigInteger_t2902905090 * L_58 = __this->get_n_12();
BigInteger_t2902905090 * L_59 = BigInteger_ModPow_m3776562770(L_56, L_57, L_58, /*hidden argument*/NULL);
V_2 = L_59;
goto IL_0161;
}
IL_0151:
{
String_t* L_60 = Locale_GetText_m3520169047(NULL /*static, unused*/, _stringLiteral2368775859, /*hidden argument*/NULL);
CryptographicException_t248831461 * L_61 = (CryptographicException_t248831461 *)il2cpp_codegen_object_new(CryptographicException_t248831461_il2cpp_TypeInfo_var);
CryptographicException__ctor_m503735289(L_61, L_60, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_61, NULL, RSAManaged_DecryptValue_m1804388365_RuntimeMethod_var);
}
IL_0161:
{
bool L_62 = __this->get_keyBlinding_3();
if (!L_62)
{
goto IL_0190;
}
}
{
BigInteger_t2902905090 * L_63 = V_2;
BigInteger_t2902905090 * L_64 = V_1;
BigInteger_t2902905090 * L_65 = __this->get_n_12();
BigInteger_t2902905090 * L_66 = BigInteger_ModInverse_m2426215562(L_64, L_65, /*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger_t2902905090 * L_67 = BigInteger_op_Multiply_m3683746602(NULL /*static, unused*/, L_63, L_66, /*hidden argument*/NULL);
BigInteger_t2902905090 * L_68 = __this->get_n_12();
BigInteger_t2902905090 * L_69 = BigInteger_op_Modulus_m2565477533(NULL /*static, unused*/, L_67, L_68, /*hidden argument*/NULL);
V_2 = L_69;
BigInteger_t2902905090 * L_70 = V_1;
BigInteger_Clear_m2995574218(L_70, /*hidden argument*/NULL);
}
IL_0190:
{
BigInteger_t2902905090 * L_71 = V_2;
int32_t L_72 = VirtFuncInvoker0< int32_t >::Invoke(5 /* System.Int32 Mono.Security.Cryptography.RSAManaged::get_KeySize() */, __this);
ByteU5BU5D_t4116647657* L_73 = RSAManaged_GetPaddedValue_m2182626630(__this, L_71, ((int32_t)((int32_t)L_72>>(int32_t)3)), /*hidden argument*/NULL);
V_6 = L_73;
BigInteger_t2902905090 * L_74 = V_0;
BigInteger_Clear_m2995574218(L_74, /*hidden argument*/NULL);
BigInteger_t2902905090 * L_75 = V_2;
BigInteger_Clear_m2995574218(L_75, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_76 = V_6;
return L_76;
}
}
// System.Byte[] Mono.Security.Cryptography.RSAManaged::EncryptValue(System.Byte[])
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* RSAManaged_EncryptValue_m4149543654 (RSAManaged_t1757093820 * __this, ByteU5BU5D_t4116647657* ___rgb0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (RSAManaged_EncryptValue_m4149543654_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
BigInteger_t2902905090 * V_0 = NULL;
BigInteger_t2902905090 * V_1 = NULL;
ByteU5BU5D_t4116647657* V_2 = NULL;
{
bool L_0 = __this->get_m_disposed_5();
if (!L_0)
{
goto IL_0016;
}
}
{
ObjectDisposedException_t21392786 * L_1 = (ObjectDisposedException_t21392786 *)il2cpp_codegen_object_new(ObjectDisposedException_t21392786_il2cpp_TypeInfo_var);
ObjectDisposedException__ctor_m3603759869(L_1, _stringLiteral2105469118, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_1, NULL, RSAManaged_EncryptValue_m4149543654_RuntimeMethod_var);
}
IL_0016:
{
bool L_2 = __this->get_keypairGenerated_4();
if (L_2)
{
goto IL_0027;
}
}
{
RSAManaged_GenerateKeyPair_m2364618953(__this, /*hidden argument*/NULL);
}
IL_0027:
{
ByteU5BU5D_t4116647657* L_3 = ___rgb0;
BigInteger_t2902905090 * L_4 = (BigInteger_t2902905090 *)il2cpp_codegen_object_new(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger__ctor_m2601366464(L_4, L_3, /*hidden argument*/NULL);
V_0 = L_4;
BigInteger_t2902905090 * L_5 = V_0;
BigInteger_t2902905090 * L_6 = __this->get_e_13();
BigInteger_t2902905090 * L_7 = __this->get_n_12();
BigInteger_t2902905090 * L_8 = BigInteger_ModPow_m3776562770(L_5, L_6, L_7, /*hidden argument*/NULL);
V_1 = L_8;
BigInteger_t2902905090 * L_9 = V_1;
int32_t L_10 = VirtFuncInvoker0< int32_t >::Invoke(5 /* System.Int32 Mono.Security.Cryptography.RSAManaged::get_KeySize() */, __this);
ByteU5BU5D_t4116647657* L_11 = RSAManaged_GetPaddedValue_m2182626630(__this, L_9, ((int32_t)((int32_t)L_10>>(int32_t)3)), /*hidden argument*/NULL);
V_2 = L_11;
BigInteger_t2902905090 * L_12 = V_0;
BigInteger_Clear_m2995574218(L_12, /*hidden argument*/NULL);
BigInteger_t2902905090 * L_13 = V_1;
BigInteger_Clear_m2995574218(L_13, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_14 = V_2;
return L_14;
}
}
// System.Security.Cryptography.RSAParameters Mono.Security.Cryptography.RSAManaged::ExportParameters(System.Boolean)
extern "C" IL2CPP_METHOD_ATTR RSAParameters_t1728406613 RSAManaged_ExportParameters_m1754454264 (RSAManaged_t1757093820 * __this, bool ___includePrivateParameters0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (RSAManaged_ExportParameters_m1754454264_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
RSAParameters_t1728406613 V_0;
memset(&V_0, 0, sizeof(V_0));
ByteU5BU5D_t4116647657* V_1 = NULL;
int32_t V_2 = 0;
{
bool L_0 = __this->get_m_disposed_5();
if (!L_0)
{
goto IL_001b;
}
}
{
String_t* L_1 = Locale_GetText_m3520169047(NULL /*static, unused*/, _stringLiteral2597607271, /*hidden argument*/NULL);
ObjectDisposedException_t21392786 * L_2 = (ObjectDisposedException_t21392786 *)il2cpp_codegen_object_new(ObjectDisposedException_t21392786_il2cpp_TypeInfo_var);
ObjectDisposedException__ctor_m3603759869(L_2, L_1, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_2, NULL, RSAManaged_ExportParameters_m1754454264_RuntimeMethod_var);
}
IL_001b:
{
bool L_3 = __this->get_keypairGenerated_4();
if (L_3)
{
goto IL_002c;
}
}
{
RSAManaged_GenerateKeyPair_m2364618953(__this, /*hidden argument*/NULL);
}
IL_002c:
{
il2cpp_codegen_initobj((&V_0), sizeof(RSAParameters_t1728406613 ));
BigInteger_t2902905090 * L_4 = __this->get_e_13();
ByteU5BU5D_t4116647657* L_5 = BigInteger_GetBytes_m1259701831(L_4, /*hidden argument*/NULL);
(&V_0)->set_Exponent_7(L_5);
BigInteger_t2902905090 * L_6 = __this->get_n_12();
ByteU5BU5D_t4116647657* L_7 = BigInteger_GetBytes_m1259701831(L_6, /*hidden argument*/NULL);
(&V_0)->set_Modulus_6(L_7);
bool L_8 = ___includePrivateParameters0;
if (!L_8)
{
goto IL_01a0;
}
}
{
BigInteger_t2902905090 * L_9 = __this->get_d_6();
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
bool L_10 = BigInteger_op_Equality_m1194739960(NULL /*static, unused*/, L_9, (BigInteger_t2902905090 *)NULL, /*hidden argument*/NULL);
if (!L_10)
{
goto IL_007a;
}
}
{
CryptographicException_t248831461 * L_11 = (CryptographicException_t248831461 *)il2cpp_codegen_object_new(CryptographicException_t248831461_il2cpp_TypeInfo_var);
CryptographicException__ctor_m503735289(L_11, _stringLiteral1209813982, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_11, NULL, RSAManaged_ExportParameters_m1754454264_RuntimeMethod_var);
}
IL_007a:
{
BigInteger_t2902905090 * L_12 = __this->get_d_6();
ByteU5BU5D_t4116647657* L_13 = BigInteger_GetBytes_m1259701831(L_12, /*hidden argument*/NULL);
(&V_0)->set_D_2(L_13);
ByteU5BU5D_t4116647657* L_14 = (&V_0)->get_D_2();
ByteU5BU5D_t4116647657* L_15 = (&V_0)->get_Modulus_6();
if ((((int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_14)->max_length))))) == ((int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_15)->max_length)))))))
{
goto IL_00de;
}
}
{
ByteU5BU5D_t4116647657* L_16 = (&V_0)->get_Modulus_6();
ByteU5BU5D_t4116647657* L_17 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_16)->max_length)))));
V_1 = L_17;
ByteU5BU5D_t4116647657* L_18 = (&V_0)->get_D_2();
ByteU5BU5D_t4116647657* L_19 = V_1;
ByteU5BU5D_t4116647657* L_20 = V_1;
ByteU5BU5D_t4116647657* L_21 = (&V_0)->get_D_2();
ByteU5BU5D_t4116647657* L_22 = (&V_0)->get_D_2();
Buffer_BlockCopy_m2884209081(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_18, 0, (RuntimeArray *)(RuntimeArray *)L_19, ((int32_t)il2cpp_codegen_subtract((int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_20)->max_length)))), (int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_21)->max_length)))))), (((int32_t)((int32_t)(((RuntimeArray *)L_22)->max_length)))), /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_23 = V_1;
(&V_0)->set_D_2(L_23);
}
IL_00de:
{
BigInteger_t2902905090 * L_24 = __this->get_p_7();
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
bool L_25 = BigInteger_op_Inequality_m2697143438(NULL /*static, unused*/, L_24, (BigInteger_t2902905090 *)NULL, /*hidden argument*/NULL);
if (!L_25)
{
goto IL_01a0;
}
}
{
BigInteger_t2902905090 * L_26 = __this->get_q_8();
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
bool L_27 = BigInteger_op_Inequality_m2697143438(NULL /*static, unused*/, L_26, (BigInteger_t2902905090 *)NULL, /*hidden argument*/NULL);
if (!L_27)
{
goto IL_01a0;
}
}
{
BigInteger_t2902905090 * L_28 = __this->get_dp_9();
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
bool L_29 = BigInteger_op_Inequality_m2697143438(NULL /*static, unused*/, L_28, (BigInteger_t2902905090 *)NULL, /*hidden argument*/NULL);
if (!L_29)
{
goto IL_01a0;
}
}
{
BigInteger_t2902905090 * L_30 = __this->get_dq_10();
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
bool L_31 = BigInteger_op_Inequality_m2697143438(NULL /*static, unused*/, L_30, (BigInteger_t2902905090 *)NULL, /*hidden argument*/NULL);
if (!L_31)
{
goto IL_01a0;
}
}
{
BigInteger_t2902905090 * L_32 = __this->get_qInv_11();
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
bool L_33 = BigInteger_op_Inequality_m2697143438(NULL /*static, unused*/, L_32, (BigInteger_t2902905090 *)NULL, /*hidden argument*/NULL);
if (!L_33)
{
goto IL_01a0;
}
}
{
int32_t L_34 = VirtFuncInvoker0< int32_t >::Invoke(5 /* System.Int32 Mono.Security.Cryptography.RSAManaged::get_KeySize() */, __this);
V_2 = ((int32_t)((int32_t)L_34>>(int32_t)4));
BigInteger_t2902905090 * L_35 = __this->get_p_7();
int32_t L_36 = V_2;
ByteU5BU5D_t4116647657* L_37 = RSAManaged_GetPaddedValue_m2182626630(__this, L_35, L_36, /*hidden argument*/NULL);
(&V_0)->set_P_0(L_37);
BigInteger_t2902905090 * L_38 = __this->get_q_8();
int32_t L_39 = V_2;
ByteU5BU5D_t4116647657* L_40 = RSAManaged_GetPaddedValue_m2182626630(__this, L_38, L_39, /*hidden argument*/NULL);
(&V_0)->set_Q_1(L_40);
BigInteger_t2902905090 * L_41 = __this->get_dp_9();
int32_t L_42 = V_2;
ByteU5BU5D_t4116647657* L_43 = RSAManaged_GetPaddedValue_m2182626630(__this, L_41, L_42, /*hidden argument*/NULL);
(&V_0)->set_DP_3(L_43);
BigInteger_t2902905090 * L_44 = __this->get_dq_10();
int32_t L_45 = V_2;
ByteU5BU5D_t4116647657* L_46 = RSAManaged_GetPaddedValue_m2182626630(__this, L_44, L_45, /*hidden argument*/NULL);
(&V_0)->set_DQ_4(L_46);
BigInteger_t2902905090 * L_47 = __this->get_qInv_11();
int32_t L_48 = V_2;
ByteU5BU5D_t4116647657* L_49 = RSAManaged_GetPaddedValue_m2182626630(__this, L_47, L_48, /*hidden argument*/NULL);
(&V_0)->set_InverseQ_5(L_49);
}
IL_01a0:
{
RSAParameters_t1728406613 L_50 = V_0;
return L_50;
}
}
// System.Void Mono.Security.Cryptography.RSAManaged::ImportParameters(System.Security.Cryptography.RSAParameters)
extern "C" IL2CPP_METHOD_ATTR void RSAManaged_ImportParameters_m1117427048 (RSAManaged_t1757093820 * __this, RSAParameters_t1728406613 ___parameters0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (RSAManaged_ImportParameters_m1117427048_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
bool V_0 = false;
bool V_1 = false;
BigInteger_t2902905090 * V_2 = NULL;
BigInteger_t2902905090 * V_3 = NULL;
BigInteger_t2902905090 * V_4 = NULL;
BigInteger_t2902905090 * V_5 = NULL;
int32_t G_B22_0 = 0;
RSAManaged_t1757093820 * G_B25_0 = NULL;
RSAManaged_t1757093820 * G_B23_0 = NULL;
RSAManaged_t1757093820 * G_B24_0 = NULL;
int32_t G_B26_0 = 0;
RSAManaged_t1757093820 * G_B26_1 = NULL;
int32_t G_B35_0 = 0;
{
bool L_0 = __this->get_m_disposed_5();
if (!L_0)
{
goto IL_001b;
}
}
{
String_t* L_1 = Locale_GetText_m3520169047(NULL /*static, unused*/, _stringLiteral2597607271, /*hidden argument*/NULL);
ObjectDisposedException_t21392786 * L_2 = (ObjectDisposedException_t21392786 *)il2cpp_codegen_object_new(ObjectDisposedException_t21392786_il2cpp_TypeInfo_var);
ObjectDisposedException__ctor_m3603759869(L_2, L_1, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_2, NULL, RSAManaged_ImportParameters_m1117427048_RuntimeMethod_var);
}
IL_001b:
{
ByteU5BU5D_t4116647657* L_3 = (&___parameters0)->get_Exponent_7();
if (L_3)
{
goto IL_0037;
}
}
{
String_t* L_4 = Locale_GetText_m3520169047(NULL /*static, unused*/, _stringLiteral2383840146, /*hidden argument*/NULL);
CryptographicException_t248831461 * L_5 = (CryptographicException_t248831461 *)il2cpp_codegen_object_new(CryptographicException_t248831461_il2cpp_TypeInfo_var);
CryptographicException__ctor_m503735289(L_5, L_4, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_5, NULL, RSAManaged_ImportParameters_m1117427048_RuntimeMethod_var);
}
IL_0037:
{
ByteU5BU5D_t4116647657* L_6 = (&___parameters0)->get_Modulus_6();
if (L_6)
{
goto IL_0053;
}
}
{
String_t* L_7 = Locale_GetText_m3520169047(NULL /*static, unused*/, _stringLiteral3860822773, /*hidden argument*/NULL);
CryptographicException_t248831461 * L_8 = (CryptographicException_t248831461 *)il2cpp_codegen_object_new(CryptographicException_t248831461_il2cpp_TypeInfo_var);
CryptographicException__ctor_m503735289(L_8, L_7, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_8, NULL, RSAManaged_ImportParameters_m1117427048_RuntimeMethod_var);
}
IL_0053:
{
ByteU5BU5D_t4116647657* L_9 = (&___parameters0)->get_Exponent_7();
BigInteger_t2902905090 * L_10 = (BigInteger_t2902905090 *)il2cpp_codegen_object_new(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger__ctor_m2601366464(L_10, L_9, /*hidden argument*/NULL);
__this->set_e_13(L_10);
ByteU5BU5D_t4116647657* L_11 = (&___parameters0)->get_Modulus_6();
BigInteger_t2902905090 * L_12 = (BigInteger_t2902905090 *)il2cpp_codegen_object_new(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger__ctor_m2601366464(L_12, L_11, /*hidden argument*/NULL);
__this->set_n_12(L_12);
ByteU5BU5D_t4116647657* L_13 = (&___parameters0)->get_D_2();
if (!L_13)
{
goto IL_0095;
}
}
{
ByteU5BU5D_t4116647657* L_14 = (&___parameters0)->get_D_2();
BigInteger_t2902905090 * L_15 = (BigInteger_t2902905090 *)il2cpp_codegen_object_new(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger__ctor_m2601366464(L_15, L_14, /*hidden argument*/NULL);
__this->set_d_6(L_15);
}
IL_0095:
{
ByteU5BU5D_t4116647657* L_16 = (&___parameters0)->get_DP_3();
if (!L_16)
{
goto IL_00b3;
}
}
{
ByteU5BU5D_t4116647657* L_17 = (&___parameters0)->get_DP_3();
BigInteger_t2902905090 * L_18 = (BigInteger_t2902905090 *)il2cpp_codegen_object_new(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger__ctor_m2601366464(L_18, L_17, /*hidden argument*/NULL);
__this->set_dp_9(L_18);
}
IL_00b3:
{
ByteU5BU5D_t4116647657* L_19 = (&___parameters0)->get_DQ_4();
if (!L_19)
{
goto IL_00d1;
}
}
{
ByteU5BU5D_t4116647657* L_20 = (&___parameters0)->get_DQ_4();
BigInteger_t2902905090 * L_21 = (BigInteger_t2902905090 *)il2cpp_codegen_object_new(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger__ctor_m2601366464(L_21, L_20, /*hidden argument*/NULL);
__this->set_dq_10(L_21);
}
IL_00d1:
{
ByteU5BU5D_t4116647657* L_22 = (&___parameters0)->get_InverseQ_5();
if (!L_22)
{
goto IL_00ef;
}
}
{
ByteU5BU5D_t4116647657* L_23 = (&___parameters0)->get_InverseQ_5();
BigInteger_t2902905090 * L_24 = (BigInteger_t2902905090 *)il2cpp_codegen_object_new(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger__ctor_m2601366464(L_24, L_23, /*hidden argument*/NULL);
__this->set_qInv_11(L_24);
}
IL_00ef:
{
ByteU5BU5D_t4116647657* L_25 = (&___parameters0)->get_P_0();
if (!L_25)
{
goto IL_010d;
}
}
{
ByteU5BU5D_t4116647657* L_26 = (&___parameters0)->get_P_0();
BigInteger_t2902905090 * L_27 = (BigInteger_t2902905090 *)il2cpp_codegen_object_new(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger__ctor_m2601366464(L_27, L_26, /*hidden argument*/NULL);
__this->set_p_7(L_27);
}
IL_010d:
{
ByteU5BU5D_t4116647657* L_28 = (&___parameters0)->get_Q_1();
if (!L_28)
{
goto IL_012b;
}
}
{
ByteU5BU5D_t4116647657* L_29 = (&___parameters0)->get_Q_1();
BigInteger_t2902905090 * L_30 = (BigInteger_t2902905090 *)il2cpp_codegen_object_new(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger__ctor_m2601366464(L_30, L_29, /*hidden argument*/NULL);
__this->set_q_8(L_30);
}
IL_012b:
{
__this->set_keypairGenerated_4((bool)1);
BigInteger_t2902905090 * L_31 = __this->get_p_7();
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
bool L_32 = BigInteger_op_Inequality_m2697143438(NULL /*static, unused*/, L_31, (BigInteger_t2902905090 *)NULL, /*hidden argument*/NULL);
if (!L_32)
{
goto IL_0162;
}
}
{
BigInteger_t2902905090 * L_33 = __this->get_q_8();
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
bool L_34 = BigInteger_op_Inequality_m2697143438(NULL /*static, unused*/, L_33, (BigInteger_t2902905090 *)NULL, /*hidden argument*/NULL);
if (!L_34)
{
goto IL_0162;
}
}
{
BigInteger_t2902905090 * L_35 = __this->get_dp_9();
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
bool L_36 = BigInteger_op_Inequality_m2697143438(NULL /*static, unused*/, L_35, (BigInteger_t2902905090 *)NULL, /*hidden argument*/NULL);
G_B22_0 = ((int32_t)(L_36));
goto IL_0163;
}
IL_0162:
{
G_B22_0 = 0;
}
IL_0163:
{
V_0 = (bool)G_B22_0;
bool L_37 = V_0;
G_B23_0 = __this;
if (!L_37)
{
G_B25_0 = __this;
goto IL_018a;
}
}
{
BigInteger_t2902905090 * L_38 = __this->get_dq_10();
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
bool L_39 = BigInteger_op_Inequality_m2697143438(NULL /*static, unused*/, L_38, (BigInteger_t2902905090 *)NULL, /*hidden argument*/NULL);
G_B24_0 = G_B23_0;
if (!L_39)
{
G_B25_0 = G_B23_0;
goto IL_018a;
}
}
{
BigInteger_t2902905090 * L_40 = __this->get_qInv_11();
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
bool L_41 = BigInteger_op_Inequality_m2697143438(NULL /*static, unused*/, L_40, (BigInteger_t2902905090 *)NULL, /*hidden argument*/NULL);
G_B26_0 = ((int32_t)(L_41));
G_B26_1 = G_B24_0;
goto IL_018b;
}
IL_018a:
{
G_B26_0 = 0;
G_B26_1 = G_B25_0;
}
IL_018b:
{
G_B26_1->set_isCRTpossible_2((bool)G_B26_0);
bool L_42 = V_0;
if (L_42)
{
goto IL_0197;
}
}
{
return;
}
IL_0197:
{
BigInteger_t2902905090 * L_43 = __this->get_n_12();
BigInteger_t2902905090 * L_44 = __this->get_p_7();
BigInteger_t2902905090 * L_45 = __this->get_q_8();
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger_t2902905090 * L_46 = BigInteger_op_Multiply_m3683746602(NULL /*static, unused*/, L_44, L_45, /*hidden argument*/NULL);
bool L_47 = BigInteger_op_Equality_m1194739960(NULL /*static, unused*/, L_43, L_46, /*hidden argument*/NULL);
V_1 = L_47;
bool L_48 = V_1;
if (!L_48)
{
goto IL_0265;
}
}
{
BigInteger_t2902905090 * L_49 = __this->get_p_7();
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger_t2902905090 * L_50 = BigInteger_op_Implicit_m2547142909(NULL /*static, unused*/, 1, /*hidden argument*/NULL);
BigInteger_t2902905090 * L_51 = BigInteger_op_Subtraction_m4245834512(NULL /*static, unused*/, L_49, L_50, /*hidden argument*/NULL);
V_2 = L_51;
BigInteger_t2902905090 * L_52 = __this->get_q_8();
BigInteger_t2902905090 * L_53 = BigInteger_op_Implicit_m2547142909(NULL /*static, unused*/, 1, /*hidden argument*/NULL);
BigInteger_t2902905090 * L_54 = BigInteger_op_Subtraction_m4245834512(NULL /*static, unused*/, L_52, L_53, /*hidden argument*/NULL);
V_3 = L_54;
BigInteger_t2902905090 * L_55 = V_2;
BigInteger_t2902905090 * L_56 = V_3;
BigInteger_t2902905090 * L_57 = BigInteger_op_Multiply_m3683746602(NULL /*static, unused*/, L_55, L_56, /*hidden argument*/NULL);
V_4 = L_57;
BigInteger_t2902905090 * L_58 = __this->get_e_13();
BigInteger_t2902905090 * L_59 = V_4;
BigInteger_t2902905090 * L_60 = BigInteger_ModInverse_m2426215562(L_58, L_59, /*hidden argument*/NULL);
V_5 = L_60;
BigInteger_t2902905090 * L_61 = __this->get_d_6();
BigInteger_t2902905090 * L_62 = V_5;
bool L_63 = BigInteger_op_Equality_m1194739960(NULL /*static, unused*/, L_61, L_62, /*hidden argument*/NULL);
V_1 = L_63;
bool L_64 = V_1;
if (L_64)
{
goto IL_0265;
}
}
{
bool L_65 = __this->get_isCRTpossible_2();
if (!L_65)
{
goto IL_0265;
}
}
{
BigInteger_t2902905090 * L_66 = __this->get_dp_9();
BigInteger_t2902905090 * L_67 = V_5;
BigInteger_t2902905090 * L_68 = V_2;
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger_t2902905090 * L_69 = BigInteger_op_Modulus_m2565477533(NULL /*static, unused*/, L_67, L_68, /*hidden argument*/NULL);
bool L_70 = BigInteger_op_Equality_m1194739960(NULL /*static, unused*/, L_66, L_69, /*hidden argument*/NULL);
if (!L_70)
{
goto IL_0263;
}
}
{
BigInteger_t2902905090 * L_71 = __this->get_dq_10();
BigInteger_t2902905090 * L_72 = V_5;
BigInteger_t2902905090 * L_73 = V_3;
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
BigInteger_t2902905090 * L_74 = BigInteger_op_Modulus_m2565477533(NULL /*static, unused*/, L_72, L_73, /*hidden argument*/NULL);
bool L_75 = BigInteger_op_Equality_m1194739960(NULL /*static, unused*/, L_71, L_74, /*hidden argument*/NULL);
if (!L_75)
{
goto IL_0263;
}
}
{
BigInteger_t2902905090 * L_76 = __this->get_qInv_11();
BigInteger_t2902905090 * L_77 = __this->get_q_8();
BigInteger_t2902905090 * L_78 = __this->get_p_7();
BigInteger_t2902905090 * L_79 = BigInteger_ModInverse_m2426215562(L_77, L_78, /*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
bool L_80 = BigInteger_op_Equality_m1194739960(NULL /*static, unused*/, L_76, L_79, /*hidden argument*/NULL);
G_B35_0 = ((int32_t)(L_80));
goto IL_0264;
}
IL_0263:
{
G_B35_0 = 0;
}
IL_0264:
{
V_1 = (bool)G_B35_0;
}
IL_0265:
{
bool L_81 = V_1;
if (L_81)
{
goto IL_027b;
}
}
{
String_t* L_82 = Locale_GetText_m3520169047(NULL /*static, unused*/, _stringLiteral4201447376, /*hidden argument*/NULL);
CryptographicException_t248831461 * L_83 = (CryptographicException_t248831461 *)il2cpp_codegen_object_new(CryptographicException_t248831461_il2cpp_TypeInfo_var);
CryptographicException__ctor_m503735289(L_83, L_82, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_83, NULL, RSAManaged_ImportParameters_m1117427048_RuntimeMethod_var);
}
IL_027b:
{
return;
}
}
// System.Void Mono.Security.Cryptography.RSAManaged::Dispose(System.Boolean)
extern "C" IL2CPP_METHOD_ATTR void RSAManaged_Dispose_m2347279430 (RSAManaged_t1757093820 * __this, bool ___disposing0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (RSAManaged_Dispose_m2347279430_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
bool L_0 = __this->get_m_disposed_5();
if (L_0)
{
goto IL_0129;
}
}
{
BigInteger_t2902905090 * L_1 = __this->get_d_6();
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
bool L_2 = BigInteger_op_Inequality_m2697143438(NULL /*static, unused*/, L_1, (BigInteger_t2902905090 *)NULL, /*hidden argument*/NULL);
if (!L_2)
{
goto IL_002e;
}
}
{
BigInteger_t2902905090 * L_3 = __this->get_d_6();
BigInteger_Clear_m2995574218(L_3, /*hidden argument*/NULL);
__this->set_d_6((BigInteger_t2902905090 *)NULL);
}
IL_002e:
{
BigInteger_t2902905090 * L_4 = __this->get_p_7();
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
bool L_5 = BigInteger_op_Inequality_m2697143438(NULL /*static, unused*/, L_4, (BigInteger_t2902905090 *)NULL, /*hidden argument*/NULL);
if (!L_5)
{
goto IL_0051;
}
}
{
BigInteger_t2902905090 * L_6 = __this->get_p_7();
BigInteger_Clear_m2995574218(L_6, /*hidden argument*/NULL);
__this->set_p_7((BigInteger_t2902905090 *)NULL);
}
IL_0051:
{
BigInteger_t2902905090 * L_7 = __this->get_q_8();
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
bool L_8 = BigInteger_op_Inequality_m2697143438(NULL /*static, unused*/, L_7, (BigInteger_t2902905090 *)NULL, /*hidden argument*/NULL);
if (!L_8)
{
goto IL_0074;
}
}
{
BigInteger_t2902905090 * L_9 = __this->get_q_8();
BigInteger_Clear_m2995574218(L_9, /*hidden argument*/NULL);
__this->set_q_8((BigInteger_t2902905090 *)NULL);
}
IL_0074:
{
BigInteger_t2902905090 * L_10 = __this->get_dp_9();
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
bool L_11 = BigInteger_op_Inequality_m2697143438(NULL /*static, unused*/, L_10, (BigInteger_t2902905090 *)NULL, /*hidden argument*/NULL);
if (!L_11)
{
goto IL_0097;
}
}
{
BigInteger_t2902905090 * L_12 = __this->get_dp_9();
BigInteger_Clear_m2995574218(L_12, /*hidden argument*/NULL);
__this->set_dp_9((BigInteger_t2902905090 *)NULL);
}
IL_0097:
{
BigInteger_t2902905090 * L_13 = __this->get_dq_10();
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
bool L_14 = BigInteger_op_Inequality_m2697143438(NULL /*static, unused*/, L_13, (BigInteger_t2902905090 *)NULL, /*hidden argument*/NULL);
if (!L_14)
{
goto IL_00ba;
}
}
{
BigInteger_t2902905090 * L_15 = __this->get_dq_10();
BigInteger_Clear_m2995574218(L_15, /*hidden argument*/NULL);
__this->set_dq_10((BigInteger_t2902905090 *)NULL);
}
IL_00ba:
{
BigInteger_t2902905090 * L_16 = __this->get_qInv_11();
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
bool L_17 = BigInteger_op_Inequality_m2697143438(NULL /*static, unused*/, L_16, (BigInteger_t2902905090 *)NULL, /*hidden argument*/NULL);
if (!L_17)
{
goto IL_00dd;
}
}
{
BigInteger_t2902905090 * L_18 = __this->get_qInv_11();
BigInteger_Clear_m2995574218(L_18, /*hidden argument*/NULL);
__this->set_qInv_11((BigInteger_t2902905090 *)NULL);
}
IL_00dd:
{
bool L_19 = ___disposing0;
if (!L_19)
{
goto IL_0129;
}
}
{
BigInteger_t2902905090 * L_20 = __this->get_e_13();
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
bool L_21 = BigInteger_op_Inequality_m2697143438(NULL /*static, unused*/, L_20, (BigInteger_t2902905090 *)NULL, /*hidden argument*/NULL);
if (!L_21)
{
goto IL_0106;
}
}
{
BigInteger_t2902905090 * L_22 = __this->get_e_13();
BigInteger_Clear_m2995574218(L_22, /*hidden argument*/NULL);
__this->set_e_13((BigInteger_t2902905090 *)NULL);
}
IL_0106:
{
BigInteger_t2902905090 * L_23 = __this->get_n_12();
IL2CPP_RUNTIME_CLASS_INIT(BigInteger_t2902905090_il2cpp_TypeInfo_var);
bool L_24 = BigInteger_op_Inequality_m2697143438(NULL /*static, unused*/, L_23, (BigInteger_t2902905090 *)NULL, /*hidden argument*/NULL);
if (!L_24)
{
goto IL_0129;
}
}
{
BigInteger_t2902905090 * L_25 = __this->get_n_12();
BigInteger_Clear_m2995574218(L_25, /*hidden argument*/NULL);
__this->set_n_12((BigInteger_t2902905090 *)NULL);
}
IL_0129:
{
__this->set_m_disposed_5((bool)1);
return;
}
}
// System.String Mono.Security.Cryptography.RSAManaged::ToXmlString(System.Boolean)
extern "C" IL2CPP_METHOD_ATTR String_t* RSAManaged_ToXmlString_m2369501989 (RSAManaged_t1757093820 * __this, bool ___includePrivateParameters0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (RSAManaged_ToXmlString_m2369501989_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
StringBuilder_t * V_0 = NULL;
RSAParameters_t1728406613 V_1;
memset(&V_1, 0, sizeof(V_1));
Exception_t * __last_unhandled_exception = 0;
NO_UNUSED_WARNING (__last_unhandled_exception);
Exception_t * __exception_local = 0;
NO_UNUSED_WARNING (__exception_local);
int32_t __leave_target = -1;
NO_UNUSED_WARNING (__leave_target);
{
StringBuilder_t * L_0 = (StringBuilder_t *)il2cpp_codegen_object_new(StringBuilder_t_il2cpp_TypeInfo_var);
StringBuilder__ctor_m3121283359(L_0, /*hidden argument*/NULL);
V_0 = L_0;
bool L_1 = ___includePrivateParameters0;
RSAParameters_t1728406613 L_2 = VirtFuncInvoker1< RSAParameters_t1728406613 , bool >::Invoke(12 /* System.Security.Cryptography.RSAParameters Mono.Security.Cryptography.RSAManaged::ExportParameters(System.Boolean) */, __this, L_1);
V_1 = L_2;
}
IL_000e:
try
{ // begin try (depth: 1)
{
StringBuilder_t * L_3 = V_0;
StringBuilder_Append_m1965104174(L_3, _stringLiteral2330884088, /*hidden argument*/NULL);
StringBuilder_t * L_4 = V_0;
StringBuilder_Append_m1965104174(L_4, _stringLiteral264464451, /*hidden argument*/NULL);
StringBuilder_t * L_5 = V_0;
ByteU5BU5D_t4116647657* L_6 = (&V_1)->get_Modulus_6();
IL2CPP_RUNTIME_CLASS_INIT(Convert_t2465617642_il2cpp_TypeInfo_var);
String_t* L_7 = Convert_ToBase64String_m3839334935(NULL /*static, unused*/, L_6, /*hidden argument*/NULL);
StringBuilder_Append_m1965104174(L_5, L_7, /*hidden argument*/NULL);
StringBuilder_t * L_8 = V_0;
StringBuilder_Append_m1965104174(L_8, _stringLiteral3087219758, /*hidden argument*/NULL);
StringBuilder_t * L_9 = V_0;
StringBuilder_Append_m1965104174(L_9, _stringLiteral4195570472, /*hidden argument*/NULL);
StringBuilder_t * L_10 = V_0;
ByteU5BU5D_t4116647657* L_11 = (&V_1)->get_Exponent_7();
String_t* L_12 = Convert_ToBase64String_m3839334935(NULL /*static, unused*/, L_11, /*hidden argument*/NULL);
StringBuilder_Append_m1965104174(L_10, L_12, /*hidden argument*/NULL);
StringBuilder_t * L_13 = V_0;
StringBuilder_Append_m1965104174(L_13, _stringLiteral3252161509, /*hidden argument*/NULL);
bool L_14 = ___includePrivateParameters0;
if (!L_14)
{
goto IL_01b4;
}
}
IL_0076:
{
ByteU5BU5D_t4116647657* L_15 = (&V_1)->get_P_0();
if (!L_15)
{
goto IL_00ad;
}
}
IL_0082:
{
StringBuilder_t * L_16 = V_0;
StringBuilder_Append_m1965104174(L_16, _stringLiteral1918135800, /*hidden argument*/NULL);
StringBuilder_t * L_17 = V_0;
ByteU5BU5D_t4116647657* L_18 = (&V_1)->get_P_0();
IL2CPP_RUNTIME_CLASS_INIT(Convert_t2465617642_il2cpp_TypeInfo_var);
String_t* L_19 = Convert_ToBase64String_m3839334935(NULL /*static, unused*/, L_18, /*hidden argument*/NULL);
StringBuilder_Append_m1965104174(L_17, L_19, /*hidden argument*/NULL);
StringBuilder_t * L_20 = V_0;
StringBuilder_Append_m1965104174(L_20, _stringLiteral417504526, /*hidden argument*/NULL);
}
IL_00ad:
{
ByteU5BU5D_t4116647657* L_21 = (&V_1)->get_Q_1();
if (!L_21)
{
goto IL_00e4;
}
}
IL_00b9:
{
StringBuilder_t * L_22 = V_0;
StringBuilder_Append_m1965104174(L_22, _stringLiteral1918070264, /*hidden argument*/NULL);
StringBuilder_t * L_23 = V_0;
ByteU5BU5D_t4116647657* L_24 = (&V_1)->get_Q_1();
IL2CPP_RUNTIME_CLASS_INIT(Convert_t2465617642_il2cpp_TypeInfo_var);
String_t* L_25 = Convert_ToBase64String_m3839334935(NULL /*static, unused*/, L_24, /*hidden argument*/NULL);
StringBuilder_Append_m1965104174(L_23, L_25, /*hidden argument*/NULL);
StringBuilder_t * L_26 = V_0;
StringBuilder_Append_m1965104174(L_26, _stringLiteral3146387881, /*hidden argument*/NULL);
}
IL_00e4:
{
ByteU5BU5D_t4116647657* L_27 = (&V_1)->get_DP_3();
if (!L_27)
{
goto IL_011b;
}
}
IL_00f0:
{
StringBuilder_t * L_28 = V_0;
StringBuilder_Append_m1965104174(L_28, _stringLiteral423468302, /*hidden argument*/NULL);
StringBuilder_t * L_29 = V_0;
ByteU5BU5D_t4116647657* L_30 = (&V_1)->get_DP_3();
IL2CPP_RUNTIME_CLASS_INIT(Convert_t2465617642_il2cpp_TypeInfo_var);
String_t* L_31 = Convert_ToBase64String_m3839334935(NULL /*static, unused*/, L_30, /*hidden argument*/NULL);
StringBuilder_Append_m1965104174(L_29, L_31, /*hidden argument*/NULL);
StringBuilder_t * L_32 = V_0;
StringBuilder_Append_m1965104174(L_32, _stringLiteral2921622622, /*hidden argument*/NULL);
}
IL_011b:
{
ByteU5BU5D_t4116647657* L_33 = (&V_1)->get_DQ_4();
if (!L_33)
{
goto IL_0152;
}
}
IL_0127:
{
StringBuilder_t * L_34 = V_0;
StringBuilder_Append_m1965104174(L_34, _stringLiteral3152351657, /*hidden argument*/NULL);
StringBuilder_t * L_35 = V_0;
ByteU5BU5D_t4116647657* L_36 = (&V_1)->get_DQ_4();
IL2CPP_RUNTIME_CLASS_INIT(Convert_t2465617642_il2cpp_TypeInfo_var);
String_t* L_37 = Convert_ToBase64String_m3839334935(NULL /*static, unused*/, L_36, /*hidden argument*/NULL);
StringBuilder_Append_m1965104174(L_35, L_37, /*hidden argument*/NULL);
StringBuilder_t * L_38 = V_0;
StringBuilder_Append_m1965104174(L_38, _stringLiteral582970462, /*hidden argument*/NULL);
}
IL_0152:
{
ByteU5BU5D_t4116647657* L_39 = (&V_1)->get_InverseQ_5();
if (!L_39)
{
goto IL_0189;
}
}
IL_015e:
{
StringBuilder_t * L_40 = V_0;
StringBuilder_Append_m1965104174(L_40, _stringLiteral939428175, /*hidden argument*/NULL);
StringBuilder_t * L_41 = V_0;
ByteU5BU5D_t4116647657* L_42 = (&V_1)->get_InverseQ_5();
IL2CPP_RUNTIME_CLASS_INIT(Convert_t2465617642_il2cpp_TypeInfo_var);
String_t* L_43 = Convert_ToBase64String_m3839334935(NULL /*static, unused*/, L_42, /*hidden argument*/NULL);
StringBuilder_Append_m1965104174(L_41, L_43, /*hidden argument*/NULL);
StringBuilder_t * L_44 = V_0;
StringBuilder_Append_m1965104174(L_44, _stringLiteral197188615, /*hidden argument*/NULL);
}
IL_0189:
{
StringBuilder_t * L_45 = V_0;
StringBuilder_Append_m1965104174(L_45, _stringLiteral1916825080, /*hidden argument*/NULL);
StringBuilder_t * L_46 = V_0;
ByteU5BU5D_t4116647657* L_47 = (&V_1)->get_D_2();
IL2CPP_RUNTIME_CLASS_INIT(Convert_t2465617642_il2cpp_TypeInfo_var);
String_t* L_48 = Convert_ToBase64String_m3839334935(NULL /*static, unused*/, L_47, /*hidden argument*/NULL);
StringBuilder_Append_m1965104174(L_46, L_48, /*hidden argument*/NULL);
StringBuilder_t * L_49 = V_0;
StringBuilder_Append_m1965104174(L_49, _stringLiteral3455564074, /*hidden argument*/NULL);
}
IL_01b4:
{
StringBuilder_t * L_50 = V_0;
StringBuilder_Append_m1965104174(L_50, _stringLiteral1114683495, /*hidden argument*/NULL);
goto IL_0299;
}
} // end try (depth: 1)
catch(Il2CppExceptionWrapper& e)
{
__exception_local = (Exception_t *)e.ex;
if(il2cpp_codegen_class_is_assignable_from (RuntimeObject_il2cpp_TypeInfo_var, il2cpp_codegen_object_class(e.ex)))
goto CATCH_01c5;
throw e;
}
CATCH_01c5:
{ // begin catch(System.Object)
{
ByteU5BU5D_t4116647657* L_51 = (&V_1)->get_P_0();
if (!L_51)
{
goto IL_01e8;
}
}
IL_01d2:
{
ByteU5BU5D_t4116647657* L_52 = (&V_1)->get_P_0();
ByteU5BU5D_t4116647657* L_53 = (&V_1)->get_P_0();
Array_Clear_m2231608178(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_52, 0, (((int32_t)((int32_t)(((RuntimeArray *)L_53)->max_length)))), /*hidden argument*/NULL);
}
IL_01e8:
{
ByteU5BU5D_t4116647657* L_54 = (&V_1)->get_Q_1();
if (!L_54)
{
goto IL_020a;
}
}
IL_01f4:
{
ByteU5BU5D_t4116647657* L_55 = (&V_1)->get_Q_1();
ByteU5BU5D_t4116647657* L_56 = (&V_1)->get_Q_1();
Array_Clear_m2231608178(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_55, 0, (((int32_t)((int32_t)(((RuntimeArray *)L_56)->max_length)))), /*hidden argument*/NULL);
}
IL_020a:
{
ByteU5BU5D_t4116647657* L_57 = (&V_1)->get_DP_3();
if (!L_57)
{
goto IL_022c;
}
}
IL_0216:
{
ByteU5BU5D_t4116647657* L_58 = (&V_1)->get_DP_3();
ByteU5BU5D_t4116647657* L_59 = (&V_1)->get_DP_3();
Array_Clear_m2231608178(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_58, 0, (((int32_t)((int32_t)(((RuntimeArray *)L_59)->max_length)))), /*hidden argument*/NULL);
}
IL_022c:
{
ByteU5BU5D_t4116647657* L_60 = (&V_1)->get_DQ_4();
if (!L_60)
{
goto IL_024e;
}
}
IL_0238:
{
ByteU5BU5D_t4116647657* L_61 = (&V_1)->get_DQ_4();
ByteU5BU5D_t4116647657* L_62 = (&V_1)->get_DQ_4();
Array_Clear_m2231608178(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_61, 0, (((int32_t)((int32_t)(((RuntimeArray *)L_62)->max_length)))), /*hidden argument*/NULL);
}
IL_024e:
{
ByteU5BU5D_t4116647657* L_63 = (&V_1)->get_InverseQ_5();
if (!L_63)
{
goto IL_0270;
}
}
IL_025a:
{
ByteU5BU5D_t4116647657* L_64 = (&V_1)->get_InverseQ_5();
ByteU5BU5D_t4116647657* L_65 = (&V_1)->get_InverseQ_5();
Array_Clear_m2231608178(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_64, 0, (((int32_t)((int32_t)(((RuntimeArray *)L_65)->max_length)))), /*hidden argument*/NULL);
}
IL_0270:
{
ByteU5BU5D_t4116647657* L_66 = (&V_1)->get_D_2();
if (!L_66)
{
goto IL_0292;
}
}
IL_027c:
{
ByteU5BU5D_t4116647657* L_67 = (&V_1)->get_D_2();
ByteU5BU5D_t4116647657* L_68 = (&V_1)->get_D_2();
Array_Clear_m2231608178(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_67, 0, (((int32_t)((int32_t)(((RuntimeArray *)L_68)->max_length)))), /*hidden argument*/NULL);
}
IL_0292:
{
IL2CPP_RAISE_MANAGED_EXCEPTION(__exception_local, NULL, RSAManaged_ToXmlString_m2369501989_RuntimeMethod_var);
}
IL_0294:
{
goto IL_0299;
}
} // end catch (depth: 1)
IL_0299:
{
StringBuilder_t * L_69 = V_0;
String_t* L_70 = StringBuilder_ToString_m3317489284(L_69, /*hidden argument*/NULL);
return L_70;
}
}
// System.Byte[] Mono.Security.Cryptography.RSAManaged::GetPaddedValue(Mono.Math.BigInteger,System.Int32)
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* RSAManaged_GetPaddedValue_m2182626630 (RSAManaged_t1757093820 * __this, BigInteger_t2902905090 * ___value0, int32_t ___length1, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (RSAManaged_GetPaddedValue_m2182626630_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
ByteU5BU5D_t4116647657* V_0 = NULL;
ByteU5BU5D_t4116647657* V_1 = NULL;
{
BigInteger_t2902905090 * L_0 = ___value0;
ByteU5BU5D_t4116647657* L_1 = BigInteger_GetBytes_m1259701831(L_0, /*hidden argument*/NULL);
V_0 = L_1;
ByteU5BU5D_t4116647657* L_2 = V_0;
int32_t L_3 = ___length1;
if ((((int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_2)->max_length))))) < ((int32_t)L_3)))
{
goto IL_0012;
}
}
{
ByteU5BU5D_t4116647657* L_4 = V_0;
return L_4;
}
IL_0012:
{
int32_t L_5 = ___length1;
ByteU5BU5D_t4116647657* L_6 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)L_5);
V_1 = L_6;
ByteU5BU5D_t4116647657* L_7 = V_0;
ByteU5BU5D_t4116647657* L_8 = V_1;
int32_t L_9 = ___length1;
ByteU5BU5D_t4116647657* L_10 = V_0;
ByteU5BU5D_t4116647657* L_11 = V_0;
Buffer_BlockCopy_m2884209081(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_7, 0, (RuntimeArray *)(RuntimeArray *)L_8, ((int32_t)il2cpp_codegen_subtract((int32_t)L_9, (int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_10)->max_length)))))), (((int32_t)((int32_t)(((RuntimeArray *)L_11)->max_length)))), /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_12 = V_0;
ByteU5BU5D_t4116647657* L_13 = V_0;
Array_Clear_m2231608178(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_12, 0, (((int32_t)((int32_t)(((RuntimeArray *)L_13)->max_length)))), /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_14 = V_1;
return L_14;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void Mono.Security.Cryptography.RSAManaged/KeyGeneratedEventHandler::.ctor(System.Object,System.IntPtr)
extern "C" IL2CPP_METHOD_ATTR void KeyGeneratedEventHandler__ctor_m4032730305 (KeyGeneratedEventHandler_t3064139578 * __this, RuntimeObject * ___object0, intptr_t ___method1, const RuntimeMethod* method)
{
__this->set_method_ptr_0(il2cpp_codegen_get_method_pointer((RuntimeMethod*)___method1));
__this->set_method_3(___method1);
__this->set_m_target_2(___object0);
}
// System.Void Mono.Security.Cryptography.RSAManaged/KeyGeneratedEventHandler::Invoke(System.Object,System.EventArgs)
extern "C" IL2CPP_METHOD_ATTR void KeyGeneratedEventHandler_Invoke_m99769071 (KeyGeneratedEventHandler_t3064139578 * __this, RuntimeObject * ___sender0, EventArgs_t3591816995 * ___e1, const RuntimeMethod* method)
{
if(__this->get_prev_9() != NULL)
{
KeyGeneratedEventHandler_Invoke_m99769071((KeyGeneratedEventHandler_t3064139578 *)__this->get_prev_9(), ___sender0, ___e1, method);
}
Il2CppMethodPointer targetMethodPointer = __this->get_method_ptr_0();
RuntimeMethod* targetMethod = (RuntimeMethod*)(__this->get_method_3());
RuntimeObject* targetThis = __this->get_m_target_2();
il2cpp_codegen_raise_execution_engine_exception_if_method_is_not_found(targetMethod);
bool ___methodIsStatic = MethodIsStatic(targetMethod);
if (___methodIsStatic)
{
if (il2cpp_codegen_method_parameter_count(targetMethod) == 2)
{
// open
{
typedef void (*FunctionPointerType) (RuntimeObject *, RuntimeObject *, EventArgs_t3591816995 *, const RuntimeMethod*);
((FunctionPointerType)targetMethodPointer)(NULL, ___sender0, ___e1, targetMethod);
}
}
else
{
// closed
{
typedef void (*FunctionPointerType) (RuntimeObject *, void*, RuntimeObject *, EventArgs_t3591816995 *, const RuntimeMethod*);
((FunctionPointerType)targetMethodPointer)(NULL, targetThis, ___sender0, ___e1, targetMethod);
}
}
}
else
{
if (il2cpp_codegen_method_parameter_count(targetMethod) == 2)
{
// closed
if (il2cpp_codegen_method_is_virtual(targetMethod) && !il2cpp_codegen_object_is_of_sealed_type(targetThis) && il2cpp_codegen_delegate_has_invoker((Il2CppDelegate*)__this))
{
if (il2cpp_codegen_method_is_generic_instance(targetMethod))
{
if (il2cpp_codegen_method_is_interface_method(targetMethod))
GenericInterfaceActionInvoker2< RuntimeObject *, EventArgs_t3591816995 * >::Invoke(targetMethod, targetThis, ___sender0, ___e1);
else
GenericVirtActionInvoker2< RuntimeObject *, EventArgs_t3591816995 * >::Invoke(targetMethod, targetThis, ___sender0, ___e1);
}
else
{
if (il2cpp_codegen_method_is_interface_method(targetMethod))
InterfaceActionInvoker2< RuntimeObject *, EventArgs_t3591816995 * >::Invoke(il2cpp_codegen_method_get_slot(targetMethod), il2cpp_codegen_method_get_declaring_type(targetMethod), targetThis, ___sender0, ___e1);
else
VirtActionInvoker2< RuntimeObject *, EventArgs_t3591816995 * >::Invoke(il2cpp_codegen_method_get_slot(targetMethod), targetThis, ___sender0, ___e1);
}
}
else
{
typedef void (*FunctionPointerType) (void*, RuntimeObject *, EventArgs_t3591816995 *, const RuntimeMethod*);
((FunctionPointerType)targetMethodPointer)(targetThis, ___sender0, ___e1, targetMethod);
}
}
else
{
// open
if (il2cpp_codegen_method_is_virtual(targetMethod) && !il2cpp_codegen_object_is_of_sealed_type(targetThis) && il2cpp_codegen_delegate_has_invoker((Il2CppDelegate*)__this))
{
if (il2cpp_codegen_method_is_generic_instance(targetMethod))
{
if (il2cpp_codegen_method_is_interface_method(targetMethod))
GenericInterfaceActionInvoker1< EventArgs_t3591816995 * >::Invoke(targetMethod, ___sender0, ___e1);
else
GenericVirtActionInvoker1< EventArgs_t3591816995 * >::Invoke(targetMethod, ___sender0, ___e1);
}
else
{
if (il2cpp_codegen_method_is_interface_method(targetMethod))
InterfaceActionInvoker1< EventArgs_t3591816995 * >::Invoke(il2cpp_codegen_method_get_slot(targetMethod), il2cpp_codegen_method_get_declaring_type(targetMethod), ___sender0, ___e1);
else
VirtActionInvoker1< EventArgs_t3591816995 * >::Invoke(il2cpp_codegen_method_get_slot(targetMethod), ___sender0, ___e1);
}
}
else
{
typedef void (*FunctionPointerType) (RuntimeObject *, EventArgs_t3591816995 *, const RuntimeMethod*);
((FunctionPointerType)targetMethodPointer)(___sender0, ___e1, targetMethod);
}
}
}
}
// System.IAsyncResult Mono.Security.Cryptography.RSAManaged/KeyGeneratedEventHandler::BeginInvoke(System.Object,System.EventArgs,System.AsyncCallback,System.Object)
extern "C" IL2CPP_METHOD_ATTR RuntimeObject* KeyGeneratedEventHandler_BeginInvoke_m3227934731 (KeyGeneratedEventHandler_t3064139578 * __this, RuntimeObject * ___sender0, EventArgs_t3591816995 * ___e1, AsyncCallback_t3962456242 * ___callback2, RuntimeObject * ___object3, const RuntimeMethod* method)
{
void *__d_args[3] = {0};
__d_args[0] = ___sender0;
__d_args[1] = ___e1;
return (RuntimeObject*)il2cpp_codegen_delegate_begin_invoke((RuntimeDelegate*)__this, __d_args, (RuntimeDelegate*)___callback2, (RuntimeObject*)___object3);
}
// System.Void Mono.Security.Cryptography.RSAManaged/KeyGeneratedEventHandler::EndInvoke(System.IAsyncResult)
extern "C" IL2CPP_METHOD_ATTR void KeyGeneratedEventHandler_EndInvoke_m2862962495 (KeyGeneratedEventHandler_t3064139578 * __this, RuntimeObject* ___result0, const RuntimeMethod* method)
{
il2cpp_codegen_delegate_end_invoke((Il2CppAsyncResult*) ___result0, 0);
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void Mono.Security.PKCS7/ContentInfo::.ctor()
extern "C" IL2CPP_METHOD_ATTR void ContentInfo__ctor_m1955840786 (ContentInfo_t3218159896 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (ContentInfo__ctor_m1955840786_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
Object__ctor_m297566312(__this, /*hidden argument*/NULL);
ASN1_t2114160833 * L_0 = (ASN1_t2114160833 *)il2cpp_codegen_object_new(ASN1_t2114160833_il2cpp_TypeInfo_var);
ASN1__ctor_m1239252869(L_0, (uint8_t)((int32_t)160), /*hidden argument*/NULL);
__this->set_content_1(L_0);
return;
}
}
// System.Void Mono.Security.PKCS7/ContentInfo::.ctor(System.String)
extern "C" IL2CPP_METHOD_ATTR void ContentInfo__ctor_m2855743200 (ContentInfo_t3218159896 * __this, String_t* ___oid0, const RuntimeMethod* method)
{
{
ContentInfo__ctor_m1955840786(__this, /*hidden argument*/NULL);
String_t* L_0 = ___oid0;
__this->set_contentType_0(L_0);
return;
}
}
// System.Void Mono.Security.PKCS7/ContentInfo::.ctor(System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void ContentInfo__ctor_m2928874476 (ContentInfo_t3218159896 * __this, ByteU5BU5D_t4116647657* ___data0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (ContentInfo__ctor_m2928874476_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
ByteU5BU5D_t4116647657* L_0 = ___data0;
ASN1_t2114160833 * L_1 = (ASN1_t2114160833 *)il2cpp_codegen_object_new(ASN1_t2114160833_il2cpp_TypeInfo_var);
ASN1__ctor_m1638893325(L_1, L_0, /*hidden argument*/NULL);
ContentInfo__ctor_m3397951412(__this, L_1, /*hidden argument*/NULL);
return;
}
}
// System.Void Mono.Security.PKCS7/ContentInfo::.ctor(Mono.Security.ASN1)
extern "C" IL2CPP_METHOD_ATTR void ContentInfo__ctor_m3397951412 (ContentInfo_t3218159896 * __this, ASN1_t2114160833 * ___asn10, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (ContentInfo__ctor_m3397951412_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
Object__ctor_m297566312(__this, /*hidden argument*/NULL);
ASN1_t2114160833 * L_0 = ___asn10;
uint8_t L_1 = ASN1_get_Tag_m2789147236(L_0, /*hidden argument*/NULL);
if ((!(((uint32_t)L_1) == ((uint32_t)((int32_t)48)))))
{
goto IL_002b;
}
}
{
ASN1_t2114160833 * L_2 = ___asn10;
int32_t L_3 = ASN1_get_Count_m1789520042(L_2, /*hidden argument*/NULL);
if ((((int32_t)L_3) >= ((int32_t)1)))
{
goto IL_0036;
}
}
{
ASN1_t2114160833 * L_4 = ___asn10;
int32_t L_5 = ASN1_get_Count_m1789520042(L_4, /*hidden argument*/NULL);
if ((((int32_t)L_5) <= ((int32_t)2)))
{
goto IL_0036;
}
}
IL_002b:
{
ArgumentException_t132251570 * L_6 = (ArgumentException_t132251570 *)il2cpp_codegen_object_new(ArgumentException_t132251570_il2cpp_TypeInfo_var);
ArgumentException__ctor_m1312628991(L_6, _stringLiteral532208778, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_6, NULL, ContentInfo__ctor_m3397951412_RuntimeMethod_var);
}
IL_0036:
{
ASN1_t2114160833 * L_7 = ___asn10;
ASN1_t2114160833 * L_8 = ASN1_get_Item_m2255075813(L_7, 0, /*hidden argument*/NULL);
uint8_t L_9 = ASN1_get_Tag_m2789147236(L_8, /*hidden argument*/NULL);
if ((((int32_t)L_9) == ((int32_t)6)))
{
goto IL_0053;
}
}
{
ArgumentException_t132251570 * L_10 = (ArgumentException_t132251570 *)il2cpp_codegen_object_new(ArgumentException_t132251570_il2cpp_TypeInfo_var);
ArgumentException__ctor_m1312628991(L_10, _stringLiteral2231488616, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_10, NULL, ContentInfo__ctor_m3397951412_RuntimeMethod_var);
}
IL_0053:
{
ASN1_t2114160833 * L_11 = ___asn10;
ASN1_t2114160833 * L_12 = ASN1_get_Item_m2255075813(L_11, 0, /*hidden argument*/NULL);
String_t* L_13 = ASN1Convert_ToOid_m3847701408(NULL /*static, unused*/, L_12, /*hidden argument*/NULL);
__this->set_contentType_0(L_13);
ASN1_t2114160833 * L_14 = ___asn10;
int32_t L_15 = ASN1_get_Count_m1789520042(L_14, /*hidden argument*/NULL);
if ((((int32_t)L_15) <= ((int32_t)1)))
{
goto IL_009f;
}
}
{
ASN1_t2114160833 * L_16 = ___asn10;
ASN1_t2114160833 * L_17 = ASN1_get_Item_m2255075813(L_16, 1, /*hidden argument*/NULL);
uint8_t L_18 = ASN1_get_Tag_m2789147236(L_17, /*hidden argument*/NULL);
if ((((int32_t)L_18) == ((int32_t)((int32_t)160))))
{
goto IL_0092;
}
}
{
ArgumentException_t132251570 * L_19 = (ArgumentException_t132251570 *)il2cpp_codegen_object_new(ArgumentException_t132251570_il2cpp_TypeInfo_var);
ArgumentException__ctor_m1312628991(L_19, _stringLiteral825954302, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_19, NULL, ContentInfo__ctor_m3397951412_RuntimeMethod_var);
}
IL_0092:
{
ASN1_t2114160833 * L_20 = ___asn10;
ASN1_t2114160833 * L_21 = ASN1_get_Item_m2255075813(L_20, 1, /*hidden argument*/NULL);
__this->set_content_1(L_21);
}
IL_009f:
{
return;
}
}
// Mono.Security.ASN1 Mono.Security.PKCS7/ContentInfo::get_ASN1()
extern "C" IL2CPP_METHOD_ATTR ASN1_t2114160833 * ContentInfo_get_ASN1_m2959326143 (ContentInfo_t3218159896 * __this, const RuntimeMethod* method)
{
{
ASN1_t2114160833 * L_0 = ContentInfo_GetASN1_m2535172199(__this, /*hidden argument*/NULL);
return L_0;
}
}
// Mono.Security.ASN1 Mono.Security.PKCS7/ContentInfo::get_Content()
extern "C" IL2CPP_METHOD_ATTR ASN1_t2114160833 * ContentInfo_get_Content_m4053224038 (ContentInfo_t3218159896 * __this, const RuntimeMethod* method)
{
{
ASN1_t2114160833 * L_0 = __this->get_content_1();
return L_0;
}
}
// System.Void Mono.Security.PKCS7/ContentInfo::set_Content(Mono.Security.ASN1)
extern "C" IL2CPP_METHOD_ATTR void ContentInfo_set_Content_m2581255245 (ContentInfo_t3218159896 * __this, ASN1_t2114160833 * ___value0, const RuntimeMethod* method)
{
{
ASN1_t2114160833 * L_0 = ___value0;
__this->set_content_1(L_0);
return;
}
}
// System.String Mono.Security.PKCS7/ContentInfo::get_ContentType()
extern "C" IL2CPP_METHOD_ATTR String_t* ContentInfo_get_ContentType_m4018261807 (ContentInfo_t3218159896 * __this, const RuntimeMethod* method)
{
{
String_t* L_0 = __this->get_contentType_0();
return L_0;
}
}
// System.Void Mono.Security.PKCS7/ContentInfo::set_ContentType(System.String)
extern "C" IL2CPP_METHOD_ATTR void ContentInfo_set_ContentType_m3848100294 (ContentInfo_t3218159896 * __this, String_t* ___value0, const RuntimeMethod* method)
{
{
String_t* L_0 = ___value0;
__this->set_contentType_0(L_0);
return;
}
}
// Mono.Security.ASN1 Mono.Security.PKCS7/ContentInfo::GetASN1()
extern "C" IL2CPP_METHOD_ATTR ASN1_t2114160833 * ContentInfo_GetASN1_m2535172199 (ContentInfo_t3218159896 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (ContentInfo_GetASN1_m2535172199_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
ASN1_t2114160833 * V_0 = NULL;
{
ASN1_t2114160833 * L_0 = (ASN1_t2114160833 *)il2cpp_codegen_object_new(ASN1_t2114160833_il2cpp_TypeInfo_var);
ASN1__ctor_m1239252869(L_0, (uint8_t)((int32_t)48), /*hidden argument*/NULL);
V_0 = L_0;
ASN1_t2114160833 * L_1 = V_0;
String_t* L_2 = __this->get_contentType_0();
ASN1_t2114160833 * L_3 = ASN1Convert_FromOid_m3844102704(NULL /*static, unused*/, L_2, /*hidden argument*/NULL);
ASN1_Add_m2431139999(L_1, L_3, /*hidden argument*/NULL);
ASN1_t2114160833 * L_4 = __this->get_content_1();
if (!L_4)
{
goto IL_0043;
}
}
{
ASN1_t2114160833 * L_5 = __this->get_content_1();
int32_t L_6 = ASN1_get_Count_m1789520042(L_5, /*hidden argument*/NULL);
if ((((int32_t)L_6) <= ((int32_t)0)))
{
goto IL_0043;
}
}
{
ASN1_t2114160833 * L_7 = V_0;
ASN1_t2114160833 * L_8 = __this->get_content_1();
ASN1_Add_m2431139999(L_7, L_8, /*hidden argument*/NULL);
}
IL_0043:
{
ASN1_t2114160833 * L_9 = V_0;
return L_9;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void Mono.Security.PKCS7/EncryptedData::.ctor()
extern "C" IL2CPP_METHOD_ATTR void EncryptedData__ctor_m257803736 (EncryptedData_t3577548733 * __this, const RuntimeMethod* method)
{
{
Object__ctor_m297566312(__this, /*hidden argument*/NULL);
__this->set__version_0((uint8_t)0);
return;
}
}
// System.Void Mono.Security.PKCS7/EncryptedData::.ctor(Mono.Security.ASN1)
extern "C" IL2CPP_METHOD_ATTR void EncryptedData__ctor_m4001546383 (EncryptedData_t3577548733 * __this, ASN1_t2114160833 * ___asn10, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (EncryptedData__ctor_m4001546383_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
ASN1_t2114160833 * V_0 = NULL;
ASN1_t2114160833 * V_1 = NULL;
ASN1_t2114160833 * V_2 = NULL;
ASN1_t2114160833 * V_3 = NULL;
{
EncryptedData__ctor_m257803736(__this, /*hidden argument*/NULL);
ASN1_t2114160833 * L_0 = ___asn10;
uint8_t L_1 = ASN1_get_Tag_m2789147236(L_0, /*hidden argument*/NULL);
if ((!(((uint32_t)L_1) == ((uint32_t)((int32_t)48)))))
{
goto IL_001f;
}
}
{
ASN1_t2114160833 * L_2 = ___asn10;
int32_t L_3 = ASN1_get_Count_m1789520042(L_2, /*hidden argument*/NULL);
if ((((int32_t)L_3) >= ((int32_t)2)))
{
goto IL_002a;
}
}
IL_001f:
{
ArgumentException_t132251570 * L_4 = (ArgumentException_t132251570 *)il2cpp_codegen_object_new(ArgumentException_t132251570_il2cpp_TypeInfo_var);
ArgumentException__ctor_m1312628991(L_4, _stringLiteral2787816553, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_4, NULL, EncryptedData__ctor_m4001546383_RuntimeMethod_var);
}
IL_002a:
{
ASN1_t2114160833 * L_5 = ___asn10;
ASN1_t2114160833 * L_6 = ASN1_get_Item_m2255075813(L_5, 0, /*hidden argument*/NULL);
uint8_t L_7 = ASN1_get_Tag_m2789147236(L_6, /*hidden argument*/NULL);
if ((((int32_t)L_7) == ((int32_t)2)))
{
goto IL_0047;
}
}
{
ArgumentException_t132251570 * L_8 = (ArgumentException_t132251570 *)il2cpp_codegen_object_new(ArgumentException_t132251570_il2cpp_TypeInfo_var);
ArgumentException__ctor_m1312628991(L_8, _stringLiteral1110505755, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_8, NULL, EncryptedData__ctor_m4001546383_RuntimeMethod_var);
}
IL_0047:
{
ASN1_t2114160833 * L_9 = ___asn10;
ASN1_t2114160833 * L_10 = ASN1_get_Item_m2255075813(L_9, 0, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_11 = ASN1_get_Value_m63296490(L_10, /*hidden argument*/NULL);
int32_t L_12 = 0;
uint8_t L_13 = (L_11)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_12));
__this->set__version_0(L_13);
ASN1_t2114160833 * L_14 = ___asn10;
ASN1_t2114160833 * L_15 = ASN1_get_Item_m2255075813(L_14, 1, /*hidden argument*/NULL);
V_0 = L_15;
ASN1_t2114160833 * L_16 = V_0;
uint8_t L_17 = ASN1_get_Tag_m2789147236(L_16, /*hidden argument*/NULL);
if ((((int32_t)L_17) == ((int32_t)((int32_t)48))))
{
goto IL_007b;
}
}
{
ArgumentException_t132251570 * L_18 = (ArgumentException_t132251570 *)il2cpp_codegen_object_new(ArgumentException_t132251570_il2cpp_TypeInfo_var);
ArgumentException__ctor_m1312628991(L_18, _stringLiteral3295482658, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_18, NULL, EncryptedData__ctor_m4001546383_RuntimeMethod_var);
}
IL_007b:
{
ASN1_t2114160833 * L_19 = V_0;
ASN1_t2114160833 * L_20 = ASN1_get_Item_m2255075813(L_19, 0, /*hidden argument*/NULL);
V_1 = L_20;
ASN1_t2114160833 * L_21 = V_1;
uint8_t L_22 = ASN1_get_Tag_m2789147236(L_21, /*hidden argument*/NULL);
if ((((int32_t)L_22) == ((int32_t)6)))
{
goto IL_009a;
}
}
{
ArgumentException_t132251570 * L_23 = (ArgumentException_t132251570 *)il2cpp_codegen_object_new(ArgumentException_t132251570_il2cpp_TypeInfo_var);
ArgumentException__ctor_m1312628991(L_23, _stringLiteral2103170127, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_23, NULL, EncryptedData__ctor_m4001546383_RuntimeMethod_var);
}
IL_009a:
{
ASN1_t2114160833 * L_24 = V_1;
String_t* L_25 = ASN1Convert_ToOid_m3847701408(NULL /*static, unused*/, L_24, /*hidden argument*/NULL);
ContentInfo_t3218159896 * L_26 = (ContentInfo_t3218159896 *)il2cpp_codegen_object_new(ContentInfo_t3218159896_il2cpp_TypeInfo_var);
ContentInfo__ctor_m2855743200(L_26, L_25, /*hidden argument*/NULL);
__this->set__content_1(L_26);
ASN1_t2114160833 * L_27 = V_0;
ASN1_t2114160833 * L_28 = ASN1_get_Item_m2255075813(L_27, 1, /*hidden argument*/NULL);
V_2 = L_28;
ASN1_t2114160833 * L_29 = V_2;
uint8_t L_30 = ASN1_get_Tag_m2789147236(L_29, /*hidden argument*/NULL);
if ((((int32_t)L_30) == ((int32_t)((int32_t)48))))
{
goto IL_00cb;
}
}
{
ArgumentException_t132251570 * L_31 = (ArgumentException_t132251570 *)il2cpp_codegen_object_new(ArgumentException_t132251570_il2cpp_TypeInfo_var);
ArgumentException__ctor_m1312628991(L_31, _stringLiteral3133584213, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_31, NULL, EncryptedData__ctor_m4001546383_RuntimeMethod_var);
}
IL_00cb:
{
ASN1_t2114160833 * L_32 = V_2;
ASN1_t2114160833 * L_33 = ASN1_get_Item_m2255075813(L_32, 0, /*hidden argument*/NULL);
String_t* L_34 = ASN1Convert_ToOid_m3847701408(NULL /*static, unused*/, L_33, /*hidden argument*/NULL);
ContentInfo_t3218159896 * L_35 = (ContentInfo_t3218159896 *)il2cpp_codegen_object_new(ContentInfo_t3218159896_il2cpp_TypeInfo_var);
ContentInfo__ctor_m2855743200(L_35, L_34, /*hidden argument*/NULL);
__this->set__encryptionAlgorithm_2(L_35);
ContentInfo_t3218159896 * L_36 = __this->get__encryptionAlgorithm_2();
ASN1_t2114160833 * L_37 = V_2;
ASN1_t2114160833 * L_38 = ASN1_get_Item_m2255075813(L_37, 1, /*hidden argument*/NULL);
ContentInfo_set_Content_m2581255245(L_36, L_38, /*hidden argument*/NULL);
ASN1_t2114160833 * L_39 = V_0;
ASN1_t2114160833 * L_40 = ASN1_get_Item_m2255075813(L_39, 2, /*hidden argument*/NULL);
V_3 = L_40;
ASN1_t2114160833 * L_41 = V_3;
uint8_t L_42 = ASN1_get_Tag_m2789147236(L_41, /*hidden argument*/NULL);
if ((((int32_t)L_42) == ((int32_t)((int32_t)128))))
{
goto IL_0117;
}
}
{
ArgumentException_t132251570 * L_43 = (ArgumentException_t132251570 *)il2cpp_codegen_object_new(ArgumentException_t132251570_il2cpp_TypeInfo_var);
ArgumentException__ctor_m1312628991(L_43, _stringLiteral3316324514, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_43, NULL, EncryptedData__ctor_m4001546383_RuntimeMethod_var);
}
IL_0117:
{
ASN1_t2114160833 * L_44 = V_3;
ByteU5BU5D_t4116647657* L_45 = ASN1_get_Value_m63296490(L_44, /*hidden argument*/NULL);
__this->set__encrypted_3(L_45);
return;
}
}
// Mono.Security.PKCS7/ContentInfo Mono.Security.PKCS7/EncryptedData::get_EncryptionAlgorithm()
extern "C" IL2CPP_METHOD_ATTR ContentInfo_t3218159896 * EncryptedData_get_EncryptionAlgorithm_m905084934 (EncryptedData_t3577548733 * __this, const RuntimeMethod* method)
{
{
ContentInfo_t3218159896 * L_0 = __this->get__encryptionAlgorithm_2();
return L_0;
}
}
// System.Byte[] Mono.Security.PKCS7/EncryptedData::get_EncryptedContent()
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* EncryptedData_get_EncryptedContent_m3205649670 (EncryptedData_t3577548733 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (EncryptedData_get_EncryptedContent_m3205649670_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
ByteU5BU5D_t4116647657* L_0 = __this->get__encrypted_3();
if (L_0)
{
goto IL_000d;
}
}
{
return (ByteU5BU5D_t4116647657*)NULL;
}
IL_000d:
{
ByteU5BU5D_t4116647657* L_1 = __this->get__encrypted_3();
RuntimeObject * L_2 = Array_Clone_m2672907798((RuntimeArray *)(RuntimeArray *)L_1, /*hidden argument*/NULL);
return ((ByteU5BU5D_t4116647657*)Castclass((RuntimeObject*)L_2, ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var));
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void Mono.Security.Protocol.Tls.Alert::.ctor(Mono.Security.Protocol.Tls.AlertDescription)
extern "C" IL2CPP_METHOD_ATTR void Alert__ctor_m3135936936 (Alert_t4059934885 * __this, uint8_t ___description0, const RuntimeMethod* method)
{
{
Object__ctor_m297566312(__this, /*hidden argument*/NULL);
Alert_inferAlertLevel_m151204576(__this, /*hidden argument*/NULL);
uint8_t L_0 = ___description0;
__this->set_description_1(L_0);
return;
}
}
// System.Void Mono.Security.Protocol.Tls.Alert::.ctor(Mono.Security.Protocol.Tls.AlertLevel,Mono.Security.Protocol.Tls.AlertDescription)
extern "C" IL2CPP_METHOD_ATTR void Alert__ctor_m2879739792 (Alert_t4059934885 * __this, uint8_t ___level0, uint8_t ___description1, const RuntimeMethod* method)
{
{
Object__ctor_m297566312(__this, /*hidden argument*/NULL);
uint8_t L_0 = ___level0;
__this->set_level_0(L_0);
uint8_t L_1 = ___description1;
__this->set_description_1(L_1);
return;
}
}
// Mono.Security.Protocol.Tls.AlertLevel Mono.Security.Protocol.Tls.Alert::get_Level()
extern "C" IL2CPP_METHOD_ATTR uint8_t Alert_get_Level_m4249630350 (Alert_t4059934885 * __this, const RuntimeMethod* method)
{
{
uint8_t L_0 = __this->get_level_0();
return L_0;
}
}
// Mono.Security.Protocol.Tls.AlertDescription Mono.Security.Protocol.Tls.Alert::get_Description()
extern "C" IL2CPP_METHOD_ATTR uint8_t Alert_get_Description_m3833114036 (Alert_t4059934885 * __this, const RuntimeMethod* method)
{
{
uint8_t L_0 = __this->get_description_1();
return L_0;
}
}
// System.Boolean Mono.Security.Protocol.Tls.Alert::get_IsWarning()
extern "C" IL2CPP_METHOD_ATTR bool Alert_get_IsWarning_m1365397992 (Alert_t4059934885 * __this, const RuntimeMethod* method)
{
int32_t G_B3_0 = 0;
{
uint8_t L_0 = __this->get_level_0();
if ((!(((uint32_t)L_0) == ((uint32_t)1))))
{
goto IL_0012;
}
}
{
G_B3_0 = 1;
goto IL_0013;
}
IL_0012:
{
G_B3_0 = 0;
}
IL_0013:
{
return (bool)G_B3_0;
}
}
// System.Boolean Mono.Security.Protocol.Tls.Alert::get_IsCloseNotify()
extern "C" IL2CPP_METHOD_ATTR bool Alert_get_IsCloseNotify_m3157384796 (Alert_t4059934885 * __this, const RuntimeMethod* method)
{
{
bool L_0 = Alert_get_IsWarning_m1365397992(__this, /*hidden argument*/NULL);
if (!L_0)
{
goto IL_0018;
}
}
{
uint8_t L_1 = __this->get_description_1();
if (L_1)
{
goto IL_0018;
}
}
{
return (bool)1;
}
IL_0018:
{
return (bool)0;
}
}
// System.Void Mono.Security.Protocol.Tls.Alert::inferAlertLevel()
extern "C" IL2CPP_METHOD_ATTR void Alert_inferAlertLevel_m151204576 (Alert_t4059934885 * __this, const RuntimeMethod* method)
{
uint8_t V_0 = 0;
{
uint8_t L_0 = __this->get_description_1();
V_0 = L_0;
uint8_t L_1 = V_0;
switch (((int32_t)il2cpp_codegen_subtract((int32_t)L_1, (int32_t)((int32_t)40))))
{
case 0:
{
goto IL_00c9;
}
case 1:
{
goto IL_0064;
}
case 2:
{
goto IL_00c9;
}
case 3:
{
goto IL_00c9;
}
case 4:
{
goto IL_00c9;
}
case 5:
{
goto IL_00c9;
}
case 6:
{
goto IL_00c9;
}
case 7:
{
goto IL_00c9;
}
case 8:
{
goto IL_00c9;
}
case 9:
{
goto IL_00c9;
}
case 10:
{
goto IL_00c9;
}
case 11:
{
goto IL_00c9;
}
case 12:
{
goto IL_0064;
}
case 13:
{
goto IL_0064;
}
case 14:
{
goto IL_0064;
}
case 15:
{
goto IL_0064;
}
case 16:
{
goto IL_0064;
}
case 17:
{
goto IL_0064;
}
case 18:
{
goto IL_0064;
}
case 19:
{
goto IL_0064;
}
case 20:
{
goto IL_00c9;
}
}
}
IL_0064:
{
uint8_t L_2 = V_0;
switch (((int32_t)il2cpp_codegen_subtract((int32_t)L_2, (int32_t)((int32_t)20))))
{
case 0:
{
goto IL_00c9;
}
case 1:
{
goto IL_00c9;
}
case 2:
{
goto IL_00c9;
}
}
}
{
uint8_t L_3 = V_0;
if ((((int32_t)L_3) == ((int32_t)((int32_t)70))))
{
goto IL_00c9;
}
}
{
uint8_t L_4 = V_0;
if ((((int32_t)L_4) == ((int32_t)((int32_t)71))))
{
goto IL_00c9;
}
}
{
uint8_t L_5 = V_0;
if ((((int32_t)L_5) == ((int32_t)0)))
{
goto IL_00bd;
}
}
{
uint8_t L_6 = V_0;
if ((((int32_t)L_6) == ((int32_t)((int32_t)10))))
{
goto IL_00c9;
}
}
{
uint8_t L_7 = V_0;
if ((((int32_t)L_7) == ((int32_t)((int32_t)30))))
{
goto IL_00c9;
}
}
{
uint8_t L_8 = V_0;
if ((((int32_t)L_8) == ((int32_t)((int32_t)80))))
{
goto IL_00c9;
}
}
{
uint8_t L_9 = V_0;
if ((((int32_t)L_9) == ((int32_t)((int32_t)90))))
{
goto IL_00bd;
}
}
{
uint8_t L_10 = V_0;
if ((((int32_t)L_10) == ((int32_t)((int32_t)100))))
{
goto IL_00bd;
}
}
{
goto IL_00c9;
}
IL_00bd:
{
__this->set_level_0(1);
goto IL_00d5;
}
IL_00c9:
{
__this->set_level_0(2);
goto IL_00d5;
}
IL_00d5:
{
return;
}
}
// System.String Mono.Security.Protocol.Tls.Alert::GetAlertMessage(Mono.Security.Protocol.Tls.AlertDescription)
extern "C" IL2CPP_METHOD_ATTR String_t* Alert_GetAlertMessage_m1942367141 (RuntimeObject * __this /* static, unused */, uint8_t ___description0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (Alert_GetAlertMessage_m1942367141_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
return _stringLiteral1867853257;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void Mono.Security.Protocol.Tls.CertificateSelectionCallback::.ctor(System.Object,System.IntPtr)
extern "C" IL2CPP_METHOD_ATTR void CertificateSelectionCallback__ctor_m3437537928 (CertificateSelectionCallback_t3743405224 * __this, RuntimeObject * ___object0, intptr_t ___method1, const RuntimeMethod* method)
{
__this->set_method_ptr_0(il2cpp_codegen_get_method_pointer((RuntimeMethod*)___method1));
__this->set_method_3(___method1);
__this->set_m_target_2(___object0);
}
// System.Security.Cryptography.X509Certificates.X509Certificate Mono.Security.Protocol.Tls.CertificateSelectionCallback::Invoke(System.Security.Cryptography.X509Certificates.X509CertificateCollection,System.Security.Cryptography.X509Certificates.X509Certificate,System.String,System.Security.Cryptography.X509Certificates.X509CertificateCollection)
extern "C" IL2CPP_METHOD_ATTR X509Certificate_t713131622 * CertificateSelectionCallback_Invoke_m3129973019 (CertificateSelectionCallback_t3743405224 * __this, X509CertificateCollection_t3399372417 * ___clientCertificates0, X509Certificate_t713131622 * ___serverCertificate1, String_t* ___targetHost2, X509CertificateCollection_t3399372417 * ___serverRequestedCertificates3, const RuntimeMethod* method)
{
X509Certificate_t713131622 * result = NULL;
if(__this->get_prev_9() != NULL)
{
CertificateSelectionCallback_Invoke_m3129973019((CertificateSelectionCallback_t3743405224 *)__this->get_prev_9(), ___clientCertificates0, ___serverCertificate1, ___targetHost2, ___serverRequestedCertificates3, method);
}
Il2CppMethodPointer targetMethodPointer = __this->get_method_ptr_0();
RuntimeMethod* targetMethod = (RuntimeMethod*)(__this->get_method_3());
RuntimeObject* targetThis = __this->get_m_target_2();
il2cpp_codegen_raise_execution_engine_exception_if_method_is_not_found(targetMethod);
bool ___methodIsStatic = MethodIsStatic(targetMethod);
if (___methodIsStatic)
{
if (il2cpp_codegen_method_parameter_count(targetMethod) == 4)
{
// open
{
typedef X509Certificate_t713131622 * (*FunctionPointerType) (RuntimeObject *, X509CertificateCollection_t3399372417 *, X509Certificate_t713131622 *, String_t*, X509CertificateCollection_t3399372417 *, const RuntimeMethod*);
result = ((FunctionPointerType)targetMethodPointer)(NULL, ___clientCertificates0, ___serverCertificate1, ___targetHost2, ___serverRequestedCertificates3, targetMethod);
}
}
else
{
// closed
{
typedef X509Certificate_t713131622 * (*FunctionPointerType) (RuntimeObject *, void*, X509CertificateCollection_t3399372417 *, X509Certificate_t713131622 *, String_t*, X509CertificateCollection_t3399372417 *, const RuntimeMethod*);
result = ((FunctionPointerType)targetMethodPointer)(NULL, targetThis, ___clientCertificates0, ___serverCertificate1, ___targetHost2, ___serverRequestedCertificates3, targetMethod);
}
}
}
else
{
if (il2cpp_codegen_method_parameter_count(targetMethod) == 4)
{
// closed
if (il2cpp_codegen_method_is_virtual(targetMethod) && !il2cpp_codegen_object_is_of_sealed_type(targetThis) && il2cpp_codegen_delegate_has_invoker((Il2CppDelegate*)__this))
{
if (il2cpp_codegen_method_is_generic_instance(targetMethod))
{
if (il2cpp_codegen_method_is_interface_method(targetMethod))
result = GenericInterfaceFuncInvoker4< X509Certificate_t713131622 *, X509CertificateCollection_t3399372417 *, X509Certificate_t713131622 *, String_t*, X509CertificateCollection_t3399372417 * >::Invoke(targetMethod, targetThis, ___clientCertificates0, ___serverCertificate1, ___targetHost2, ___serverRequestedCertificates3);
else
result = GenericVirtFuncInvoker4< X509Certificate_t713131622 *, X509CertificateCollection_t3399372417 *, X509Certificate_t713131622 *, String_t*, X509CertificateCollection_t3399372417 * >::Invoke(targetMethod, targetThis, ___clientCertificates0, ___serverCertificate1, ___targetHost2, ___serverRequestedCertificates3);
}
else
{
if (il2cpp_codegen_method_is_interface_method(targetMethod))
result = InterfaceFuncInvoker4< X509Certificate_t713131622 *, X509CertificateCollection_t3399372417 *, X509Certificate_t713131622 *, String_t*, X509CertificateCollection_t3399372417 * >::Invoke(il2cpp_codegen_method_get_slot(targetMethod), il2cpp_codegen_method_get_declaring_type(targetMethod), targetThis, ___clientCertificates0, ___serverCertificate1, ___targetHost2, ___serverRequestedCertificates3);
else
result = VirtFuncInvoker4< X509Certificate_t713131622 *, X509CertificateCollection_t3399372417 *, X509Certificate_t713131622 *, String_t*, X509CertificateCollection_t3399372417 * >::Invoke(il2cpp_codegen_method_get_slot(targetMethod), targetThis, ___clientCertificates0, ___serverCertificate1, ___targetHost2, ___serverRequestedCertificates3);
}
}
else
{
typedef X509Certificate_t713131622 * (*FunctionPointerType) (void*, X509CertificateCollection_t3399372417 *, X509Certificate_t713131622 *, String_t*, X509CertificateCollection_t3399372417 *, const RuntimeMethod*);
result = ((FunctionPointerType)targetMethodPointer)(targetThis, ___clientCertificates0, ___serverCertificate1, ___targetHost2, ___serverRequestedCertificates3, targetMethod);
}
}
else
{
// open
if (il2cpp_codegen_method_is_virtual(targetMethod) && !il2cpp_codegen_object_is_of_sealed_type(targetThis) && il2cpp_codegen_delegate_has_invoker((Il2CppDelegate*)__this))
{
if (il2cpp_codegen_method_is_generic_instance(targetMethod))
{
if (il2cpp_codegen_method_is_interface_method(targetMethod))
result = GenericInterfaceFuncInvoker3< X509Certificate_t713131622 *, X509Certificate_t713131622 *, String_t*, X509CertificateCollection_t3399372417 * >::Invoke(targetMethod, ___clientCertificates0, ___serverCertificate1, ___targetHost2, ___serverRequestedCertificates3);
else
result = GenericVirtFuncInvoker3< X509Certificate_t713131622 *, X509Certificate_t713131622 *, String_t*, X509CertificateCollection_t3399372417 * >::Invoke(targetMethod, ___clientCertificates0, ___serverCertificate1, ___targetHost2, ___serverRequestedCertificates3);
}
else
{
if (il2cpp_codegen_method_is_interface_method(targetMethod))
result = InterfaceFuncInvoker3< X509Certificate_t713131622 *, X509Certificate_t713131622 *, String_t*, X509CertificateCollection_t3399372417 * >::Invoke(il2cpp_codegen_method_get_slot(targetMethod), il2cpp_codegen_method_get_declaring_type(targetMethod), ___clientCertificates0, ___serverCertificate1, ___targetHost2, ___serverRequestedCertificates3);
else
result = VirtFuncInvoker3< X509Certificate_t713131622 *, X509Certificate_t713131622 *, String_t*, X509CertificateCollection_t3399372417 * >::Invoke(il2cpp_codegen_method_get_slot(targetMethod), ___clientCertificates0, ___serverCertificate1, ___targetHost2, ___serverRequestedCertificates3);
}
}
else
{
typedef X509Certificate_t713131622 * (*FunctionPointerType) (X509CertificateCollection_t3399372417 *, X509Certificate_t713131622 *, String_t*, X509CertificateCollection_t3399372417 *, const RuntimeMethod*);
result = ((FunctionPointerType)targetMethodPointer)(___clientCertificates0, ___serverCertificate1, ___targetHost2, ___serverRequestedCertificates3, targetMethod);
}
}
}
return result;
}
// System.IAsyncResult Mono.Security.Protocol.Tls.CertificateSelectionCallback::BeginInvoke(System.Security.Cryptography.X509Certificates.X509CertificateCollection,System.Security.Cryptography.X509Certificates.X509Certificate,System.String,System.Security.Cryptography.X509Certificates.X509CertificateCollection,System.AsyncCallback,System.Object)
extern "C" IL2CPP_METHOD_ATTR RuntimeObject* CertificateSelectionCallback_BeginInvoke_m598704794 (CertificateSelectionCallback_t3743405224 * __this, X509CertificateCollection_t3399372417 * ___clientCertificates0, X509Certificate_t713131622 * ___serverCertificate1, String_t* ___targetHost2, X509CertificateCollection_t3399372417 * ___serverRequestedCertificates3, AsyncCallback_t3962456242 * ___callback4, RuntimeObject * ___object5, const RuntimeMethod* method)
{
void *__d_args[5] = {0};
__d_args[0] = ___clientCertificates0;
__d_args[1] = ___serverCertificate1;
__d_args[2] = ___targetHost2;
__d_args[3] = ___serverRequestedCertificates3;
return (RuntimeObject*)il2cpp_codegen_delegate_begin_invoke((RuntimeDelegate*)__this, __d_args, (RuntimeDelegate*)___callback4, (RuntimeObject*)___object5);
}
// System.Security.Cryptography.X509Certificates.X509Certificate Mono.Security.Protocol.Tls.CertificateSelectionCallback::EndInvoke(System.IAsyncResult)
extern "C" IL2CPP_METHOD_ATTR X509Certificate_t713131622 * CertificateSelectionCallback_EndInvoke_m916047629 (CertificateSelectionCallback_t3743405224 * __this, RuntimeObject* ___result0, const RuntimeMethod* method)
{
RuntimeObject *__result = il2cpp_codegen_delegate_end_invoke((Il2CppAsyncResult*) ___result0, 0);
return (X509Certificate_t713131622 *)__result;
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void Mono.Security.Protocol.Tls.CertificateValidationCallback::.ctor(System.Object,System.IntPtr)
extern "C" IL2CPP_METHOD_ATTR void CertificateValidationCallback__ctor_m1962610296 (CertificateValidationCallback_t4091668218 * __this, RuntimeObject * ___object0, intptr_t ___method1, const RuntimeMethod* method)
{
__this->set_method_ptr_0(il2cpp_codegen_get_method_pointer((RuntimeMethod*)___method1));
__this->set_method_3(___method1);
__this->set_m_target_2(___object0);
}
// System.Boolean Mono.Security.Protocol.Tls.CertificateValidationCallback::Invoke(System.Security.Cryptography.X509Certificates.X509Certificate,System.Int32[])
extern "C" IL2CPP_METHOD_ATTR bool CertificateValidationCallback_Invoke_m1014111289 (CertificateValidationCallback_t4091668218 * __this, X509Certificate_t713131622 * ___certificate0, Int32U5BU5D_t385246372* ___certificateErrors1, const RuntimeMethod* method)
{
bool result = false;
if(__this->get_prev_9() != NULL)
{
CertificateValidationCallback_Invoke_m1014111289((CertificateValidationCallback_t4091668218 *)__this->get_prev_9(), ___certificate0, ___certificateErrors1, method);
}
Il2CppMethodPointer targetMethodPointer = __this->get_method_ptr_0();
RuntimeMethod* targetMethod = (RuntimeMethod*)(__this->get_method_3());
RuntimeObject* targetThis = __this->get_m_target_2();
il2cpp_codegen_raise_execution_engine_exception_if_method_is_not_found(targetMethod);
bool ___methodIsStatic = MethodIsStatic(targetMethod);
if (___methodIsStatic)
{
if (il2cpp_codegen_method_parameter_count(targetMethod) == 2)
{
// open
{
typedef bool (*FunctionPointerType) (RuntimeObject *, X509Certificate_t713131622 *, Int32U5BU5D_t385246372*, const RuntimeMethod*);
result = ((FunctionPointerType)targetMethodPointer)(NULL, ___certificate0, ___certificateErrors1, targetMethod);
}
}
else
{
// closed
{
typedef bool (*FunctionPointerType) (RuntimeObject *, void*, X509Certificate_t713131622 *, Int32U5BU5D_t385246372*, const RuntimeMethod*);
result = ((FunctionPointerType)targetMethodPointer)(NULL, targetThis, ___certificate0, ___certificateErrors1, targetMethod);
}
}
}
else
{
if (il2cpp_codegen_method_parameter_count(targetMethod) == 2)
{
// closed
if (il2cpp_codegen_method_is_virtual(targetMethod) && !il2cpp_codegen_object_is_of_sealed_type(targetThis) && il2cpp_codegen_delegate_has_invoker((Il2CppDelegate*)__this))
{
if (il2cpp_codegen_method_is_generic_instance(targetMethod))
{
if (il2cpp_codegen_method_is_interface_method(targetMethod))
result = GenericInterfaceFuncInvoker2< bool, X509Certificate_t713131622 *, Int32U5BU5D_t385246372* >::Invoke(targetMethod, targetThis, ___certificate0, ___certificateErrors1);
else
result = GenericVirtFuncInvoker2< bool, X509Certificate_t713131622 *, Int32U5BU5D_t385246372* >::Invoke(targetMethod, targetThis, ___certificate0, ___certificateErrors1);
}
else
{
if (il2cpp_codegen_method_is_interface_method(targetMethod))
result = InterfaceFuncInvoker2< bool, X509Certificate_t713131622 *, Int32U5BU5D_t385246372* >::Invoke(il2cpp_codegen_method_get_slot(targetMethod), il2cpp_codegen_method_get_declaring_type(targetMethod), targetThis, ___certificate0, ___certificateErrors1);
else
result = VirtFuncInvoker2< bool, X509Certificate_t713131622 *, Int32U5BU5D_t385246372* >::Invoke(il2cpp_codegen_method_get_slot(targetMethod), targetThis, ___certificate0, ___certificateErrors1);
}
}
else
{
typedef bool (*FunctionPointerType) (void*, X509Certificate_t713131622 *, Int32U5BU5D_t385246372*, const RuntimeMethod*);
result = ((FunctionPointerType)targetMethodPointer)(targetThis, ___certificate0, ___certificateErrors1, targetMethod);
}
}
else
{
// open
if (il2cpp_codegen_method_is_virtual(targetMethod) && !il2cpp_codegen_object_is_of_sealed_type(targetThis) && il2cpp_codegen_delegate_has_invoker((Il2CppDelegate*)__this))
{
if (il2cpp_codegen_method_is_generic_instance(targetMethod))
{
if (il2cpp_codegen_method_is_interface_method(targetMethod))
result = GenericInterfaceFuncInvoker1< bool, Int32U5BU5D_t385246372* >::Invoke(targetMethod, ___certificate0, ___certificateErrors1);
else
result = GenericVirtFuncInvoker1< bool, Int32U5BU5D_t385246372* >::Invoke(targetMethod, ___certificate0, ___certificateErrors1);
}
else
{
if (il2cpp_codegen_method_is_interface_method(targetMethod))
result = InterfaceFuncInvoker1< bool, Int32U5BU5D_t385246372* >::Invoke(il2cpp_codegen_method_get_slot(targetMethod), il2cpp_codegen_method_get_declaring_type(targetMethod), ___certificate0, ___certificateErrors1);
else
result = VirtFuncInvoker1< bool, Int32U5BU5D_t385246372* >::Invoke(il2cpp_codegen_method_get_slot(targetMethod), ___certificate0, ___certificateErrors1);
}
}
else
{
typedef bool (*FunctionPointerType) (X509Certificate_t713131622 *, Int32U5BU5D_t385246372*, const RuntimeMethod*);
result = ((FunctionPointerType)targetMethodPointer)(___certificate0, ___certificateErrors1, targetMethod);
}
}
}
return result;
}
// System.IAsyncResult Mono.Security.Protocol.Tls.CertificateValidationCallback::BeginInvoke(System.Security.Cryptography.X509Certificates.X509Certificate,System.Int32[],System.AsyncCallback,System.Object)
extern "C" IL2CPP_METHOD_ATTR RuntimeObject* CertificateValidationCallback_BeginInvoke_m3301716879 (CertificateValidationCallback_t4091668218 * __this, X509Certificate_t713131622 * ___certificate0, Int32U5BU5D_t385246372* ___certificateErrors1, AsyncCallback_t3962456242 * ___callback2, RuntimeObject * ___object3, const RuntimeMethod* method)
{
void *__d_args[3] = {0};
__d_args[0] = ___certificate0;
__d_args[1] = ___certificateErrors1;
return (RuntimeObject*)il2cpp_codegen_delegate_begin_invoke((RuntimeDelegate*)__this, __d_args, (RuntimeDelegate*)___callback2, (RuntimeObject*)___object3);
}
// System.Boolean Mono.Security.Protocol.Tls.CertificateValidationCallback::EndInvoke(System.IAsyncResult)
extern "C" IL2CPP_METHOD_ATTR bool CertificateValidationCallback_EndInvoke_m4224203910 (CertificateValidationCallback_t4091668218 * __this, RuntimeObject* ___result0, const RuntimeMethod* method)
{
RuntimeObject *__result = il2cpp_codegen_delegate_end_invoke((Il2CppAsyncResult*) ___result0, 0);
return *(bool*)UnBox ((RuntimeObject*)__result);
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void Mono.Security.Protocol.Tls.CertificateValidationCallback2::.ctor(System.Object,System.IntPtr)
extern "C" IL2CPP_METHOD_ATTR void CertificateValidationCallback2__ctor_m1685875113 (CertificateValidationCallback2_t1842476440 * __this, RuntimeObject * ___object0, intptr_t ___method1, const RuntimeMethod* method)
{
__this->set_method_ptr_0(il2cpp_codegen_get_method_pointer((RuntimeMethod*)___method1));
__this->set_method_3(___method1);
__this->set_m_target_2(___object0);
}
// Mono.Security.Protocol.Tls.ValidationResult Mono.Security.Protocol.Tls.CertificateValidationCallback2::Invoke(Mono.Security.X509.X509CertificateCollection)
extern "C" IL2CPP_METHOD_ATTR ValidationResult_t3834298736 * CertificateValidationCallback2_Invoke_m3381554834 (CertificateValidationCallback2_t1842476440 * __this, X509CertificateCollection_t1542168550 * ___collection0, const RuntimeMethod* method)
{
ValidationResult_t3834298736 * result = NULL;
if(__this->get_prev_9() != NULL)
{
CertificateValidationCallback2_Invoke_m3381554834((CertificateValidationCallback2_t1842476440 *)__this->get_prev_9(), ___collection0, method);
}
Il2CppMethodPointer targetMethodPointer = __this->get_method_ptr_0();
RuntimeMethod* targetMethod = (RuntimeMethod*)(__this->get_method_3());
RuntimeObject* targetThis = __this->get_m_target_2();
il2cpp_codegen_raise_execution_engine_exception_if_method_is_not_found(targetMethod);
bool ___methodIsStatic = MethodIsStatic(targetMethod);
if (___methodIsStatic)
{
if (il2cpp_codegen_method_parameter_count(targetMethod) == 1)
{
// open
{
typedef ValidationResult_t3834298736 * (*FunctionPointerType) (RuntimeObject *, X509CertificateCollection_t1542168550 *, const RuntimeMethod*);
result = ((FunctionPointerType)targetMethodPointer)(NULL, ___collection0, targetMethod);
}
}
else
{
// closed
{
typedef ValidationResult_t3834298736 * (*FunctionPointerType) (RuntimeObject *, void*, X509CertificateCollection_t1542168550 *, const RuntimeMethod*);
result = ((FunctionPointerType)targetMethodPointer)(NULL, targetThis, ___collection0, targetMethod);
}
}
}
else
{
if (il2cpp_codegen_method_parameter_count(targetMethod) == 1)
{
// closed
if (il2cpp_codegen_method_is_virtual(targetMethod) && !il2cpp_codegen_object_is_of_sealed_type(targetThis) && il2cpp_codegen_delegate_has_invoker((Il2CppDelegate*)__this))
{
if (il2cpp_codegen_method_is_generic_instance(targetMethod))
{
if (il2cpp_codegen_method_is_interface_method(targetMethod))
result = GenericInterfaceFuncInvoker1< ValidationResult_t3834298736 *, X509CertificateCollection_t1542168550 * >::Invoke(targetMethod, targetThis, ___collection0);
else
result = GenericVirtFuncInvoker1< ValidationResult_t3834298736 *, X509CertificateCollection_t1542168550 * >::Invoke(targetMethod, targetThis, ___collection0);
}
else
{
if (il2cpp_codegen_method_is_interface_method(targetMethod))
result = InterfaceFuncInvoker1< ValidationResult_t3834298736 *, X509CertificateCollection_t1542168550 * >::Invoke(il2cpp_codegen_method_get_slot(targetMethod), il2cpp_codegen_method_get_declaring_type(targetMethod), targetThis, ___collection0);
else
result = VirtFuncInvoker1< ValidationResult_t3834298736 *, X509CertificateCollection_t1542168550 * >::Invoke(il2cpp_codegen_method_get_slot(targetMethod), targetThis, ___collection0);
}
}
else
{
typedef ValidationResult_t3834298736 * (*FunctionPointerType) (void*, X509CertificateCollection_t1542168550 *, const RuntimeMethod*);
result = ((FunctionPointerType)targetMethodPointer)(targetThis, ___collection0, targetMethod);
}
}
else
{
// open
if (il2cpp_codegen_method_is_virtual(targetMethod) && !il2cpp_codegen_object_is_of_sealed_type(targetThis) && il2cpp_codegen_delegate_has_invoker((Il2CppDelegate*)__this))
{
if (il2cpp_codegen_method_is_generic_instance(targetMethod))
{
if (il2cpp_codegen_method_is_interface_method(targetMethod))
result = GenericInterfaceFuncInvoker0< ValidationResult_t3834298736 * >::Invoke(targetMethod, ___collection0);
else
result = GenericVirtFuncInvoker0< ValidationResult_t3834298736 * >::Invoke(targetMethod, ___collection0);
}
else
{
if (il2cpp_codegen_method_is_interface_method(targetMethod))
result = InterfaceFuncInvoker0< ValidationResult_t3834298736 * >::Invoke(il2cpp_codegen_method_get_slot(targetMethod), il2cpp_codegen_method_get_declaring_type(targetMethod), ___collection0);
else
result = VirtFuncInvoker0< ValidationResult_t3834298736 * >::Invoke(il2cpp_codegen_method_get_slot(targetMethod), ___collection0);
}
}
else
{
typedef ValidationResult_t3834298736 * (*FunctionPointerType) (X509CertificateCollection_t1542168550 *, const RuntimeMethod*);
result = ((FunctionPointerType)targetMethodPointer)(___collection0, targetMethod);
}
}
}
return result;
}
// System.IAsyncResult Mono.Security.Protocol.Tls.CertificateValidationCallback2::BeginInvoke(Mono.Security.X509.X509CertificateCollection,System.AsyncCallback,System.Object)
extern "C" IL2CPP_METHOD_ATTR RuntimeObject* CertificateValidationCallback2_BeginInvoke_m3360174801 (CertificateValidationCallback2_t1842476440 * __this, X509CertificateCollection_t1542168550 * ___collection0, AsyncCallback_t3962456242 * ___callback1, RuntimeObject * ___object2, const RuntimeMethod* method)
{
void *__d_args[2] = {0};
__d_args[0] = ___collection0;
return (RuntimeObject*)il2cpp_codegen_delegate_begin_invoke((RuntimeDelegate*)__this, __d_args, (RuntimeDelegate*)___callback1, (RuntimeObject*)___object2);
}
// Mono.Security.Protocol.Tls.ValidationResult Mono.Security.Protocol.Tls.CertificateValidationCallback2::EndInvoke(System.IAsyncResult)
extern "C" IL2CPP_METHOD_ATTR ValidationResult_t3834298736 * CertificateValidationCallback2_EndInvoke_m2456956161 (CertificateValidationCallback2_t1842476440 * __this, RuntimeObject* ___result0, const RuntimeMethod* method)
{
RuntimeObject *__result = il2cpp_codegen_delegate_end_invoke((Il2CppAsyncResult*) ___result0, 0);
return (ValidationResult_t3834298736 *)__result;
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void Mono.Security.Protocol.Tls.CipherSuite::.ctor(System.Int16,System.String,Mono.Security.Protocol.Tls.CipherAlgorithmType,Mono.Security.Protocol.Tls.HashAlgorithmType,Mono.Security.Protocol.Tls.ExchangeAlgorithmType,System.Boolean,System.Boolean,System.Byte,System.Byte,System.Int16,System.Byte,System.Byte)
extern "C" IL2CPP_METHOD_ATTR void CipherSuite__ctor_m2440635082 (CipherSuite_t3414744575 * __this, int16_t ___code0, String_t* ___name1, int32_t ___cipherAlgorithmType2, int32_t ___hashAlgorithmType3, int32_t ___exchangeAlgorithmType4, bool ___exportable5, bool ___blockMode6, uint8_t ___keyMaterialSize7, uint8_t ___expandedKeyMaterialSize8, int16_t ___effectiveKeyBits9, uint8_t ___ivSize10, uint8_t ___blockSize11, const RuntimeMethod* method)
{
{
Object__ctor_m297566312(__this, /*hidden argument*/NULL);
int16_t L_0 = ___code0;
__this->set_code_1(L_0);
String_t* L_1 = ___name1;
__this->set_name_2(L_1);
int32_t L_2 = ___cipherAlgorithmType2;
__this->set_cipherAlgorithmType_3(L_2);
int32_t L_3 = ___hashAlgorithmType3;
__this->set_hashAlgorithmType_4(L_3);
int32_t L_4 = ___exchangeAlgorithmType4;
__this->set_exchangeAlgorithmType_5(L_4);
bool L_5 = ___exportable5;
__this->set_isExportable_6(L_5);
bool L_6 = ___blockMode6;
if (!L_6)
{
goto IL_0041;
}
}
{
__this->set_cipherMode_7(1);
}
IL_0041:
{
uint8_t L_7 = ___keyMaterialSize7;
__this->set_keyMaterialSize_8(L_7);
uint8_t L_8 = ___expandedKeyMaterialSize8;
__this->set_expandedKeyMaterialSize_10(L_8);
int16_t L_9 = ___effectiveKeyBits9;
__this->set_effectiveKeyBits_11(L_9);
uint8_t L_10 = ___ivSize10;
__this->set_ivSize_12(L_10);
uint8_t L_11 = ___blockSize11;
__this->set_blockSize_13(L_11);
uint8_t L_12 = __this->get_keyMaterialSize_8();
int32_t L_13 = CipherSuite_get_HashSize_m4060916532(__this, /*hidden argument*/NULL);
uint8_t L_14 = __this->get_ivSize_12();
__this->set_keyBlockSize_9(((int32_t)((int32_t)((int32_t)il2cpp_codegen_add((int32_t)((int32_t)il2cpp_codegen_add((int32_t)L_12, (int32_t)L_13)), (int32_t)L_14))<<(int32_t)1)));
return;
}
}
// System.Void Mono.Security.Protocol.Tls.CipherSuite::.cctor()
extern "C" IL2CPP_METHOD_ATTR void CipherSuite__cctor_m3668442490 (RuntimeObject * __this /* static, unused */, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (CipherSuite__cctor_m3668442490_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
ByteU5BU5D_t4116647657* L_0 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)0);
((CipherSuite_t3414744575_StaticFields*)il2cpp_codegen_static_fields_for(CipherSuite_t3414744575_il2cpp_TypeInfo_var))->set_EmptyArray_0(L_0);
return;
}
}
// System.Security.Cryptography.ICryptoTransform Mono.Security.Protocol.Tls.CipherSuite::get_EncryptionCipher()
extern "C" IL2CPP_METHOD_ATTR RuntimeObject* CipherSuite_get_EncryptionCipher_m3029637613 (CipherSuite_t3414744575 * __this, const RuntimeMethod* method)
{
{
RuntimeObject* L_0 = __this->get_encryptionCipher_16();
return L_0;
}
}
// System.Security.Cryptography.ICryptoTransform Mono.Security.Protocol.Tls.CipherSuite::get_DecryptionCipher()
extern "C" IL2CPP_METHOD_ATTR RuntimeObject* CipherSuite_get_DecryptionCipher_m2839827488 (CipherSuite_t3414744575 * __this, const RuntimeMethod* method)
{
{
RuntimeObject* L_0 = __this->get_decryptionCipher_18();
return L_0;
}
}
// System.Security.Cryptography.KeyedHashAlgorithm Mono.Security.Protocol.Tls.CipherSuite::get_ClientHMAC()
extern "C" IL2CPP_METHOD_ATTR KeyedHashAlgorithm_t112861511 * CipherSuite_get_ClientHMAC_m377589750 (CipherSuite_t3414744575 * __this, const RuntimeMethod* method)
{
{
KeyedHashAlgorithm_t112861511 * L_0 = __this->get_clientHMAC_19();
return L_0;
}
}
// System.Security.Cryptography.KeyedHashAlgorithm Mono.Security.Protocol.Tls.CipherSuite::get_ServerHMAC()
extern "C" IL2CPP_METHOD_ATTR KeyedHashAlgorithm_t112861511 * CipherSuite_get_ServerHMAC_m714506854 (CipherSuite_t3414744575 * __this, const RuntimeMethod* method)
{
{
KeyedHashAlgorithm_t112861511 * L_0 = __this->get_serverHMAC_20();
return L_0;
}
}
// Mono.Security.Protocol.Tls.CipherAlgorithmType Mono.Security.Protocol.Tls.CipherSuite::get_CipherAlgorithmType()
extern "C" IL2CPP_METHOD_ATTR int32_t CipherSuite_get_CipherAlgorithmType_m137858741 (CipherSuite_t3414744575 * __this, const RuntimeMethod* method)
{
{
int32_t L_0 = __this->get_cipherAlgorithmType_3();
return L_0;
}
}
// System.String Mono.Security.Protocol.Tls.CipherSuite::get_HashAlgorithmName()
extern "C" IL2CPP_METHOD_ATTR String_t* CipherSuite_get_HashAlgorithmName_m3758129154 (CipherSuite_t3414744575 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (CipherSuite_get_HashAlgorithmName_m3758129154_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
int32_t V_0 = 0;
{
int32_t L_0 = __this->get_hashAlgorithmType_4();
V_0 = L_0;
int32_t L_1 = V_0;
switch (L_1)
{
case 0:
{
goto IL_001e;
}
case 1:
{
goto IL_002a;
}
case 2:
{
goto IL_0024;
}
}
}
{
goto IL_002a;
}
IL_001e:
{
return _stringLiteral3839139460;
}
IL_0024:
{
return _stringLiteral1144609714;
}
IL_002a:
{
return _stringLiteral2791739702;
}
}
// Mono.Security.Protocol.Tls.HashAlgorithmType Mono.Security.Protocol.Tls.CipherSuite::get_HashAlgorithmType()
extern "C" IL2CPP_METHOD_ATTR int32_t CipherSuite_get_HashAlgorithmType_m1029363505 (CipherSuite_t3414744575 * __this, const RuntimeMethod* method)
{
{
int32_t L_0 = __this->get_hashAlgorithmType_4();
return L_0;
}
}
// System.Int32 Mono.Security.Protocol.Tls.CipherSuite::get_HashSize()
extern "C" IL2CPP_METHOD_ATTR int32_t CipherSuite_get_HashSize_m4060916532 (CipherSuite_t3414744575 * __this, const RuntimeMethod* method)
{
int32_t V_0 = 0;
{
int32_t L_0 = __this->get_hashAlgorithmType_4();
V_0 = L_0;
int32_t L_1 = V_0;
switch (L_1)
{
case 0:
{
goto IL_001e;
}
case 1:
{
goto IL_0024;
}
case 2:
{
goto IL_0021;
}
}
}
{
goto IL_0024;
}
IL_001e:
{
return ((int32_t)16);
}
IL_0021:
{
return ((int32_t)20);
}
IL_0024:
{
return 0;
}
}
// Mono.Security.Protocol.Tls.ExchangeAlgorithmType Mono.Security.Protocol.Tls.CipherSuite::get_ExchangeAlgorithmType()
extern "C" IL2CPP_METHOD_ATTR int32_t CipherSuite_get_ExchangeAlgorithmType_m1633709183 (CipherSuite_t3414744575 * __this, const RuntimeMethod* method)
{
{
int32_t L_0 = __this->get_exchangeAlgorithmType_5();
return L_0;
}
}
// System.Security.Cryptography.CipherMode Mono.Security.Protocol.Tls.CipherSuite::get_CipherMode()
extern "C" IL2CPP_METHOD_ATTR int32_t CipherSuite_get_CipherMode_m425550365 (CipherSuite_t3414744575 * __this, const RuntimeMethod* method)
{
{
int32_t L_0 = __this->get_cipherMode_7();
return L_0;
}
}
// System.Int16 Mono.Security.Protocol.Tls.CipherSuite::get_Code()
extern "C" IL2CPP_METHOD_ATTR int16_t CipherSuite_get_Code_m3847824475 (CipherSuite_t3414744575 * __this, const RuntimeMethod* method)
{
{
int16_t L_0 = __this->get_code_1();
return L_0;
}
}
// System.String Mono.Security.Protocol.Tls.CipherSuite::get_Name()
extern "C" IL2CPP_METHOD_ATTR String_t* CipherSuite_get_Name_m1137568068 (CipherSuite_t3414744575 * __this, const RuntimeMethod* method)
{
{
String_t* L_0 = __this->get_name_2();
return L_0;
}
}
// System.Boolean Mono.Security.Protocol.Tls.CipherSuite::get_IsExportable()
extern "C" IL2CPP_METHOD_ATTR bool CipherSuite_get_IsExportable_m677202963 (CipherSuite_t3414744575 * __this, const RuntimeMethod* method)
{
{
bool L_0 = __this->get_isExportable_6();
return L_0;
}
}
// System.Byte Mono.Security.Protocol.Tls.CipherSuite::get_KeyMaterialSize()
extern "C" IL2CPP_METHOD_ATTR uint8_t CipherSuite_get_KeyMaterialSize_m3569550689 (CipherSuite_t3414744575 * __this, const RuntimeMethod* method)
{
{
uint8_t L_0 = __this->get_keyMaterialSize_8();
return L_0;
}
}
// System.Int32 Mono.Security.Protocol.Tls.CipherSuite::get_KeyBlockSize()
extern "C" IL2CPP_METHOD_ATTR int32_t CipherSuite_get_KeyBlockSize_m519075451 (CipherSuite_t3414744575 * __this, const RuntimeMethod* method)
{
{
int32_t L_0 = __this->get_keyBlockSize_9();
return L_0;
}
}
// System.Byte Mono.Security.Protocol.Tls.CipherSuite::get_ExpandedKeyMaterialSize()
extern "C" IL2CPP_METHOD_ATTR uint8_t CipherSuite_get_ExpandedKeyMaterialSize_m197590106 (CipherSuite_t3414744575 * __this, const RuntimeMethod* method)
{
{
uint8_t L_0 = __this->get_expandedKeyMaterialSize_10();
return L_0;
}
}
// System.Int16 Mono.Security.Protocol.Tls.CipherSuite::get_EffectiveKeyBits()
extern "C" IL2CPP_METHOD_ATTR int16_t CipherSuite_get_EffectiveKeyBits_m2380229009 (CipherSuite_t3414744575 * __this, const RuntimeMethod* method)
{
{
int16_t L_0 = __this->get_effectiveKeyBits_11();
return L_0;
}
}
// System.Byte Mono.Security.Protocol.Tls.CipherSuite::get_IvSize()
extern "C" IL2CPP_METHOD_ATTR uint8_t CipherSuite_get_IvSize_m630778063 (CipherSuite_t3414744575 * __this, const RuntimeMethod* method)
{
{
uint8_t L_0 = __this->get_ivSize_12();
return L_0;
}
}
// Mono.Security.Protocol.Tls.Context Mono.Security.Protocol.Tls.CipherSuite::get_Context()
extern "C" IL2CPP_METHOD_ATTR Context_t3971234707 * CipherSuite_get_Context_m1621551997 (CipherSuite_t3414744575 * __this, const RuntimeMethod* method)
{
{
Context_t3971234707 * L_0 = __this->get_context_14();
return L_0;
}
}
// System.Void Mono.Security.Protocol.Tls.CipherSuite::set_Context(Mono.Security.Protocol.Tls.Context)
extern "C" IL2CPP_METHOD_ATTR void CipherSuite_set_Context_m1978767807 (CipherSuite_t3414744575 * __this, Context_t3971234707 * ___value0, const RuntimeMethod* method)
{
{
Context_t3971234707 * L_0 = ___value0;
__this->set_context_14(L_0);
return;
}
}
// System.Void Mono.Security.Protocol.Tls.CipherSuite::Write(System.Byte[],System.Int32,System.Int16)
extern "C" IL2CPP_METHOD_ATTR void CipherSuite_Write_m1172814058 (CipherSuite_t3414744575 * __this, ByteU5BU5D_t4116647657* ___array0, int32_t ___offset1, int16_t ___value2, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (CipherSuite_Write_m1172814058_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
int32_t L_0 = ___offset1;
ByteU5BU5D_t4116647657* L_1 = ___array0;
if ((((int32_t)L_0) <= ((int32_t)((int32_t)il2cpp_codegen_subtract((int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_1)->max_length)))), (int32_t)2)))))
{
goto IL_0016;
}
}
{
ArgumentException_t132251570 * L_2 = (ArgumentException_t132251570 *)il2cpp_codegen_object_new(ArgumentException_t132251570_il2cpp_TypeInfo_var);
ArgumentException__ctor_m1312628991(L_2, _stringLiteral1082126080, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_2, NULL, CipherSuite_Write_m1172814058_RuntimeMethod_var);
}
IL_0016:
{
ByteU5BU5D_t4116647657* L_3 = ___array0;
int32_t L_4 = ___offset1;
int16_t L_5 = ___value2;
(L_3)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(L_4), (uint8_t)(((int32_t)((uint8_t)((int32_t)((int32_t)L_5>>(int32_t)8))))));
ByteU5BU5D_t4116647657* L_6 = ___array0;
int32_t L_7 = ___offset1;
int16_t L_8 = ___value2;
(L_6)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(((int32_t)il2cpp_codegen_add((int32_t)L_7, (int32_t)1))), (uint8_t)(((int32_t)((uint8_t)L_8))));
return;
}
}
// System.Void Mono.Security.Protocol.Tls.CipherSuite::Write(System.Byte[],System.Int32,System.UInt64)
extern "C" IL2CPP_METHOD_ATTR void CipherSuite_Write_m1841735015 (CipherSuite_t3414744575 * __this, ByteU5BU5D_t4116647657* ___array0, int32_t ___offset1, uint64_t ___value2, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (CipherSuite_Write_m1841735015_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
int32_t L_0 = ___offset1;
ByteU5BU5D_t4116647657* L_1 = ___array0;
if ((((int32_t)L_0) <= ((int32_t)((int32_t)il2cpp_codegen_subtract((int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_1)->max_length)))), (int32_t)8)))))
{
goto IL_0016;
}
}
{
ArgumentException_t132251570 * L_2 = (ArgumentException_t132251570 *)il2cpp_codegen_object_new(ArgumentException_t132251570_il2cpp_TypeInfo_var);
ArgumentException__ctor_m1312628991(L_2, _stringLiteral1082126080, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_2, NULL, CipherSuite_Write_m1841735015_RuntimeMethod_var);
}
IL_0016:
{
ByteU5BU5D_t4116647657* L_3 = ___array0;
int32_t L_4 = ___offset1;
uint64_t L_5 = ___value2;
(L_3)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(L_4), (uint8_t)(((int32_t)((uint8_t)((int64_t)((uint64_t)L_5>>((int32_t)56)))))));
ByteU5BU5D_t4116647657* L_6 = ___array0;
int32_t L_7 = ___offset1;
uint64_t L_8 = ___value2;
(L_6)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(((int32_t)il2cpp_codegen_add((int32_t)L_7, (int32_t)1))), (uint8_t)(((int32_t)((uint8_t)((int64_t)((uint64_t)L_8>>((int32_t)48)))))));
ByteU5BU5D_t4116647657* L_9 = ___array0;
int32_t L_10 = ___offset1;
uint64_t L_11 = ___value2;
(L_9)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(((int32_t)il2cpp_codegen_add((int32_t)L_10, (int32_t)2))), (uint8_t)(((int32_t)((uint8_t)((int64_t)((uint64_t)L_11>>((int32_t)40)))))));
ByteU5BU5D_t4116647657* L_12 = ___array0;
int32_t L_13 = ___offset1;
uint64_t L_14 = ___value2;
(L_12)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(((int32_t)il2cpp_codegen_add((int32_t)L_13, (int32_t)3))), (uint8_t)(((int32_t)((uint8_t)((int64_t)((uint64_t)L_14>>((int32_t)32)))))));
ByteU5BU5D_t4116647657* L_15 = ___array0;
int32_t L_16 = ___offset1;
uint64_t L_17 = ___value2;
(L_15)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(((int32_t)il2cpp_codegen_add((int32_t)L_16, (int32_t)4))), (uint8_t)(((int32_t)((uint8_t)((int64_t)((uint64_t)L_17>>((int32_t)24)))))));
ByteU5BU5D_t4116647657* L_18 = ___array0;
int32_t L_19 = ___offset1;
uint64_t L_20 = ___value2;
(L_18)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(((int32_t)il2cpp_codegen_add((int32_t)L_19, (int32_t)5))), (uint8_t)(((int32_t)((uint8_t)((int64_t)((uint64_t)L_20>>((int32_t)16)))))));
ByteU5BU5D_t4116647657* L_21 = ___array0;
int32_t L_22 = ___offset1;
uint64_t L_23 = ___value2;
(L_21)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(((int32_t)il2cpp_codegen_add((int32_t)L_22, (int32_t)6))), (uint8_t)(((int32_t)((uint8_t)((int64_t)((uint64_t)L_23>>8))))));
ByteU5BU5D_t4116647657* L_24 = ___array0;
int32_t L_25 = ___offset1;
uint64_t L_26 = ___value2;
(L_24)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(((int32_t)il2cpp_codegen_add((int32_t)L_25, (int32_t)7))), (uint8_t)(((int32_t)((uint8_t)L_26))));
return;
}
}
// System.Void Mono.Security.Protocol.Tls.CipherSuite::InitializeCipher()
extern "C" IL2CPP_METHOD_ATTR void CipherSuite_InitializeCipher_m2397698608 (CipherSuite_t3414744575 * __this, const RuntimeMethod* method)
{
{
CipherSuite_createEncryptionCipher_m2533565116(__this, /*hidden argument*/NULL);
CipherSuite_createDecryptionCipher_m1176259509(__this, /*hidden argument*/NULL);
return;
}
}
// System.Byte[] Mono.Security.Protocol.Tls.CipherSuite::EncryptRecord(System.Byte[],System.Byte[])
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* CipherSuite_EncryptRecord_m4196378593 (CipherSuite_t3414744575 * __this, ByteU5BU5D_t4116647657* ___fragment0, ByteU5BU5D_t4116647657* ___mac1, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (CipherSuite_EncryptRecord_m4196378593_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
int32_t V_0 = 0;
int32_t V_1 = 0;
ByteU5BU5D_t4116647657* V_2 = NULL;
int32_t V_3 = 0;
int32_t V_4 = 0;
{
ByteU5BU5D_t4116647657* L_0 = ___fragment0;
ByteU5BU5D_t4116647657* L_1 = ___mac1;
V_0 = ((int32_t)il2cpp_codegen_add((int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_0)->max_length)))), (int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_1)->max_length))))));
V_1 = 0;
int32_t L_2 = CipherSuite_get_CipherMode_m425550365(__this, /*hidden argument*/NULL);
if ((!(((uint32_t)L_2) == ((uint32_t)1))))
{
goto IL_003c;
}
}
{
int32_t L_3 = V_0;
V_0 = ((int32_t)il2cpp_codegen_add((int32_t)L_3, (int32_t)1));
uint8_t L_4 = __this->get_blockSize_13();
int32_t L_5 = V_0;
uint8_t L_6 = __this->get_blockSize_13();
V_1 = ((int32_t)il2cpp_codegen_subtract((int32_t)L_4, (int32_t)((int32_t)((int32_t)L_5%(int32_t)L_6))));
int32_t L_7 = V_1;
uint8_t L_8 = __this->get_blockSize_13();
if ((!(((uint32_t)L_7) == ((uint32_t)L_8))))
{
goto IL_0038;
}
}
{
V_1 = 0;
}
IL_0038:
{
int32_t L_9 = V_0;
int32_t L_10 = V_1;
V_0 = ((int32_t)il2cpp_codegen_add((int32_t)L_9, (int32_t)L_10));
}
IL_003c:
{
int32_t L_11 = V_0;
ByteU5BU5D_t4116647657* L_12 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)L_11);
V_2 = L_12;
ByteU5BU5D_t4116647657* L_13 = ___fragment0;
ByteU5BU5D_t4116647657* L_14 = V_2;
ByteU5BU5D_t4116647657* L_15 = ___fragment0;
Buffer_BlockCopy_m2884209081(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_13, 0, (RuntimeArray *)(RuntimeArray *)L_14, 0, (((int32_t)((int32_t)(((RuntimeArray *)L_15)->max_length)))), /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_16 = ___mac1;
ByteU5BU5D_t4116647657* L_17 = V_2;
ByteU5BU5D_t4116647657* L_18 = ___fragment0;
ByteU5BU5D_t4116647657* L_19 = ___mac1;
Buffer_BlockCopy_m2884209081(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_16, 0, (RuntimeArray *)(RuntimeArray *)L_17, (((int32_t)((int32_t)(((RuntimeArray *)L_18)->max_length)))), (((int32_t)((int32_t)(((RuntimeArray *)L_19)->max_length)))), /*hidden argument*/NULL);
int32_t L_20 = V_1;
if ((((int32_t)L_20) <= ((int32_t)0)))
{
goto IL_008c;
}
}
{
ByteU5BU5D_t4116647657* L_21 = ___fragment0;
ByteU5BU5D_t4116647657* L_22 = ___mac1;
V_3 = ((int32_t)il2cpp_codegen_add((int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_21)->max_length)))), (int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_22)->max_length))))));
int32_t L_23 = V_3;
V_4 = L_23;
goto IL_0080;
}
IL_0074:
{
ByteU5BU5D_t4116647657* L_24 = V_2;
int32_t L_25 = V_4;
int32_t L_26 = V_1;
(L_24)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(L_25), (uint8_t)(((int32_t)((uint8_t)L_26))));
int32_t L_27 = V_4;
V_4 = ((int32_t)il2cpp_codegen_add((int32_t)L_27, (int32_t)1));
}
IL_0080:
{
int32_t L_28 = V_4;
int32_t L_29 = V_3;
int32_t L_30 = V_1;
if ((((int32_t)L_28) < ((int32_t)((int32_t)il2cpp_codegen_add((int32_t)((int32_t)il2cpp_codegen_add((int32_t)L_29, (int32_t)L_30)), (int32_t)1)))))
{
goto IL_0074;
}
}
IL_008c:
{
RuntimeObject* L_31 = CipherSuite_get_EncryptionCipher_m3029637613(__this, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_32 = V_2;
ByteU5BU5D_t4116647657* L_33 = V_2;
ByteU5BU5D_t4116647657* L_34 = V_2;
InterfaceFuncInvoker5< int32_t, ByteU5BU5D_t4116647657*, int32_t, int32_t, ByteU5BU5D_t4116647657*, int32_t >::Invoke(1 /* System.Int32 System.Security.Cryptography.ICryptoTransform::TransformBlock(System.Byte[],System.Int32,System.Int32,System.Byte[],System.Int32) */, ICryptoTransform_t2733259762_il2cpp_TypeInfo_var, L_31, L_32, 0, (((int32_t)((int32_t)(((RuntimeArray *)L_33)->max_length)))), L_34, 0);
ByteU5BU5D_t4116647657* L_35 = V_2;
return L_35;
}
}
// System.Void Mono.Security.Protocol.Tls.CipherSuite::DecryptRecord(System.Byte[],System.Byte[]&,System.Byte[]&)
extern "C" IL2CPP_METHOD_ATTR void CipherSuite_DecryptRecord_m1495386860 (CipherSuite_t3414744575 * __this, ByteU5BU5D_t4116647657* ___fragment0, ByteU5BU5D_t4116647657** ___dcrFragment1, ByteU5BU5D_t4116647657** ___dcrMAC2, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (CipherSuite_DecryptRecord_m1495386860_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
int32_t V_0 = 0;
int32_t V_1 = 0;
{
V_0 = 0;
V_1 = 0;
RuntimeObject* L_0 = CipherSuite_get_DecryptionCipher_m2839827488(__this, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_1 = ___fragment0;
ByteU5BU5D_t4116647657* L_2 = ___fragment0;
ByteU5BU5D_t4116647657* L_3 = ___fragment0;
InterfaceFuncInvoker5< int32_t, ByteU5BU5D_t4116647657*, int32_t, int32_t, ByteU5BU5D_t4116647657*, int32_t >::Invoke(1 /* System.Int32 System.Security.Cryptography.ICryptoTransform::TransformBlock(System.Byte[],System.Int32,System.Int32,System.Byte[],System.Int32) */, ICryptoTransform_t2733259762_il2cpp_TypeInfo_var, L_0, L_1, 0, (((int32_t)((int32_t)(((RuntimeArray *)L_2)->max_length)))), L_3, 0);
int32_t L_4 = CipherSuite_get_CipherMode_m425550365(__this, /*hidden argument*/NULL);
if ((!(((uint32_t)L_4) == ((uint32_t)1))))
{
goto IL_003f;
}
}
{
ByteU5BU5D_t4116647657* L_5 = ___fragment0;
ByteU5BU5D_t4116647657* L_6 = ___fragment0;
int32_t L_7 = ((int32_t)il2cpp_codegen_subtract((int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_6)->max_length)))), (int32_t)1));
uint8_t L_8 = (L_5)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_7));
V_1 = L_8;
ByteU5BU5D_t4116647657* L_9 = ___fragment0;
int32_t L_10 = V_1;
int32_t L_11 = CipherSuite_get_HashSize_m4060916532(__this, /*hidden argument*/NULL);
V_0 = ((int32_t)il2cpp_codegen_subtract((int32_t)((int32_t)il2cpp_codegen_subtract((int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_9)->max_length)))), (int32_t)((int32_t)il2cpp_codegen_add((int32_t)L_10, (int32_t)1)))), (int32_t)L_11));
goto IL_004a;
}
IL_003f:
{
ByteU5BU5D_t4116647657* L_12 = ___fragment0;
int32_t L_13 = CipherSuite_get_HashSize_m4060916532(__this, /*hidden argument*/NULL);
V_0 = ((int32_t)il2cpp_codegen_subtract((int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_12)->max_length)))), (int32_t)L_13));
}
IL_004a:
{
ByteU5BU5D_t4116647657** L_14 = ___dcrFragment1;
int32_t L_15 = V_0;
ByteU5BU5D_t4116647657* L_16 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)L_15);
*((RuntimeObject **)(L_14)) = (RuntimeObject *)L_16;
Il2CppCodeGenWriteBarrier((RuntimeObject **)(L_14), (RuntimeObject *)L_16);
ByteU5BU5D_t4116647657** L_17 = ___dcrMAC2;
int32_t L_18 = CipherSuite_get_HashSize_m4060916532(__this, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_19 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)L_18);
*((RuntimeObject **)(L_17)) = (RuntimeObject *)L_19;
Il2CppCodeGenWriteBarrier((RuntimeObject **)(L_17), (RuntimeObject *)L_19);
ByteU5BU5D_t4116647657* L_20 = ___fragment0;
ByteU5BU5D_t4116647657** L_21 = ___dcrFragment1;
ByteU5BU5D_t4116647657* L_22 = *((ByteU5BU5D_t4116647657**)L_21);
ByteU5BU5D_t4116647657** L_23 = ___dcrFragment1;
ByteU5BU5D_t4116647657* L_24 = *((ByteU5BU5D_t4116647657**)L_23);
Buffer_BlockCopy_m2884209081(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_20, 0, (RuntimeArray *)(RuntimeArray *)L_22, 0, (((int32_t)((int32_t)(((RuntimeArray *)L_24)->max_length)))), /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_25 = ___fragment0;
ByteU5BU5D_t4116647657** L_26 = ___dcrFragment1;
ByteU5BU5D_t4116647657* L_27 = *((ByteU5BU5D_t4116647657**)L_26);
ByteU5BU5D_t4116647657** L_28 = ___dcrMAC2;
ByteU5BU5D_t4116647657* L_29 = *((ByteU5BU5D_t4116647657**)L_28);
ByteU5BU5D_t4116647657** L_30 = ___dcrMAC2;
ByteU5BU5D_t4116647657* L_31 = *((ByteU5BU5D_t4116647657**)L_30);
Buffer_BlockCopy_m2884209081(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_25, (((int32_t)((int32_t)(((RuntimeArray *)L_27)->max_length)))), (RuntimeArray *)(RuntimeArray *)L_29, 0, (((int32_t)((int32_t)(((RuntimeArray *)L_31)->max_length)))), /*hidden argument*/NULL);
return;
}
}
// System.Byte[] Mono.Security.Protocol.Tls.CipherSuite::CreatePremasterSecret()
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* CipherSuite_CreatePremasterSecret_m4264566459 (CipherSuite_t3414744575 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (CipherSuite_CreatePremasterSecret_m4264566459_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
ClientContext_t2797401965 * V_0 = NULL;
ByteU5BU5D_t4116647657* V_1 = NULL;
{
Context_t3971234707 * L_0 = __this->get_context_14();
V_0 = ((ClientContext_t2797401965 *)CastclassClass((RuntimeObject*)L_0, ClientContext_t2797401965_il2cpp_TypeInfo_var));
Context_t3971234707 * L_1 = __this->get_context_14();
ByteU5BU5D_t4116647657* L_2 = Context_GetSecureRandomBytes_m3676009387(L_1, ((int32_t)48), /*hidden argument*/NULL);
V_1 = L_2;
ByteU5BU5D_t4116647657* L_3 = V_1;
ClientContext_t2797401965 * L_4 = V_0;
int16_t L_5 = ClientContext_get_ClientHelloProtocol_m1654639078(L_4, /*hidden argument*/NULL);
(L_3)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(0), (uint8_t)(((int32_t)((uint8_t)((int32_t)((int32_t)L_5>>(int32_t)8))))));
ByteU5BU5D_t4116647657* L_6 = V_1;
ClientContext_t2797401965 * L_7 = V_0;
int16_t L_8 = ClientContext_get_ClientHelloProtocol_m1654639078(L_7, /*hidden argument*/NULL);
(L_6)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(1), (uint8_t)(((int32_t)((uint8_t)L_8))));
ByteU5BU5D_t4116647657* L_9 = V_1;
return L_9;
}
}
// System.Byte[] Mono.Security.Protocol.Tls.CipherSuite::PRF(System.Byte[],System.String,System.Byte[],System.Int32)
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* CipherSuite_PRF_m2801806009 (CipherSuite_t3414744575 * __this, ByteU5BU5D_t4116647657* ___secret0, String_t* ___label1, ByteU5BU5D_t4116647657* ___data2, int32_t ___length3, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (CipherSuite_PRF_m2801806009_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
int32_t V_0 = 0;
TlsStream_t2365453965 * V_1 = NULL;
ByteU5BU5D_t4116647657* V_2 = NULL;
ByteU5BU5D_t4116647657* V_3 = NULL;
ByteU5BU5D_t4116647657* V_4 = NULL;
ByteU5BU5D_t4116647657* V_5 = NULL;
ByteU5BU5D_t4116647657* V_6 = NULL;
ByteU5BU5D_t4116647657* V_7 = NULL;
int32_t V_8 = 0;
{
ByteU5BU5D_t4116647657* L_0 = ___secret0;
V_0 = ((int32_t)((int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_0)->max_length))))>>(int32_t)1));
ByteU5BU5D_t4116647657* L_1 = ___secret0;
if ((!(((uint32_t)((int32_t)((int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_1)->max_length))))&(int32_t)1))) == ((uint32_t)1))))
{
goto IL_0015;
}
}
{
int32_t L_2 = V_0;
V_0 = ((int32_t)il2cpp_codegen_add((int32_t)L_2, (int32_t)1));
}
IL_0015:
{
TlsStream_t2365453965 * L_3 = (TlsStream_t2365453965 *)il2cpp_codegen_object_new(TlsStream_t2365453965_il2cpp_TypeInfo_var);
TlsStream__ctor_m787793111(L_3, /*hidden argument*/NULL);
V_1 = L_3;
TlsStream_t2365453965 * L_4 = V_1;
IL2CPP_RUNTIME_CLASS_INIT(Encoding_t1523322056_il2cpp_TypeInfo_var);
Encoding_t1523322056 * L_5 = Encoding_get_ASCII_m3595602635(NULL /*static, unused*/, /*hidden argument*/NULL);
String_t* L_6 = ___label1;
ByteU5BU5D_t4116647657* L_7 = VirtFuncInvoker1< ByteU5BU5D_t4116647657*, String_t* >::Invoke(10 /* System.Byte[] System.Text.Encoding::GetBytes(System.String) */, L_5, L_6);
TlsStream_Write_m4133894341(L_4, L_7, /*hidden argument*/NULL);
TlsStream_t2365453965 * L_8 = V_1;
ByteU5BU5D_t4116647657* L_9 = ___data2;
TlsStream_Write_m4133894341(L_8, L_9, /*hidden argument*/NULL);
TlsStream_t2365453965 * L_10 = V_1;
ByteU5BU5D_t4116647657* L_11 = TlsStream_ToArray_m4177184296(L_10, /*hidden argument*/NULL);
V_2 = L_11;
TlsStream_t2365453965 * L_12 = V_1;
TlsStream_Reset_m369197964(L_12, /*hidden argument*/NULL);
int32_t L_13 = V_0;
ByteU5BU5D_t4116647657* L_14 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)L_13);
V_3 = L_14;
ByteU5BU5D_t4116647657* L_15 = ___secret0;
ByteU5BU5D_t4116647657* L_16 = V_3;
int32_t L_17 = V_0;
Buffer_BlockCopy_m2884209081(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_15, 0, (RuntimeArray *)(RuntimeArray *)L_16, 0, L_17, /*hidden argument*/NULL);
int32_t L_18 = V_0;
ByteU5BU5D_t4116647657* L_19 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)L_18);
V_4 = L_19;
ByteU5BU5D_t4116647657* L_20 = ___secret0;
ByteU5BU5D_t4116647657* L_21 = ___secret0;
int32_t L_22 = V_0;
ByteU5BU5D_t4116647657* L_23 = V_4;
int32_t L_24 = V_0;
Buffer_BlockCopy_m2884209081(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_20, ((int32_t)il2cpp_codegen_subtract((int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_21)->max_length)))), (int32_t)L_22)), (RuntimeArray *)(RuntimeArray *)L_23, 0, L_24, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_25 = V_3;
ByteU5BU5D_t4116647657* L_26 = V_2;
int32_t L_27 = ___length3;
ByteU5BU5D_t4116647657* L_28 = CipherSuite_Expand_m2729769226(__this, _stringLiteral3839139460, L_25, L_26, L_27, /*hidden argument*/NULL);
V_5 = L_28;
ByteU5BU5D_t4116647657* L_29 = V_4;
ByteU5BU5D_t4116647657* L_30 = V_2;
int32_t L_31 = ___length3;
ByteU5BU5D_t4116647657* L_32 = CipherSuite_Expand_m2729769226(__this, _stringLiteral1144609714, L_29, L_30, L_31, /*hidden argument*/NULL);
V_6 = L_32;
int32_t L_33 = ___length3;
ByteU5BU5D_t4116647657* L_34 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)L_33);
V_7 = L_34;
V_8 = 0;
goto IL_00b3;
}
IL_009c:
{
ByteU5BU5D_t4116647657* L_35 = V_7;
int32_t L_36 = V_8;
ByteU5BU5D_t4116647657* L_37 = V_5;
int32_t L_38 = V_8;
int32_t L_39 = L_38;
uint8_t L_40 = (L_37)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_39));
ByteU5BU5D_t4116647657* L_41 = V_6;
int32_t L_42 = V_8;
int32_t L_43 = L_42;
uint8_t L_44 = (L_41)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_43));
(L_35)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(L_36), (uint8_t)(((int32_t)((uint8_t)((int32_t)((int32_t)L_40^(int32_t)L_44))))));
int32_t L_45 = V_8;
V_8 = ((int32_t)il2cpp_codegen_add((int32_t)L_45, (int32_t)1));
}
IL_00b3:
{
int32_t L_46 = V_8;
ByteU5BU5D_t4116647657* L_47 = V_7;
if ((((int32_t)L_46) < ((int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_47)->max_length)))))))
{
goto IL_009c;
}
}
{
ByteU5BU5D_t4116647657* L_48 = V_7;
return L_48;
}
}
// System.Byte[] Mono.Security.Protocol.Tls.CipherSuite::Expand(System.String,System.Byte[],System.Byte[],System.Int32)
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* CipherSuite_Expand_m2729769226 (CipherSuite_t3414744575 * __this, String_t* ___hashName0, ByteU5BU5D_t4116647657* ___secret1, ByteU5BU5D_t4116647657* ___seed2, int32_t ___length3, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (CipherSuite_Expand_m2729769226_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
int32_t V_0 = 0;
int32_t V_1 = 0;
HMAC_t3689525210 * V_2 = NULL;
TlsStream_t2365453965 * V_3 = NULL;
ByteU5BU5DU5BU5D_t457913172* V_4 = NULL;
int32_t V_5 = 0;
TlsStream_t2365453965 * V_6 = NULL;
ByteU5BU5D_t4116647657* V_7 = NULL;
int32_t G_B3_0 = 0;
{
String_t* L_0 = ___hashName0;
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
bool L_1 = String_op_Equality_m920492651(NULL /*static, unused*/, L_0, _stringLiteral3839139460, /*hidden argument*/NULL);
if (!L_1)
{
goto IL_0017;
}
}
{
G_B3_0 = ((int32_t)16);
goto IL_0019;
}
IL_0017:
{
G_B3_0 = ((int32_t)20);
}
IL_0019:
{
V_0 = G_B3_0;
int32_t L_2 = ___length3;
int32_t L_3 = V_0;
V_1 = ((int32_t)((int32_t)L_2/(int32_t)L_3));
int32_t L_4 = ___length3;
int32_t L_5 = V_0;
if ((((int32_t)((int32_t)((int32_t)L_4%(int32_t)L_5))) <= ((int32_t)0)))
{
goto IL_002d;
}
}
{
int32_t L_6 = V_1;
V_1 = ((int32_t)il2cpp_codegen_add((int32_t)L_6, (int32_t)1));
}
IL_002d:
{
String_t* L_7 = ___hashName0;
ByteU5BU5D_t4116647657* L_8 = ___secret1;
HMAC_t3689525210 * L_9 = (HMAC_t3689525210 *)il2cpp_codegen_object_new(HMAC_t3689525210_il2cpp_TypeInfo_var);
HMAC__ctor_m775015853(L_9, L_7, L_8, /*hidden argument*/NULL);
V_2 = L_9;
TlsStream_t2365453965 * L_10 = (TlsStream_t2365453965 *)il2cpp_codegen_object_new(TlsStream_t2365453965_il2cpp_TypeInfo_var);
TlsStream__ctor_m787793111(L_10, /*hidden argument*/NULL);
V_3 = L_10;
int32_t L_11 = V_1;
ByteU5BU5DU5BU5D_t457913172* L_12 = (ByteU5BU5DU5BU5D_t457913172*)SZArrayNew(ByteU5BU5DU5BU5D_t457913172_il2cpp_TypeInfo_var, (uint32_t)((int32_t)il2cpp_codegen_add((int32_t)L_11, (int32_t)1)));
V_4 = L_12;
ByteU5BU5DU5BU5D_t457913172* L_13 = V_4;
ByteU5BU5D_t4116647657* L_14 = ___seed2;
ArrayElementTypeCheck (L_13, L_14);
(L_13)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(0), (ByteU5BU5D_t4116647657*)L_14);
V_5 = 1;
goto IL_00c0;
}
IL_0052:
{
TlsStream_t2365453965 * L_15 = (TlsStream_t2365453965 *)il2cpp_codegen_object_new(TlsStream_t2365453965_il2cpp_TypeInfo_var);
TlsStream__ctor_m787793111(L_15, /*hidden argument*/NULL);
V_6 = L_15;
HMAC_t3689525210 * L_16 = V_2;
ByteU5BU5DU5BU5D_t457913172* L_17 = V_4;
int32_t L_18 = V_5;
int32_t L_19 = ((int32_t)il2cpp_codegen_subtract((int32_t)L_18, (int32_t)1));
ByteU5BU5D_t4116647657* L_20 = (L_17)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_19));
ByteU5BU5DU5BU5D_t457913172* L_21 = V_4;
int32_t L_22 = V_5;
int32_t L_23 = ((int32_t)il2cpp_codegen_subtract((int32_t)L_22, (int32_t)1));
ByteU5BU5D_t4116647657* L_24 = (L_21)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_23));
HashAlgorithm_TransformFinalBlock_m3005451348(L_16, L_20, 0, (((int32_t)((int32_t)(((RuntimeArray *)L_24)->max_length)))), /*hidden argument*/NULL);
ByteU5BU5DU5BU5D_t457913172* L_25 = V_4;
int32_t L_26 = V_5;
HMAC_t3689525210 * L_27 = V_2;
ByteU5BU5D_t4116647657* L_28 = VirtFuncInvoker0< ByteU5BU5D_t4116647657* >::Invoke(9 /* System.Byte[] System.Security.Cryptography.HashAlgorithm::get_Hash() */, L_27);
ArrayElementTypeCheck (L_25, L_28);
(L_25)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(L_26), (ByteU5BU5D_t4116647657*)L_28);
TlsStream_t2365453965 * L_29 = V_6;
ByteU5BU5DU5BU5D_t457913172* L_30 = V_4;
int32_t L_31 = V_5;
int32_t L_32 = L_31;
ByteU5BU5D_t4116647657* L_33 = (L_30)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_32));
TlsStream_Write_m4133894341(L_29, L_33, /*hidden argument*/NULL);
TlsStream_t2365453965 * L_34 = V_6;
ByteU5BU5D_t4116647657* L_35 = ___seed2;
TlsStream_Write_m4133894341(L_34, L_35, /*hidden argument*/NULL);
HMAC_t3689525210 * L_36 = V_2;
TlsStream_t2365453965 * L_37 = V_6;
ByteU5BU5D_t4116647657* L_38 = TlsStream_ToArray_m4177184296(L_37, /*hidden argument*/NULL);
TlsStream_t2365453965 * L_39 = V_6;
int64_t L_40 = VirtFuncInvoker0< int64_t >::Invoke(8 /* System.Int64 Mono.Security.Protocol.Tls.TlsStream::get_Length() */, L_39);
HashAlgorithm_TransformFinalBlock_m3005451348(L_36, L_38, 0, (((int32_t)((int32_t)L_40))), /*hidden argument*/NULL);
TlsStream_t2365453965 * L_41 = V_3;
HMAC_t3689525210 * L_42 = V_2;
ByteU5BU5D_t4116647657* L_43 = VirtFuncInvoker0< ByteU5BU5D_t4116647657* >::Invoke(9 /* System.Byte[] System.Security.Cryptography.HashAlgorithm::get_Hash() */, L_42);
TlsStream_Write_m4133894341(L_41, L_43, /*hidden argument*/NULL);
TlsStream_t2365453965 * L_44 = V_6;
TlsStream_Reset_m369197964(L_44, /*hidden argument*/NULL);
int32_t L_45 = V_5;
V_5 = ((int32_t)il2cpp_codegen_add((int32_t)L_45, (int32_t)1));
}
IL_00c0:
{
int32_t L_46 = V_5;
int32_t L_47 = V_1;
if ((((int32_t)L_46) <= ((int32_t)L_47)))
{
goto IL_0052;
}
}
{
int32_t L_48 = ___length3;
ByteU5BU5D_t4116647657* L_49 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)L_48);
V_7 = L_49;
TlsStream_t2365453965 * L_50 = V_3;
ByteU5BU5D_t4116647657* L_51 = TlsStream_ToArray_m4177184296(L_50, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_52 = V_7;
ByteU5BU5D_t4116647657* L_53 = V_7;
Buffer_BlockCopy_m2884209081(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_51, 0, (RuntimeArray *)(RuntimeArray *)L_52, 0, (((int32_t)((int32_t)(((RuntimeArray *)L_53)->max_length)))), /*hidden argument*/NULL);
TlsStream_t2365453965 * L_54 = V_3;
TlsStream_Reset_m369197964(L_54, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_55 = V_7;
return L_55;
}
}
// System.Void Mono.Security.Protocol.Tls.CipherSuite::createEncryptionCipher()
extern "C" IL2CPP_METHOD_ATTR void CipherSuite_createEncryptionCipher_m2533565116 (CipherSuite_t3414744575 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (CipherSuite_createEncryptionCipher_m2533565116_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
int32_t V_0 = 0;
{
int32_t L_0 = __this->get_cipherAlgorithmType_3();
V_0 = L_0;
int32_t L_1 = V_0;
switch (L_1)
{
case 0:
{
goto IL_002e;
}
case 1:
{
goto IL_007e;
}
case 2:
{
goto IL_003e;
}
case 3:
{
goto IL_004e;
}
case 4:
{
goto IL_006e;
}
case 5:
{
goto IL_007e;
}
case 6:
{
goto IL_005e;
}
}
}
{
goto IL_007e;
}
IL_002e:
{
IL2CPP_RUNTIME_CLASS_INIT(DES_t821106792_il2cpp_TypeInfo_var);
DES_t821106792 * L_2 = DES_Create_m1258183099(NULL /*static, unused*/, /*hidden argument*/NULL);
__this->set_encryptionAlgorithm_15(L_2);
goto IL_007e;
}
IL_003e:
{
RC2_t3167825714 * L_3 = RC2_Create_m2516417038(NULL /*static, unused*/, /*hidden argument*/NULL);
__this->set_encryptionAlgorithm_15(L_3);
goto IL_007e;
}
IL_004e:
{
ARC4Managed_t2641858452 * L_4 = (ARC4Managed_t2641858452 *)il2cpp_codegen_object_new(ARC4Managed_t2641858452_il2cpp_TypeInfo_var);
ARC4Managed__ctor_m2553537404(L_4, /*hidden argument*/NULL);
__this->set_encryptionAlgorithm_15(L_4);
goto IL_007e;
}
IL_005e:
{
TripleDES_t92303514 * L_5 = TripleDES_Create_m3761371613(NULL /*static, unused*/, /*hidden argument*/NULL);
__this->set_encryptionAlgorithm_15(L_5);
goto IL_007e;
}
IL_006e:
{
Rijndael_t2986313634 * L_6 = Rijndael_Create_m3053077028(NULL /*static, unused*/, /*hidden argument*/NULL);
__this->set_encryptionAlgorithm_15(L_6);
goto IL_007e;
}
IL_007e:
{
int32_t L_7 = __this->get_cipherMode_7();
if ((!(((uint32_t)L_7) == ((uint32_t)1))))
{
goto IL_00cd;
}
}
{
SymmetricAlgorithm_t4254223087 * L_8 = __this->get_encryptionAlgorithm_15();
int32_t L_9 = __this->get_cipherMode_7();
VirtActionInvoker1< int32_t >::Invoke(17 /* System.Void System.Security.Cryptography.SymmetricAlgorithm::set_Mode(System.Security.Cryptography.CipherMode) */, L_8, L_9);
SymmetricAlgorithm_t4254223087 * L_10 = __this->get_encryptionAlgorithm_15();
VirtActionInvoker1< int32_t >::Invoke(19 /* System.Void System.Security.Cryptography.SymmetricAlgorithm::set_Padding(System.Security.Cryptography.PaddingMode) */, L_10, 1);
SymmetricAlgorithm_t4254223087 * L_11 = __this->get_encryptionAlgorithm_15();
uint8_t L_12 = __this->get_expandedKeyMaterialSize_10();
VirtActionInvoker1< int32_t >::Invoke(14 /* System.Void System.Security.Cryptography.SymmetricAlgorithm::set_KeySize(System.Int32) */, L_11, ((int32_t)il2cpp_codegen_multiply((int32_t)L_12, (int32_t)8)));
SymmetricAlgorithm_t4254223087 * L_13 = __this->get_encryptionAlgorithm_15();
uint8_t L_14 = __this->get_blockSize_13();
VirtActionInvoker1< int32_t >::Invoke(7 /* System.Void System.Security.Cryptography.SymmetricAlgorithm::set_BlockSize(System.Int32) */, L_13, ((int32_t)il2cpp_codegen_multiply((int32_t)L_14, (int32_t)8)));
}
IL_00cd:
{
Context_t3971234707 * L_15 = __this->get_context_14();
if (!((ClientContext_t2797401965 *)IsInstClass((RuntimeObject*)L_15, ClientContext_t2797401965_il2cpp_TypeInfo_var)))
{
goto IL_010e;
}
}
{
SymmetricAlgorithm_t4254223087 * L_16 = __this->get_encryptionAlgorithm_15();
Context_t3971234707 * L_17 = __this->get_context_14();
ByteU5BU5D_t4116647657* L_18 = Context_get_ClientWriteKey_m3174706656(L_17, /*hidden argument*/NULL);
VirtActionInvoker1< ByteU5BU5D_t4116647657* >::Invoke(12 /* System.Void System.Security.Cryptography.SymmetricAlgorithm::set_Key(System.Byte[]) */, L_16, L_18);
SymmetricAlgorithm_t4254223087 * L_19 = __this->get_encryptionAlgorithm_15();
Context_t3971234707 * L_20 = __this->get_context_14();
ByteU5BU5D_t4116647657* L_21 = Context_get_ClientWriteIV_m1729804632(L_20, /*hidden argument*/NULL);
VirtActionInvoker1< ByteU5BU5D_t4116647657* >::Invoke(10 /* System.Void System.Security.Cryptography.SymmetricAlgorithm::set_IV(System.Byte[]) */, L_19, L_21);
goto IL_013a;
}
IL_010e:
{
SymmetricAlgorithm_t4254223087 * L_22 = __this->get_encryptionAlgorithm_15();
Context_t3971234707 * L_23 = __this->get_context_14();
ByteU5BU5D_t4116647657* L_24 = Context_get_ServerWriteKey_m2199131569(L_23, /*hidden argument*/NULL);
VirtActionInvoker1< ByteU5BU5D_t4116647657* >::Invoke(12 /* System.Void System.Security.Cryptography.SymmetricAlgorithm::set_Key(System.Byte[]) */, L_22, L_24);
SymmetricAlgorithm_t4254223087 * L_25 = __this->get_encryptionAlgorithm_15();
Context_t3971234707 * L_26 = __this->get_context_14();
ByteU5BU5D_t4116647657* L_27 = Context_get_ServerWriteIV_m1839374659(L_26, /*hidden argument*/NULL);
VirtActionInvoker1< ByteU5BU5D_t4116647657* >::Invoke(10 /* System.Void System.Security.Cryptography.SymmetricAlgorithm::set_IV(System.Byte[]) */, L_25, L_27);
}
IL_013a:
{
SymmetricAlgorithm_t4254223087 * L_28 = __this->get_encryptionAlgorithm_15();
RuntimeObject* L_29 = VirtFuncInvoker0< RuntimeObject* >::Invoke(22 /* System.Security.Cryptography.ICryptoTransform System.Security.Cryptography.SymmetricAlgorithm::CreateEncryptor() */, L_28);
__this->set_encryptionCipher_16(L_29);
Context_t3971234707 * L_30 = __this->get_context_14();
if (!((ClientContext_t2797401965 *)IsInstClass((RuntimeObject*)L_30, ClientContext_t2797401965_il2cpp_TypeInfo_var)))
{
goto IL_0181;
}
}
{
String_t* L_31 = CipherSuite_get_HashAlgorithmName_m3758129154(__this, /*hidden argument*/NULL);
Context_t3971234707 * L_32 = __this->get_context_14();
SecurityParameters_t2199972650 * L_33 = Context_get_Negotiating_m2044579817(L_32, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_34 = SecurityParameters_get_ClientWriteMAC_m225554750(L_33, /*hidden argument*/NULL);
HMAC_t3689525210 * L_35 = (HMAC_t3689525210 *)il2cpp_codegen_object_new(HMAC_t3689525210_il2cpp_TypeInfo_var);
HMAC__ctor_m775015853(L_35, L_31, L_34, /*hidden argument*/NULL);
__this->set_clientHMAC_19(L_35);
goto IL_01a2;
}
IL_0181:
{
String_t* L_36 = CipherSuite_get_HashAlgorithmName_m3758129154(__this, /*hidden argument*/NULL);
Context_t3971234707 * L_37 = __this->get_context_14();
SecurityParameters_t2199972650 * L_38 = Context_get_Negotiating_m2044579817(L_37, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_39 = SecurityParameters_get_ServerWriteMAC_m3430427271(L_38, /*hidden argument*/NULL);
HMAC_t3689525210 * L_40 = (HMAC_t3689525210 *)il2cpp_codegen_object_new(HMAC_t3689525210_il2cpp_TypeInfo_var);
HMAC__ctor_m775015853(L_40, L_36, L_39, /*hidden argument*/NULL);
__this->set_serverHMAC_20(L_40);
}
IL_01a2:
{
return;
}
}
// System.Void Mono.Security.Protocol.Tls.CipherSuite::createDecryptionCipher()
extern "C" IL2CPP_METHOD_ATTR void CipherSuite_createDecryptionCipher_m1176259509 (CipherSuite_t3414744575 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (CipherSuite_createDecryptionCipher_m1176259509_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
int32_t V_0 = 0;
{
int32_t L_0 = __this->get_cipherAlgorithmType_3();
V_0 = L_0;
int32_t L_1 = V_0;
switch (L_1)
{
case 0:
{
goto IL_002e;
}
case 1:
{
goto IL_007e;
}
case 2:
{
goto IL_003e;
}
case 3:
{
goto IL_004e;
}
case 4:
{
goto IL_006e;
}
case 5:
{
goto IL_007e;
}
case 6:
{
goto IL_005e;
}
}
}
{
goto IL_007e;
}
IL_002e:
{
IL2CPP_RUNTIME_CLASS_INIT(DES_t821106792_il2cpp_TypeInfo_var);
DES_t821106792 * L_2 = DES_Create_m1258183099(NULL /*static, unused*/, /*hidden argument*/NULL);
__this->set_decryptionAlgorithm_17(L_2);
goto IL_007e;
}
IL_003e:
{
RC2_t3167825714 * L_3 = RC2_Create_m2516417038(NULL /*static, unused*/, /*hidden argument*/NULL);
__this->set_decryptionAlgorithm_17(L_3);
goto IL_007e;
}
IL_004e:
{
ARC4Managed_t2641858452 * L_4 = (ARC4Managed_t2641858452 *)il2cpp_codegen_object_new(ARC4Managed_t2641858452_il2cpp_TypeInfo_var);
ARC4Managed__ctor_m2553537404(L_4, /*hidden argument*/NULL);
__this->set_decryptionAlgorithm_17(L_4);
goto IL_007e;
}
IL_005e:
{
TripleDES_t92303514 * L_5 = TripleDES_Create_m3761371613(NULL /*static, unused*/, /*hidden argument*/NULL);
__this->set_decryptionAlgorithm_17(L_5);
goto IL_007e;
}
IL_006e:
{
Rijndael_t2986313634 * L_6 = Rijndael_Create_m3053077028(NULL /*static, unused*/, /*hidden argument*/NULL);
__this->set_decryptionAlgorithm_17(L_6);
goto IL_007e;
}
IL_007e:
{
int32_t L_7 = __this->get_cipherMode_7();
if ((!(((uint32_t)L_7) == ((uint32_t)1))))
{
goto IL_00cd;
}
}
{
SymmetricAlgorithm_t4254223087 * L_8 = __this->get_decryptionAlgorithm_17();
int32_t L_9 = __this->get_cipherMode_7();
VirtActionInvoker1< int32_t >::Invoke(17 /* System.Void System.Security.Cryptography.SymmetricAlgorithm::set_Mode(System.Security.Cryptography.CipherMode) */, L_8, L_9);
SymmetricAlgorithm_t4254223087 * L_10 = __this->get_decryptionAlgorithm_17();
VirtActionInvoker1< int32_t >::Invoke(19 /* System.Void System.Security.Cryptography.SymmetricAlgorithm::set_Padding(System.Security.Cryptography.PaddingMode) */, L_10, 1);
SymmetricAlgorithm_t4254223087 * L_11 = __this->get_decryptionAlgorithm_17();
uint8_t L_12 = __this->get_expandedKeyMaterialSize_10();
VirtActionInvoker1< int32_t >::Invoke(14 /* System.Void System.Security.Cryptography.SymmetricAlgorithm::set_KeySize(System.Int32) */, L_11, ((int32_t)il2cpp_codegen_multiply((int32_t)L_12, (int32_t)8)));
SymmetricAlgorithm_t4254223087 * L_13 = __this->get_decryptionAlgorithm_17();
uint8_t L_14 = __this->get_blockSize_13();
VirtActionInvoker1< int32_t >::Invoke(7 /* System.Void System.Security.Cryptography.SymmetricAlgorithm::set_BlockSize(System.Int32) */, L_13, ((int32_t)il2cpp_codegen_multiply((int32_t)L_14, (int32_t)8)));
}
IL_00cd:
{
Context_t3971234707 * L_15 = __this->get_context_14();
if (!((ClientContext_t2797401965 *)IsInstClass((RuntimeObject*)L_15, ClientContext_t2797401965_il2cpp_TypeInfo_var)))
{
goto IL_010e;
}
}
{
SymmetricAlgorithm_t4254223087 * L_16 = __this->get_decryptionAlgorithm_17();
Context_t3971234707 * L_17 = __this->get_context_14();
ByteU5BU5D_t4116647657* L_18 = Context_get_ServerWriteKey_m2199131569(L_17, /*hidden argument*/NULL);
VirtActionInvoker1< ByteU5BU5D_t4116647657* >::Invoke(12 /* System.Void System.Security.Cryptography.SymmetricAlgorithm::set_Key(System.Byte[]) */, L_16, L_18);
SymmetricAlgorithm_t4254223087 * L_19 = __this->get_decryptionAlgorithm_17();
Context_t3971234707 * L_20 = __this->get_context_14();
ByteU5BU5D_t4116647657* L_21 = Context_get_ServerWriteIV_m1839374659(L_20, /*hidden argument*/NULL);
VirtActionInvoker1< ByteU5BU5D_t4116647657* >::Invoke(10 /* System.Void System.Security.Cryptography.SymmetricAlgorithm::set_IV(System.Byte[]) */, L_19, L_21);
goto IL_013a;
}
IL_010e:
{
SymmetricAlgorithm_t4254223087 * L_22 = __this->get_decryptionAlgorithm_17();
Context_t3971234707 * L_23 = __this->get_context_14();
ByteU5BU5D_t4116647657* L_24 = Context_get_ClientWriteKey_m3174706656(L_23, /*hidden argument*/NULL);
VirtActionInvoker1< ByteU5BU5D_t4116647657* >::Invoke(12 /* System.Void System.Security.Cryptography.SymmetricAlgorithm::set_Key(System.Byte[]) */, L_22, L_24);
SymmetricAlgorithm_t4254223087 * L_25 = __this->get_decryptionAlgorithm_17();
Context_t3971234707 * L_26 = __this->get_context_14();
ByteU5BU5D_t4116647657* L_27 = Context_get_ClientWriteIV_m1729804632(L_26, /*hidden argument*/NULL);
VirtActionInvoker1< ByteU5BU5D_t4116647657* >::Invoke(10 /* System.Void System.Security.Cryptography.SymmetricAlgorithm::set_IV(System.Byte[]) */, L_25, L_27);
}
IL_013a:
{
SymmetricAlgorithm_t4254223087 * L_28 = __this->get_decryptionAlgorithm_17();
RuntimeObject* L_29 = VirtFuncInvoker0< RuntimeObject* >::Invoke(20 /* System.Security.Cryptography.ICryptoTransform System.Security.Cryptography.SymmetricAlgorithm::CreateDecryptor() */, L_28);
__this->set_decryptionCipher_18(L_29);
Context_t3971234707 * L_30 = __this->get_context_14();
if (!((ClientContext_t2797401965 *)IsInstClass((RuntimeObject*)L_30, ClientContext_t2797401965_il2cpp_TypeInfo_var)))
{
goto IL_0181;
}
}
{
String_t* L_31 = CipherSuite_get_HashAlgorithmName_m3758129154(__this, /*hidden argument*/NULL);
Context_t3971234707 * L_32 = __this->get_context_14();
SecurityParameters_t2199972650 * L_33 = Context_get_Negotiating_m2044579817(L_32, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_34 = SecurityParameters_get_ServerWriteMAC_m3430427271(L_33, /*hidden argument*/NULL);
HMAC_t3689525210 * L_35 = (HMAC_t3689525210 *)il2cpp_codegen_object_new(HMAC_t3689525210_il2cpp_TypeInfo_var);
HMAC__ctor_m775015853(L_35, L_31, L_34, /*hidden argument*/NULL);
__this->set_serverHMAC_20(L_35);
goto IL_01a2;
}
IL_0181:
{
String_t* L_36 = CipherSuite_get_HashAlgorithmName_m3758129154(__this, /*hidden argument*/NULL);
Context_t3971234707 * L_37 = __this->get_context_14();
SecurityParameters_t2199972650 * L_38 = Context_get_Negotiating_m2044579817(L_37, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_39 = SecurityParameters_get_ClientWriteMAC_m225554750(L_38, /*hidden argument*/NULL);
HMAC_t3689525210 * L_40 = (HMAC_t3689525210 *)il2cpp_codegen_object_new(HMAC_t3689525210_il2cpp_TypeInfo_var);
HMAC__ctor_m775015853(L_40, L_36, L_39, /*hidden argument*/NULL);
__this->set_clientHMAC_19(L_40);
}
IL_01a2:
{
return;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void Mono.Security.Protocol.Tls.CipherSuiteCollection::.ctor(Mono.Security.Protocol.Tls.SecurityProtocolType)
extern "C" IL2CPP_METHOD_ATTR void CipherSuiteCollection__ctor_m384434353 (CipherSuiteCollection_t1129639304 * __this, int32_t ___protocol0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (CipherSuiteCollection__ctor_m384434353_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
Object__ctor_m297566312(__this, /*hidden argument*/NULL);
int32_t L_0 = ___protocol0;
__this->set_protocol_1(L_0);
ArrayList_t2718874744 * L_1 = (ArrayList_t2718874744 *)il2cpp_codegen_object_new(ArrayList_t2718874744_il2cpp_TypeInfo_var);
ArrayList__ctor_m4254721275(L_1, /*hidden argument*/NULL);
__this->set_cipherSuites_0(L_1);
return;
}
}
// System.Object Mono.Security.Protocol.Tls.CipherSuiteCollection::System.Collections.IList.get_Item(System.Int32)
extern "C" IL2CPP_METHOD_ATTR RuntimeObject * CipherSuiteCollection_System_Collections_IList_get_Item_m2175128671 (CipherSuiteCollection_t1129639304 * __this, int32_t ___index0, const RuntimeMethod* method)
{
{
int32_t L_0 = ___index0;
CipherSuite_t3414744575 * L_1 = CipherSuiteCollection_get_Item_m4188309062(__this, L_0, /*hidden argument*/NULL);
return L_1;
}
}
// System.Void Mono.Security.Protocol.Tls.CipherSuiteCollection::System.Collections.IList.set_Item(System.Int32,System.Object)
extern "C" IL2CPP_METHOD_ATTR void CipherSuiteCollection_System_Collections_IList_set_Item_m904255570 (CipherSuiteCollection_t1129639304 * __this, int32_t ___index0, RuntimeObject * ___value1, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (CipherSuiteCollection_System_Collections_IList_set_Item_m904255570_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
int32_t L_0 = ___index0;
RuntimeObject * L_1 = ___value1;
CipherSuiteCollection_set_Item_m2392524001(__this, L_0, ((CipherSuite_t3414744575 *)CastclassClass((RuntimeObject*)L_1, CipherSuite_t3414744575_il2cpp_TypeInfo_var)), /*hidden argument*/NULL);
return;
}
}
// System.Boolean Mono.Security.Protocol.Tls.CipherSuiteCollection::System.Collections.ICollection.get_IsSynchronized()
extern "C" IL2CPP_METHOD_ATTR bool CipherSuiteCollection_System_Collections_ICollection_get_IsSynchronized_m3953211662 (CipherSuiteCollection_t1129639304 * __this, const RuntimeMethod* method)
{
{
ArrayList_t2718874744 * L_0 = __this->get_cipherSuites_0();
bool L_1 = VirtFuncInvoker0< bool >::Invoke(28 /* System.Boolean System.Collections.ArrayList::get_IsSynchronized() */, L_0);
return L_1;
}
}
// System.Object Mono.Security.Protocol.Tls.CipherSuiteCollection::System.Collections.ICollection.get_SyncRoot()
extern "C" IL2CPP_METHOD_ATTR RuntimeObject * CipherSuiteCollection_System_Collections_ICollection_get_SyncRoot_m630394386 (CipherSuiteCollection_t1129639304 * __this, const RuntimeMethod* method)
{
{
ArrayList_t2718874744 * L_0 = __this->get_cipherSuites_0();
RuntimeObject * L_1 = VirtFuncInvoker0< RuntimeObject * >::Invoke(29 /* System.Object System.Collections.ArrayList::get_SyncRoot() */, L_0);
return L_1;
}
}
// System.Collections.IEnumerator Mono.Security.Protocol.Tls.CipherSuiteCollection::System.Collections.IEnumerable.GetEnumerator()
extern "C" IL2CPP_METHOD_ATTR RuntimeObject* CipherSuiteCollection_System_Collections_IEnumerable_GetEnumerator_m3240848888 (CipherSuiteCollection_t1129639304 * __this, const RuntimeMethod* method)
{
{
ArrayList_t2718874744 * L_0 = __this->get_cipherSuites_0();
RuntimeObject* L_1 = VirtFuncInvoker0< RuntimeObject* >::Invoke(43 /* System.Collections.IEnumerator System.Collections.ArrayList::GetEnumerator() */, L_0);
return L_1;
}
}
// System.Boolean Mono.Security.Protocol.Tls.CipherSuiteCollection::System.Collections.IList.Contains(System.Object)
extern "C" IL2CPP_METHOD_ATTR bool CipherSuiteCollection_System_Collections_IList_Contains_m1220133031 (CipherSuiteCollection_t1129639304 * __this, RuntimeObject * ___value0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (CipherSuiteCollection_System_Collections_IList_Contains_m1220133031_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
ArrayList_t2718874744 * L_0 = __this->get_cipherSuites_0();
RuntimeObject * L_1 = ___value0;
bool L_2 = VirtFuncInvoker1< bool, RuntimeObject * >::Invoke(32 /* System.Boolean System.Collections.ArrayList::Contains(System.Object) */, L_0, ((CipherSuite_t3414744575 *)IsInstClass((RuntimeObject*)L_1, CipherSuite_t3414744575_il2cpp_TypeInfo_var)));
return L_2;
}
}
// System.Int32 Mono.Security.Protocol.Tls.CipherSuiteCollection::System.Collections.IList.IndexOf(System.Object)
extern "C" IL2CPP_METHOD_ATTR int32_t CipherSuiteCollection_System_Collections_IList_IndexOf_m1361500977 (CipherSuiteCollection_t1129639304 * __this, RuntimeObject * ___value0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (CipherSuiteCollection_System_Collections_IList_IndexOf_m1361500977_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
ArrayList_t2718874744 * L_0 = __this->get_cipherSuites_0();
RuntimeObject * L_1 = ___value0;
int32_t L_2 = VirtFuncInvoker1< int32_t, RuntimeObject * >::Invoke(33 /* System.Int32 System.Collections.ArrayList::IndexOf(System.Object) */, L_0, ((CipherSuite_t3414744575 *)IsInstClass((RuntimeObject*)L_1, CipherSuite_t3414744575_il2cpp_TypeInfo_var)));
return L_2;
}
}
// System.Void Mono.Security.Protocol.Tls.CipherSuiteCollection::System.Collections.IList.Insert(System.Int32,System.Object)
extern "C" IL2CPP_METHOD_ATTR void CipherSuiteCollection_System_Collections_IList_Insert_m1567261820 (CipherSuiteCollection_t1129639304 * __this, int32_t ___index0, RuntimeObject * ___value1, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (CipherSuiteCollection_System_Collections_IList_Insert_m1567261820_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
ArrayList_t2718874744 * L_0 = __this->get_cipherSuites_0();
int32_t L_1 = ___index0;
RuntimeObject * L_2 = ___value1;
VirtActionInvoker2< int32_t, RuntimeObject * >::Invoke(36 /* System.Void System.Collections.ArrayList::Insert(System.Int32,System.Object) */, L_0, L_1, ((CipherSuite_t3414744575 *)IsInstClass((RuntimeObject*)L_2, CipherSuite_t3414744575_il2cpp_TypeInfo_var)));
return;
}
}
// System.Void Mono.Security.Protocol.Tls.CipherSuiteCollection::System.Collections.IList.Remove(System.Object)
extern "C" IL2CPP_METHOD_ATTR void CipherSuiteCollection_System_Collections_IList_Remove_m2463347416 (CipherSuiteCollection_t1129639304 * __this, RuntimeObject * ___value0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (CipherSuiteCollection_System_Collections_IList_Remove_m2463347416_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
ArrayList_t2718874744 * L_0 = __this->get_cipherSuites_0();
RuntimeObject * L_1 = ___value0;
VirtActionInvoker1< RuntimeObject * >::Invoke(38 /* System.Void System.Collections.ArrayList::Remove(System.Object) */, L_0, ((CipherSuite_t3414744575 *)IsInstClass((RuntimeObject*)L_1, CipherSuite_t3414744575_il2cpp_TypeInfo_var)));
return;
}
}
// System.Void Mono.Security.Protocol.Tls.CipherSuiteCollection::System.Collections.IList.RemoveAt(System.Int32)
extern "C" IL2CPP_METHOD_ATTR void CipherSuiteCollection_System_Collections_IList_RemoveAt_m2600067414 (CipherSuiteCollection_t1129639304 * __this, int32_t ___index0, const RuntimeMethod* method)
{
{
ArrayList_t2718874744 * L_0 = __this->get_cipherSuites_0();
int32_t L_1 = ___index0;
VirtActionInvoker1< int32_t >::Invoke(39 /* System.Void System.Collections.ArrayList::RemoveAt(System.Int32) */, L_0, L_1);
return;
}
}
// System.Int32 Mono.Security.Protocol.Tls.CipherSuiteCollection::System.Collections.IList.Add(System.Object)
extern "C" IL2CPP_METHOD_ATTR int32_t CipherSuiteCollection_System_Collections_IList_Add_m1178326810 (CipherSuiteCollection_t1129639304 * __this, RuntimeObject * ___value0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (CipherSuiteCollection_System_Collections_IList_Add_m1178326810_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
ArrayList_t2718874744 * L_0 = __this->get_cipherSuites_0();
RuntimeObject * L_1 = ___value0;
int32_t L_2 = VirtFuncInvoker1< int32_t, RuntimeObject * >::Invoke(30 /* System.Int32 System.Collections.ArrayList::Add(System.Object) */, L_0, ((CipherSuite_t3414744575 *)IsInstClass((RuntimeObject*)L_1, CipherSuite_t3414744575_il2cpp_TypeInfo_var)));
return L_2;
}
}
// Mono.Security.Protocol.Tls.CipherSuite Mono.Security.Protocol.Tls.CipherSuiteCollection::get_Item(System.String)
extern "C" IL2CPP_METHOD_ATTR CipherSuite_t3414744575 * CipherSuiteCollection_get_Item_m2791953484 (CipherSuiteCollection_t1129639304 * __this, String_t* ___name0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (CipherSuiteCollection_get_Item_m2791953484_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
ArrayList_t2718874744 * L_0 = __this->get_cipherSuites_0();
String_t* L_1 = ___name0;
int32_t L_2 = CipherSuiteCollection_IndexOf_m2232557119(__this, L_1, /*hidden argument*/NULL);
RuntimeObject * L_3 = VirtFuncInvoker1< RuntimeObject *, int32_t >::Invoke(21 /* System.Object System.Collections.ArrayList::get_Item(System.Int32) */, L_0, L_2);
return ((CipherSuite_t3414744575 *)CastclassClass((RuntimeObject*)L_3, CipherSuite_t3414744575_il2cpp_TypeInfo_var));
}
}
// Mono.Security.Protocol.Tls.CipherSuite Mono.Security.Protocol.Tls.CipherSuiteCollection::get_Item(System.Int32)
extern "C" IL2CPP_METHOD_ATTR CipherSuite_t3414744575 * CipherSuiteCollection_get_Item_m4188309062 (CipherSuiteCollection_t1129639304 * __this, int32_t ___index0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (CipherSuiteCollection_get_Item_m4188309062_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
ArrayList_t2718874744 * L_0 = __this->get_cipherSuites_0();
int32_t L_1 = ___index0;
RuntimeObject * L_2 = VirtFuncInvoker1< RuntimeObject *, int32_t >::Invoke(21 /* System.Object System.Collections.ArrayList::get_Item(System.Int32) */, L_0, L_1);
return ((CipherSuite_t3414744575 *)CastclassClass((RuntimeObject*)L_2, CipherSuite_t3414744575_il2cpp_TypeInfo_var));
}
}
// System.Void Mono.Security.Protocol.Tls.CipherSuiteCollection::set_Item(System.Int32,Mono.Security.Protocol.Tls.CipherSuite)
extern "C" IL2CPP_METHOD_ATTR void CipherSuiteCollection_set_Item_m2392524001 (CipherSuiteCollection_t1129639304 * __this, int32_t ___index0, CipherSuite_t3414744575 * ___value1, const RuntimeMethod* method)
{
{
ArrayList_t2718874744 * L_0 = __this->get_cipherSuites_0();
int32_t L_1 = ___index0;
CipherSuite_t3414744575 * L_2 = ___value1;
VirtActionInvoker2< int32_t, RuntimeObject * >::Invoke(22 /* System.Void System.Collections.ArrayList::set_Item(System.Int32,System.Object) */, L_0, L_1, L_2);
return;
}
}
// Mono.Security.Protocol.Tls.CipherSuite Mono.Security.Protocol.Tls.CipherSuiteCollection::get_Item(System.Int16)
extern "C" IL2CPP_METHOD_ATTR CipherSuite_t3414744575 * CipherSuiteCollection_get_Item_m3790183696 (CipherSuiteCollection_t1129639304 * __this, int16_t ___code0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (CipherSuiteCollection_get_Item_m3790183696_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
ArrayList_t2718874744 * L_0 = __this->get_cipherSuites_0();
int16_t L_1 = ___code0;
int32_t L_2 = CipherSuiteCollection_IndexOf_m2770510321(__this, L_1, /*hidden argument*/NULL);
RuntimeObject * L_3 = VirtFuncInvoker1< RuntimeObject *, int32_t >::Invoke(21 /* System.Object System.Collections.ArrayList::get_Item(System.Int32) */, L_0, L_2);
return ((CipherSuite_t3414744575 *)CastclassClass((RuntimeObject*)L_3, CipherSuite_t3414744575_il2cpp_TypeInfo_var));
}
}
// System.Int32 Mono.Security.Protocol.Tls.CipherSuiteCollection::get_Count()
extern "C" IL2CPP_METHOD_ATTR int32_t CipherSuiteCollection_get_Count_m4271692531 (CipherSuiteCollection_t1129639304 * __this, const RuntimeMethod* method)
{
{
ArrayList_t2718874744 * L_0 = __this->get_cipherSuites_0();
int32_t L_1 = VirtFuncInvoker0< int32_t >::Invoke(23 /* System.Int32 System.Collections.ArrayList::get_Count() */, L_0);
return L_1;
}
}
// System.Boolean Mono.Security.Protocol.Tls.CipherSuiteCollection::get_IsFixedSize()
extern "C" IL2CPP_METHOD_ATTR bool CipherSuiteCollection_get_IsFixedSize_m3127823890 (CipherSuiteCollection_t1129639304 * __this, const RuntimeMethod* method)
{
{
ArrayList_t2718874744 * L_0 = __this->get_cipherSuites_0();
bool L_1 = VirtFuncInvoker0< bool >::Invoke(26 /* System.Boolean System.Collections.ArrayList::get_IsFixedSize() */, L_0);
return L_1;
}
}
// System.Boolean Mono.Security.Protocol.Tls.CipherSuiteCollection::get_IsReadOnly()
extern "C" IL2CPP_METHOD_ATTR bool CipherSuiteCollection_get_IsReadOnly_m2263525365 (CipherSuiteCollection_t1129639304 * __this, const RuntimeMethod* method)
{
{
ArrayList_t2718874744 * L_0 = __this->get_cipherSuites_0();
bool L_1 = VirtFuncInvoker0< bool >::Invoke(27 /* System.Boolean System.Collections.ArrayList::get_IsReadOnly() */, L_0);
return L_1;
}
}
// System.Void Mono.Security.Protocol.Tls.CipherSuiteCollection::CopyTo(System.Array,System.Int32)
extern "C" IL2CPP_METHOD_ATTR void CipherSuiteCollection_CopyTo_m3857518994 (CipherSuiteCollection_t1129639304 * __this, RuntimeArray * ___array0, int32_t ___index1, const RuntimeMethod* method)
{
{
ArrayList_t2718874744 * L_0 = __this->get_cipherSuites_0();
RuntimeArray * L_1 = ___array0;
int32_t L_2 = ___index1;
VirtActionInvoker2< RuntimeArray *, int32_t >::Invoke(41 /* System.Void System.Collections.ArrayList::CopyTo(System.Array,System.Int32) */, L_0, L_1, L_2);
return;
}
}
// System.Void Mono.Security.Protocol.Tls.CipherSuiteCollection::Clear()
extern "C" IL2CPP_METHOD_ATTR void CipherSuiteCollection_Clear_m2642701260 (CipherSuiteCollection_t1129639304 * __this, const RuntimeMethod* method)
{
{
ArrayList_t2718874744 * L_0 = __this->get_cipherSuites_0();
VirtActionInvoker0::Invoke(31 /* System.Void System.Collections.ArrayList::Clear() */, L_0);
return;
}
}
// System.Int32 Mono.Security.Protocol.Tls.CipherSuiteCollection::IndexOf(System.String)
extern "C" IL2CPP_METHOD_ATTR int32_t CipherSuiteCollection_IndexOf_m2232557119 (CipherSuiteCollection_t1129639304 * __this, String_t* ___name0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (CipherSuiteCollection_IndexOf_m2232557119_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
int32_t V_0 = 0;
CipherSuite_t3414744575 * V_1 = NULL;
RuntimeObject* V_2 = NULL;
int32_t V_3 = 0;
RuntimeObject* V_4 = NULL;
Exception_t * __last_unhandled_exception = 0;
NO_UNUSED_WARNING (__last_unhandled_exception);
Exception_t * __exception_local = 0;
NO_UNUSED_WARNING (__exception_local);
int32_t __leave_target = -1;
NO_UNUSED_WARNING (__leave_target);
{
V_0 = 0;
ArrayList_t2718874744 * L_0 = __this->get_cipherSuites_0();
RuntimeObject* L_1 = VirtFuncInvoker0< RuntimeObject* >::Invoke(43 /* System.Collections.IEnumerator System.Collections.ArrayList::GetEnumerator() */, L_0);
V_2 = L_1;
}
IL_000e:
try
{ // begin try (depth: 1)
{
goto IL_003c;
}
IL_0013:
{
RuntimeObject* L_2 = V_2;
RuntimeObject * L_3 = InterfaceFuncInvoker0< RuntimeObject * >::Invoke(0 /* System.Object System.Collections.IEnumerator::get_Current() */, IEnumerator_t1853284238_il2cpp_TypeInfo_var, L_2);
V_1 = ((CipherSuite_t3414744575 *)CastclassClass((RuntimeObject*)L_3, CipherSuite_t3414744575_il2cpp_TypeInfo_var));
CipherSuite_t3414744575 * L_4 = V_1;
String_t* L_5 = CipherSuite_get_Name_m1137568068(L_4, /*hidden argument*/NULL);
String_t* L_6 = ___name0;
bool L_7 = CipherSuiteCollection_cultureAwareCompare_m2072548979(__this, L_5, L_6, /*hidden argument*/NULL);
if (!L_7)
{
goto IL_0038;
}
}
IL_0031:
{
int32_t L_8 = V_0;
V_3 = L_8;
IL2CPP_LEAVE(0x63, FINALLY_004c);
}
IL_0038:
{
int32_t L_9 = V_0;
V_0 = ((int32_t)il2cpp_codegen_add((int32_t)L_9, (int32_t)1));
}
IL_003c:
{
RuntimeObject* L_10 = V_2;
bool L_11 = InterfaceFuncInvoker0< bool >::Invoke(1 /* System.Boolean System.Collections.IEnumerator::MoveNext() */, IEnumerator_t1853284238_il2cpp_TypeInfo_var, L_10);
if (L_11)
{
goto IL_0013;
}
}
IL_0047:
{
IL2CPP_LEAVE(0x61, FINALLY_004c);
}
} // end try (depth: 1)
catch(Il2CppExceptionWrapper& e)
{
__last_unhandled_exception = (Exception_t *)e.ex;
goto FINALLY_004c;
}
FINALLY_004c:
{ // begin finally (depth: 1)
{
RuntimeObject* L_12 = V_2;
V_4 = ((RuntimeObject*)IsInst((RuntimeObject*)L_12, IDisposable_t3640265483_il2cpp_TypeInfo_var));
RuntimeObject* L_13 = V_4;
if (L_13)
{
goto IL_0059;
}
}
IL_0058:
{
IL2CPP_END_FINALLY(76)
}
IL_0059:
{
RuntimeObject* L_14 = V_4;
InterfaceActionInvoker0::Invoke(0 /* System.Void System.IDisposable::Dispose() */, IDisposable_t3640265483_il2cpp_TypeInfo_var, L_14);
IL2CPP_END_FINALLY(76)
}
} // end finally (depth: 1)
IL2CPP_CLEANUP(76)
{
IL2CPP_JUMP_TBL(0x63, IL_0063)
IL2CPP_JUMP_TBL(0x61, IL_0061)
IL2CPP_RETHROW_IF_UNHANDLED(Exception_t *)
}
IL_0061:
{
return (-1);
}
IL_0063:
{
int32_t L_15 = V_3;
return L_15;
}
}
// System.Int32 Mono.Security.Protocol.Tls.CipherSuiteCollection::IndexOf(System.Int16)
extern "C" IL2CPP_METHOD_ATTR int32_t CipherSuiteCollection_IndexOf_m2770510321 (CipherSuiteCollection_t1129639304 * __this, int16_t ___code0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (CipherSuiteCollection_IndexOf_m2770510321_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
int32_t V_0 = 0;
CipherSuite_t3414744575 * V_1 = NULL;
RuntimeObject* V_2 = NULL;
int32_t V_3 = 0;
RuntimeObject* V_4 = NULL;
Exception_t * __last_unhandled_exception = 0;
NO_UNUSED_WARNING (__last_unhandled_exception);
Exception_t * __exception_local = 0;
NO_UNUSED_WARNING (__exception_local);
int32_t __leave_target = -1;
NO_UNUSED_WARNING (__leave_target);
{
V_0 = 0;
ArrayList_t2718874744 * L_0 = __this->get_cipherSuites_0();
RuntimeObject* L_1 = VirtFuncInvoker0< RuntimeObject* >::Invoke(43 /* System.Collections.IEnumerator System.Collections.ArrayList::GetEnumerator() */, L_0);
V_2 = L_1;
}
IL_000e:
try
{ // begin try (depth: 1)
{
goto IL_0036;
}
IL_0013:
{
RuntimeObject* L_2 = V_2;
RuntimeObject * L_3 = InterfaceFuncInvoker0< RuntimeObject * >::Invoke(0 /* System.Object System.Collections.IEnumerator::get_Current() */, IEnumerator_t1853284238_il2cpp_TypeInfo_var, L_2);
V_1 = ((CipherSuite_t3414744575 *)CastclassClass((RuntimeObject*)L_3, CipherSuite_t3414744575_il2cpp_TypeInfo_var));
CipherSuite_t3414744575 * L_4 = V_1;
int16_t L_5 = CipherSuite_get_Code_m3847824475(L_4, /*hidden argument*/NULL);
int16_t L_6 = ___code0;
if ((!(((uint32_t)L_5) == ((uint32_t)L_6))))
{
goto IL_0032;
}
}
IL_002b:
{
int32_t L_7 = V_0;
V_3 = L_7;
IL2CPP_LEAVE(0x5D, FINALLY_0046);
}
IL_0032:
{
int32_t L_8 = V_0;
V_0 = ((int32_t)il2cpp_codegen_add((int32_t)L_8, (int32_t)1));
}
IL_0036:
{
RuntimeObject* L_9 = V_2;
bool L_10 = InterfaceFuncInvoker0< bool >::Invoke(1 /* System.Boolean System.Collections.IEnumerator::MoveNext() */, IEnumerator_t1853284238_il2cpp_TypeInfo_var, L_9);
if (L_10)
{
goto IL_0013;
}
}
IL_0041:
{
IL2CPP_LEAVE(0x5B, FINALLY_0046);
}
} // end try (depth: 1)
catch(Il2CppExceptionWrapper& e)
{
__last_unhandled_exception = (Exception_t *)e.ex;
goto FINALLY_0046;
}
FINALLY_0046:
{ // begin finally (depth: 1)
{
RuntimeObject* L_11 = V_2;
V_4 = ((RuntimeObject*)IsInst((RuntimeObject*)L_11, IDisposable_t3640265483_il2cpp_TypeInfo_var));
RuntimeObject* L_12 = V_4;
if (L_12)
{
goto IL_0053;
}
}
IL_0052:
{
IL2CPP_END_FINALLY(70)
}
IL_0053:
{
RuntimeObject* L_13 = V_4;
InterfaceActionInvoker0::Invoke(0 /* System.Void System.IDisposable::Dispose() */, IDisposable_t3640265483_il2cpp_TypeInfo_var, L_13);
IL2CPP_END_FINALLY(70)
}
} // end finally (depth: 1)
IL2CPP_CLEANUP(70)
{
IL2CPP_JUMP_TBL(0x5D, IL_005d)
IL2CPP_JUMP_TBL(0x5B, IL_005b)
IL2CPP_RETHROW_IF_UNHANDLED(Exception_t *)
}
IL_005b:
{
return (-1);
}
IL_005d:
{
int32_t L_14 = V_3;
return L_14;
}
}
// Mono.Security.Protocol.Tls.CipherSuite Mono.Security.Protocol.Tls.CipherSuiteCollection::Add(System.Int16,System.String,Mono.Security.Protocol.Tls.CipherAlgorithmType,Mono.Security.Protocol.Tls.HashAlgorithmType,Mono.Security.Protocol.Tls.ExchangeAlgorithmType,System.Boolean,System.Boolean,System.Byte,System.Byte,System.Int16,System.Byte,System.Byte)
extern "C" IL2CPP_METHOD_ATTR CipherSuite_t3414744575 * CipherSuiteCollection_Add_m2046232751 (CipherSuiteCollection_t1129639304 * __this, int16_t ___code0, String_t* ___name1, int32_t ___cipherType2, int32_t ___hashType3, int32_t ___exchangeType4, bool ___exportable5, bool ___blockMode6, uint8_t ___keyMaterialSize7, uint8_t ___expandedKeyMaterialSize8, int16_t ___effectiveKeyBytes9, uint8_t ___ivSize10, uint8_t ___blockSize11, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (CipherSuiteCollection_Add_m2046232751_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
int32_t V_0 = 0;
{
int32_t L_0 = __this->get_protocol_1();
V_0 = L_0;
int32_t L_1 = V_0;
if ((((int32_t)L_1) == ((int32_t)((int32_t)-1073741824))))
{
goto IL_0032;
}
}
{
int32_t L_2 = V_0;
if ((((int32_t)L_2) == ((int32_t)((int32_t)12))))
{
goto IL_0074;
}
}
{
int32_t L_3 = V_0;
if ((((int32_t)L_3) == ((int32_t)((int32_t)48))))
{
goto IL_0053;
}
}
{
int32_t L_4 = V_0;
if ((((int32_t)L_4) == ((int32_t)((int32_t)192))))
{
goto IL_0032;
}
}
{
goto IL_0074;
}
IL_0032:
{
int16_t L_5 = ___code0;
String_t* L_6 = ___name1;
int32_t L_7 = ___cipherType2;
int32_t L_8 = ___hashType3;
int32_t L_9 = ___exchangeType4;
bool L_10 = ___exportable5;
bool L_11 = ___blockMode6;
uint8_t L_12 = ___keyMaterialSize7;
uint8_t L_13 = ___expandedKeyMaterialSize8;
int16_t L_14 = ___effectiveKeyBytes9;
uint8_t L_15 = ___ivSize10;
uint8_t L_16 = ___blockSize11;
TlsCipherSuite_t1545013223 * L_17 = (TlsCipherSuite_t1545013223 *)il2cpp_codegen_object_new(TlsCipherSuite_t1545013223_il2cpp_TypeInfo_var);
TlsCipherSuite__ctor_m3580955828(L_17, L_5, L_6, L_7, L_8, L_9, L_10, L_11, L_12, L_13, L_14, L_15, L_16, /*hidden argument*/NULL);
TlsCipherSuite_t1545013223 * L_18 = CipherSuiteCollection_add_m3005595589(__this, L_17, /*hidden argument*/NULL);
return L_18;
}
IL_0053:
{
int16_t L_19 = ___code0;
String_t* L_20 = ___name1;
int32_t L_21 = ___cipherType2;
int32_t L_22 = ___hashType3;
int32_t L_23 = ___exchangeType4;
bool L_24 = ___exportable5;
bool L_25 = ___blockMode6;
uint8_t L_26 = ___keyMaterialSize7;
uint8_t L_27 = ___expandedKeyMaterialSize8;
int16_t L_28 = ___effectiveKeyBytes9;
uint8_t L_29 = ___ivSize10;
uint8_t L_30 = ___blockSize11;
SslCipherSuite_t1981645747 * L_31 = (SslCipherSuite_t1981645747 *)il2cpp_codegen_object_new(SslCipherSuite_t1981645747_il2cpp_TypeInfo_var);
SslCipherSuite__ctor_m1470082018(L_31, L_19, L_20, L_21, L_22, L_23, L_24, L_25, L_26, L_27, L_28, L_29, L_30, /*hidden argument*/NULL);
SslCipherSuite_t1981645747 * L_32 = CipherSuiteCollection_add_m1422128145(__this, L_31, /*hidden argument*/NULL);
return L_32;
}
IL_0074:
{
NotSupportedException_t1314879016 * L_33 = (NotSupportedException_t1314879016 *)il2cpp_codegen_object_new(NotSupportedException_t1314879016_il2cpp_TypeInfo_var);
NotSupportedException__ctor_m2494070935(L_33, _stringLiteral2024143041, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_33, NULL, CipherSuiteCollection_Add_m2046232751_RuntimeMethod_var);
}
}
// Mono.Security.Protocol.Tls.TlsCipherSuite Mono.Security.Protocol.Tls.CipherSuiteCollection::add(Mono.Security.Protocol.Tls.TlsCipherSuite)
extern "C" IL2CPP_METHOD_ATTR TlsCipherSuite_t1545013223 * CipherSuiteCollection_add_m3005595589 (CipherSuiteCollection_t1129639304 * __this, TlsCipherSuite_t1545013223 * ___cipherSuite0, const RuntimeMethod* method)
{
{
ArrayList_t2718874744 * L_0 = __this->get_cipherSuites_0();
TlsCipherSuite_t1545013223 * L_1 = ___cipherSuite0;
VirtFuncInvoker1< int32_t, RuntimeObject * >::Invoke(30 /* System.Int32 System.Collections.ArrayList::Add(System.Object) */, L_0, L_1);
TlsCipherSuite_t1545013223 * L_2 = ___cipherSuite0;
return L_2;
}
}
// Mono.Security.Protocol.Tls.SslCipherSuite Mono.Security.Protocol.Tls.CipherSuiteCollection::add(Mono.Security.Protocol.Tls.SslCipherSuite)
extern "C" IL2CPP_METHOD_ATTR SslCipherSuite_t1981645747 * CipherSuiteCollection_add_m1422128145 (CipherSuiteCollection_t1129639304 * __this, SslCipherSuite_t1981645747 * ___cipherSuite0, const RuntimeMethod* method)
{
{
ArrayList_t2718874744 * L_0 = __this->get_cipherSuites_0();
SslCipherSuite_t1981645747 * L_1 = ___cipherSuite0;
VirtFuncInvoker1< int32_t, RuntimeObject * >::Invoke(30 /* System.Int32 System.Collections.ArrayList::Add(System.Object) */, L_0, L_1);
SslCipherSuite_t1981645747 * L_2 = ___cipherSuite0;
return L_2;
}
}
// System.Boolean Mono.Security.Protocol.Tls.CipherSuiteCollection::cultureAwareCompare(System.String,System.String)
extern "C" IL2CPP_METHOD_ATTR bool CipherSuiteCollection_cultureAwareCompare_m2072548979 (CipherSuiteCollection_t1129639304 * __this, String_t* ___strA0, String_t* ___strB1, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (CipherSuiteCollection_cultureAwareCompare_m2072548979_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
int32_t G_B3_0 = 0;
{
IL2CPP_RUNTIME_CLASS_INIT(CultureInfo_t4157843068_il2cpp_TypeInfo_var);
CultureInfo_t4157843068 * L_0 = CultureInfo_get_CurrentCulture_m1632690660(NULL /*static, unused*/, /*hidden argument*/NULL);
CompareInfo_t1092934962 * L_1 = VirtFuncInvoker0< CompareInfo_t1092934962 * >::Invoke(11 /* System.Globalization.CompareInfo System.Globalization.CultureInfo::get_CompareInfo() */, L_0);
String_t* L_2 = ___strA0;
String_t* L_3 = ___strB1;
int32_t L_4 = VirtFuncInvoker3< int32_t, String_t*, String_t*, int32_t >::Invoke(6 /* System.Int32 System.Globalization.CompareInfo::Compare(System.String,System.String,System.Globalization.CompareOptions) */, L_1, L_2, L_3, ((int32_t)25));
if (L_4)
{
goto IL_001e;
}
}
{
G_B3_0 = 1;
goto IL_001f;
}
IL_001e:
{
G_B3_0 = 0;
}
IL_001f:
{
return (bool)G_B3_0;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Mono.Security.Protocol.Tls.CipherSuiteCollection Mono.Security.Protocol.Tls.CipherSuiteFactory::GetSupportedCiphers(Mono.Security.Protocol.Tls.SecurityProtocolType)
extern "C" IL2CPP_METHOD_ATTR CipherSuiteCollection_t1129639304 * CipherSuiteFactory_GetSupportedCiphers_m3260014148 (RuntimeObject * __this /* static, unused */, int32_t ___protocol0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (CipherSuiteFactory_GetSupportedCiphers_m3260014148_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
int32_t V_0 = 0;
{
int32_t L_0 = ___protocol0;
V_0 = L_0;
int32_t L_1 = V_0;
if ((((int32_t)L_1) == ((int32_t)((int32_t)-1073741824))))
{
goto IL_002d;
}
}
{
int32_t L_2 = V_0;
if ((((int32_t)L_2) == ((int32_t)((int32_t)12))))
{
goto IL_0039;
}
}
{
int32_t L_3 = V_0;
if ((((int32_t)L_3) == ((int32_t)((int32_t)48))))
{
goto IL_0033;
}
}
{
int32_t L_4 = V_0;
if ((((int32_t)L_4) == ((int32_t)((int32_t)192))))
{
goto IL_002d;
}
}
{
goto IL_0039;
}
IL_002d:
{
CipherSuiteCollection_t1129639304 * L_5 = CipherSuiteFactory_GetTls1SupportedCiphers_m3691819504(NULL /*static, unused*/, /*hidden argument*/NULL);
return L_5;
}
IL_0033:
{
CipherSuiteCollection_t1129639304 * L_6 = CipherSuiteFactory_GetSsl3SupportedCiphers_m3757358569(NULL /*static, unused*/, /*hidden argument*/NULL);
return L_6;
}
IL_0039:
{
NotSupportedException_t1314879016 * L_7 = (NotSupportedException_t1314879016 *)il2cpp_codegen_object_new(NotSupportedException_t1314879016_il2cpp_TypeInfo_var);
NotSupportedException__ctor_m2494070935(L_7, _stringLiteral3034282783, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_7, NULL, CipherSuiteFactory_GetSupportedCiphers_m3260014148_RuntimeMethod_var);
}
}
// Mono.Security.Protocol.Tls.CipherSuiteCollection Mono.Security.Protocol.Tls.CipherSuiteFactory::GetTls1SupportedCiphers()
extern "C" IL2CPP_METHOD_ATTR CipherSuiteCollection_t1129639304 * CipherSuiteFactory_GetTls1SupportedCiphers_m3691819504 (RuntimeObject * __this /* static, unused */, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (CipherSuiteFactory_GetTls1SupportedCiphers_m3691819504_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
CipherSuiteCollection_t1129639304 * V_0 = NULL;
{
CipherSuiteCollection_t1129639304 * L_0 = (CipherSuiteCollection_t1129639304 *)il2cpp_codegen_object_new(CipherSuiteCollection_t1129639304_il2cpp_TypeInfo_var);
CipherSuiteCollection__ctor_m384434353(L_0, ((int32_t)192), /*hidden argument*/NULL);
V_0 = L_0;
CipherSuiteCollection_t1129639304 * L_1 = V_0;
CipherSuiteCollection_Add_m2046232751(L_1, (int16_t)((int32_t)53), _stringLiteral2728941485, 4, 2, 3, (bool)0, (bool)1, (uint8_t)((int32_t)32), (uint8_t)((int32_t)32), (int16_t)((int32_t)256), (uint8_t)((int32_t)16), (uint8_t)((int32_t)16), /*hidden argument*/NULL);
CipherSuiteCollection_t1129639304 * L_2 = V_0;
CipherSuiteCollection_Add_m2046232751(L_2, (int16_t)((int32_t)47), _stringLiteral1174641524, 4, 2, 3, (bool)0, (bool)1, (uint8_t)((int32_t)16), (uint8_t)((int32_t)16), (int16_t)((int32_t)128), (uint8_t)((int32_t)16), (uint8_t)((int32_t)16), /*hidden argument*/NULL);
CipherSuiteCollection_t1129639304 * L_3 = V_0;
CipherSuiteCollection_Add_m2046232751(L_3, (int16_t)((int32_t)10), _stringLiteral1749648451, 6, 2, 3, (bool)0, (bool)1, (uint8_t)((int32_t)24), (uint8_t)((int32_t)24), (int16_t)((int32_t)168), (uint8_t)8, (uint8_t)8, /*hidden argument*/NULL);
CipherSuiteCollection_t1129639304 * L_4 = V_0;
CipherSuiteCollection_Add_m2046232751(L_4, (int16_t)5, _stringLiteral2927991799, 3, 2, 3, (bool)0, (bool)0, (uint8_t)((int32_t)16), (uint8_t)((int32_t)16), (int16_t)((int32_t)128), (uint8_t)0, (uint8_t)0, /*hidden argument*/NULL);
CipherSuiteCollection_t1129639304 * L_5 = V_0;
CipherSuiteCollection_Add_m2046232751(L_5, (int16_t)4, _stringLiteral945956019, 3, 0, 3, (bool)0, (bool)0, (uint8_t)((int32_t)16), (uint8_t)((int32_t)16), (int16_t)((int32_t)128), (uint8_t)0, (uint8_t)0, /*hidden argument*/NULL);
CipherSuiteCollection_t1129639304 * L_6 = V_0;
CipherSuiteCollection_Add_m2046232751(L_6, (int16_t)((int32_t)9), _stringLiteral4284309600, 0, 2, 3, (bool)0, (bool)1, (uint8_t)8, (uint8_t)8, (int16_t)((int32_t)56), (uint8_t)8, (uint8_t)8, /*hidden argument*/NULL);
CipherSuiteCollection_t1129639304 * L_7 = V_0;
CipherSuiteCollection_Add_m2046232751(L_7, (int16_t)3, _stringLiteral3499506080, 3, 0, 3, (bool)1, (bool)0, (uint8_t)5, (uint8_t)((int32_t)16), (int16_t)((int32_t)40), (uint8_t)0, (uint8_t)0, /*hidden argument*/NULL);
CipherSuiteCollection_t1129639304 * L_8 = V_0;
CipherSuiteCollection_Add_m2046232751(L_8, (int16_t)6, _stringLiteral1938928454, 2, 0, 3, (bool)1, (bool)1, (uint8_t)5, (uint8_t)((int32_t)16), (int16_t)((int32_t)40), (uint8_t)8, (uint8_t)8, /*hidden argument*/NULL);
CipherSuiteCollection_t1129639304 * L_9 = V_0;
CipherSuiteCollection_Add_m2046232751(L_9, (int16_t)8, _stringLiteral1063943309, 0, 2, 3, (bool)1, (bool)1, (uint8_t)5, (uint8_t)8, (int16_t)((int32_t)40), (uint8_t)8, (uint8_t)8, /*hidden argument*/NULL);
CipherSuiteCollection_t1129639304 * L_10 = V_0;
CipherSuiteCollection_Add_m2046232751(L_10, (int16_t)((int32_t)96), _stringLiteral3486530047, 3, 0, 3, (bool)1, (bool)0, (uint8_t)7, (uint8_t)((int32_t)16), (int16_t)((int32_t)56), (uint8_t)0, (uint8_t)0, /*hidden argument*/NULL);
CipherSuiteCollection_t1129639304 * L_11 = V_0;
CipherSuiteCollection_Add_m2046232751(L_11, (int16_t)((int32_t)97), _stringLiteral1927525029, 2, 0, 3, (bool)1, (bool)1, (uint8_t)7, (uint8_t)((int32_t)16), (int16_t)((int32_t)56), (uint8_t)8, (uint8_t)8, /*hidden argument*/NULL);
CipherSuiteCollection_t1129639304 * L_12 = V_0;
CipherSuiteCollection_Add_m2046232751(L_12, (int16_t)((int32_t)98), _stringLiteral2791101299, 0, 2, 3, (bool)1, (bool)1, (uint8_t)8, (uint8_t)8, (int16_t)((int32_t)64), (uint8_t)8, (uint8_t)8, /*hidden argument*/NULL);
CipherSuiteCollection_t1129639304 * L_13 = V_0;
CipherSuiteCollection_Add_m2046232751(L_13, (int16_t)((int32_t)100), _stringLiteral2047228403, 3, 2, 3, (bool)1, (bool)0, (uint8_t)7, (uint8_t)((int32_t)16), (int16_t)((int32_t)56), (uint8_t)0, (uint8_t)0, /*hidden argument*/NULL);
CipherSuiteCollection_t1129639304 * L_14 = V_0;
return L_14;
}
}
// Mono.Security.Protocol.Tls.CipherSuiteCollection Mono.Security.Protocol.Tls.CipherSuiteFactory::GetSsl3SupportedCiphers()
extern "C" IL2CPP_METHOD_ATTR CipherSuiteCollection_t1129639304 * CipherSuiteFactory_GetSsl3SupportedCiphers_m3757358569 (RuntimeObject * __this /* static, unused */, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (CipherSuiteFactory_GetSsl3SupportedCiphers_m3757358569_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
CipherSuiteCollection_t1129639304 * V_0 = NULL;
{
CipherSuiteCollection_t1129639304 * L_0 = (CipherSuiteCollection_t1129639304 *)il2cpp_codegen_object_new(CipherSuiteCollection_t1129639304_il2cpp_TypeInfo_var);
CipherSuiteCollection__ctor_m384434353(L_0, ((int32_t)48), /*hidden argument*/NULL);
V_0 = L_0;
CipherSuiteCollection_t1129639304 * L_1 = V_0;
CipherSuiteCollection_Add_m2046232751(L_1, (int16_t)((int32_t)53), _stringLiteral3622179847, 4, 2, 3, (bool)0, (bool)1, (uint8_t)((int32_t)32), (uint8_t)((int32_t)32), (int16_t)((int32_t)256), (uint8_t)((int32_t)16), (uint8_t)((int32_t)16), /*hidden argument*/NULL);
CipherSuiteCollection_t1129639304 * L_2 = V_0;
CipherSuiteCollection_Add_m2046232751(L_2, (int16_t)((int32_t)10), _stringLiteral3519915121, 6, 2, 3, (bool)0, (bool)1, (uint8_t)((int32_t)24), (uint8_t)((int32_t)24), (int16_t)((int32_t)168), (uint8_t)8, (uint8_t)8, /*hidden argument*/NULL);
CipherSuiteCollection_t1129639304 * L_3 = V_0;
CipherSuiteCollection_Add_m2046232751(L_3, (int16_t)5, _stringLiteral3746471772, 3, 2, 3, (bool)0, (bool)0, (uint8_t)((int32_t)16), (uint8_t)((int32_t)16), (int16_t)((int32_t)128), (uint8_t)0, (uint8_t)0, /*hidden argument*/NULL);
CipherSuiteCollection_t1129639304 * L_4 = V_0;
CipherSuiteCollection_Add_m2046232751(L_4, (int16_t)4, _stringLiteral1306161608, 3, 0, 3, (bool)0, (bool)0, (uint8_t)((int32_t)16), (uint8_t)((int32_t)16), (int16_t)((int32_t)128), (uint8_t)0, (uint8_t)0, /*hidden argument*/NULL);
CipherSuiteCollection_t1129639304 * L_5 = V_0;
CipherSuiteCollection_Add_m2046232751(L_5, (int16_t)((int32_t)9), _stringLiteral3387223069, 0, 2, 3, (bool)0, (bool)1, (uint8_t)8, (uint8_t)8, (int16_t)((int32_t)56), (uint8_t)8, (uint8_t)8, /*hidden argument*/NULL);
CipherSuiteCollection_t1129639304 * L_6 = V_0;
CipherSuiteCollection_Add_m2046232751(L_6, (int16_t)3, _stringLiteral123659953, 3, 0, 3, (bool)1, (bool)0, (uint8_t)5, (uint8_t)((int32_t)16), (int16_t)((int32_t)40), (uint8_t)0, (uint8_t)0, /*hidden argument*/NULL);
CipherSuiteCollection_t1129639304 * L_7 = V_0;
CipherSuiteCollection_Add_m2046232751(L_7, (int16_t)6, _stringLiteral2217280364, 2, 0, 3, (bool)1, (bool)1, (uint8_t)5, (uint8_t)((int32_t)16), (int16_t)((int32_t)40), (uint8_t)8, (uint8_t)8, /*hidden argument*/NULL);
CipherSuiteCollection_t1129639304 * L_8 = V_0;
CipherSuiteCollection_Add_m2046232751(L_8, (int16_t)8, _stringLiteral969659244, 0, 2, 3, (bool)1, (bool)1, (uint8_t)5, (uint8_t)8, (int16_t)((int32_t)40), (uint8_t)8, (uint8_t)8, /*hidden argument*/NULL);
CipherSuiteCollection_t1129639304 * L_9 = V_0;
CipherSuiteCollection_Add_m2046232751(L_9, (int16_t)((int32_t)96), _stringLiteral127985362, 3, 0, 3, (bool)1, (bool)0, (uint8_t)7, (uint8_t)((int32_t)16), (int16_t)((int32_t)56), (uint8_t)0, (uint8_t)0, /*hidden argument*/NULL);
CipherSuiteCollection_t1129639304 * L_10 = V_0;
CipherSuiteCollection_Add_m2046232751(L_10, (int16_t)((int32_t)97), _stringLiteral2198012883, 2, 0, 3, (bool)1, (bool)1, (uint8_t)7, (uint8_t)((int32_t)16), (int16_t)((int32_t)56), (uint8_t)8, (uint8_t)8, /*hidden argument*/NULL);
CipherSuiteCollection_t1129639304 * L_11 = V_0;
CipherSuiteCollection_Add_m2046232751(L_11, (int16_t)((int32_t)98), _stringLiteral1238132549, 0, 2, 3, (bool)1, (bool)1, (uint8_t)8, (uint8_t)8, (int16_t)((int32_t)64), (uint8_t)8, (uint8_t)8, /*hidden argument*/NULL);
CipherSuiteCollection_t1129639304 * L_12 = V_0;
CipherSuiteCollection_Add_m2046232751(L_12, (int16_t)((int32_t)100), _stringLiteral1282074326, 3, 2, 3, (bool)1, (bool)0, (uint8_t)7, (uint8_t)((int32_t)16), (int16_t)((int32_t)56), (uint8_t)0, (uint8_t)0, /*hidden argument*/NULL);
CipherSuiteCollection_t1129639304 * L_13 = V_0;
return L_13;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void Mono.Security.Protocol.Tls.ClientContext::.ctor(Mono.Security.Protocol.Tls.SslClientStream,Mono.Security.Protocol.Tls.SecurityProtocolType,System.String,System.Security.Cryptography.X509Certificates.X509CertificateCollection)
extern "C" IL2CPP_METHOD_ATTR void ClientContext__ctor_m3993227749 (ClientContext_t2797401965 * __this, SslClientStream_t3914624661 * ___stream0, int32_t ___securityProtocolType1, String_t* ___targetHost2, X509CertificateCollection_t3399372417 * ___clientCertificates3, const RuntimeMethod* method)
{
{
int32_t L_0 = ___securityProtocolType1;
Context__ctor_m1288667393(__this, L_0, /*hidden argument*/NULL);
SslClientStream_t3914624661 * L_1 = ___stream0;
__this->set_sslStream_30(L_1);
TlsClientSettings_t2486039503 * L_2 = Context_get_ClientSettings_m2874391194(__this, /*hidden argument*/NULL);
X509CertificateCollection_t3399372417 * L_3 = ___clientCertificates3;
TlsClientSettings_set_Certificates_m3887201895(L_2, L_3, /*hidden argument*/NULL);
TlsClientSettings_t2486039503 * L_4 = Context_get_ClientSettings_m2874391194(__this, /*hidden argument*/NULL);
String_t* L_5 = ___targetHost2;
TlsClientSettings_set_TargetHost_m3350021121(L_4, L_5, /*hidden argument*/NULL);
return;
}
}
// Mono.Security.Protocol.Tls.SslClientStream Mono.Security.Protocol.Tls.ClientContext::get_SslStream()
extern "C" IL2CPP_METHOD_ATTR SslClientStream_t3914624661 * ClientContext_get_SslStream_m1583577309 (ClientContext_t2797401965 * __this, const RuntimeMethod* method)
{
{
SslClientStream_t3914624661 * L_0 = __this->get_sslStream_30();
return L_0;
}
}
// System.Int16 Mono.Security.Protocol.Tls.ClientContext::get_ClientHelloProtocol()
extern "C" IL2CPP_METHOD_ATTR int16_t ClientContext_get_ClientHelloProtocol_m1654639078 (ClientContext_t2797401965 * __this, const RuntimeMethod* method)
{
{
int16_t L_0 = __this->get_clientHelloProtocol_31();
return L_0;
}
}
// System.Void Mono.Security.Protocol.Tls.ClientContext::set_ClientHelloProtocol(System.Int16)
extern "C" IL2CPP_METHOD_ATTR void ClientContext_set_ClientHelloProtocol_m4189379912 (ClientContext_t2797401965 * __this, int16_t ___value0, const RuntimeMethod* method)
{
{
int16_t L_0 = ___value0;
__this->set_clientHelloProtocol_31(L_0);
return;
}
}
// System.Void Mono.Security.Protocol.Tls.ClientContext::Clear()
extern "C" IL2CPP_METHOD_ATTR void ClientContext_Clear_m1774063253 (ClientContext_t2797401965 * __this, const RuntimeMethod* method)
{
{
__this->set_clientHelloProtocol_31((int16_t)0);
Context_Clear_m2678836033(__this, /*hidden argument*/NULL);
return;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void Mono.Security.Protocol.Tls.ClientRecordProtocol::.ctor(System.IO.Stream,Mono.Security.Protocol.Tls.ClientContext)
extern "C" IL2CPP_METHOD_ATTR void ClientRecordProtocol__ctor_m2839844778 (ClientRecordProtocol_t2031137796 * __this, Stream_t1273022909 * ___innerStream0, ClientContext_t2797401965 * ___context1, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (ClientRecordProtocol__ctor_m2839844778_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
Stream_t1273022909 * L_0 = ___innerStream0;
ClientContext_t2797401965 * L_1 = ___context1;
IL2CPP_RUNTIME_CLASS_INIT(RecordProtocol_t3759049701_il2cpp_TypeInfo_var);
RecordProtocol__ctor_m1695232390(__this, L_0, L_1, /*hidden argument*/NULL);
return;
}
}
// Mono.Security.Protocol.Tls.Handshake.HandshakeMessage Mono.Security.Protocol.Tls.ClientRecordProtocol::GetMessage(Mono.Security.Protocol.Tls.Handshake.HandshakeType)
extern "C" IL2CPP_METHOD_ATTR HandshakeMessage_t3696583168 * ClientRecordProtocol_GetMessage_m797000123 (ClientRecordProtocol_t2031137796 * __this, uint8_t ___type0, const RuntimeMethod* method)
{
HandshakeMessage_t3696583168 * V_0 = NULL;
{
uint8_t L_0 = ___type0;
HandshakeMessage_t3696583168 * L_1 = ClientRecordProtocol_createClientHandshakeMessage_m3325677558(__this, L_0, /*hidden argument*/NULL);
V_0 = L_1;
HandshakeMessage_t3696583168 * L_2 = V_0;
return L_2;
}
}
// System.Void Mono.Security.Protocol.Tls.ClientRecordProtocol::ProcessHandshakeMessage(Mono.Security.Protocol.Tls.TlsStream)
extern "C" IL2CPP_METHOD_ATTR void ClientRecordProtocol_ProcessHandshakeMessage_m1002991731 (ClientRecordProtocol_t2031137796 * __this, TlsStream_t2365453965 * ___handMsg0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (ClientRecordProtocol_ProcessHandshakeMessage_m1002991731_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
uint8_t V_0 = 0;
HandshakeMessage_t3696583168 * V_1 = NULL;
int32_t V_2 = 0;
ByteU5BU5D_t4116647657* V_3 = NULL;
{
TlsStream_t2365453965 * L_0 = ___handMsg0;
uint8_t L_1 = TlsStream_ReadByte_m3396126844(L_0, /*hidden argument*/NULL);
V_0 = L_1;
V_1 = (HandshakeMessage_t3696583168 *)NULL;
TlsStream_t2365453965 * L_2 = ___handMsg0;
int32_t L_3 = TlsStream_ReadInt24_m3096782201(L_2, /*hidden argument*/NULL);
V_2 = L_3;
V_3 = (ByteU5BU5D_t4116647657*)NULL;
int32_t L_4 = V_2;
if ((((int32_t)L_4) <= ((int32_t)0)))
{
goto IL_002a;
}
}
{
int32_t L_5 = V_2;
ByteU5BU5D_t4116647657* L_6 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)L_5);
V_3 = L_6;
TlsStream_t2365453965 * L_7 = ___handMsg0;
ByteU5BU5D_t4116647657* L_8 = V_3;
int32_t L_9 = V_2;
VirtFuncInvoker3< int32_t, ByteU5BU5D_t4116647657*, int32_t, int32_t >::Invoke(14 /* System.Int32 Mono.Security.Protocol.Tls.TlsStream::Read(System.Byte[],System.Int32,System.Int32) */, L_7, L_8, 0, L_9);
}
IL_002a:
{
uint8_t L_10 = V_0;
ByteU5BU5D_t4116647657* L_11 = V_3;
HandshakeMessage_t3696583168 * L_12 = ClientRecordProtocol_createServerHandshakeMessage_m2804371400(__this, L_10, L_11, /*hidden argument*/NULL);
V_1 = L_12;
HandshakeMessage_t3696583168 * L_13 = V_1;
if (!L_13)
{
goto IL_003f;
}
}
{
HandshakeMessage_t3696583168 * L_14 = V_1;
HandshakeMessage_Process_m810828609(L_14, /*hidden argument*/NULL);
}
IL_003f:
{
Context_t3971234707 * L_15 = RecordProtocol_get_Context_m3273611300(__this, /*hidden argument*/NULL);
uint8_t L_16 = V_0;
Context_set_LastHandshakeMsg_m1770618067(L_15, L_16, /*hidden argument*/NULL);
HandshakeMessage_t3696583168 * L_17 = V_1;
if (!L_17)
{
goto IL_0095;
}
}
{
HandshakeMessage_t3696583168 * L_18 = V_1;
VirtActionInvoker0::Invoke(26 /* System.Void Mono.Security.Protocol.Tls.Handshake.HandshakeMessage::Update() */, L_18);
Context_t3971234707 * L_19 = RecordProtocol_get_Context_m3273611300(__this, /*hidden argument*/NULL);
TlsStream_t2365453965 * L_20 = Context_get_HandshakeMessages_m3655705111(L_19, /*hidden argument*/NULL);
uint8_t L_21 = V_0;
VirtActionInvoker1< uint8_t >::Invoke(19 /* System.Void System.IO.Stream::WriteByte(System.Byte) */, L_20, L_21);
Context_t3971234707 * L_22 = RecordProtocol_get_Context_m3273611300(__this, /*hidden argument*/NULL);
TlsStream_t2365453965 * L_23 = Context_get_HandshakeMessages_m3655705111(L_22, /*hidden argument*/NULL);
int32_t L_24 = V_2;
TlsStream_WriteInt24_m58952549(L_23, L_24, /*hidden argument*/NULL);
int32_t L_25 = V_2;
if ((((int32_t)L_25) <= ((int32_t)0)))
{
goto IL_0095;
}
}
{
Context_t3971234707 * L_26 = RecordProtocol_get_Context_m3273611300(__this, /*hidden argument*/NULL);
TlsStream_t2365453965 * L_27 = Context_get_HandshakeMessages_m3655705111(L_26, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_28 = V_3;
ByteU5BU5D_t4116647657* L_29 = V_3;
VirtActionInvoker3< ByteU5BU5D_t4116647657*, int32_t, int32_t >::Invoke(18 /* System.Void Mono.Security.Protocol.Tls.TlsStream::Write(System.Byte[],System.Int32,System.Int32) */, L_27, L_28, 0, (((int32_t)((int32_t)(((RuntimeArray *)L_29)->max_length)))));
}
IL_0095:
{
return;
}
}
// Mono.Security.Protocol.Tls.Handshake.HandshakeMessage Mono.Security.Protocol.Tls.ClientRecordProtocol::createClientHandshakeMessage(Mono.Security.Protocol.Tls.Handshake.HandshakeType)
extern "C" IL2CPP_METHOD_ATTR HandshakeMessage_t3696583168 * ClientRecordProtocol_createClientHandshakeMessage_m3325677558 (ClientRecordProtocol_t2031137796 * __this, uint8_t ___type0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (ClientRecordProtocol_createClientHandshakeMessage_m3325677558_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
uint8_t V_0 = 0;
{
uint8_t L_0 = ___type0;
V_0 = L_0;
uint8_t L_1 = V_0;
switch (((int32_t)il2cpp_codegen_subtract((int32_t)L_1, (int32_t)((int32_t)15))))
{
case 0:
{
goto IL_005b;
}
case 1:
{
goto IL_004f;
}
case 2:
{
goto IL_0023;
}
case 3:
{
goto IL_0023;
}
case 4:
{
goto IL_0023;
}
case 5:
{
goto IL_0067;
}
}
}
IL_0023:
{
uint8_t L_2 = V_0;
if ((((int32_t)L_2) == ((int32_t)1)))
{
goto IL_0037;
}
}
{
uint8_t L_3 = V_0;
if ((((int32_t)L_3) == ((int32_t)((int32_t)11))))
{
goto IL_0043;
}
}
{
goto IL_0073;
}
IL_0037:
{
Context_t3971234707 * L_4 = ((RecordProtocol_t3759049701 *)__this)->get_context_2();
TlsClientHello_t97965998 * L_5 = (TlsClientHello_t97965998 *)il2cpp_codegen_object_new(TlsClientHello_t97965998_il2cpp_TypeInfo_var);
TlsClientHello__ctor_m1986768336(L_5, L_4, /*hidden argument*/NULL);
return L_5;
}
IL_0043:
{
Context_t3971234707 * L_6 = ((RecordProtocol_t3759049701 *)__this)->get_context_2();
TlsClientCertificate_t3519510577 * L_7 = (TlsClientCertificate_t3519510577 *)il2cpp_codegen_object_new(TlsClientCertificate_t3519510577_il2cpp_TypeInfo_var);
TlsClientCertificate__ctor_m101524132(L_7, L_6, /*hidden argument*/NULL);
return L_7;
}
IL_004f:
{
Context_t3971234707 * L_8 = ((RecordProtocol_t3759049701 *)__this)->get_context_2();
TlsClientKeyExchange_t643923608 * L_9 = (TlsClientKeyExchange_t643923608 *)il2cpp_codegen_object_new(TlsClientKeyExchange_t643923608_il2cpp_TypeInfo_var);
TlsClientKeyExchange__ctor_m31786095(L_9, L_8, /*hidden argument*/NULL);
return L_9;
}
IL_005b:
{
Context_t3971234707 * L_10 = ((RecordProtocol_t3759049701 *)__this)->get_context_2();
TlsClientCertificateVerify_t1824902654 * L_11 = (TlsClientCertificateVerify_t1824902654 *)il2cpp_codegen_object_new(TlsClientCertificateVerify_t1824902654_il2cpp_TypeInfo_var);
TlsClientCertificateVerify__ctor_m1589614281(L_11, L_10, /*hidden argument*/NULL);
return L_11;
}
IL_0067:
{
Context_t3971234707 * L_12 = ((RecordProtocol_t3759049701 *)__this)->get_context_2();
TlsClientFinished_t2486981163 * L_13 = (TlsClientFinished_t2486981163 *)il2cpp_codegen_object_new(TlsClientFinished_t2486981163_il2cpp_TypeInfo_var);
TlsClientFinished__ctor_m399357014(L_13, L_12, /*hidden argument*/NULL);
return L_13;
}
IL_0073:
{
uint8_t L_14 = ___type0;
uint8_t L_15 = L_14;
RuntimeObject * L_16 = Box(HandshakeType_t3062346172_il2cpp_TypeInfo_var, &L_15);
String_t* L_17 = VirtFuncInvoker0< String_t* >::Invoke(3 /* System.String System.Enum::ToString() */, (Enum_t4135868527 *)L_16);
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_18 = String_Concat_m3937257545(NULL /*static, unused*/, _stringLiteral1510332022, L_17, /*hidden argument*/NULL);
InvalidOperationException_t56020091 * L_19 = (InvalidOperationException_t56020091 *)il2cpp_codegen_object_new(InvalidOperationException_t56020091_il2cpp_TypeInfo_var);
InvalidOperationException__ctor_m237278729(L_19, L_18, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_19, NULL, ClientRecordProtocol_createClientHandshakeMessage_m3325677558_RuntimeMethod_var);
}
}
// Mono.Security.Protocol.Tls.Handshake.HandshakeMessage Mono.Security.Protocol.Tls.ClientRecordProtocol::createServerHandshakeMessage(Mono.Security.Protocol.Tls.Handshake.HandshakeType,System.Byte[])
extern "C" IL2CPP_METHOD_ATTR HandshakeMessage_t3696583168 * ClientRecordProtocol_createServerHandshakeMessage_m2804371400 (ClientRecordProtocol_t2031137796 * __this, uint8_t ___type0, ByteU5BU5D_t4116647657* ___buffer1, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (ClientRecordProtocol_createServerHandshakeMessage_m2804371400_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
ClientContext_t2797401965 * V_0 = NULL;
uint8_t V_1 = 0;
{
Context_t3971234707 * L_0 = ((RecordProtocol_t3759049701 *)__this)->get_context_2();
V_0 = ((ClientContext_t2797401965 *)CastclassClass((RuntimeObject*)L_0, ClientContext_t2797401965_il2cpp_TypeInfo_var));
uint8_t L_1 = ___type0;
V_1 = L_1;
uint8_t L_2 = V_1;
switch (((int32_t)il2cpp_codegen_subtract((int32_t)L_2, (int32_t)((int32_t)11))))
{
case 0:
{
goto IL_0086;
}
case 1:
{
goto IL_0093;
}
case 2:
{
goto IL_00a0;
}
case 3:
{
goto IL_00ad;
}
case 4:
{
goto IL_003f;
}
case 5:
{
goto IL_003f;
}
case 6:
{
goto IL_003f;
}
case 7:
{
goto IL_003f;
}
case 8:
{
goto IL_003f;
}
case 9:
{
goto IL_00ba;
}
}
}
IL_003f:
{
uint8_t L_3 = V_1;
switch (L_3)
{
case 0:
{
goto IL_0056;
}
case 1:
{
goto IL_00c7;
}
case 2:
{
goto IL_0079;
}
}
}
{
goto IL_00c7;
}
IL_0056:
{
ClientContext_t2797401965 * L_4 = V_0;
int32_t L_5 = Context_get_HandshakeState_m2425796590(L_4, /*hidden argument*/NULL);
if ((((int32_t)L_5) == ((int32_t)1)))
{
goto IL_006e;
}
}
{
ClientContext_t2797401965 * L_6 = V_0;
Context_set_HandshakeState_m1329976135(L_6, 0, /*hidden argument*/NULL);
goto IL_0077;
}
IL_006e:
{
RecordProtocol_SendAlert_m2670098001(__this, 1, ((int32_t)100), /*hidden argument*/NULL);
}
IL_0077:
{
return (HandshakeMessage_t3696583168 *)NULL;
}
IL_0079:
{
Context_t3971234707 * L_7 = ((RecordProtocol_t3759049701 *)__this)->get_context_2();
ByteU5BU5D_t4116647657* L_8 = ___buffer1;
TlsServerHello_t3343859594 * L_9 = (TlsServerHello_t3343859594 *)il2cpp_codegen_object_new(TlsServerHello_t3343859594_il2cpp_TypeInfo_var);
TlsServerHello__ctor_m3887266572(L_9, L_7, L_8, /*hidden argument*/NULL);
return L_9;
}
IL_0086:
{
Context_t3971234707 * L_10 = ((RecordProtocol_t3759049701 *)__this)->get_context_2();
ByteU5BU5D_t4116647657* L_11 = ___buffer1;
TlsServerCertificate_t2716496392 * L_12 = (TlsServerCertificate_t2716496392 *)il2cpp_codegen_object_new(TlsServerCertificate_t2716496392_il2cpp_TypeInfo_var);
TlsServerCertificate__ctor_m389328097(L_12, L_10, L_11, /*hidden argument*/NULL);
return L_12;
}
IL_0093:
{
Context_t3971234707 * L_13 = ((RecordProtocol_t3759049701 *)__this)->get_context_2();
ByteU5BU5D_t4116647657* L_14 = ___buffer1;
TlsServerKeyExchange_t699469151 * L_15 = (TlsServerKeyExchange_t699469151 *)il2cpp_codegen_object_new(TlsServerKeyExchange_t699469151_il2cpp_TypeInfo_var);
TlsServerKeyExchange__ctor_m3572942737(L_15, L_13, L_14, /*hidden argument*/NULL);
return L_15;
}
IL_00a0:
{
Context_t3971234707 * L_16 = ((RecordProtocol_t3759049701 *)__this)->get_context_2();
ByteU5BU5D_t4116647657* L_17 = ___buffer1;
TlsServerCertificateRequest_t3690397592 * L_18 = (TlsServerCertificateRequest_t3690397592 *)il2cpp_codegen_object_new(TlsServerCertificateRequest_t3690397592_il2cpp_TypeInfo_var);
TlsServerCertificateRequest__ctor_m1334974076(L_18, L_16, L_17, /*hidden argument*/NULL);
return L_18;
}
IL_00ad:
{
Context_t3971234707 * L_19 = ((RecordProtocol_t3759049701 *)__this)->get_context_2();
ByteU5BU5D_t4116647657* L_20 = ___buffer1;
TlsServerHelloDone_t1850379324 * L_21 = (TlsServerHelloDone_t1850379324 *)il2cpp_codegen_object_new(TlsServerHelloDone_t1850379324_il2cpp_TypeInfo_var);
TlsServerHelloDone__ctor_m173627900(L_21, L_19, L_20, /*hidden argument*/NULL);
return L_21;
}
IL_00ba:
{
Context_t3971234707 * L_22 = ((RecordProtocol_t3759049701 *)__this)->get_context_2();
ByteU5BU5D_t4116647657* L_23 = ___buffer1;
TlsServerFinished_t3860330041 * L_24 = (TlsServerFinished_t3860330041 *)il2cpp_codegen_object_new(TlsServerFinished_t3860330041_il2cpp_TypeInfo_var);
TlsServerFinished__ctor_m1445633918(L_24, L_22, L_23, /*hidden argument*/NULL);
return L_24;
}
IL_00c7:
{
IL2CPP_RUNTIME_CLASS_INIT(CultureInfo_t4157843068_il2cpp_TypeInfo_var);
CultureInfo_t4157843068 * L_25 = CultureInfo_get_CurrentUICulture_m959203371(NULL /*static, unused*/, /*hidden argument*/NULL);
ObjectU5BU5D_t2843939325* L_26 = (ObjectU5BU5D_t2843939325*)SZArrayNew(ObjectU5BU5D_t2843939325_il2cpp_TypeInfo_var, (uint32_t)1);
ObjectU5BU5D_t2843939325* L_27 = L_26;
uint8_t L_28 = ___type0;
uint8_t L_29 = L_28;
RuntimeObject * L_30 = Box(HandshakeType_t3062346172_il2cpp_TypeInfo_var, &L_29);
String_t* L_31 = VirtFuncInvoker0< String_t* >::Invoke(3 /* System.String System.Enum::ToString() */, (Enum_t4135868527 *)L_30);
ArrayElementTypeCheck (L_27, L_31);
(L_27)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(0), (RuntimeObject *)L_31);
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_32 = String_Format_m1881875187(NULL /*static, unused*/, L_25, _stringLiteral54796683, L_27, /*hidden argument*/NULL);
TlsException_t3534743363 * L_33 = (TlsException_t3534743363 *)il2cpp_codegen_object_new(TlsException_t3534743363_il2cpp_TypeInfo_var);
TlsException__ctor_m3242533711(L_33, ((int32_t)10), L_32, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_33, NULL, ClientRecordProtocol_createServerHandshakeMessage_m2804371400_RuntimeMethod_var);
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void Mono.Security.Protocol.Tls.ClientSessionCache::.cctor()
extern "C" IL2CPP_METHOD_ATTR void ClientSessionCache__cctor_m1380704214 (RuntimeObject * __this /* static, unused */, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (ClientSessionCache__cctor_m1380704214_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
Hashtable_t1853889766 * L_0 = (Hashtable_t1853889766 *)il2cpp_codegen_object_new(Hashtable_t1853889766_il2cpp_TypeInfo_var);
Hashtable__ctor_m1815022027(L_0, /*hidden argument*/NULL);
((ClientSessionCache_t2353595803_StaticFields*)il2cpp_codegen_static_fields_for(ClientSessionCache_t2353595803_il2cpp_TypeInfo_var))->set_cache_0(L_0);
RuntimeObject * L_1 = (RuntimeObject *)il2cpp_codegen_object_new(RuntimeObject_il2cpp_TypeInfo_var);
Object__ctor_m297566312(L_1, /*hidden argument*/NULL);
((ClientSessionCache_t2353595803_StaticFields*)il2cpp_codegen_static_fields_for(ClientSessionCache_t2353595803_il2cpp_TypeInfo_var))->set_locker_1(L_1);
return;
}
}
// System.Void Mono.Security.Protocol.Tls.ClientSessionCache::Add(System.String,System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void ClientSessionCache_Add_m964342678 (RuntimeObject * __this /* static, unused */, String_t* ___host0, ByteU5BU5D_t4116647657* ___id1, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (ClientSessionCache_Add_m964342678_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
RuntimeObject * V_0 = NULL;
String_t* V_1 = NULL;
ClientSessionInfo_t1775821398 * V_2 = NULL;
Exception_t * __last_unhandled_exception = 0;
NO_UNUSED_WARNING (__last_unhandled_exception);
Exception_t * __exception_local = 0;
NO_UNUSED_WARNING (__exception_local);
int32_t __leave_target = -1;
NO_UNUSED_WARNING (__leave_target);
{
IL2CPP_RUNTIME_CLASS_INIT(ClientSessionCache_t2353595803_il2cpp_TypeInfo_var);
RuntimeObject * L_0 = ((ClientSessionCache_t2353595803_StaticFields*)il2cpp_codegen_static_fields_for(ClientSessionCache_t2353595803_il2cpp_TypeInfo_var))->get_locker_1();
V_0 = L_0;
RuntimeObject * L_1 = V_0;
Monitor_Enter_m2249409497(NULL /*static, unused*/, L_1, /*hidden argument*/NULL);
}
IL_000c:
try
{ // begin try (depth: 1)
{
ByteU5BU5D_t4116647657* L_2 = ___id1;
IL2CPP_RUNTIME_CLASS_INIT(BitConverter_t3118986983_il2cpp_TypeInfo_var);
String_t* L_3 = BitConverter_ToString_m3464863163(NULL /*static, unused*/, L_2, /*hidden argument*/NULL);
V_1 = L_3;
IL2CPP_RUNTIME_CLASS_INIT(ClientSessionCache_t2353595803_il2cpp_TypeInfo_var);
Hashtable_t1853889766 * L_4 = ((ClientSessionCache_t2353595803_StaticFields*)il2cpp_codegen_static_fields_for(ClientSessionCache_t2353595803_il2cpp_TypeInfo_var))->get_cache_0();
String_t* L_5 = V_1;
RuntimeObject * L_6 = VirtFuncInvoker1< RuntimeObject *, RuntimeObject * >::Invoke(22 /* System.Object System.Collections.Hashtable::get_Item(System.Object) */, L_4, L_5);
V_2 = ((ClientSessionInfo_t1775821398 *)CastclassClass((RuntimeObject*)L_6, ClientSessionInfo_t1775821398_il2cpp_TypeInfo_var));
ClientSessionInfo_t1775821398 * L_7 = V_2;
if (L_7)
{
goto IL_0041;
}
}
IL_002a:
{
IL2CPP_RUNTIME_CLASS_INIT(ClientSessionCache_t2353595803_il2cpp_TypeInfo_var);
Hashtable_t1853889766 * L_8 = ((ClientSessionCache_t2353595803_StaticFields*)il2cpp_codegen_static_fields_for(ClientSessionCache_t2353595803_il2cpp_TypeInfo_var))->get_cache_0();
String_t* L_9 = V_1;
String_t* L_10 = ___host0;
ByteU5BU5D_t4116647657* L_11 = ___id1;
ClientSessionInfo_t1775821398 * L_12 = (ClientSessionInfo_t1775821398 *)il2cpp_codegen_object_new(ClientSessionInfo_t1775821398_il2cpp_TypeInfo_var);
ClientSessionInfo__ctor_m2436192270(L_12, L_10, L_11, /*hidden argument*/NULL);
VirtActionInvoker2< RuntimeObject *, RuntimeObject * >::Invoke(25 /* System.Void System.Collections.Hashtable::Add(System.Object,System.Object) */, L_8, L_9, L_12);
goto IL_0080;
}
IL_0041:
{
ClientSessionInfo_t1775821398 * L_13 = V_2;
String_t* L_14 = ClientSessionInfo_get_HostName_m2118440995(L_13, /*hidden argument*/NULL);
String_t* L_15 = ___host0;
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
bool L_16 = String_op_Equality_m920492651(NULL /*static, unused*/, L_14, L_15, /*hidden argument*/NULL);
if (!L_16)
{
goto IL_005d;
}
}
IL_0052:
{
ClientSessionInfo_t1775821398 * L_17 = V_2;
ClientSessionInfo_KeepAlive_m1020179566(L_17, /*hidden argument*/NULL);
goto IL_0080;
}
IL_005d:
{
ClientSessionInfo_t1775821398 * L_18 = V_2;
ClientSessionInfo_Dispose_m1535509451(L_18, /*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(ClientSessionCache_t2353595803_il2cpp_TypeInfo_var);
Hashtable_t1853889766 * L_19 = ((ClientSessionCache_t2353595803_StaticFields*)il2cpp_codegen_static_fields_for(ClientSessionCache_t2353595803_il2cpp_TypeInfo_var))->get_cache_0();
String_t* L_20 = V_1;
VirtActionInvoker1< RuntimeObject * >::Invoke(29 /* System.Void System.Collections.Hashtable::Remove(System.Object) */, L_19, L_20);
Hashtable_t1853889766 * L_21 = ((ClientSessionCache_t2353595803_StaticFields*)il2cpp_codegen_static_fields_for(ClientSessionCache_t2353595803_il2cpp_TypeInfo_var))->get_cache_0();
String_t* L_22 = V_1;
String_t* L_23 = ___host0;
ByteU5BU5D_t4116647657* L_24 = ___id1;
ClientSessionInfo_t1775821398 * L_25 = (ClientSessionInfo_t1775821398 *)il2cpp_codegen_object_new(ClientSessionInfo_t1775821398_il2cpp_TypeInfo_var);
ClientSessionInfo__ctor_m2436192270(L_25, L_23, L_24, /*hidden argument*/NULL);
VirtActionInvoker2< RuntimeObject *, RuntimeObject * >::Invoke(25 /* System.Void System.Collections.Hashtable::Add(System.Object,System.Object) */, L_21, L_22, L_25);
}
IL_0080:
{
IL2CPP_LEAVE(0x8C, FINALLY_0085);
}
} // end try (depth: 1)
catch(Il2CppExceptionWrapper& e)
{
__last_unhandled_exception = (Exception_t *)e.ex;
goto FINALLY_0085;
}
FINALLY_0085:
{ // begin finally (depth: 1)
RuntimeObject * L_26 = V_0;
Monitor_Exit_m3585316909(NULL /*static, unused*/, L_26, /*hidden argument*/NULL);
IL2CPP_END_FINALLY(133)
} // end finally (depth: 1)
IL2CPP_CLEANUP(133)
{
IL2CPP_JUMP_TBL(0x8C, IL_008c)
IL2CPP_RETHROW_IF_UNHANDLED(Exception_t *)
}
IL_008c:
{
return;
}
}
// System.Byte[] Mono.Security.Protocol.Tls.ClientSessionCache::FromHost(System.String)
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* ClientSessionCache_FromHost_m273325760 (RuntimeObject * __this /* static, unused */, String_t* ___host0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (ClientSessionCache_FromHost_m273325760_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
RuntimeObject * V_0 = NULL;
ClientSessionInfo_t1775821398 * V_1 = NULL;
RuntimeObject* V_2 = NULL;
ByteU5BU5D_t4116647657* V_3 = NULL;
RuntimeObject* V_4 = NULL;
Exception_t * __last_unhandled_exception = 0;
NO_UNUSED_WARNING (__last_unhandled_exception);
Exception_t * __exception_local = 0;
NO_UNUSED_WARNING (__exception_local);
int32_t __leave_target = -1;
NO_UNUSED_WARNING (__leave_target);
{
IL2CPP_RUNTIME_CLASS_INIT(ClientSessionCache_t2353595803_il2cpp_TypeInfo_var);
RuntimeObject * L_0 = ((ClientSessionCache_t2353595803_StaticFields*)il2cpp_codegen_static_fields_for(ClientSessionCache_t2353595803_il2cpp_TypeInfo_var))->get_locker_1();
V_0 = L_0;
RuntimeObject * L_1 = V_0;
Monitor_Enter_m2249409497(NULL /*static, unused*/, L_1, /*hidden argument*/NULL);
}
IL_000c:
try
{ // begin try (depth: 1)
{
IL2CPP_RUNTIME_CLASS_INIT(ClientSessionCache_t2353595803_il2cpp_TypeInfo_var);
Hashtable_t1853889766 * L_2 = ((ClientSessionCache_t2353595803_StaticFields*)il2cpp_codegen_static_fields_for(ClientSessionCache_t2353595803_il2cpp_TypeInfo_var))->get_cache_0();
RuntimeObject* L_3 = VirtFuncInvoker0< RuntimeObject* >::Invoke(21 /* System.Collections.ICollection System.Collections.Hashtable::get_Values() */, L_2);
RuntimeObject* L_4 = InterfaceFuncInvoker0< RuntimeObject* >::Invoke(0 /* System.Collections.IEnumerator System.Collections.IEnumerable::GetEnumerator() */, IEnumerable_t1941168011_il2cpp_TypeInfo_var, L_3);
V_2 = L_4;
}
IL_001c:
try
{ // begin try (depth: 2)
{
goto IL_005b;
}
IL_0021:
{
RuntimeObject* L_5 = V_2;
RuntimeObject * L_6 = InterfaceFuncInvoker0< RuntimeObject * >::Invoke(0 /* System.Object System.Collections.IEnumerator::get_Current() */, IEnumerator_t1853284238_il2cpp_TypeInfo_var, L_5);
V_1 = ((ClientSessionInfo_t1775821398 *)CastclassClass((RuntimeObject*)L_6, ClientSessionInfo_t1775821398_il2cpp_TypeInfo_var));
ClientSessionInfo_t1775821398 * L_7 = V_1;
String_t* L_8 = ClientSessionInfo_get_HostName_m2118440995(L_7, /*hidden argument*/NULL);
String_t* L_9 = ___host0;
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
bool L_10 = String_op_Equality_m920492651(NULL /*static, unused*/, L_8, L_9, /*hidden argument*/NULL);
if (!L_10)
{
goto IL_005b;
}
}
IL_003e:
{
ClientSessionInfo_t1775821398 * L_11 = V_1;
bool L_12 = ClientSessionInfo_get_Valid_m1260893789(L_11, /*hidden argument*/NULL);
if (!L_12)
{
goto IL_005b;
}
}
IL_0049:
{
ClientSessionInfo_t1775821398 * L_13 = V_1;
ClientSessionInfo_KeepAlive_m1020179566(L_13, /*hidden argument*/NULL);
ClientSessionInfo_t1775821398 * L_14 = V_1;
ByteU5BU5D_t4116647657* L_15 = ClientSessionInfo_get_Id_m2119140021(L_14, /*hidden argument*/NULL);
V_3 = L_15;
IL2CPP_LEAVE(0x93, FINALLY_006b);
}
IL_005b:
{
RuntimeObject* L_16 = V_2;
bool L_17 = InterfaceFuncInvoker0< bool >::Invoke(1 /* System.Boolean System.Collections.IEnumerator::MoveNext() */, IEnumerator_t1853284238_il2cpp_TypeInfo_var, L_16);
if (L_17)
{
goto IL_0021;
}
}
IL_0066:
{
IL2CPP_LEAVE(0x80, FINALLY_006b);
}
} // end try (depth: 2)
catch(Il2CppExceptionWrapper& e)
{
__last_unhandled_exception = (Exception_t *)e.ex;
goto FINALLY_006b;
}
FINALLY_006b:
{ // begin finally (depth: 2)
{
RuntimeObject* L_18 = V_2;
V_4 = ((RuntimeObject*)IsInst((RuntimeObject*)L_18, IDisposable_t3640265483_il2cpp_TypeInfo_var));
RuntimeObject* L_19 = V_4;
if (L_19)
{
goto IL_0078;
}
}
IL_0077:
{
IL2CPP_END_FINALLY(107)
}
IL_0078:
{
RuntimeObject* L_20 = V_4;
InterfaceActionInvoker0::Invoke(0 /* System.Void System.IDisposable::Dispose() */, IDisposable_t3640265483_il2cpp_TypeInfo_var, L_20);
IL2CPP_END_FINALLY(107)
}
} // end finally (depth: 2)
IL2CPP_CLEANUP(107)
{
IL2CPP_END_CLEANUP(0x93, FINALLY_008c);
IL2CPP_JUMP_TBL(0x80, IL_0080)
IL2CPP_RETHROW_IF_UNHANDLED(Exception_t *)
}
IL_0080:
{
V_3 = (ByteU5BU5D_t4116647657*)NULL;
IL2CPP_LEAVE(0x93, FINALLY_008c);
}
IL_0087:
{
; // IL_0087: leave IL_0093
}
} // end try (depth: 1)
catch(Il2CppExceptionWrapper& e)
{
__last_unhandled_exception = (Exception_t *)e.ex;
goto FINALLY_008c;
}
FINALLY_008c:
{ // begin finally (depth: 1)
RuntimeObject * L_21 = V_0;
Monitor_Exit_m3585316909(NULL /*static, unused*/, L_21, /*hidden argument*/NULL);
IL2CPP_END_FINALLY(140)
} // end finally (depth: 1)
IL2CPP_CLEANUP(140)
{
IL2CPP_JUMP_TBL(0x93, IL_0093)
IL2CPP_RETHROW_IF_UNHANDLED(Exception_t *)
}
IL_0093:
{
ByteU5BU5D_t4116647657* L_22 = V_3;
return L_22;
}
}
// Mono.Security.Protocol.Tls.ClientSessionInfo Mono.Security.Protocol.Tls.ClientSessionCache::FromContext(Mono.Security.Protocol.Tls.Context,System.Boolean)
extern "C" IL2CPP_METHOD_ATTR ClientSessionInfo_t1775821398 * ClientSessionCache_FromContext_m343076119 (RuntimeObject * __this /* static, unused */, Context_t3971234707 * ___context0, bool ___checkValidity1, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (ClientSessionCache_FromContext_m343076119_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
ByteU5BU5D_t4116647657* V_0 = NULL;
String_t* V_1 = NULL;
ClientSessionInfo_t1775821398 * V_2 = NULL;
{
Context_t3971234707 * L_0 = ___context0;
if (L_0)
{
goto IL_0008;
}
}
{
return (ClientSessionInfo_t1775821398 *)NULL;
}
IL_0008:
{
Context_t3971234707 * L_1 = ___context0;
ByteU5BU5D_t4116647657* L_2 = Context_get_SessionId_m1086671147(L_1, /*hidden argument*/NULL);
V_0 = L_2;
ByteU5BU5D_t4116647657* L_3 = V_0;
if (!L_3)
{
goto IL_001d;
}
}
{
ByteU5BU5D_t4116647657* L_4 = V_0;
if ((((int32_t)((int32_t)(((RuntimeArray *)L_4)->max_length)))))
{
goto IL_001f;
}
}
IL_001d:
{
return (ClientSessionInfo_t1775821398 *)NULL;
}
IL_001f:
{
ByteU5BU5D_t4116647657* L_5 = V_0;
IL2CPP_RUNTIME_CLASS_INIT(BitConverter_t3118986983_il2cpp_TypeInfo_var);
String_t* L_6 = BitConverter_ToString_m3464863163(NULL /*static, unused*/, L_5, /*hidden argument*/NULL);
V_1 = L_6;
IL2CPP_RUNTIME_CLASS_INIT(ClientSessionCache_t2353595803_il2cpp_TypeInfo_var);
Hashtable_t1853889766 * L_7 = ((ClientSessionCache_t2353595803_StaticFields*)il2cpp_codegen_static_fields_for(ClientSessionCache_t2353595803_il2cpp_TypeInfo_var))->get_cache_0();
String_t* L_8 = V_1;
RuntimeObject * L_9 = VirtFuncInvoker1< RuntimeObject *, RuntimeObject * >::Invoke(22 /* System.Object System.Collections.Hashtable::get_Item(System.Object) */, L_7, L_8);
V_2 = ((ClientSessionInfo_t1775821398 *)CastclassClass((RuntimeObject*)L_9, ClientSessionInfo_t1775821398_il2cpp_TypeInfo_var));
ClientSessionInfo_t1775821398 * L_10 = V_2;
if (L_10)
{
goto IL_003f;
}
}
{
return (ClientSessionInfo_t1775821398 *)NULL;
}
IL_003f:
{
Context_t3971234707 * L_11 = ___context0;
TlsClientSettings_t2486039503 * L_12 = Context_get_ClientSettings_m2874391194(L_11, /*hidden argument*/NULL);
String_t* L_13 = TlsClientSettings_get_TargetHost_m2463481414(L_12, /*hidden argument*/NULL);
ClientSessionInfo_t1775821398 * L_14 = V_2;
String_t* L_15 = ClientSessionInfo_get_HostName_m2118440995(L_14, /*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
bool L_16 = String_op_Inequality_m215368492(NULL /*static, unused*/, L_13, L_15, /*hidden argument*/NULL);
if (!L_16)
{
goto IL_005c;
}
}
{
return (ClientSessionInfo_t1775821398 *)NULL;
}
IL_005c:
{
bool L_17 = ___checkValidity1;
if (!L_17)
{
goto IL_0080;
}
}
{
ClientSessionInfo_t1775821398 * L_18 = V_2;
bool L_19 = ClientSessionInfo_get_Valid_m1260893789(L_18, /*hidden argument*/NULL);
if (L_19)
{
goto IL_0080;
}
}
{
ClientSessionInfo_t1775821398 * L_20 = V_2;
ClientSessionInfo_Dispose_m1535509451(L_20, /*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(ClientSessionCache_t2353595803_il2cpp_TypeInfo_var);
Hashtable_t1853889766 * L_21 = ((ClientSessionCache_t2353595803_StaticFields*)il2cpp_codegen_static_fields_for(ClientSessionCache_t2353595803_il2cpp_TypeInfo_var))->get_cache_0();
String_t* L_22 = V_1;
VirtActionInvoker1< RuntimeObject * >::Invoke(29 /* System.Void System.Collections.Hashtable::Remove(System.Object) */, L_21, L_22);
return (ClientSessionInfo_t1775821398 *)NULL;
}
IL_0080:
{
ClientSessionInfo_t1775821398 * L_23 = V_2;
return L_23;
}
}
// System.Boolean Mono.Security.Protocol.Tls.ClientSessionCache::SetContextInCache(Mono.Security.Protocol.Tls.Context)
extern "C" IL2CPP_METHOD_ATTR bool ClientSessionCache_SetContextInCache_m2875733100 (RuntimeObject * __this /* static, unused */, Context_t3971234707 * ___context0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (ClientSessionCache_SetContextInCache_m2875733100_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
RuntimeObject * V_0 = NULL;
ClientSessionInfo_t1775821398 * V_1 = NULL;
bool V_2 = false;
Exception_t * __last_unhandled_exception = 0;
NO_UNUSED_WARNING (__last_unhandled_exception);
Exception_t * __exception_local = 0;
NO_UNUSED_WARNING (__exception_local);
int32_t __leave_target = -1;
NO_UNUSED_WARNING (__leave_target);
{
IL2CPP_RUNTIME_CLASS_INIT(ClientSessionCache_t2353595803_il2cpp_TypeInfo_var);
RuntimeObject * L_0 = ((ClientSessionCache_t2353595803_StaticFields*)il2cpp_codegen_static_fields_for(ClientSessionCache_t2353595803_il2cpp_TypeInfo_var))->get_locker_1();
V_0 = L_0;
RuntimeObject * L_1 = V_0;
Monitor_Enter_m2249409497(NULL /*static, unused*/, L_1, /*hidden argument*/NULL);
}
IL_000c:
try
{ // begin try (depth: 1)
{
Context_t3971234707 * L_2 = ___context0;
IL2CPP_RUNTIME_CLASS_INIT(ClientSessionCache_t2353595803_il2cpp_TypeInfo_var);
ClientSessionInfo_t1775821398 * L_3 = ClientSessionCache_FromContext_m343076119(NULL /*static, unused*/, L_2, (bool)0, /*hidden argument*/NULL);
V_1 = L_3;
ClientSessionInfo_t1775821398 * L_4 = V_1;
if (L_4)
{
goto IL_0021;
}
}
IL_001a:
{
V_2 = (bool)0;
IL2CPP_LEAVE(0x41, FINALLY_003a);
}
IL_0021:
{
ClientSessionInfo_t1775821398 * L_5 = V_1;
Context_t3971234707 * L_6 = ___context0;
ClientSessionInfo_GetContext_m1679628259(L_5, L_6, /*hidden argument*/NULL);
ClientSessionInfo_t1775821398 * L_7 = V_1;
ClientSessionInfo_KeepAlive_m1020179566(L_7, /*hidden argument*/NULL);
V_2 = (bool)1;
IL2CPP_LEAVE(0x41, FINALLY_003a);
}
IL_0035:
{
; // IL_0035: leave IL_0041
}
} // end try (depth: 1)
catch(Il2CppExceptionWrapper& e)
{
__last_unhandled_exception = (Exception_t *)e.ex;
goto FINALLY_003a;
}
FINALLY_003a:
{ // begin finally (depth: 1)
RuntimeObject * L_8 = V_0;
Monitor_Exit_m3585316909(NULL /*static, unused*/, L_8, /*hidden argument*/NULL);
IL2CPP_END_FINALLY(58)
} // end finally (depth: 1)
IL2CPP_CLEANUP(58)
{
IL2CPP_JUMP_TBL(0x41, IL_0041)
IL2CPP_RETHROW_IF_UNHANDLED(Exception_t *)
}
IL_0041:
{
bool L_9 = V_2;
return L_9;
}
}
// System.Boolean Mono.Security.Protocol.Tls.ClientSessionCache::SetContextFromCache(Mono.Security.Protocol.Tls.Context)
extern "C" IL2CPP_METHOD_ATTR bool ClientSessionCache_SetContextFromCache_m3781380849 (RuntimeObject * __this /* static, unused */, Context_t3971234707 * ___context0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (ClientSessionCache_SetContextFromCache_m3781380849_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
RuntimeObject * V_0 = NULL;
ClientSessionInfo_t1775821398 * V_1 = NULL;
bool V_2 = false;
Exception_t * __last_unhandled_exception = 0;
NO_UNUSED_WARNING (__last_unhandled_exception);
Exception_t * __exception_local = 0;
NO_UNUSED_WARNING (__exception_local);
int32_t __leave_target = -1;
NO_UNUSED_WARNING (__leave_target);
{
IL2CPP_RUNTIME_CLASS_INIT(ClientSessionCache_t2353595803_il2cpp_TypeInfo_var);
RuntimeObject * L_0 = ((ClientSessionCache_t2353595803_StaticFields*)il2cpp_codegen_static_fields_for(ClientSessionCache_t2353595803_il2cpp_TypeInfo_var))->get_locker_1();
V_0 = L_0;
RuntimeObject * L_1 = V_0;
Monitor_Enter_m2249409497(NULL /*static, unused*/, L_1, /*hidden argument*/NULL);
}
IL_000c:
try
{ // begin try (depth: 1)
{
Context_t3971234707 * L_2 = ___context0;
IL2CPP_RUNTIME_CLASS_INIT(ClientSessionCache_t2353595803_il2cpp_TypeInfo_var);
ClientSessionInfo_t1775821398 * L_3 = ClientSessionCache_FromContext_m343076119(NULL /*static, unused*/, L_2, (bool)1, /*hidden argument*/NULL);
V_1 = L_3;
ClientSessionInfo_t1775821398 * L_4 = V_1;
if (L_4)
{
goto IL_0021;
}
}
IL_001a:
{
V_2 = (bool)0;
IL2CPP_LEAVE(0x41, FINALLY_003a);
}
IL_0021:
{
ClientSessionInfo_t1775821398 * L_5 = V_1;
Context_t3971234707 * L_6 = ___context0;
ClientSessionInfo_SetContext_m2115875186(L_5, L_6, /*hidden argument*/NULL);
ClientSessionInfo_t1775821398 * L_7 = V_1;
ClientSessionInfo_KeepAlive_m1020179566(L_7, /*hidden argument*/NULL);
V_2 = (bool)1;
IL2CPP_LEAVE(0x41, FINALLY_003a);
}
IL_0035:
{
; // IL_0035: leave IL_0041
}
} // end try (depth: 1)
catch(Il2CppExceptionWrapper& e)
{
__last_unhandled_exception = (Exception_t *)e.ex;
goto FINALLY_003a;
}
FINALLY_003a:
{ // begin finally (depth: 1)
RuntimeObject * L_8 = V_0;
Monitor_Exit_m3585316909(NULL /*static, unused*/, L_8, /*hidden argument*/NULL);
IL2CPP_END_FINALLY(58)
} // end finally (depth: 1)
IL2CPP_CLEANUP(58)
{
IL2CPP_JUMP_TBL(0x41, IL_0041)
IL2CPP_RETHROW_IF_UNHANDLED(Exception_t *)
}
IL_0041:
{
bool L_9 = V_2;
return L_9;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void Mono.Security.Protocol.Tls.ClientSessionInfo::.ctor(System.String,System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void ClientSessionInfo__ctor_m2436192270 (ClientSessionInfo_t1775821398 * __this, String_t* ___hostname0, ByteU5BU5D_t4116647657* ___id1, const RuntimeMethod* method)
{
{
Object__ctor_m297566312(__this, /*hidden argument*/NULL);
String_t* L_0 = ___hostname0;
__this->set_host_3(L_0);
ByteU5BU5D_t4116647657* L_1 = ___id1;
__this->set_sid_4(L_1);
ClientSessionInfo_KeepAlive_m1020179566(__this, /*hidden argument*/NULL);
return;
}
}
// System.Void Mono.Security.Protocol.Tls.ClientSessionInfo::.cctor()
extern "C" IL2CPP_METHOD_ATTR void ClientSessionInfo__cctor_m1143076802 (RuntimeObject * __this /* static, unused */, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (ClientSessionInfo__cctor_m1143076802_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
String_t* V_0 = NULL;
Exception_t * __last_unhandled_exception = 0;
NO_UNUSED_WARNING (__last_unhandled_exception);
Exception_t * __exception_local = 0;
NO_UNUSED_WARNING (__exception_local);
int32_t __leave_target = -1;
NO_UNUSED_WARNING (__leave_target);
{
String_t* L_0 = Environment_GetEnvironmentVariable_m394552009(NULL /*static, unused*/, _stringLiteral1601143795, /*hidden argument*/NULL);
V_0 = L_0;
String_t* L_1 = V_0;
if (L_1)
{
goto IL_0020;
}
}
{
((ClientSessionInfo_t1775821398_StaticFields*)il2cpp_codegen_static_fields_for(ClientSessionInfo_t1775821398_il2cpp_TypeInfo_var))->set_ValidityInterval_0(((int32_t)180));
goto IL_0040;
}
IL_0020:
try
{ // begin try (depth: 1)
String_t* L_2 = V_0;
int32_t L_3 = Int32_Parse_m1033611559(NULL /*static, unused*/, L_2, /*hidden argument*/NULL);
((ClientSessionInfo_t1775821398_StaticFields*)il2cpp_codegen_static_fields_for(ClientSessionInfo_t1775821398_il2cpp_TypeInfo_var))->set_ValidityInterval_0(L_3);
goto IL_0040;
} // end try (depth: 1)
catch(Il2CppExceptionWrapper& e)
{
__exception_local = (Exception_t *)e.ex;
if(il2cpp_codegen_class_is_assignable_from (RuntimeObject_il2cpp_TypeInfo_var, il2cpp_codegen_object_class(e.ex)))
goto CATCH_0030;
throw e;
}
CATCH_0030:
{ // begin catch(System.Object)
((ClientSessionInfo_t1775821398_StaticFields*)il2cpp_codegen_static_fields_for(ClientSessionInfo_t1775821398_il2cpp_TypeInfo_var))->set_ValidityInterval_0(((int32_t)180));
goto IL_0040;
} // end catch (depth: 1)
IL_0040:
{
return;
}
}
// System.Void Mono.Security.Protocol.Tls.ClientSessionInfo::Finalize()
extern "C" IL2CPP_METHOD_ATTR void ClientSessionInfo_Finalize_m2165787049 (ClientSessionInfo_t1775821398 * __this, const RuntimeMethod* method)
{
Exception_t * __last_unhandled_exception = 0;
NO_UNUSED_WARNING (__last_unhandled_exception);
Exception_t * __exception_local = 0;
NO_UNUSED_WARNING (__exception_local);
int32_t __leave_target = -1;
NO_UNUSED_WARNING (__leave_target);
IL_0000:
try
{ // begin try (depth: 1)
ClientSessionInfo_Dispose_m3253728296(__this, (bool)0, /*hidden argument*/NULL);
IL2CPP_LEAVE(0x13, FINALLY_000c);
} // end try (depth: 1)
catch(Il2CppExceptionWrapper& e)
{
__last_unhandled_exception = (Exception_t *)e.ex;
goto FINALLY_000c;
}
FINALLY_000c:
{ // begin finally (depth: 1)
Object_Finalize_m3076187857(__this, /*hidden argument*/NULL);
IL2CPP_END_FINALLY(12)
} // end finally (depth: 1)
IL2CPP_CLEANUP(12)
{
IL2CPP_JUMP_TBL(0x13, IL_0013)
IL2CPP_RETHROW_IF_UNHANDLED(Exception_t *)
}
IL_0013:
{
return;
}
}
// System.String Mono.Security.Protocol.Tls.ClientSessionInfo::get_HostName()
extern "C" IL2CPP_METHOD_ATTR String_t* ClientSessionInfo_get_HostName_m2118440995 (ClientSessionInfo_t1775821398 * __this, const RuntimeMethod* method)
{
{
String_t* L_0 = __this->get_host_3();
return L_0;
}
}
// System.Byte[] Mono.Security.Protocol.Tls.ClientSessionInfo::get_Id()
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* ClientSessionInfo_get_Id_m2119140021 (ClientSessionInfo_t1775821398 * __this, const RuntimeMethod* method)
{
{
ByteU5BU5D_t4116647657* L_0 = __this->get_sid_4();
return L_0;
}
}
// System.Boolean Mono.Security.Protocol.Tls.ClientSessionInfo::get_Valid()
extern "C" IL2CPP_METHOD_ATTR bool ClientSessionInfo_get_Valid_m1260893789 (ClientSessionInfo_t1775821398 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (ClientSessionInfo_get_Valid_m1260893789_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
int32_t G_B3_0 = 0;
{
ByteU5BU5D_t4116647657* L_0 = __this->get_masterSecret_5();
if (!L_0)
{
goto IL_001d;
}
}
{
DateTime_t3738529785 L_1 = __this->get_validuntil_2();
IL2CPP_RUNTIME_CLASS_INIT(DateTime_t3738529785_il2cpp_TypeInfo_var);
DateTime_t3738529785 L_2 = DateTime_get_UtcNow_m1393945741(NULL /*static, unused*/, /*hidden argument*/NULL);
bool L_3 = DateTime_op_GreaterThan_m3768590082(NULL /*static, unused*/, L_1, L_2, /*hidden argument*/NULL);
G_B3_0 = ((int32_t)(L_3));
goto IL_001e;
}
IL_001d:
{
G_B3_0 = 0;
}
IL_001e:
{
return (bool)G_B3_0;
}
}
// System.Void Mono.Security.Protocol.Tls.ClientSessionInfo::GetContext(Mono.Security.Protocol.Tls.Context)
extern "C" IL2CPP_METHOD_ATTR void ClientSessionInfo_GetContext_m1679628259 (ClientSessionInfo_t1775821398 * __this, Context_t3971234707 * ___context0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (ClientSessionInfo_GetContext_m1679628259_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
ClientSessionInfo_CheckDisposed_m1172439856(__this, /*hidden argument*/NULL);
Context_t3971234707 * L_0 = ___context0;
ByteU5BU5D_t4116647657* L_1 = Context_get_MasterSecret_m676083615(L_0, /*hidden argument*/NULL);
if (!L_1)
{
goto IL_0027;
}
}
{
Context_t3971234707 * L_2 = ___context0;
ByteU5BU5D_t4116647657* L_3 = Context_get_MasterSecret_m676083615(L_2, /*hidden argument*/NULL);
RuntimeObject * L_4 = Array_Clone_m2672907798((RuntimeArray *)(RuntimeArray *)L_3, /*hidden argument*/NULL);
__this->set_masterSecret_5(((ByteU5BU5D_t4116647657*)Castclass((RuntimeObject*)L_4, ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var)));
}
IL_0027:
{
return;
}
}
// System.Void Mono.Security.Protocol.Tls.ClientSessionInfo::SetContext(Mono.Security.Protocol.Tls.Context)
extern "C" IL2CPP_METHOD_ATTR void ClientSessionInfo_SetContext_m2115875186 (ClientSessionInfo_t1775821398 * __this, Context_t3971234707 * ___context0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (ClientSessionInfo_SetContext_m2115875186_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
ClientSessionInfo_CheckDisposed_m1172439856(__this, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_0 = __this->get_masterSecret_5();
if (!L_0)
{
goto IL_0027;
}
}
{
Context_t3971234707 * L_1 = ___context0;
ByteU5BU5D_t4116647657* L_2 = __this->get_masterSecret_5();
RuntimeObject * L_3 = Array_Clone_m2672907798((RuntimeArray *)(RuntimeArray *)L_2, /*hidden argument*/NULL);
Context_set_MasterSecret_m3419105191(L_1, ((ByteU5BU5D_t4116647657*)Castclass((RuntimeObject*)L_3, ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var)), /*hidden argument*/NULL);
}
IL_0027:
{
return;
}
}
// System.Void Mono.Security.Protocol.Tls.ClientSessionInfo::KeepAlive()
extern "C" IL2CPP_METHOD_ATTR void ClientSessionInfo_KeepAlive_m1020179566 (ClientSessionInfo_t1775821398 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (ClientSessionInfo_KeepAlive_m1020179566_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
DateTime_t3738529785 V_0;
memset(&V_0, 0, sizeof(V_0));
{
ClientSessionInfo_CheckDisposed_m1172439856(__this, /*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(DateTime_t3738529785_il2cpp_TypeInfo_var);
DateTime_t3738529785 L_0 = DateTime_get_UtcNow_m1393945741(NULL /*static, unused*/, /*hidden argument*/NULL);
V_0 = L_0;
IL2CPP_RUNTIME_CLASS_INIT(ClientSessionInfo_t1775821398_il2cpp_TypeInfo_var);
int32_t L_1 = ((ClientSessionInfo_t1775821398_StaticFields*)il2cpp_codegen_static_fields_for(ClientSessionInfo_t1775821398_il2cpp_TypeInfo_var))->get_ValidityInterval_0();
DateTime_t3738529785 L_2 = DateTime_AddSeconds_m332574389((DateTime_t3738529785 *)(&V_0), (((double)((double)L_1))), /*hidden argument*/NULL);
__this->set_validuntil_2(L_2);
return;
}
}
// System.Void Mono.Security.Protocol.Tls.ClientSessionInfo::Dispose()
extern "C" IL2CPP_METHOD_ATTR void ClientSessionInfo_Dispose_m1535509451 (ClientSessionInfo_t1775821398 * __this, const RuntimeMethod* method)
{
{
ClientSessionInfo_Dispose_m3253728296(__this, (bool)1, /*hidden argument*/NULL);
GC_SuppressFinalize_m1177400158(NULL /*static, unused*/, __this, /*hidden argument*/NULL);
return;
}
}
// System.Void Mono.Security.Protocol.Tls.ClientSessionInfo::Dispose(System.Boolean)
extern "C" IL2CPP_METHOD_ATTR void ClientSessionInfo_Dispose_m3253728296 (ClientSessionInfo_t1775821398 * __this, bool ___disposing0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (ClientSessionInfo_Dispose_m3253728296_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
bool L_0 = __this->get_disposed_1();
if (L_0)
{
goto IL_004a;
}
}
{
IL2CPP_RUNTIME_CLASS_INIT(DateTime_t3738529785_il2cpp_TypeInfo_var);
DateTime_t3738529785 L_1 = ((DateTime_t3738529785_StaticFields*)il2cpp_codegen_static_fields_for(DateTime_t3738529785_il2cpp_TypeInfo_var))->get_MinValue_3();
__this->set_validuntil_2(L_1);
__this->set_host_3((String_t*)NULL);
__this->set_sid_4((ByteU5BU5D_t4116647657*)NULL);
ByteU5BU5D_t4116647657* L_2 = __this->get_masterSecret_5();
if (!L_2)
{
goto IL_004a;
}
}
{
ByteU5BU5D_t4116647657* L_3 = __this->get_masterSecret_5();
ByteU5BU5D_t4116647657* L_4 = __this->get_masterSecret_5();
Array_Clear_m2231608178(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_3, 0, (((int32_t)((int32_t)(((RuntimeArray *)L_4)->max_length)))), /*hidden argument*/NULL);
__this->set_masterSecret_5((ByteU5BU5D_t4116647657*)NULL);
}
IL_004a:
{
__this->set_disposed_1((bool)1);
return;
}
}
// System.Void Mono.Security.Protocol.Tls.ClientSessionInfo::CheckDisposed()
extern "C" IL2CPP_METHOD_ATTR void ClientSessionInfo_CheckDisposed_m1172439856 (ClientSessionInfo_t1775821398 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (ClientSessionInfo_CheckDisposed_m1172439856_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
String_t* V_0 = NULL;
{
bool L_0 = __this->get_disposed_1();
if (!L_0)
{
goto IL_001d;
}
}
{
String_t* L_1 = Locale_GetText_m3520169047(NULL /*static, unused*/, _stringLiteral3430462705, /*hidden argument*/NULL);
V_0 = L_1;
String_t* L_2 = V_0;
ObjectDisposedException_t21392786 * L_3 = (ObjectDisposedException_t21392786 *)il2cpp_codegen_object_new(ObjectDisposedException_t21392786_il2cpp_TypeInfo_var);
ObjectDisposedException__ctor_m3603759869(L_3, L_2, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_3, NULL, ClientSessionInfo_CheckDisposed_m1172439856_RuntimeMethod_var);
}
IL_001d:
{
return;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void Mono.Security.Protocol.Tls.Context::.ctor(Mono.Security.Protocol.Tls.SecurityProtocolType)
extern "C" IL2CPP_METHOD_ATTR void Context__ctor_m1288667393 (Context_t3971234707 * __this, int32_t ___securityProtocolType0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (Context__ctor_m1288667393_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
Object__ctor_m297566312(__this, /*hidden argument*/NULL);
int32_t L_0 = ___securityProtocolType0;
Context_set_SecurityProtocol_m2833661610(__this, L_0, /*hidden argument*/NULL);
__this->set_compressionMethod_2(0);
TlsServerSettings_t4144396432 * L_1 = (TlsServerSettings_t4144396432 *)il2cpp_codegen_object_new(TlsServerSettings_t4144396432_il2cpp_TypeInfo_var);
TlsServerSettings__ctor_m373357120(L_1, /*hidden argument*/NULL);
__this->set_serverSettings_3(L_1);
TlsClientSettings_t2486039503 * L_2 = (TlsClientSettings_t2486039503 *)il2cpp_codegen_object_new(TlsClientSettings_t2486039503_il2cpp_TypeInfo_var);
TlsClientSettings__ctor_m3220697265(L_2, /*hidden argument*/NULL);
__this->set_clientSettings_4(L_2);
TlsStream_t2365453965 * L_3 = (TlsStream_t2365453965 *)il2cpp_codegen_object_new(TlsStream_t2365453965_il2cpp_TypeInfo_var);
TlsStream__ctor_m787793111(L_3, /*hidden argument*/NULL);
__this->set_handshakeMessages_27(L_3);
__this->set_sessionId_1((ByteU5BU5D_t4116647657*)NULL);
__this->set_handshakeState_11(0);
RandomNumberGenerator_t386037858 * L_4 = RandomNumberGenerator_Create_m4162970280(NULL /*static, unused*/, /*hidden argument*/NULL);
__this->set_random_28(L_4);
return;
}
}
// System.Boolean Mono.Security.Protocol.Tls.Context::get_AbbreviatedHandshake()
extern "C" IL2CPP_METHOD_ATTR bool Context_get_AbbreviatedHandshake_m3907920227 (Context_t3971234707 * __this, const RuntimeMethod* method)
{
{
bool L_0 = __this->get_abbreviatedHandshake_12();
return L_0;
}
}
// System.Void Mono.Security.Protocol.Tls.Context::set_AbbreviatedHandshake(System.Boolean)
extern "C" IL2CPP_METHOD_ATTR void Context_set_AbbreviatedHandshake_m827173393 (Context_t3971234707 * __this, bool ___value0, const RuntimeMethod* method)
{
{
bool L_0 = ___value0;
__this->set_abbreviatedHandshake_12(L_0);
return;
}
}
// System.Boolean Mono.Security.Protocol.Tls.Context::get_ProtocolNegotiated()
extern "C" IL2CPP_METHOD_ATTR bool Context_get_ProtocolNegotiated_m4220412840 (Context_t3971234707 * __this, const RuntimeMethod* method)
{
{
bool L_0 = __this->get_protocolNegotiated_15();
return L_0;
}
}
// System.Void Mono.Security.Protocol.Tls.Context::set_ProtocolNegotiated(System.Boolean)
extern "C" IL2CPP_METHOD_ATTR void Context_set_ProtocolNegotiated_m2904861662 (Context_t3971234707 * __this, bool ___value0, const RuntimeMethod* method)
{
{
bool L_0 = ___value0;
__this->set_protocolNegotiated_15(L_0);
return;
}
}
// Mono.Security.Protocol.Tls.SecurityProtocolType Mono.Security.Protocol.Tls.Context::get_SecurityProtocol()
extern "C" IL2CPP_METHOD_ATTR int32_t Context_get_SecurityProtocol_m3228286292 (Context_t3971234707 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (Context_get_SecurityProtocol_m3228286292_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
int32_t L_0 = __this->get_securityProtocol_0();
if ((((int32_t)((int32_t)((int32_t)L_0&(int32_t)((int32_t)192)))) == ((int32_t)((int32_t)192))))
{
goto IL_002c;
}
}
{
int32_t L_1 = __this->get_securityProtocol_0();
if ((!(((uint32_t)((int32_t)((int32_t)L_1&(int32_t)((int32_t)-1073741824)))) == ((uint32_t)((int32_t)-1073741824)))))
{
goto IL_0032;
}
}
IL_002c:
{
return (int32_t)(((int32_t)192));
}
IL_0032:
{
int32_t L_2 = __this->get_securityProtocol_0();
if ((!(((uint32_t)((int32_t)((int32_t)L_2&(int32_t)((int32_t)48)))) == ((uint32_t)((int32_t)48)))))
{
goto IL_0045;
}
}
{
return (int32_t)(((int32_t)48));
}
IL_0045:
{
NotSupportedException_t1314879016 * L_3 = (NotSupportedException_t1314879016 *)il2cpp_codegen_object_new(NotSupportedException_t1314879016_il2cpp_TypeInfo_var);
NotSupportedException__ctor_m2494070935(L_3, _stringLiteral3034282783, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_3, NULL, Context_get_SecurityProtocol_m3228286292_RuntimeMethod_var);
}
}
// System.Void Mono.Security.Protocol.Tls.Context::set_SecurityProtocol(Mono.Security.Protocol.Tls.SecurityProtocolType)
extern "C" IL2CPP_METHOD_ATTR void Context_set_SecurityProtocol_m2833661610 (Context_t3971234707 * __this, int32_t ___value0, const RuntimeMethod* method)
{
{
int32_t L_0 = ___value0;
__this->set_securityProtocol_0(L_0);
return;
}
}
// Mono.Security.Protocol.Tls.SecurityProtocolType Mono.Security.Protocol.Tls.Context::get_SecurityProtocolFlags()
extern "C" IL2CPP_METHOD_ATTR int32_t Context_get_SecurityProtocolFlags_m2022471746 (Context_t3971234707 * __this, const RuntimeMethod* method)
{
{
int32_t L_0 = __this->get_securityProtocol_0();
return L_0;
}
}
// System.Int16 Mono.Security.Protocol.Tls.Context::get_Protocol()
extern "C" IL2CPP_METHOD_ATTR int16_t Context_get_Protocol_m1078422015 (Context_t3971234707 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (Context_get_Protocol_m1078422015_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
int32_t V_0 = 0;
{
int32_t L_0 = Context_get_SecurityProtocol_m3228286292(__this, /*hidden argument*/NULL);
V_0 = L_0;
int32_t L_1 = V_0;
if ((((int32_t)L_1) == ((int32_t)((int32_t)-1073741824))))
{
goto IL_0032;
}
}
{
int32_t L_2 = V_0;
if ((((int32_t)L_2) == ((int32_t)((int32_t)12))))
{
goto IL_003e;
}
}
{
int32_t L_3 = V_0;
if ((((int32_t)L_3) == ((int32_t)((int32_t)48))))
{
goto IL_0038;
}
}
{
int32_t L_4 = V_0;
if ((((int32_t)L_4) == ((int32_t)((int32_t)192))))
{
goto IL_0032;
}
}
{
goto IL_003e;
}
IL_0032:
{
return (int16_t)((int32_t)769);
}
IL_0038:
{
return (int16_t)((int32_t)768);
}
IL_003e:
{
NotSupportedException_t1314879016 * L_5 = (NotSupportedException_t1314879016 *)il2cpp_codegen_object_new(NotSupportedException_t1314879016_il2cpp_TypeInfo_var);
NotSupportedException__ctor_m2494070935(L_5, _stringLiteral3034282783, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_5, NULL, Context_get_Protocol_m1078422015_RuntimeMethod_var);
}
}
// System.Byte[] Mono.Security.Protocol.Tls.Context::get_SessionId()
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* Context_get_SessionId_m1086671147 (Context_t3971234707 * __this, const RuntimeMethod* method)
{
{
ByteU5BU5D_t4116647657* L_0 = __this->get_sessionId_1();
return L_0;
}
}
// System.Void Mono.Security.Protocol.Tls.Context::set_SessionId(System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void Context_set_SessionId_m942328427 (Context_t3971234707 * __this, ByteU5BU5D_t4116647657* ___value0, const RuntimeMethod* method)
{
{
ByteU5BU5D_t4116647657* L_0 = ___value0;
__this->set_sessionId_1(L_0);
return;
}
}
// Mono.Security.Protocol.Tls.SecurityCompressionType Mono.Security.Protocol.Tls.Context::get_CompressionMethod()
extern "C" IL2CPP_METHOD_ATTR int32_t Context_get_CompressionMethod_m2647114016 (Context_t3971234707 * __this, const RuntimeMethod* method)
{
{
int32_t L_0 = __this->get_compressionMethod_2();
return L_0;
}
}
// System.Void Mono.Security.Protocol.Tls.Context::set_CompressionMethod(Mono.Security.Protocol.Tls.SecurityCompressionType)
extern "C" IL2CPP_METHOD_ATTR void Context_set_CompressionMethod_m2054483993 (Context_t3971234707 * __this, int32_t ___value0, const RuntimeMethod* method)
{
{
int32_t L_0 = ___value0;
__this->set_compressionMethod_2(L_0);
return;
}
}
// Mono.Security.Protocol.Tls.TlsServerSettings Mono.Security.Protocol.Tls.Context::get_ServerSettings()
extern "C" IL2CPP_METHOD_ATTR TlsServerSettings_t4144396432 * Context_get_ServerSettings_m1982578801 (Context_t3971234707 * __this, const RuntimeMethod* method)
{
{
TlsServerSettings_t4144396432 * L_0 = __this->get_serverSettings_3();
return L_0;
}
}
// Mono.Security.Protocol.Tls.TlsClientSettings Mono.Security.Protocol.Tls.Context::get_ClientSettings()
extern "C" IL2CPP_METHOD_ATTR TlsClientSettings_t2486039503 * Context_get_ClientSettings_m2874391194 (Context_t3971234707 * __this, const RuntimeMethod* method)
{
{
TlsClientSettings_t2486039503 * L_0 = __this->get_clientSettings_4();
return L_0;
}
}
// Mono.Security.Protocol.Tls.Handshake.HandshakeType Mono.Security.Protocol.Tls.Context::get_LastHandshakeMsg()
extern "C" IL2CPP_METHOD_ATTR uint8_t Context_get_LastHandshakeMsg_m2730646725 (Context_t3971234707 * __this, const RuntimeMethod* method)
{
{
uint8_t L_0 = __this->get_lastHandshakeMsg_10();
return L_0;
}
}
// System.Void Mono.Security.Protocol.Tls.Context::set_LastHandshakeMsg(Mono.Security.Protocol.Tls.Handshake.HandshakeType)
extern "C" IL2CPP_METHOD_ATTR void Context_set_LastHandshakeMsg_m1770618067 (Context_t3971234707 * __this, uint8_t ___value0, const RuntimeMethod* method)
{
{
uint8_t L_0 = ___value0;
__this->set_lastHandshakeMsg_10(L_0);
return;
}
}
// Mono.Security.Protocol.Tls.HandshakeState Mono.Security.Protocol.Tls.Context::get_HandshakeState()
extern "C" IL2CPP_METHOD_ATTR int32_t Context_get_HandshakeState_m2425796590 (Context_t3971234707 * __this, const RuntimeMethod* method)
{
{
int32_t L_0 = __this->get_handshakeState_11();
return L_0;
}
}
// System.Void Mono.Security.Protocol.Tls.Context::set_HandshakeState(Mono.Security.Protocol.Tls.HandshakeState)
extern "C" IL2CPP_METHOD_ATTR void Context_set_HandshakeState_m1329976135 (Context_t3971234707 * __this, int32_t ___value0, const RuntimeMethod* method)
{
{
int32_t L_0 = ___value0;
__this->set_handshakeState_11(L_0);
return;
}
}
// System.Boolean Mono.Security.Protocol.Tls.Context::get_ReceivedConnectionEnd()
extern "C" IL2CPP_METHOD_ATTR bool Context_get_ReceivedConnectionEnd_m4011125537 (Context_t3971234707 * __this, const RuntimeMethod* method)
{
{
bool L_0 = __this->get_receivedConnectionEnd_13();
return L_0;
}
}
// System.Void Mono.Security.Protocol.Tls.Context::set_ReceivedConnectionEnd(System.Boolean)
extern "C" IL2CPP_METHOD_ATTR void Context_set_ReceivedConnectionEnd_m911334662 (Context_t3971234707 * __this, bool ___value0, const RuntimeMethod* method)
{
{
bool L_0 = ___value0;
__this->set_receivedConnectionEnd_13(L_0);
return;
}
}
// System.Boolean Mono.Security.Protocol.Tls.Context::get_SentConnectionEnd()
extern "C" IL2CPP_METHOD_ATTR bool Context_get_SentConnectionEnd_m963812869 (Context_t3971234707 * __this, const RuntimeMethod* method)
{
{
bool L_0 = __this->get_sentConnectionEnd_14();
return L_0;
}
}
// System.Void Mono.Security.Protocol.Tls.Context::set_SentConnectionEnd(System.Boolean)
extern "C" IL2CPP_METHOD_ATTR void Context_set_SentConnectionEnd_m1367645582 (Context_t3971234707 * __this, bool ___value0, const RuntimeMethod* method)
{
{
bool L_0 = ___value0;
__this->set_sentConnectionEnd_14(L_0);
return;
}
}
// Mono.Security.Protocol.Tls.CipherSuiteCollection Mono.Security.Protocol.Tls.Context::get_SupportedCiphers()
extern "C" IL2CPP_METHOD_ATTR CipherSuiteCollection_t1129639304 * Context_get_SupportedCiphers_m1883682196 (Context_t3971234707 * __this, const RuntimeMethod* method)
{
{
CipherSuiteCollection_t1129639304 * L_0 = __this->get_supportedCiphers_9();
return L_0;
}
}
// System.Void Mono.Security.Protocol.Tls.Context::set_SupportedCiphers(Mono.Security.Protocol.Tls.CipherSuiteCollection)
extern "C" IL2CPP_METHOD_ATTR void Context_set_SupportedCiphers_m4238648387 (Context_t3971234707 * __this, CipherSuiteCollection_t1129639304 * ___value0, const RuntimeMethod* method)
{
{
CipherSuiteCollection_t1129639304 * L_0 = ___value0;
__this->set_supportedCiphers_9(L_0);
return;
}
}
// Mono.Security.Protocol.Tls.TlsStream Mono.Security.Protocol.Tls.Context::get_HandshakeMessages()
extern "C" IL2CPP_METHOD_ATTR TlsStream_t2365453965 * Context_get_HandshakeMessages_m3655705111 (Context_t3971234707 * __this, const RuntimeMethod* method)
{
{
TlsStream_t2365453965 * L_0 = __this->get_handshakeMessages_27();
return L_0;
}
}
// System.UInt64 Mono.Security.Protocol.Tls.Context::get_WriteSequenceNumber()
extern "C" IL2CPP_METHOD_ATTR uint64_t Context_get_WriteSequenceNumber_m1115956887 (Context_t3971234707 * __this, const RuntimeMethod* method)
{
{
uint64_t L_0 = __this->get_writeSequenceNumber_16();
return L_0;
}
}
// System.Void Mono.Security.Protocol.Tls.Context::set_WriteSequenceNumber(System.UInt64)
extern "C" IL2CPP_METHOD_ATTR void Context_set_WriteSequenceNumber_m942577065 (Context_t3971234707 * __this, uint64_t ___value0, const RuntimeMethod* method)
{
{
uint64_t L_0 = ___value0;
__this->set_writeSequenceNumber_16(L_0);
return;
}
}
// System.UInt64 Mono.Security.Protocol.Tls.Context::get_ReadSequenceNumber()
extern "C" IL2CPP_METHOD_ATTR uint64_t Context_get_ReadSequenceNumber_m3883329199 (Context_t3971234707 * __this, const RuntimeMethod* method)
{
{
uint64_t L_0 = __this->get_readSequenceNumber_17();
return L_0;
}
}
// System.Void Mono.Security.Protocol.Tls.Context::set_ReadSequenceNumber(System.UInt64)
extern "C" IL2CPP_METHOD_ATTR void Context_set_ReadSequenceNumber_m2154909392 (Context_t3971234707 * __this, uint64_t ___value0, const RuntimeMethod* method)
{
{
uint64_t L_0 = ___value0;
__this->set_readSequenceNumber_17(L_0);
return;
}
}
// System.Byte[] Mono.Security.Protocol.Tls.Context::get_ClientRandom()
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* Context_get_ClientRandom_m1437588520 (Context_t3971234707 * __this, const RuntimeMethod* method)
{
{
ByteU5BU5D_t4116647657* L_0 = __this->get_clientRandom_18();
return L_0;
}
}
// System.Void Mono.Security.Protocol.Tls.Context::set_ClientRandom(System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void Context_set_ClientRandom_m2974454575 (Context_t3971234707 * __this, ByteU5BU5D_t4116647657* ___value0, const RuntimeMethod* method)
{
{
ByteU5BU5D_t4116647657* L_0 = ___value0;
__this->set_clientRandom_18(L_0);
return;
}
}
// System.Byte[] Mono.Security.Protocol.Tls.Context::get_ServerRandom()
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* Context_get_ServerRandom_m2710024742 (Context_t3971234707 * __this, const RuntimeMethod* method)
{
{
ByteU5BU5D_t4116647657* L_0 = __this->get_serverRandom_19();
return L_0;
}
}
// System.Void Mono.Security.Protocol.Tls.Context::set_ServerRandom(System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void Context_set_ServerRandom_m2929894009 (Context_t3971234707 * __this, ByteU5BU5D_t4116647657* ___value0, const RuntimeMethod* method)
{
{
ByteU5BU5D_t4116647657* L_0 = ___value0;
__this->set_serverRandom_19(L_0);
return;
}
}
// System.Byte[] Mono.Security.Protocol.Tls.Context::get_RandomCS()
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* Context_get_RandomCS_m1367948315 (Context_t3971234707 * __this, const RuntimeMethod* method)
{
{
ByteU5BU5D_t4116647657* L_0 = __this->get_randomCS_20();
return L_0;
}
}
// System.Void Mono.Security.Protocol.Tls.Context::set_RandomCS(System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void Context_set_RandomCS_m2687068745 (Context_t3971234707 * __this, ByteU5BU5D_t4116647657* ___value0, const RuntimeMethod* method)
{
{
ByteU5BU5D_t4116647657* L_0 = ___value0;
__this->set_randomCS_20(L_0);
return;
}
}
// System.Byte[] Mono.Security.Protocol.Tls.Context::get_RandomSC()
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* Context_get_RandomSC_m1891758699 (Context_t3971234707 * __this, const RuntimeMethod* method)
{
{
ByteU5BU5D_t4116647657* L_0 = __this->get_randomSC_21();
return L_0;
}
}
// System.Void Mono.Security.Protocol.Tls.Context::set_RandomSC(System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void Context_set_RandomSC_m2364786761 (Context_t3971234707 * __this, ByteU5BU5D_t4116647657* ___value0, const RuntimeMethod* method)
{
{
ByteU5BU5D_t4116647657* L_0 = ___value0;
__this->set_randomSC_21(L_0);
return;
}
}
// System.Byte[] Mono.Security.Protocol.Tls.Context::get_MasterSecret()
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* Context_get_MasterSecret_m676083615 (Context_t3971234707 * __this, const RuntimeMethod* method)
{
{
ByteU5BU5D_t4116647657* L_0 = __this->get_masterSecret_22();
return L_0;
}
}
// System.Void Mono.Security.Protocol.Tls.Context::set_MasterSecret(System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void Context_set_MasterSecret_m3419105191 (Context_t3971234707 * __this, ByteU5BU5D_t4116647657* ___value0, const RuntimeMethod* method)
{
{
ByteU5BU5D_t4116647657* L_0 = ___value0;
__this->set_masterSecret_22(L_0);
return;
}
}
// System.Byte[] Mono.Security.Protocol.Tls.Context::get_ClientWriteKey()
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* Context_get_ClientWriteKey_m3174706656 (Context_t3971234707 * __this, const RuntimeMethod* method)
{
{
ByteU5BU5D_t4116647657* L_0 = __this->get_clientWriteKey_23();
return L_0;
}
}
// System.Void Mono.Security.Protocol.Tls.Context::set_ClientWriteKey(System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void Context_set_ClientWriteKey_m1601425248 (Context_t3971234707 * __this, ByteU5BU5D_t4116647657* ___value0, const RuntimeMethod* method)
{
{
ByteU5BU5D_t4116647657* L_0 = ___value0;
__this->set_clientWriteKey_23(L_0);
return;
}
}
// System.Byte[] Mono.Security.Protocol.Tls.Context::get_ServerWriteKey()
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* Context_get_ServerWriteKey_m2199131569 (Context_t3971234707 * __this, const RuntimeMethod* method)
{
{
ByteU5BU5D_t4116647657* L_0 = __this->get_serverWriteKey_24();
return L_0;
}
}
// System.Void Mono.Security.Protocol.Tls.Context::set_ServerWriteKey(System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void Context_set_ServerWriteKey_m3347272648 (Context_t3971234707 * __this, ByteU5BU5D_t4116647657* ___value0, const RuntimeMethod* method)
{
{
ByteU5BU5D_t4116647657* L_0 = ___value0;
__this->set_serverWriteKey_24(L_0);
return;
}
}
// System.Byte[] Mono.Security.Protocol.Tls.Context::get_ClientWriteIV()
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* Context_get_ClientWriteIV_m1729804632 (Context_t3971234707 * __this, const RuntimeMethod* method)
{
{
ByteU5BU5D_t4116647657* L_0 = __this->get_clientWriteIV_25();
return L_0;
}
}
// System.Void Mono.Security.Protocol.Tls.Context::set_ClientWriteIV(System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void Context_set_ClientWriteIV_m3405909624 (Context_t3971234707 * __this, ByteU5BU5D_t4116647657* ___value0, const RuntimeMethod* method)
{
{
ByteU5BU5D_t4116647657* L_0 = ___value0;
__this->set_clientWriteIV_25(L_0);
return;
}
}
// System.Byte[] Mono.Security.Protocol.Tls.Context::get_ServerWriteIV()
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* Context_get_ServerWriteIV_m1839374659 (Context_t3971234707 * __this, const RuntimeMethod* method)
{
{
ByteU5BU5D_t4116647657* L_0 = __this->get_serverWriteIV_26();
return L_0;
}
}
// System.Void Mono.Security.Protocol.Tls.Context::set_ServerWriteIV(System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void Context_set_ServerWriteIV_m1007123427 (Context_t3971234707 * __this, ByteU5BU5D_t4116647657* ___value0, const RuntimeMethod* method)
{
{
ByteU5BU5D_t4116647657* L_0 = ___value0;
__this->set_serverWriteIV_26(L_0);
return;
}
}
// Mono.Security.Protocol.Tls.RecordProtocol Mono.Security.Protocol.Tls.Context::get_RecordProtocol()
extern "C" IL2CPP_METHOD_ATTR RecordProtocol_t3759049701 * Context_get_RecordProtocol_m2261754827 (Context_t3971234707 * __this, const RuntimeMethod* method)
{
{
RecordProtocol_t3759049701 * L_0 = __this->get_recordProtocol_29();
return L_0;
}
}
// System.Void Mono.Security.Protocol.Tls.Context::set_RecordProtocol(Mono.Security.Protocol.Tls.RecordProtocol)
extern "C" IL2CPP_METHOD_ATTR void Context_set_RecordProtocol_m3067654641 (Context_t3971234707 * __this, RecordProtocol_t3759049701 * ___value0, const RuntimeMethod* method)
{
{
RecordProtocol_t3759049701 * L_0 = ___value0;
__this->set_recordProtocol_29(L_0);
return;
}
}
// System.Int32 Mono.Security.Protocol.Tls.Context::GetUnixTime()
extern "C" IL2CPP_METHOD_ATTR int32_t Context_GetUnixTime_m3811151335 (Context_t3971234707 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (Context_GetUnixTime_m3811151335_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
DateTime_t3738529785 V_0;
memset(&V_0, 0, sizeof(V_0));
{
IL2CPP_RUNTIME_CLASS_INIT(DateTime_t3738529785_il2cpp_TypeInfo_var);
DateTime_t3738529785 L_0 = DateTime_get_UtcNow_m1393945741(NULL /*static, unused*/, /*hidden argument*/NULL);
V_0 = L_0;
int64_t L_1 = DateTime_get_Ticks_m1550640881((DateTime_t3738529785 *)(&V_0), /*hidden argument*/NULL);
return (((int32_t)((int32_t)((int64_t)((int64_t)((int64_t)il2cpp_codegen_subtract((int64_t)L_1, (int64_t)((int64_t)621355968000000000LL)))/(int64_t)(((int64_t)((int64_t)((int32_t)10000000)))))))));
}
}
// System.Byte[] Mono.Security.Protocol.Tls.Context::GetSecureRandomBytes(System.Int32)
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* Context_GetSecureRandomBytes_m3676009387 (Context_t3971234707 * __this, int32_t ___count0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (Context_GetSecureRandomBytes_m3676009387_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
ByteU5BU5D_t4116647657* V_0 = NULL;
{
int32_t L_0 = ___count0;
ByteU5BU5D_t4116647657* L_1 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)L_0);
V_0 = L_1;
RandomNumberGenerator_t386037858 * L_2 = __this->get_random_28();
ByteU5BU5D_t4116647657* L_3 = V_0;
VirtActionInvoker1< ByteU5BU5D_t4116647657* >::Invoke(5 /* System.Void System.Security.Cryptography.RandomNumberGenerator::GetNonZeroBytes(System.Byte[]) */, L_2, L_3);
ByteU5BU5D_t4116647657* L_4 = V_0;
return L_4;
}
}
// System.Void Mono.Security.Protocol.Tls.Context::Clear()
extern "C" IL2CPP_METHOD_ATTR void Context_Clear_m2678836033 (Context_t3971234707 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (Context_Clear_m2678836033_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
__this->set_compressionMethod_2(0);
TlsServerSettings_t4144396432 * L_0 = (TlsServerSettings_t4144396432 *)il2cpp_codegen_object_new(TlsServerSettings_t4144396432_il2cpp_TypeInfo_var);
TlsServerSettings__ctor_m373357120(L_0, /*hidden argument*/NULL);
__this->set_serverSettings_3(L_0);
TlsClientSettings_t2486039503 * L_1 = (TlsClientSettings_t2486039503 *)il2cpp_codegen_object_new(TlsClientSettings_t2486039503_il2cpp_TypeInfo_var);
TlsClientSettings__ctor_m3220697265(L_1, /*hidden argument*/NULL);
__this->set_clientSettings_4(L_1);
TlsStream_t2365453965 * L_2 = (TlsStream_t2365453965 *)il2cpp_codegen_object_new(TlsStream_t2365453965_il2cpp_TypeInfo_var);
TlsStream__ctor_m787793111(L_2, /*hidden argument*/NULL);
__this->set_handshakeMessages_27(L_2);
__this->set_sessionId_1((ByteU5BU5D_t4116647657*)NULL);
__this->set_handshakeState_11(0);
VirtActionInvoker0::Invoke(5 /* System.Void Mono.Security.Protocol.Tls.Context::ClearKeyInfo() */, __this);
return;
}
}
// System.Void Mono.Security.Protocol.Tls.Context::ClearKeyInfo()
extern "C" IL2CPP_METHOD_ATTR void Context_ClearKeyInfo_m1155154290 (Context_t3971234707 * __this, const RuntimeMethod* method)
{
{
ByteU5BU5D_t4116647657* L_0 = __this->get_masterSecret_22();
if (!L_0)
{
goto IL_0026;
}
}
{
ByteU5BU5D_t4116647657* L_1 = __this->get_masterSecret_22();
ByteU5BU5D_t4116647657* L_2 = __this->get_masterSecret_22();
Array_Clear_m2231608178(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_1, 0, (((int32_t)((int32_t)(((RuntimeArray *)L_2)->max_length)))), /*hidden argument*/NULL);
__this->set_masterSecret_22((ByteU5BU5D_t4116647657*)NULL);
}
IL_0026:
{
ByteU5BU5D_t4116647657* L_3 = __this->get_clientRandom_18();
if (!L_3)
{
goto IL_004c;
}
}
{
ByteU5BU5D_t4116647657* L_4 = __this->get_clientRandom_18();
ByteU5BU5D_t4116647657* L_5 = __this->get_clientRandom_18();
Array_Clear_m2231608178(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_4, 0, (((int32_t)((int32_t)(((RuntimeArray *)L_5)->max_length)))), /*hidden argument*/NULL);
__this->set_clientRandom_18((ByteU5BU5D_t4116647657*)NULL);
}
IL_004c:
{
ByteU5BU5D_t4116647657* L_6 = __this->get_serverRandom_19();
if (!L_6)
{
goto IL_0072;
}
}
{
ByteU5BU5D_t4116647657* L_7 = __this->get_serverRandom_19();
ByteU5BU5D_t4116647657* L_8 = __this->get_serverRandom_19();
Array_Clear_m2231608178(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_7, 0, (((int32_t)((int32_t)(((RuntimeArray *)L_8)->max_length)))), /*hidden argument*/NULL);
__this->set_serverRandom_19((ByteU5BU5D_t4116647657*)NULL);
}
IL_0072:
{
ByteU5BU5D_t4116647657* L_9 = __this->get_randomCS_20();
if (!L_9)
{
goto IL_0098;
}
}
{
ByteU5BU5D_t4116647657* L_10 = __this->get_randomCS_20();
ByteU5BU5D_t4116647657* L_11 = __this->get_randomCS_20();
Array_Clear_m2231608178(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_10, 0, (((int32_t)((int32_t)(((RuntimeArray *)L_11)->max_length)))), /*hidden argument*/NULL);
__this->set_randomCS_20((ByteU5BU5D_t4116647657*)NULL);
}
IL_0098:
{
ByteU5BU5D_t4116647657* L_12 = __this->get_randomSC_21();
if (!L_12)
{
goto IL_00be;
}
}
{
ByteU5BU5D_t4116647657* L_13 = __this->get_randomSC_21();
ByteU5BU5D_t4116647657* L_14 = __this->get_randomSC_21();
Array_Clear_m2231608178(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_13, 0, (((int32_t)((int32_t)(((RuntimeArray *)L_14)->max_length)))), /*hidden argument*/NULL);
__this->set_randomSC_21((ByteU5BU5D_t4116647657*)NULL);
}
IL_00be:
{
ByteU5BU5D_t4116647657* L_15 = __this->get_clientWriteKey_23();
if (!L_15)
{
goto IL_00e4;
}
}
{
ByteU5BU5D_t4116647657* L_16 = __this->get_clientWriteKey_23();
ByteU5BU5D_t4116647657* L_17 = __this->get_clientWriteKey_23();
Array_Clear_m2231608178(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_16, 0, (((int32_t)((int32_t)(((RuntimeArray *)L_17)->max_length)))), /*hidden argument*/NULL);
__this->set_clientWriteKey_23((ByteU5BU5D_t4116647657*)NULL);
}
IL_00e4:
{
ByteU5BU5D_t4116647657* L_18 = __this->get_clientWriteIV_25();
if (!L_18)
{
goto IL_010a;
}
}
{
ByteU5BU5D_t4116647657* L_19 = __this->get_clientWriteIV_25();
ByteU5BU5D_t4116647657* L_20 = __this->get_clientWriteIV_25();
Array_Clear_m2231608178(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_19, 0, (((int32_t)((int32_t)(((RuntimeArray *)L_20)->max_length)))), /*hidden argument*/NULL);
__this->set_clientWriteIV_25((ByteU5BU5D_t4116647657*)NULL);
}
IL_010a:
{
ByteU5BU5D_t4116647657* L_21 = __this->get_serverWriteKey_24();
if (!L_21)
{
goto IL_0130;
}
}
{
ByteU5BU5D_t4116647657* L_22 = __this->get_serverWriteKey_24();
ByteU5BU5D_t4116647657* L_23 = __this->get_serverWriteKey_24();
Array_Clear_m2231608178(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_22, 0, (((int32_t)((int32_t)(((RuntimeArray *)L_23)->max_length)))), /*hidden argument*/NULL);
__this->set_serverWriteKey_24((ByteU5BU5D_t4116647657*)NULL);
}
IL_0130:
{
ByteU5BU5D_t4116647657* L_24 = __this->get_serverWriteIV_26();
if (!L_24)
{
goto IL_0156;
}
}
{
ByteU5BU5D_t4116647657* L_25 = __this->get_serverWriteIV_26();
ByteU5BU5D_t4116647657* L_26 = __this->get_serverWriteIV_26();
Array_Clear_m2231608178(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_25, 0, (((int32_t)((int32_t)(((RuntimeArray *)L_26)->max_length)))), /*hidden argument*/NULL);
__this->set_serverWriteIV_26((ByteU5BU5D_t4116647657*)NULL);
}
IL_0156:
{
TlsStream_t2365453965 * L_27 = __this->get_handshakeMessages_27();
TlsStream_Reset_m369197964(L_27, /*hidden argument*/NULL);
int32_t L_28 = __this->get_securityProtocol_0();
if ((((int32_t)L_28) == ((int32_t)((int32_t)48))))
{
goto IL_016e;
}
}
IL_016e:
{
return;
}
}
// Mono.Security.Protocol.Tls.SecurityProtocolType Mono.Security.Protocol.Tls.Context::DecodeProtocolCode(System.Int16)
extern "C" IL2CPP_METHOD_ATTR int32_t Context_DecodeProtocolCode_m2249547310 (Context_t3971234707 * __this, int16_t ___code0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (Context_DecodeProtocolCode_m2249547310_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
int16_t V_0 = 0;
{
int16_t L_0 = ___code0;
V_0 = L_0;
int16_t L_1 = V_0;
if ((((int32_t)L_1) == ((int32_t)((int32_t)768))))
{
goto IL_0023;
}
}
{
int16_t L_2 = V_0;
if ((((int32_t)L_2) == ((int32_t)((int32_t)769))))
{
goto IL_001d;
}
}
{
goto IL_0026;
}
IL_001d:
{
return (int32_t)(((int32_t)192));
}
IL_0023:
{
return (int32_t)(((int32_t)48));
}
IL_0026:
{
NotSupportedException_t1314879016 * L_3 = (NotSupportedException_t1314879016 *)il2cpp_codegen_object_new(NotSupportedException_t1314879016_il2cpp_TypeInfo_var);
NotSupportedException__ctor_m2494070935(L_3, _stringLiteral3034282783, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_3, NULL, Context_DecodeProtocolCode_m2249547310_RuntimeMethod_var);
}
}
// System.Void Mono.Security.Protocol.Tls.Context::ChangeProtocol(System.Int16)
extern "C" IL2CPP_METHOD_ATTR void Context_ChangeProtocol_m2412635871 (Context_t3971234707 * __this, int16_t ___protocol0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (Context_ChangeProtocol_m2412635871_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
int32_t V_0 = 0;
{
int16_t L_0 = ___protocol0;
int32_t L_1 = Context_DecodeProtocolCode_m2249547310(__this, L_0, /*hidden argument*/NULL);
V_0 = L_1;
int32_t L_2 = V_0;
int32_t L_3 = Context_get_SecurityProtocolFlags_m2022471746(__this, /*hidden argument*/NULL);
int32_t L_4 = V_0;
if ((((int32_t)((int32_t)((int32_t)L_2&(int32_t)L_3))) == ((int32_t)L_4)))
{
goto IL_002c;
}
}
{
int32_t L_5 = Context_get_SecurityProtocolFlags_m2022471746(__this, /*hidden argument*/NULL);
if ((!(((uint32_t)((int32_t)((int32_t)L_5&(int32_t)((int32_t)-1073741824)))) == ((uint32_t)((int32_t)-1073741824)))))
{
goto IL_0056;
}
}
IL_002c:
{
int32_t L_6 = V_0;
Context_set_SecurityProtocol_m2833661610(__this, L_6, /*hidden argument*/NULL);
CipherSuiteCollection_t1129639304 * L_7 = Context_get_SupportedCiphers_m1883682196(__this, /*hidden argument*/NULL);
CipherSuiteCollection_Clear_m2642701260(L_7, /*hidden argument*/NULL);
Context_set_SupportedCiphers_m4238648387(__this, (CipherSuiteCollection_t1129639304 *)NULL, /*hidden argument*/NULL);
int32_t L_8 = V_0;
CipherSuiteCollection_t1129639304 * L_9 = CipherSuiteFactory_GetSupportedCiphers_m3260014148(NULL /*static, unused*/, L_8, /*hidden argument*/NULL);
Context_set_SupportedCiphers_m4238648387(__this, L_9, /*hidden argument*/NULL);
goto IL_0063;
}
IL_0056:
{
TlsException_t3534743363 * L_10 = (TlsException_t3534743363 *)il2cpp_codegen_object_new(TlsException_t3534743363_il2cpp_TypeInfo_var);
TlsException__ctor_m3242533711(L_10, ((int32_t)70), _stringLiteral193405814, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_10, NULL, Context_ChangeProtocol_m2412635871_RuntimeMethod_var);
}
IL_0063:
{
return;
}
}
// Mono.Security.Protocol.Tls.SecurityParameters Mono.Security.Protocol.Tls.Context::get_Current()
extern "C" IL2CPP_METHOD_ATTR SecurityParameters_t2199972650 * Context_get_Current_m2853615040 (Context_t3971234707 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (Context_get_Current_m2853615040_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
SecurityParameters_t2199972650 * L_0 = __this->get_current_5();
if (L_0)
{
goto IL_0016;
}
}
{
SecurityParameters_t2199972650 * L_1 = (SecurityParameters_t2199972650 *)il2cpp_codegen_object_new(SecurityParameters_t2199972650_il2cpp_TypeInfo_var);
SecurityParameters__ctor_m3952189175(L_1, /*hidden argument*/NULL);
__this->set_current_5(L_1);
}
IL_0016:
{
SecurityParameters_t2199972650 * L_2 = __this->get_current_5();
CipherSuite_t3414744575 * L_3 = SecurityParameters_get_Cipher_m108846204(L_2, /*hidden argument*/NULL);
if (!L_3)
{
goto IL_0037;
}
}
{
SecurityParameters_t2199972650 * L_4 = __this->get_current_5();
CipherSuite_t3414744575 * L_5 = SecurityParameters_get_Cipher_m108846204(L_4, /*hidden argument*/NULL);
CipherSuite_set_Context_m1978767807(L_5, __this, /*hidden argument*/NULL);
}
IL_0037:
{
SecurityParameters_t2199972650 * L_6 = __this->get_current_5();
return L_6;
}
}
// Mono.Security.Protocol.Tls.SecurityParameters Mono.Security.Protocol.Tls.Context::get_Negotiating()
extern "C" IL2CPP_METHOD_ATTR SecurityParameters_t2199972650 * Context_get_Negotiating_m2044579817 (Context_t3971234707 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (Context_get_Negotiating_m2044579817_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
SecurityParameters_t2199972650 * L_0 = __this->get_negotiating_6();
if (L_0)
{
goto IL_0016;
}
}
{
SecurityParameters_t2199972650 * L_1 = (SecurityParameters_t2199972650 *)il2cpp_codegen_object_new(SecurityParameters_t2199972650_il2cpp_TypeInfo_var);
SecurityParameters__ctor_m3952189175(L_1, /*hidden argument*/NULL);
__this->set_negotiating_6(L_1);
}
IL_0016:
{
SecurityParameters_t2199972650 * L_2 = __this->get_negotiating_6();
CipherSuite_t3414744575 * L_3 = SecurityParameters_get_Cipher_m108846204(L_2, /*hidden argument*/NULL);
if (!L_3)
{
goto IL_0037;
}
}
{
SecurityParameters_t2199972650 * L_4 = __this->get_negotiating_6();
CipherSuite_t3414744575 * L_5 = SecurityParameters_get_Cipher_m108846204(L_4, /*hidden argument*/NULL);
CipherSuite_set_Context_m1978767807(L_5, __this, /*hidden argument*/NULL);
}
IL_0037:
{
SecurityParameters_t2199972650 * L_6 = __this->get_negotiating_6();
return L_6;
}
}
// Mono.Security.Protocol.Tls.SecurityParameters Mono.Security.Protocol.Tls.Context::get_Read()
extern "C" IL2CPP_METHOD_ATTR SecurityParameters_t2199972650 * Context_get_Read_m4172356735 (Context_t3971234707 * __this, const RuntimeMethod* method)
{
{
SecurityParameters_t2199972650 * L_0 = __this->get_read_7();
return L_0;
}
}
// Mono.Security.Protocol.Tls.SecurityParameters Mono.Security.Protocol.Tls.Context::get_Write()
extern "C" IL2CPP_METHOD_ATTR SecurityParameters_t2199972650 * Context_get_Write_m1564343513 (Context_t3971234707 * __this, const RuntimeMethod* method)
{
{
SecurityParameters_t2199972650 * L_0 = __this->get_write_8();
return L_0;
}
}
// System.Void Mono.Security.Protocol.Tls.Context::StartSwitchingSecurityParameters(System.Boolean)
extern "C" IL2CPP_METHOD_ATTR void Context_StartSwitchingSecurityParameters_m28285865 (Context_t3971234707 * __this, bool ___client0, const RuntimeMethod* method)
{
{
bool L_0 = ___client0;
if (!L_0)
{
goto IL_0023;
}
}
{
SecurityParameters_t2199972650 * L_1 = __this->get_negotiating_6();
__this->set_write_8(L_1);
SecurityParameters_t2199972650 * L_2 = __this->get_current_5();
__this->set_read_7(L_2);
goto IL_003b;
}
IL_0023:
{
SecurityParameters_t2199972650 * L_3 = __this->get_negotiating_6();
__this->set_read_7(L_3);
SecurityParameters_t2199972650 * L_4 = __this->get_current_5();
__this->set_write_8(L_4);
}
IL_003b:
{
SecurityParameters_t2199972650 * L_5 = __this->get_negotiating_6();
__this->set_current_5(L_5);
return;
}
}
// System.Void Mono.Security.Protocol.Tls.Context::EndSwitchingSecurityParameters(System.Boolean)
extern "C" IL2CPP_METHOD_ATTR void Context_EndSwitchingSecurityParameters_m4148956166 (Context_t3971234707 * __this, bool ___client0, const RuntimeMethod* method)
{
SecurityParameters_t2199972650 * V_0 = NULL;
{
bool L_0 = ___client0;
if (!L_0)
{
goto IL_001e;
}
}
{
SecurityParameters_t2199972650 * L_1 = __this->get_read_7();
V_0 = L_1;
SecurityParameters_t2199972650 * L_2 = __this->get_current_5();
__this->set_read_7(L_2);
goto IL_0031;
}
IL_001e:
{
SecurityParameters_t2199972650 * L_3 = __this->get_write_8();
V_0 = L_3;
SecurityParameters_t2199972650 * L_4 = __this->get_current_5();
__this->set_write_8(L_4);
}
IL_0031:
{
SecurityParameters_t2199972650 * L_5 = V_0;
if (!L_5)
{
goto IL_003d;
}
}
{
SecurityParameters_t2199972650 * L_6 = V_0;
SecurityParameters_Clear_m680574382(L_6, /*hidden argument*/NULL);
}
IL_003d:
{
SecurityParameters_t2199972650 * L_7 = V_0;
__this->set_negotiating_6(L_7);
return;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsClientCertificate::.ctor(Mono.Security.Protocol.Tls.Context)
extern "C" IL2CPP_METHOD_ATTR void TlsClientCertificate__ctor_m101524132 (TlsClientCertificate_t3519510577 * __this, Context_t3971234707 * ___context0, const RuntimeMethod* method)
{
{
Context_t3971234707 * L_0 = ___context0;
HandshakeMessage__ctor_m2692487706(__this, L_0, ((int32_t)11), /*hidden argument*/NULL);
return;
}
}
// System.Security.Cryptography.X509Certificates.X509Certificate Mono.Security.Protocol.Tls.Handshake.Client.TlsClientCertificate::get_ClientCertificate()
extern "C" IL2CPP_METHOD_ATTR X509Certificate_t713131622 * TlsClientCertificate_get_ClientCertificate_m1637836254 (TlsClientCertificate_t3519510577 * __this, const RuntimeMethod* method)
{
{
bool L_0 = __this->get_clientCertSelected_9();
if (L_0)
{
goto IL_0018;
}
}
{
TlsClientCertificate_GetClientCertificate_m566867090(__this, /*hidden argument*/NULL);
__this->set_clientCertSelected_9((bool)1);
}
IL_0018:
{
X509Certificate_t713131622 * L_1 = __this->get_clientCert_10();
return L_1;
}
}
// System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsClientCertificate::Update()
extern "C" IL2CPP_METHOD_ATTR void TlsClientCertificate_Update_m1882970209 (TlsClientCertificate_t3519510577 * __this, const RuntimeMethod* method)
{
{
HandshakeMessage_Update_m2417837686(__this, /*hidden argument*/NULL);
TlsStream_Reset_m369197964(__this, /*hidden argument*/NULL);
return;
}
}
// System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsClientCertificate::GetClientCertificate()
extern "C" IL2CPP_METHOD_ATTR void TlsClientCertificate_GetClientCertificate_m566867090 (TlsClientCertificate_t3519510577 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (TlsClientCertificate_GetClientCertificate_m566867090_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
ClientContext_t2797401965 * V_0 = NULL;
{
Context_t3971234707 * L_0 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
V_0 = ((ClientContext_t2797401965 *)CastclassClass((RuntimeObject*)L_0, ClientContext_t2797401965_il2cpp_TypeInfo_var));
ClientContext_t2797401965 * L_1 = V_0;
TlsClientSettings_t2486039503 * L_2 = Context_get_ClientSettings_m2874391194(L_1, /*hidden argument*/NULL);
X509CertificateCollection_t3399372417 * L_3 = TlsClientSettings_get_Certificates_m2671943654(L_2, /*hidden argument*/NULL);
if (!L_3)
{
goto IL_0084;
}
}
{
ClientContext_t2797401965 * L_4 = V_0;
TlsClientSettings_t2486039503 * L_5 = Context_get_ClientSettings_m2874391194(L_4, /*hidden argument*/NULL);
X509CertificateCollection_t3399372417 * L_6 = TlsClientSettings_get_Certificates_m2671943654(L_5, /*hidden argument*/NULL);
int32_t L_7 = CollectionBase_get_Count_m1708965601(L_6, /*hidden argument*/NULL);
if ((((int32_t)L_7) <= ((int32_t)0)))
{
goto IL_0084;
}
}
{
ClientContext_t2797401965 * L_8 = V_0;
SslClientStream_t3914624661 * L_9 = ClientContext_get_SslStream_m1583577309(L_8, /*hidden argument*/NULL);
Context_t3971234707 * L_10 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
TlsClientSettings_t2486039503 * L_11 = Context_get_ClientSettings_m2874391194(L_10, /*hidden argument*/NULL);
X509CertificateCollection_t3399372417 * L_12 = TlsClientSettings_get_Certificates_m2671943654(L_11, /*hidden argument*/NULL);
Context_t3971234707 * L_13 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
TlsServerSettings_t4144396432 * L_14 = Context_get_ServerSettings_m1982578801(L_13, /*hidden argument*/NULL);
X509CertificateCollection_t1542168550 * L_15 = TlsServerSettings_get_Certificates_m3981837031(L_14, /*hidden argument*/NULL);
X509Certificate_t489243025 * L_16 = X509CertificateCollection_get_Item_m3285563224(L_15, 0, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_17 = VirtFuncInvoker0< ByteU5BU5D_t4116647657* >::Invoke(12 /* System.Byte[] Mono.Security.X509.X509Certificate::get_RawData() */, L_16);
X509Certificate_t713131622 * L_18 = (X509Certificate_t713131622 *)il2cpp_codegen_object_new(X509Certificate_t713131622_il2cpp_TypeInfo_var);
X509Certificate__ctor_m1413707489(L_18, L_17, /*hidden argument*/NULL);
Context_t3971234707 * L_19 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
TlsClientSettings_t2486039503 * L_20 = Context_get_ClientSettings_m2874391194(L_19, /*hidden argument*/NULL);
String_t* L_21 = TlsClientSettings_get_TargetHost_m2463481414(L_20, /*hidden argument*/NULL);
X509Certificate_t713131622 * L_22 = SslClientStream_RaiseClientCertificateSelection_m3936211295(L_9, L_12, L_18, L_21, (X509CertificateCollection_t3399372417 *)NULL, /*hidden argument*/NULL);
__this->set_clientCert_10(L_22);
}
IL_0084:
{
ClientContext_t2797401965 * L_23 = V_0;
TlsClientSettings_t2486039503 * L_24 = Context_get_ClientSettings_m2874391194(L_23, /*hidden argument*/NULL);
X509Certificate_t713131622 * L_25 = __this->get_clientCert_10();
TlsClientSettings_set_ClientCertificate_m3374228612(L_24, L_25, /*hidden argument*/NULL);
return;
}
}
// System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsClientCertificate::SendCertificates()
extern "C" IL2CPP_METHOD_ATTR void TlsClientCertificate_SendCertificates_m1965594186 (TlsClientCertificate_t3519510577 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (TlsClientCertificate_SendCertificates_m1965594186_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
TlsStream_t2365453965 * V_0 = NULL;
X509Certificate_t713131622 * V_1 = NULL;
ByteU5BU5D_t4116647657* V_2 = NULL;
{
TlsStream_t2365453965 * L_0 = (TlsStream_t2365453965 *)il2cpp_codegen_object_new(TlsStream_t2365453965_il2cpp_TypeInfo_var);
TlsStream__ctor_m787793111(L_0, /*hidden argument*/NULL);
V_0 = L_0;
X509Certificate_t713131622 * L_1 = TlsClientCertificate_get_ClientCertificate_m1637836254(__this, /*hidden argument*/NULL);
V_1 = L_1;
goto IL_0031;
}
IL_0012:
{
X509Certificate_t713131622 * L_2 = V_1;
ByteU5BU5D_t4116647657* L_3 = VirtFuncInvoker0< ByteU5BU5D_t4116647657* >::Invoke(14 /* System.Byte[] System.Security.Cryptography.X509Certificates.X509Certificate::GetRawCertData() */, L_2);
V_2 = L_3;
TlsStream_t2365453965 * L_4 = V_0;
ByteU5BU5D_t4116647657* L_5 = V_2;
TlsStream_WriteInt24_m58952549(L_4, (((int32_t)((int32_t)(((RuntimeArray *)L_5)->max_length)))), /*hidden argument*/NULL);
TlsStream_t2365453965 * L_6 = V_0;
ByteU5BU5D_t4116647657* L_7 = V_2;
TlsStream_Write_m4133894341(L_6, L_7, /*hidden argument*/NULL);
X509Certificate_t713131622 * L_8 = V_1;
X509Certificate_t713131622 * L_9 = TlsClientCertificate_FindParentCertificate_m3844441401(__this, L_8, /*hidden argument*/NULL);
V_1 = L_9;
}
IL_0031:
{
X509Certificate_t713131622 * L_10 = V_1;
if (L_10)
{
goto IL_0012;
}
}
{
TlsStream_t2365453965 * L_11 = V_0;
int64_t L_12 = VirtFuncInvoker0< int64_t >::Invoke(8 /* System.Int64 Mono.Security.Protocol.Tls.TlsStream::get_Length() */, L_11);
TlsStream_WriteInt24_m58952549(__this, (((int32_t)((int32_t)L_12))), /*hidden argument*/NULL);
TlsStream_t2365453965 * L_13 = V_0;
ByteU5BU5D_t4116647657* L_14 = TlsStream_ToArray_m4177184296(L_13, /*hidden argument*/NULL);
TlsStream_Write_m4133894341(__this, L_14, /*hidden argument*/NULL);
return;
}
}
// System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsClientCertificate::ProcessAsSsl3()
extern "C" IL2CPP_METHOD_ATTR void TlsClientCertificate_ProcessAsSsl3_m3265529850 (TlsClientCertificate_t3519510577 * __this, const RuntimeMethod* method)
{
{
X509Certificate_t713131622 * L_0 = TlsClientCertificate_get_ClientCertificate_m1637836254(__this, /*hidden argument*/NULL);
if (!L_0)
{
goto IL_0016;
}
}
{
TlsClientCertificate_SendCertificates_m1965594186(__this, /*hidden argument*/NULL);
goto IL_0016;
}
IL_0016:
{
return;
}
}
// System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsClientCertificate::ProcessAsTls1()
extern "C" IL2CPP_METHOD_ATTR void TlsClientCertificate_ProcessAsTls1_m3232146441 (TlsClientCertificate_t3519510577 * __this, const RuntimeMethod* method)
{
{
X509Certificate_t713131622 * L_0 = TlsClientCertificate_get_ClientCertificate_m1637836254(__this, /*hidden argument*/NULL);
if (!L_0)
{
goto IL_0016;
}
}
{
TlsClientCertificate_SendCertificates_m1965594186(__this, /*hidden argument*/NULL);
goto IL_001d;
}
IL_0016:
{
TlsStream_WriteInt24_m58952549(__this, 0, /*hidden argument*/NULL);
}
IL_001d:
{
return;
}
}
// System.Security.Cryptography.X509Certificates.X509Certificate Mono.Security.Protocol.Tls.Handshake.Client.TlsClientCertificate::FindParentCertificate(System.Security.Cryptography.X509Certificates.X509Certificate)
extern "C" IL2CPP_METHOD_ATTR X509Certificate_t713131622 * TlsClientCertificate_FindParentCertificate_m3844441401 (TlsClientCertificate_t3519510577 * __this, X509Certificate_t713131622 * ___cert0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (TlsClientCertificate_FindParentCertificate_m3844441401_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
X509Certificate_t713131622 * V_0 = NULL;
X509CertificateEnumerator_t855273292 * V_1 = NULL;
X509Certificate_t713131622 * V_2 = NULL;
RuntimeObject* V_3 = NULL;
Exception_t * __last_unhandled_exception = 0;
NO_UNUSED_WARNING (__last_unhandled_exception);
Exception_t * __exception_local = 0;
NO_UNUSED_WARNING (__exception_local);
int32_t __leave_target = -1;
NO_UNUSED_WARNING (__leave_target);
{
X509Certificate_t713131622 * L_0 = ___cert0;
String_t* L_1 = VirtFuncInvoker0< String_t* >::Invoke(12 /* System.String System.Security.Cryptography.X509Certificates.X509Certificate::GetName() */, L_0);
X509Certificate_t713131622 * L_2 = ___cert0;
String_t* L_3 = VirtFuncInvoker0< String_t* >::Invoke(11 /* System.String System.Security.Cryptography.X509Certificates.X509Certificate::GetIssuerName() */, L_2);
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
bool L_4 = String_op_Equality_m920492651(NULL /*static, unused*/, L_1, L_3, /*hidden argument*/NULL);
if (!L_4)
{
goto IL_0018;
}
}
{
return (X509Certificate_t713131622 *)NULL;
}
IL_0018:
{
Context_t3971234707 * L_5 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
TlsClientSettings_t2486039503 * L_6 = Context_get_ClientSettings_m2874391194(L_5, /*hidden argument*/NULL);
X509CertificateCollection_t3399372417 * L_7 = TlsClientSettings_get_Certificates_m2671943654(L_6, /*hidden argument*/NULL);
X509CertificateEnumerator_t855273292 * L_8 = X509CertificateCollection_GetEnumerator_m1686475779(L_7, /*hidden argument*/NULL);
V_1 = L_8;
}
IL_002e:
try
{ // begin try (depth: 1)
{
goto IL_0057;
}
IL_0033:
{
X509CertificateEnumerator_t855273292 * L_9 = V_1;
X509Certificate_t713131622 * L_10 = X509CertificateEnumerator_get_Current_m364341970(L_9, /*hidden argument*/NULL);
V_0 = L_10;
X509Certificate_t713131622 * L_11 = ___cert0;
String_t* L_12 = VirtFuncInvoker0< String_t* >::Invoke(12 /* System.String System.Security.Cryptography.X509Certificates.X509Certificate::GetName() */, L_11);
X509Certificate_t713131622 * L_13 = ___cert0;
String_t* L_14 = VirtFuncInvoker0< String_t* >::Invoke(11 /* System.String System.Security.Cryptography.X509Certificates.X509Certificate::GetIssuerName() */, L_13);
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
bool L_15 = String_op_Equality_m920492651(NULL /*static, unused*/, L_12, L_14, /*hidden argument*/NULL);
if (!L_15)
{
goto IL_0057;
}
}
IL_0050:
{
X509Certificate_t713131622 * L_16 = V_0;
V_2 = L_16;
IL2CPP_LEAVE(0x7B, FINALLY_0067);
}
IL_0057:
{
X509CertificateEnumerator_t855273292 * L_17 = V_1;
bool L_18 = X509CertificateEnumerator_MoveNext_m1557350766(L_17, /*hidden argument*/NULL);
if (L_18)
{
goto IL_0033;
}
}
IL_0062:
{
IL2CPP_LEAVE(0x79, FINALLY_0067);
}
} // end try (depth: 1)
catch(Il2CppExceptionWrapper& e)
{
__last_unhandled_exception = (Exception_t *)e.ex;
goto FINALLY_0067;
}
FINALLY_0067:
{ // begin finally (depth: 1)
{
X509CertificateEnumerator_t855273292 * L_19 = V_1;
V_3 = ((RuntimeObject*)IsInst((RuntimeObject*)L_19, IDisposable_t3640265483_il2cpp_TypeInfo_var));
RuntimeObject* L_20 = V_3;
if (L_20)
{
goto IL_0072;
}
}
IL_0071:
{
IL2CPP_END_FINALLY(103)
}
IL_0072:
{
RuntimeObject* L_21 = V_3;
InterfaceActionInvoker0::Invoke(0 /* System.Void System.IDisposable::Dispose() */, IDisposable_t3640265483_il2cpp_TypeInfo_var, L_21);
IL2CPP_END_FINALLY(103)
}
} // end finally (depth: 1)
IL2CPP_CLEANUP(103)
{
IL2CPP_JUMP_TBL(0x7B, IL_007b)
IL2CPP_JUMP_TBL(0x79, IL_0079)
IL2CPP_RETHROW_IF_UNHANDLED(Exception_t *)
}
IL_0079:
{
return (X509Certificate_t713131622 *)NULL;
}
IL_007b:
{
X509Certificate_t713131622 * L_22 = V_2;
return L_22;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsClientCertificateVerify::.ctor(Mono.Security.Protocol.Tls.Context)
extern "C" IL2CPP_METHOD_ATTR void TlsClientCertificateVerify__ctor_m1589614281 (TlsClientCertificateVerify_t1824902654 * __this, Context_t3971234707 * ___context0, const RuntimeMethod* method)
{
{
Context_t3971234707 * L_0 = ___context0;
HandshakeMessage__ctor_m2692487706(__this, L_0, ((int32_t)15), /*hidden argument*/NULL);
return;
}
}
// System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsClientCertificateVerify::Update()
extern "C" IL2CPP_METHOD_ATTR void TlsClientCertificateVerify_Update_m3046208881 (TlsClientCertificateVerify_t1824902654 * __this, const RuntimeMethod* method)
{
{
HandshakeMessage_Update_m2417837686(__this, /*hidden argument*/NULL);
TlsStream_Reset_m369197964(__this, /*hidden argument*/NULL);
return;
}
}
// System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsClientCertificateVerify::ProcessAsSsl3()
extern "C" IL2CPP_METHOD_ATTR void TlsClientCertificateVerify_ProcessAsSsl3_m1125097704 (TlsClientCertificateVerify_t1824902654 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (TlsClientCertificateVerify_ProcessAsSsl3_m1125097704_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
AsymmetricAlgorithm_t932037087 * V_0 = NULL;
ClientContext_t2797401965 * V_1 = NULL;
SslHandshakeHash_t2107581772 * V_2 = NULL;
ByteU5BU5D_t4116647657* V_3 = NULL;
RSA_t2385438082 * V_4 = NULL;
Exception_t * __last_unhandled_exception = 0;
NO_UNUSED_WARNING (__last_unhandled_exception);
Exception_t * __exception_local = 0;
NO_UNUSED_WARNING (__exception_local);
int32_t __leave_target = -1;
NO_UNUSED_WARNING (__leave_target);
{
V_0 = (AsymmetricAlgorithm_t932037087 *)NULL;
Context_t3971234707 * L_0 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
V_1 = ((ClientContext_t2797401965 *)CastclassClass((RuntimeObject*)L_0, ClientContext_t2797401965_il2cpp_TypeInfo_var));
ClientContext_t2797401965 * L_1 = V_1;
SslClientStream_t3914624661 * L_2 = ClientContext_get_SslStream_m1583577309(L_1, /*hidden argument*/NULL);
ClientContext_t2797401965 * L_3 = V_1;
TlsClientSettings_t2486039503 * L_4 = Context_get_ClientSettings_m2874391194(L_3, /*hidden argument*/NULL);
X509Certificate_t713131622 * L_5 = TlsClientSettings_get_ClientCertificate_m3139459118(L_4, /*hidden argument*/NULL);
ClientContext_t2797401965 * L_6 = V_1;
TlsClientSettings_t2486039503 * L_7 = Context_get_ClientSettings_m2874391194(L_6, /*hidden argument*/NULL);
String_t* L_8 = TlsClientSettings_get_TargetHost_m2463481414(L_7, /*hidden argument*/NULL);
AsymmetricAlgorithm_t932037087 * L_9 = SslClientStream_RaisePrivateKeySelection_m3394190501(L_2, L_5, L_8, /*hidden argument*/NULL);
V_0 = L_9;
AsymmetricAlgorithm_t932037087 * L_10 = V_0;
if (L_10)
{
goto IL_0043;
}
}
{
TlsException_t3534743363 * L_11 = (TlsException_t3534743363 *)il2cpp_codegen_object_new(TlsException_t3534743363_il2cpp_TypeInfo_var);
TlsException__ctor_m3242533711(L_11, ((int32_t)90), _stringLiteral1280642964, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_11, NULL, TlsClientCertificateVerify_ProcessAsSsl3_m1125097704_RuntimeMethod_var);
}
IL_0043:
{
ClientContext_t2797401965 * L_12 = V_1;
ByteU5BU5D_t4116647657* L_13 = Context_get_MasterSecret_m676083615(L_12, /*hidden argument*/NULL);
SslHandshakeHash_t2107581772 * L_14 = (SslHandshakeHash_t2107581772 *)il2cpp_codegen_object_new(SslHandshakeHash_t2107581772_il2cpp_TypeInfo_var);
SslHandshakeHash__ctor_m4169387017(L_14, L_13, /*hidden argument*/NULL);
V_2 = L_14;
SslHandshakeHash_t2107581772 * L_15 = V_2;
ClientContext_t2797401965 * L_16 = V_1;
TlsStream_t2365453965 * L_17 = Context_get_HandshakeMessages_m3655705111(L_16, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_18 = TlsStream_ToArray_m4177184296(L_17, /*hidden argument*/NULL);
ClientContext_t2797401965 * L_19 = V_1;
TlsStream_t2365453965 * L_20 = Context_get_HandshakeMessages_m3655705111(L_19, /*hidden argument*/NULL);
int64_t L_21 = VirtFuncInvoker0< int64_t >::Invoke(8 /* System.Int64 Mono.Security.Protocol.Tls.TlsStream::get_Length() */, L_20);
HashAlgorithm_TransformFinalBlock_m3005451348(L_15, L_18, 0, (((int32_t)((int32_t)L_21))), /*hidden argument*/NULL);
V_3 = (ByteU5BU5D_t4116647657*)NULL;
AsymmetricAlgorithm_t932037087 * L_22 = V_0;
if (((RSACryptoServiceProvider_t2683512874 *)IsInstSealed((RuntimeObject*)L_22, RSACryptoServiceProvider_t2683512874_il2cpp_TypeInfo_var)))
{
goto IL_0093;
}
}
IL_007b:
try
{ // begin try (depth: 1)
SslHandshakeHash_t2107581772 * L_23 = V_2;
AsymmetricAlgorithm_t932037087 * L_24 = V_0;
ByteU5BU5D_t4116647657* L_25 = SslHandshakeHash_CreateSignature_m1634235041(L_23, ((RSA_t2385438082 *)CastclassClass((RuntimeObject*)L_24, RSA_t2385438082_il2cpp_TypeInfo_var)), /*hidden argument*/NULL);
V_3 = L_25;
goto IL_0093;
} // end try (depth: 1)
catch(Il2CppExceptionWrapper& e)
{
__exception_local = (Exception_t *)e.ex;
if(il2cpp_codegen_class_is_assignable_from (NotImplementedException_t3489357830_il2cpp_TypeInfo_var, il2cpp_codegen_object_class(e.ex)))
goto CATCH_008d;
throw e;
}
CATCH_008d:
{ // begin catch(System.NotImplementedException)
goto IL_0093;
} // end catch (depth: 1)
IL_0093:
{
ByteU5BU5D_t4116647657* L_26 = V_3;
if (L_26)
{
goto IL_00b0;
}
}
{
AsymmetricAlgorithm_t932037087 * L_27 = V_0;
RSA_t2385438082 * L_28 = TlsClientCertificateVerify_getClientCertRSA_m1205662940(__this, ((RSA_t2385438082 *)CastclassClass((RuntimeObject*)L_27, RSA_t2385438082_il2cpp_TypeInfo_var)), /*hidden argument*/NULL);
V_4 = L_28;
SslHandshakeHash_t2107581772 * L_29 = V_2;
RSA_t2385438082 * L_30 = V_4;
ByteU5BU5D_t4116647657* L_31 = SslHandshakeHash_CreateSignature_m1634235041(L_29, L_30, /*hidden argument*/NULL);
V_3 = L_31;
}
IL_00b0:
{
ByteU5BU5D_t4116647657* L_32 = V_3;
TlsStream_Write_m1412844442(__this, (((int16_t)((int16_t)(((int32_t)((int32_t)(((RuntimeArray *)L_32)->max_length))))))), /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_33 = V_3;
ByteU5BU5D_t4116647657* L_34 = V_3;
VirtActionInvoker3< ByteU5BU5D_t4116647657*, int32_t, int32_t >::Invoke(18 /* System.Void Mono.Security.Protocol.Tls.TlsStream::Write(System.Byte[],System.Int32,System.Int32) */, __this, L_33, 0, (((int32_t)((int32_t)(((RuntimeArray *)L_34)->max_length)))));
return;
}
}
// System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsClientCertificateVerify::ProcessAsTls1()
extern "C" IL2CPP_METHOD_ATTR void TlsClientCertificateVerify_ProcessAsTls1_m1051495755 (TlsClientCertificateVerify_t1824902654 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (TlsClientCertificateVerify_ProcessAsTls1_m1051495755_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
AsymmetricAlgorithm_t932037087 * V_0 = NULL;
ClientContext_t2797401965 * V_1 = NULL;
MD5SHA1_t723838944 * V_2 = NULL;
ByteU5BU5D_t4116647657* V_3 = NULL;
RSA_t2385438082 * V_4 = NULL;
Exception_t * __last_unhandled_exception = 0;
NO_UNUSED_WARNING (__last_unhandled_exception);
Exception_t * __exception_local = 0;
NO_UNUSED_WARNING (__exception_local);
int32_t __leave_target = -1;
NO_UNUSED_WARNING (__leave_target);
{
V_0 = (AsymmetricAlgorithm_t932037087 *)NULL;
Context_t3971234707 * L_0 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
V_1 = ((ClientContext_t2797401965 *)CastclassClass((RuntimeObject*)L_0, ClientContext_t2797401965_il2cpp_TypeInfo_var));
ClientContext_t2797401965 * L_1 = V_1;
SslClientStream_t3914624661 * L_2 = ClientContext_get_SslStream_m1583577309(L_1, /*hidden argument*/NULL);
ClientContext_t2797401965 * L_3 = V_1;
TlsClientSettings_t2486039503 * L_4 = Context_get_ClientSettings_m2874391194(L_3, /*hidden argument*/NULL);
X509Certificate_t713131622 * L_5 = TlsClientSettings_get_ClientCertificate_m3139459118(L_4, /*hidden argument*/NULL);
ClientContext_t2797401965 * L_6 = V_1;
TlsClientSettings_t2486039503 * L_7 = Context_get_ClientSettings_m2874391194(L_6, /*hidden argument*/NULL);
String_t* L_8 = TlsClientSettings_get_TargetHost_m2463481414(L_7, /*hidden argument*/NULL);
AsymmetricAlgorithm_t932037087 * L_9 = SslClientStream_RaisePrivateKeySelection_m3394190501(L_2, L_5, L_8, /*hidden argument*/NULL);
V_0 = L_9;
AsymmetricAlgorithm_t932037087 * L_10 = V_0;
if (L_10)
{
goto IL_0043;
}
}
{
TlsException_t3534743363 * L_11 = (TlsException_t3534743363 *)il2cpp_codegen_object_new(TlsException_t3534743363_il2cpp_TypeInfo_var);
TlsException__ctor_m3242533711(L_11, ((int32_t)90), _stringLiteral1280642964, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_11, NULL, TlsClientCertificateVerify_ProcessAsTls1_m1051495755_RuntimeMethod_var);
}
IL_0043:
{
MD5SHA1_t723838944 * L_12 = (MD5SHA1_t723838944 *)il2cpp_codegen_object_new(MD5SHA1_t723838944_il2cpp_TypeInfo_var);
MD5SHA1__ctor_m4081016482(L_12, /*hidden argument*/NULL);
V_2 = L_12;
MD5SHA1_t723838944 * L_13 = V_2;
ClientContext_t2797401965 * L_14 = V_1;
TlsStream_t2365453965 * L_15 = Context_get_HandshakeMessages_m3655705111(L_14, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_16 = TlsStream_ToArray_m4177184296(L_15, /*hidden argument*/NULL);
ClientContext_t2797401965 * L_17 = V_1;
TlsStream_t2365453965 * L_18 = Context_get_HandshakeMessages_m3655705111(L_17, /*hidden argument*/NULL);
int64_t L_19 = VirtFuncInvoker0< int64_t >::Invoke(8 /* System.Int64 Mono.Security.Protocol.Tls.TlsStream::get_Length() */, L_18);
HashAlgorithm_ComputeHash_m2044824070(L_13, L_16, 0, (((int32_t)((int32_t)L_19))), /*hidden argument*/NULL);
V_3 = (ByteU5BU5D_t4116647657*)NULL;
AsymmetricAlgorithm_t932037087 * L_20 = V_0;
if (((RSACryptoServiceProvider_t2683512874 *)IsInstSealed((RuntimeObject*)L_20, RSACryptoServiceProvider_t2683512874_il2cpp_TypeInfo_var)))
{
goto IL_008d;
}
}
IL_0075:
try
{ // begin try (depth: 1)
MD5SHA1_t723838944 * L_21 = V_2;
AsymmetricAlgorithm_t932037087 * L_22 = V_0;
ByteU5BU5D_t4116647657* L_23 = MD5SHA1_CreateSignature_m3583449066(L_21, ((RSA_t2385438082 *)CastclassClass((RuntimeObject*)L_22, RSA_t2385438082_il2cpp_TypeInfo_var)), /*hidden argument*/NULL);
V_3 = L_23;
goto IL_008d;
} // end try (depth: 1)
catch(Il2CppExceptionWrapper& e)
{
__exception_local = (Exception_t *)e.ex;
if(il2cpp_codegen_class_is_assignable_from (NotImplementedException_t3489357830_il2cpp_TypeInfo_var, il2cpp_codegen_object_class(e.ex)))
goto CATCH_0087;
throw e;
}
CATCH_0087:
{ // begin catch(System.NotImplementedException)
goto IL_008d;
} // end catch (depth: 1)
IL_008d:
{
ByteU5BU5D_t4116647657* L_24 = V_3;
if (L_24)
{
goto IL_00aa;
}
}
{
AsymmetricAlgorithm_t932037087 * L_25 = V_0;
RSA_t2385438082 * L_26 = TlsClientCertificateVerify_getClientCertRSA_m1205662940(__this, ((RSA_t2385438082 *)CastclassClass((RuntimeObject*)L_25, RSA_t2385438082_il2cpp_TypeInfo_var)), /*hidden argument*/NULL);
V_4 = L_26;
MD5SHA1_t723838944 * L_27 = V_2;
RSA_t2385438082 * L_28 = V_4;
ByteU5BU5D_t4116647657* L_29 = MD5SHA1_CreateSignature_m3583449066(L_27, L_28, /*hidden argument*/NULL);
V_3 = L_29;
}
IL_00aa:
{
ByteU5BU5D_t4116647657* L_30 = V_3;
TlsStream_Write_m1412844442(__this, (((int16_t)((int16_t)(((int32_t)((int32_t)(((RuntimeArray *)L_30)->max_length))))))), /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_31 = V_3;
ByteU5BU5D_t4116647657* L_32 = V_3;
VirtActionInvoker3< ByteU5BU5D_t4116647657*, int32_t, int32_t >::Invoke(18 /* System.Void Mono.Security.Protocol.Tls.TlsStream::Write(System.Byte[],System.Int32,System.Int32) */, __this, L_31, 0, (((int32_t)((int32_t)(((RuntimeArray *)L_32)->max_length)))));
return;
}
}
// System.Security.Cryptography.RSA Mono.Security.Protocol.Tls.Handshake.Client.TlsClientCertificateVerify::getClientCertRSA(System.Security.Cryptography.RSA)
extern "C" IL2CPP_METHOD_ATTR RSA_t2385438082 * TlsClientCertificateVerify_getClientCertRSA_m1205662940 (TlsClientCertificateVerify_t1824902654 * __this, RSA_t2385438082 * ___privKey0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (TlsClientCertificateVerify_getClientCertRSA_m1205662940_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
RSAParameters_t1728406613 V_0;
memset(&V_0, 0, sizeof(V_0));
RSAParameters_t1728406613 V_1;
memset(&V_1, 0, sizeof(V_1));
ASN1_t2114160833 * V_2 = NULL;
ASN1_t2114160833 * V_3 = NULL;
ASN1_t2114160833 * V_4 = NULL;
int32_t V_5 = 0;
RSAManaged_t1757093820 * V_6 = NULL;
{
il2cpp_codegen_initobj((&V_0), sizeof(RSAParameters_t1728406613 ));
RSA_t2385438082 * L_0 = ___privKey0;
RSAParameters_t1728406613 L_1 = VirtFuncInvoker1< RSAParameters_t1728406613 , bool >::Invoke(12 /* System.Security.Cryptography.RSAParameters System.Security.Cryptography.RSA::ExportParameters(System.Boolean) */, L_0, (bool)1);
V_1 = L_1;
Context_t3971234707 * L_2 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
TlsClientSettings_t2486039503 * L_3 = Context_get_ClientSettings_m2874391194(L_2, /*hidden argument*/NULL);
X509CertificateCollection_t3399372417 * L_4 = TlsClientSettings_get_Certificates_m2671943654(L_3, /*hidden argument*/NULL);
X509Certificate_t713131622 * L_5 = X509CertificateCollection_get_Item_m1177942658(L_4, 0, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_6 = VirtFuncInvoker0< ByteU5BU5D_t4116647657* >::Invoke(13 /* System.Byte[] System.Security.Cryptography.X509Certificates.X509Certificate::GetPublicKey() */, L_5);
ASN1_t2114160833 * L_7 = (ASN1_t2114160833 *)il2cpp_codegen_object_new(ASN1_t2114160833_il2cpp_TypeInfo_var);
ASN1__ctor_m1638893325(L_7, L_6, /*hidden argument*/NULL);
V_2 = L_7;
ASN1_t2114160833 * L_8 = V_2;
ASN1_t2114160833 * L_9 = ASN1_get_Item_m2255075813(L_8, 0, /*hidden argument*/NULL);
V_3 = L_9;
ASN1_t2114160833 * L_10 = V_3;
if (!L_10)
{
goto IL_004b;
}
}
{
ASN1_t2114160833 * L_11 = V_3;
uint8_t L_12 = ASN1_get_Tag_m2789147236(L_11, /*hidden argument*/NULL);
if ((((int32_t)L_12) == ((int32_t)2)))
{
goto IL_004d;
}
}
IL_004b:
{
return (RSA_t2385438082 *)NULL;
}
IL_004d:
{
ASN1_t2114160833 * L_13 = V_2;
ASN1_t2114160833 * L_14 = ASN1_get_Item_m2255075813(L_13, 1, /*hidden argument*/NULL);
V_4 = L_14;
ASN1_t2114160833 * L_15 = V_4;
uint8_t L_16 = ASN1_get_Tag_m2789147236(L_15, /*hidden argument*/NULL);
if ((((int32_t)L_16) == ((int32_t)2)))
{
goto IL_0065;
}
}
{
return (RSA_t2385438082 *)NULL;
}
IL_0065:
{
ASN1_t2114160833 * L_17 = V_3;
ByteU5BU5D_t4116647657* L_18 = ASN1_get_Value_m63296490(L_17, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_19 = TlsClientCertificateVerify_getUnsignedBigInteger_m3003216819(__this, L_18, /*hidden argument*/NULL);
(&V_0)->set_Modulus_6(L_19);
ASN1_t2114160833 * L_20 = V_4;
ByteU5BU5D_t4116647657* L_21 = ASN1_get_Value_m63296490(L_20, /*hidden argument*/NULL);
(&V_0)->set_Exponent_7(L_21);
ByteU5BU5D_t4116647657* L_22 = (&V_1)->get_D_2();
(&V_0)->set_D_2(L_22);
ByteU5BU5D_t4116647657* L_23 = (&V_1)->get_DP_3();
(&V_0)->set_DP_3(L_23);
ByteU5BU5D_t4116647657* L_24 = (&V_1)->get_DQ_4();
(&V_0)->set_DQ_4(L_24);
ByteU5BU5D_t4116647657* L_25 = (&V_1)->get_InverseQ_5();
(&V_0)->set_InverseQ_5(L_25);
ByteU5BU5D_t4116647657* L_26 = (&V_1)->get_P_0();
(&V_0)->set_P_0(L_26);
ByteU5BU5D_t4116647657* L_27 = (&V_1)->get_Q_1();
(&V_0)->set_Q_1(L_27);
ByteU5BU5D_t4116647657* L_28 = (&V_0)->get_Modulus_6();
V_5 = ((int32_t)((int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_28)->max_length))))<<(int32_t)3));
int32_t L_29 = V_5;
RSAManaged_t1757093820 * L_30 = (RSAManaged_t1757093820 *)il2cpp_codegen_object_new(RSAManaged_t1757093820_il2cpp_TypeInfo_var);
RSAManaged__ctor_m350841446(L_30, L_29, /*hidden argument*/NULL);
V_6 = L_30;
RSAManaged_t1757093820 * L_31 = V_6;
RSAParameters_t1728406613 L_32 = V_0;
VirtActionInvoker1< RSAParameters_t1728406613 >::Invoke(13 /* System.Void Mono.Security.Cryptography.RSAManaged::ImportParameters(System.Security.Cryptography.RSAParameters) */, L_31, L_32);
RSAManaged_t1757093820 * L_33 = V_6;
return L_33;
}
}
// System.Byte[] Mono.Security.Protocol.Tls.Handshake.Client.TlsClientCertificateVerify::getUnsignedBigInteger(System.Byte[])
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* TlsClientCertificateVerify_getUnsignedBigInteger_m3003216819 (TlsClientCertificateVerify_t1824902654 * __this, ByteU5BU5D_t4116647657* ___integer0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (TlsClientCertificateVerify_getUnsignedBigInteger_m3003216819_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
int32_t V_0 = 0;
ByteU5BU5D_t4116647657* V_1 = NULL;
{
ByteU5BU5D_t4116647657* L_0 = ___integer0;
int32_t L_1 = 0;
uint8_t L_2 = (L_0)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_1));
if (L_2)
{
goto IL_0021;
}
}
{
ByteU5BU5D_t4116647657* L_3 = ___integer0;
V_0 = ((int32_t)il2cpp_codegen_subtract((int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_3)->max_length)))), (int32_t)1));
int32_t L_4 = V_0;
ByteU5BU5D_t4116647657* L_5 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)L_4);
V_1 = L_5;
ByteU5BU5D_t4116647657* L_6 = ___integer0;
ByteU5BU5D_t4116647657* L_7 = V_1;
int32_t L_8 = V_0;
Buffer_BlockCopy_m2884209081(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_6, 1, (RuntimeArray *)(RuntimeArray *)L_7, 0, L_8, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_9 = V_1;
return L_9;
}
IL_0021:
{
ByteU5BU5D_t4116647657* L_10 = ___integer0;
return L_10;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsClientFinished::.ctor(Mono.Security.Protocol.Tls.Context)
extern "C" IL2CPP_METHOD_ATTR void TlsClientFinished__ctor_m399357014 (TlsClientFinished_t2486981163 * __this, Context_t3971234707 * ___context0, const RuntimeMethod* method)
{
{
Context_t3971234707 * L_0 = ___context0;
HandshakeMessage__ctor_m2692487706(__this, L_0, ((int32_t)20), /*hidden argument*/NULL);
return;
}
}
// System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsClientFinished::.cctor()
extern "C" IL2CPP_METHOD_ATTR void TlsClientFinished__cctor_m1023921005 (RuntimeObject * __this /* static, unused */, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (TlsClientFinished__cctor_m1023921005_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
ByteU5BU5D_t4116647657* L_0 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)4);
ByteU5BU5D_t4116647657* L_1 = L_0;
RuntimeFieldHandle_t1871169219 L_2 = { reinterpret_cast<intptr_t> (U3CPrivateImplementationDetailsU3E_t3057255363____U24U24fieldU2D21_13_FieldInfo_var) };
RuntimeHelpers_InitializeArray_m3117905507(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_1, L_2, /*hidden argument*/NULL);
((TlsClientFinished_t2486981163_StaticFields*)il2cpp_codegen_static_fields_for(TlsClientFinished_t2486981163_il2cpp_TypeInfo_var))->set_Ssl3Marker_9(L_1);
return;
}
}
// System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsClientFinished::Update()
extern "C" IL2CPP_METHOD_ATTR void TlsClientFinished_Update_m2408925771 (TlsClientFinished_t2486981163 * __this, const RuntimeMethod* method)
{
{
HandshakeMessage_Update_m2417837686(__this, /*hidden argument*/NULL);
TlsStream_Reset_m369197964(__this, /*hidden argument*/NULL);
return;
}
}
// System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsClientFinished::ProcessAsSsl3()
extern "C" IL2CPP_METHOD_ATTR void TlsClientFinished_ProcessAsSsl3_m3094597606 (TlsClientFinished_t2486981163 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (TlsClientFinished_ProcessAsSsl3_m3094597606_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
HashAlgorithm_t1432317219 * V_0 = NULL;
ByteU5BU5D_t4116647657* V_1 = NULL;
{
Context_t3971234707 * L_0 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_1 = Context_get_MasterSecret_m676083615(L_0, /*hidden argument*/NULL);
SslHandshakeHash_t2107581772 * L_2 = (SslHandshakeHash_t2107581772 *)il2cpp_codegen_object_new(SslHandshakeHash_t2107581772_il2cpp_TypeInfo_var);
SslHandshakeHash__ctor_m4169387017(L_2, L_1, /*hidden argument*/NULL);
V_0 = L_2;
Context_t3971234707 * L_3 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
TlsStream_t2365453965 * L_4 = Context_get_HandshakeMessages_m3655705111(L_3, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_5 = TlsStream_ToArray_m4177184296(L_4, /*hidden argument*/NULL);
V_1 = L_5;
HashAlgorithm_t1432317219 * L_6 = V_0;
ByteU5BU5D_t4116647657* L_7 = V_1;
ByteU5BU5D_t4116647657* L_8 = V_1;
ByteU5BU5D_t4116647657* L_9 = V_1;
HashAlgorithm_TransformBlock_m4006041779(L_6, L_7, 0, (((int32_t)((int32_t)(((RuntimeArray *)L_8)->max_length)))), L_9, 0, /*hidden argument*/NULL);
HashAlgorithm_t1432317219 * L_10 = V_0;
IL2CPP_RUNTIME_CLASS_INIT(TlsClientFinished_t2486981163_il2cpp_TypeInfo_var);
ByteU5BU5D_t4116647657* L_11 = ((TlsClientFinished_t2486981163_StaticFields*)il2cpp_codegen_static_fields_for(TlsClientFinished_t2486981163_il2cpp_TypeInfo_var))->get_Ssl3Marker_9();
ByteU5BU5D_t4116647657* L_12 = ((TlsClientFinished_t2486981163_StaticFields*)il2cpp_codegen_static_fields_for(TlsClientFinished_t2486981163_il2cpp_TypeInfo_var))->get_Ssl3Marker_9();
ByteU5BU5D_t4116647657* L_13 = ((TlsClientFinished_t2486981163_StaticFields*)il2cpp_codegen_static_fields_for(TlsClientFinished_t2486981163_il2cpp_TypeInfo_var))->get_Ssl3Marker_9();
HashAlgorithm_TransformBlock_m4006041779(L_10, L_11, 0, (((int32_t)((int32_t)(((RuntimeArray *)L_12)->max_length)))), L_13, 0, /*hidden argument*/NULL);
HashAlgorithm_t1432317219 * L_14 = V_0;
IL2CPP_RUNTIME_CLASS_INIT(CipherSuite_t3414744575_il2cpp_TypeInfo_var);
ByteU5BU5D_t4116647657* L_15 = ((CipherSuite_t3414744575_StaticFields*)il2cpp_codegen_static_fields_for(CipherSuite_t3414744575_il2cpp_TypeInfo_var))->get_EmptyArray_0();
HashAlgorithm_TransformFinalBlock_m3005451348(L_14, L_15, 0, 0, /*hidden argument*/NULL);
HashAlgorithm_t1432317219 * L_16 = V_0;
ByteU5BU5D_t4116647657* L_17 = VirtFuncInvoker0< ByteU5BU5D_t4116647657* >::Invoke(9 /* System.Byte[] System.Security.Cryptography.HashAlgorithm::get_Hash() */, L_16);
TlsStream_Write_m4133894341(__this, L_17, /*hidden argument*/NULL);
return;
}
}
// System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsClientFinished::ProcessAsTls1()
extern "C" IL2CPP_METHOD_ATTR void TlsClientFinished_ProcessAsTls1_m2429863130 (TlsClientFinished_t2486981163 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (TlsClientFinished_ProcessAsTls1_m2429863130_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
HashAlgorithm_t1432317219 * V_0 = NULL;
ByteU5BU5D_t4116647657* V_1 = NULL;
ByteU5BU5D_t4116647657* V_2 = NULL;
{
MD5SHA1_t723838944 * L_0 = (MD5SHA1_t723838944 *)il2cpp_codegen_object_new(MD5SHA1_t723838944_il2cpp_TypeInfo_var);
MD5SHA1__ctor_m4081016482(L_0, /*hidden argument*/NULL);
V_0 = L_0;
Context_t3971234707 * L_1 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
TlsStream_t2365453965 * L_2 = Context_get_HandshakeMessages_m3655705111(L_1, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_3 = TlsStream_ToArray_m4177184296(L_2, /*hidden argument*/NULL);
V_1 = L_3;
HashAlgorithm_t1432317219 * L_4 = V_0;
ByteU5BU5D_t4116647657* L_5 = V_1;
ByteU5BU5D_t4116647657* L_6 = V_1;
ByteU5BU5D_t4116647657* L_7 = HashAlgorithm_ComputeHash_m2044824070(L_4, L_5, 0, (((int32_t)((int32_t)(((RuntimeArray *)L_6)->max_length)))), /*hidden argument*/NULL);
V_2 = L_7;
Context_t3971234707 * L_8 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
SecurityParameters_t2199972650 * L_9 = Context_get_Write_m1564343513(L_8, /*hidden argument*/NULL);
CipherSuite_t3414744575 * L_10 = SecurityParameters_get_Cipher_m108846204(L_9, /*hidden argument*/NULL);
Context_t3971234707 * L_11 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_12 = Context_get_MasterSecret_m676083615(L_11, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_13 = V_2;
ByteU5BU5D_t4116647657* L_14 = CipherSuite_PRF_m2801806009(L_10, L_12, _stringLiteral548517185, L_13, ((int32_t)12), /*hidden argument*/NULL);
TlsStream_Write_m4133894341(__this, L_14, /*hidden argument*/NULL);
return;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsClientHello::.ctor(Mono.Security.Protocol.Tls.Context)
extern "C" IL2CPP_METHOD_ATTR void TlsClientHello__ctor_m1986768336 (TlsClientHello_t97965998 * __this, Context_t3971234707 * ___context0, const RuntimeMethod* method)
{
{
Context_t3971234707 * L_0 = ___context0;
HandshakeMessage__ctor_m2692487706(__this, L_0, 1, /*hidden argument*/NULL);
return;
}
}
// System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsClientHello::Update()
extern "C" IL2CPP_METHOD_ATTR void TlsClientHello_Update_m3773127362 (TlsClientHello_t97965998 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (TlsClientHello_Update_m3773127362_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
ClientContext_t2797401965 * V_0 = NULL;
{
Context_t3971234707 * L_0 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
V_0 = ((ClientContext_t2797401965 *)CastclassClass((RuntimeObject*)L_0, ClientContext_t2797401965_il2cpp_TypeInfo_var));
HandshakeMessage_Update_m2417837686(__this, /*hidden argument*/NULL);
ClientContext_t2797401965 * L_1 = V_0;
ByteU5BU5D_t4116647657* L_2 = __this->get_random_9();
Context_set_ClientRandom_m2974454575(L_1, L_2, /*hidden argument*/NULL);
ClientContext_t2797401965 * L_3 = V_0;
Context_t3971234707 * L_4 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
int16_t L_5 = Context_get_Protocol_m1078422015(L_4, /*hidden argument*/NULL);
ClientContext_set_ClientHelloProtocol_m4189379912(L_3, L_5, /*hidden argument*/NULL);
__this->set_random_9((ByteU5BU5D_t4116647657*)NULL);
return;
}
}
// System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsClientHello::ProcessAsSsl3()
extern "C" IL2CPP_METHOD_ATTR void TlsClientHello_ProcessAsSsl3_m3427133094 (TlsClientHello_t97965998 * __this, const RuntimeMethod* method)
{
{
VirtActionInvoker0::Invoke(24 /* System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsClientHello::ProcessAsTls1() */, __this);
return;
}
}
// System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsClientHello::ProcessAsTls1()
extern "C" IL2CPP_METHOD_ATTR void TlsClientHello_ProcessAsTls1_m2549285167 (TlsClientHello_t97965998 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (TlsClientHello_ProcessAsTls1_m2549285167_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
TlsStream_t2365453965 * V_0 = NULL;
int32_t V_1 = 0;
{
Context_t3971234707 * L_0 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
int16_t L_1 = Context_get_Protocol_m1078422015(L_0, /*hidden argument*/NULL);
TlsStream_Write_m1412844442(__this, L_1, /*hidden argument*/NULL);
TlsStream_t2365453965 * L_2 = (TlsStream_t2365453965 *)il2cpp_codegen_object_new(TlsStream_t2365453965_il2cpp_TypeInfo_var);
TlsStream__ctor_m787793111(L_2, /*hidden argument*/NULL);
V_0 = L_2;
TlsStream_t2365453965 * L_3 = V_0;
Context_t3971234707 * L_4 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
int32_t L_5 = Context_GetUnixTime_m3811151335(L_4, /*hidden argument*/NULL);
TlsStream_Write_m1413106584(L_3, L_5, /*hidden argument*/NULL);
TlsStream_t2365453965 * L_6 = V_0;
Context_t3971234707 * L_7 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_8 = Context_GetSecureRandomBytes_m3676009387(L_7, ((int32_t)28), /*hidden argument*/NULL);
TlsStream_Write_m4133894341(L_6, L_8, /*hidden argument*/NULL);
TlsStream_t2365453965 * L_9 = V_0;
ByteU5BU5D_t4116647657* L_10 = TlsStream_ToArray_m4177184296(L_9, /*hidden argument*/NULL);
__this->set_random_9(L_10);
TlsStream_t2365453965 * L_11 = V_0;
TlsStream_Reset_m369197964(L_11, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_12 = __this->get_random_9();
TlsStream_Write_m4133894341(__this, L_12, /*hidden argument*/NULL);
Context_t3971234707 * L_13 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
Context_t3971234707 * L_14 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
TlsClientSettings_t2486039503 * L_15 = Context_get_ClientSettings_m2874391194(L_14, /*hidden argument*/NULL);
String_t* L_16 = TlsClientSettings_get_TargetHost_m2463481414(L_15, /*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(ClientSessionCache_t2353595803_il2cpp_TypeInfo_var);
ByteU5BU5D_t4116647657* L_17 = ClientSessionCache_FromHost_m273325760(NULL /*static, unused*/, L_16, /*hidden argument*/NULL);
Context_set_SessionId_m942328427(L_13, L_17, /*hidden argument*/NULL);
Context_t3971234707 * L_18 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_19 = Context_get_SessionId_m1086671147(L_18, /*hidden argument*/NULL);
if (!L_19)
{
goto IL_00c6;
}
}
{
Context_t3971234707 * L_20 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_21 = Context_get_SessionId_m1086671147(L_20, /*hidden argument*/NULL);
TlsStream_Write_m4246040664(__this, (uint8_t)(((int32_t)((uint8_t)(((int32_t)((int32_t)(((RuntimeArray *)L_21)->max_length))))))), /*hidden argument*/NULL);
Context_t3971234707 * L_22 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_23 = Context_get_SessionId_m1086671147(L_22, /*hidden argument*/NULL);
if ((((int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_23)->max_length))))) <= ((int32_t)0)))
{
goto IL_00c1;
}
}
{
Context_t3971234707 * L_24 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_25 = Context_get_SessionId_m1086671147(L_24, /*hidden argument*/NULL);
TlsStream_Write_m4133894341(__this, L_25, /*hidden argument*/NULL);
}
IL_00c1:
{
goto IL_00cd;
}
IL_00c6:
{
TlsStream_Write_m4246040664(__this, (uint8_t)0, /*hidden argument*/NULL);
}
IL_00cd:
{
Context_t3971234707 * L_26 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
CipherSuiteCollection_t1129639304 * L_27 = Context_get_SupportedCiphers_m1883682196(L_26, /*hidden argument*/NULL);
int32_t L_28 = CipherSuiteCollection_get_Count_m4271692531(L_27, /*hidden argument*/NULL);
TlsStream_Write_m1412844442(__this, (((int16_t)((int16_t)((int32_t)il2cpp_codegen_multiply((int32_t)L_28, (int32_t)2))))), /*hidden argument*/NULL);
V_1 = 0;
goto IL_010d;
}
IL_00ed:
{
Context_t3971234707 * L_29 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
CipherSuiteCollection_t1129639304 * L_30 = Context_get_SupportedCiphers_m1883682196(L_29, /*hidden argument*/NULL);
int32_t L_31 = V_1;
CipherSuite_t3414744575 * L_32 = CipherSuiteCollection_get_Item_m4188309062(L_30, L_31, /*hidden argument*/NULL);
int16_t L_33 = CipherSuite_get_Code_m3847824475(L_32, /*hidden argument*/NULL);
TlsStream_Write_m1412844442(__this, L_33, /*hidden argument*/NULL);
int32_t L_34 = V_1;
V_1 = ((int32_t)il2cpp_codegen_add((int32_t)L_34, (int32_t)1));
}
IL_010d:
{
int32_t L_35 = V_1;
Context_t3971234707 * L_36 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
CipherSuiteCollection_t1129639304 * L_37 = Context_get_SupportedCiphers_m1883682196(L_36, /*hidden argument*/NULL);
int32_t L_38 = CipherSuiteCollection_get_Count_m4271692531(L_37, /*hidden argument*/NULL);
if ((((int32_t)L_35) < ((int32_t)L_38)))
{
goto IL_00ed;
}
}
{
TlsStream_Write_m4246040664(__this, (uint8_t)1, /*hidden argument*/NULL);
Context_t3971234707 * L_39 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
int32_t L_40 = Context_get_CompressionMethod_m2647114016(L_39, /*hidden argument*/NULL);
TlsStream_Write_m4246040664(__this, (uint8_t)(((int32_t)((uint8_t)L_40))), /*hidden argument*/NULL);
return;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsClientKeyExchange::.ctor(Mono.Security.Protocol.Tls.Context)
extern "C" IL2CPP_METHOD_ATTR void TlsClientKeyExchange__ctor_m31786095 (TlsClientKeyExchange_t643923608 * __this, Context_t3971234707 * ___context0, const RuntimeMethod* method)
{
{
Context_t3971234707 * L_0 = ___context0;
HandshakeMessage__ctor_m2692487706(__this, L_0, ((int32_t)16), /*hidden argument*/NULL);
return;
}
}
// System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsClientKeyExchange::ProcessAsSsl3()
extern "C" IL2CPP_METHOD_ATTR void TlsClientKeyExchange_ProcessAsSsl3_m2576462374 (TlsClientKeyExchange_t643923608 * __this, const RuntimeMethod* method)
{
{
TlsClientKeyExchange_ProcessCommon_m2327374157(__this, (bool)0, /*hidden argument*/NULL);
return;
}
}
// System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsClientKeyExchange::ProcessAsTls1()
extern "C" IL2CPP_METHOD_ATTR void TlsClientKeyExchange_ProcessAsTls1_m338960549 (TlsClientKeyExchange_t643923608 * __this, const RuntimeMethod* method)
{
{
TlsClientKeyExchange_ProcessCommon_m2327374157(__this, (bool)1, /*hidden argument*/NULL);
return;
}
}
// System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsClientKeyExchange::ProcessCommon(System.Boolean)
extern "C" IL2CPP_METHOD_ATTR void TlsClientKeyExchange_ProcessCommon_m2327374157 (TlsClientKeyExchange_t643923608 * __this, bool ___sendLength0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (TlsClientKeyExchange_ProcessCommon_m2327374157_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
ByteU5BU5D_t4116647657* V_0 = NULL;
RSA_t2385438082 * V_1 = NULL;
RSAPKCS1KeyExchangeFormatter_t2761096101 * V_2 = NULL;
ByteU5BU5D_t4116647657* V_3 = NULL;
{
Context_t3971234707 * L_0 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
SecurityParameters_t2199972650 * L_1 = Context_get_Negotiating_m2044579817(L_0, /*hidden argument*/NULL);
CipherSuite_t3414744575 * L_2 = SecurityParameters_get_Cipher_m108846204(L_1, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_3 = CipherSuite_CreatePremasterSecret_m4264566459(L_2, /*hidden argument*/NULL);
V_0 = L_3;
V_1 = (RSA_t2385438082 *)NULL;
Context_t3971234707 * L_4 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
TlsServerSettings_t4144396432 * L_5 = Context_get_ServerSettings_m1982578801(L_4, /*hidden argument*/NULL);
bool L_6 = TlsServerSettings_get_ServerKeyExchange_m691183033(L_5, /*hidden argument*/NULL);
if (!L_6)
{
goto IL_004e;
}
}
{
RSAManaged_t1757093820 * L_7 = (RSAManaged_t1757093820 *)il2cpp_codegen_object_new(RSAManaged_t1757093820_il2cpp_TypeInfo_var);
RSAManaged__ctor_m3504773110(L_7, /*hidden argument*/NULL);
V_1 = L_7;
RSA_t2385438082 * L_8 = V_1;
Context_t3971234707 * L_9 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
TlsServerSettings_t4144396432 * L_10 = Context_get_ServerSettings_m1982578801(L_9, /*hidden argument*/NULL);
RSAParameters_t1728406613 L_11 = TlsServerSettings_get_RsaParameters_m2264301690(L_10, /*hidden argument*/NULL);
VirtActionInvoker1< RSAParameters_t1728406613 >::Invoke(13 /* System.Void System.Security.Cryptography.RSA::ImportParameters(System.Security.Cryptography.RSAParameters) */, L_8, L_11);
goto IL_005f;
}
IL_004e:
{
Context_t3971234707 * L_12 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
TlsServerSettings_t4144396432 * L_13 = Context_get_ServerSettings_m1982578801(L_12, /*hidden argument*/NULL);
RSA_t2385438082 * L_14 = TlsServerSettings_get_CertificateRSA_m597274968(L_13, /*hidden argument*/NULL);
V_1 = L_14;
}
IL_005f:
{
RSA_t2385438082 * L_15 = V_1;
RSAPKCS1KeyExchangeFormatter_t2761096101 * L_16 = (RSAPKCS1KeyExchangeFormatter_t2761096101 *)il2cpp_codegen_object_new(RSAPKCS1KeyExchangeFormatter_t2761096101_il2cpp_TypeInfo_var);
RSAPKCS1KeyExchangeFormatter__ctor_m1170240343(L_16, L_15, /*hidden argument*/NULL);
V_2 = L_16;
RSAPKCS1KeyExchangeFormatter_t2761096101 * L_17 = V_2;
ByteU5BU5D_t4116647657* L_18 = V_0;
ByteU5BU5D_t4116647657* L_19 = VirtFuncInvoker1< ByteU5BU5D_t4116647657*, ByteU5BU5D_t4116647657* >::Invoke(4 /* System.Byte[] System.Security.Cryptography.RSAPKCS1KeyExchangeFormatter::CreateKeyExchange(System.Byte[]) */, L_17, L_18);
V_3 = L_19;
bool L_20 = ___sendLength0;
if (!L_20)
{
goto IL_007e;
}
}
{
ByteU5BU5D_t4116647657* L_21 = V_3;
TlsStream_Write_m1412844442(__this, (((int16_t)((int16_t)(((int32_t)((int32_t)(((RuntimeArray *)L_21)->max_length))))))), /*hidden argument*/NULL);
}
IL_007e:
{
ByteU5BU5D_t4116647657* L_22 = V_3;
TlsStream_Write_m4133894341(__this, L_22, /*hidden argument*/NULL);
Context_t3971234707 * L_23 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
SecurityParameters_t2199972650 * L_24 = Context_get_Negotiating_m2044579817(L_23, /*hidden argument*/NULL);
CipherSuite_t3414744575 * L_25 = SecurityParameters_get_Cipher_m108846204(L_24, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_26 = V_0;
VirtActionInvoker1< ByteU5BU5D_t4116647657* >::Invoke(6 /* System.Void Mono.Security.Protocol.Tls.CipherSuite::ComputeMasterSecret(System.Byte[]) */, L_25, L_26);
Context_t3971234707 * L_27 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
SecurityParameters_t2199972650 * L_28 = Context_get_Negotiating_m2044579817(L_27, /*hidden argument*/NULL);
CipherSuite_t3414744575 * L_29 = SecurityParameters_get_Cipher_m108846204(L_28, /*hidden argument*/NULL);
VirtActionInvoker0::Invoke(7 /* System.Void Mono.Security.Protocol.Tls.CipherSuite::ComputeKeys() */, L_29);
RSA_t2385438082 * L_30 = V_1;
AsymmetricAlgorithm_Clear_m1528825448(L_30, /*hidden argument*/NULL);
return;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsServerCertificate::.ctor(Mono.Security.Protocol.Tls.Context,System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void TlsServerCertificate__ctor_m389328097 (TlsServerCertificate_t2716496392 * __this, Context_t3971234707 * ___context0, ByteU5BU5D_t4116647657* ___buffer1, const RuntimeMethod* method)
{
{
Context_t3971234707 * L_0 = ___context0;
ByteU5BU5D_t4116647657* L_1 = ___buffer1;
HandshakeMessage__ctor_m1555296807(__this, L_0, ((int32_t)11), L_1, /*hidden argument*/NULL);
return;
}
}
// System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsServerCertificate::Update()
extern "C" IL2CPP_METHOD_ATTR void TlsServerCertificate_Update_m3204893479 (TlsServerCertificate_t2716496392 * __this, const RuntimeMethod* method)
{
{
HandshakeMessage_Update_m2417837686(__this, /*hidden argument*/NULL);
Context_t3971234707 * L_0 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
TlsServerSettings_t4144396432 * L_1 = Context_get_ServerSettings_m1982578801(L_0, /*hidden argument*/NULL);
X509CertificateCollection_t1542168550 * L_2 = __this->get_certificates_9();
TlsServerSettings_set_Certificates_m3313375596(L_1, L_2, /*hidden argument*/NULL);
Context_t3971234707 * L_3 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
TlsServerSettings_t4144396432 * L_4 = Context_get_ServerSettings_m1982578801(L_3, /*hidden argument*/NULL);
TlsServerSettings_UpdateCertificateRSA_m3985265846(L_4, /*hidden argument*/NULL);
return;
}
}
// System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsServerCertificate::ProcessAsSsl3()
extern "C" IL2CPP_METHOD_ATTR void TlsServerCertificate_ProcessAsSsl3_m1306583193 (TlsServerCertificate_t2716496392 * __this, const RuntimeMethod* method)
{
{
VirtActionInvoker0::Invoke(24 /* System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsServerCertificate::ProcessAsTls1() */, __this);
return;
}
}
// System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsServerCertificate::ProcessAsTls1()
extern "C" IL2CPP_METHOD_ATTR void TlsServerCertificate_ProcessAsTls1_m819212276 (TlsServerCertificate_t2716496392 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (TlsServerCertificate_ProcessAsTls1_m819212276_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
int32_t V_0 = 0;
int32_t V_1 = 0;
int32_t V_2 = 0;
ByteU5BU5D_t4116647657* V_3 = NULL;
X509Certificate_t489243025 * V_4 = NULL;
{
X509CertificateCollection_t1542168550 * L_0 = (X509CertificateCollection_t1542168550 *)il2cpp_codegen_object_new(X509CertificateCollection_t1542168550_il2cpp_TypeInfo_var);
X509CertificateCollection__ctor_m2066277891(L_0, /*hidden argument*/NULL);
__this->set_certificates_9(L_0);
V_0 = 0;
int32_t L_1 = TlsStream_ReadInt24_m3096782201(__this, /*hidden argument*/NULL);
V_1 = L_1;
goto IL_004d;
}
IL_0019:
{
int32_t L_2 = TlsStream_ReadInt24_m3096782201(__this, /*hidden argument*/NULL);
V_2 = L_2;
int32_t L_3 = V_0;
V_0 = ((int32_t)il2cpp_codegen_add((int32_t)L_3, (int32_t)3));
int32_t L_4 = V_2;
if ((((int32_t)L_4) <= ((int32_t)0)))
{
goto IL_004d;
}
}
{
int32_t L_5 = V_2;
ByteU5BU5D_t4116647657* L_6 = TlsStream_ReadBytes_m2334803179(__this, L_5, /*hidden argument*/NULL);
V_3 = L_6;
ByteU5BU5D_t4116647657* L_7 = V_3;
X509Certificate_t489243025 * L_8 = (X509Certificate_t489243025 *)il2cpp_codegen_object_new(X509Certificate_t489243025_il2cpp_TypeInfo_var);
X509Certificate__ctor_m553243489(L_8, L_7, /*hidden argument*/NULL);
V_4 = L_8;
X509CertificateCollection_t1542168550 * L_9 = __this->get_certificates_9();
X509Certificate_t489243025 * L_10 = V_4;
X509CertificateCollection_Add_m2277657976(L_9, L_10, /*hidden argument*/NULL);
int32_t L_11 = V_0;
int32_t L_12 = V_2;
V_0 = ((int32_t)il2cpp_codegen_add((int32_t)L_11, (int32_t)L_12));
}
IL_004d:
{
int32_t L_13 = V_0;
int32_t L_14 = V_1;
if ((((int32_t)L_13) < ((int32_t)L_14)))
{
goto IL_0019;
}
}
{
X509CertificateCollection_t1542168550 * L_15 = __this->get_certificates_9();
TlsServerCertificate_validateCertificates_m4242999387(__this, L_15, /*hidden argument*/NULL);
return;
}
}
// System.Boolean Mono.Security.Protocol.Tls.Handshake.Client.TlsServerCertificate::checkCertificateUsage(Mono.Security.X509.X509Certificate)
extern "C" IL2CPP_METHOD_ATTR bool TlsServerCertificate_checkCertificateUsage_m2152016773 (TlsServerCertificate_t2716496392 * __this, X509Certificate_t489243025 * ___cert0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (TlsServerCertificate_checkCertificateUsage_m2152016773_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
ClientContext_t2797401965 * V_0 = NULL;
int32_t V_1 = 0;
KeyUsageExtension_t1795615912 * V_2 = NULL;
ExtendedKeyUsageExtension_t3929363080 * V_3 = NULL;
X509Extension_t3173393653 * V_4 = NULL;
NetscapeCertTypeExtension_t1524296876 * V_5 = NULL;
int32_t V_6 = 0;
int32_t G_B19_0 = 0;
int32_t G_B26_0 = 0;
{
Context_t3971234707 * L_0 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
V_0 = ((ClientContext_t2797401965 *)CastclassClass((RuntimeObject*)L_0, ClientContext_t2797401965_il2cpp_TypeInfo_var));
X509Certificate_t489243025 * L_1 = ___cert0;
int32_t L_2 = X509Certificate_get_Version_m3419034307(L_1, /*hidden argument*/NULL);
if ((((int32_t)L_2) >= ((int32_t)3)))
{
goto IL_001a;
}
}
{
return (bool)1;
}
IL_001a:
{
V_1 = 0;
ClientContext_t2797401965 * L_3 = V_0;
SecurityParameters_t2199972650 * L_4 = Context_get_Negotiating_m2044579817(L_3, /*hidden argument*/NULL);
CipherSuite_t3414744575 * L_5 = SecurityParameters_get_Cipher_m108846204(L_4, /*hidden argument*/NULL);
int32_t L_6 = CipherSuite_get_ExchangeAlgorithmType_m1633709183(L_5, /*hidden argument*/NULL);
V_6 = L_6;
int32_t L_7 = V_6;
switch (L_7)
{
case 0:
{
goto IL_0061;
}
case 1:
{
goto IL_0068;
}
case 2:
{
goto IL_006a;
}
case 3:
{
goto IL_0059;
}
case 4:
{
goto IL_004e;
}
}
}
{
goto IL_006a;
}
IL_004e:
{
V_1 = ((int32_t)128);
goto IL_006a;
}
IL_0059:
{
V_1 = ((int32_t)32);
goto IL_006a;
}
IL_0061:
{
V_1 = 8;
goto IL_006a;
}
IL_0068:
{
return (bool)0;
}
IL_006a:
{
V_2 = (KeyUsageExtension_t1795615912 *)NULL;
V_3 = (ExtendedKeyUsageExtension_t3929363080 *)NULL;
X509Certificate_t489243025 * L_8 = ___cert0;
X509ExtensionCollection_t609554709 * L_9 = X509Certificate_get_Extensions_m2532937142(L_8, /*hidden argument*/NULL);
X509Extension_t3173393653 * L_10 = X509ExtensionCollection_get_Item_m4249795832(L_9, _stringLiteral1004423982, /*hidden argument*/NULL);
V_4 = L_10;
X509Extension_t3173393653 * L_11 = V_4;
if (!L_11)
{
goto IL_008f;
}
}
{
X509Extension_t3173393653 * L_12 = V_4;
KeyUsageExtension_t1795615912 * L_13 = (KeyUsageExtension_t1795615912 *)il2cpp_codegen_object_new(KeyUsageExtension_t1795615912_il2cpp_TypeInfo_var);
KeyUsageExtension__ctor_m3414452076(L_13, L_12, /*hidden argument*/NULL);
V_2 = L_13;
}
IL_008f:
{
X509Certificate_t489243025 * L_14 = ___cert0;
X509ExtensionCollection_t609554709 * L_15 = X509Certificate_get_Extensions_m2532937142(L_14, /*hidden argument*/NULL);
X509Extension_t3173393653 * L_16 = X509ExtensionCollection_get_Item_m4249795832(L_15, _stringLiteral1386761008, /*hidden argument*/NULL);
V_4 = L_16;
X509Extension_t3173393653 * L_17 = V_4;
if (!L_17)
{
goto IL_00b0;
}
}
{
X509Extension_t3173393653 * L_18 = V_4;
ExtendedKeyUsageExtension_t3929363080 * L_19 = (ExtendedKeyUsageExtension_t3929363080 *)il2cpp_codegen_object_new(ExtendedKeyUsageExtension_t3929363080_il2cpp_TypeInfo_var);
ExtendedKeyUsageExtension__ctor_m3228998638(L_19, L_18, /*hidden argument*/NULL);
V_3 = L_19;
}
IL_00b0:
{
KeyUsageExtension_t1795615912 * L_20 = V_2;
if (!L_20)
{
goto IL_00f3;
}
}
{
ExtendedKeyUsageExtension_t3929363080 * L_21 = V_3;
if (!L_21)
{
goto IL_00f3;
}
}
{
KeyUsageExtension_t1795615912 * L_22 = V_2;
int32_t L_23 = V_1;
bool L_24 = KeyUsageExtension_Support_m3508856672(L_22, L_23, /*hidden argument*/NULL);
if (L_24)
{
goto IL_00ca;
}
}
{
return (bool)0;
}
IL_00ca:
{
ExtendedKeyUsageExtension_t3929363080 * L_25 = V_3;
ArrayList_t2718874744 * L_26 = ExtendedKeyUsageExtension_get_KeyPurpose_m187586919(L_25, /*hidden argument*/NULL);
bool L_27 = VirtFuncInvoker1< bool, RuntimeObject * >::Invoke(32 /* System.Boolean System.Collections.ArrayList::Contains(System.Object) */, L_26, _stringLiteral1948411844);
if (L_27)
{
goto IL_00f1;
}
}
{
ExtendedKeyUsageExtension_t3929363080 * L_28 = V_3;
ArrayList_t2718874744 * L_29 = ExtendedKeyUsageExtension_get_KeyPurpose_m187586919(L_28, /*hidden argument*/NULL);
bool L_30 = VirtFuncInvoker1< bool, RuntimeObject * >::Invoke(32 /* System.Boolean System.Collections.ArrayList::Contains(System.Object) */, L_29, _stringLiteral116715971);
G_B19_0 = ((int32_t)(L_30));
goto IL_00f2;
}
IL_00f1:
{
G_B19_0 = 1;
}
IL_00f2:
{
return (bool)G_B19_0;
}
IL_00f3:
{
KeyUsageExtension_t1795615912 * L_31 = V_2;
if (!L_31)
{
goto IL_0101;
}
}
{
KeyUsageExtension_t1795615912 * L_32 = V_2;
int32_t L_33 = V_1;
bool L_34 = KeyUsageExtension_Support_m3508856672(L_32, L_33, /*hidden argument*/NULL);
return L_34;
}
IL_0101:
{
ExtendedKeyUsageExtension_t3929363080 * L_35 = V_3;
if (!L_35)
{
goto IL_0130;
}
}
{
ExtendedKeyUsageExtension_t3929363080 * L_36 = V_3;
ArrayList_t2718874744 * L_37 = ExtendedKeyUsageExtension_get_KeyPurpose_m187586919(L_36, /*hidden argument*/NULL);
bool L_38 = VirtFuncInvoker1< bool, RuntimeObject * >::Invoke(32 /* System.Boolean System.Collections.ArrayList::Contains(System.Object) */, L_37, _stringLiteral1948411844);
if (L_38)
{
goto IL_012e;
}
}
{
ExtendedKeyUsageExtension_t3929363080 * L_39 = V_3;
ArrayList_t2718874744 * L_40 = ExtendedKeyUsageExtension_get_KeyPurpose_m187586919(L_39, /*hidden argument*/NULL);
bool L_41 = VirtFuncInvoker1< bool, RuntimeObject * >::Invoke(32 /* System.Boolean System.Collections.ArrayList::Contains(System.Object) */, L_40, _stringLiteral116715971);
G_B26_0 = ((int32_t)(L_41));
goto IL_012f;
}
IL_012e:
{
G_B26_0 = 1;
}
IL_012f:
{
return (bool)G_B26_0;
}
IL_0130:
{
X509Certificate_t489243025 * L_42 = ___cert0;
X509ExtensionCollection_t609554709 * L_43 = X509Certificate_get_Extensions_m2532937142(L_42, /*hidden argument*/NULL);
X509Extension_t3173393653 * L_44 = X509ExtensionCollection_get_Item_m4249795832(L_43, _stringLiteral4008398740, /*hidden argument*/NULL);
V_4 = L_44;
X509Extension_t3173393653 * L_45 = V_4;
if (!L_45)
{
goto IL_015c;
}
}
{
X509Extension_t3173393653 * L_46 = V_4;
NetscapeCertTypeExtension_t1524296876 * L_47 = (NetscapeCertTypeExtension_t1524296876 *)il2cpp_codegen_object_new(NetscapeCertTypeExtension_t1524296876_il2cpp_TypeInfo_var);
NetscapeCertTypeExtension__ctor_m323882095(L_47, L_46, /*hidden argument*/NULL);
V_5 = L_47;
NetscapeCertTypeExtension_t1524296876 * L_48 = V_5;
bool L_49 = NetscapeCertTypeExtension_Support_m3981181230(L_48, ((int32_t)64), /*hidden argument*/NULL);
return L_49;
}
IL_015c:
{
return (bool)1;
}
}
// System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsServerCertificate::validateCertificates(Mono.Security.X509.X509CertificateCollection)
extern "C" IL2CPP_METHOD_ATTR void TlsServerCertificate_validateCertificates_m4242999387 (TlsServerCertificate_t2716496392 * __this, X509CertificateCollection_t1542168550 * ___certificates0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (TlsServerCertificate_validateCertificates_m4242999387_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
ClientContext_t2797401965 * V_0 = NULL;
uint8_t V_1 = 0;
ValidationResult_t3834298736 * V_2 = NULL;
int64_t V_3 = 0;
String_t* V_4 = NULL;
X509Certificate_t489243025 * V_5 = NULL;
X509Certificate_t713131622 * V_6 = NULL;
ArrayList_t2718874744 * V_7 = NULL;
X509CertificateCollection_t1542168550 * V_8 = NULL;
X509Chain_t863783600 * V_9 = NULL;
bool V_10 = false;
Int32U5BU5D_t385246372* V_11 = NULL;
int64_t V_12 = 0;
int32_t V_13 = 0;
Exception_t * __last_unhandled_exception = 0;
NO_UNUSED_WARNING (__last_unhandled_exception);
Exception_t * __exception_local = 0;
NO_UNUSED_WARNING (__exception_local);
int32_t __leave_target = -1;
NO_UNUSED_WARNING (__leave_target);
{
Context_t3971234707 * L_0 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
V_0 = ((ClientContext_t2797401965 *)CastclassClass((RuntimeObject*)L_0, ClientContext_t2797401965_il2cpp_TypeInfo_var));
V_1 = ((int32_t)42);
ClientContext_t2797401965 * L_1 = V_0;
SslClientStream_t3914624661 * L_2 = ClientContext_get_SslStream_m1583577309(L_1, /*hidden argument*/NULL);
bool L_3 = VirtFuncInvoker0< bool >::Invoke(29 /* System.Boolean Mono.Security.Protocol.Tls.SslClientStream::get_HaveRemoteValidation2Callback() */, L_2);
if (!L_3)
{
goto IL_00b4;
}
}
{
ClientContext_t2797401965 * L_4 = V_0;
SslClientStream_t3914624661 * L_5 = ClientContext_get_SslStream_m1583577309(L_4, /*hidden argument*/NULL);
X509CertificateCollection_t1542168550 * L_6 = ___certificates0;
ValidationResult_t3834298736 * L_7 = VirtFuncInvoker1< ValidationResult_t3834298736 *, X509CertificateCollection_t1542168550 * >::Invoke(32 /* Mono.Security.Protocol.Tls.ValidationResult Mono.Security.Protocol.Tls.SslClientStream::RaiseServerCertificateValidation2(Mono.Security.X509.X509CertificateCollection) */, L_5, L_6);
V_2 = L_7;
ValidationResult_t3834298736 * L_8 = V_2;
bool L_9 = ValidationResult_get_Trusted_m2108852505(L_8, /*hidden argument*/NULL);
if (!L_9)
{
goto IL_0038;
}
}
{
return;
}
IL_0038:
{
ValidationResult_t3834298736 * L_10 = V_2;
int32_t L_11 = ValidationResult_get_ErrorCode_m1533688152(L_10, /*hidden argument*/NULL);
V_3 = (((int64_t)((int64_t)L_11)));
int64_t L_12 = V_3;
V_12 = L_12;
int64_t L_13 = V_12;
if ((((int64_t)L_13) == ((int64_t)(((int64_t)((uint64_t)(((uint32_t)((uint32_t)((int32_t)-2146762487))))))))))
{
goto IL_007f;
}
}
{
int64_t L_14 = V_12;
if ((((int64_t)L_14) == ((int64_t)(((int64_t)((uint64_t)(((uint32_t)((uint32_t)((int32_t)-2146762486))))))))))
{
goto IL_0077;
}
}
{
int64_t L_15 = V_12;
if ((((int64_t)L_15) == ((int64_t)(((int64_t)((uint64_t)(((uint32_t)((uint32_t)((int32_t)-2146762495))))))))))
{
goto IL_006f;
}
}
{
goto IL_0087;
}
IL_006f:
{
V_1 = ((int32_t)45);
goto IL_008f;
}
IL_0077:
{
V_1 = ((int32_t)48);
goto IL_008f;
}
IL_007f:
{
V_1 = ((int32_t)48);
goto IL_008f;
}
IL_0087:
{
V_1 = ((int32_t)46);
goto IL_008f;
}
IL_008f:
{
int64_t L_16 = V_3;
int64_t L_17 = L_16;
RuntimeObject * L_18 = Box(Int64_t3736567304_il2cpp_TypeInfo_var, &L_17);
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_19 = String_Format_m2844511972(NULL /*static, unused*/, _stringLiteral75338978, L_18, /*hidden argument*/NULL);
V_4 = L_19;
uint8_t L_20 = V_1;
String_t* L_21 = V_4;
String_t* L_22 = String_Concat_m3937257545(NULL /*static, unused*/, _stringLiteral3757118627, L_21, /*hidden argument*/NULL);
TlsException_t3534743363 * L_23 = (TlsException_t3534743363 *)il2cpp_codegen_object_new(TlsException_t3534743363_il2cpp_TypeInfo_var);
TlsException__ctor_m3242533711(L_23, L_20, L_22, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_23, NULL, TlsServerCertificate_validateCertificates_m4242999387_RuntimeMethod_var);
}
IL_00b4:
{
X509CertificateCollection_t1542168550 * L_24 = ___certificates0;
X509Certificate_t489243025 * L_25 = X509CertificateCollection_get_Item_m3285563224(L_24, 0, /*hidden argument*/NULL);
V_5 = L_25;
X509Certificate_t489243025 * L_26 = V_5;
ByteU5BU5D_t4116647657* L_27 = VirtFuncInvoker0< ByteU5BU5D_t4116647657* >::Invoke(12 /* System.Byte[] Mono.Security.X509.X509Certificate::get_RawData() */, L_26);
X509Certificate_t713131622 * L_28 = (X509Certificate_t713131622 *)il2cpp_codegen_object_new(X509Certificate_t713131622_il2cpp_TypeInfo_var);
X509Certificate__ctor_m1413707489(L_28, L_27, /*hidden argument*/NULL);
V_6 = L_28;
ArrayList_t2718874744 * L_29 = (ArrayList_t2718874744 *)il2cpp_codegen_object_new(ArrayList_t2718874744_il2cpp_TypeInfo_var);
ArrayList__ctor_m4254721275(L_29, /*hidden argument*/NULL);
V_7 = L_29;
X509Certificate_t489243025 * L_30 = V_5;
bool L_31 = TlsServerCertificate_checkCertificateUsage_m2152016773(__this, L_30, /*hidden argument*/NULL);
if (L_31)
{
goto IL_00f1;
}
}
{
ArrayList_t2718874744 * L_32 = V_7;
int32_t L_33 = ((int32_t)-2146762490);
RuntimeObject * L_34 = Box(Int32_t2950945753_il2cpp_TypeInfo_var, &L_33);
VirtFuncInvoker1< int32_t, RuntimeObject * >::Invoke(30 /* System.Int32 System.Collections.ArrayList::Add(System.Object) */, L_32, L_34);
}
IL_00f1:
{
X509Certificate_t489243025 * L_35 = V_5;
bool L_36 = TlsServerCertificate_checkServerIdentity_m2801575130(__this, L_35, /*hidden argument*/NULL);
if (L_36)
{
goto IL_0110;
}
}
{
ArrayList_t2718874744 * L_37 = V_7;
int32_t L_38 = ((int32_t)-2146762481);
RuntimeObject * L_39 = Box(Int32_t2950945753_il2cpp_TypeInfo_var, &L_38);
VirtFuncInvoker1< int32_t, RuntimeObject * >::Invoke(30 /* System.Int32 System.Collections.ArrayList::Add(System.Object) */, L_37, L_39);
}
IL_0110:
{
X509CertificateCollection_t1542168550 * L_40 = ___certificates0;
X509CertificateCollection_t1542168550 * L_41 = (X509CertificateCollection_t1542168550 *)il2cpp_codegen_object_new(X509CertificateCollection_t1542168550_il2cpp_TypeInfo_var);
X509CertificateCollection__ctor_m3467061452(L_41, L_40, /*hidden argument*/NULL);
V_8 = L_41;
X509CertificateCollection_t1542168550 * L_42 = V_8;
X509Certificate_t489243025 * L_43 = V_5;
X509CertificateCollection_Remove_m2199606504(L_42, L_43, /*hidden argument*/NULL);
X509CertificateCollection_t1542168550 * L_44 = V_8;
X509Chain_t863783600 * L_45 = (X509Chain_t863783600 *)il2cpp_codegen_object_new(X509Chain_t863783600_il2cpp_TypeInfo_var);
X509Chain__ctor_m1084071882(L_45, L_44, /*hidden argument*/NULL);
V_9 = L_45;
V_10 = (bool)0;
}
IL_012d:
try
{ // begin try (depth: 1)
X509Chain_t863783600 * L_46 = V_9;
X509Certificate_t489243025 * L_47 = V_5;
bool L_48 = X509Chain_Build_m2469702749(L_46, L_47, /*hidden argument*/NULL);
V_10 = L_48;
goto IL_0146;
} // end try (depth: 1)
catch(Il2CppExceptionWrapper& e)
{
__exception_local = (Exception_t *)e.ex;
if(il2cpp_codegen_class_is_assignable_from (Exception_t_il2cpp_TypeInfo_var, il2cpp_codegen_object_class(e.ex)))
goto CATCH_013d;
throw e;
}
CATCH_013d:
{ // begin catch(System.Exception)
V_10 = (bool)0;
goto IL_0146;
} // end catch (depth: 1)
IL_0146:
{
bool L_49 = V_10;
if (L_49)
{
goto IL_0243;
}
}
{
X509Chain_t863783600 * L_50 = V_9;
int32_t L_51 = X509Chain_get_Status_m348797749(L_50, /*hidden argument*/NULL);
V_13 = L_51;
int32_t L_52 = V_13;
if ((((int32_t)L_52) == ((int32_t)1)))
{
goto IL_01d9;
}
}
{
int32_t L_53 = V_13;
if ((((int32_t)L_53) == ((int32_t)2)))
{
goto IL_01c2;
}
}
{
int32_t L_54 = V_13;
if ((((int32_t)L_54) == ((int32_t)8)))
{
goto IL_01ab;
}
}
{
int32_t L_55 = V_13;
if ((((int32_t)L_55) == ((int32_t)((int32_t)32))))
{
goto IL_020d;
}
}
{
int32_t L_56 = V_13;
if ((((int32_t)L_56) == ((int32_t)((int32_t)1024))))
{
goto IL_0194;
}
}
{
int32_t L_57 = V_13;
if ((((int32_t)L_57) == ((int32_t)((int32_t)65536))))
{
goto IL_01f3;
}
}
{
goto IL_0227;
}
IL_0194:
{
ArrayList_t2718874744 * L_58 = V_7;
int32_t L_59 = ((int32_t)-2146869223);
RuntimeObject * L_60 = Box(Int32_t2950945753_il2cpp_TypeInfo_var, &L_59);
VirtFuncInvoker1< int32_t, RuntimeObject * >::Invoke(30 /* System.Int32 System.Collections.ArrayList::Add(System.Object) */, L_58, L_60);
goto IL_0243;
}
IL_01ab:
{
ArrayList_t2718874744 * L_61 = V_7;
int32_t L_62 = ((int32_t)-2146869232);
RuntimeObject * L_63 = Box(Int32_t2950945753_il2cpp_TypeInfo_var, &L_62);
VirtFuncInvoker1< int32_t, RuntimeObject * >::Invoke(30 /* System.Int32 System.Collections.ArrayList::Add(System.Object) */, L_61, L_63);
goto IL_0243;
}
IL_01c2:
{
ArrayList_t2718874744 * L_64 = V_7;
int32_t L_65 = ((int32_t)-2146762494);
RuntimeObject * L_66 = Box(Int32_t2950945753_il2cpp_TypeInfo_var, &L_65);
VirtFuncInvoker1< int32_t, RuntimeObject * >::Invoke(30 /* System.Int32 System.Collections.ArrayList::Add(System.Object) */, L_64, L_66);
goto IL_0243;
}
IL_01d9:
{
V_1 = ((int32_t)45);
ArrayList_t2718874744 * L_67 = V_7;
int32_t L_68 = ((int32_t)-2146762495);
RuntimeObject * L_69 = Box(Int32_t2950945753_il2cpp_TypeInfo_var, &L_68);
VirtFuncInvoker1< int32_t, RuntimeObject * >::Invoke(30 /* System.Int32 System.Collections.ArrayList::Add(System.Object) */, L_67, L_69);
goto IL_0243;
}
IL_01f3:
{
V_1 = ((int32_t)48);
ArrayList_t2718874744 * L_70 = V_7;
int32_t L_71 = ((int32_t)-2146762486);
RuntimeObject * L_72 = Box(Int32_t2950945753_il2cpp_TypeInfo_var, &L_71);
VirtFuncInvoker1< int32_t, RuntimeObject * >::Invoke(30 /* System.Int32 System.Collections.ArrayList::Add(System.Object) */, L_70, L_72);
goto IL_0243;
}
IL_020d:
{
V_1 = ((int32_t)48);
ArrayList_t2718874744 * L_73 = V_7;
int32_t L_74 = ((int32_t)-2146762487);
RuntimeObject * L_75 = Box(Int32_t2950945753_il2cpp_TypeInfo_var, &L_74);
VirtFuncInvoker1< int32_t, RuntimeObject * >::Invoke(30 /* System.Int32 System.Collections.ArrayList::Add(System.Object) */, L_73, L_75);
goto IL_0243;
}
IL_0227:
{
V_1 = ((int32_t)46);
ArrayList_t2718874744 * L_76 = V_7;
X509Chain_t863783600 * L_77 = V_9;
int32_t L_78 = X509Chain_get_Status_m348797749(L_77, /*hidden argument*/NULL);
int32_t L_79 = ((int32_t)L_78);
RuntimeObject * L_80 = Box(Int32_t2950945753_il2cpp_TypeInfo_var, &L_79);
VirtFuncInvoker1< int32_t, RuntimeObject * >::Invoke(30 /* System.Int32 System.Collections.ArrayList::Add(System.Object) */, L_76, L_80);
goto IL_0243;
}
IL_0243:
{
ArrayList_t2718874744 * L_81 = V_7;
RuntimeTypeHandle_t3027515415 L_82 = { reinterpret_cast<intptr_t> (Int32_t2950945753_0_0_0_var) };
IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var);
Type_t * L_83 = Type_GetTypeFromHandle_m1620074514(NULL /*static, unused*/, L_82, /*hidden argument*/NULL);
RuntimeArray * L_84 = VirtFuncInvoker1< RuntimeArray *, Type_t * >::Invoke(48 /* System.Array System.Collections.ArrayList::ToArray(System.Type) */, L_81, L_83);
V_11 = ((Int32U5BU5D_t385246372*)Castclass((RuntimeObject*)L_84, Int32U5BU5D_t385246372_il2cpp_TypeInfo_var));
ClientContext_t2797401965 * L_85 = V_0;
SslClientStream_t3914624661 * L_86 = ClientContext_get_SslStream_m1583577309(L_85, /*hidden argument*/NULL);
X509Certificate_t713131622 * L_87 = V_6;
Int32U5BU5D_t385246372* L_88 = V_11;
bool L_89 = VirtFuncInvoker2< bool, X509Certificate_t713131622 *, Int32U5BU5D_t385246372* >::Invoke(31 /* System.Boolean Mono.Security.Protocol.Tls.SslClientStream::RaiseServerCertificateValidation(System.Security.Cryptography.X509Certificates.X509Certificate,System.Int32[]) */, L_86, L_87, L_88);
if (L_89)
{
goto IL_027b;
}
}
{
uint8_t L_90 = V_1;
TlsException_t3534743363 * L_91 = (TlsException_t3534743363 *)il2cpp_codegen_object_new(TlsException_t3534743363_il2cpp_TypeInfo_var);
TlsException__ctor_m3242533711(L_91, L_90, _stringLiteral2975569484, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_91, NULL, TlsServerCertificate_validateCertificates_m4242999387_RuntimeMethod_var);
}
IL_027b:
{
return;
}
}
// System.Boolean Mono.Security.Protocol.Tls.Handshake.Client.TlsServerCertificate::checkServerIdentity(Mono.Security.X509.X509Certificate)
extern "C" IL2CPP_METHOD_ATTR bool TlsServerCertificate_checkServerIdentity_m2801575130 (TlsServerCertificate_t2716496392 * __this, X509Certificate_t489243025 * ___cert0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (TlsServerCertificate_checkServerIdentity_m2801575130_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
ClientContext_t2797401965 * V_0 = NULL;
String_t* V_1 = NULL;
X509Extension_t3173393653 * V_2 = NULL;
SubjectAltNameExtension_t1536937677 * V_3 = NULL;
String_t* V_4 = NULL;
StringU5BU5D_t1281789340* V_5 = NULL;
int32_t V_6 = 0;
String_t* V_7 = NULL;
StringU5BU5D_t1281789340* V_8 = NULL;
int32_t V_9 = 0;
{
Context_t3971234707 * L_0 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
V_0 = ((ClientContext_t2797401965 *)CastclassClass((RuntimeObject*)L_0, ClientContext_t2797401965_il2cpp_TypeInfo_var));
ClientContext_t2797401965 * L_1 = V_0;
TlsClientSettings_t2486039503 * L_2 = Context_get_ClientSettings_m2874391194(L_1, /*hidden argument*/NULL);
String_t* L_3 = TlsClientSettings_get_TargetHost_m2463481414(L_2, /*hidden argument*/NULL);
V_1 = L_3;
X509Certificate_t489243025 * L_4 = ___cert0;
X509ExtensionCollection_t609554709 * L_5 = X509Certificate_get_Extensions_m2532937142(L_4, /*hidden argument*/NULL);
X509Extension_t3173393653 * L_6 = X509ExtensionCollection_get_Item_m4249795832(L_5, _stringLiteral1004423984, /*hidden argument*/NULL);
V_2 = L_6;
X509Extension_t3173393653 * L_7 = V_2;
if (!L_7)
{
goto IL_00a4;
}
}
{
X509Extension_t3173393653 * L_8 = V_2;
SubjectAltNameExtension_t1536937677 * L_9 = (SubjectAltNameExtension_t1536937677 *)il2cpp_codegen_object_new(SubjectAltNameExtension_t1536937677_il2cpp_TypeInfo_var);
SubjectAltNameExtension__ctor_m1991362362(L_9, L_8, /*hidden argument*/NULL);
V_3 = L_9;
SubjectAltNameExtension_t1536937677 * L_10 = V_3;
StringU5BU5D_t1281789340* L_11 = SubjectAltNameExtension_get_DNSNames_m2346000460(L_10, /*hidden argument*/NULL);
V_5 = L_11;
V_6 = 0;
goto IL_0062;
}
IL_0046:
{
StringU5BU5D_t1281789340* L_12 = V_5;
int32_t L_13 = V_6;
int32_t L_14 = L_13;
String_t* L_15 = (L_12)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_14));
V_4 = L_15;
String_t* L_16 = V_1;
String_t* L_17 = V_4;
bool L_18 = TlsServerCertificate_Match_m2996121276(NULL /*static, unused*/, L_16, L_17, /*hidden argument*/NULL);
if (!L_18)
{
goto IL_005c;
}
}
{
return (bool)1;
}
IL_005c:
{
int32_t L_19 = V_6;
V_6 = ((int32_t)il2cpp_codegen_add((int32_t)L_19, (int32_t)1));
}
IL_0062:
{
int32_t L_20 = V_6;
StringU5BU5D_t1281789340* L_21 = V_5;
if ((((int32_t)L_20) < ((int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_21)->max_length)))))))
{
goto IL_0046;
}
}
{
SubjectAltNameExtension_t1536937677 * L_22 = V_3;
StringU5BU5D_t1281789340* L_23 = SubjectAltNameExtension_get_IPAddresses_m1641002124(L_22, /*hidden argument*/NULL);
V_8 = L_23;
V_9 = 0;
goto IL_0099;
}
IL_007d:
{
StringU5BU5D_t1281789340* L_24 = V_8;
int32_t L_25 = V_9;
int32_t L_26 = L_25;
String_t* L_27 = (L_24)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_26));
V_7 = L_27;
String_t* L_28 = V_7;
String_t* L_29 = V_1;
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
bool L_30 = String_op_Equality_m920492651(NULL /*static, unused*/, L_28, L_29, /*hidden argument*/NULL);
if (!L_30)
{
goto IL_0093;
}
}
{
return (bool)1;
}
IL_0093:
{
int32_t L_31 = V_9;
V_9 = ((int32_t)il2cpp_codegen_add((int32_t)L_31, (int32_t)1));
}
IL_0099:
{
int32_t L_32 = V_9;
StringU5BU5D_t1281789340* L_33 = V_8;
if ((((int32_t)L_32) < ((int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_33)->max_length)))))))
{
goto IL_007d;
}
}
IL_00a4:
{
X509Certificate_t489243025 * L_34 = ___cert0;
String_t* L_35 = VirtFuncInvoker0< String_t* >::Invoke(16 /* System.String Mono.Security.X509.X509Certificate::get_SubjectName() */, L_34);
bool L_36 = TlsServerCertificate_checkDomainName_m2543190336(__this, L_35, /*hidden argument*/NULL);
return L_36;
}
}
// System.Boolean Mono.Security.Protocol.Tls.Handshake.Client.TlsServerCertificate::checkDomainName(System.String)
extern "C" IL2CPP_METHOD_ATTR bool TlsServerCertificate_checkDomainName_m2543190336 (TlsServerCertificate_t2716496392 * __this, String_t* ___subjectName0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (TlsServerCertificate_checkDomainName_m2543190336_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
ClientContext_t2797401965 * V_0 = NULL;
String_t* V_1 = NULL;
Regex_t3657309853 * V_2 = NULL;
MatchCollection_t1395363720 * V_3 = NULL;
{
Context_t3971234707 * L_0 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
V_0 = ((ClientContext_t2797401965 *)CastclassClass((RuntimeObject*)L_0, ClientContext_t2797401965_il2cpp_TypeInfo_var));
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_1 = ((String_t_StaticFields*)il2cpp_codegen_static_fields_for(String_t_il2cpp_TypeInfo_var))->get_Empty_2();
V_1 = L_1;
Regex_t3657309853 * L_2 = (Regex_t3657309853 *)il2cpp_codegen_object_new(Regex_t3657309853_il2cpp_TypeInfo_var);
Regex__ctor_m3948448025(L_2, _stringLiteral4107337270, /*hidden argument*/NULL);
V_2 = L_2;
Regex_t3657309853 * L_3 = V_2;
String_t* L_4 = ___subjectName0;
MatchCollection_t1395363720 * L_5 = Regex_Matches_m979395559(L_3, L_4, /*hidden argument*/NULL);
V_3 = L_5;
MatchCollection_t1395363720 * L_6 = V_3;
int32_t L_7 = MatchCollection_get_Count_m1586545784(L_6, /*hidden argument*/NULL);
if ((!(((uint32_t)L_7) == ((uint32_t)1))))
{
goto IL_005f;
}
}
{
MatchCollection_t1395363720 * L_8 = V_3;
Match_t3408321083 * L_9 = VirtFuncInvoker1< Match_t3408321083 *, int32_t >::Invoke(9 /* System.Text.RegularExpressions.Match System.Text.RegularExpressions.MatchCollection::get_Item(System.Int32) */, L_8, 0);
bool L_10 = Group_get_Success_m3823591889(L_9, /*hidden argument*/NULL);
if (!L_10)
{
goto IL_005f;
}
}
{
MatchCollection_t1395363720 * L_11 = V_3;
Match_t3408321083 * L_12 = VirtFuncInvoker1< Match_t3408321083 *, int32_t >::Invoke(9 /* System.Text.RegularExpressions.Match System.Text.RegularExpressions.MatchCollection::get_Item(System.Int32) */, L_11, 0);
GroupCollection_t69770484 * L_13 = VirtFuncInvoker0< GroupCollection_t69770484 * >::Invoke(4 /* System.Text.RegularExpressions.GroupCollection System.Text.RegularExpressions.Match::get_Groups() */, L_12);
Group_t2468205786 * L_14 = GroupCollection_get_Item_m723682197(L_13, 1, /*hidden argument*/NULL);
String_t* L_15 = Capture_get_Value_m3919646039(L_14, /*hidden argument*/NULL);
String_t* L_16 = String_ToString_m838249115(L_15, /*hidden argument*/NULL);
V_1 = L_16;
}
IL_005f:
{
ClientContext_t2797401965 * L_17 = V_0;
TlsClientSettings_t2486039503 * L_18 = Context_get_ClientSettings_m2874391194(L_17, /*hidden argument*/NULL);
String_t* L_19 = TlsClientSettings_get_TargetHost_m2463481414(L_18, /*hidden argument*/NULL);
String_t* L_20 = V_1;
bool L_21 = TlsServerCertificate_Match_m2996121276(NULL /*static, unused*/, L_19, L_20, /*hidden argument*/NULL);
return L_21;
}
}
// System.Boolean Mono.Security.Protocol.Tls.Handshake.Client.TlsServerCertificate::Match(System.String,System.String)
extern "C" IL2CPP_METHOD_ATTR bool TlsServerCertificate_Match_m2996121276 (RuntimeObject * __this /* static, unused */, String_t* ___hostname0, String_t* ___pattern1, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (TlsServerCertificate_Match_m2996121276_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
int32_t V_0 = 0;
int32_t V_1 = 0;
String_t* V_2 = NULL;
int32_t V_3 = 0;
int32_t V_4 = 0;
String_t* V_5 = NULL;
int32_t G_B15_0 = 0;
{
String_t* L_0 = ___pattern1;
int32_t L_1 = String_IndexOf_m363431711(L_0, ((int32_t)42), /*hidden argument*/NULL);
V_0 = L_1;
int32_t L_2 = V_0;
if ((!(((uint32_t)L_2) == ((uint32_t)(-1)))))
{
goto IL_0021;
}
}
{
String_t* L_3 = ___hostname0;
String_t* L_4 = ___pattern1;
IL2CPP_RUNTIME_CLASS_INIT(CultureInfo_t4157843068_il2cpp_TypeInfo_var);
CultureInfo_t4157843068 * L_5 = CultureInfo_get_InvariantCulture_m3532445182(NULL /*static, unused*/, /*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
int32_t L_6 = String_Compare_m1293271421(NULL /*static, unused*/, L_3, L_4, (bool)1, L_5, /*hidden argument*/NULL);
return (bool)((((int32_t)L_6) == ((int32_t)0))? 1 : 0);
}
IL_0021:
{
int32_t L_7 = V_0;
String_t* L_8 = ___pattern1;
int32_t L_9 = String_get_Length_m3847582255(L_8, /*hidden argument*/NULL);
if ((((int32_t)L_7) == ((int32_t)((int32_t)il2cpp_codegen_subtract((int32_t)L_9, (int32_t)1)))))
{
goto IL_0041;
}
}
{
String_t* L_10 = ___pattern1;
int32_t L_11 = V_0;
Il2CppChar L_12 = String_get_Chars_m2986988803(L_10, ((int32_t)il2cpp_codegen_add((int32_t)L_11, (int32_t)1)), /*hidden argument*/NULL);
if ((((int32_t)L_12) == ((int32_t)((int32_t)46))))
{
goto IL_0041;
}
}
{
return (bool)0;
}
IL_0041:
{
String_t* L_13 = ___pattern1;
int32_t L_14 = V_0;
int32_t L_15 = String_IndexOf_m2466398549(L_13, ((int32_t)42), ((int32_t)il2cpp_codegen_add((int32_t)L_14, (int32_t)1)), /*hidden argument*/NULL);
V_1 = L_15;
int32_t L_16 = V_1;
if ((((int32_t)L_16) == ((int32_t)(-1))))
{
goto IL_0056;
}
}
{
return (bool)0;
}
IL_0056:
{
String_t* L_17 = ___pattern1;
int32_t L_18 = V_0;
String_t* L_19 = String_Substring_m2848979100(L_17, ((int32_t)il2cpp_codegen_add((int32_t)L_18, (int32_t)1)), /*hidden argument*/NULL);
V_2 = L_19;
String_t* L_20 = ___hostname0;
int32_t L_21 = String_get_Length_m3847582255(L_20, /*hidden argument*/NULL);
String_t* L_22 = V_2;
int32_t L_23 = String_get_Length_m3847582255(L_22, /*hidden argument*/NULL);
V_3 = ((int32_t)il2cpp_codegen_subtract((int32_t)L_21, (int32_t)L_23));
int32_t L_24 = V_3;
if ((((int32_t)L_24) > ((int32_t)0)))
{
goto IL_0077;
}
}
{
return (bool)0;
}
IL_0077:
{
String_t* L_25 = ___hostname0;
int32_t L_26 = V_3;
String_t* L_27 = V_2;
String_t* L_28 = V_2;
int32_t L_29 = String_get_Length_m3847582255(L_28, /*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(CultureInfo_t4157843068_il2cpp_TypeInfo_var);
CultureInfo_t4157843068 * L_30 = CultureInfo_get_InvariantCulture_m3532445182(NULL /*static, unused*/, /*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
int32_t L_31 = String_Compare_m945110377(NULL /*static, unused*/, L_25, L_26, L_27, 0, L_29, (bool)1, L_30, /*hidden argument*/NULL);
if (!L_31)
{
goto IL_0093;
}
}
{
return (bool)0;
}
IL_0093:
{
int32_t L_32 = V_0;
if (L_32)
{
goto IL_00c3;
}
}
{
String_t* L_33 = ___hostname0;
int32_t L_34 = String_IndexOf_m363431711(L_33, ((int32_t)46), /*hidden argument*/NULL);
V_4 = L_34;
int32_t L_35 = V_4;
if ((((int32_t)L_35) == ((int32_t)(-1))))
{
goto IL_00c1;
}
}
{
int32_t L_36 = V_4;
String_t* L_37 = ___hostname0;
int32_t L_38 = String_get_Length_m3847582255(L_37, /*hidden argument*/NULL);
String_t* L_39 = V_2;
int32_t L_40 = String_get_Length_m3847582255(L_39, /*hidden argument*/NULL);
G_B15_0 = ((((int32_t)((((int32_t)L_36) < ((int32_t)((int32_t)il2cpp_codegen_subtract((int32_t)L_38, (int32_t)L_40))))? 1 : 0)) == ((int32_t)0))? 1 : 0);
goto IL_00c2;
}
IL_00c1:
{
G_B15_0 = 1;
}
IL_00c2:
{
return (bool)G_B15_0;
}
IL_00c3:
{
String_t* L_41 = ___pattern1;
int32_t L_42 = V_0;
String_t* L_43 = String_Substring_m1610150815(L_41, 0, L_42, /*hidden argument*/NULL);
V_5 = L_43;
String_t* L_44 = ___hostname0;
String_t* L_45 = V_5;
String_t* L_46 = V_5;
int32_t L_47 = String_get_Length_m3847582255(L_46, /*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(CultureInfo_t4157843068_il2cpp_TypeInfo_var);
CultureInfo_t4157843068 * L_48 = CultureInfo_get_InvariantCulture_m3532445182(NULL /*static, unused*/, /*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
int32_t L_49 = String_Compare_m945110377(NULL /*static, unused*/, L_44, 0, L_45, 0, L_47, (bool)1, L_48, /*hidden argument*/NULL);
return (bool)((((int32_t)L_49) == ((int32_t)0))? 1 : 0);
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsServerCertificateRequest::.ctor(Mono.Security.Protocol.Tls.Context,System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void TlsServerCertificateRequest__ctor_m1334974076 (TlsServerCertificateRequest_t3690397592 * __this, Context_t3971234707 * ___context0, ByteU5BU5D_t4116647657* ___buffer1, const RuntimeMethod* method)
{
{
Context_t3971234707 * L_0 = ___context0;
ByteU5BU5D_t4116647657* L_1 = ___buffer1;
HandshakeMessage__ctor_m1555296807(__this, L_0, ((int32_t)13), L_1, /*hidden argument*/NULL);
return;
}
}
// System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsServerCertificateRequest::Update()
extern "C" IL2CPP_METHOD_ATTR void TlsServerCertificateRequest_Update_m2763887540 (TlsServerCertificateRequest_t3690397592 * __this, const RuntimeMethod* method)
{
{
HandshakeMessage_Update_m2417837686(__this, /*hidden argument*/NULL);
Context_t3971234707 * L_0 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
TlsServerSettings_t4144396432 * L_1 = Context_get_ServerSettings_m1982578801(L_0, /*hidden argument*/NULL);
ClientCertificateTypeU5BU5D_t4253920197* L_2 = __this->get_certificateTypes_9();
TlsServerSettings_set_CertificateTypes_m2047242411(L_1, L_2, /*hidden argument*/NULL);
Context_t3971234707 * L_3 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
TlsServerSettings_t4144396432 * L_4 = Context_get_ServerSettings_m1982578801(L_3, /*hidden argument*/NULL);
StringU5BU5D_t1281789340* L_5 = __this->get_distinguisedNames_10();
TlsServerSettings_set_DistinguisedNames_m787752700(L_4, L_5, /*hidden argument*/NULL);
Context_t3971234707 * L_6 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
TlsServerSettings_t4144396432 * L_7 = Context_get_ServerSettings_m1982578801(L_6, /*hidden argument*/NULL);
TlsServerSettings_set_CertificateRequest_m1039729760(L_7, (bool)1, /*hidden argument*/NULL);
return;
}
}
// System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsServerCertificateRequest::ProcessAsSsl3()
extern "C" IL2CPP_METHOD_ATTR void TlsServerCertificateRequest_ProcessAsSsl3_m1084200341 (TlsServerCertificateRequest_t3690397592 * __this, const RuntimeMethod* method)
{
{
VirtActionInvoker0::Invoke(24 /* System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsServerCertificateRequest::ProcessAsTls1() */, __this);
return;
}
}
// System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsServerCertificateRequest::ProcessAsTls1()
extern "C" IL2CPP_METHOD_ATTR void TlsServerCertificateRequest_ProcessAsTls1_m3214041063 (TlsServerCertificateRequest_t3690397592 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (TlsServerCertificateRequest_ProcessAsTls1_m3214041063_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
int32_t V_0 = 0;
int32_t V_1 = 0;
ASN1_t2114160833 * V_2 = NULL;
int32_t V_3 = 0;
ASN1_t2114160833 * V_4 = NULL;
{
uint8_t L_0 = TlsStream_ReadByte_m3396126844(__this, /*hidden argument*/NULL);
V_0 = L_0;
int32_t L_1 = V_0;
ClientCertificateTypeU5BU5D_t4253920197* L_2 = (ClientCertificateTypeU5BU5D_t4253920197*)SZArrayNew(ClientCertificateTypeU5BU5D_t4253920197_il2cpp_TypeInfo_var, (uint32_t)L_1);
__this->set_certificateTypes_9(L_2);
V_1 = 0;
goto IL_002c;
}
IL_001a:
{
ClientCertificateTypeU5BU5D_t4253920197* L_3 = __this->get_certificateTypes_9();
int32_t L_4 = V_1;
uint8_t L_5 = TlsStream_ReadByte_m3396126844(__this, /*hidden argument*/NULL);
(L_3)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(L_4), (int32_t)L_5);
int32_t L_6 = V_1;
V_1 = ((int32_t)il2cpp_codegen_add((int32_t)L_6, (int32_t)1));
}
IL_002c:
{
int32_t L_7 = V_1;
int32_t L_8 = V_0;
if ((((int32_t)L_7) < ((int32_t)L_8)))
{
goto IL_001a;
}
}
{
int16_t L_9 = TlsStream_ReadInt16_m1728211431(__this, /*hidden argument*/NULL);
if (!L_9)
{
goto IL_00aa;
}
}
{
int16_t L_10 = TlsStream_ReadInt16_m1728211431(__this, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_11 = TlsStream_ReadBytes_m2334803179(__this, L_10, /*hidden argument*/NULL);
ASN1_t2114160833 * L_12 = (ASN1_t2114160833 *)il2cpp_codegen_object_new(ASN1_t2114160833_il2cpp_TypeInfo_var);
ASN1__ctor_m1638893325(L_12, L_11, /*hidden argument*/NULL);
V_2 = L_12;
ASN1_t2114160833 * L_13 = V_2;
int32_t L_14 = ASN1_get_Count_m1789520042(L_13, /*hidden argument*/NULL);
StringU5BU5D_t1281789340* L_15 = (StringU5BU5D_t1281789340*)SZArrayNew(StringU5BU5D_t1281789340_il2cpp_TypeInfo_var, (uint32_t)L_14);
__this->set_distinguisedNames_10(L_15);
V_3 = 0;
goto IL_009e;
}
IL_0068:
{
ASN1_t2114160833 * L_16 = V_2;
int32_t L_17 = V_3;
ASN1_t2114160833 * L_18 = ASN1_get_Item_m2255075813(L_16, L_17, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_19 = ASN1_get_Value_m63296490(L_18, /*hidden argument*/NULL);
ASN1_t2114160833 * L_20 = (ASN1_t2114160833 *)il2cpp_codegen_object_new(ASN1_t2114160833_il2cpp_TypeInfo_var);
ASN1__ctor_m1638893325(L_20, L_19, /*hidden argument*/NULL);
V_4 = L_20;
StringU5BU5D_t1281789340* L_21 = __this->get_distinguisedNames_10();
int32_t L_22 = V_3;
IL2CPP_RUNTIME_CLASS_INIT(Encoding_t1523322056_il2cpp_TypeInfo_var);
Encoding_t1523322056 * L_23 = Encoding_get_UTF8_m1008486739(NULL /*static, unused*/, /*hidden argument*/NULL);
ASN1_t2114160833 * L_24 = V_4;
ASN1_t2114160833 * L_25 = ASN1_get_Item_m2255075813(L_24, 1, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_26 = ASN1_get_Value_m63296490(L_25, /*hidden argument*/NULL);
String_t* L_27 = VirtFuncInvoker1< String_t*, ByteU5BU5D_t4116647657* >::Invoke(22 /* System.String System.Text.Encoding::GetString(System.Byte[]) */, L_23, L_26);
ArrayElementTypeCheck (L_21, L_27);
(L_21)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(L_22), (String_t*)L_27);
int32_t L_28 = V_3;
V_3 = ((int32_t)il2cpp_codegen_add((int32_t)L_28, (int32_t)1));
}
IL_009e:
{
int32_t L_29 = V_3;
ASN1_t2114160833 * L_30 = V_2;
int32_t L_31 = ASN1_get_Count_m1789520042(L_30, /*hidden argument*/NULL);
if ((((int32_t)L_29) < ((int32_t)L_31)))
{
goto IL_0068;
}
}
IL_00aa:
{
return;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsServerFinished::.ctor(Mono.Security.Protocol.Tls.Context,System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void TlsServerFinished__ctor_m1445633918 (TlsServerFinished_t3860330041 * __this, Context_t3971234707 * ___context0, ByteU5BU5D_t4116647657* ___buffer1, const RuntimeMethod* method)
{
{
Context_t3971234707 * L_0 = ___context0;
ByteU5BU5D_t4116647657* L_1 = ___buffer1;
HandshakeMessage__ctor_m1555296807(__this, L_0, ((int32_t)20), L_1, /*hidden argument*/NULL);
return;
}
}
// System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsServerFinished::.cctor()
extern "C" IL2CPP_METHOD_ATTR void TlsServerFinished__cctor_m3102699406 (RuntimeObject * __this /* static, unused */, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (TlsServerFinished__cctor_m3102699406_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
ByteU5BU5D_t4116647657* L_0 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)4);
ByteU5BU5D_t4116647657* L_1 = L_0;
RuntimeFieldHandle_t1871169219 L_2 = { reinterpret_cast<intptr_t> (U3CPrivateImplementationDetailsU3E_t3057255363____U24U24fieldU2D22_14_FieldInfo_var) };
RuntimeHelpers_InitializeArray_m3117905507(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_1, L_2, /*hidden argument*/NULL);
((TlsServerFinished_t3860330041_StaticFields*)il2cpp_codegen_static_fields_for(TlsServerFinished_t3860330041_il2cpp_TypeInfo_var))->set_Ssl3Marker_9(L_1);
return;
}
}
// System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsServerFinished::Update()
extern "C" IL2CPP_METHOD_ATTR void TlsServerFinished_Update_m4073404386 (TlsServerFinished_t3860330041 * __this, const RuntimeMethod* method)
{
{
HandshakeMessage_Update_m2417837686(__this, /*hidden argument*/NULL);
Context_t3971234707 * L_0 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
Context_set_HandshakeState_m1329976135(L_0, 2, /*hidden argument*/NULL);
return;
}
}
// System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsServerFinished::ProcessAsSsl3()
extern "C" IL2CPP_METHOD_ATTR void TlsServerFinished_ProcessAsSsl3_m2791932180 (TlsServerFinished_t3860330041 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (TlsServerFinished_ProcessAsSsl3_m2791932180_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
HashAlgorithm_t1432317219 * V_0 = NULL;
ByteU5BU5D_t4116647657* V_1 = NULL;
ByteU5BU5D_t4116647657* V_2 = NULL;
ByteU5BU5D_t4116647657* V_3 = NULL;
{
Context_t3971234707 * L_0 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_1 = Context_get_MasterSecret_m676083615(L_0, /*hidden argument*/NULL);
SslHandshakeHash_t2107581772 * L_2 = (SslHandshakeHash_t2107581772 *)il2cpp_codegen_object_new(SslHandshakeHash_t2107581772_il2cpp_TypeInfo_var);
SslHandshakeHash__ctor_m4169387017(L_2, L_1, /*hidden argument*/NULL);
V_0 = L_2;
Context_t3971234707 * L_3 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
TlsStream_t2365453965 * L_4 = Context_get_HandshakeMessages_m3655705111(L_3, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_5 = TlsStream_ToArray_m4177184296(L_4, /*hidden argument*/NULL);
V_1 = L_5;
HashAlgorithm_t1432317219 * L_6 = V_0;
ByteU5BU5D_t4116647657* L_7 = V_1;
ByteU5BU5D_t4116647657* L_8 = V_1;
ByteU5BU5D_t4116647657* L_9 = V_1;
HashAlgorithm_TransformBlock_m4006041779(L_6, L_7, 0, (((int32_t)((int32_t)(((RuntimeArray *)L_8)->max_length)))), L_9, 0, /*hidden argument*/NULL);
HashAlgorithm_t1432317219 * L_10 = V_0;
IL2CPP_RUNTIME_CLASS_INIT(TlsServerFinished_t3860330041_il2cpp_TypeInfo_var);
ByteU5BU5D_t4116647657* L_11 = ((TlsServerFinished_t3860330041_StaticFields*)il2cpp_codegen_static_fields_for(TlsServerFinished_t3860330041_il2cpp_TypeInfo_var))->get_Ssl3Marker_9();
ByteU5BU5D_t4116647657* L_12 = ((TlsServerFinished_t3860330041_StaticFields*)il2cpp_codegen_static_fields_for(TlsServerFinished_t3860330041_il2cpp_TypeInfo_var))->get_Ssl3Marker_9();
ByteU5BU5D_t4116647657* L_13 = ((TlsServerFinished_t3860330041_StaticFields*)il2cpp_codegen_static_fields_for(TlsServerFinished_t3860330041_il2cpp_TypeInfo_var))->get_Ssl3Marker_9();
HashAlgorithm_TransformBlock_m4006041779(L_10, L_11, 0, (((int32_t)((int32_t)(((RuntimeArray *)L_12)->max_length)))), L_13, 0, /*hidden argument*/NULL);
HashAlgorithm_t1432317219 * L_14 = V_0;
IL2CPP_RUNTIME_CLASS_INIT(CipherSuite_t3414744575_il2cpp_TypeInfo_var);
ByteU5BU5D_t4116647657* L_15 = ((CipherSuite_t3414744575_StaticFields*)il2cpp_codegen_static_fields_for(CipherSuite_t3414744575_il2cpp_TypeInfo_var))->get_EmptyArray_0();
HashAlgorithm_TransformFinalBlock_m3005451348(L_14, L_15, 0, 0, /*hidden argument*/NULL);
int64_t L_16 = VirtFuncInvoker0< int64_t >::Invoke(8 /* System.Int64 Mono.Security.Protocol.Tls.TlsStream::get_Length() */, __this);
ByteU5BU5D_t4116647657* L_17 = TlsStream_ReadBytes_m2334803179(__this, (((int32_t)((int32_t)L_16))), /*hidden argument*/NULL);
V_2 = L_17;
HashAlgorithm_t1432317219 * L_18 = V_0;
ByteU5BU5D_t4116647657* L_19 = VirtFuncInvoker0< ByteU5BU5D_t4116647657* >::Invoke(9 /* System.Byte[] System.Security.Cryptography.HashAlgorithm::get_Hash() */, L_18);
V_3 = L_19;
ByteU5BU5D_t4116647657* L_20 = V_3;
ByteU5BU5D_t4116647657* L_21 = V_2;
bool L_22 = HandshakeMessage_Compare_m2214647946(NULL /*static, unused*/, L_20, L_21, /*hidden argument*/NULL);
if (L_22)
{
goto IL_0086;
}
}
{
TlsException_t3534743363 * L_23 = (TlsException_t3534743363 *)il2cpp_codegen_object_new(TlsException_t3534743363_il2cpp_TypeInfo_var);
TlsException__ctor_m3242533711(L_23, ((int32_t)71), _stringLiteral1609408204, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_23, NULL, TlsServerFinished_ProcessAsSsl3_m2791932180_RuntimeMethod_var);
}
IL_0086:
{
return;
}
}
// System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsServerFinished::ProcessAsTls1()
extern "C" IL2CPP_METHOD_ATTR void TlsServerFinished_ProcessAsTls1_m173877572 (TlsServerFinished_t3860330041 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (TlsServerFinished_ProcessAsTls1_m173877572_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
ByteU5BU5D_t4116647657* V_0 = NULL;
HashAlgorithm_t1432317219 * V_1 = NULL;
ByteU5BU5D_t4116647657* V_2 = NULL;
ByteU5BU5D_t4116647657* V_3 = NULL;
ByteU5BU5D_t4116647657* V_4 = NULL;
{
int64_t L_0 = VirtFuncInvoker0< int64_t >::Invoke(8 /* System.Int64 Mono.Security.Protocol.Tls.TlsStream::get_Length() */, __this);
ByteU5BU5D_t4116647657* L_1 = TlsStream_ReadBytes_m2334803179(__this, (((int32_t)((int32_t)L_0))), /*hidden argument*/NULL);
V_0 = L_1;
MD5SHA1_t723838944 * L_2 = (MD5SHA1_t723838944 *)il2cpp_codegen_object_new(MD5SHA1_t723838944_il2cpp_TypeInfo_var);
MD5SHA1__ctor_m4081016482(L_2, /*hidden argument*/NULL);
V_1 = L_2;
Context_t3971234707 * L_3 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
TlsStream_t2365453965 * L_4 = Context_get_HandshakeMessages_m3655705111(L_3, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_5 = TlsStream_ToArray_m4177184296(L_4, /*hidden argument*/NULL);
V_2 = L_5;
HashAlgorithm_t1432317219 * L_6 = V_1;
ByteU5BU5D_t4116647657* L_7 = V_2;
ByteU5BU5D_t4116647657* L_8 = V_2;
ByteU5BU5D_t4116647657* L_9 = HashAlgorithm_ComputeHash_m2044824070(L_6, L_7, 0, (((int32_t)((int32_t)(((RuntimeArray *)L_8)->max_length)))), /*hidden argument*/NULL);
V_3 = L_9;
Context_t3971234707 * L_10 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
SecurityParameters_t2199972650 * L_11 = Context_get_Current_m2853615040(L_10, /*hidden argument*/NULL);
CipherSuite_t3414744575 * L_12 = SecurityParameters_get_Cipher_m108846204(L_11, /*hidden argument*/NULL);
Context_t3971234707 * L_13 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_14 = Context_get_MasterSecret_m676083615(L_13, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_15 = V_3;
ByteU5BU5D_t4116647657* L_16 = CipherSuite_PRF_m2801806009(L_12, L_14, _stringLiteral4133402427, L_15, ((int32_t)12), /*hidden argument*/NULL);
V_4 = L_16;
ByteU5BU5D_t4116647657* L_17 = V_4;
ByteU5BU5D_t4116647657* L_18 = V_0;
bool L_19 = HandshakeMessage_Compare_m2214647946(NULL /*static, unused*/, L_17, L_18, /*hidden argument*/NULL);
if (L_19)
{
goto IL_0073;
}
}
{
TlsException_t3534743363 * L_20 = (TlsException_t3534743363 *)il2cpp_codegen_object_new(TlsException_t3534743363_il2cpp_TypeInfo_var);
TlsException__ctor_m3652817735(L_20, _stringLiteral1609408204, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_20, NULL, TlsServerFinished_ProcessAsTls1_m173877572_RuntimeMethod_var);
}
IL_0073:
{
return;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsServerHello::.ctor(Mono.Security.Protocol.Tls.Context,System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void TlsServerHello__ctor_m3887266572 (TlsServerHello_t3343859594 * __this, Context_t3971234707 * ___context0, ByteU5BU5D_t4116647657* ___buffer1, const RuntimeMethod* method)
{
{
Context_t3971234707 * L_0 = ___context0;
ByteU5BU5D_t4116647657* L_1 = ___buffer1;
HandshakeMessage__ctor_m1555296807(__this, L_0, 2, L_1, /*hidden argument*/NULL);
return;
}
}
// System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsServerHello::Update()
extern "C" IL2CPP_METHOD_ATTR void TlsServerHello_Update_m3935081401 (TlsServerHello_t3343859594 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (TlsServerHello_Update_m3935081401_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
int32_t V_0 = 0;
int32_t V_1 = 0;
int32_t V_2 = 0;
ByteU5BU5D_t4116647657* V_3 = NULL;
ByteU5BU5D_t4116647657* V_4 = NULL;
{
HandshakeMessage_Update_m2417837686(__this, /*hidden argument*/NULL);
Context_t3971234707 * L_0 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_1 = __this->get_sessionId_11();
Context_set_SessionId_m942328427(L_0, L_1, /*hidden argument*/NULL);
Context_t3971234707 * L_2 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_3 = __this->get_random_10();
Context_set_ServerRandom_m2929894009(L_2, L_3, /*hidden argument*/NULL);
Context_t3971234707 * L_4 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
SecurityParameters_t2199972650 * L_5 = Context_get_Negotiating_m2044579817(L_4, /*hidden argument*/NULL);
CipherSuite_t3414744575 * L_6 = __this->get_cipherSuite_12();
SecurityParameters_set_Cipher_m588445085(L_5, L_6, /*hidden argument*/NULL);
Context_t3971234707 * L_7 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
int32_t L_8 = __this->get_compressionMethod_9();
Context_set_CompressionMethod_m2054483993(L_7, L_8, /*hidden argument*/NULL);
Context_t3971234707 * L_9 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
Context_set_ProtocolNegotiated_m2904861662(L_9, (bool)1, /*hidden argument*/NULL);
Context_t3971234707 * L_10 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_11 = Context_get_ClientRandom_m1437588520(L_10, /*hidden argument*/NULL);
V_0 = (((int32_t)((int32_t)(((RuntimeArray *)L_11)->max_length))));
Context_t3971234707 * L_12 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_13 = Context_get_ServerRandom_m2710024742(L_12, /*hidden argument*/NULL);
V_1 = (((int32_t)((int32_t)(((RuntimeArray *)L_13)->max_length))));
int32_t L_14 = V_0;
int32_t L_15 = V_1;
V_2 = ((int32_t)il2cpp_codegen_add((int32_t)L_14, (int32_t)L_15));
int32_t L_16 = V_2;
ByteU5BU5D_t4116647657* L_17 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)L_16);
V_3 = L_17;
Context_t3971234707 * L_18 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_19 = Context_get_ClientRandom_m1437588520(L_18, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_20 = V_3;
int32_t L_21 = V_0;
Buffer_BlockCopy_m2884209081(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_19, 0, (RuntimeArray *)(RuntimeArray *)L_20, 0, L_21, /*hidden argument*/NULL);
Context_t3971234707 * L_22 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_23 = Context_get_ServerRandom_m2710024742(L_22, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_24 = V_3;
int32_t L_25 = V_0;
int32_t L_26 = V_1;
Buffer_BlockCopy_m2884209081(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_23, 0, (RuntimeArray *)(RuntimeArray *)L_24, L_25, L_26, /*hidden argument*/NULL);
Context_t3971234707 * L_27 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_28 = V_3;
Context_set_RandomCS_m2687068745(L_27, L_28, /*hidden argument*/NULL);
int32_t L_29 = V_2;
ByteU5BU5D_t4116647657* L_30 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)L_29);
V_4 = L_30;
Context_t3971234707 * L_31 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_32 = Context_get_ServerRandom_m2710024742(L_31, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_33 = V_4;
int32_t L_34 = V_1;
Buffer_BlockCopy_m2884209081(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_32, 0, (RuntimeArray *)(RuntimeArray *)L_33, 0, L_34, /*hidden argument*/NULL);
Context_t3971234707 * L_35 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_36 = Context_get_ClientRandom_m1437588520(L_35, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_37 = V_4;
int32_t L_38 = V_1;
int32_t L_39 = V_0;
Buffer_BlockCopy_m2884209081(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_36, 0, (RuntimeArray *)(RuntimeArray *)L_37, L_38, L_39, /*hidden argument*/NULL);
Context_t3971234707 * L_40 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_41 = V_4;
Context_set_RandomSC_m2364786761(L_40, L_41, /*hidden argument*/NULL);
return;
}
}
// System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsServerHello::ProcessAsSsl3()
extern "C" IL2CPP_METHOD_ATTR void TlsServerHello_ProcessAsSsl3_m3146647238 (TlsServerHello_t3343859594 * __this, const RuntimeMethod* method)
{
{
VirtActionInvoker0::Invoke(24 /* System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsServerHello::ProcessAsTls1() */, __this);
return;
}
}
// System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsServerHello::ProcessAsTls1()
extern "C" IL2CPP_METHOD_ATTR void TlsServerHello_ProcessAsTls1_m3844152353 (TlsServerHello_t3343859594 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (TlsServerHello_ProcessAsTls1_m3844152353_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
int32_t V_0 = 0;
int16_t V_1 = 0;
{
int16_t L_0 = TlsStream_ReadInt16_m1728211431(__this, /*hidden argument*/NULL);
TlsServerHello_processProtocol_m3969427189(__this, L_0, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_1 = TlsStream_ReadBytes_m2334803179(__this, ((int32_t)32), /*hidden argument*/NULL);
__this->set_random_10(L_1);
uint8_t L_2 = TlsStream_ReadByte_m3396126844(__this, /*hidden argument*/NULL);
V_0 = L_2;
int32_t L_3 = V_0;
if ((((int32_t)L_3) <= ((int32_t)0)))
{
goto IL_0076;
}
}
{
int32_t L_4 = V_0;
ByteU5BU5D_t4116647657* L_5 = TlsStream_ReadBytes_m2334803179(__this, L_4, /*hidden argument*/NULL);
__this->set_sessionId_11(L_5);
Context_t3971234707 * L_6 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
TlsClientSettings_t2486039503 * L_7 = Context_get_ClientSettings_m2874391194(L_6, /*hidden argument*/NULL);
String_t* L_8 = TlsClientSettings_get_TargetHost_m2463481414(L_7, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_9 = __this->get_sessionId_11();
IL2CPP_RUNTIME_CLASS_INIT(ClientSessionCache_t2353595803_il2cpp_TypeInfo_var);
ClientSessionCache_Add_m964342678(NULL /*static, unused*/, L_8, L_9, /*hidden argument*/NULL);
Context_t3971234707 * L_10 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_11 = __this->get_sessionId_11();
Context_t3971234707 * L_12 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_13 = Context_get_SessionId_m1086671147(L_12, /*hidden argument*/NULL);
bool L_14 = HandshakeMessage_Compare_m2214647946(NULL /*static, unused*/, L_11, L_13, /*hidden argument*/NULL);
Context_set_AbbreviatedHandshake_m827173393(L_10, L_14, /*hidden argument*/NULL);
goto IL_0082;
}
IL_0076:
{
Context_t3971234707 * L_15 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
Context_set_AbbreviatedHandshake_m827173393(L_15, (bool)0, /*hidden argument*/NULL);
}
IL_0082:
{
int16_t L_16 = TlsStream_ReadInt16_m1728211431(__this, /*hidden argument*/NULL);
V_1 = L_16;
Context_t3971234707 * L_17 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
CipherSuiteCollection_t1129639304 * L_18 = Context_get_SupportedCiphers_m1883682196(L_17, /*hidden argument*/NULL);
int16_t L_19 = V_1;
int32_t L_20 = CipherSuiteCollection_IndexOf_m2770510321(L_18, L_19, /*hidden argument*/NULL);
if ((!(((uint32_t)L_20) == ((uint32_t)(-1)))))
{
goto IL_00ad;
}
}
{
TlsException_t3534743363 * L_21 = (TlsException_t3534743363 *)il2cpp_codegen_object_new(TlsException_t3534743363_il2cpp_TypeInfo_var);
TlsException__ctor_m3242533711(L_21, ((int32_t)71), _stringLiteral340085282, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_21, NULL, TlsServerHello_ProcessAsTls1_m3844152353_RuntimeMethod_var);
}
IL_00ad:
{
Context_t3971234707 * L_22 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
CipherSuiteCollection_t1129639304 * L_23 = Context_get_SupportedCiphers_m1883682196(L_22, /*hidden argument*/NULL);
int16_t L_24 = V_1;
CipherSuite_t3414744575 * L_25 = CipherSuiteCollection_get_Item_m3790183696(L_23, L_24, /*hidden argument*/NULL);
__this->set_cipherSuite_12(L_25);
uint8_t L_26 = TlsStream_ReadByte_m3396126844(__this, /*hidden argument*/NULL);
__this->set_compressionMethod_9(L_26);
return;
}
}
// System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsServerHello::processProtocol(System.Int16)
extern "C" IL2CPP_METHOD_ATTR void TlsServerHello_processProtocol_m3969427189 (TlsServerHello_t3343859594 * __this, int16_t ___protocol0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (TlsServerHello_processProtocol_m3969427189_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
int32_t V_0 = 0;
{
Context_t3971234707 * L_0 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
int16_t L_1 = ___protocol0;
int32_t L_2 = Context_DecodeProtocolCode_m2249547310(L_0, L_1, /*hidden argument*/NULL);
V_0 = L_2;
int32_t L_3 = V_0;
Context_t3971234707 * L_4 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
int32_t L_5 = Context_get_SecurityProtocolFlags_m2022471746(L_4, /*hidden argument*/NULL);
int32_t L_6 = V_0;
if ((((int32_t)((int32_t)((int32_t)L_3&(int32_t)L_5))) == ((int32_t)L_6)))
{
goto IL_003b;
}
}
{
Context_t3971234707 * L_7 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
int32_t L_8 = Context_get_SecurityProtocolFlags_m2022471746(L_7, /*hidden argument*/NULL);
if ((!(((uint32_t)((int32_t)((int32_t)L_8&(int32_t)((int32_t)-1073741824)))) == ((uint32_t)((int32_t)-1073741824)))))
{
goto IL_0079;
}
}
IL_003b:
{
Context_t3971234707 * L_9 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
int32_t L_10 = V_0;
Context_set_SecurityProtocol_m2833661610(L_9, L_10, /*hidden argument*/NULL);
Context_t3971234707 * L_11 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
CipherSuiteCollection_t1129639304 * L_12 = Context_get_SupportedCiphers_m1883682196(L_11, /*hidden argument*/NULL);
CipherSuiteCollection_Clear_m2642701260(L_12, /*hidden argument*/NULL);
Context_t3971234707 * L_13 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
Context_set_SupportedCiphers_m4238648387(L_13, (CipherSuiteCollection_t1129639304 *)NULL, /*hidden argument*/NULL);
Context_t3971234707 * L_14 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
int32_t L_15 = V_0;
CipherSuiteCollection_t1129639304 * L_16 = CipherSuiteFactory_GetSupportedCiphers_m3260014148(NULL /*static, unused*/, L_15, /*hidden argument*/NULL);
Context_set_SupportedCiphers_m4238648387(L_14, L_16, /*hidden argument*/NULL);
goto IL_0086;
}
IL_0079:
{
TlsException_t3534743363 * L_17 = (TlsException_t3534743363 *)il2cpp_codegen_object_new(TlsException_t3534743363_il2cpp_TypeInfo_var);
TlsException__ctor_m3242533711(L_17, ((int32_t)70), _stringLiteral193405814, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_17, NULL, TlsServerHello_processProtocol_m3969427189_RuntimeMethod_var);
}
IL_0086:
{
return;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsServerHelloDone::.ctor(Mono.Security.Protocol.Tls.Context,System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void TlsServerHelloDone__ctor_m173627900 (TlsServerHelloDone_t1850379324 * __this, Context_t3971234707 * ___context0, ByteU5BU5D_t4116647657* ___buffer1, const RuntimeMethod* method)
{
{
Context_t3971234707 * L_0 = ___context0;
ByteU5BU5D_t4116647657* L_1 = ___buffer1;
HandshakeMessage__ctor_m1555296807(__this, L_0, ((int32_t)14), L_1, /*hidden argument*/NULL);
return;
}
}
// System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsServerHelloDone::ProcessAsSsl3()
extern "C" IL2CPP_METHOD_ATTR void TlsServerHelloDone_ProcessAsSsl3_m3042614798 (TlsServerHelloDone_t1850379324 * __this, const RuntimeMethod* method)
{
{
return;
}
}
// System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsServerHelloDone::ProcessAsTls1()
extern "C" IL2CPP_METHOD_ATTR void TlsServerHelloDone_ProcessAsTls1_m952337401 (TlsServerHelloDone_t1850379324 * __this, const RuntimeMethod* method)
{
{
return;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsServerKeyExchange::.ctor(Mono.Security.Protocol.Tls.Context,System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void TlsServerKeyExchange__ctor_m3572942737 (TlsServerKeyExchange_t699469151 * __this, Context_t3971234707 * ___context0, ByteU5BU5D_t4116647657* ___buffer1, const RuntimeMethod* method)
{
{
Context_t3971234707 * L_0 = ___context0;
ByteU5BU5D_t4116647657* L_1 = ___buffer1;
HandshakeMessage__ctor_m1555296807(__this, L_0, ((int32_t)12), L_1, /*hidden argument*/NULL);
TlsServerKeyExchange_verifySignature_m3412856769(__this, /*hidden argument*/NULL);
return;
}
}
// System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsServerKeyExchange::Update()
extern "C" IL2CPP_METHOD_ATTR void TlsServerKeyExchange_Update_m453798279 (TlsServerKeyExchange_t699469151 * __this, const RuntimeMethod* method)
{
{
HandshakeMessage_Update_m2417837686(__this, /*hidden argument*/NULL);
Context_t3971234707 * L_0 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
TlsServerSettings_t4144396432 * L_1 = Context_get_ServerSettings_m1982578801(L_0, /*hidden argument*/NULL);
TlsServerSettings_set_ServerKeyExchange_m3302765325(L_1, (bool)1, /*hidden argument*/NULL);
Context_t3971234707 * L_2 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
TlsServerSettings_t4144396432 * L_3 = Context_get_ServerSettings_m1982578801(L_2, /*hidden argument*/NULL);
RSAParameters_t1728406613 L_4 = __this->get_rsaParams_9();
TlsServerSettings_set_RsaParameters_m853026166(L_3, L_4, /*hidden argument*/NULL);
Context_t3971234707 * L_5 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
TlsServerSettings_t4144396432 * L_6 = Context_get_ServerSettings_m1982578801(L_5, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_7 = __this->get_signedParams_10();
TlsServerSettings_set_SignedParams_m3618693098(L_6, L_7, /*hidden argument*/NULL);
return;
}
}
// System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsServerKeyExchange::ProcessAsSsl3()
extern "C" IL2CPP_METHOD_ATTR void TlsServerKeyExchange_ProcessAsSsl3_m2880115419 (TlsServerKeyExchange_t699469151 * __this, const RuntimeMethod* method)
{
{
VirtActionInvoker0::Invoke(24 /* System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsServerKeyExchange::ProcessAsTls1() */, __this);
return;
}
}
// System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsServerKeyExchange::ProcessAsTls1()
extern "C" IL2CPP_METHOD_ATTR void TlsServerKeyExchange_ProcessAsTls1_m49623614 (TlsServerKeyExchange_t699469151 * __this, const RuntimeMethod* method)
{
RSAParameters_t1728406613 V_0;
memset(&V_0, 0, sizeof(V_0));
{
il2cpp_codegen_initobj((&V_0), sizeof(RSAParameters_t1728406613 ));
RSAParameters_t1728406613 L_0 = V_0;
__this->set_rsaParams_9(L_0);
RSAParameters_t1728406613 * L_1 = __this->get_address_of_rsaParams_9();
int16_t L_2 = TlsStream_ReadInt16_m1728211431(__this, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_3 = TlsStream_ReadBytes_m2334803179(__this, L_2, /*hidden argument*/NULL);
L_1->set_Modulus_6(L_3);
RSAParameters_t1728406613 * L_4 = __this->get_address_of_rsaParams_9();
int16_t L_5 = TlsStream_ReadInt16_m1728211431(__this, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_6 = TlsStream_ReadBytes_m2334803179(__this, L_5, /*hidden argument*/NULL);
L_4->set_Exponent_7(L_6);
int16_t L_7 = TlsStream_ReadInt16_m1728211431(__this, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_8 = TlsStream_ReadBytes_m2334803179(__this, L_7, /*hidden argument*/NULL);
__this->set_signedParams_10(L_8);
return;
}
}
// System.Void Mono.Security.Protocol.Tls.Handshake.Client.TlsServerKeyExchange::verifySignature()
extern "C" IL2CPP_METHOD_ATTR void TlsServerKeyExchange_verifySignature_m3412856769 (TlsServerKeyExchange_t699469151 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (TlsServerKeyExchange_verifySignature_m3412856769_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
MD5SHA1_t723838944 * V_0 = NULL;
int32_t V_1 = 0;
TlsStream_t2365453965 * V_2 = NULL;
bool V_3 = false;
{
MD5SHA1_t723838944 * L_0 = (MD5SHA1_t723838944 *)il2cpp_codegen_object_new(MD5SHA1_t723838944_il2cpp_TypeInfo_var);
MD5SHA1__ctor_m4081016482(L_0, /*hidden argument*/NULL);
V_0 = L_0;
RSAParameters_t1728406613 * L_1 = __this->get_address_of_rsaParams_9();
ByteU5BU5D_t4116647657* L_2 = L_1->get_Modulus_6();
RSAParameters_t1728406613 * L_3 = __this->get_address_of_rsaParams_9();
ByteU5BU5D_t4116647657* L_4 = L_3->get_Exponent_7();
V_1 = ((int32_t)il2cpp_codegen_add((int32_t)((int32_t)il2cpp_codegen_add((int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_2)->max_length)))), (int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_4)->max_length)))))), (int32_t)4));
TlsStream_t2365453965 * L_5 = (TlsStream_t2365453965 *)il2cpp_codegen_object_new(TlsStream_t2365453965_il2cpp_TypeInfo_var);
TlsStream__ctor_m787793111(L_5, /*hidden argument*/NULL);
V_2 = L_5;
TlsStream_t2365453965 * L_6 = V_2;
Context_t3971234707 * L_7 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_8 = Context_get_RandomCS_m1367948315(L_7, /*hidden argument*/NULL);
TlsStream_Write_m4133894341(L_6, L_8, /*hidden argument*/NULL);
TlsStream_t2365453965 * L_9 = V_2;
ByteU5BU5D_t4116647657* L_10 = TlsStream_ToArray_m4177184296(__this, /*hidden argument*/NULL);
int32_t L_11 = V_1;
VirtActionInvoker3< ByteU5BU5D_t4116647657*, int32_t, int32_t >::Invoke(18 /* System.Void Mono.Security.Protocol.Tls.TlsStream::Write(System.Byte[],System.Int32,System.Int32) */, L_9, L_10, 0, L_11);
MD5SHA1_t723838944 * L_12 = V_0;
TlsStream_t2365453965 * L_13 = V_2;
ByteU5BU5D_t4116647657* L_14 = TlsStream_ToArray_m4177184296(L_13, /*hidden argument*/NULL);
HashAlgorithm_ComputeHash_m2825542963(L_12, L_14, /*hidden argument*/NULL);
TlsStream_t2365453965 * L_15 = V_2;
TlsStream_Reset_m369197964(L_15, /*hidden argument*/NULL);
MD5SHA1_t723838944 * L_16 = V_0;
Context_t3971234707 * L_17 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
TlsServerSettings_t4144396432 * L_18 = Context_get_ServerSettings_m1982578801(L_17, /*hidden argument*/NULL);
RSA_t2385438082 * L_19 = TlsServerSettings_get_CertificateRSA_m597274968(L_18, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_20 = __this->get_signedParams_10();
bool L_21 = MD5SHA1_VerifySignature_m915115209(L_16, L_19, L_20, /*hidden argument*/NULL);
V_3 = L_21;
bool L_22 = V_3;
if (L_22)
{
goto IL_008c;
}
}
{
TlsException_t3534743363 * L_23 = (TlsException_t3534743363 *)il2cpp_codegen_object_new(TlsException_t3534743363_il2cpp_TypeInfo_var);
TlsException__ctor_m3242533711(L_23, ((int32_t)50), _stringLiteral1827280598, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_23, NULL, TlsServerKeyExchange_verifySignature_m3412856769_RuntimeMethod_var);
}
IL_008c:
{
return;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void Mono.Security.Protocol.Tls.Handshake.HandshakeMessage::.ctor(Mono.Security.Protocol.Tls.Context,Mono.Security.Protocol.Tls.Handshake.HandshakeType)
extern "C" IL2CPP_METHOD_ATTR void HandshakeMessage__ctor_m2692487706 (HandshakeMessage_t3696583168 * __this, Context_t3971234707 * ___context0, uint8_t ___handshakeType1, const RuntimeMethod* method)
{
{
Context_t3971234707 * L_0 = ___context0;
uint8_t L_1 = ___handshakeType1;
HandshakeMessage__ctor_m1353615444(__this, L_0, L_1, ((int32_t)22), /*hidden argument*/NULL);
return;
}
}
// System.Void Mono.Security.Protocol.Tls.Handshake.HandshakeMessage::.ctor(Mono.Security.Protocol.Tls.Context,Mono.Security.Protocol.Tls.Handshake.HandshakeType,Mono.Security.Protocol.Tls.ContentType)
extern "C" IL2CPP_METHOD_ATTR void HandshakeMessage__ctor_m1353615444 (HandshakeMessage_t3696583168 * __this, Context_t3971234707 * ___context0, uint8_t ___handshakeType1, uint8_t ___contentType2, const RuntimeMethod* method)
{
{
TlsStream__ctor_m787793111(__this, /*hidden argument*/NULL);
Context_t3971234707 * L_0 = ___context0;
__this->set_context_5(L_0);
uint8_t L_1 = ___handshakeType1;
__this->set_handshakeType_6(L_1);
uint8_t L_2 = ___contentType2;
__this->set_contentType_7(L_2);
return;
}
}
// System.Void Mono.Security.Protocol.Tls.Handshake.HandshakeMessage::.ctor(Mono.Security.Protocol.Tls.Context,Mono.Security.Protocol.Tls.Handshake.HandshakeType,System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void HandshakeMessage__ctor_m1555296807 (HandshakeMessage_t3696583168 * __this, Context_t3971234707 * ___context0, uint8_t ___handshakeType1, ByteU5BU5D_t4116647657* ___data2, const RuntimeMethod* method)
{
{
ByteU5BU5D_t4116647657* L_0 = ___data2;
TlsStream__ctor_m277557575(__this, L_0, /*hidden argument*/NULL);
Context_t3971234707 * L_1 = ___context0;
__this->set_context_5(L_1);
uint8_t L_2 = ___handshakeType1;
__this->set_handshakeType_6(L_2);
return;
}
}
// Mono.Security.Protocol.Tls.Context Mono.Security.Protocol.Tls.Handshake.HandshakeMessage::get_Context()
extern "C" IL2CPP_METHOD_ATTR Context_t3971234707 * HandshakeMessage_get_Context_m3036797856 (HandshakeMessage_t3696583168 * __this, const RuntimeMethod* method)
{
{
Context_t3971234707 * L_0 = __this->get_context_5();
return L_0;
}
}
// Mono.Security.Protocol.Tls.Handshake.HandshakeType Mono.Security.Protocol.Tls.Handshake.HandshakeMessage::get_HandshakeType()
extern "C" IL2CPP_METHOD_ATTR uint8_t HandshakeMessage_get_HandshakeType_m478242308 (HandshakeMessage_t3696583168 * __this, const RuntimeMethod* method)
{
{
uint8_t L_0 = __this->get_handshakeType_6();
return L_0;
}
}
// Mono.Security.Protocol.Tls.ContentType Mono.Security.Protocol.Tls.Handshake.HandshakeMessage::get_ContentType()
extern "C" IL2CPP_METHOD_ATTR uint8_t HandshakeMessage_get_ContentType_m1693718190 (HandshakeMessage_t3696583168 * __this, const RuntimeMethod* method)
{
{
uint8_t L_0 = __this->get_contentType_7();
return L_0;
}
}
// System.Void Mono.Security.Protocol.Tls.Handshake.HandshakeMessage::Process()
extern "C" IL2CPP_METHOD_ATTR void HandshakeMessage_Process_m810828609 (HandshakeMessage_t3696583168 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (HandshakeMessage_Process_m810828609_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
int32_t V_0 = 0;
{
Context_t3971234707 * L_0 = HandshakeMessage_get_Context_m3036797856(__this, /*hidden argument*/NULL);
int32_t L_1 = Context_get_SecurityProtocol_m3228286292(L_0, /*hidden argument*/NULL);
V_0 = L_1;
int32_t L_2 = V_0;
if ((((int32_t)L_2) == ((int32_t)((int32_t)-1073741824))))
{
goto IL_0037;
}
}
{
int32_t L_3 = V_0;
if ((((int32_t)L_3) == ((int32_t)((int32_t)12))))
{
goto IL_004d;
}
}
{
int32_t L_4 = V_0;
if ((((int32_t)L_4) == ((int32_t)((int32_t)48))))
{
goto IL_0042;
}
}
{
int32_t L_5 = V_0;
if ((((int32_t)L_5) == ((int32_t)((int32_t)192))))
{
goto IL_0037;
}
}
{
goto IL_004d;
}
IL_0037:
{
VirtActionInvoker0::Invoke(24 /* System.Void Mono.Security.Protocol.Tls.Handshake.HandshakeMessage::ProcessAsTls1() */, __this);
goto IL_0058;
}
IL_0042:
{
VirtActionInvoker0::Invoke(25 /* System.Void Mono.Security.Protocol.Tls.Handshake.HandshakeMessage::ProcessAsSsl3() */, __this);
goto IL_0058;
}
IL_004d:
{
NotSupportedException_t1314879016 * L_6 = (NotSupportedException_t1314879016 *)il2cpp_codegen_object_new(NotSupportedException_t1314879016_il2cpp_TypeInfo_var);
NotSupportedException__ctor_m2494070935(L_6, _stringLiteral3034282783, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_6, NULL, HandshakeMessage_Process_m810828609_RuntimeMethod_var);
}
IL_0058:
{
return;
}
}
// System.Void Mono.Security.Protocol.Tls.Handshake.HandshakeMessage::Update()
extern "C" IL2CPP_METHOD_ATTR void HandshakeMessage_Update_m2417837686 (HandshakeMessage_t3696583168 * __this, const RuntimeMethod* method)
{
{
bool L_0 = VirtFuncInvoker0< bool >::Invoke(7 /* System.Boolean Mono.Security.Protocol.Tls.TlsStream::get_CanWrite() */, __this);
if (!L_0)
{
goto IL_0045;
}
}
{
ByteU5BU5D_t4116647657* L_1 = __this->get_cache_8();
if (L_1)
{
goto IL_0022;
}
}
{
ByteU5BU5D_t4116647657* L_2 = VirtFuncInvoker0< ByteU5BU5D_t4116647657* >::Invoke(27 /* System.Byte[] Mono.Security.Protocol.Tls.Handshake.HandshakeMessage::EncodeMessage() */, __this);
__this->set_cache_8(L_2);
}
IL_0022:
{
Context_t3971234707 * L_3 = __this->get_context_5();
TlsStream_t2365453965 * L_4 = Context_get_HandshakeMessages_m3655705111(L_3, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_5 = __this->get_cache_8();
TlsStream_Write_m4133894341(L_4, L_5, /*hidden argument*/NULL);
TlsStream_Reset_m369197964(__this, /*hidden argument*/NULL);
__this->set_cache_8((ByteU5BU5D_t4116647657*)NULL);
}
IL_0045:
{
return;
}
}
// System.Byte[] Mono.Security.Protocol.Tls.Handshake.HandshakeMessage::EncodeMessage()
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* HandshakeMessage_EncodeMessage_m3919107786 (HandshakeMessage_t3696583168 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (HandshakeMessage_EncodeMessage_m3919107786_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
ByteU5BU5D_t4116647657* V_0 = NULL;
int32_t V_1 = 0;
{
__this->set_cache_8((ByteU5BU5D_t4116647657*)NULL);
bool L_0 = VirtFuncInvoker0< bool >::Invoke(7 /* System.Boolean Mono.Security.Protocol.Tls.TlsStream::get_CanWrite() */, __this);
if (!L_0)
{
goto IL_006b;
}
}
{
ByteU5BU5D_t4116647657* L_1 = TlsStream_ToArray_m4177184296(__this, /*hidden argument*/NULL);
V_0 = L_1;
ByteU5BU5D_t4116647657* L_2 = V_0;
V_1 = (((int32_t)((int32_t)(((RuntimeArray *)L_2)->max_length))));
int32_t L_3 = V_1;
ByteU5BU5D_t4116647657* L_4 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)((int32_t)il2cpp_codegen_add((int32_t)4, (int32_t)L_3)));
__this->set_cache_8(L_4);
ByteU5BU5D_t4116647657* L_5 = __this->get_cache_8();
uint8_t L_6 = HandshakeMessage_get_HandshakeType_m478242308(__this, /*hidden argument*/NULL);
(L_5)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(0), (uint8_t)L_6);
ByteU5BU5D_t4116647657* L_7 = __this->get_cache_8();
int32_t L_8 = V_1;
(L_7)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(1), (uint8_t)(((int32_t)((uint8_t)((int32_t)((int32_t)L_8>>(int32_t)((int32_t)16)))))));
ByteU5BU5D_t4116647657* L_9 = __this->get_cache_8();
int32_t L_10 = V_1;
(L_9)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(2), (uint8_t)(((int32_t)((uint8_t)((int32_t)((int32_t)L_10>>(int32_t)8))))));
ByteU5BU5D_t4116647657* L_11 = __this->get_cache_8();
int32_t L_12 = V_1;
(L_11)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(3), (uint8_t)(((int32_t)((uint8_t)L_12))));
ByteU5BU5D_t4116647657* L_13 = V_0;
ByteU5BU5D_t4116647657* L_14 = __this->get_cache_8();
int32_t L_15 = V_1;
Buffer_BlockCopy_m2884209081(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_13, 0, (RuntimeArray *)(RuntimeArray *)L_14, 4, L_15, /*hidden argument*/NULL);
}
IL_006b:
{
ByteU5BU5D_t4116647657* L_16 = __this->get_cache_8();
return L_16;
}
}
// System.Boolean Mono.Security.Protocol.Tls.Handshake.HandshakeMessage::Compare(System.Byte[],System.Byte[])
extern "C" IL2CPP_METHOD_ATTR bool HandshakeMessage_Compare_m2214647946 (RuntimeObject * __this /* static, unused */, ByteU5BU5D_t4116647657* ___buffer10, ByteU5BU5D_t4116647657* ___buffer21, const RuntimeMethod* method)
{
int32_t V_0 = 0;
{
ByteU5BU5D_t4116647657* L_0 = ___buffer10;
if (!L_0)
{
goto IL_000c;
}
}
{
ByteU5BU5D_t4116647657* L_1 = ___buffer21;
if (L_1)
{
goto IL_000e;
}
}
IL_000c:
{
return (bool)0;
}
IL_000e:
{
ByteU5BU5D_t4116647657* L_2 = ___buffer10;
ByteU5BU5D_t4116647657* L_3 = ___buffer21;
if ((((int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_2)->max_length))))) == ((int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_3)->max_length)))))))
{
goto IL_001b;
}
}
{
return (bool)0;
}
IL_001b:
{
V_0 = 0;
goto IL_0033;
}
IL_0022:
{
ByteU5BU5D_t4116647657* L_4 = ___buffer10;
int32_t L_5 = V_0;
int32_t L_6 = L_5;
uint8_t L_7 = (L_4)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_6));
ByteU5BU5D_t4116647657* L_8 = ___buffer21;
int32_t L_9 = V_0;
int32_t L_10 = L_9;
uint8_t L_11 = (L_8)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_10));
if ((((int32_t)L_7) == ((int32_t)L_11)))
{
goto IL_002f;
}
}
{
return (bool)0;
}
IL_002f:
{
int32_t L_12 = V_0;
V_0 = ((int32_t)il2cpp_codegen_add((int32_t)L_12, (int32_t)1));
}
IL_0033:
{
int32_t L_13 = V_0;
ByteU5BU5D_t4116647657* L_14 = ___buffer10;
if ((((int32_t)L_13) < ((int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_14)->max_length)))))))
{
goto IL_0022;
}
}
{
return (bool)1;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void Mono.Security.Protocol.Tls.HttpsClientStream::.ctor(System.IO.Stream,System.Security.Cryptography.X509Certificates.X509CertificateCollection,System.Net.HttpWebRequest,System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void HttpsClientStream__ctor_m3125726871 (HttpsClientStream_t1160552561 * __this, Stream_t1273022909 * ___stream0, X509CertificateCollection_t3399372417 * ___clientCertificates1, HttpWebRequest_t1669436515 * ___request2, ByteU5BU5D_t4116647657* ___buffer3, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (HttpsClientStream__ctor_m3125726871_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
HttpsClientStream_t1160552561 * G_B4_0 = NULL;
HttpsClientStream_t1160552561 * G_B3_0 = NULL;
HttpsClientStream_t1160552561 * G_B6_0 = NULL;
HttpsClientStream_t1160552561 * G_B5_0 = NULL;
{
Stream_t1273022909 * L_0 = ___stream0;
HttpWebRequest_t1669436515 * L_1 = ___request2;
Uri_t100236324 * L_2 = HttpWebRequest_get_Address_m1609525404(L_1, /*hidden argument*/NULL);
String_t* L_3 = Uri_get_Host_m42857288(L_2, /*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(ServicePointManager_t170559685_il2cpp_TypeInfo_var);
int32_t L_4 = ServicePointManager_get_SecurityProtocol_m4259357356(NULL /*static, unused*/, /*hidden argument*/NULL);
X509CertificateCollection_t3399372417 * L_5 = ___clientCertificates1;
SslClientStream__ctor_m3351906728(__this, L_0, L_3, (bool)0, L_4, L_5, /*hidden argument*/NULL);
HttpWebRequest_t1669436515 * L_6 = ___request2;
__this->set__request_20(L_6);
__this->set__status_21(0);
ByteU5BU5D_t4116647657* L_7 = ___buffer3;
if (!L_7)
{
goto IL_0040;
}
}
{
Stream_t1273022909 * L_8 = SslClientStream_get_InputBuffer_m4092356391(__this, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_9 = ___buffer3;
ByteU5BU5D_t4116647657* L_10 = ___buffer3;
VirtActionInvoker3< ByteU5BU5D_t4116647657*, int32_t, int32_t >::Invoke(18 /* System.Void System.IO.Stream::Write(System.Byte[],System.Int32,System.Int32) */, L_8, L_9, 0, (((int32_t)((int32_t)(((RuntimeArray *)L_10)->max_length)))));
}
IL_0040:
{
IL2CPP_RUNTIME_CLASS_INIT(ServicePointManager_t170559685_il2cpp_TypeInfo_var);
bool L_11 = ServicePointManager_get_CheckCertificateRevocationList_m1716454075(NULL /*static, unused*/, /*hidden argument*/NULL);
SslStreamBase_set_CheckCertRevocationStatus_m912861213(__this, L_11, /*hidden argument*/NULL);
CertificateSelectionCallback_t3743405224 * L_12 = ((HttpsClientStream_t1160552561_StaticFields*)il2cpp_codegen_static_fields_for(HttpsClientStream_t1160552561_il2cpp_TypeInfo_var))->get_U3CU3Ef__amU24cache2_22();
G_B3_0 = __this;
if (L_12)
{
G_B4_0 = __this;
goto IL_0064;
}
}
{
intptr_t L_13 = (intptr_t)HttpsClientStream_U3CHttpsClientStreamU3Em__0_m2058474197_RuntimeMethod_var;
CertificateSelectionCallback_t3743405224 * L_14 = (CertificateSelectionCallback_t3743405224 *)il2cpp_codegen_object_new(CertificateSelectionCallback_t3743405224_il2cpp_TypeInfo_var);
CertificateSelectionCallback__ctor_m3437537928(L_14, NULL, L_13, /*hidden argument*/NULL);
((HttpsClientStream_t1160552561_StaticFields*)il2cpp_codegen_static_fields_for(HttpsClientStream_t1160552561_il2cpp_TypeInfo_var))->set_U3CU3Ef__amU24cache2_22(L_14);
G_B4_0 = G_B3_0;
}
IL_0064:
{
CertificateSelectionCallback_t3743405224 * L_15 = ((HttpsClientStream_t1160552561_StaticFields*)il2cpp_codegen_static_fields_for(HttpsClientStream_t1160552561_il2cpp_TypeInfo_var))->get_U3CU3Ef__amU24cache2_22();
SslClientStream_add_ClientCertSelection_m1387948363(G_B4_0, L_15, /*hidden argument*/NULL);
PrivateKeySelectionCallback_t3240194217 * L_16 = ((HttpsClientStream_t1160552561_StaticFields*)il2cpp_codegen_static_fields_for(HttpsClientStream_t1160552561_il2cpp_TypeInfo_var))->get_U3CU3Ef__amU24cache3_23();
G_B5_0 = __this;
if (L_16)
{
G_B6_0 = __this;
goto IL_0087;
}
}
{
intptr_t L_17 = (intptr_t)HttpsClientStream_U3CHttpsClientStreamU3Em__1_m1202173386_RuntimeMethod_var;
PrivateKeySelectionCallback_t3240194217 * L_18 = (PrivateKeySelectionCallback_t3240194217 *)il2cpp_codegen_object_new(PrivateKeySelectionCallback_t3240194217_il2cpp_TypeInfo_var);
PrivateKeySelectionCallback__ctor_m265141085(L_18, NULL, L_17, /*hidden argument*/NULL);
((HttpsClientStream_t1160552561_StaticFields*)il2cpp_codegen_static_fields_for(HttpsClientStream_t1160552561_il2cpp_TypeInfo_var))->set_U3CU3Ef__amU24cache3_23(L_18);
G_B6_0 = G_B5_0;
}
IL_0087:
{
PrivateKeySelectionCallback_t3240194217 * L_19 = ((HttpsClientStream_t1160552561_StaticFields*)il2cpp_codegen_static_fields_for(HttpsClientStream_t1160552561_il2cpp_TypeInfo_var))->get_U3CU3Ef__amU24cache3_23();
SslClientStream_add_PrivateKeySelection_m1663125063(G_B6_0, L_19, /*hidden argument*/NULL);
return;
}
}
// System.Boolean Mono.Security.Protocol.Tls.HttpsClientStream::get_TrustFailure()
extern "C" IL2CPP_METHOD_ATTR bool HttpsClientStream_get_TrustFailure_m1151901888 (HttpsClientStream_t1160552561 * __this, const RuntimeMethod* method)
{
int32_t V_0 = 0;
{
int32_t L_0 = __this->get__status_21();
V_0 = L_0;
int32_t L_1 = V_0;
if ((((int32_t)L_1) == ((int32_t)((int32_t)-2146762487))))
{
goto IL_0022;
}
}
{
int32_t L_2 = V_0;
if ((((int32_t)L_2) == ((int32_t)((int32_t)-2146762486))))
{
goto IL_0022;
}
}
{
goto IL_0024;
}
IL_0022:
{
return (bool)1;
}
IL_0024:
{
return (bool)0;
}
}
// System.Boolean Mono.Security.Protocol.Tls.HttpsClientStream::RaiseServerCertificateValidation(System.Security.Cryptography.X509Certificates.X509Certificate,System.Int32[])
extern "C" IL2CPP_METHOD_ATTR bool HttpsClientStream_RaiseServerCertificateValidation_m3782467213 (HttpsClientStream_t1160552561 * __this, X509Certificate_t713131622 * ___certificate0, Int32U5BU5D_t385246372* ___certificateErrors1, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (HttpsClientStream_RaiseServerCertificateValidation_m3782467213_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
bool V_0 = false;
ServicePoint_t2786966844 * V_1 = NULL;
bool V_2 = false;
RemoteCertificateValidationCallback_t3014364904 * V_3 = NULL;
int32_t V_4 = 0;
int32_t V_5 = 0;
Int32U5BU5D_t385246372* V_6 = NULL;
int32_t V_7 = 0;
X509Certificate2_t714049126 * V_8 = NULL;
X509Chain_t194917408 * V_9 = NULL;
HttpsClientStream_t1160552561 * G_B2_0 = NULL;
HttpsClientStream_t1160552561 * G_B1_0 = NULL;
int32_t G_B3_0 = 0;
HttpsClientStream_t1160552561 * G_B3_1 = NULL;
{
Int32U5BU5D_t385246372* L_0 = ___certificateErrors1;
V_0 = (bool)((((int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_0)->max_length))))) > ((int32_t)0))? 1 : 0);
bool L_1 = V_0;
G_B1_0 = __this;
if (!L_1)
{
G_B2_0 = __this;
goto IL_0016;
}
}
{
Int32U5BU5D_t385246372* L_2 = ___certificateErrors1;
int32_t L_3 = 0;
int32_t L_4 = (L_2)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_3));
G_B3_0 = L_4;
G_B3_1 = G_B1_0;
goto IL_0017;
}
IL_0016:
{
G_B3_0 = 0;
G_B3_1 = G_B2_0;
}
IL_0017:
{
G_B3_1->set__status_21(G_B3_0);
IL2CPP_RUNTIME_CLASS_INIT(ServicePointManager_t170559685_il2cpp_TypeInfo_var);
RuntimeObject* L_5 = ServicePointManager_get_CertificatePolicy_m1966679142(NULL /*static, unused*/, /*hidden argument*/NULL);
if (!L_5)
{
goto IL_0055;
}
}
{
HttpWebRequest_t1669436515 * L_6 = __this->get__request_20();
ServicePoint_t2786966844 * L_7 = HttpWebRequest_get_ServicePoint_m1080482337(L_6, /*hidden argument*/NULL);
V_1 = L_7;
IL2CPP_RUNTIME_CLASS_INIT(ServicePointManager_t170559685_il2cpp_TypeInfo_var);
RuntimeObject* L_8 = ServicePointManager_get_CertificatePolicy_m1966679142(NULL /*static, unused*/, /*hidden argument*/NULL);
ServicePoint_t2786966844 * L_9 = V_1;
X509Certificate_t713131622 * L_10 = ___certificate0;
HttpWebRequest_t1669436515 * L_11 = __this->get__request_20();
int32_t L_12 = __this->get__status_21();
bool L_13 = InterfaceFuncInvoker4< bool, ServicePoint_t2786966844 *, X509Certificate_t713131622 *, WebRequest_t1939381076 *, int32_t >::Invoke(0 /* System.Boolean System.Net.ICertificatePolicy::CheckValidationResult(System.Net.ServicePoint,System.Security.Cryptography.X509Certificates.X509Certificate,System.Net.WebRequest,System.Int32) */, ICertificatePolicy_t2970473191_il2cpp_TypeInfo_var, L_8, L_9, L_10, L_11, L_12);
V_2 = L_13;
bool L_14 = V_2;
if (L_14)
{
goto IL_0053;
}
}
{
return (bool)0;
}
IL_0053:
{
V_0 = (bool)1;
}
IL_0055:
{
bool L_15 = VirtFuncInvoker0< bool >::Invoke(29 /* System.Boolean Mono.Security.Protocol.Tls.SslClientStream::get_HaveRemoteValidation2Callback() */, __this);
if (!L_15)
{
goto IL_0062;
}
}
{
bool L_16 = V_0;
return L_16;
}
IL_0062:
{
IL2CPP_RUNTIME_CLASS_INIT(ServicePointManager_t170559685_il2cpp_TypeInfo_var);
RemoteCertificateValidationCallback_t3014364904 * L_17 = ServicePointManager_get_ServerCertificateValidationCallback_m984921647(NULL /*static, unused*/, /*hidden argument*/NULL);
V_3 = L_17;
RemoteCertificateValidationCallback_t3014364904 * L_18 = V_3;
if (!L_18)
{
goto IL_0103;
}
}
{
V_4 = 0;
Int32U5BU5D_t385246372* L_19 = ___certificateErrors1;
V_6 = L_19;
V_7 = 0;
goto IL_00bd;
}
IL_007c:
{
Int32U5BU5D_t385246372* L_20 = V_6;
int32_t L_21 = V_7;
int32_t L_22 = L_21;
int32_t L_23 = (L_20)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_22));
V_5 = L_23;
int32_t L_24 = V_5;
if ((!(((uint32_t)L_24) == ((uint32_t)((int32_t)-2146762490)))))
{
goto IL_009a;
}
}
{
int32_t L_25 = V_4;
V_4 = ((int32_t)((int32_t)L_25|(int32_t)1));
goto IL_00b7;
}
IL_009a:
{
int32_t L_26 = V_5;
if ((!(((uint32_t)L_26) == ((uint32_t)((int32_t)-2146762481)))))
{
goto IL_00b1;
}
}
{
int32_t L_27 = V_4;
V_4 = ((int32_t)((int32_t)L_27|(int32_t)2));
goto IL_00b7;
}
IL_00b1:
{
int32_t L_28 = V_4;
V_4 = ((int32_t)((int32_t)L_28|(int32_t)4));
}
IL_00b7:
{
int32_t L_29 = V_7;
V_7 = ((int32_t)il2cpp_codegen_add((int32_t)L_29, (int32_t)1));
}
IL_00bd:
{
int32_t L_30 = V_7;
Int32U5BU5D_t385246372* L_31 = V_6;
if ((((int32_t)L_30) < ((int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_31)->max_length)))))))
{
goto IL_007c;
}
}
{
X509Certificate_t713131622 * L_32 = ___certificate0;
ByteU5BU5D_t4116647657* L_33 = VirtFuncInvoker0< ByteU5BU5D_t4116647657* >::Invoke(14 /* System.Byte[] System.Security.Cryptography.X509Certificates.X509Certificate::GetRawCertData() */, L_32);
X509Certificate2_t714049126 * L_34 = (X509Certificate2_t714049126 *)il2cpp_codegen_object_new(X509Certificate2_t714049126_il2cpp_TypeInfo_var);
X509Certificate2__ctor_m2370196240(L_34, L_33, /*hidden argument*/NULL);
V_8 = L_34;
X509Chain_t194917408 * L_35 = (X509Chain_t194917408 *)il2cpp_codegen_object_new(X509Chain_t194917408_il2cpp_TypeInfo_var);
X509Chain__ctor_m2878811474(L_35, /*hidden argument*/NULL);
V_9 = L_35;
X509Chain_t194917408 * L_36 = V_9;
X509Certificate2_t714049126 * L_37 = V_8;
bool L_38 = X509Chain_Build_m1705729171(L_36, L_37, /*hidden argument*/NULL);
if (L_38)
{
goto IL_00f0;
}
}
{
int32_t L_39 = V_4;
V_4 = ((int32_t)((int32_t)L_39|(int32_t)4));
}
IL_00f0:
{
RemoteCertificateValidationCallback_t3014364904 * L_40 = V_3;
HttpWebRequest_t1669436515 * L_41 = __this->get__request_20();
X509Certificate2_t714049126 * L_42 = V_8;
X509Chain_t194917408 * L_43 = V_9;
int32_t L_44 = V_4;
bool L_45 = RemoteCertificateValidationCallback_Invoke_m727898444(L_40, L_41, L_42, L_43, L_44, /*hidden argument*/NULL);
return L_45;
}
IL_0103:
{
bool L_46 = V_0;
return L_46;
}
}
// System.Security.Cryptography.X509Certificates.X509Certificate Mono.Security.Protocol.Tls.HttpsClientStream::<HttpsClientStream>m__0(System.Security.Cryptography.X509Certificates.X509CertificateCollection,System.Security.Cryptography.X509Certificates.X509Certificate,System.String,System.Security.Cryptography.X509Certificates.X509CertificateCollection)
extern "C" IL2CPP_METHOD_ATTR X509Certificate_t713131622 * HttpsClientStream_U3CHttpsClientStreamU3Em__0_m2058474197 (RuntimeObject * __this /* static, unused */, X509CertificateCollection_t3399372417 * ___clientCerts0, X509Certificate_t713131622 * ___serverCertificate1, String_t* ___targetHost2, X509CertificateCollection_t3399372417 * ___serverRequestedCertificates3, const RuntimeMethod* method)
{
X509Certificate_t713131622 * G_B4_0 = NULL;
{
X509CertificateCollection_t3399372417 * L_0 = ___clientCerts0;
if (!L_0)
{
goto IL_0011;
}
}
{
X509CertificateCollection_t3399372417 * L_1 = ___clientCerts0;
int32_t L_2 = CollectionBase_get_Count_m1708965601(L_1, /*hidden argument*/NULL);
if (L_2)
{
goto IL_0017;
}
}
IL_0011:
{
G_B4_0 = ((X509Certificate_t713131622 *)(NULL));
goto IL_001e;
}
IL_0017:
{
X509CertificateCollection_t3399372417 * L_3 = ___clientCerts0;
X509Certificate_t713131622 * L_4 = X509CertificateCollection_get_Item_m1177942658(L_3, 0, /*hidden argument*/NULL);
G_B4_0 = L_4;
}
IL_001e:
{
return G_B4_0;
}
}
// System.Security.Cryptography.AsymmetricAlgorithm Mono.Security.Protocol.Tls.HttpsClientStream::<HttpsClientStream>m__1(System.Security.Cryptography.X509Certificates.X509Certificate,System.String)
extern "C" IL2CPP_METHOD_ATTR AsymmetricAlgorithm_t932037087 * HttpsClientStream_U3CHttpsClientStreamU3Em__1_m1202173386 (RuntimeObject * __this /* static, unused */, X509Certificate_t713131622 * ___certificate0, String_t* ___targetHost1, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (HttpsClientStream_U3CHttpsClientStreamU3Em__1_m1202173386_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
X509Certificate2_t714049126 * V_0 = NULL;
AsymmetricAlgorithm_t932037087 * G_B3_0 = NULL;
{
X509Certificate_t713131622 * L_0 = ___certificate0;
V_0 = ((X509Certificate2_t714049126 *)IsInstClass((RuntimeObject*)L_0, X509Certificate2_t714049126_il2cpp_TypeInfo_var));
X509Certificate2_t714049126 * L_1 = V_0;
if (L_1)
{
goto IL_0013;
}
}
{
G_B3_0 = ((AsymmetricAlgorithm_t932037087 *)(NULL));
goto IL_0019;
}
IL_0013:
{
X509Certificate2_t714049126 * L_2 = V_0;
AsymmetricAlgorithm_t932037087 * L_3 = X509Certificate2_get_PrivateKey_m450647294(L_2, /*hidden argument*/NULL);
G_B3_0 = L_3;
}
IL_0019:
{
return G_B3_0;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void Mono.Security.Protocol.Tls.PrivateKeySelectionCallback::.ctor(System.Object,System.IntPtr)
extern "C" IL2CPP_METHOD_ATTR void PrivateKeySelectionCallback__ctor_m265141085 (PrivateKeySelectionCallback_t3240194217 * __this, RuntimeObject * ___object0, intptr_t ___method1, const RuntimeMethod* method)
{
__this->set_method_ptr_0(il2cpp_codegen_get_method_pointer((RuntimeMethod*)___method1));
__this->set_method_3(___method1);
__this->set_m_target_2(___object0);
}
// System.Security.Cryptography.AsymmetricAlgorithm Mono.Security.Protocol.Tls.PrivateKeySelectionCallback::Invoke(System.Security.Cryptography.X509Certificates.X509Certificate,System.String)
extern "C" IL2CPP_METHOD_ATTR AsymmetricAlgorithm_t932037087 * PrivateKeySelectionCallback_Invoke_m921844982 (PrivateKeySelectionCallback_t3240194217 * __this, X509Certificate_t713131622 * ___certificate0, String_t* ___targetHost1, const RuntimeMethod* method)
{
AsymmetricAlgorithm_t932037087 * result = NULL;
if(__this->get_prev_9() != NULL)
{
PrivateKeySelectionCallback_Invoke_m921844982((PrivateKeySelectionCallback_t3240194217 *)__this->get_prev_9(), ___certificate0, ___targetHost1, method);
}
Il2CppMethodPointer targetMethodPointer = __this->get_method_ptr_0();
RuntimeMethod* targetMethod = (RuntimeMethod*)(__this->get_method_3());
RuntimeObject* targetThis = __this->get_m_target_2();
il2cpp_codegen_raise_execution_engine_exception_if_method_is_not_found(targetMethod);
bool ___methodIsStatic = MethodIsStatic(targetMethod);
if (___methodIsStatic)
{
if (il2cpp_codegen_method_parameter_count(targetMethod) == 2)
{
// open
{
typedef AsymmetricAlgorithm_t932037087 * (*FunctionPointerType) (RuntimeObject *, X509Certificate_t713131622 *, String_t*, const RuntimeMethod*);
result = ((FunctionPointerType)targetMethodPointer)(NULL, ___certificate0, ___targetHost1, targetMethod);
}
}
else
{
// closed
{
typedef AsymmetricAlgorithm_t932037087 * (*FunctionPointerType) (RuntimeObject *, void*, X509Certificate_t713131622 *, String_t*, const RuntimeMethod*);
result = ((FunctionPointerType)targetMethodPointer)(NULL, targetThis, ___certificate0, ___targetHost1, targetMethod);
}
}
}
else
{
if (il2cpp_codegen_method_parameter_count(targetMethod) == 2)
{
// closed
if (il2cpp_codegen_method_is_virtual(targetMethod) && !il2cpp_codegen_object_is_of_sealed_type(targetThis) && il2cpp_codegen_delegate_has_invoker((Il2CppDelegate*)__this))
{
if (il2cpp_codegen_method_is_generic_instance(targetMethod))
{
if (il2cpp_codegen_method_is_interface_method(targetMethod))
result = GenericInterfaceFuncInvoker2< AsymmetricAlgorithm_t932037087 *, X509Certificate_t713131622 *, String_t* >::Invoke(targetMethod, targetThis, ___certificate0, ___targetHost1);
else
result = GenericVirtFuncInvoker2< AsymmetricAlgorithm_t932037087 *, X509Certificate_t713131622 *, String_t* >::Invoke(targetMethod, targetThis, ___certificate0, ___targetHost1);
}
else
{
if (il2cpp_codegen_method_is_interface_method(targetMethod))
result = InterfaceFuncInvoker2< AsymmetricAlgorithm_t932037087 *, X509Certificate_t713131622 *, String_t* >::Invoke(il2cpp_codegen_method_get_slot(targetMethod), il2cpp_codegen_method_get_declaring_type(targetMethod), targetThis, ___certificate0, ___targetHost1);
else
result = VirtFuncInvoker2< AsymmetricAlgorithm_t932037087 *, X509Certificate_t713131622 *, String_t* >::Invoke(il2cpp_codegen_method_get_slot(targetMethod), targetThis, ___certificate0, ___targetHost1);
}
}
else
{
typedef AsymmetricAlgorithm_t932037087 * (*FunctionPointerType) (void*, X509Certificate_t713131622 *, String_t*, const RuntimeMethod*);
result = ((FunctionPointerType)targetMethodPointer)(targetThis, ___certificate0, ___targetHost1, targetMethod);
}
}
else
{
// open
if (il2cpp_codegen_method_is_virtual(targetMethod) && !il2cpp_codegen_object_is_of_sealed_type(targetThis) && il2cpp_codegen_delegate_has_invoker((Il2CppDelegate*)__this))
{
if (il2cpp_codegen_method_is_generic_instance(targetMethod))
{
if (il2cpp_codegen_method_is_interface_method(targetMethod))
result = GenericInterfaceFuncInvoker1< AsymmetricAlgorithm_t932037087 *, String_t* >::Invoke(targetMethod, ___certificate0, ___targetHost1);
else
result = GenericVirtFuncInvoker1< AsymmetricAlgorithm_t932037087 *, String_t* >::Invoke(targetMethod, ___certificate0, ___targetHost1);
}
else
{
if (il2cpp_codegen_method_is_interface_method(targetMethod))
result = InterfaceFuncInvoker1< AsymmetricAlgorithm_t932037087 *, String_t* >::Invoke(il2cpp_codegen_method_get_slot(targetMethod), il2cpp_codegen_method_get_declaring_type(targetMethod), ___certificate0, ___targetHost1);
else
result = VirtFuncInvoker1< AsymmetricAlgorithm_t932037087 *, String_t* >::Invoke(il2cpp_codegen_method_get_slot(targetMethod), ___certificate0, ___targetHost1);
}
}
else
{
typedef AsymmetricAlgorithm_t932037087 * (*FunctionPointerType) (X509Certificate_t713131622 *, String_t*, const RuntimeMethod*);
result = ((FunctionPointerType)targetMethodPointer)(___certificate0, ___targetHost1, targetMethod);
}
}
}
return result;
}
// System.IAsyncResult Mono.Security.Protocol.Tls.PrivateKeySelectionCallback::BeginInvoke(System.Security.Cryptography.X509Certificates.X509Certificate,System.String,System.AsyncCallback,System.Object)
extern "C" IL2CPP_METHOD_ATTR RuntimeObject* PrivateKeySelectionCallback_BeginInvoke_m2814232473 (PrivateKeySelectionCallback_t3240194217 * __this, X509Certificate_t713131622 * ___certificate0, String_t* ___targetHost1, AsyncCallback_t3962456242 * ___callback2, RuntimeObject * ___object3, const RuntimeMethod* method)
{
void *__d_args[3] = {0};
__d_args[0] = ___certificate0;
__d_args[1] = ___targetHost1;
return (RuntimeObject*)il2cpp_codegen_delegate_begin_invoke((RuntimeDelegate*)__this, __d_args, (RuntimeDelegate*)___callback2, (RuntimeObject*)___object3);
}
// System.Security.Cryptography.AsymmetricAlgorithm Mono.Security.Protocol.Tls.PrivateKeySelectionCallback::EndInvoke(System.IAsyncResult)
extern "C" IL2CPP_METHOD_ATTR AsymmetricAlgorithm_t932037087 * PrivateKeySelectionCallback_EndInvoke_m2229365437 (PrivateKeySelectionCallback_t3240194217 * __this, RuntimeObject* ___result0, const RuntimeMethod* method)
{
RuntimeObject *__result = il2cpp_codegen_delegate_end_invoke((Il2CppAsyncResult*) ___result0, 0);
return (AsymmetricAlgorithm_t932037087 *)__result;
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void Mono.Security.Protocol.Tls.RSASslSignatureDeformatter::.ctor(System.Security.Cryptography.AsymmetricAlgorithm)
extern "C" IL2CPP_METHOD_ATTR void RSASslSignatureDeformatter__ctor_m4026549112 (RSASslSignatureDeformatter_t3558097625 * __this, AsymmetricAlgorithm_t932037087 * ___key0, const RuntimeMethod* method)
{
{
AsymmetricSignatureDeformatter__ctor_m88114807(__this, /*hidden argument*/NULL);
AsymmetricAlgorithm_t932037087 * L_0 = ___key0;
VirtActionInvoker1< AsymmetricAlgorithm_t932037087 * >::Invoke(5 /* System.Void Mono.Security.Protocol.Tls.RSASslSignatureDeformatter::SetKey(System.Security.Cryptography.AsymmetricAlgorithm) */, __this, L_0);
return;
}
}
// System.Boolean Mono.Security.Protocol.Tls.RSASslSignatureDeformatter::VerifySignature(System.Byte[],System.Byte[])
extern "C" IL2CPP_METHOD_ATTR bool RSASslSignatureDeformatter_VerifySignature_m1061897602 (RSASslSignatureDeformatter_t3558097625 * __this, ByteU5BU5D_t4116647657* ___rgbHash0, ByteU5BU5D_t4116647657* ___rgbSignature1, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (RSASslSignatureDeformatter_VerifySignature_m1061897602_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
RSA_t2385438082 * L_0 = __this->get_key_0();
if (L_0)
{
goto IL_0016;
}
}
{
CryptographicUnexpectedOperationException_t2790575154 * L_1 = (CryptographicUnexpectedOperationException_t2790575154 *)il2cpp_codegen_object_new(CryptographicUnexpectedOperationException_t2790575154_il2cpp_TypeInfo_var);
CryptographicUnexpectedOperationException__ctor_m2381988196(L_1, _stringLiteral961554175, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_1, NULL, RSASslSignatureDeformatter_VerifySignature_m1061897602_RuntimeMethod_var);
}
IL_0016:
{
HashAlgorithm_t1432317219 * L_2 = __this->get_hash_1();
if (L_2)
{
goto IL_002c;
}
}
{
CryptographicUnexpectedOperationException_t2790575154 * L_3 = (CryptographicUnexpectedOperationException_t2790575154 *)il2cpp_codegen_object_new(CryptographicUnexpectedOperationException_t2790575154_il2cpp_TypeInfo_var);
CryptographicUnexpectedOperationException__ctor_m2381988196(L_3, _stringLiteral476027131, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_3, NULL, RSASslSignatureDeformatter_VerifySignature_m1061897602_RuntimeMethod_var);
}
IL_002c:
{
ByteU5BU5D_t4116647657* L_4 = ___rgbHash0;
if (L_4)
{
goto IL_003d;
}
}
{
ArgumentNullException_t1615371798 * L_5 = (ArgumentNullException_t1615371798 *)il2cpp_codegen_object_new(ArgumentNullException_t1615371798_il2cpp_TypeInfo_var);
ArgumentNullException__ctor_m1170824041(L_5, _stringLiteral475316319, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_5, NULL, RSASslSignatureDeformatter_VerifySignature_m1061897602_RuntimeMethod_var);
}
IL_003d:
{
RSA_t2385438082 * L_6 = __this->get_key_0();
HashAlgorithm_t1432317219 * L_7 = __this->get_hash_1();
ByteU5BU5D_t4116647657* L_8 = ___rgbHash0;
ByteU5BU5D_t4116647657* L_9 = ___rgbSignature1;
IL2CPP_RUNTIME_CLASS_INIT(PKCS1_t1505584677_il2cpp_TypeInfo_var);
bool L_10 = PKCS1_Verify_v15_m4192025173(NULL /*static, unused*/, L_6, L_7, L_8, L_9, /*hidden argument*/NULL);
return L_10;
}
}
// System.Void Mono.Security.Protocol.Tls.RSASslSignatureDeformatter::SetHashAlgorithm(System.String)
extern "C" IL2CPP_METHOD_ATTR void RSASslSignatureDeformatter_SetHashAlgorithm_m895570787 (RSASslSignatureDeformatter_t3558097625 * __this, String_t* ___strName0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (RSASslSignatureDeformatter_SetHashAlgorithm_m895570787_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
String_t* V_0 = NULL;
Dictionary_2_t2736202052 * V_1 = NULL;
int32_t V_2 = 0;
{
String_t* L_0 = ___strName0;
V_0 = L_0;
String_t* L_1 = V_0;
if (!L_1)
{
goto IL_0058;
}
}
{
Dictionary_2_t2736202052 * L_2 = ((RSASslSignatureDeformatter_t3558097625_StaticFields*)il2cpp_codegen_static_fields_for(RSASslSignatureDeformatter_t3558097625_il2cpp_TypeInfo_var))->get_U3CU3Ef__switchU24map15_2();
if (L_2)
{
goto IL_002b;
}
}
{
Dictionary_2_t2736202052 * L_3 = (Dictionary_2_t2736202052 *)il2cpp_codegen_object_new(Dictionary_2_t2736202052_il2cpp_TypeInfo_var);
Dictionary_2__ctor_m2392909825(L_3, 1, /*hidden argument*/Dictionary_2__ctor_m2392909825_RuntimeMethod_var);
V_1 = L_3;
Dictionary_2_t2736202052 * L_4 = V_1;
Dictionary_2_Add_m282647386(L_4, _stringLiteral1361554341, 0, /*hidden argument*/Dictionary_2_Add_m282647386_RuntimeMethod_var);
Dictionary_2_t2736202052 * L_5 = V_1;
((RSASslSignatureDeformatter_t3558097625_StaticFields*)il2cpp_codegen_static_fields_for(RSASslSignatureDeformatter_t3558097625_il2cpp_TypeInfo_var))->set_U3CU3Ef__switchU24map15_2(L_5);
}
IL_002b:
{
Dictionary_2_t2736202052 * L_6 = ((RSASslSignatureDeformatter_t3558097625_StaticFields*)il2cpp_codegen_static_fields_for(RSASslSignatureDeformatter_t3558097625_il2cpp_TypeInfo_var))->get_U3CU3Ef__switchU24map15_2();
String_t* L_7 = V_0;
bool L_8 = Dictionary_2_TryGetValue_m1013208020(L_6, L_7, (int32_t*)(&V_2), /*hidden argument*/Dictionary_2_TryGetValue_m1013208020_RuntimeMethod_var);
if (!L_8)
{
goto IL_0058;
}
}
{
int32_t L_9 = V_2;
if (!L_9)
{
goto IL_0048;
}
}
{
goto IL_0058;
}
IL_0048:
{
MD5SHA1_t723838944 * L_10 = (MD5SHA1_t723838944 *)il2cpp_codegen_object_new(MD5SHA1_t723838944_il2cpp_TypeInfo_var);
MD5SHA1__ctor_m4081016482(L_10, /*hidden argument*/NULL);
__this->set_hash_1(L_10);
goto IL_0069;
}
IL_0058:
{
String_t* L_11 = ___strName0;
HashAlgorithm_t1432317219 * L_12 = HashAlgorithm_Create_m644612360(NULL /*static, unused*/, L_11, /*hidden argument*/NULL);
__this->set_hash_1(L_12);
goto IL_0069;
}
IL_0069:
{
return;
}
}
// System.Void Mono.Security.Protocol.Tls.RSASslSignatureDeformatter::SetKey(System.Security.Cryptography.AsymmetricAlgorithm)
extern "C" IL2CPP_METHOD_ATTR void RSASslSignatureDeformatter_SetKey_m2204705853 (RSASslSignatureDeformatter_t3558097625 * __this, AsymmetricAlgorithm_t932037087 * ___key0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (RSASslSignatureDeformatter_SetKey_m2204705853_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
AsymmetricAlgorithm_t932037087 * L_0 = ___key0;
if (((RSA_t2385438082 *)IsInstClass((RuntimeObject*)L_0, RSA_t2385438082_il2cpp_TypeInfo_var)))
{
goto IL_0016;
}
}
{
ArgumentException_t132251570 * L_1 = (ArgumentException_t132251570 *)il2cpp_codegen_object_new(ArgumentException_t132251570_il2cpp_TypeInfo_var);
ArgumentException__ctor_m1312628991(L_1, _stringLiteral1827055184, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_1, NULL, RSASslSignatureDeformatter_SetKey_m2204705853_RuntimeMethod_var);
}
IL_0016:
{
AsymmetricAlgorithm_t932037087 * L_2 = ___key0;
__this->set_key_0(((RSA_t2385438082 *)IsInstClass((RuntimeObject*)L_2, RSA_t2385438082_il2cpp_TypeInfo_var)));
return;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void Mono.Security.Protocol.Tls.RSASslSignatureFormatter::.ctor(System.Security.Cryptography.AsymmetricAlgorithm)
extern "C" IL2CPP_METHOD_ATTR void RSASslSignatureFormatter__ctor_m1299283008 (RSASslSignatureFormatter_t2709678514 * __this, AsymmetricAlgorithm_t932037087 * ___key0, const RuntimeMethod* method)
{
{
AsymmetricSignatureFormatter__ctor_m3278494933(__this, /*hidden argument*/NULL);
AsymmetricAlgorithm_t932037087 * L_0 = ___key0;
VirtActionInvoker1< AsymmetricAlgorithm_t932037087 * >::Invoke(5 /* System.Void Mono.Security.Protocol.Tls.RSASslSignatureFormatter::SetKey(System.Security.Cryptography.AsymmetricAlgorithm) */, __this, L_0);
return;
}
}
// System.Byte[] Mono.Security.Protocol.Tls.RSASslSignatureFormatter::CreateSignature(System.Byte[])
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* RSASslSignatureFormatter_CreateSignature_m2614788251 (RSASslSignatureFormatter_t2709678514 * __this, ByteU5BU5D_t4116647657* ___rgbHash0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (RSASslSignatureFormatter_CreateSignature_m2614788251_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
RSA_t2385438082 * L_0 = __this->get_key_0();
if (L_0)
{
goto IL_0016;
}
}
{
CryptographicUnexpectedOperationException_t2790575154 * L_1 = (CryptographicUnexpectedOperationException_t2790575154 *)il2cpp_codegen_object_new(CryptographicUnexpectedOperationException_t2790575154_il2cpp_TypeInfo_var);
CryptographicUnexpectedOperationException__ctor_m2381988196(L_1, _stringLiteral961554175, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_1, NULL, RSASslSignatureFormatter_CreateSignature_m2614788251_RuntimeMethod_var);
}
IL_0016:
{
HashAlgorithm_t1432317219 * L_2 = __this->get_hash_1();
if (L_2)
{
goto IL_002c;
}
}
{
CryptographicUnexpectedOperationException_t2790575154 * L_3 = (CryptographicUnexpectedOperationException_t2790575154 *)il2cpp_codegen_object_new(CryptographicUnexpectedOperationException_t2790575154_il2cpp_TypeInfo_var);
CryptographicUnexpectedOperationException__ctor_m2381988196(L_3, _stringLiteral476027131, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_3, NULL, RSASslSignatureFormatter_CreateSignature_m2614788251_RuntimeMethod_var);
}
IL_002c:
{
ByteU5BU5D_t4116647657* L_4 = ___rgbHash0;
if (L_4)
{
goto IL_003d;
}
}
{
ArgumentNullException_t1615371798 * L_5 = (ArgumentNullException_t1615371798 *)il2cpp_codegen_object_new(ArgumentNullException_t1615371798_il2cpp_TypeInfo_var);
ArgumentNullException__ctor_m1170824041(L_5, _stringLiteral475316319, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_5, NULL, RSASslSignatureFormatter_CreateSignature_m2614788251_RuntimeMethod_var);
}
IL_003d:
{
RSA_t2385438082 * L_6 = __this->get_key_0();
HashAlgorithm_t1432317219 * L_7 = __this->get_hash_1();
ByteU5BU5D_t4116647657* L_8 = ___rgbHash0;
IL2CPP_RUNTIME_CLASS_INIT(PKCS1_t1505584677_il2cpp_TypeInfo_var);
ByteU5BU5D_t4116647657* L_9 = PKCS1_Sign_v15_m3459793192(NULL /*static, unused*/, L_6, L_7, L_8, /*hidden argument*/NULL);
return L_9;
}
}
// System.Void Mono.Security.Protocol.Tls.RSASslSignatureFormatter::SetHashAlgorithm(System.String)
extern "C" IL2CPP_METHOD_ATTR void RSASslSignatureFormatter_SetHashAlgorithm_m3864232300 (RSASslSignatureFormatter_t2709678514 * __this, String_t* ___strName0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (RSASslSignatureFormatter_SetHashAlgorithm_m3864232300_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
String_t* V_0 = NULL;
Dictionary_2_t2736202052 * V_1 = NULL;
int32_t V_2 = 0;
{
String_t* L_0 = ___strName0;
V_0 = L_0;
String_t* L_1 = V_0;
if (!L_1)
{
goto IL_0058;
}
}
{
Dictionary_2_t2736202052 * L_2 = ((RSASslSignatureFormatter_t2709678514_StaticFields*)il2cpp_codegen_static_fields_for(RSASslSignatureFormatter_t2709678514_il2cpp_TypeInfo_var))->get_U3CU3Ef__switchU24map16_2();
if (L_2)
{
goto IL_002b;
}
}
{
Dictionary_2_t2736202052 * L_3 = (Dictionary_2_t2736202052 *)il2cpp_codegen_object_new(Dictionary_2_t2736202052_il2cpp_TypeInfo_var);
Dictionary_2__ctor_m2392909825(L_3, 1, /*hidden argument*/Dictionary_2__ctor_m2392909825_RuntimeMethod_var);
V_1 = L_3;
Dictionary_2_t2736202052 * L_4 = V_1;
Dictionary_2_Add_m282647386(L_4, _stringLiteral1361554341, 0, /*hidden argument*/Dictionary_2_Add_m282647386_RuntimeMethod_var);
Dictionary_2_t2736202052 * L_5 = V_1;
((RSASslSignatureFormatter_t2709678514_StaticFields*)il2cpp_codegen_static_fields_for(RSASslSignatureFormatter_t2709678514_il2cpp_TypeInfo_var))->set_U3CU3Ef__switchU24map16_2(L_5);
}
IL_002b:
{
Dictionary_2_t2736202052 * L_6 = ((RSASslSignatureFormatter_t2709678514_StaticFields*)il2cpp_codegen_static_fields_for(RSASslSignatureFormatter_t2709678514_il2cpp_TypeInfo_var))->get_U3CU3Ef__switchU24map16_2();
String_t* L_7 = V_0;
bool L_8 = Dictionary_2_TryGetValue_m1013208020(L_6, L_7, (int32_t*)(&V_2), /*hidden argument*/Dictionary_2_TryGetValue_m1013208020_RuntimeMethod_var);
if (!L_8)
{
goto IL_0058;
}
}
{
int32_t L_9 = V_2;
if (!L_9)
{
goto IL_0048;
}
}
{
goto IL_0058;
}
IL_0048:
{
MD5SHA1_t723838944 * L_10 = (MD5SHA1_t723838944 *)il2cpp_codegen_object_new(MD5SHA1_t723838944_il2cpp_TypeInfo_var);
MD5SHA1__ctor_m4081016482(L_10, /*hidden argument*/NULL);
__this->set_hash_1(L_10);
goto IL_0069;
}
IL_0058:
{
String_t* L_11 = ___strName0;
HashAlgorithm_t1432317219 * L_12 = HashAlgorithm_Create_m644612360(NULL /*static, unused*/, L_11, /*hidden argument*/NULL);
__this->set_hash_1(L_12);
goto IL_0069;
}
IL_0069:
{
return;
}
}
// System.Void Mono.Security.Protocol.Tls.RSASslSignatureFormatter::SetKey(System.Security.Cryptography.AsymmetricAlgorithm)
extern "C" IL2CPP_METHOD_ATTR void RSASslSignatureFormatter_SetKey_m979790541 (RSASslSignatureFormatter_t2709678514 * __this, AsymmetricAlgorithm_t932037087 * ___key0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (RSASslSignatureFormatter_SetKey_m979790541_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
AsymmetricAlgorithm_t932037087 * L_0 = ___key0;
if (((RSA_t2385438082 *)IsInstClass((RuntimeObject*)L_0, RSA_t2385438082_il2cpp_TypeInfo_var)))
{
goto IL_0016;
}
}
{
ArgumentException_t132251570 * L_1 = (ArgumentException_t132251570 *)il2cpp_codegen_object_new(ArgumentException_t132251570_il2cpp_TypeInfo_var);
ArgumentException__ctor_m1312628991(L_1, _stringLiteral1827055184, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_1, NULL, RSASslSignatureFormatter_SetKey_m979790541_RuntimeMethod_var);
}
IL_0016:
{
AsymmetricAlgorithm_t932037087 * L_2 = ___key0;
__this->set_key_0(((RSA_t2385438082 *)IsInstClass((RuntimeObject*)L_2, RSA_t2385438082_il2cpp_TypeInfo_var)));
return;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void Mono.Security.Protocol.Tls.RecordProtocol::.ctor(System.IO.Stream,Mono.Security.Protocol.Tls.Context)
extern "C" IL2CPP_METHOD_ATTR void RecordProtocol__ctor_m1695232390 (RecordProtocol_t3759049701 * __this, Stream_t1273022909 * ___innerStream0, Context_t3971234707 * ___context1, const RuntimeMethod* method)
{
{
Object__ctor_m297566312(__this, /*hidden argument*/NULL);
Stream_t1273022909 * L_0 = ___innerStream0;
__this->set_innerStream_1(L_0);
Context_t3971234707 * L_1 = ___context1;
__this->set_context_2(L_1);
Context_t3971234707 * L_2 = __this->get_context_2();
Context_set_RecordProtocol_m3067654641(L_2, __this, /*hidden argument*/NULL);
return;
}
}
// System.Void Mono.Security.Protocol.Tls.RecordProtocol::.cctor()
extern "C" IL2CPP_METHOD_ATTR void RecordProtocol__cctor_m1280873827 (RuntimeObject * __this /* static, unused */, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (RecordProtocol__cctor_m1280873827_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
ManualResetEvent_t451242010 * L_0 = (ManualResetEvent_t451242010 *)il2cpp_codegen_object_new(ManualResetEvent_t451242010_il2cpp_TypeInfo_var);
ManualResetEvent__ctor_m4010886457(L_0, (bool)1, /*hidden argument*/NULL);
((RecordProtocol_t3759049701_StaticFields*)il2cpp_codegen_static_fields_for(RecordProtocol_t3759049701_il2cpp_TypeInfo_var))->set_record_processing_0(L_0);
return;
}
}
// Mono.Security.Protocol.Tls.Context Mono.Security.Protocol.Tls.RecordProtocol::get_Context()
extern "C" IL2CPP_METHOD_ATTR Context_t3971234707 * RecordProtocol_get_Context_m3273611300 (RecordProtocol_t3759049701 * __this, const RuntimeMethod* method)
{
{
Context_t3971234707 * L_0 = __this->get_context_2();
return L_0;
}
}
// System.Void Mono.Security.Protocol.Tls.RecordProtocol::SendRecord(Mono.Security.Protocol.Tls.Handshake.HandshakeType)
extern "C" IL2CPP_METHOD_ATTR void RecordProtocol_SendRecord_m515492272 (RecordProtocol_t3759049701 * __this, uint8_t ___type0, const RuntimeMethod* method)
{
RuntimeObject* V_0 = NULL;
{
uint8_t L_0 = ___type0;
RuntimeObject* L_1 = RecordProtocol_BeginSendRecord_m615249746(__this, L_0, (AsyncCallback_t3962456242 *)NULL, NULL, /*hidden argument*/NULL);
V_0 = L_1;
RuntimeObject* L_2 = V_0;
RecordProtocol_EndSendRecord_m4264777321(__this, L_2, /*hidden argument*/NULL);
return;
}
}
// System.Void Mono.Security.Protocol.Tls.RecordProtocol::ProcessChangeCipherSpec()
extern "C" IL2CPP_METHOD_ATTR void RecordProtocol_ProcessChangeCipherSpec_m15839975 (RecordProtocol_t3759049701 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (RecordProtocol_ProcessChangeCipherSpec_m15839975_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
Context_t3971234707 * V_0 = NULL;
{
Context_t3971234707 * L_0 = RecordProtocol_get_Context_m3273611300(__this, /*hidden argument*/NULL);
V_0 = L_0;
Context_t3971234707 * L_1 = V_0;
Context_set_ReadSequenceNumber_m2154909392(L_1, (((int64_t)((int64_t)0))), /*hidden argument*/NULL);
Context_t3971234707 * L_2 = V_0;
if (!((ClientContext_t2797401965 *)IsInstClass((RuntimeObject*)L_2, ClientContext_t2797401965_il2cpp_TypeInfo_var)))
{
goto IL_0026;
}
}
{
Context_t3971234707 * L_3 = V_0;
Context_EndSwitchingSecurityParameters_m4148956166(L_3, (bool)1, /*hidden argument*/NULL);
goto IL_002d;
}
IL_0026:
{
Context_t3971234707 * L_4 = V_0;
Context_StartSwitchingSecurityParameters_m28285865(L_4, (bool)0, /*hidden argument*/NULL);
}
IL_002d:
{
return;
}
}
// Mono.Security.Protocol.Tls.Handshake.HandshakeMessage Mono.Security.Protocol.Tls.RecordProtocol::GetMessage(Mono.Security.Protocol.Tls.Handshake.HandshakeType)
extern "C" IL2CPP_METHOD_ATTR HandshakeMessage_t3696583168 * RecordProtocol_GetMessage_m2086135164 (RecordProtocol_t3759049701 * __this, uint8_t ___type0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (RecordProtocol_GetMessage_m2086135164_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
NotSupportedException_t1314879016 * L_0 = (NotSupportedException_t1314879016 *)il2cpp_codegen_object_new(NotSupportedException_t1314879016_il2cpp_TypeInfo_var);
NotSupportedException__ctor_m2730133172(L_0, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_0, NULL, RecordProtocol_GetMessage_m2086135164_RuntimeMethod_var);
}
}
// System.IAsyncResult Mono.Security.Protocol.Tls.RecordProtocol::BeginReceiveRecord(System.IO.Stream,System.AsyncCallback,System.Object)
extern "C" IL2CPP_METHOD_ATTR RuntimeObject* RecordProtocol_BeginReceiveRecord_m295321170 (RecordProtocol_t3759049701 * __this, Stream_t1273022909 * ___record0, AsyncCallback_t3962456242 * ___callback1, RuntimeObject * ___state2, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (RecordProtocol_BeginReceiveRecord_m295321170_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
ByteU5BU5D_t4116647657* V_0 = NULL;
ReceiveRecordAsyncResult_t3680907657 * V_1 = NULL;
{
Context_t3971234707 * L_0 = __this->get_context_2();
bool L_1 = Context_get_ReceivedConnectionEnd_m4011125537(L_0, /*hidden argument*/NULL);
if (!L_1)
{
goto IL_001d;
}
}
{
TlsException_t3534743363 * L_2 = (TlsException_t3534743363 *)il2cpp_codegen_object_new(TlsException_t3534743363_il2cpp_TypeInfo_var);
TlsException__ctor_m3242533711(L_2, ((int32_t)80), _stringLiteral1410188538, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_2, NULL, RecordProtocol_BeginReceiveRecord_m295321170_RuntimeMethod_var);
}
IL_001d:
{
IL2CPP_RUNTIME_CLASS_INIT(RecordProtocol_t3759049701_il2cpp_TypeInfo_var);
ManualResetEvent_t451242010 * L_3 = ((RecordProtocol_t3759049701_StaticFields*)il2cpp_codegen_static_fields_for(RecordProtocol_t3759049701_il2cpp_TypeInfo_var))->get_record_processing_0();
EventWaitHandle_Reset_m3348053200(L_3, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_4 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)1);
V_0 = L_4;
AsyncCallback_t3962456242 * L_5 = ___callback1;
RuntimeObject * L_6 = ___state2;
ByteU5BU5D_t4116647657* L_7 = V_0;
Stream_t1273022909 * L_8 = ___record0;
ReceiveRecordAsyncResult_t3680907657 * L_9 = (ReceiveRecordAsyncResult_t3680907657 *)il2cpp_codegen_object_new(ReceiveRecordAsyncResult_t3680907657_il2cpp_TypeInfo_var);
ReceiveRecordAsyncResult__ctor_m277637112(L_9, L_5, L_6, L_7, L_8, /*hidden argument*/NULL);
V_1 = L_9;
Stream_t1273022909 * L_10 = ___record0;
ReceiveRecordAsyncResult_t3680907657 * L_11 = V_1;
ByteU5BU5D_t4116647657* L_12 = ReceiveRecordAsyncResult_get_InitialBuffer_m2924495696(L_11, /*hidden argument*/NULL);
ReceiveRecordAsyncResult_t3680907657 * L_13 = V_1;
ByteU5BU5D_t4116647657* L_14 = ReceiveRecordAsyncResult_get_InitialBuffer_m2924495696(L_13, /*hidden argument*/NULL);
intptr_t L_15 = (intptr_t)RecordProtocol_InternalReceiveRecordCallback_m1713318629_RuntimeMethod_var;
AsyncCallback_t3962456242 * L_16 = (AsyncCallback_t3962456242 *)il2cpp_codegen_object_new(AsyncCallback_t3962456242_il2cpp_TypeInfo_var);
AsyncCallback__ctor_m530647953(L_16, __this, L_15, /*hidden argument*/NULL);
ReceiveRecordAsyncResult_t3680907657 * L_17 = V_1;
VirtFuncInvoker5< RuntimeObject*, ByteU5BU5D_t4116647657*, int32_t, int32_t, AsyncCallback_t3962456242 *, RuntimeObject * >::Invoke(20 /* System.IAsyncResult System.IO.Stream::BeginRead(System.Byte[],System.Int32,System.Int32,System.AsyncCallback,System.Object) */, L_10, L_12, 0, (((int32_t)((int32_t)(((RuntimeArray *)L_14)->max_length)))), L_16, L_17);
ReceiveRecordAsyncResult_t3680907657 * L_18 = V_1;
return L_18;
}
}
// System.Void Mono.Security.Protocol.Tls.RecordProtocol::InternalReceiveRecordCallback(System.IAsyncResult)
extern "C" IL2CPP_METHOD_ATTR void RecordProtocol_InternalReceiveRecordCallback_m1713318629 (RecordProtocol_t3759049701 * __this, RuntimeObject* ___asyncResult0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (RecordProtocol_InternalReceiveRecordCallback_m1713318629_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
ReceiveRecordAsyncResult_t3680907657 * V_0 = NULL;
Stream_t1273022909 * V_1 = NULL;
int32_t V_2 = 0;
int32_t V_3 = 0;
uint8_t V_4 = 0;
ByteU5BU5D_t4116647657* V_5 = NULL;
TlsStream_t2365453965 * V_6 = NULL;
Exception_t * V_7 = NULL;
uint8_t V_8 = 0;
Exception_t * __last_unhandled_exception = 0;
NO_UNUSED_WARNING (__last_unhandled_exception);
Exception_t * __exception_local = 0;
NO_UNUSED_WARNING (__exception_local);
int32_t __leave_target = -1;
NO_UNUSED_WARNING (__leave_target);
{
RuntimeObject* L_0 = ___asyncResult0;
RuntimeObject * L_1 = InterfaceFuncInvoker0< RuntimeObject * >::Invoke(0 /* System.Object System.IAsyncResult::get_AsyncState() */, IAsyncResult_t767004451_il2cpp_TypeInfo_var, L_0);
V_0 = ((ReceiveRecordAsyncResult_t3680907657 *)IsInstClass((RuntimeObject*)L_1, ReceiveRecordAsyncResult_t3680907657_il2cpp_TypeInfo_var));
ReceiveRecordAsyncResult_t3680907657 * L_2 = V_0;
Stream_t1273022909 * L_3 = ReceiveRecordAsyncResult_get_Record_m223479150(L_2, /*hidden argument*/NULL);
V_1 = L_3;
}
IL_0013:
try
{ // begin try (depth: 1)
{
ReceiveRecordAsyncResult_t3680907657 * L_4 = V_0;
Stream_t1273022909 * L_5 = ReceiveRecordAsyncResult_get_Record_m223479150(L_4, /*hidden argument*/NULL);
RuntimeObject* L_6 = ___asyncResult0;
int32_t L_7 = VirtFuncInvoker1< int32_t, RuntimeObject* >::Invoke(22 /* System.Int32 System.IO.Stream::EndRead(System.IAsyncResult) */, L_5, L_6);
V_2 = L_7;
int32_t L_8 = V_2;
if (L_8)
{
goto IL_0032;
}
}
IL_0026:
{
ReceiveRecordAsyncResult_t3680907657 * L_9 = V_0;
ReceiveRecordAsyncResult_SetComplete_m464469214(L_9, (ByteU5BU5D_t4116647657*)(ByteU5BU5D_t4116647657*)NULL, /*hidden argument*/NULL);
goto IL_0180;
}
IL_0032:
{
ReceiveRecordAsyncResult_t3680907657 * L_10 = V_0;
ByteU5BU5D_t4116647657* L_11 = ReceiveRecordAsyncResult_get_InitialBuffer_m2924495696(L_10, /*hidden argument*/NULL);
int32_t L_12 = 0;
uint8_t L_13 = (L_11)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_12));
V_3 = L_13;
Context_t3971234707 * L_14 = __this->get_context_2();
Context_set_LastHandshakeMsg_m1770618067(L_14, 1, /*hidden argument*/NULL);
int32_t L_15 = V_3;
V_4 = (((int32_t)((uint8_t)L_15)));
int32_t L_16 = V_3;
Stream_t1273022909 * L_17 = V_1;
ByteU5BU5D_t4116647657* L_18 = RecordProtocol_ReadRecordBuffer_m180543381(__this, L_16, L_17, /*hidden argument*/NULL);
V_5 = L_18;
ByteU5BU5D_t4116647657* L_19 = V_5;
if (L_19)
{
goto IL_0068;
}
}
IL_005c:
{
ReceiveRecordAsyncResult_t3680907657 * L_20 = V_0;
ReceiveRecordAsyncResult_SetComplete_m464469214(L_20, (ByteU5BU5D_t4116647657*)(ByteU5BU5D_t4116647657*)NULL, /*hidden argument*/NULL);
goto IL_0180;
}
IL_0068:
{
uint8_t L_21 = V_4;
if ((!(((uint32_t)L_21) == ((uint32_t)((int32_t)21)))))
{
goto IL_0080;
}
}
IL_0071:
{
ByteU5BU5D_t4116647657* L_22 = V_5;
if ((!(((uint32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_22)->max_length))))) == ((uint32_t)2))))
{
goto IL_0080;
}
}
IL_007b:
{
goto IL_00b1;
}
IL_0080:
{
Context_t3971234707 * L_23 = RecordProtocol_get_Context_m3273611300(__this, /*hidden argument*/NULL);
SecurityParameters_t2199972650 * L_24 = Context_get_Read_m4172356735(L_23, /*hidden argument*/NULL);
if (!L_24)
{
goto IL_00b1;
}
}
IL_0090:
{
Context_t3971234707 * L_25 = RecordProtocol_get_Context_m3273611300(__this, /*hidden argument*/NULL);
SecurityParameters_t2199972650 * L_26 = Context_get_Read_m4172356735(L_25, /*hidden argument*/NULL);
CipherSuite_t3414744575 * L_27 = SecurityParameters_get_Cipher_m108846204(L_26, /*hidden argument*/NULL);
if (!L_27)
{
goto IL_00b1;
}
}
IL_00a5:
{
uint8_t L_28 = V_4;
ByteU5BU5D_t4116647657* L_29 = V_5;
ByteU5BU5D_t4116647657* L_30 = RecordProtocol_decryptRecordFragment_m66623237(__this, L_28, L_29, /*hidden argument*/NULL);
V_5 = L_30;
}
IL_00b1:
{
uint8_t L_31 = V_4;
V_8 = L_31;
uint8_t L_32 = V_8;
switch (((int32_t)il2cpp_codegen_subtract((int32_t)L_32, (int32_t)((int32_t)20))))
{
case 0:
{
goto IL_0109;
}
case 1:
{
goto IL_00e0;
}
case 2:
{
goto IL_0119;
}
case 3:
{
goto IL_0114;
}
}
}
IL_00cf:
{
uint8_t L_33 = V_8;
if ((((int32_t)L_33) == ((int32_t)((int32_t)128))))
{
goto IL_0140;
}
}
IL_00db:
{
goto IL_0157;
}
IL_00e0:
{
ByteU5BU5D_t4116647657* L_34 = V_5;
int32_t L_35 = 0;
uint8_t L_36 = (L_34)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_35));
ByteU5BU5D_t4116647657* L_37 = V_5;
int32_t L_38 = 1;
uint8_t L_39 = (L_37)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_38));
RecordProtocol_ProcessAlert_m1036912531(__this, L_36, L_39, /*hidden argument*/NULL);
Stream_t1273022909 * L_40 = V_1;
bool L_41 = VirtFuncInvoker0< bool >::Invoke(6 /* System.Boolean System.IO.Stream::get_CanSeek() */, L_40);
if (!L_41)
{
goto IL_0101;
}
}
IL_00f9:
{
Stream_t1273022909 * L_42 = V_1;
VirtActionInvoker1< int64_t >::Invoke(17 /* System.Void System.IO.Stream::SetLength(System.Int64) */, L_42, (((int64_t)((int64_t)0))));
}
IL_0101:
{
V_5 = (ByteU5BU5D_t4116647657*)NULL;
goto IL_0164;
}
IL_0109:
{
VirtActionInvoker0::Invoke(6 /* System.Void Mono.Security.Protocol.Tls.RecordProtocol::ProcessChangeCipherSpec() */, __this);
goto IL_0164;
}
IL_0114:
{
goto IL_0164;
}
IL_0119:
{
ByteU5BU5D_t4116647657* L_43 = V_5;
TlsStream_t2365453965 * L_44 = (TlsStream_t2365453965 *)il2cpp_codegen_object_new(TlsStream_t2365453965_il2cpp_TypeInfo_var);
TlsStream__ctor_m277557575(L_44, L_43, /*hidden argument*/NULL);
V_6 = L_44;
goto IL_012f;
}
IL_0127:
{
TlsStream_t2365453965 * L_45 = V_6;
VirtActionInvoker1< TlsStream_t2365453965 * >::Invoke(5 /* System.Void Mono.Security.Protocol.Tls.RecordProtocol::ProcessHandshakeMessage(Mono.Security.Protocol.Tls.TlsStream) */, __this, L_45);
}
IL_012f:
{
TlsStream_t2365453965 * L_46 = V_6;
bool L_47 = TlsStream_get_EOF_m953226442(L_46, /*hidden argument*/NULL);
if (!L_47)
{
goto IL_0127;
}
}
IL_013b:
{
goto IL_0164;
}
IL_0140:
{
Context_t3971234707 * L_48 = __this->get_context_2();
TlsStream_t2365453965 * L_49 = Context_get_HandshakeMessages_m3655705111(L_48, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_50 = V_5;
TlsStream_Write_m4133894341(L_49, L_50, /*hidden argument*/NULL);
goto IL_0164;
}
IL_0157:
{
TlsException_t3534743363 * L_51 = (TlsException_t3534743363 *)il2cpp_codegen_object_new(TlsException_t3534743363_il2cpp_TypeInfo_var);
TlsException__ctor_m3242533711(L_51, ((int32_t)10), _stringLiteral2295937935, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_51, NULL, RecordProtocol_InternalReceiveRecordCallback_m1713318629_RuntimeMethod_var);
}
IL_0164:
{
ReceiveRecordAsyncResult_t3680907657 * L_52 = V_0;
ByteU5BU5D_t4116647657* L_53 = V_5;
ReceiveRecordAsyncResult_SetComplete_m464469214(L_52, L_53, /*hidden argument*/NULL);
goto IL_0180;
}
} // end try (depth: 1)
catch(Il2CppExceptionWrapper& e)
{
__exception_local = (Exception_t *)e.ex;
if(il2cpp_codegen_class_is_assignable_from (Exception_t_il2cpp_TypeInfo_var, il2cpp_codegen_object_class(e.ex)))
goto CATCH_0171;
throw e;
}
CATCH_0171:
{ // begin catch(System.Exception)
V_7 = ((Exception_t *)__exception_local);
ReceiveRecordAsyncResult_t3680907657 * L_54 = V_0;
Exception_t * L_55 = V_7;
ReceiveRecordAsyncResult_SetComplete_m1568733499(L_54, L_55, /*hidden argument*/NULL);
goto IL_0180;
} // end catch (depth: 1)
IL_0180:
{
return;
}
}
// System.Byte[] Mono.Security.Protocol.Tls.RecordProtocol::EndReceiveRecord(System.IAsyncResult)
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* RecordProtocol_EndReceiveRecord_m1872541318 (RecordProtocol_t3759049701 * __this, RuntimeObject* ___asyncResult0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (RecordProtocol_EndReceiveRecord_m1872541318_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
ReceiveRecordAsyncResult_t3680907657 * V_0 = NULL;
ByteU5BU5D_t4116647657* V_1 = NULL;
{
RuntimeObject* L_0 = ___asyncResult0;
V_0 = ((ReceiveRecordAsyncResult_t3680907657 *)IsInstClass((RuntimeObject*)L_0, ReceiveRecordAsyncResult_t3680907657_il2cpp_TypeInfo_var));
ReceiveRecordAsyncResult_t3680907657 * L_1 = V_0;
if (L_1)
{
goto IL_0018;
}
}
{
ArgumentException_t132251570 * L_2 = (ArgumentException_t132251570 *)il2cpp_codegen_object_new(ArgumentException_t132251570_il2cpp_TypeInfo_var);
ArgumentException__ctor_m1312628991(L_2, _stringLiteral1889458120, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_2, NULL, RecordProtocol_EndReceiveRecord_m1872541318_RuntimeMethod_var);
}
IL_0018:
{
ReceiveRecordAsyncResult_t3680907657 * L_3 = V_0;
bool L_4 = ReceiveRecordAsyncResult_get_IsCompleted_m1918259948(L_3, /*hidden argument*/NULL);
if (L_4)
{
goto IL_002f;
}
}
{
ReceiveRecordAsyncResult_t3680907657 * L_5 = V_0;
WaitHandle_t1743403487 * L_6 = ReceiveRecordAsyncResult_get_AsyncWaitHandle_m1781023438(L_5, /*hidden argument*/NULL);
VirtFuncInvoker0< bool >::Invoke(10 /* System.Boolean System.Threading.WaitHandle::WaitOne() */, L_6);
}
IL_002f:
{
ReceiveRecordAsyncResult_t3680907657 * L_7 = V_0;
bool L_8 = ReceiveRecordAsyncResult_get_CompletedWithError_m2856009536(L_7, /*hidden argument*/NULL);
if (!L_8)
{
goto IL_0041;
}
}
{
ReceiveRecordAsyncResult_t3680907657 * L_9 = V_0;
Exception_t * L_10 = ReceiveRecordAsyncResult_get_AsyncException_m631453737(L_9, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_10, NULL, RecordProtocol_EndReceiveRecord_m1872541318_RuntimeMethod_var);
}
IL_0041:
{
ReceiveRecordAsyncResult_t3680907657 * L_11 = V_0;
ByteU5BU5D_t4116647657* L_12 = ReceiveRecordAsyncResult_get_ResultingBuffer_m1839161335(L_11, /*hidden argument*/NULL);
V_1 = L_12;
IL2CPP_RUNTIME_CLASS_INIT(RecordProtocol_t3759049701_il2cpp_TypeInfo_var);
ManualResetEvent_t451242010 * L_13 = ((RecordProtocol_t3759049701_StaticFields*)il2cpp_codegen_static_fields_for(RecordProtocol_t3759049701_il2cpp_TypeInfo_var))->get_record_processing_0();
EventWaitHandle_Set_m2445193251(L_13, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_14 = V_1;
return L_14;
}
}
// System.Byte[] Mono.Security.Protocol.Tls.RecordProtocol::ReceiveRecord(System.IO.Stream)
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* RecordProtocol_ReceiveRecord_m3797641756 (RecordProtocol_t3759049701 * __this, Stream_t1273022909 * ___record0, const RuntimeMethod* method)
{
RuntimeObject* V_0 = NULL;
{
Stream_t1273022909 * L_0 = ___record0;
RuntimeObject* L_1 = RecordProtocol_BeginReceiveRecord_m295321170(__this, L_0, (AsyncCallback_t3962456242 *)NULL, NULL, /*hidden argument*/NULL);
V_0 = L_1;
RuntimeObject* L_2 = V_0;
ByteU5BU5D_t4116647657* L_3 = RecordProtocol_EndReceiveRecord_m1872541318(__this, L_2, /*hidden argument*/NULL);
return L_3;
}
}
// System.Byte[] Mono.Security.Protocol.Tls.RecordProtocol::ReadRecordBuffer(System.Int32,System.IO.Stream)
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* RecordProtocol_ReadRecordBuffer_m180543381 (RecordProtocol_t3759049701 * __this, int32_t ___contentType0, Stream_t1273022909 * ___record1, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (RecordProtocol_ReadRecordBuffer_m180543381_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
int32_t V_0 = 0;
{
int32_t L_0 = ___contentType0;
V_0 = L_0;
int32_t L_1 = V_0;
if ((((int32_t)L_1) == ((int32_t)((int32_t)128))))
{
goto IL_0012;
}
}
{
goto IL_001a;
}
IL_0012:
{
Stream_t1273022909 * L_2 = ___record1;
ByteU5BU5D_t4116647657* L_3 = RecordProtocol_ReadClientHelloV2_m4052496367(__this, L_2, /*hidden argument*/NULL);
return L_3;
}
IL_001a:
{
RuntimeTypeHandle_t3027515415 L_4 = { reinterpret_cast<intptr_t> (ContentType_t2602934270_0_0_0_var) };
IL2CPP_RUNTIME_CLASS_INIT(Type_t_il2cpp_TypeInfo_var);
Type_t * L_5 = Type_GetTypeFromHandle_m1620074514(NULL /*static, unused*/, L_4, /*hidden argument*/NULL);
int32_t L_6 = ___contentType0;
uint8_t L_7 = ((uint8_t)(((int32_t)((uint8_t)L_6))));
RuntimeObject * L_8 = Box(ContentType_t2602934270_il2cpp_TypeInfo_var, &L_7);
IL2CPP_RUNTIME_CLASS_INIT(Enum_t4135868527_il2cpp_TypeInfo_var);
bool L_9 = Enum_IsDefined_m1442314461(NULL /*static, unused*/, L_5, L_8, /*hidden argument*/NULL);
if (L_9)
{
goto IL_003d;
}
}
{
TlsException_t3534743363 * L_10 = (TlsException_t3534743363 *)il2cpp_codegen_object_new(TlsException_t3534743363_il2cpp_TypeInfo_var);
TlsException__ctor_m818940807(L_10, ((int32_t)50), /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_10, NULL, RecordProtocol_ReadRecordBuffer_m180543381_RuntimeMethod_var);
}
IL_003d:
{
Stream_t1273022909 * L_11 = ___record1;
ByteU5BU5D_t4116647657* L_12 = RecordProtocol_ReadStandardRecordBuffer_m3738063864(__this, L_11, /*hidden argument*/NULL);
return L_12;
}
}
// System.Byte[] Mono.Security.Protocol.Tls.RecordProtocol::ReadClientHelloV2(System.IO.Stream)
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* RecordProtocol_ReadClientHelloV2_m4052496367 (RecordProtocol_t3759049701 * __this, Stream_t1273022909 * ___record0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (RecordProtocol_ReadClientHelloV2_m4052496367_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
int32_t V_0 = 0;
ByteU5BU5D_t4116647657* V_1 = NULL;
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;
ByteU5BU5D_t4116647657* V_8 = NULL;
ByteU5BU5D_t4116647657* V_9 = NULL;
ByteU5BU5D_t4116647657* V_10 = NULL;
int32_t G_B8_0 = 0;
{
Stream_t1273022909 * L_0 = ___record0;
int32_t L_1 = VirtFuncInvoker0< int32_t >::Invoke(15 /* System.Int32 System.IO.Stream::ReadByte() */, L_0);
V_0 = L_1;
Stream_t1273022909 * L_2 = ___record0;
bool L_3 = VirtFuncInvoker0< bool >::Invoke(6 /* System.Boolean System.IO.Stream::get_CanSeek() */, L_2);
if (!L_3)
{
goto IL_0023;
}
}
{
int32_t L_4 = V_0;
Stream_t1273022909 * L_5 = ___record0;
int64_t L_6 = VirtFuncInvoker0< int64_t >::Invoke(8 /* System.Int64 System.IO.Stream::get_Length() */, L_5);
if ((((int64_t)(((int64_t)((int64_t)((int32_t)il2cpp_codegen_add((int32_t)L_4, (int32_t)1)))))) <= ((int64_t)L_6)))
{
goto IL_0023;
}
}
{
return (ByteU5BU5D_t4116647657*)NULL;
}
IL_0023:
{
int32_t L_7 = V_0;
ByteU5BU5D_t4116647657* L_8 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)L_7);
V_1 = L_8;
Stream_t1273022909 * L_9 = ___record0;
ByteU5BU5D_t4116647657* L_10 = V_1;
int32_t L_11 = V_0;
VirtFuncInvoker3< int32_t, ByteU5BU5D_t4116647657*, int32_t, int32_t >::Invoke(14 /* System.Int32 System.IO.Stream::Read(System.Byte[],System.Int32,System.Int32) */, L_9, L_10, 0, L_11);
ByteU5BU5D_t4116647657* L_12 = V_1;
int32_t L_13 = 0;
uint8_t L_14 = (L_12)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_13));
V_2 = L_14;
int32_t L_15 = V_2;
if ((((int32_t)L_15) == ((int32_t)1)))
{
goto IL_0047;
}
}
{
TlsException_t3534743363 * L_16 = (TlsException_t3534743363 *)il2cpp_codegen_object_new(TlsException_t3534743363_il2cpp_TypeInfo_var);
TlsException__ctor_m818940807(L_16, ((int32_t)50), /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_16, NULL, RecordProtocol_ReadClientHelloV2_m4052496367_RuntimeMethod_var);
}
IL_0047:
{
ByteU5BU5D_t4116647657* L_17 = V_1;
int32_t L_18 = 1;
uint8_t L_19 = (L_17)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_18));
ByteU5BU5D_t4116647657* L_20 = V_1;
int32_t L_21 = 2;
uint8_t L_22 = (L_20)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_21));
V_3 = ((int32_t)((int32_t)((int32_t)((int32_t)L_19<<(int32_t)8))|(int32_t)L_22));
ByteU5BU5D_t4116647657* L_23 = V_1;
int32_t L_24 = 3;
uint8_t L_25 = (L_23)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_24));
ByteU5BU5D_t4116647657* L_26 = V_1;
int32_t L_27 = 4;
uint8_t L_28 = (L_26)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_27));
V_4 = ((int32_t)((int32_t)((int32_t)((int32_t)L_25<<(int32_t)8))|(int32_t)L_28));
ByteU5BU5D_t4116647657* L_29 = V_1;
int32_t L_30 = 5;
uint8_t L_31 = (L_29)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_30));
ByteU5BU5D_t4116647657* L_32 = V_1;
int32_t L_33 = 6;
uint8_t L_34 = (L_32)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_33));
V_5 = ((int32_t)((int32_t)((int32_t)((int32_t)L_31<<(int32_t)8))|(int32_t)L_34));
ByteU5BU5D_t4116647657* L_35 = V_1;
int32_t L_36 = 7;
uint8_t L_37 = (L_35)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_36));
ByteU5BU5D_t4116647657* L_38 = V_1;
int32_t L_39 = 8;
uint8_t L_40 = (L_38)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_39));
V_6 = ((int32_t)((int32_t)((int32_t)((int32_t)L_37<<(int32_t)8))|(int32_t)L_40));
int32_t L_41 = V_6;
if ((((int32_t)L_41) <= ((int32_t)((int32_t)32))))
{
goto IL_0082;
}
}
{
G_B8_0 = ((int32_t)32);
goto IL_0084;
}
IL_0082:
{
int32_t L_42 = V_6;
G_B8_0 = L_42;
}
IL_0084:
{
V_7 = G_B8_0;
int32_t L_43 = V_4;
ByteU5BU5D_t4116647657* L_44 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)L_43);
V_8 = L_44;
ByteU5BU5D_t4116647657* L_45 = V_1;
ByteU5BU5D_t4116647657* L_46 = V_8;
int32_t L_47 = V_4;
Buffer_BlockCopy_m2884209081(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_45, ((int32_t)9), (RuntimeArray *)(RuntimeArray *)L_46, 0, L_47, /*hidden argument*/NULL);
int32_t L_48 = V_5;
ByteU5BU5D_t4116647657* L_49 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)L_48);
V_9 = L_49;
ByteU5BU5D_t4116647657* L_50 = V_1;
int32_t L_51 = V_4;
ByteU5BU5D_t4116647657* L_52 = V_9;
int32_t L_53 = V_5;
Buffer_BlockCopy_m2884209081(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_50, ((int32_t)il2cpp_codegen_add((int32_t)((int32_t)9), (int32_t)L_51)), (RuntimeArray *)(RuntimeArray *)L_52, 0, L_53, /*hidden argument*/NULL);
int32_t L_54 = V_6;
ByteU5BU5D_t4116647657* L_55 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)L_54);
V_10 = L_55;
ByteU5BU5D_t4116647657* L_56 = V_1;
int32_t L_57 = V_4;
int32_t L_58 = V_5;
ByteU5BU5D_t4116647657* L_59 = V_10;
int32_t L_60 = V_6;
Buffer_BlockCopy_m2884209081(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_56, ((int32_t)il2cpp_codegen_add((int32_t)((int32_t)il2cpp_codegen_add((int32_t)((int32_t)9), (int32_t)L_57)), (int32_t)L_58)), (RuntimeArray *)(RuntimeArray *)L_59, 0, L_60, /*hidden argument*/NULL);
int32_t L_61 = V_6;
if ((((int32_t)L_61) < ((int32_t)((int32_t)16))))
{
goto IL_00ea;
}
}
{
int32_t L_62 = V_4;
if (!L_62)
{
goto IL_00ea;
}
}
{
int32_t L_63 = V_4;
if (!((int32_t)((int32_t)L_63%(int32_t)3)))
{
goto IL_00f2;
}
}
IL_00ea:
{
TlsException_t3534743363 * L_64 = (TlsException_t3534743363 *)il2cpp_codegen_object_new(TlsException_t3534743363_il2cpp_TypeInfo_var);
TlsException__ctor_m818940807(L_64, ((int32_t)50), /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_64, NULL, RecordProtocol_ReadClientHelloV2_m4052496367_RuntimeMethod_var);
}
IL_00f2:
{
ByteU5BU5D_t4116647657* L_65 = V_9;
if ((((int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_65)->max_length))))) <= ((int32_t)0)))
{
goto IL_0109;
}
}
{
Context_t3971234707 * L_66 = __this->get_context_2();
ByteU5BU5D_t4116647657* L_67 = V_9;
Context_set_SessionId_m942328427(L_66, L_67, /*hidden argument*/NULL);
}
IL_0109:
{
Context_t3971234707 * L_68 = RecordProtocol_get_Context_m3273611300(__this, /*hidden argument*/NULL);
int32_t L_69 = V_3;
Context_ChangeProtocol_m2412635871(L_68, (((int16_t)((int16_t)L_69))), /*hidden argument*/NULL);
Context_t3971234707 * L_70 = RecordProtocol_get_Context_m3273611300(__this, /*hidden argument*/NULL);
int32_t L_71 = Context_get_SecurityProtocol_m3228286292(L_70, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_72 = V_8;
RecordProtocol_ProcessCipherSpecV2Buffer_m487045483(__this, L_71, L_72, /*hidden argument*/NULL);
Context_t3971234707 * L_73 = __this->get_context_2();
ByteU5BU5D_t4116647657* L_74 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)((int32_t)32));
Context_set_ClientRandom_m2974454575(L_73, L_74, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_75 = V_10;
ByteU5BU5D_t4116647657* L_76 = V_10;
int32_t L_77 = V_7;
Context_t3971234707 * L_78 = __this->get_context_2();
ByteU5BU5D_t4116647657* L_79 = Context_get_ClientRandom_m1437588520(L_78, /*hidden argument*/NULL);
int32_t L_80 = V_7;
int32_t L_81 = V_7;
Buffer_BlockCopy_m2884209081(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_75, ((int32_t)il2cpp_codegen_subtract((int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_76)->max_length)))), (int32_t)L_77)), (RuntimeArray *)(RuntimeArray *)L_79, ((int32_t)il2cpp_codegen_subtract((int32_t)((int32_t)32), (int32_t)L_80)), L_81, /*hidden argument*/NULL);
Context_t3971234707 * L_82 = __this->get_context_2();
Context_set_LastHandshakeMsg_m1770618067(L_82, 1, /*hidden argument*/NULL);
Context_t3971234707 * L_83 = __this->get_context_2();
Context_set_ProtocolNegotiated_m2904861662(L_83, (bool)1, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_84 = V_1;
return L_84;
}
}
// System.Byte[] Mono.Security.Protocol.Tls.RecordProtocol::ReadStandardRecordBuffer(System.IO.Stream)
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* RecordProtocol_ReadStandardRecordBuffer_m3738063864 (RecordProtocol_t3759049701 * __this, Stream_t1273022909 * ___record0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (RecordProtocol_ReadStandardRecordBuffer_m3738063864_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
ByteU5BU5D_t4116647657* V_0 = NULL;
int16_t V_1 = 0;
int16_t V_2 = 0;
int32_t V_3 = 0;
ByteU5BU5D_t4116647657* V_4 = NULL;
int32_t V_5 = 0;
{
ByteU5BU5D_t4116647657* L_0 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)4);
V_0 = L_0;
Stream_t1273022909 * L_1 = ___record0;
ByteU5BU5D_t4116647657* L_2 = V_0;
int32_t L_3 = VirtFuncInvoker3< int32_t, ByteU5BU5D_t4116647657*, int32_t, int32_t >::Invoke(14 /* System.Int32 System.IO.Stream::Read(System.Byte[],System.Int32,System.Int32) */, L_1, L_2, 0, 4);
if ((((int32_t)L_3) == ((int32_t)4)))
{
goto IL_0021;
}
}
{
TlsException_t3534743363 * L_4 = (TlsException_t3534743363 *)il2cpp_codegen_object_new(TlsException_t3534743363_il2cpp_TypeInfo_var);
TlsException__ctor_m3652817735(L_4, _stringLiteral2898472053, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_4, NULL, RecordProtocol_ReadStandardRecordBuffer_m3738063864_RuntimeMethod_var);
}
IL_0021:
{
ByteU5BU5D_t4116647657* L_5 = V_0;
int32_t L_6 = 0;
uint8_t L_7 = (L_5)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_6));
ByteU5BU5D_t4116647657* L_8 = V_0;
int32_t L_9 = 1;
uint8_t L_10 = (L_8)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_9));
V_1 = (((int16_t)((int16_t)((int32_t)((int32_t)((int32_t)((int32_t)L_7<<(int32_t)8))|(int32_t)L_10)))));
ByteU5BU5D_t4116647657* L_11 = V_0;
int32_t L_12 = 2;
uint8_t L_13 = (L_11)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_12));
ByteU5BU5D_t4116647657* L_14 = V_0;
int32_t L_15 = 3;
uint8_t L_16 = (L_14)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_15));
V_2 = (((int16_t)((int16_t)((int32_t)((int32_t)((int32_t)((int32_t)L_13<<(int32_t)8))|(int32_t)L_16)))));
Stream_t1273022909 * L_17 = ___record0;
bool L_18 = VirtFuncInvoker0< bool >::Invoke(6 /* System.Boolean System.IO.Stream::get_CanSeek() */, L_17);
if (!L_18)
{
goto IL_0053;
}
}
{
int16_t L_19 = V_2;
Stream_t1273022909 * L_20 = ___record0;
int64_t L_21 = VirtFuncInvoker0< int64_t >::Invoke(8 /* System.Int64 System.IO.Stream::get_Length() */, L_20);
if ((((int64_t)(((int64_t)((int64_t)((int32_t)il2cpp_codegen_add((int32_t)L_19, (int32_t)5)))))) <= ((int64_t)L_21)))
{
goto IL_0053;
}
}
{
return (ByteU5BU5D_t4116647657*)NULL;
}
IL_0053:
{
V_3 = 0;
int16_t L_22 = V_2;
ByteU5BU5D_t4116647657* L_23 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)L_22);
V_4 = L_23;
goto IL_008b;
}
IL_0062:
{
Stream_t1273022909 * L_24 = ___record0;
ByteU5BU5D_t4116647657* L_25 = V_4;
int32_t L_26 = V_3;
ByteU5BU5D_t4116647657* L_27 = V_4;
int32_t L_28 = V_3;
int32_t L_29 = VirtFuncInvoker3< int32_t, ByteU5BU5D_t4116647657*, int32_t, int32_t >::Invoke(14 /* System.Int32 System.IO.Stream::Read(System.Byte[],System.Int32,System.Int32) */, L_24, L_25, L_26, ((int32_t)il2cpp_codegen_subtract((int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_27)->max_length)))), (int32_t)L_28)));
V_5 = L_29;
int32_t L_30 = V_5;
if (L_30)
{
goto IL_0086;
}
}
{
TlsException_t3534743363 * L_31 = (TlsException_t3534743363 *)il2cpp_codegen_object_new(TlsException_t3534743363_il2cpp_TypeInfo_var);
TlsException__ctor_m3242533711(L_31, 0, _stringLiteral951479879, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_31, NULL, RecordProtocol_ReadStandardRecordBuffer_m3738063864_RuntimeMethod_var);
}
IL_0086:
{
int32_t L_32 = V_3;
int32_t L_33 = V_5;
V_3 = ((int32_t)il2cpp_codegen_add((int32_t)L_32, (int32_t)L_33));
}
IL_008b:
{
int32_t L_34 = V_3;
int16_t L_35 = V_2;
if ((!(((uint32_t)L_34) == ((uint32_t)L_35))))
{
goto IL_0062;
}
}
{
int16_t L_36 = V_1;
Context_t3971234707 * L_37 = __this->get_context_2();
int16_t L_38 = Context_get_Protocol_m1078422015(L_37, /*hidden argument*/NULL);
if ((((int32_t)L_36) == ((int32_t)L_38)))
{
goto IL_00c0;
}
}
{
Context_t3971234707 * L_39 = __this->get_context_2();
bool L_40 = Context_get_ProtocolNegotiated_m4220412840(L_39, /*hidden argument*/NULL);
if (!L_40)
{
goto IL_00c0;
}
}
{
TlsException_t3534743363 * L_41 = (TlsException_t3534743363 *)il2cpp_codegen_object_new(TlsException_t3534743363_il2cpp_TypeInfo_var);
TlsException__ctor_m3242533711(L_41, ((int32_t)70), _stringLiteral3786540042, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_41, NULL, RecordProtocol_ReadStandardRecordBuffer_m3738063864_RuntimeMethod_var);
}
IL_00c0:
{
ByteU5BU5D_t4116647657* L_42 = V_4;
return L_42;
}
}
// System.Void Mono.Security.Protocol.Tls.RecordProtocol::ProcessAlert(Mono.Security.Protocol.Tls.AlertLevel,Mono.Security.Protocol.Tls.AlertDescription)
extern "C" IL2CPP_METHOD_ATTR void RecordProtocol_ProcessAlert_m1036912531 (RecordProtocol_t3759049701 * __this, uint8_t ___alertLevel0, uint8_t ___alertDesc1, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (RecordProtocol_ProcessAlert_m1036912531_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
uint8_t V_0 = 0;
uint8_t V_1 = 0;
{
uint8_t L_0 = ___alertLevel0;
V_0 = L_0;
uint8_t L_1 = V_0;
if ((((int32_t)L_1) == ((int32_t)1)))
{
goto IL_001d;
}
}
{
uint8_t L_2 = V_0;
if ((((int32_t)L_2) == ((int32_t)2)))
{
goto IL_0015;
}
}
{
goto IL_001d;
}
IL_0015:
{
uint8_t L_3 = ___alertLevel0;
uint8_t L_4 = ___alertDesc1;
TlsException_t3534743363 * L_5 = (TlsException_t3534743363 *)il2cpp_codegen_object_new(TlsException_t3534743363_il2cpp_TypeInfo_var);
TlsException__ctor_m596254082(L_5, L_3, L_4, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_5, NULL, RecordProtocol_ProcessAlert_m1036912531_RuntimeMethod_var);
}
IL_001d:
{
uint8_t L_6 = ___alertDesc1;
V_1 = L_6;
uint8_t L_7 = V_1;
if ((((int32_t)L_7) == ((int32_t)0)))
{
goto IL_002b;
}
}
{
goto IL_003c;
}
IL_002b:
{
Context_t3971234707 * L_8 = __this->get_context_2();
Context_set_ReceivedConnectionEnd_m911334662(L_8, (bool)1, /*hidden argument*/NULL);
goto IL_003c;
}
IL_003c:
{
goto IL_0041;
}
IL_0041:
{
return;
}
}
// System.Void Mono.Security.Protocol.Tls.RecordProtocol::SendAlert(Mono.Security.Protocol.Tls.AlertDescription)
extern "C" IL2CPP_METHOD_ATTR void RecordProtocol_SendAlert_m1931708341 (RecordProtocol_t3759049701 * __this, uint8_t ___description0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (RecordProtocol_SendAlert_m1931708341_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
uint8_t L_0 = ___description0;
Alert_t4059934885 * L_1 = (Alert_t4059934885 *)il2cpp_codegen_object_new(Alert_t4059934885_il2cpp_TypeInfo_var);
Alert__ctor_m3135936936(L_1, L_0, /*hidden argument*/NULL);
RecordProtocol_SendAlert_m3736432480(__this, L_1, /*hidden argument*/NULL);
return;
}
}
// System.Void Mono.Security.Protocol.Tls.RecordProtocol::SendAlert(Mono.Security.Protocol.Tls.AlertLevel,Mono.Security.Protocol.Tls.AlertDescription)
extern "C" IL2CPP_METHOD_ATTR void RecordProtocol_SendAlert_m2670098001 (RecordProtocol_t3759049701 * __this, uint8_t ___level0, uint8_t ___description1, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (RecordProtocol_SendAlert_m2670098001_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
uint8_t L_0 = ___level0;
uint8_t L_1 = ___description1;
Alert_t4059934885 * L_2 = (Alert_t4059934885 *)il2cpp_codegen_object_new(Alert_t4059934885_il2cpp_TypeInfo_var);
Alert__ctor_m2879739792(L_2, L_0, L_1, /*hidden argument*/NULL);
RecordProtocol_SendAlert_m3736432480(__this, L_2, /*hidden argument*/NULL);
return;
}
}
// System.Void Mono.Security.Protocol.Tls.RecordProtocol::SendAlert(Mono.Security.Protocol.Tls.Alert)
extern "C" IL2CPP_METHOD_ATTR void RecordProtocol_SendAlert_m3736432480 (RecordProtocol_t3759049701 * __this, Alert_t4059934885 * ___alert0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (RecordProtocol_SendAlert_m3736432480_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
uint8_t V_0 = 0;
uint8_t V_1 = 0;
bool V_2 = false;
{
Alert_t4059934885 * L_0 = ___alert0;
if (L_0)
{
goto IL_0012;
}
}
{
V_0 = 2;
V_1 = ((int32_t)80);
V_2 = (bool)1;
goto IL_0027;
}
IL_0012:
{
Alert_t4059934885 * L_1 = ___alert0;
uint8_t L_2 = Alert_get_Level_m4249630350(L_1, /*hidden argument*/NULL);
V_0 = L_2;
Alert_t4059934885 * L_3 = ___alert0;
uint8_t L_4 = Alert_get_Description_m3833114036(L_3, /*hidden argument*/NULL);
V_1 = L_4;
Alert_t4059934885 * L_5 = ___alert0;
bool L_6 = Alert_get_IsCloseNotify_m3157384796(L_5, /*hidden argument*/NULL);
V_2 = L_6;
}
IL_0027:
{
ByteU5BU5D_t4116647657* L_7 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)2);
ByteU5BU5D_t4116647657* L_8 = L_7;
uint8_t L_9 = V_0;
(L_8)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(0), (uint8_t)L_9);
ByteU5BU5D_t4116647657* L_10 = L_8;
uint8_t L_11 = V_1;
(L_10)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(1), (uint8_t)L_11);
RecordProtocol_SendRecord_m927045752(__this, ((int32_t)21), L_10, /*hidden argument*/NULL);
bool L_12 = V_2;
if (!L_12)
{
goto IL_004f;
}
}
{
Context_t3971234707 * L_13 = __this->get_context_2();
Context_set_SentConnectionEnd_m1367645582(L_13, (bool)1, /*hidden argument*/NULL);
}
IL_004f:
{
return;
}
}
// System.Void Mono.Security.Protocol.Tls.RecordProtocol::SendChangeCipherSpec()
extern "C" IL2CPP_METHOD_ATTR void RecordProtocol_SendChangeCipherSpec_m464005157 (RecordProtocol_t3759049701 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (RecordProtocol_SendChangeCipherSpec_m464005157_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
Context_t3971234707 * V_0 = NULL;
{
ByteU5BU5D_t4116647657* L_0 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)1);
ByteU5BU5D_t4116647657* L_1 = L_0;
(L_1)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(0), (uint8_t)1);
RecordProtocol_SendRecord_m927045752(__this, ((int32_t)20), L_1, /*hidden argument*/NULL);
Context_t3971234707 * L_2 = __this->get_context_2();
V_0 = L_2;
Context_t3971234707 * L_3 = V_0;
Context_set_WriteSequenceNumber_m942577065(L_3, (((int64_t)((int64_t)0))), /*hidden argument*/NULL);
Context_t3971234707 * L_4 = V_0;
if (!((ClientContext_t2797401965 *)IsInstClass((RuntimeObject*)L_4, ClientContext_t2797401965_il2cpp_TypeInfo_var)))
{
goto IL_0038;
}
}
{
Context_t3971234707 * L_5 = V_0;
Context_StartSwitchingSecurityParameters_m28285865(L_5, (bool)1, /*hidden argument*/NULL);
goto IL_003f;
}
IL_0038:
{
Context_t3971234707 * L_6 = V_0;
Context_EndSwitchingSecurityParameters_m4148956166(L_6, (bool)0, /*hidden argument*/NULL);
}
IL_003f:
{
return;
}
}
// System.IAsyncResult Mono.Security.Protocol.Tls.RecordProtocol::BeginSendRecord(Mono.Security.Protocol.Tls.Handshake.HandshakeType,System.AsyncCallback,System.Object)
extern "C" IL2CPP_METHOD_ATTR RuntimeObject* RecordProtocol_BeginSendRecord_m615249746 (RecordProtocol_t3759049701 * __this, uint8_t ___handshakeType0, AsyncCallback_t3962456242 * ___callback1, RuntimeObject * ___state2, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (RecordProtocol_BeginSendRecord_m615249746_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
HandshakeMessage_t3696583168 * V_0 = NULL;
SendRecordAsyncResult_t3718352467 * V_1 = NULL;
{
uint8_t L_0 = ___handshakeType0;
HandshakeMessage_t3696583168 * L_1 = VirtFuncInvoker1< HandshakeMessage_t3696583168 *, uint8_t >::Invoke(7 /* Mono.Security.Protocol.Tls.Handshake.HandshakeMessage Mono.Security.Protocol.Tls.RecordProtocol::GetMessage(Mono.Security.Protocol.Tls.Handshake.HandshakeType) */, __this, L_0);
V_0 = L_1;
HandshakeMessage_t3696583168 * L_2 = V_0;
HandshakeMessage_Process_m810828609(L_2, /*hidden argument*/NULL);
AsyncCallback_t3962456242 * L_3 = ___callback1;
RuntimeObject * L_4 = ___state2;
HandshakeMessage_t3696583168 * L_5 = V_0;
SendRecordAsyncResult_t3718352467 * L_6 = (SendRecordAsyncResult_t3718352467 *)il2cpp_codegen_object_new(SendRecordAsyncResult_t3718352467_il2cpp_TypeInfo_var);
SendRecordAsyncResult__ctor_m425551707(L_6, L_3, L_4, L_5, /*hidden argument*/NULL);
V_1 = L_6;
HandshakeMessage_t3696583168 * L_7 = V_0;
uint8_t L_8 = HandshakeMessage_get_ContentType_m1693718190(L_7, /*hidden argument*/NULL);
HandshakeMessage_t3696583168 * L_9 = V_0;
ByteU5BU5D_t4116647657* L_10 = VirtFuncInvoker0< ByteU5BU5D_t4116647657* >::Invoke(27 /* System.Byte[] Mono.Security.Protocol.Tls.Handshake.HandshakeMessage::EncodeMessage() */, L_9);
intptr_t L_11 = (intptr_t)RecordProtocol_InternalSendRecordCallback_m682661965_RuntimeMethod_var;
AsyncCallback_t3962456242 * L_12 = (AsyncCallback_t3962456242 *)il2cpp_codegen_object_new(AsyncCallback_t3962456242_il2cpp_TypeInfo_var);
AsyncCallback__ctor_m530647953(L_12, __this, L_11, /*hidden argument*/NULL);
SendRecordAsyncResult_t3718352467 * L_13 = V_1;
RecordProtocol_BeginSendRecord_m3926976520(__this, L_8, L_10, L_12, L_13, /*hidden argument*/NULL);
SendRecordAsyncResult_t3718352467 * L_14 = V_1;
return L_14;
}
}
// System.Void Mono.Security.Protocol.Tls.RecordProtocol::InternalSendRecordCallback(System.IAsyncResult)
extern "C" IL2CPP_METHOD_ATTR void RecordProtocol_InternalSendRecordCallback_m682661965 (RecordProtocol_t3759049701 * __this, RuntimeObject* ___ar0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (RecordProtocol_InternalSendRecordCallback_m682661965_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
SendRecordAsyncResult_t3718352467 * V_0 = NULL;
Exception_t * V_1 = NULL;
Exception_t * __last_unhandled_exception = 0;
NO_UNUSED_WARNING (__last_unhandled_exception);
Exception_t * __exception_local = 0;
NO_UNUSED_WARNING (__exception_local);
int32_t __leave_target = -1;
NO_UNUSED_WARNING (__leave_target);
{
RuntimeObject* L_0 = ___ar0;
RuntimeObject * L_1 = InterfaceFuncInvoker0< RuntimeObject * >::Invoke(0 /* System.Object System.IAsyncResult::get_AsyncState() */, IAsyncResult_t767004451_il2cpp_TypeInfo_var, L_0);
V_0 = ((SendRecordAsyncResult_t3718352467 *)IsInstClass((RuntimeObject*)L_1, SendRecordAsyncResult_t3718352467_il2cpp_TypeInfo_var));
}
IL_000c:
try
{ // begin try (depth: 1)
RuntimeObject* L_2 = ___ar0;
RecordProtocol_EndSendRecord_m4264777321(__this, L_2, /*hidden argument*/NULL);
SendRecordAsyncResult_t3718352467 * L_3 = V_0;
HandshakeMessage_t3696583168 * L_4 = SendRecordAsyncResult_get_Message_m1204240861(L_3, /*hidden argument*/NULL);
VirtActionInvoker0::Invoke(26 /* System.Void Mono.Security.Protocol.Tls.Handshake.HandshakeMessage::Update() */, L_4);
SendRecordAsyncResult_t3718352467 * L_5 = V_0;
HandshakeMessage_t3696583168 * L_6 = SendRecordAsyncResult_get_Message_m1204240861(L_5, /*hidden argument*/NULL);
TlsStream_Reset_m369197964(L_6, /*hidden argument*/NULL);
SendRecordAsyncResult_t3718352467 * L_7 = V_0;
SendRecordAsyncResult_SetComplete_m170417386(L_7, /*hidden argument*/NULL);
goto IL_0041;
} // end try (depth: 1)
catch(Il2CppExceptionWrapper& e)
{
__exception_local = (Exception_t *)e.ex;
if(il2cpp_codegen_class_is_assignable_from (Exception_t_il2cpp_TypeInfo_var, il2cpp_codegen_object_class(e.ex)))
goto CATCH_0034;
throw e;
}
CATCH_0034:
{ // begin catch(System.Exception)
V_1 = ((Exception_t *)__exception_local);
SendRecordAsyncResult_t3718352467 * L_8 = V_0;
Exception_t * L_9 = V_1;
SendRecordAsyncResult_SetComplete_m153213906(L_8, L_9, /*hidden argument*/NULL);
goto IL_0041;
} // end catch (depth: 1)
IL_0041:
{
return;
}
}
// System.IAsyncResult Mono.Security.Protocol.Tls.RecordProtocol::BeginSendRecord(Mono.Security.Protocol.Tls.ContentType,System.Byte[],System.AsyncCallback,System.Object)
extern "C" IL2CPP_METHOD_ATTR RuntimeObject* RecordProtocol_BeginSendRecord_m3926976520 (RecordProtocol_t3759049701 * __this, uint8_t ___contentType0, ByteU5BU5D_t4116647657* ___recordData1, AsyncCallback_t3962456242 * ___callback2, RuntimeObject * ___state3, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (RecordProtocol_BeginSendRecord_m3926976520_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
ByteU5BU5D_t4116647657* V_0 = NULL;
{
Context_t3971234707 * L_0 = __this->get_context_2();
bool L_1 = Context_get_SentConnectionEnd_m963812869(L_0, /*hidden argument*/NULL);
if (!L_1)
{
goto IL_001d;
}
}
{
TlsException_t3534743363 * L_2 = (TlsException_t3534743363 *)il2cpp_codegen_object_new(TlsException_t3534743363_il2cpp_TypeInfo_var);
TlsException__ctor_m3242533711(L_2, ((int32_t)80), _stringLiteral1410188538, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_2, NULL, RecordProtocol_BeginSendRecord_m3926976520_RuntimeMethod_var);
}
IL_001d:
{
uint8_t L_3 = ___contentType0;
ByteU5BU5D_t4116647657* L_4 = ___recordData1;
ByteU5BU5D_t4116647657* L_5 = RecordProtocol_EncodeRecord_m164201598(__this, L_3, L_4, /*hidden argument*/NULL);
V_0 = L_5;
Stream_t1273022909 * L_6 = __this->get_innerStream_1();
ByteU5BU5D_t4116647657* L_7 = V_0;
ByteU5BU5D_t4116647657* L_8 = V_0;
AsyncCallback_t3962456242 * L_9 = ___callback2;
RuntimeObject * L_10 = ___state3;
RuntimeObject* L_11 = VirtFuncInvoker5< RuntimeObject*, ByteU5BU5D_t4116647657*, int32_t, int32_t, AsyncCallback_t3962456242 *, RuntimeObject * >::Invoke(21 /* System.IAsyncResult System.IO.Stream::BeginWrite(System.Byte[],System.Int32,System.Int32,System.AsyncCallback,System.Object) */, L_6, L_7, 0, (((int32_t)((int32_t)(((RuntimeArray *)L_8)->max_length)))), L_9, L_10);
return L_11;
}
}
// System.Void Mono.Security.Protocol.Tls.RecordProtocol::EndSendRecord(System.IAsyncResult)
extern "C" IL2CPP_METHOD_ATTR void RecordProtocol_EndSendRecord_m4264777321 (RecordProtocol_t3759049701 * __this, RuntimeObject* ___asyncResult0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (RecordProtocol_EndSendRecord_m4264777321_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
SendRecordAsyncResult_t3718352467 * V_0 = NULL;
{
RuntimeObject* L_0 = ___asyncResult0;
if (!((SendRecordAsyncResult_t3718352467 *)IsInstClass((RuntimeObject*)L_0, SendRecordAsyncResult_t3718352467_il2cpp_TypeInfo_var)))
{
goto IL_0040;
}
}
{
RuntimeObject* L_1 = ___asyncResult0;
V_0 = ((SendRecordAsyncResult_t3718352467 *)IsInstClass((RuntimeObject*)L_1, SendRecordAsyncResult_t3718352467_il2cpp_TypeInfo_var));
SendRecordAsyncResult_t3718352467 * L_2 = V_0;
bool L_3 = SendRecordAsyncResult_get_IsCompleted_m3929307031(L_2, /*hidden argument*/NULL);
if (L_3)
{
goto IL_0029;
}
}
{
SendRecordAsyncResult_t3718352467 * L_4 = V_0;
WaitHandle_t1743403487 * L_5 = SendRecordAsyncResult_get_AsyncWaitHandle_m1466641472(L_4, /*hidden argument*/NULL);
VirtFuncInvoker0< bool >::Invoke(10 /* System.Boolean System.Threading.WaitHandle::WaitOne() */, L_5);
}
IL_0029:
{
SendRecordAsyncResult_t3718352467 * L_6 = V_0;
bool L_7 = SendRecordAsyncResult_get_CompletedWithError_m3232037803(L_6, /*hidden argument*/NULL);
if (!L_7)
{
goto IL_003b;
}
}
{
SendRecordAsyncResult_t3718352467 * L_8 = V_0;
Exception_t * L_9 = SendRecordAsyncResult_get_AsyncException_m3556917569(L_8, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_9, NULL, RecordProtocol_EndSendRecord_m4264777321_RuntimeMethod_var);
}
IL_003b:
{
goto IL_004c;
}
IL_0040:
{
Stream_t1273022909 * L_10 = __this->get_innerStream_1();
RuntimeObject* L_11 = ___asyncResult0;
VirtActionInvoker1< RuntimeObject* >::Invoke(23 /* System.Void System.IO.Stream::EndWrite(System.IAsyncResult) */, L_10, L_11);
}
IL_004c:
{
return;
}
}
// System.Void Mono.Security.Protocol.Tls.RecordProtocol::SendRecord(Mono.Security.Protocol.Tls.ContentType,System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void RecordProtocol_SendRecord_m927045752 (RecordProtocol_t3759049701 * __this, uint8_t ___contentType0, ByteU5BU5D_t4116647657* ___recordData1, const RuntimeMethod* method)
{
RuntimeObject* V_0 = NULL;
{
uint8_t L_0 = ___contentType0;
ByteU5BU5D_t4116647657* L_1 = ___recordData1;
RuntimeObject* L_2 = RecordProtocol_BeginSendRecord_m3926976520(__this, L_0, L_1, (AsyncCallback_t3962456242 *)NULL, NULL, /*hidden argument*/NULL);
V_0 = L_2;
RuntimeObject* L_3 = V_0;
RecordProtocol_EndSendRecord_m4264777321(__this, L_3, /*hidden argument*/NULL);
return;
}
}
// System.Byte[] Mono.Security.Protocol.Tls.RecordProtocol::EncodeRecord(Mono.Security.Protocol.Tls.ContentType,System.Byte[])
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* RecordProtocol_EncodeRecord_m164201598 (RecordProtocol_t3759049701 * __this, uint8_t ___contentType0, ByteU5BU5D_t4116647657* ___recordData1, const RuntimeMethod* method)
{
{
uint8_t L_0 = ___contentType0;
ByteU5BU5D_t4116647657* L_1 = ___recordData1;
ByteU5BU5D_t4116647657* L_2 = ___recordData1;
ByteU5BU5D_t4116647657* L_3 = RecordProtocol_EncodeRecord_m3312835762(__this, L_0, L_1, 0, (((int32_t)((int32_t)(((RuntimeArray *)L_2)->max_length)))), /*hidden argument*/NULL);
return L_3;
}
}
// System.Byte[] Mono.Security.Protocol.Tls.RecordProtocol::EncodeRecord(Mono.Security.Protocol.Tls.ContentType,System.Byte[],System.Int32,System.Int32)
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* RecordProtocol_EncodeRecord_m3312835762 (RecordProtocol_t3759049701 * __this, uint8_t ___contentType0, ByteU5BU5D_t4116647657* ___recordData1, int32_t ___offset2, int32_t ___count3, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (RecordProtocol_EncodeRecord_m3312835762_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
TlsStream_t2365453965 * V_0 = NULL;
int32_t V_1 = 0;
int16_t V_2 = 0;
ByteU5BU5D_t4116647657* V_3 = NULL;
{
Context_t3971234707 * L_0 = __this->get_context_2();
bool L_1 = Context_get_SentConnectionEnd_m963812869(L_0, /*hidden argument*/NULL);
if (!L_1)
{
goto IL_001d;
}
}
{
TlsException_t3534743363 * L_2 = (TlsException_t3534743363 *)il2cpp_codegen_object_new(TlsException_t3534743363_il2cpp_TypeInfo_var);
TlsException__ctor_m3242533711(L_2, ((int32_t)80), _stringLiteral1410188538, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_2, NULL, RecordProtocol_EncodeRecord_m3312835762_RuntimeMethod_var);
}
IL_001d:
{
TlsStream_t2365453965 * L_3 = (TlsStream_t2365453965 *)il2cpp_codegen_object_new(TlsStream_t2365453965_il2cpp_TypeInfo_var);
TlsStream__ctor_m787793111(L_3, /*hidden argument*/NULL);
V_0 = L_3;
int32_t L_4 = ___offset2;
V_1 = L_4;
goto IL_00bb;
}
IL_002a:
{
V_2 = (int16_t)0;
int32_t L_5 = ___count3;
int32_t L_6 = ___offset2;
int32_t L_7 = V_1;
if ((((int32_t)((int32_t)il2cpp_codegen_subtract((int32_t)((int32_t)il2cpp_codegen_add((int32_t)L_5, (int32_t)L_6)), (int32_t)L_7))) <= ((int32_t)((int32_t)16384))))
{
goto IL_0047;
}
}
{
V_2 = (int16_t)((int32_t)16384);
goto IL_004f;
}
IL_0047:
{
int32_t L_8 = ___count3;
int32_t L_9 = ___offset2;
int32_t L_10 = V_1;
V_2 = (((int16_t)((int16_t)((int32_t)il2cpp_codegen_subtract((int32_t)((int32_t)il2cpp_codegen_add((int32_t)L_8, (int32_t)L_9)), (int32_t)L_10)))));
}
IL_004f:
{
int16_t L_11 = V_2;
ByteU5BU5D_t4116647657* L_12 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)L_11);
V_3 = L_12;
ByteU5BU5D_t4116647657* L_13 = ___recordData1;
int32_t L_14 = V_1;
ByteU5BU5D_t4116647657* L_15 = V_3;
int16_t L_16 = V_2;
Buffer_BlockCopy_m2884209081(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_13, L_14, (RuntimeArray *)(RuntimeArray *)L_15, 0, L_16, /*hidden argument*/NULL);
Context_t3971234707 * L_17 = RecordProtocol_get_Context_m3273611300(__this, /*hidden argument*/NULL);
SecurityParameters_t2199972650 * L_18 = Context_get_Write_m1564343513(L_17, /*hidden argument*/NULL);
if (!L_18)
{
goto IL_008e;
}
}
{
Context_t3971234707 * L_19 = RecordProtocol_get_Context_m3273611300(__this, /*hidden argument*/NULL);
SecurityParameters_t2199972650 * L_20 = Context_get_Write_m1564343513(L_19, /*hidden argument*/NULL);
CipherSuite_t3414744575 * L_21 = SecurityParameters_get_Cipher_m108846204(L_20, /*hidden argument*/NULL);
if (!L_21)
{
goto IL_008e;
}
}
{
uint8_t L_22 = ___contentType0;
ByteU5BU5D_t4116647657* L_23 = V_3;
ByteU5BU5D_t4116647657* L_24 = RecordProtocol_encryptRecordFragment_m710101985(__this, L_22, L_23, /*hidden argument*/NULL);
V_3 = L_24;
}
IL_008e:
{
TlsStream_t2365453965 * L_25 = V_0;
uint8_t L_26 = ___contentType0;
TlsStream_Write_m4246040664(L_25, L_26, /*hidden argument*/NULL);
TlsStream_t2365453965 * L_27 = V_0;
Context_t3971234707 * L_28 = __this->get_context_2();
int16_t L_29 = Context_get_Protocol_m1078422015(L_28, /*hidden argument*/NULL);
TlsStream_Write_m1412844442(L_27, L_29, /*hidden argument*/NULL);
TlsStream_t2365453965 * L_30 = V_0;
ByteU5BU5D_t4116647657* L_31 = V_3;
TlsStream_Write_m1412844442(L_30, (((int16_t)((int16_t)(((int32_t)((int32_t)(((RuntimeArray *)L_31)->max_length))))))), /*hidden argument*/NULL);
TlsStream_t2365453965 * L_32 = V_0;
ByteU5BU5D_t4116647657* L_33 = V_3;
TlsStream_Write_m4133894341(L_32, L_33, /*hidden argument*/NULL);
int32_t L_34 = V_1;
int16_t L_35 = V_2;
V_1 = ((int32_t)il2cpp_codegen_add((int32_t)L_34, (int32_t)L_35));
}
IL_00bb:
{
int32_t L_36 = V_1;
int32_t L_37 = ___offset2;
int32_t L_38 = ___count3;
if ((((int32_t)L_36) < ((int32_t)((int32_t)il2cpp_codegen_add((int32_t)L_37, (int32_t)L_38)))))
{
goto IL_002a;
}
}
{
TlsStream_t2365453965 * L_39 = V_0;
ByteU5BU5D_t4116647657* L_40 = TlsStream_ToArray_m4177184296(L_39, /*hidden argument*/NULL);
return L_40;
}
}
// System.Byte[] Mono.Security.Protocol.Tls.RecordProtocol::encryptRecordFragment(Mono.Security.Protocol.Tls.ContentType,System.Byte[])
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* RecordProtocol_encryptRecordFragment_m710101985 (RecordProtocol_t3759049701 * __this, uint8_t ___contentType0, ByteU5BU5D_t4116647657* ___fragment1, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (RecordProtocol_encryptRecordFragment_m710101985_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
ByteU5BU5D_t4116647657* V_0 = NULL;
ByteU5BU5D_t4116647657* V_1 = NULL;
{
V_0 = (ByteU5BU5D_t4116647657*)NULL;
Context_t3971234707 * L_0 = RecordProtocol_get_Context_m3273611300(__this, /*hidden argument*/NULL);
if (!((ClientContext_t2797401965 *)IsInstClass((RuntimeObject*)L_0, ClientContext_t2797401965_il2cpp_TypeInfo_var)))
{
goto IL_002f;
}
}
{
Context_t3971234707 * L_1 = __this->get_context_2();
SecurityParameters_t2199972650 * L_2 = Context_get_Write_m1564343513(L_1, /*hidden argument*/NULL);
CipherSuite_t3414744575 * L_3 = SecurityParameters_get_Cipher_m108846204(L_2, /*hidden argument*/NULL);
uint8_t L_4 = ___contentType0;
ByteU5BU5D_t4116647657* L_5 = ___fragment1;
ByteU5BU5D_t4116647657* L_6 = VirtFuncInvoker2< ByteU5BU5D_t4116647657*, uint8_t, ByteU5BU5D_t4116647657* >::Invoke(4 /* System.Byte[] Mono.Security.Protocol.Tls.CipherSuite::ComputeClientRecordMAC(Mono.Security.Protocol.Tls.ContentType,System.Byte[]) */, L_3, L_4, L_5);
V_0 = L_6;
goto IL_0047;
}
IL_002f:
{
Context_t3971234707 * L_7 = __this->get_context_2();
SecurityParameters_t2199972650 * L_8 = Context_get_Write_m1564343513(L_7, /*hidden argument*/NULL);
CipherSuite_t3414744575 * L_9 = SecurityParameters_get_Cipher_m108846204(L_8, /*hidden argument*/NULL);
uint8_t L_10 = ___contentType0;
ByteU5BU5D_t4116647657* L_11 = ___fragment1;
ByteU5BU5D_t4116647657* L_12 = VirtFuncInvoker2< ByteU5BU5D_t4116647657*, uint8_t, ByteU5BU5D_t4116647657* >::Invoke(5 /* System.Byte[] Mono.Security.Protocol.Tls.CipherSuite::ComputeServerRecordMAC(Mono.Security.Protocol.Tls.ContentType,System.Byte[]) */, L_9, L_10, L_11);
V_0 = L_12;
}
IL_0047:
{
Context_t3971234707 * L_13 = __this->get_context_2();
SecurityParameters_t2199972650 * L_14 = Context_get_Write_m1564343513(L_13, /*hidden argument*/NULL);
CipherSuite_t3414744575 * L_15 = SecurityParameters_get_Cipher_m108846204(L_14, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_16 = ___fragment1;
ByteU5BU5D_t4116647657* L_17 = V_0;
ByteU5BU5D_t4116647657* L_18 = CipherSuite_EncryptRecord_m4196378593(L_15, L_16, L_17, /*hidden argument*/NULL);
V_1 = L_18;
Context_t3971234707 * L_19 = __this->get_context_2();
Context_t3971234707 * L_20 = L_19;
uint64_t L_21 = Context_get_WriteSequenceNumber_m1115956887(L_20, /*hidden argument*/NULL);
Context_set_WriteSequenceNumber_m942577065(L_20, ((int64_t)il2cpp_codegen_add((int64_t)L_21, (int64_t)(((int64_t)((int64_t)1))))), /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_22 = V_1;
return L_22;
}
}
// System.Byte[] Mono.Security.Protocol.Tls.RecordProtocol::decryptRecordFragment(Mono.Security.Protocol.Tls.ContentType,System.Byte[])
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* RecordProtocol_decryptRecordFragment_m66623237 (RecordProtocol_t3759049701 * __this, uint8_t ___contentType0, ByteU5BU5D_t4116647657* ___fragment1, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (RecordProtocol_decryptRecordFragment_m66623237_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
ByteU5BU5D_t4116647657* V_0 = NULL;
ByteU5BU5D_t4116647657* V_1 = NULL;
ByteU5BU5D_t4116647657* V_2 = NULL;
Exception_t * __last_unhandled_exception = 0;
NO_UNUSED_WARNING (__last_unhandled_exception);
Exception_t * __exception_local = 0;
NO_UNUSED_WARNING (__exception_local);
int32_t __leave_target = -1;
NO_UNUSED_WARNING (__leave_target);
{
V_0 = (ByteU5BU5D_t4116647657*)NULL;
V_1 = (ByteU5BU5D_t4116647657*)NULL;
}
IL_0004:
try
{ // begin try (depth: 1)
Context_t3971234707 * L_0 = __this->get_context_2();
SecurityParameters_t2199972650 * L_1 = Context_get_Read_m4172356735(L_0, /*hidden argument*/NULL);
CipherSuite_t3414744575 * L_2 = SecurityParameters_get_Cipher_m108846204(L_1, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_3 = ___fragment1;
CipherSuite_DecryptRecord_m1495386860(L_2, L_3, (ByteU5BU5D_t4116647657**)(&V_0), (ByteU5BU5D_t4116647657**)(&V_1), /*hidden argument*/NULL);
goto IL_004d;
} // end try (depth: 1)
catch(Il2CppExceptionWrapper& e)
{
__exception_local = (Exception_t *)e.ex;
if(il2cpp_codegen_class_is_assignable_from (RuntimeObject_il2cpp_TypeInfo_var, il2cpp_codegen_object_class(e.ex)))
goto CATCH_0023;
throw e;
}
CATCH_0023:
{ // begin catch(System.Object)
{
Context_t3971234707 * L_4 = __this->get_context_2();
if (!((ServerContext_t3848440993 *)IsInstClass((RuntimeObject*)L_4, ServerContext_t3848440993_il2cpp_TypeInfo_var)))
{
goto IL_0046;
}
}
IL_0034:
{
Context_t3971234707 * L_5 = RecordProtocol_get_Context_m3273611300(__this, /*hidden argument*/NULL);
RecordProtocol_t3759049701 * L_6 = Context_get_RecordProtocol_m2261754827(L_5, /*hidden argument*/NULL);
RecordProtocol_SendAlert_m1931708341(L_6, ((int32_t)21), /*hidden argument*/NULL);
}
IL_0046:
{
IL2CPP_RAISE_MANAGED_EXCEPTION(__exception_local, NULL, RecordProtocol_decryptRecordFragment_m66623237_RuntimeMethod_var);
}
IL_0048:
{
goto IL_004d;
}
} // end catch (depth: 1)
IL_004d:
{
V_2 = (ByteU5BU5D_t4116647657*)NULL;
Context_t3971234707 * L_7 = RecordProtocol_get_Context_m3273611300(__this, /*hidden argument*/NULL);
if (!((ClientContext_t2797401965 *)IsInstClass((RuntimeObject*)L_7, ClientContext_t2797401965_il2cpp_TypeInfo_var)))
{
goto IL_007c;
}
}
{
Context_t3971234707 * L_8 = __this->get_context_2();
SecurityParameters_t2199972650 * L_9 = Context_get_Read_m4172356735(L_8, /*hidden argument*/NULL);
CipherSuite_t3414744575 * L_10 = SecurityParameters_get_Cipher_m108846204(L_9, /*hidden argument*/NULL);
uint8_t L_11 = ___contentType0;
ByteU5BU5D_t4116647657* L_12 = V_0;
ByteU5BU5D_t4116647657* L_13 = VirtFuncInvoker2< ByteU5BU5D_t4116647657*, uint8_t, ByteU5BU5D_t4116647657* >::Invoke(5 /* System.Byte[] Mono.Security.Protocol.Tls.CipherSuite::ComputeServerRecordMAC(Mono.Security.Protocol.Tls.ContentType,System.Byte[]) */, L_10, L_11, L_12);
V_2 = L_13;
goto IL_0094;
}
IL_007c:
{
Context_t3971234707 * L_14 = __this->get_context_2();
SecurityParameters_t2199972650 * L_15 = Context_get_Read_m4172356735(L_14, /*hidden argument*/NULL);
CipherSuite_t3414744575 * L_16 = SecurityParameters_get_Cipher_m108846204(L_15, /*hidden argument*/NULL);
uint8_t L_17 = ___contentType0;
ByteU5BU5D_t4116647657* L_18 = V_0;
ByteU5BU5D_t4116647657* L_19 = VirtFuncInvoker2< ByteU5BU5D_t4116647657*, uint8_t, ByteU5BU5D_t4116647657* >::Invoke(4 /* System.Byte[] Mono.Security.Protocol.Tls.CipherSuite::ComputeClientRecordMAC(Mono.Security.Protocol.Tls.ContentType,System.Byte[]) */, L_16, L_17, L_18);
V_2 = L_19;
}
IL_0094:
{
ByteU5BU5D_t4116647657* L_20 = V_2;
ByteU5BU5D_t4116647657* L_21 = V_1;
bool L_22 = RecordProtocol_Compare_m4182754688(__this, L_20, L_21, /*hidden argument*/NULL);
if (L_22)
{
goto IL_00ae;
}
}
{
TlsException_t3534743363 * L_23 = (TlsException_t3534743363 *)il2cpp_codegen_object_new(TlsException_t3534743363_il2cpp_TypeInfo_var);
TlsException__ctor_m3242533711(L_23, ((int32_t)20), _stringLiteral3971508554, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_23, NULL, RecordProtocol_decryptRecordFragment_m66623237_RuntimeMethod_var);
}
IL_00ae:
{
Context_t3971234707 * L_24 = __this->get_context_2();
Context_t3971234707 * L_25 = L_24;
uint64_t L_26 = Context_get_ReadSequenceNumber_m3883329199(L_25, /*hidden argument*/NULL);
Context_set_ReadSequenceNumber_m2154909392(L_25, ((int64_t)il2cpp_codegen_add((int64_t)L_26, (int64_t)(((int64_t)((int64_t)1))))), /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_27 = V_0;
return L_27;
}
}
// System.Boolean Mono.Security.Protocol.Tls.RecordProtocol::Compare(System.Byte[],System.Byte[])
extern "C" IL2CPP_METHOD_ATTR bool RecordProtocol_Compare_m4182754688 (RecordProtocol_t3759049701 * __this, ByteU5BU5D_t4116647657* ___array10, ByteU5BU5D_t4116647657* ___array21, const RuntimeMethod* method)
{
int32_t V_0 = 0;
{
ByteU5BU5D_t4116647657* L_0 = ___array10;
if (L_0)
{
goto IL_000b;
}
}
{
ByteU5BU5D_t4116647657* L_1 = ___array21;
return (bool)((((RuntimeObject*)(ByteU5BU5D_t4116647657*)L_1) == ((RuntimeObject*)(RuntimeObject *)NULL))? 1 : 0);
}
IL_000b:
{
ByteU5BU5D_t4116647657* L_2 = ___array21;
if (L_2)
{
goto IL_0013;
}
}
{
return (bool)0;
}
IL_0013:
{
ByteU5BU5D_t4116647657* L_3 = ___array10;
ByteU5BU5D_t4116647657* L_4 = ___array21;
if ((((int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_3)->max_length))))) == ((int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_4)->max_length)))))))
{
goto IL_0020;
}
}
{
return (bool)0;
}
IL_0020:
{
V_0 = 0;
goto IL_0038;
}
IL_0027:
{
ByteU5BU5D_t4116647657* L_5 = ___array10;
int32_t L_6 = V_0;
int32_t L_7 = L_6;
uint8_t L_8 = (L_5)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_7));
ByteU5BU5D_t4116647657* L_9 = ___array21;
int32_t L_10 = V_0;
int32_t L_11 = L_10;
uint8_t L_12 = (L_9)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_11));
if ((((int32_t)L_8) == ((int32_t)L_12)))
{
goto IL_0034;
}
}
{
return (bool)0;
}
IL_0034:
{
int32_t L_13 = V_0;
V_0 = ((int32_t)il2cpp_codegen_add((int32_t)L_13, (int32_t)1));
}
IL_0038:
{
int32_t L_14 = V_0;
ByteU5BU5D_t4116647657* L_15 = ___array10;
if ((((int32_t)L_14) < ((int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_15)->max_length)))))))
{
goto IL_0027;
}
}
{
return (bool)1;
}
}
// System.Void Mono.Security.Protocol.Tls.RecordProtocol::ProcessCipherSpecV2Buffer(Mono.Security.Protocol.Tls.SecurityProtocolType,System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void RecordProtocol_ProcessCipherSpecV2Buffer_m487045483 (RecordProtocol_t3759049701 * __this, int32_t ___protocol0, ByteU5BU5D_t4116647657* ___buffer1, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (RecordProtocol_ProcessCipherSpecV2Buffer_m487045483_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
TlsStream_t2365453965 * V_0 = NULL;
String_t* V_1 = NULL;
uint8_t V_2 = 0x0;
int16_t V_3 = 0;
int32_t V_4 = 0;
ByteU5BU5D_t4116647657* V_5 = NULL;
int32_t V_6 = 0;
CipherSuite_t3414744575 * V_7 = NULL;
String_t* G_B3_0 = NULL;
{
ByteU5BU5D_t4116647657* L_0 = ___buffer1;
TlsStream_t2365453965 * L_1 = (TlsStream_t2365453965 *)il2cpp_codegen_object_new(TlsStream_t2365453965_il2cpp_TypeInfo_var);
TlsStream__ctor_m277557575(L_1, L_0, /*hidden argument*/NULL);
V_0 = L_1;
int32_t L_2 = ___protocol0;
if ((!(((uint32_t)L_2) == ((uint32_t)((int32_t)48)))))
{
goto IL_0019;
}
}
{
G_B3_0 = _stringLiteral1940067499;
goto IL_001e;
}
IL_0019:
{
G_B3_0 = _stringLiteral3149331255;
}
IL_001e:
{
V_1 = G_B3_0;
goto IL_00e2;
}
IL_0024:
{
TlsStream_t2365453965 * L_3 = V_0;
uint8_t L_4 = TlsStream_ReadByte_m3396126844(L_3, /*hidden argument*/NULL);
V_2 = L_4;
uint8_t L_5 = V_2;
if (L_5)
{
goto IL_007f;
}
}
{
TlsStream_t2365453965 * L_6 = V_0;
int16_t L_7 = TlsStream_ReadInt16_m1728211431(L_6, /*hidden argument*/NULL);
V_3 = L_7;
Context_t3971234707 * L_8 = RecordProtocol_get_Context_m3273611300(__this, /*hidden argument*/NULL);
CipherSuiteCollection_t1129639304 * L_9 = Context_get_SupportedCiphers_m1883682196(L_8, /*hidden argument*/NULL);
int16_t L_10 = V_3;
int32_t L_11 = CipherSuiteCollection_IndexOf_m2770510321(L_9, L_10, /*hidden argument*/NULL);
V_4 = L_11;
int32_t L_12 = V_4;
if ((((int32_t)L_12) == ((int32_t)(-1))))
{
goto IL_007a;
}
}
{
Context_t3971234707 * L_13 = RecordProtocol_get_Context_m3273611300(__this, /*hidden argument*/NULL);
SecurityParameters_t2199972650 * L_14 = Context_get_Negotiating_m2044579817(L_13, /*hidden argument*/NULL);
Context_t3971234707 * L_15 = RecordProtocol_get_Context_m3273611300(__this, /*hidden argument*/NULL);
CipherSuiteCollection_t1129639304 * L_16 = Context_get_SupportedCiphers_m1883682196(L_15, /*hidden argument*/NULL);
int32_t L_17 = V_4;
CipherSuite_t3414744575 * L_18 = CipherSuiteCollection_get_Item_m4188309062(L_16, L_17, /*hidden argument*/NULL);
SecurityParameters_set_Cipher_m588445085(L_14, L_18, /*hidden argument*/NULL);
goto IL_00f3;
}
IL_007a:
{
goto IL_00e2;
}
IL_007f:
{
ByteU5BU5D_t4116647657* L_19 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)2);
V_5 = L_19;
TlsStream_t2365453965 * L_20 = V_0;
ByteU5BU5D_t4116647657* L_21 = V_5;
ByteU5BU5D_t4116647657* L_22 = V_5;
VirtFuncInvoker3< int32_t, ByteU5BU5D_t4116647657*, int32_t, int32_t >::Invoke(14 /* System.Int32 Mono.Security.Protocol.Tls.TlsStream::Read(System.Byte[],System.Int32,System.Int32) */, L_20, L_21, 0, (((int32_t)((int32_t)(((RuntimeArray *)L_22)->max_length)))));
uint8_t L_23 = V_2;
ByteU5BU5D_t4116647657* L_24 = V_5;
int32_t L_25 = 0;
uint8_t L_26 = (L_24)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_25));
ByteU5BU5D_t4116647657* L_27 = V_5;
int32_t L_28 = 1;
uint8_t L_29 = (L_27)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(L_28));
V_6 = ((int32_t)((int32_t)((int32_t)((int32_t)((int32_t)((int32_t)((int32_t)((int32_t)L_23&(int32_t)((int32_t)255)))<<(int32_t)((int32_t)16)))|(int32_t)((int32_t)((int32_t)((int32_t)((int32_t)L_26&(int32_t)((int32_t)255)))<<(int32_t)8))))|(int32_t)((int32_t)((int32_t)L_29&(int32_t)((int32_t)255)))));
String_t* L_30 = V_1;
int32_t L_31 = V_6;
CipherSuite_t3414744575 * L_32 = RecordProtocol_MapV2CipherCode_m4087331414(__this, L_30, L_31, /*hidden argument*/NULL);
V_7 = L_32;
CipherSuite_t3414744575 * L_33 = V_7;
if (!L_33)
{
goto IL_00e2;
}
}
{
Context_t3971234707 * L_34 = RecordProtocol_get_Context_m3273611300(__this, /*hidden argument*/NULL);
SecurityParameters_t2199972650 * L_35 = Context_get_Negotiating_m2044579817(L_34, /*hidden argument*/NULL);
CipherSuite_t3414744575 * L_36 = V_7;
SecurityParameters_set_Cipher_m588445085(L_35, L_36, /*hidden argument*/NULL);
goto IL_00f3;
}
IL_00e2:
{
TlsStream_t2365453965 * L_37 = V_0;
int64_t L_38 = VirtFuncInvoker0< int64_t >::Invoke(9 /* System.Int64 Mono.Security.Protocol.Tls.TlsStream::get_Position() */, L_37);
TlsStream_t2365453965 * L_39 = V_0;
int64_t L_40 = VirtFuncInvoker0< int64_t >::Invoke(8 /* System.Int64 Mono.Security.Protocol.Tls.TlsStream::get_Length() */, L_39);
if ((((int64_t)L_38) < ((int64_t)L_40)))
{
goto IL_0024;
}
}
IL_00f3:
{
Context_t3971234707 * L_41 = RecordProtocol_get_Context_m3273611300(__this, /*hidden argument*/NULL);
SecurityParameters_t2199972650 * L_42 = Context_get_Negotiating_m2044579817(L_41, /*hidden argument*/NULL);
if (L_42)
{
goto IL_0110;
}
}
{
TlsException_t3534743363 * L_43 = (TlsException_t3534743363 *)il2cpp_codegen_object_new(TlsException_t3534743363_il2cpp_TypeInfo_var);
TlsException__ctor_m3242533711(L_43, ((int32_t)71), _stringLiteral82125824, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_43, NULL, RecordProtocol_ProcessCipherSpecV2Buffer_m487045483_RuntimeMethod_var);
}
IL_0110:
{
return;
}
}
// Mono.Security.Protocol.Tls.CipherSuite Mono.Security.Protocol.Tls.RecordProtocol::MapV2CipherCode(System.String,System.Int32)
extern "C" IL2CPP_METHOD_ATTR CipherSuite_t3414744575 * RecordProtocol_MapV2CipherCode_m4087331414 (RecordProtocol_t3759049701 * __this, String_t* ___prefix0, int32_t ___code1, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (RecordProtocol_MapV2CipherCode_m4087331414_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
int32_t V_0 = 0;
CipherSuite_t3414744575 * V_1 = NULL;
Exception_t * __last_unhandled_exception = 0;
NO_UNUSED_WARNING (__last_unhandled_exception);
Exception_t * __exception_local = 0;
NO_UNUSED_WARNING (__exception_local);
int32_t __leave_target = -1;
NO_UNUSED_WARNING (__leave_target);
IL_0000:
try
{ // begin try (depth: 1)
{
int32_t L_0 = ___code1;
V_0 = L_0;
int32_t L_1 = V_0;
if ((((int32_t)L_1) == ((int32_t)((int32_t)65664))))
{
goto IL_0054;
}
}
IL_000d:
{
int32_t L_2 = V_0;
if ((((int32_t)L_2) == ((int32_t)((int32_t)131200))))
{
goto IL_0075;
}
}
IL_0018:
{
int32_t L_3 = V_0;
if ((((int32_t)L_3) == ((int32_t)((int32_t)196736))))
{
goto IL_0096;
}
}
IL_0023:
{
int32_t L_4 = V_0;
if ((((int32_t)L_4) == ((int32_t)((int32_t)262272))))
{
goto IL_00b7;
}
}
IL_002e:
{
int32_t L_5 = V_0;
if ((((int32_t)L_5) == ((int32_t)((int32_t)327808))))
{
goto IL_00d8;
}
}
IL_0039:
{
int32_t L_6 = V_0;
if ((((int32_t)L_6) == ((int32_t)((int32_t)393280))))
{
goto IL_00df;
}
}
IL_0044:
{
int32_t L_7 = V_0;
if ((((int32_t)L_7) == ((int32_t)((int32_t)458944))))
{
goto IL_00e6;
}
}
IL_004f:
{
goto IL_00ed;
}
IL_0054:
{
Context_t3971234707 * L_8 = RecordProtocol_get_Context_m3273611300(__this, /*hidden argument*/NULL);
CipherSuiteCollection_t1129639304 * L_9 = Context_get_SupportedCiphers_m1883682196(L_8, /*hidden argument*/NULL);
String_t* L_10 = ___prefix0;
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_11 = String_Concat_m3937257545(NULL /*static, unused*/, L_10, _stringLiteral151588389, /*hidden argument*/NULL);
CipherSuite_t3414744575 * L_12 = CipherSuiteCollection_get_Item_m2791953484(L_9, L_11, /*hidden argument*/NULL);
V_1 = L_12;
goto IL_0106;
}
IL_0075:
{
Context_t3971234707 * L_13 = RecordProtocol_get_Context_m3273611300(__this, /*hidden argument*/NULL);
CipherSuiteCollection_t1129639304 * L_14 = Context_get_SupportedCiphers_m1883682196(L_13, /*hidden argument*/NULL);
String_t* L_15 = ___prefix0;
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_16 = String_Concat_m3937257545(NULL /*static, unused*/, L_15, _stringLiteral1565675654, /*hidden argument*/NULL);
CipherSuite_t3414744575 * L_17 = CipherSuiteCollection_get_Item_m2791953484(L_14, L_16, /*hidden argument*/NULL);
V_1 = L_17;
goto IL_0106;
}
IL_0096:
{
Context_t3971234707 * L_18 = RecordProtocol_get_Context_m3273611300(__this, /*hidden argument*/NULL);
CipherSuiteCollection_t1129639304 * L_19 = Context_get_SupportedCiphers_m1883682196(L_18, /*hidden argument*/NULL);
String_t* L_20 = ___prefix0;
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_21 = String_Concat_m3937257545(NULL /*static, unused*/, L_20, _stringLiteral243541289, /*hidden argument*/NULL);
CipherSuite_t3414744575 * L_22 = CipherSuiteCollection_get_Item_m2791953484(L_19, L_21, /*hidden argument*/NULL);
V_1 = L_22;
goto IL_0106;
}
IL_00b7:
{
Context_t3971234707 * L_23 = RecordProtocol_get_Context_m3273611300(__this, /*hidden argument*/NULL);
CipherSuiteCollection_t1129639304 * L_24 = Context_get_SupportedCiphers_m1883682196(L_23, /*hidden argument*/NULL);
String_t* L_25 = ___prefix0;
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_26 = String_Concat_m3937257545(NULL /*static, unused*/, L_25, _stringLiteral243541289, /*hidden argument*/NULL);
CipherSuite_t3414744575 * L_27 = CipherSuiteCollection_get_Item_m2791953484(L_24, L_26, /*hidden argument*/NULL);
V_1 = L_27;
goto IL_0106;
}
IL_00d8:
{
V_1 = (CipherSuite_t3414744575 *)NULL;
goto IL_0106;
}
IL_00df:
{
V_1 = (CipherSuite_t3414744575 *)NULL;
goto IL_0106;
}
IL_00e6:
{
V_1 = (CipherSuite_t3414744575 *)NULL;
goto IL_0106;
}
IL_00ed:
{
V_1 = (CipherSuite_t3414744575 *)NULL;
goto IL_0106;
}
IL_00f4:
{
; // IL_00f4: leave IL_0106
}
} // end try (depth: 1)
catch(Il2CppExceptionWrapper& e)
{
__exception_local = (Exception_t *)e.ex;
if(il2cpp_codegen_class_is_assignable_from (RuntimeObject_il2cpp_TypeInfo_var, il2cpp_codegen_object_class(e.ex)))
goto CATCH_00f9;
throw e;
}
CATCH_00f9:
{ // begin catch(System.Object)
{
V_1 = (CipherSuite_t3414744575 *)NULL;
goto IL_0106;
}
IL_0101:
{
; // IL_0101: leave IL_0106
}
} // end catch (depth: 1)
IL_0106:
{
CipherSuite_t3414744575 * L_28 = V_1;
return L_28;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void Mono.Security.Protocol.Tls.RecordProtocol/ReceiveRecordAsyncResult::.ctor(System.AsyncCallback,System.Object,System.Byte[],System.IO.Stream)
extern "C" IL2CPP_METHOD_ATTR void ReceiveRecordAsyncResult__ctor_m277637112 (ReceiveRecordAsyncResult_t3680907657 * __this, AsyncCallback_t3962456242 * ___userCallback0, RuntimeObject * ___userState1, ByteU5BU5D_t4116647657* ___initialBuffer2, Stream_t1273022909 * ___record3, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (ReceiveRecordAsyncResult__ctor_m277637112_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
RuntimeObject * L_0 = (RuntimeObject *)il2cpp_codegen_object_new(RuntimeObject_il2cpp_TypeInfo_var);
Object__ctor_m297566312(L_0, /*hidden argument*/NULL);
__this->set_locker_0(L_0);
Object__ctor_m297566312(__this, /*hidden argument*/NULL);
AsyncCallback_t3962456242 * L_1 = ___userCallback0;
__this->set__userCallback_1(L_1);
RuntimeObject * L_2 = ___userState1;
__this->set__userState_2(L_2);
ByteU5BU5D_t4116647657* L_3 = ___initialBuffer2;
__this->set__initialBuffer_8(L_3);
Stream_t1273022909 * L_4 = ___record3;
__this->set__record_6(L_4);
return;
}
}
// System.IO.Stream Mono.Security.Protocol.Tls.RecordProtocol/ReceiveRecordAsyncResult::get_Record()
extern "C" IL2CPP_METHOD_ATTR Stream_t1273022909 * ReceiveRecordAsyncResult_get_Record_m223479150 (ReceiveRecordAsyncResult_t3680907657 * __this, const RuntimeMethod* method)
{
{
Stream_t1273022909 * L_0 = __this->get__record_6();
return L_0;
}
}
// System.Byte[] Mono.Security.Protocol.Tls.RecordProtocol/ReceiveRecordAsyncResult::get_ResultingBuffer()
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* ReceiveRecordAsyncResult_get_ResultingBuffer_m1839161335 (ReceiveRecordAsyncResult_t3680907657 * __this, const RuntimeMethod* method)
{
{
ByteU5BU5D_t4116647657* L_0 = __this->get__resultingBuffer_5();
return L_0;
}
}
// System.Byte[] Mono.Security.Protocol.Tls.RecordProtocol/ReceiveRecordAsyncResult::get_InitialBuffer()
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* ReceiveRecordAsyncResult_get_InitialBuffer_m2924495696 (ReceiveRecordAsyncResult_t3680907657 * __this, const RuntimeMethod* method)
{
{
ByteU5BU5D_t4116647657* L_0 = __this->get__initialBuffer_8();
return L_0;
}
}
// System.Object Mono.Security.Protocol.Tls.RecordProtocol/ReceiveRecordAsyncResult::get_AsyncState()
extern "C" IL2CPP_METHOD_ATTR RuntimeObject * ReceiveRecordAsyncResult_get_AsyncState_m431861941 (ReceiveRecordAsyncResult_t3680907657 * __this, const RuntimeMethod* method)
{
{
RuntimeObject * L_0 = __this->get__userState_2();
return L_0;
}
}
// System.Exception Mono.Security.Protocol.Tls.RecordProtocol/ReceiveRecordAsyncResult::get_AsyncException()
extern "C" IL2CPP_METHOD_ATTR Exception_t * ReceiveRecordAsyncResult_get_AsyncException_m631453737 (ReceiveRecordAsyncResult_t3680907657 * __this, const RuntimeMethod* method)
{
{
Exception_t * L_0 = __this->get__asyncException_3();
return L_0;
}
}
// System.Boolean Mono.Security.Protocol.Tls.RecordProtocol/ReceiveRecordAsyncResult::get_CompletedWithError()
extern "C" IL2CPP_METHOD_ATTR bool ReceiveRecordAsyncResult_get_CompletedWithError_m2856009536 (ReceiveRecordAsyncResult_t3680907657 * __this, const RuntimeMethod* method)
{
{
bool L_0 = ReceiveRecordAsyncResult_get_IsCompleted_m1918259948(__this, /*hidden argument*/NULL);
if (L_0)
{
goto IL_000d;
}
}
{
return (bool)0;
}
IL_000d:
{
Exception_t * L_1 = __this->get__asyncException_3();
return (bool)((((int32_t)((((RuntimeObject*)(RuntimeObject *)NULL) == ((RuntimeObject*)(Exception_t *)L_1))? 1 : 0)) == ((int32_t)0))? 1 : 0);
}
}
// System.Threading.WaitHandle Mono.Security.Protocol.Tls.RecordProtocol/ReceiveRecordAsyncResult::get_AsyncWaitHandle()
extern "C" IL2CPP_METHOD_ATTR WaitHandle_t1743403487 * ReceiveRecordAsyncResult_get_AsyncWaitHandle_m1781023438 (ReceiveRecordAsyncResult_t3680907657 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (ReceiveRecordAsyncResult_get_AsyncWaitHandle_m1781023438_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
RuntimeObject * V_0 = NULL;
Exception_t * __last_unhandled_exception = 0;
NO_UNUSED_WARNING (__last_unhandled_exception);
Exception_t * __exception_local = 0;
NO_UNUSED_WARNING (__exception_local);
int32_t __leave_target = -1;
NO_UNUSED_WARNING (__leave_target);
{
RuntimeObject * L_0 = __this->get_locker_0();
V_0 = L_0;
RuntimeObject * L_1 = V_0;
Monitor_Enter_m2249409497(NULL /*static, unused*/, L_1, /*hidden argument*/NULL);
}
IL_000d:
try
{ // begin try (depth: 1)
{
ManualResetEvent_t451242010 * L_2 = __this->get_handle_4();
if (L_2)
{
goto IL_0029;
}
}
IL_0018:
{
bool L_3 = __this->get_completed_7();
ManualResetEvent_t451242010 * L_4 = (ManualResetEvent_t451242010 *)il2cpp_codegen_object_new(ManualResetEvent_t451242010_il2cpp_TypeInfo_var);
ManualResetEvent__ctor_m4010886457(L_4, L_3, /*hidden argument*/NULL);
__this->set_handle_4(L_4);
}
IL_0029:
{
IL2CPP_LEAVE(0x35, FINALLY_002e);
}
} // end try (depth: 1)
catch(Il2CppExceptionWrapper& e)
{
__last_unhandled_exception = (Exception_t *)e.ex;
goto FINALLY_002e;
}
FINALLY_002e:
{ // begin finally (depth: 1)
RuntimeObject * L_5 = V_0;
Monitor_Exit_m3585316909(NULL /*static, unused*/, L_5, /*hidden argument*/NULL);
IL2CPP_END_FINALLY(46)
} // end finally (depth: 1)
IL2CPP_CLEANUP(46)
{
IL2CPP_JUMP_TBL(0x35, IL_0035)
IL2CPP_RETHROW_IF_UNHANDLED(Exception_t *)
}
IL_0035:
{
ManualResetEvent_t451242010 * L_6 = __this->get_handle_4();
return L_6;
}
}
// System.Boolean Mono.Security.Protocol.Tls.RecordProtocol/ReceiveRecordAsyncResult::get_IsCompleted()
extern "C" IL2CPP_METHOD_ATTR bool ReceiveRecordAsyncResult_get_IsCompleted_m1918259948 (ReceiveRecordAsyncResult_t3680907657 * __this, const RuntimeMethod* method)
{
RuntimeObject * V_0 = NULL;
bool V_1 = false;
Exception_t * __last_unhandled_exception = 0;
NO_UNUSED_WARNING (__last_unhandled_exception);
Exception_t * __exception_local = 0;
NO_UNUSED_WARNING (__exception_local);
int32_t __leave_target = -1;
NO_UNUSED_WARNING (__leave_target);
{
RuntimeObject * L_0 = __this->get_locker_0();
V_0 = L_0;
RuntimeObject * L_1 = V_0;
Monitor_Enter_m2249409497(NULL /*static, unused*/, L_1, /*hidden argument*/NULL);
}
IL_000d:
try
{ // begin try (depth: 1)
{
bool L_2 = __this->get_completed_7();
V_1 = L_2;
IL2CPP_LEAVE(0x25, FINALLY_001e);
}
IL_0019:
{
; // IL_0019: leave IL_0025
}
} // end try (depth: 1)
catch(Il2CppExceptionWrapper& e)
{
__last_unhandled_exception = (Exception_t *)e.ex;
goto FINALLY_001e;
}
FINALLY_001e:
{ // begin finally (depth: 1)
RuntimeObject * L_3 = V_0;
Monitor_Exit_m3585316909(NULL /*static, unused*/, L_3, /*hidden argument*/NULL);
IL2CPP_END_FINALLY(30)
} // end finally (depth: 1)
IL2CPP_CLEANUP(30)
{
IL2CPP_JUMP_TBL(0x25, IL_0025)
IL2CPP_RETHROW_IF_UNHANDLED(Exception_t *)
}
IL_0025:
{
bool L_4 = V_1;
return L_4;
}
}
// System.Void Mono.Security.Protocol.Tls.RecordProtocol/ReceiveRecordAsyncResult::SetComplete(System.Exception,System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void ReceiveRecordAsyncResult_SetComplete_m1372905673 (ReceiveRecordAsyncResult_t3680907657 * __this, Exception_t * ___ex0, ByteU5BU5D_t4116647657* ___resultingBuffer1, const RuntimeMethod* method)
{
RuntimeObject * V_0 = NULL;
Exception_t * __last_unhandled_exception = 0;
NO_UNUSED_WARNING (__last_unhandled_exception);
Exception_t * __exception_local = 0;
NO_UNUSED_WARNING (__exception_local);
int32_t __leave_target = -1;
NO_UNUSED_WARNING (__leave_target);
{
RuntimeObject * L_0 = __this->get_locker_0();
V_0 = L_0;
RuntimeObject * L_1 = V_0;
Monitor_Enter_m2249409497(NULL /*static, unused*/, L_1, /*hidden argument*/NULL);
}
IL_000d:
try
{ // begin try (depth: 1)
{
bool L_2 = __this->get_completed_7();
if (!L_2)
{
goto IL_001d;
}
}
IL_0018:
{
IL2CPP_LEAVE(0x6F, FINALLY_0068);
}
IL_001d:
{
__this->set_completed_7((bool)1);
Exception_t * L_3 = ___ex0;
__this->set__asyncException_3(L_3);
ByteU5BU5D_t4116647657* L_4 = ___resultingBuffer1;
__this->set__resultingBuffer_5(L_4);
ManualResetEvent_t451242010 * L_5 = __this->get_handle_4();
if (!L_5)
{
goto IL_0049;
}
}
IL_003d:
{
ManualResetEvent_t451242010 * L_6 = __this->get_handle_4();
EventWaitHandle_Set_m2445193251(L_6, /*hidden argument*/NULL);
}
IL_0049:
{
AsyncCallback_t3962456242 * L_7 = __this->get__userCallback_1();
if (!L_7)
{
goto IL_0063;
}
}
IL_0054:
{
AsyncCallback_t3962456242 * L_8 = __this->get__userCallback_1();
AsyncCallback_BeginInvoke_m2710486612(L_8, __this, (AsyncCallback_t3962456242 *)NULL, NULL, /*hidden argument*/NULL);
}
IL_0063:
{
IL2CPP_LEAVE(0x6F, FINALLY_0068);
}
} // end try (depth: 1)
catch(Il2CppExceptionWrapper& e)
{
__last_unhandled_exception = (Exception_t *)e.ex;
goto FINALLY_0068;
}
FINALLY_0068:
{ // begin finally (depth: 1)
RuntimeObject * L_9 = V_0;
Monitor_Exit_m3585316909(NULL /*static, unused*/, L_9, /*hidden argument*/NULL);
IL2CPP_END_FINALLY(104)
} // end finally (depth: 1)
IL2CPP_CLEANUP(104)
{
IL2CPP_JUMP_TBL(0x6F, IL_006f)
IL2CPP_RETHROW_IF_UNHANDLED(Exception_t *)
}
IL_006f:
{
return;
}
}
// System.Void Mono.Security.Protocol.Tls.RecordProtocol/ReceiveRecordAsyncResult::SetComplete(System.Exception)
extern "C" IL2CPP_METHOD_ATTR void ReceiveRecordAsyncResult_SetComplete_m1568733499 (ReceiveRecordAsyncResult_t3680907657 * __this, Exception_t * ___ex0, const RuntimeMethod* method)
{
{
Exception_t * L_0 = ___ex0;
ReceiveRecordAsyncResult_SetComplete_m1372905673(__this, L_0, (ByteU5BU5D_t4116647657*)(ByteU5BU5D_t4116647657*)NULL, /*hidden argument*/NULL);
return;
}
}
// System.Void Mono.Security.Protocol.Tls.RecordProtocol/ReceiveRecordAsyncResult::SetComplete(System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void ReceiveRecordAsyncResult_SetComplete_m464469214 (ReceiveRecordAsyncResult_t3680907657 * __this, ByteU5BU5D_t4116647657* ___resultingBuffer0, const RuntimeMethod* method)
{
{
ByteU5BU5D_t4116647657* L_0 = ___resultingBuffer0;
ReceiveRecordAsyncResult_SetComplete_m1372905673(__this, (Exception_t *)NULL, L_0, /*hidden argument*/NULL);
return;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void Mono.Security.Protocol.Tls.RecordProtocol/SendRecordAsyncResult::.ctor(System.AsyncCallback,System.Object,Mono.Security.Protocol.Tls.Handshake.HandshakeMessage)
extern "C" IL2CPP_METHOD_ATTR void SendRecordAsyncResult__ctor_m425551707 (SendRecordAsyncResult_t3718352467 * __this, AsyncCallback_t3962456242 * ___userCallback0, RuntimeObject * ___userState1, HandshakeMessage_t3696583168 * ___message2, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (SendRecordAsyncResult__ctor_m425551707_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
RuntimeObject * L_0 = (RuntimeObject *)il2cpp_codegen_object_new(RuntimeObject_il2cpp_TypeInfo_var);
Object__ctor_m297566312(L_0, /*hidden argument*/NULL);
__this->set_locker_0(L_0);
Object__ctor_m297566312(__this, /*hidden argument*/NULL);
AsyncCallback_t3962456242 * L_1 = ___userCallback0;
__this->set__userCallback_1(L_1);
RuntimeObject * L_2 = ___userState1;
__this->set__userState_2(L_2);
HandshakeMessage_t3696583168 * L_3 = ___message2;
__this->set__message_5(L_3);
return;
}
}
// Mono.Security.Protocol.Tls.Handshake.HandshakeMessage Mono.Security.Protocol.Tls.RecordProtocol/SendRecordAsyncResult::get_Message()
extern "C" IL2CPP_METHOD_ATTR HandshakeMessage_t3696583168 * SendRecordAsyncResult_get_Message_m1204240861 (SendRecordAsyncResult_t3718352467 * __this, const RuntimeMethod* method)
{
{
HandshakeMessage_t3696583168 * L_0 = __this->get__message_5();
return L_0;
}
}
// System.Object Mono.Security.Protocol.Tls.RecordProtocol/SendRecordAsyncResult::get_AsyncState()
extern "C" IL2CPP_METHOD_ATTR RuntimeObject * SendRecordAsyncResult_get_AsyncState_m4196194494 (SendRecordAsyncResult_t3718352467 * __this, const RuntimeMethod* method)
{
{
RuntimeObject * L_0 = __this->get__userState_2();
return L_0;
}
}
// System.Exception Mono.Security.Protocol.Tls.RecordProtocol/SendRecordAsyncResult::get_AsyncException()
extern "C" IL2CPP_METHOD_ATTR Exception_t * SendRecordAsyncResult_get_AsyncException_m3556917569 (SendRecordAsyncResult_t3718352467 * __this, const RuntimeMethod* method)
{
{
Exception_t * L_0 = __this->get__asyncException_3();
return L_0;
}
}
// System.Boolean Mono.Security.Protocol.Tls.RecordProtocol/SendRecordAsyncResult::get_CompletedWithError()
extern "C" IL2CPP_METHOD_ATTR bool SendRecordAsyncResult_get_CompletedWithError_m3232037803 (SendRecordAsyncResult_t3718352467 * __this, const RuntimeMethod* method)
{
{
bool L_0 = SendRecordAsyncResult_get_IsCompleted_m3929307031(__this, /*hidden argument*/NULL);
if (L_0)
{
goto IL_000d;
}
}
{
return (bool)0;
}
IL_000d:
{
Exception_t * L_1 = __this->get__asyncException_3();
return (bool)((((int32_t)((((RuntimeObject*)(RuntimeObject *)NULL) == ((RuntimeObject*)(Exception_t *)L_1))? 1 : 0)) == ((int32_t)0))? 1 : 0);
}
}
// System.Threading.WaitHandle Mono.Security.Protocol.Tls.RecordProtocol/SendRecordAsyncResult::get_AsyncWaitHandle()
extern "C" IL2CPP_METHOD_ATTR WaitHandle_t1743403487 * SendRecordAsyncResult_get_AsyncWaitHandle_m1466641472 (SendRecordAsyncResult_t3718352467 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (SendRecordAsyncResult_get_AsyncWaitHandle_m1466641472_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
RuntimeObject * V_0 = NULL;
Exception_t * __last_unhandled_exception = 0;
NO_UNUSED_WARNING (__last_unhandled_exception);
Exception_t * __exception_local = 0;
NO_UNUSED_WARNING (__exception_local);
int32_t __leave_target = -1;
NO_UNUSED_WARNING (__leave_target);
{
RuntimeObject * L_0 = __this->get_locker_0();
V_0 = L_0;
RuntimeObject * L_1 = V_0;
Monitor_Enter_m2249409497(NULL /*static, unused*/, L_1, /*hidden argument*/NULL);
}
IL_000d:
try
{ // begin try (depth: 1)
{
ManualResetEvent_t451242010 * L_2 = __this->get_handle_4();
if (L_2)
{
goto IL_0029;
}
}
IL_0018:
{
bool L_3 = __this->get_completed_6();
ManualResetEvent_t451242010 * L_4 = (ManualResetEvent_t451242010 *)il2cpp_codegen_object_new(ManualResetEvent_t451242010_il2cpp_TypeInfo_var);
ManualResetEvent__ctor_m4010886457(L_4, L_3, /*hidden argument*/NULL);
__this->set_handle_4(L_4);
}
IL_0029:
{
IL2CPP_LEAVE(0x35, FINALLY_002e);
}
} // end try (depth: 1)
catch(Il2CppExceptionWrapper& e)
{
__last_unhandled_exception = (Exception_t *)e.ex;
goto FINALLY_002e;
}
FINALLY_002e:
{ // begin finally (depth: 1)
RuntimeObject * L_5 = V_0;
Monitor_Exit_m3585316909(NULL /*static, unused*/, L_5, /*hidden argument*/NULL);
IL2CPP_END_FINALLY(46)
} // end finally (depth: 1)
IL2CPP_CLEANUP(46)
{
IL2CPP_JUMP_TBL(0x35, IL_0035)
IL2CPP_RETHROW_IF_UNHANDLED(Exception_t *)
}
IL_0035:
{
ManualResetEvent_t451242010 * L_6 = __this->get_handle_4();
return L_6;
}
}
// System.Boolean Mono.Security.Protocol.Tls.RecordProtocol/SendRecordAsyncResult::get_IsCompleted()
extern "C" IL2CPP_METHOD_ATTR bool SendRecordAsyncResult_get_IsCompleted_m3929307031 (SendRecordAsyncResult_t3718352467 * __this, const RuntimeMethod* method)
{
RuntimeObject * V_0 = NULL;
bool V_1 = false;
Exception_t * __last_unhandled_exception = 0;
NO_UNUSED_WARNING (__last_unhandled_exception);
Exception_t * __exception_local = 0;
NO_UNUSED_WARNING (__exception_local);
int32_t __leave_target = -1;
NO_UNUSED_WARNING (__leave_target);
{
RuntimeObject * L_0 = __this->get_locker_0();
V_0 = L_0;
RuntimeObject * L_1 = V_0;
Monitor_Enter_m2249409497(NULL /*static, unused*/, L_1, /*hidden argument*/NULL);
}
IL_000d:
try
{ // begin try (depth: 1)
{
bool L_2 = __this->get_completed_6();
V_1 = L_2;
IL2CPP_LEAVE(0x25, FINALLY_001e);
}
IL_0019:
{
; // IL_0019: leave IL_0025
}
} // end try (depth: 1)
catch(Il2CppExceptionWrapper& e)
{
__last_unhandled_exception = (Exception_t *)e.ex;
goto FINALLY_001e;
}
FINALLY_001e:
{ // begin finally (depth: 1)
RuntimeObject * L_3 = V_0;
Monitor_Exit_m3585316909(NULL /*static, unused*/, L_3, /*hidden argument*/NULL);
IL2CPP_END_FINALLY(30)
} // end finally (depth: 1)
IL2CPP_CLEANUP(30)
{
IL2CPP_JUMP_TBL(0x25, IL_0025)
IL2CPP_RETHROW_IF_UNHANDLED(Exception_t *)
}
IL_0025:
{
bool L_4 = V_1;
return L_4;
}
}
// System.Void Mono.Security.Protocol.Tls.RecordProtocol/SendRecordAsyncResult::SetComplete(System.Exception)
extern "C" IL2CPP_METHOD_ATTR void SendRecordAsyncResult_SetComplete_m153213906 (SendRecordAsyncResult_t3718352467 * __this, Exception_t * ___ex0, const RuntimeMethod* method)
{
RuntimeObject * V_0 = NULL;
Exception_t * __last_unhandled_exception = 0;
NO_UNUSED_WARNING (__last_unhandled_exception);
Exception_t * __exception_local = 0;
NO_UNUSED_WARNING (__exception_local);
int32_t __leave_target = -1;
NO_UNUSED_WARNING (__leave_target);
{
RuntimeObject * L_0 = __this->get_locker_0();
V_0 = L_0;
RuntimeObject * L_1 = V_0;
Monitor_Enter_m2249409497(NULL /*static, unused*/, L_1, /*hidden argument*/NULL);
}
IL_000d:
try
{ // begin try (depth: 1)
{
bool L_2 = __this->get_completed_6();
if (!L_2)
{
goto IL_001d;
}
}
IL_0018:
{
IL2CPP_LEAVE(0x68, FINALLY_0061);
}
IL_001d:
{
__this->set_completed_6((bool)1);
ManualResetEvent_t451242010 * L_3 = __this->get_handle_4();
if (!L_3)
{
goto IL_003b;
}
}
IL_002f:
{
ManualResetEvent_t451242010 * L_4 = __this->get_handle_4();
EventWaitHandle_Set_m2445193251(L_4, /*hidden argument*/NULL);
}
IL_003b:
{
AsyncCallback_t3962456242 * L_5 = __this->get__userCallback_1();
if (!L_5)
{
goto IL_0055;
}
}
IL_0046:
{
AsyncCallback_t3962456242 * L_6 = __this->get__userCallback_1();
AsyncCallback_BeginInvoke_m2710486612(L_6, __this, (AsyncCallback_t3962456242 *)NULL, NULL, /*hidden argument*/NULL);
}
IL_0055:
{
Exception_t * L_7 = ___ex0;
__this->set__asyncException_3(L_7);
IL2CPP_LEAVE(0x68, FINALLY_0061);
}
} // end try (depth: 1)
catch(Il2CppExceptionWrapper& e)
{
__last_unhandled_exception = (Exception_t *)e.ex;
goto FINALLY_0061;
}
FINALLY_0061:
{ // begin finally (depth: 1)
RuntimeObject * L_8 = V_0;
Monitor_Exit_m3585316909(NULL /*static, unused*/, L_8, /*hidden argument*/NULL);
IL2CPP_END_FINALLY(97)
} // end finally (depth: 1)
IL2CPP_CLEANUP(97)
{
IL2CPP_JUMP_TBL(0x68, IL_0068)
IL2CPP_RETHROW_IF_UNHANDLED(Exception_t *)
}
IL_0068:
{
return;
}
}
// System.Void Mono.Security.Protocol.Tls.RecordProtocol/SendRecordAsyncResult::SetComplete()
extern "C" IL2CPP_METHOD_ATTR void SendRecordAsyncResult_SetComplete_m170417386 (SendRecordAsyncResult_t3718352467 * __this, const RuntimeMethod* method)
{
{
SendRecordAsyncResult_SetComplete_m153213906(__this, (Exception_t *)NULL, /*hidden argument*/NULL);
return;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void Mono.Security.Protocol.Tls.SecurityParameters::.ctor()
extern "C" IL2CPP_METHOD_ATTR void SecurityParameters__ctor_m3952189175 (SecurityParameters_t2199972650 * __this, const RuntimeMethod* method)
{
{
Object__ctor_m297566312(__this, /*hidden argument*/NULL);
return;
}
}
// Mono.Security.Protocol.Tls.CipherSuite Mono.Security.Protocol.Tls.SecurityParameters::get_Cipher()
extern "C" IL2CPP_METHOD_ATTR CipherSuite_t3414744575 * SecurityParameters_get_Cipher_m108846204 (SecurityParameters_t2199972650 * __this, const RuntimeMethod* method)
{
{
CipherSuite_t3414744575 * L_0 = __this->get_cipher_0();
return L_0;
}
}
// System.Void Mono.Security.Protocol.Tls.SecurityParameters::set_Cipher(Mono.Security.Protocol.Tls.CipherSuite)
extern "C" IL2CPP_METHOD_ATTR void SecurityParameters_set_Cipher_m588445085 (SecurityParameters_t2199972650 * __this, CipherSuite_t3414744575 * ___value0, const RuntimeMethod* method)
{
{
CipherSuite_t3414744575 * L_0 = ___value0;
__this->set_cipher_0(L_0);
return;
}
}
// System.Byte[] Mono.Security.Protocol.Tls.SecurityParameters::get_ClientWriteMAC()
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* SecurityParameters_get_ClientWriteMAC_m225554750 (SecurityParameters_t2199972650 * __this, const RuntimeMethod* method)
{
{
ByteU5BU5D_t4116647657* L_0 = __this->get_clientWriteMAC_1();
return L_0;
}
}
// System.Void Mono.Security.Protocol.Tls.SecurityParameters::set_ClientWriteMAC(System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void SecurityParameters_set_ClientWriteMAC_m2984527188 (SecurityParameters_t2199972650 * __this, ByteU5BU5D_t4116647657* ___value0, const RuntimeMethod* method)
{
{
ByteU5BU5D_t4116647657* L_0 = ___value0;
__this->set_clientWriteMAC_1(L_0);
return;
}
}
// System.Byte[] Mono.Security.Protocol.Tls.SecurityParameters::get_ServerWriteMAC()
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* SecurityParameters_get_ServerWriteMAC_m3430427271 (SecurityParameters_t2199972650 * __this, const RuntimeMethod* method)
{
{
ByteU5BU5D_t4116647657* L_0 = __this->get_serverWriteMAC_2();
return L_0;
}
}
// System.Void Mono.Security.Protocol.Tls.SecurityParameters::set_ServerWriteMAC(System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void SecurityParameters_set_ServerWriteMAC_m3003817350 (SecurityParameters_t2199972650 * __this, ByteU5BU5D_t4116647657* ___value0, const RuntimeMethod* method)
{
{
ByteU5BU5D_t4116647657* L_0 = ___value0;
__this->set_serverWriteMAC_2(L_0);
return;
}
}
// System.Void Mono.Security.Protocol.Tls.SecurityParameters::Clear()
extern "C" IL2CPP_METHOD_ATTR void SecurityParameters_Clear_m680574382 (SecurityParameters_t2199972650 * __this, const RuntimeMethod* method)
{
{
__this->set_cipher_0((CipherSuite_t3414744575 *)NULL);
return;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void Mono.Security.Protocol.Tls.SslCipherSuite::.ctor(System.Int16,System.String,Mono.Security.Protocol.Tls.CipherAlgorithmType,Mono.Security.Protocol.Tls.HashAlgorithmType,Mono.Security.Protocol.Tls.ExchangeAlgorithmType,System.Boolean,System.Boolean,System.Byte,System.Byte,System.Int16,System.Byte,System.Byte)
extern "C" IL2CPP_METHOD_ATTR void SslCipherSuite__ctor_m1470082018 (SslCipherSuite_t1981645747 * __this, int16_t ___code0, String_t* ___name1, int32_t ___cipherAlgorithmType2, int32_t ___hashAlgorithmType3, int32_t ___exchangeAlgorithmType4, bool ___exportable5, bool ___blockMode6, uint8_t ___keyMaterialSize7, uint8_t ___expandedKeyMaterialSize8, int16_t ___effectiveKeyBytes9, uint8_t ___ivSize10, uint8_t ___blockSize11, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (SslCipherSuite__ctor_m1470082018_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
int32_t V_0 = 0;
int32_t V_1 = 0;
int32_t G_B3_0 = 0;
{
int16_t L_0 = ___code0;
String_t* L_1 = ___name1;
int32_t L_2 = ___cipherAlgorithmType2;
int32_t L_3 = ___hashAlgorithmType3;
int32_t L_4 = ___exchangeAlgorithmType4;
bool L_5 = ___exportable5;
bool L_6 = ___blockMode6;
uint8_t L_7 = ___keyMaterialSize7;
uint8_t L_8 = ___expandedKeyMaterialSize8;
int16_t L_9 = ___effectiveKeyBytes9;
uint8_t L_10 = ___ivSize10;
uint8_t L_11 = ___blockSize11;
IL2CPP_RUNTIME_CLASS_INIT(CipherSuite_t3414744575_il2cpp_TypeInfo_var);
CipherSuite__ctor_m2440635082(__this, L_0, L_1, L_2, L_3, L_4, L_5, L_6, L_7, L_8, L_9, L_10, L_11, /*hidden argument*/NULL);
int32_t L_12 = ___hashAlgorithmType3;
if (L_12)
{
goto IL_0029;
}
}
{
G_B3_0 = ((int32_t)48);
goto IL_002b;
}
IL_0029:
{
G_B3_0 = ((int32_t)40);
}
IL_002b:
{
V_0 = G_B3_0;
int32_t L_13 = V_0;
ByteU5BU5D_t4116647657* L_14 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)L_13);
__this->set_pad1_21(L_14);
int32_t L_15 = V_0;
ByteU5BU5D_t4116647657* L_16 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)L_15);
__this->set_pad2_22(L_16);
V_1 = 0;
goto IL_0063;
}
IL_004b:
{
ByteU5BU5D_t4116647657* L_17 = __this->get_pad1_21();
int32_t L_18 = V_1;
(L_17)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(L_18), (uint8_t)((int32_t)54));
ByteU5BU5D_t4116647657* L_19 = __this->get_pad2_22();
int32_t L_20 = V_1;
(L_19)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(L_20), (uint8_t)((int32_t)92));
int32_t L_21 = V_1;
V_1 = ((int32_t)il2cpp_codegen_add((int32_t)L_21, (int32_t)1));
}
IL_0063:
{
int32_t L_22 = V_1;
int32_t L_23 = V_0;
if ((((int32_t)L_22) < ((int32_t)L_23)))
{
goto IL_004b;
}
}
{
return;
}
}
// System.Byte[] Mono.Security.Protocol.Tls.SslCipherSuite::ComputeServerRecordMAC(Mono.Security.Protocol.Tls.ContentType,System.Byte[])
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* SslCipherSuite_ComputeServerRecordMAC_m1297079805 (SslCipherSuite_t1981645747 * __this, uint8_t ___contentType0, ByteU5BU5D_t4116647657* ___fragment1, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (SslCipherSuite_ComputeServerRecordMAC_m1297079805_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
HashAlgorithm_t1432317219 * V_0 = NULL;
ByteU5BU5D_t4116647657* V_1 = NULL;
uint64_t V_2 = 0;
ByteU5BU5D_t4116647657* V_3 = NULL;
uint64_t G_B5_0 = 0;
{
String_t* L_0 = CipherSuite_get_HashAlgorithmName_m3758129154(__this, /*hidden argument*/NULL);
HashAlgorithm_t1432317219 * L_1 = HashAlgorithm_Create_m644612360(NULL /*static, unused*/, L_0, /*hidden argument*/NULL);
V_0 = L_1;
Context_t3971234707 * L_2 = CipherSuite_get_Context_m1621551997(__this, /*hidden argument*/NULL);
SecurityParameters_t2199972650 * L_3 = Context_get_Read_m4172356735(L_2, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_4 = SecurityParameters_get_ServerWriteMAC_m3430427271(L_3, /*hidden argument*/NULL);
V_1 = L_4;
HashAlgorithm_t1432317219 * L_5 = V_0;
ByteU5BU5D_t4116647657* L_6 = V_1;
ByteU5BU5D_t4116647657* L_7 = V_1;
ByteU5BU5D_t4116647657* L_8 = V_1;
HashAlgorithm_TransformBlock_m4006041779(L_5, L_6, 0, (((int32_t)((int32_t)(((RuntimeArray *)L_7)->max_length)))), L_8, 0, /*hidden argument*/NULL);
HashAlgorithm_t1432317219 * L_9 = V_0;
ByteU5BU5D_t4116647657* L_10 = __this->get_pad1_21();
ByteU5BU5D_t4116647657* L_11 = __this->get_pad1_21();
ByteU5BU5D_t4116647657* L_12 = __this->get_pad1_21();
HashAlgorithm_TransformBlock_m4006041779(L_9, L_10, 0, (((int32_t)((int32_t)(((RuntimeArray *)L_11)->max_length)))), L_12, 0, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_13 = __this->get_header_23();
if (L_13)
{
goto IL_0060;
}
}
{
ByteU5BU5D_t4116647657* L_14 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)((int32_t)11));
__this->set_header_23(L_14);
}
IL_0060:
{
Context_t3971234707 * L_15 = CipherSuite_get_Context_m1621551997(__this, /*hidden argument*/NULL);
if (!((ClientContext_t2797401965 *)IsInstClass((RuntimeObject*)L_15, ClientContext_t2797401965_il2cpp_TypeInfo_var)))
{
goto IL_0080;
}
}
{
Context_t3971234707 * L_16 = CipherSuite_get_Context_m1621551997(__this, /*hidden argument*/NULL);
uint64_t L_17 = Context_get_ReadSequenceNumber_m3883329199(L_16, /*hidden argument*/NULL);
G_B5_0 = L_17;
goto IL_008b;
}
IL_0080:
{
Context_t3971234707 * L_18 = CipherSuite_get_Context_m1621551997(__this, /*hidden argument*/NULL);
uint64_t L_19 = Context_get_WriteSequenceNumber_m1115956887(L_18, /*hidden argument*/NULL);
G_B5_0 = L_19;
}
IL_008b:
{
V_2 = G_B5_0;
ByteU5BU5D_t4116647657* L_20 = __this->get_header_23();
uint64_t L_21 = V_2;
CipherSuite_Write_m1841735015(__this, L_20, 0, L_21, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_22 = __this->get_header_23();
uint8_t L_23 = ___contentType0;
(L_22)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(8), (uint8_t)L_23);
ByteU5BU5D_t4116647657* L_24 = __this->get_header_23();
ByteU5BU5D_t4116647657* L_25 = ___fragment1;
CipherSuite_Write_m1172814058(__this, L_24, ((int32_t)9), (((int16_t)((int16_t)(((int32_t)((int32_t)(((RuntimeArray *)L_25)->max_length))))))), /*hidden argument*/NULL);
HashAlgorithm_t1432317219 * L_26 = V_0;
ByteU5BU5D_t4116647657* L_27 = __this->get_header_23();
ByteU5BU5D_t4116647657* L_28 = __this->get_header_23();
ByteU5BU5D_t4116647657* L_29 = __this->get_header_23();
HashAlgorithm_TransformBlock_m4006041779(L_26, L_27, 0, (((int32_t)((int32_t)(((RuntimeArray *)L_28)->max_length)))), L_29, 0, /*hidden argument*/NULL);
HashAlgorithm_t1432317219 * L_30 = V_0;
ByteU5BU5D_t4116647657* L_31 = ___fragment1;
ByteU5BU5D_t4116647657* L_32 = ___fragment1;
ByteU5BU5D_t4116647657* L_33 = ___fragment1;
HashAlgorithm_TransformBlock_m4006041779(L_30, L_31, 0, (((int32_t)((int32_t)(((RuntimeArray *)L_32)->max_length)))), L_33, 0, /*hidden argument*/NULL);
HashAlgorithm_t1432317219 * L_34 = V_0;
IL2CPP_RUNTIME_CLASS_INIT(CipherSuite_t3414744575_il2cpp_TypeInfo_var);
ByteU5BU5D_t4116647657* L_35 = ((CipherSuite_t3414744575_StaticFields*)il2cpp_codegen_static_fields_for(CipherSuite_t3414744575_il2cpp_TypeInfo_var))->get_EmptyArray_0();
HashAlgorithm_TransformFinalBlock_m3005451348(L_34, L_35, 0, 0, /*hidden argument*/NULL);
HashAlgorithm_t1432317219 * L_36 = V_0;
ByteU5BU5D_t4116647657* L_37 = VirtFuncInvoker0< ByteU5BU5D_t4116647657* >::Invoke(9 /* System.Byte[] System.Security.Cryptography.HashAlgorithm::get_Hash() */, L_36);
V_3 = L_37;
HashAlgorithm_t1432317219 * L_38 = V_0;
VirtActionInvoker0::Invoke(13 /* System.Void System.Security.Cryptography.HashAlgorithm::Initialize() */, L_38);
HashAlgorithm_t1432317219 * L_39 = V_0;
ByteU5BU5D_t4116647657* L_40 = V_1;
ByteU5BU5D_t4116647657* L_41 = V_1;
ByteU5BU5D_t4116647657* L_42 = V_1;
HashAlgorithm_TransformBlock_m4006041779(L_39, L_40, 0, (((int32_t)((int32_t)(((RuntimeArray *)L_41)->max_length)))), L_42, 0, /*hidden argument*/NULL);
HashAlgorithm_t1432317219 * L_43 = V_0;
ByteU5BU5D_t4116647657* L_44 = __this->get_pad2_22();
ByteU5BU5D_t4116647657* L_45 = __this->get_pad2_22();
ByteU5BU5D_t4116647657* L_46 = __this->get_pad2_22();
HashAlgorithm_TransformBlock_m4006041779(L_43, L_44, 0, (((int32_t)((int32_t)(((RuntimeArray *)L_45)->max_length)))), L_46, 0, /*hidden argument*/NULL);
HashAlgorithm_t1432317219 * L_47 = V_0;
ByteU5BU5D_t4116647657* L_48 = V_3;
ByteU5BU5D_t4116647657* L_49 = V_3;
ByteU5BU5D_t4116647657* L_50 = V_3;
HashAlgorithm_TransformBlock_m4006041779(L_47, L_48, 0, (((int32_t)((int32_t)(((RuntimeArray *)L_49)->max_length)))), L_50, 0, /*hidden argument*/NULL);
HashAlgorithm_t1432317219 * L_51 = V_0;
ByteU5BU5D_t4116647657* L_52 = ((CipherSuite_t3414744575_StaticFields*)il2cpp_codegen_static_fields_for(CipherSuite_t3414744575_il2cpp_TypeInfo_var))->get_EmptyArray_0();
HashAlgorithm_TransformFinalBlock_m3005451348(L_51, L_52, 0, 0, /*hidden argument*/NULL);
HashAlgorithm_t1432317219 * L_53 = V_0;
ByteU5BU5D_t4116647657* L_54 = VirtFuncInvoker0< ByteU5BU5D_t4116647657* >::Invoke(9 /* System.Byte[] System.Security.Cryptography.HashAlgorithm::get_Hash() */, L_53);
return L_54;
}
}
// System.Byte[] Mono.Security.Protocol.Tls.SslCipherSuite::ComputeClientRecordMAC(Mono.Security.Protocol.Tls.ContentType,System.Byte[])
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* SslCipherSuite_ComputeClientRecordMAC_m3756410489 (SslCipherSuite_t1981645747 * __this, uint8_t ___contentType0, ByteU5BU5D_t4116647657* ___fragment1, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (SslCipherSuite_ComputeClientRecordMAC_m3756410489_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
HashAlgorithm_t1432317219 * V_0 = NULL;
ByteU5BU5D_t4116647657* V_1 = NULL;
uint64_t V_2 = 0;
ByteU5BU5D_t4116647657* V_3 = NULL;
uint64_t G_B5_0 = 0;
{
String_t* L_0 = CipherSuite_get_HashAlgorithmName_m3758129154(__this, /*hidden argument*/NULL);
HashAlgorithm_t1432317219 * L_1 = HashAlgorithm_Create_m644612360(NULL /*static, unused*/, L_0, /*hidden argument*/NULL);
V_0 = L_1;
Context_t3971234707 * L_2 = CipherSuite_get_Context_m1621551997(__this, /*hidden argument*/NULL);
SecurityParameters_t2199972650 * L_3 = Context_get_Current_m2853615040(L_2, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_4 = SecurityParameters_get_ClientWriteMAC_m225554750(L_3, /*hidden argument*/NULL);
V_1 = L_4;
HashAlgorithm_t1432317219 * L_5 = V_0;
ByteU5BU5D_t4116647657* L_6 = V_1;
ByteU5BU5D_t4116647657* L_7 = V_1;
ByteU5BU5D_t4116647657* L_8 = V_1;
HashAlgorithm_TransformBlock_m4006041779(L_5, L_6, 0, (((int32_t)((int32_t)(((RuntimeArray *)L_7)->max_length)))), L_8, 0, /*hidden argument*/NULL);
HashAlgorithm_t1432317219 * L_9 = V_0;
ByteU5BU5D_t4116647657* L_10 = __this->get_pad1_21();
ByteU5BU5D_t4116647657* L_11 = __this->get_pad1_21();
ByteU5BU5D_t4116647657* L_12 = __this->get_pad1_21();
HashAlgorithm_TransformBlock_m4006041779(L_9, L_10, 0, (((int32_t)((int32_t)(((RuntimeArray *)L_11)->max_length)))), L_12, 0, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_13 = __this->get_header_23();
if (L_13)
{
goto IL_0060;
}
}
{
ByteU5BU5D_t4116647657* L_14 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)((int32_t)11));
__this->set_header_23(L_14);
}
IL_0060:
{
Context_t3971234707 * L_15 = CipherSuite_get_Context_m1621551997(__this, /*hidden argument*/NULL);
if (!((ClientContext_t2797401965 *)IsInstClass((RuntimeObject*)L_15, ClientContext_t2797401965_il2cpp_TypeInfo_var)))
{
goto IL_0080;
}
}
{
Context_t3971234707 * L_16 = CipherSuite_get_Context_m1621551997(__this, /*hidden argument*/NULL);
uint64_t L_17 = Context_get_WriteSequenceNumber_m1115956887(L_16, /*hidden argument*/NULL);
G_B5_0 = L_17;
goto IL_008b;
}
IL_0080:
{
Context_t3971234707 * L_18 = CipherSuite_get_Context_m1621551997(__this, /*hidden argument*/NULL);
uint64_t L_19 = Context_get_ReadSequenceNumber_m3883329199(L_18, /*hidden argument*/NULL);
G_B5_0 = L_19;
}
IL_008b:
{
V_2 = G_B5_0;
ByteU5BU5D_t4116647657* L_20 = __this->get_header_23();
uint64_t L_21 = V_2;
CipherSuite_Write_m1841735015(__this, L_20, 0, L_21, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_22 = __this->get_header_23();
uint8_t L_23 = ___contentType0;
(L_22)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(8), (uint8_t)L_23);
ByteU5BU5D_t4116647657* L_24 = __this->get_header_23();
ByteU5BU5D_t4116647657* L_25 = ___fragment1;
CipherSuite_Write_m1172814058(__this, L_24, ((int32_t)9), (((int16_t)((int16_t)(((int32_t)((int32_t)(((RuntimeArray *)L_25)->max_length))))))), /*hidden argument*/NULL);
HashAlgorithm_t1432317219 * L_26 = V_0;
ByteU5BU5D_t4116647657* L_27 = __this->get_header_23();
ByteU5BU5D_t4116647657* L_28 = __this->get_header_23();
ByteU5BU5D_t4116647657* L_29 = __this->get_header_23();
HashAlgorithm_TransformBlock_m4006041779(L_26, L_27, 0, (((int32_t)((int32_t)(((RuntimeArray *)L_28)->max_length)))), L_29, 0, /*hidden argument*/NULL);
HashAlgorithm_t1432317219 * L_30 = V_0;
ByteU5BU5D_t4116647657* L_31 = ___fragment1;
ByteU5BU5D_t4116647657* L_32 = ___fragment1;
ByteU5BU5D_t4116647657* L_33 = ___fragment1;
HashAlgorithm_TransformBlock_m4006041779(L_30, L_31, 0, (((int32_t)((int32_t)(((RuntimeArray *)L_32)->max_length)))), L_33, 0, /*hidden argument*/NULL);
HashAlgorithm_t1432317219 * L_34 = V_0;
IL2CPP_RUNTIME_CLASS_INIT(CipherSuite_t3414744575_il2cpp_TypeInfo_var);
ByteU5BU5D_t4116647657* L_35 = ((CipherSuite_t3414744575_StaticFields*)il2cpp_codegen_static_fields_for(CipherSuite_t3414744575_il2cpp_TypeInfo_var))->get_EmptyArray_0();
HashAlgorithm_TransformFinalBlock_m3005451348(L_34, L_35, 0, 0, /*hidden argument*/NULL);
HashAlgorithm_t1432317219 * L_36 = V_0;
ByteU5BU5D_t4116647657* L_37 = VirtFuncInvoker0< ByteU5BU5D_t4116647657* >::Invoke(9 /* System.Byte[] System.Security.Cryptography.HashAlgorithm::get_Hash() */, L_36);
V_3 = L_37;
HashAlgorithm_t1432317219 * L_38 = V_0;
VirtActionInvoker0::Invoke(13 /* System.Void System.Security.Cryptography.HashAlgorithm::Initialize() */, L_38);
HashAlgorithm_t1432317219 * L_39 = V_0;
ByteU5BU5D_t4116647657* L_40 = V_1;
ByteU5BU5D_t4116647657* L_41 = V_1;
ByteU5BU5D_t4116647657* L_42 = V_1;
HashAlgorithm_TransformBlock_m4006041779(L_39, L_40, 0, (((int32_t)((int32_t)(((RuntimeArray *)L_41)->max_length)))), L_42, 0, /*hidden argument*/NULL);
HashAlgorithm_t1432317219 * L_43 = V_0;
ByteU5BU5D_t4116647657* L_44 = __this->get_pad2_22();
ByteU5BU5D_t4116647657* L_45 = __this->get_pad2_22();
ByteU5BU5D_t4116647657* L_46 = __this->get_pad2_22();
HashAlgorithm_TransformBlock_m4006041779(L_43, L_44, 0, (((int32_t)((int32_t)(((RuntimeArray *)L_45)->max_length)))), L_46, 0, /*hidden argument*/NULL);
HashAlgorithm_t1432317219 * L_47 = V_0;
ByteU5BU5D_t4116647657* L_48 = V_3;
ByteU5BU5D_t4116647657* L_49 = V_3;
ByteU5BU5D_t4116647657* L_50 = V_3;
HashAlgorithm_TransformBlock_m4006041779(L_47, L_48, 0, (((int32_t)((int32_t)(((RuntimeArray *)L_49)->max_length)))), L_50, 0, /*hidden argument*/NULL);
HashAlgorithm_t1432317219 * L_51 = V_0;
ByteU5BU5D_t4116647657* L_52 = ((CipherSuite_t3414744575_StaticFields*)il2cpp_codegen_static_fields_for(CipherSuite_t3414744575_il2cpp_TypeInfo_var))->get_EmptyArray_0();
HashAlgorithm_TransformFinalBlock_m3005451348(L_51, L_52, 0, 0, /*hidden argument*/NULL);
HashAlgorithm_t1432317219 * L_53 = V_0;
ByteU5BU5D_t4116647657* L_54 = VirtFuncInvoker0< ByteU5BU5D_t4116647657* >::Invoke(9 /* System.Byte[] System.Security.Cryptography.HashAlgorithm::get_Hash() */, L_53);
return L_54;
}
}
// System.Void Mono.Security.Protocol.Tls.SslCipherSuite::ComputeMasterSecret(System.Byte[])
extern "C" IL2CPP_METHOD_ATTR void SslCipherSuite_ComputeMasterSecret_m3963626850 (SslCipherSuite_t1981645747 * __this, ByteU5BU5D_t4116647657* ___preMasterSecret0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (SslCipherSuite_ComputeMasterSecret_m3963626850_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
TlsStream_t2365453965 * V_0 = NULL;
{
TlsStream_t2365453965 * L_0 = (TlsStream_t2365453965 *)il2cpp_codegen_object_new(TlsStream_t2365453965_il2cpp_TypeInfo_var);
TlsStream__ctor_m787793111(L_0, /*hidden argument*/NULL);
V_0 = L_0;
TlsStream_t2365453965 * L_1 = V_0;
ByteU5BU5D_t4116647657* L_2 = ___preMasterSecret0;
Context_t3971234707 * L_3 = CipherSuite_get_Context_m1621551997(__this, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_4 = Context_get_RandomCS_m1367948315(L_3, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_5 = SslCipherSuite_prf_m922878400(__this, L_2, _stringLiteral3452614623, L_4, /*hidden argument*/NULL);
TlsStream_Write_m4133894341(L_1, L_5, /*hidden argument*/NULL);
TlsStream_t2365453965 * L_6 = V_0;
ByteU5BU5D_t4116647657* L_7 = ___preMasterSecret0;
Context_t3971234707 * L_8 = CipherSuite_get_Context_m1621551997(__this, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_9 = Context_get_RandomCS_m1367948315(L_8, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_10 = SslCipherSuite_prf_m922878400(__this, L_7, _stringLiteral3456677854, L_9, /*hidden argument*/NULL);
TlsStream_Write_m4133894341(L_6, L_10, /*hidden argument*/NULL);
TlsStream_t2365453965 * L_11 = V_0;
ByteU5BU5D_t4116647657* L_12 = ___preMasterSecret0;
Context_t3971234707 * L_13 = CipherSuite_get_Context_m1621551997(__this, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_14 = Context_get_RandomCS_m1367948315(L_13, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_15 = SslCipherSuite_prf_m922878400(__this, L_12, _stringLiteral3409069272, L_14, /*hidden argument*/NULL);
TlsStream_Write_m4133894341(L_11, L_15, /*hidden argument*/NULL);
Context_t3971234707 * L_16 = CipherSuite_get_Context_m1621551997(__this, /*hidden argument*/NULL);
TlsStream_t2365453965 * L_17 = V_0;
ByteU5BU5D_t4116647657* L_18 = TlsStream_ToArray_m4177184296(L_17, /*hidden argument*/NULL);
Context_set_MasterSecret_m3419105191(L_16, L_18, /*hidden argument*/NULL);
return;
}
}
// System.Void Mono.Security.Protocol.Tls.SslCipherSuite::ComputeKeys()
extern "C" IL2CPP_METHOD_ATTR void SslCipherSuite_ComputeKeys_m661027754 (SslCipherSuite_t1981645747 * __this, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (SslCipherSuite_ComputeKeys_m661027754_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
TlsStream_t2365453965 * V_0 = NULL;
Il2CppChar V_1 = 0x0;
int32_t V_2 = 0;
String_t* V_3 = NULL;
int32_t V_4 = 0;
ByteU5BU5D_t4116647657* V_5 = NULL;
int32_t V_6 = 0;
TlsStream_t2365453965 * V_7 = NULL;
HashAlgorithm_t1432317219 * V_8 = NULL;
int32_t V_9 = 0;
ByteU5BU5D_t4116647657* V_10 = NULL;
ByteU5BU5D_t4116647657* V_11 = NULL;
ByteU5BU5D_t4116647657* V_12 = NULL;
int32_t G_B7_0 = 0;
{
TlsStream_t2365453965 * L_0 = (TlsStream_t2365453965 *)il2cpp_codegen_object_new(TlsStream_t2365453965_il2cpp_TypeInfo_var);
TlsStream__ctor_m787793111(L_0, /*hidden argument*/NULL);
V_0 = L_0;
V_1 = ((int32_t)65);
V_2 = 1;
goto IL_00a3;
}
IL_0010:
{
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_1 = ((String_t_StaticFields*)il2cpp_codegen_static_fields_for(String_t_il2cpp_TypeInfo_var))->get_Empty_2();
V_3 = L_1;
V_4 = 0;
goto IL_0032;
}
IL_001e:
{
String_t* L_2 = V_3;
String_t* L_3 = Char_ToString_m3588025615((Il2CppChar*)(&V_1), /*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(String_t_il2cpp_TypeInfo_var);
String_t* L_4 = String_Concat_m3937257545(NULL /*static, unused*/, L_2, L_3, /*hidden argument*/NULL);
V_3 = L_4;
int32_t L_5 = V_4;
V_4 = ((int32_t)il2cpp_codegen_add((int32_t)L_5, (int32_t)1));
}
IL_0032:
{
int32_t L_6 = V_4;
int32_t L_7 = V_2;
if ((((int32_t)L_6) < ((int32_t)L_7)))
{
goto IL_001e;
}
}
{
Context_t3971234707 * L_8 = CipherSuite_get_Context_m1621551997(__this, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_9 = Context_get_MasterSecret_m676083615(L_8, /*hidden argument*/NULL);
String_t* L_10 = V_3;
String_t* L_11 = String_ToString_m838249115(L_10, /*hidden argument*/NULL);
Context_t3971234707 * L_12 = CipherSuite_get_Context_m1621551997(__this, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_13 = Context_get_RandomSC_m1891758699(L_12, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_14 = SslCipherSuite_prf_m922878400(__this, L_9, L_11, L_13, /*hidden argument*/NULL);
V_5 = L_14;
TlsStream_t2365453965 * L_15 = V_0;
int64_t L_16 = VirtFuncInvoker0< int64_t >::Invoke(8 /* System.Int64 Mono.Security.Protocol.Tls.TlsStream::get_Length() */, L_15);
ByteU5BU5D_t4116647657* L_17 = V_5;
int32_t L_18 = CipherSuite_get_KeyBlockSize_m519075451(__this, /*hidden argument*/NULL);
if ((((int64_t)((int64_t)il2cpp_codegen_add((int64_t)L_16, (int64_t)(((int64_t)((int64_t)(((int32_t)((int32_t)(((RuntimeArray *)L_17)->max_length)))))))))) <= ((int64_t)(((int64_t)((int64_t)L_18))))))
{
goto IL_0089;
}
}
{
int32_t L_19 = CipherSuite_get_KeyBlockSize_m519075451(__this, /*hidden argument*/NULL);
TlsStream_t2365453965 * L_20 = V_0;
int64_t L_21 = VirtFuncInvoker0< int64_t >::Invoke(8 /* System.Int64 Mono.Security.Protocol.Tls.TlsStream::get_Length() */, L_20);
G_B7_0 = ((int32_t)il2cpp_codegen_subtract((int32_t)L_19, (int32_t)(((int32_t)((int32_t)L_21)))));
goto IL_008d;
}
IL_0089:
{
ByteU5BU5D_t4116647657* L_22 = V_5;
G_B7_0 = (((int32_t)((int32_t)(((RuntimeArray *)L_22)->max_length))));
}
IL_008d:
{
V_6 = G_B7_0;
TlsStream_t2365453965 * L_23 = V_0;
ByteU5BU5D_t4116647657* L_24 = V_5;
int32_t L_25 = V_6;
VirtActionInvoker3< ByteU5BU5D_t4116647657*, int32_t, int32_t >::Invoke(18 /* System.Void Mono.Security.Protocol.Tls.TlsStream::Write(System.Byte[],System.Int32,System.Int32) */, L_23, L_24, 0, L_25);
Il2CppChar L_26 = V_1;
V_1 = (((int32_t)((uint16_t)((int32_t)il2cpp_codegen_add((int32_t)L_26, (int32_t)1)))));
int32_t L_27 = V_2;
V_2 = ((int32_t)il2cpp_codegen_add((int32_t)L_27, (int32_t)1));
}
IL_00a3:
{
TlsStream_t2365453965 * L_28 = V_0;
int64_t L_29 = VirtFuncInvoker0< int64_t >::Invoke(8 /* System.Int64 Mono.Security.Protocol.Tls.TlsStream::get_Length() */, L_28);
int32_t L_30 = CipherSuite_get_KeyBlockSize_m519075451(__this, /*hidden argument*/NULL);
if ((((int64_t)L_29) < ((int64_t)(((int64_t)((int64_t)L_30))))))
{
goto IL_0010;
}
}
{
TlsStream_t2365453965 * L_31 = V_0;
ByteU5BU5D_t4116647657* L_32 = TlsStream_ToArray_m4177184296(L_31, /*hidden argument*/NULL);
TlsStream_t2365453965 * L_33 = (TlsStream_t2365453965 *)il2cpp_codegen_object_new(TlsStream_t2365453965_il2cpp_TypeInfo_var);
TlsStream__ctor_m277557575(L_33, L_32, /*hidden argument*/NULL);
V_7 = L_33;
Context_t3971234707 * L_34 = CipherSuite_get_Context_m1621551997(__this, /*hidden argument*/NULL);
SecurityParameters_t2199972650 * L_35 = Context_get_Negotiating_m2044579817(L_34, /*hidden argument*/NULL);
TlsStream_t2365453965 * L_36 = V_7;
int32_t L_37 = CipherSuite_get_HashSize_m4060916532(__this, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_38 = TlsStream_ReadBytes_m2334803179(L_36, L_37, /*hidden argument*/NULL);
SecurityParameters_set_ClientWriteMAC_m2984527188(L_35, L_38, /*hidden argument*/NULL);
Context_t3971234707 * L_39 = CipherSuite_get_Context_m1621551997(__this, /*hidden argument*/NULL);
SecurityParameters_t2199972650 * L_40 = Context_get_Negotiating_m2044579817(L_39, /*hidden argument*/NULL);
TlsStream_t2365453965 * L_41 = V_7;
int32_t L_42 = CipherSuite_get_HashSize_m4060916532(__this, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_43 = TlsStream_ReadBytes_m2334803179(L_41, L_42, /*hidden argument*/NULL);
SecurityParameters_set_ServerWriteMAC_m3003817350(L_40, L_43, /*hidden argument*/NULL);
Context_t3971234707 * L_44 = CipherSuite_get_Context_m1621551997(__this, /*hidden argument*/NULL);
TlsStream_t2365453965 * L_45 = V_7;
uint8_t L_46 = CipherSuite_get_KeyMaterialSize_m3569550689(__this, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_47 = TlsStream_ReadBytes_m2334803179(L_45, L_46, /*hidden argument*/NULL);
Context_set_ClientWriteKey_m1601425248(L_44, L_47, /*hidden argument*/NULL);
Context_t3971234707 * L_48 = CipherSuite_get_Context_m1621551997(__this, /*hidden argument*/NULL);
TlsStream_t2365453965 * L_49 = V_7;
uint8_t L_50 = CipherSuite_get_KeyMaterialSize_m3569550689(__this, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_51 = TlsStream_ReadBytes_m2334803179(L_49, L_50, /*hidden argument*/NULL);
Context_set_ServerWriteKey_m3347272648(L_48, L_51, /*hidden argument*/NULL);
bool L_52 = CipherSuite_get_IsExportable_m677202963(__this, /*hidden argument*/NULL);
if (L_52)
{
goto IL_019c;
}
}
{
uint8_t L_53 = CipherSuite_get_IvSize_m630778063(__this, /*hidden argument*/NULL);
if (!L_53)
{
goto IL_0177;
}
}
{
Context_t3971234707 * L_54 = CipherSuite_get_Context_m1621551997(__this, /*hidden argument*/NULL);
TlsStream_t2365453965 * L_55 = V_7;
uint8_t L_56 = CipherSuite_get_IvSize_m630778063(__this, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_57 = TlsStream_ReadBytes_m2334803179(L_55, L_56, /*hidden argument*/NULL);
Context_set_ClientWriteIV_m3405909624(L_54, L_57, /*hidden argument*/NULL);
Context_t3971234707 * L_58 = CipherSuite_get_Context_m1621551997(__this, /*hidden argument*/NULL);
TlsStream_t2365453965 * L_59 = V_7;
uint8_t L_60 = CipherSuite_get_IvSize_m630778063(__this, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_61 = TlsStream_ReadBytes_m2334803179(L_59, L_60, /*hidden argument*/NULL);
Context_set_ServerWriteIV_m1007123427(L_58, L_61, /*hidden argument*/NULL);
goto IL_0197;
}
IL_0177:
{
Context_t3971234707 * L_62 = CipherSuite_get_Context_m1621551997(__this, /*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(CipherSuite_t3414744575_il2cpp_TypeInfo_var);
ByteU5BU5D_t4116647657* L_63 = ((CipherSuite_t3414744575_StaticFields*)il2cpp_codegen_static_fields_for(CipherSuite_t3414744575_il2cpp_TypeInfo_var))->get_EmptyArray_0();
Context_set_ClientWriteIV_m3405909624(L_62, L_63, /*hidden argument*/NULL);
Context_t3971234707 * L_64 = CipherSuite_get_Context_m1621551997(__this, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_65 = ((CipherSuite_t3414744575_StaticFields*)il2cpp_codegen_static_fields_for(CipherSuite_t3414744575_il2cpp_TypeInfo_var))->get_EmptyArray_0();
Context_set_ServerWriteIV_m1007123427(L_64, L_65, /*hidden argument*/NULL);
}
IL_0197:
{
goto IL_038b;
}
IL_019c:
{
MD5_t3177620429 * L_66 = MD5_Create_m3522414168(NULL /*static, unused*/, /*hidden argument*/NULL);
V_8 = L_66;
HashAlgorithm_t1432317219 * L_67 = V_8;
int32_t L_68 = VirtFuncInvoker0< int32_t >::Invoke(12 /* System.Int32 System.Security.Cryptography.HashAlgorithm::get_HashSize() */, L_67);
V_9 = ((int32_t)((int32_t)L_68>>(int32_t)3));
int32_t L_69 = V_9;
ByteU5BU5D_t4116647657* L_70 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)L_69);
V_10 = L_70;
HashAlgorithm_t1432317219 * L_71 = V_8;
Context_t3971234707 * L_72 = CipherSuite_get_Context_m1621551997(__this, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_73 = Context_get_ClientWriteKey_m3174706656(L_72, /*hidden argument*/NULL);
Context_t3971234707 * L_74 = CipherSuite_get_Context_m1621551997(__this, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_75 = Context_get_ClientWriteKey_m3174706656(L_74, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_76 = V_10;
HashAlgorithm_TransformBlock_m4006041779(L_71, L_73, 0, (((int32_t)((int32_t)(((RuntimeArray *)L_75)->max_length)))), L_76, 0, /*hidden argument*/NULL);
HashAlgorithm_t1432317219 * L_77 = V_8;
Context_t3971234707 * L_78 = CipherSuite_get_Context_m1621551997(__this, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_79 = Context_get_RandomCS_m1367948315(L_78, /*hidden argument*/NULL);
Context_t3971234707 * L_80 = CipherSuite_get_Context_m1621551997(__this, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_81 = Context_get_RandomCS_m1367948315(L_80, /*hidden argument*/NULL);
HashAlgorithm_TransformFinalBlock_m3005451348(L_77, L_79, 0, (((int32_t)((int32_t)(((RuntimeArray *)L_81)->max_length)))), /*hidden argument*/NULL);
uint8_t L_82 = CipherSuite_get_ExpandedKeyMaterialSize_m197590106(__this, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_83 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)L_82);
V_11 = L_83;
HashAlgorithm_t1432317219 * L_84 = V_8;
ByteU5BU5D_t4116647657* L_85 = VirtFuncInvoker0< ByteU5BU5D_t4116647657* >::Invoke(9 /* System.Byte[] System.Security.Cryptography.HashAlgorithm::get_Hash() */, L_84);
ByteU5BU5D_t4116647657* L_86 = V_11;
uint8_t L_87 = CipherSuite_get_ExpandedKeyMaterialSize_m197590106(__this, /*hidden argument*/NULL);
Buffer_BlockCopy_m2884209081(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_85, 0, (RuntimeArray *)(RuntimeArray *)L_86, 0, L_87, /*hidden argument*/NULL);
HashAlgorithm_t1432317219 * L_88 = V_8;
VirtActionInvoker0::Invoke(13 /* System.Void System.Security.Cryptography.HashAlgorithm::Initialize() */, L_88);
HashAlgorithm_t1432317219 * L_89 = V_8;
Context_t3971234707 * L_90 = CipherSuite_get_Context_m1621551997(__this, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_91 = Context_get_ServerWriteKey_m2199131569(L_90, /*hidden argument*/NULL);
Context_t3971234707 * L_92 = CipherSuite_get_Context_m1621551997(__this, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_93 = Context_get_ServerWriteKey_m2199131569(L_92, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_94 = V_10;
HashAlgorithm_TransformBlock_m4006041779(L_89, L_91, 0, (((int32_t)((int32_t)(((RuntimeArray *)L_93)->max_length)))), L_94, 0, /*hidden argument*/NULL);
HashAlgorithm_t1432317219 * L_95 = V_8;
Context_t3971234707 * L_96 = CipherSuite_get_Context_m1621551997(__this, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_97 = Context_get_RandomSC_m1891758699(L_96, /*hidden argument*/NULL);
Context_t3971234707 * L_98 = CipherSuite_get_Context_m1621551997(__this, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_99 = Context_get_RandomSC_m1891758699(L_98, /*hidden argument*/NULL);
HashAlgorithm_TransformFinalBlock_m3005451348(L_95, L_97, 0, (((int32_t)((int32_t)(((RuntimeArray *)L_99)->max_length)))), /*hidden argument*/NULL);
uint8_t L_100 = CipherSuite_get_ExpandedKeyMaterialSize_m197590106(__this, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_101 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)L_100);
V_12 = L_101;
HashAlgorithm_t1432317219 * L_102 = V_8;
ByteU5BU5D_t4116647657* L_103 = VirtFuncInvoker0< ByteU5BU5D_t4116647657* >::Invoke(9 /* System.Byte[] System.Security.Cryptography.HashAlgorithm::get_Hash() */, L_102);
ByteU5BU5D_t4116647657* L_104 = V_12;
uint8_t L_105 = CipherSuite_get_ExpandedKeyMaterialSize_m197590106(__this, /*hidden argument*/NULL);
Buffer_BlockCopy_m2884209081(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_103, 0, (RuntimeArray *)(RuntimeArray *)L_104, 0, L_105, /*hidden argument*/NULL);
Context_t3971234707 * L_106 = CipherSuite_get_Context_m1621551997(__this, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_107 = V_11;
Context_set_ClientWriteKey_m1601425248(L_106, L_107, /*hidden argument*/NULL);
Context_t3971234707 * L_108 = CipherSuite_get_Context_m1621551997(__this, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_109 = V_12;
Context_set_ServerWriteKey_m3347272648(L_108, L_109, /*hidden argument*/NULL);
uint8_t L_110 = CipherSuite_get_IvSize_m630778063(__this, /*hidden argument*/NULL);
if ((((int32_t)L_110) <= ((int32_t)0)))
{
goto IL_036b;
}
}
{
HashAlgorithm_t1432317219 * L_111 = V_8;
VirtActionInvoker0::Invoke(13 /* System.Void System.Security.Cryptography.HashAlgorithm::Initialize() */, L_111);
HashAlgorithm_t1432317219 * L_112 = V_8;
Context_t3971234707 * L_113 = CipherSuite_get_Context_m1621551997(__this, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_114 = Context_get_RandomCS_m1367948315(L_113, /*hidden argument*/NULL);
Context_t3971234707 * L_115 = CipherSuite_get_Context_m1621551997(__this, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_116 = Context_get_RandomCS_m1367948315(L_115, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_117 = HashAlgorithm_ComputeHash_m2044824070(L_112, L_114, 0, (((int32_t)((int32_t)(((RuntimeArray *)L_116)->max_length)))), /*hidden argument*/NULL);
V_10 = L_117;
Context_t3971234707 * L_118 = CipherSuite_get_Context_m1621551997(__this, /*hidden argument*/NULL);
uint8_t L_119 = CipherSuite_get_IvSize_m630778063(__this, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_120 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)L_119);
Context_set_ClientWriteIV_m3405909624(L_118, L_120, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_121 = V_10;
Context_t3971234707 * L_122 = CipherSuite_get_Context_m1621551997(__this, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_123 = Context_get_ClientWriteIV_m1729804632(L_122, /*hidden argument*/NULL);
uint8_t L_124 = CipherSuite_get_IvSize_m630778063(__this, /*hidden argument*/NULL);
Buffer_BlockCopy_m2884209081(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_121, 0, (RuntimeArray *)(RuntimeArray *)L_123, 0, L_124, /*hidden argument*/NULL);
HashAlgorithm_t1432317219 * L_125 = V_8;
VirtActionInvoker0::Invoke(13 /* System.Void System.Security.Cryptography.HashAlgorithm::Initialize() */, L_125);
HashAlgorithm_t1432317219 * L_126 = V_8;
Context_t3971234707 * L_127 = CipherSuite_get_Context_m1621551997(__this, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_128 = Context_get_RandomSC_m1891758699(L_127, /*hidden argument*/NULL);
Context_t3971234707 * L_129 = CipherSuite_get_Context_m1621551997(__this, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_130 = Context_get_RandomSC_m1891758699(L_129, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_131 = HashAlgorithm_ComputeHash_m2044824070(L_126, L_128, 0, (((int32_t)((int32_t)(((RuntimeArray *)L_130)->max_length)))), /*hidden argument*/NULL);
V_10 = L_131;
Context_t3971234707 * L_132 = CipherSuite_get_Context_m1621551997(__this, /*hidden argument*/NULL);
uint8_t L_133 = CipherSuite_get_IvSize_m630778063(__this, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_134 = (ByteU5BU5D_t4116647657*)SZArrayNew(ByteU5BU5D_t4116647657_il2cpp_TypeInfo_var, (uint32_t)L_133);
Context_set_ServerWriteIV_m1007123427(L_132, L_134, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_135 = V_10;
Context_t3971234707 * L_136 = CipherSuite_get_Context_m1621551997(__this, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_137 = Context_get_ServerWriteIV_m1839374659(L_136, /*hidden argument*/NULL);
uint8_t L_138 = CipherSuite_get_IvSize_m630778063(__this, /*hidden argument*/NULL);
Buffer_BlockCopy_m2884209081(NULL /*static, unused*/, (RuntimeArray *)(RuntimeArray *)L_135, 0, (RuntimeArray *)(RuntimeArray *)L_137, 0, L_138, /*hidden argument*/NULL);
goto IL_038b;
}
IL_036b:
{
Context_t3971234707 * L_139 = CipherSuite_get_Context_m1621551997(__this, /*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(CipherSuite_t3414744575_il2cpp_TypeInfo_var);
ByteU5BU5D_t4116647657* L_140 = ((CipherSuite_t3414744575_StaticFields*)il2cpp_codegen_static_fields_for(CipherSuite_t3414744575_il2cpp_TypeInfo_var))->get_EmptyArray_0();
Context_set_ClientWriteIV_m3405909624(L_139, L_140, /*hidden argument*/NULL);
Context_t3971234707 * L_141 = CipherSuite_get_Context_m1621551997(__this, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_142 = ((CipherSuite_t3414744575_StaticFields*)il2cpp_codegen_static_fields_for(CipherSuite_t3414744575_il2cpp_TypeInfo_var))->get_EmptyArray_0();
Context_set_ServerWriteIV_m1007123427(L_141, L_142, /*hidden argument*/NULL);
}
IL_038b:
{
Context_t3971234707 * L_143 = CipherSuite_get_Context_m1621551997(__this, /*hidden argument*/NULL);
IL2CPP_RUNTIME_CLASS_INIT(ClientSessionCache_t2353595803_il2cpp_TypeInfo_var);
ClientSessionCache_SetContextInCache_m2875733100(NULL /*static, unused*/, L_143, /*hidden argument*/NULL);
TlsStream_t2365453965 * L_144 = V_7;
TlsStream_Reset_m369197964(L_144, /*hidden argument*/NULL);
TlsStream_t2365453965 * L_145 = V_0;
TlsStream_Reset_m369197964(L_145, /*hidden argument*/NULL);
return;
}
}
// System.Byte[] Mono.Security.Protocol.Tls.SslCipherSuite::prf(System.Byte[],System.String,System.Byte[])
extern "C" IL2CPP_METHOD_ATTR ByteU5BU5D_t4116647657* SslCipherSuite_prf_m922878400 (SslCipherSuite_t1981645747 * __this, ByteU5BU5D_t4116647657* ___secret0, String_t* ___label1, ByteU5BU5D_t4116647657* ___random2, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (SslCipherSuite_prf_m922878400_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
HashAlgorithm_t1432317219 * V_0 = NULL;
HashAlgorithm_t1432317219 * V_1 = NULL;
TlsStream_t2365453965 * V_2 = NULL;
ByteU5BU5D_t4116647657* V_3 = NULL;
ByteU5BU5D_t4116647657* V_4 = NULL;
{
MD5_t3177620429 * L_0 = MD5_Create_m3522414168(NULL /*static, unused*/, /*hidden argument*/NULL);
V_0 = L_0;
SHA1_t1803193667 * L_1 = SHA1_Create_m1390871308(NULL /*static, unused*/, /*hidden argument*/NULL);
V_1 = L_1;
TlsStream_t2365453965 * L_2 = (TlsStream_t2365453965 *)il2cpp_codegen_object_new(TlsStream_t2365453965_il2cpp_TypeInfo_var);
TlsStream__ctor_m787793111(L_2, /*hidden argument*/NULL);
V_2 = L_2;
TlsStream_t2365453965 * L_3 = V_2;
IL2CPP_RUNTIME_CLASS_INIT(Encoding_t1523322056_il2cpp_TypeInfo_var);
Encoding_t1523322056 * L_4 = Encoding_get_ASCII_m3595602635(NULL /*static, unused*/, /*hidden argument*/NULL);
String_t* L_5 = ___label1;
ByteU5BU5D_t4116647657* L_6 = VirtFuncInvoker1< ByteU5BU5D_t4116647657*, String_t* >::Invoke(10 /* System.Byte[] System.Text.Encoding::GetBytes(System.String) */, L_4, L_5);
TlsStream_Write_m4133894341(L_3, L_6, /*hidden argument*/NULL);
TlsStream_t2365453965 * L_7 = V_2;
ByteU5BU5D_t4116647657* L_8 = ___secret0;
TlsStream_Write_m4133894341(L_7, L_8, /*hidden argument*/NULL);
TlsStream_t2365453965 * L_9 = V_2;
ByteU5BU5D_t4116647657* L_10 = ___random2;
TlsStream_Write_m4133894341(L_9, L_10, /*hidden argument*/NULL);
HashAlgorithm_t1432317219 * L_11 = V_1;
TlsStream_t2365453965 * L_12 = V_2;
ByteU5BU5D_t4116647657* L_13 = TlsStream_ToArray_m4177184296(L_12, /*hidden argument*/NULL);
TlsStream_t2365453965 * L_14 = V_2;
int64_t L_15 = VirtFuncInvoker0< int64_t >::Invoke(8 /* System.Int64 Mono.Security.Protocol.Tls.TlsStream::get_Length() */, L_14);
ByteU5BU5D_t4116647657* L_16 = HashAlgorithm_ComputeHash_m2044824070(L_11, L_13, 0, (((int32_t)((int32_t)L_15))), /*hidden argument*/NULL);
V_3 = L_16;
TlsStream_t2365453965 * L_17 = V_2;
TlsStream_Reset_m369197964(L_17, /*hidden argument*/NULL);
TlsStream_t2365453965 * L_18 = V_2;
ByteU5BU5D_t4116647657* L_19 = ___secret0;
TlsStream_Write_m4133894341(L_18, L_19, /*hidden argument*/NULL);
TlsStream_t2365453965 * L_20 = V_2;
ByteU5BU5D_t4116647657* L_21 = V_3;
TlsStream_Write_m4133894341(L_20, L_21, /*hidden argument*/NULL);
HashAlgorithm_t1432317219 * L_22 = V_0;
TlsStream_t2365453965 * L_23 = V_2;
ByteU5BU5D_t4116647657* L_24 = TlsStream_ToArray_m4177184296(L_23, /*hidden argument*/NULL);
TlsStream_t2365453965 * L_25 = V_2;
int64_t L_26 = VirtFuncInvoker0< int64_t >::Invoke(8 /* System.Int64 Mono.Security.Protocol.Tls.TlsStream::get_Length() */, L_25);
ByteU5BU5D_t4116647657* L_27 = HashAlgorithm_ComputeHash_m2044824070(L_22, L_24, 0, (((int32_t)((int32_t)L_26))), /*hidden argument*/NULL);
V_4 = L_27;
TlsStream_t2365453965 * L_28 = V_2;
TlsStream_Reset_m369197964(L_28, /*hidden argument*/NULL);
ByteU5BU5D_t4116647657* L_29 = V_4;
return L_29;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void Mono.Security.Protocol.Tls.SslClientStream::.ctor(System.IO.Stream,System.String,System.Boolean)
extern "C" IL2CPP_METHOD_ATTR void SslClientStream__ctor_m2402546929 (SslClientStream_t3914624661 * __this, Stream_t1273022909 * ___stream0, String_t* ___targetHost1, bool ___ownsStream2, const RuntimeMethod* method)
{
{
Stream_t1273022909 * L_0 = ___stream0;
String_t* L_1 = ___targetHost1;
bool L_2 = ___ownsStream2;
SslClientStream__ctor_m3351906728(__this, L_0, L_1, L_2, ((int32_t)-1073741824), (X509CertificateCollection_t3399372417 *)NULL, /*hidden argument*/NULL);
return;
}
}
// System.Void Mono.Security.Protocol.Tls.SslClientStream::.ctor(System.IO.Stream,System.String,System.Security.Cryptography.X509Certificates.X509Certificate)
extern "C" IL2CPP_METHOD_ATTR void SslClientStream__ctor_m4190306291 (SslClientStream_t3914624661 * __this, Stream_t1273022909 * ___stream0, String_t* ___targetHost1, X509Certificate_t713131622 * ___clientCertificate2, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (SslClientStream__ctor_m4190306291_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
Stream_t1273022909 * L_0 = ___stream0;
String_t* L_1 = ___targetHost1;
X509CertificateU5BU5D_t3145106755* L_2 = (X509CertificateU5BU5D_t3145106755*)SZArrayNew(X509CertificateU5BU5D_t3145106755_il2cpp_TypeInfo_var, (uint32_t)1);
X509CertificateU5BU5D_t3145106755* L_3 = L_2;
X509Certificate_t713131622 * L_4 = ___clientCertificate2;
ArrayElementTypeCheck (L_3, L_4);
(L_3)->SetAtUnchecked(static_cast<il2cpp_array_size_t>(0), (X509Certificate_t713131622 *)L_4);
X509CertificateCollection_t3399372417 * L_5 = (X509CertificateCollection_t3399372417 *)il2cpp_codegen_object_new(X509CertificateCollection_t3399372417_il2cpp_TypeInfo_var);
X509CertificateCollection__ctor_m3178797723(L_5, L_3, /*hidden argument*/NULL);
SslClientStream__ctor_m3351906728(__this, L_0, L_1, (bool)0, ((int32_t)-1073741824), L_5, /*hidden argument*/NULL);
return;
}
}
// System.Void Mono.Security.Protocol.Tls.SslClientStream::.ctor(System.IO.Stream,System.String,System.Security.Cryptography.X509Certificates.X509CertificateCollection)
extern "C" IL2CPP_METHOD_ATTR void SslClientStream__ctor_m3745813135 (SslClientStream_t3914624661 * __this, Stream_t1273022909 * ___stream0, String_t* ___targetHost1, X509CertificateCollection_t3399372417 * ___clientCertificates2, const RuntimeMethod* method)
{
{
Stream_t1273022909 * L_0 = ___stream0;
String_t* L_1 = ___targetHost1;
X509CertificateCollection_t3399372417 * L_2 = ___clientCertificates2;
SslClientStream__ctor_m3351906728(__this, L_0, L_1, (bool)0, ((int32_t)-1073741824), L_2, /*hidden argument*/NULL);
return;
}
}
// System.Void Mono.Security.Protocol.Tls.SslClientStream::.ctor(System.IO.Stream,System.String,System.Boolean,Mono.Security.Protocol.Tls.SecurityProtocolType)
extern "C" IL2CPP_METHOD_ATTR void SslClientStream__ctor_m3478574780 (SslClientStream_t3914624661 * __this, Stream_t1273022909 * ___stream0, String_t* ___targetHost1, bool ___ownsStream2, int32_t ___securityProtocolType3, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (SslClientStream__ctor_m3478574780_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
Stream_t1273022909 * L_0 = ___stream0;
String_t* L_1 = ___targetHost1;
bool L_2 = ___ownsStream2;
int32_t L_3 = ___securityProtocolType3;
X509CertificateCollection_t3399372417 * L_4 = (X509CertificateCollection_t3399372417 *)il2cpp_codegen_object_new(X509CertificateCollection_t3399372417_il2cpp_TypeInfo_var);
X509CertificateCollection__ctor_m147081211(L_4, /*hidden argument*/NULL);
SslClientStream__ctor_m3351906728(__this, L_0, L_1, L_2, L_3, L_4, /*hidden argument*/NULL);
return;
}
}
// System.Void Mono.Security.Protocol.Tls.SslClientStream::.ctor(System.IO.Stream,System.String,System.Boolean,Mono.Security.Protocol.Tls.SecurityProtocolType,System.Security.Cryptography.X509Certificates.X509CertificateCollection)
extern "C" IL2CPP_METHOD_ATTR void SslClientStream__ctor_m3351906728 (SslClientStream_t3914624661 * __this, Stream_t1273022909 * ___stream0, String_t* ___targetHost1, bool ___ownsStream2, int32_t ___securityProtocolType3, X509CertificateCollection_t3399372417 * ___clientCertificates4, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (SslClientStream__ctor_m3351906728_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
Stream_t1273022909 * L_0 = ___stream0;
bool L_1 = ___ownsStream2;
IL2CPP_RUNTIME_CLASS_INIT(SslStreamBase_t1667413407_il2cpp_TypeInfo_var);
SslStreamBase__ctor_m3009266308(__this, L_0, L_1, /*hidden argument*/NULL);
String_t* L_2 = ___targetHost1;
if (!L_2)
{
goto IL_0019;
}
}
{
String_t* L_3 = ___targetHost1;
int32_t L_4 = String_get_Length_m3847582255(L_3, /*hidden argument*/NULL);
if (L_4)
{
goto IL_0024;
}
}
IL_0019:
{
ArgumentNullException_t1615371798 * L_5 = (ArgumentNullException_t1615371798 *)il2cpp_codegen_object_new(ArgumentNullException_t1615371798_il2cpp_TypeInfo_var);
ArgumentNullException__ctor_m1170824041(L_5, _stringLiteral2252787185, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_5, NULL, SslClientStream__ctor_m3351906728_RuntimeMethod_var);
}
IL_0024:
{
int32_t L_6 = ___securityProtocolType3;
String_t* L_7 = ___targetHost1;
X509CertificateCollection_t3399372417 * L_8 = ___clientCertificates4;
ClientContext_t2797401965 * L_9 = (ClientContext_t2797401965 *)il2cpp_codegen_object_new(ClientContext_t2797401965_il2cpp_TypeInfo_var);
ClientContext__ctor_m3993227749(L_9, __this, L_6, L_7, L_8, /*hidden argument*/NULL);
((SslStreamBase_t1667413407 *)__this)->set_context_5(L_9);
Stream_t1273022909 * L_10 = ((SslStreamBase_t1667413407 *)__this)->get_innerStream_3();
Context_t3971234707 * L_11 = ((SslStreamBase_t1667413407 *)__this)->get_context_5();
ClientRecordProtocol_t2031137796 * L_12 = (ClientRecordProtocol_t2031137796 *)il2cpp_codegen_object_new(ClientRecordProtocol_t2031137796_il2cpp_TypeInfo_var);
ClientRecordProtocol__ctor_m2839844778(L_12, L_10, ((ClientContext_t2797401965 *)CastclassClass((RuntimeObject*)L_11, ClientContext_t2797401965_il2cpp_TypeInfo_var)), /*hidden argument*/NULL);
((SslStreamBase_t1667413407 *)__this)->set_protocol_6(L_12);
return;
}
}
// System.Void Mono.Security.Protocol.Tls.SslClientStream::add_ServerCertValidation(Mono.Security.Protocol.Tls.CertificateValidationCallback)
extern "C" IL2CPP_METHOD_ATTR void SslClientStream_add_ServerCertValidation_m2218216724 (SslClientStream_t3914624661 * __this, CertificateValidationCallback_t4091668218 * ___value0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (SslClientStream_add_ServerCertValidation_m2218216724_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
CertificateValidationCallback_t4091668218 * L_0 = __this->get_ServerCertValidation_16();
CertificateValidationCallback_t4091668218 * L_1 = ___value0;
Delegate_t1188392813 * L_2 = Delegate_Combine_m1859655160(NULL /*static, unused*/, L_0, L_1, /*hidden argument*/NULL);
__this->set_ServerCertValidation_16(((CertificateValidationCallback_t4091668218 *)CastclassSealed((RuntimeObject*)L_2, CertificateValidationCallback_t4091668218_il2cpp_TypeInfo_var)));
return;
}
}
// System.Void Mono.Security.Protocol.Tls.SslClientStream::remove_ServerCertValidation(Mono.Security.Protocol.Tls.CertificateValidationCallback)
extern "C" IL2CPP_METHOD_ATTR void SslClientStream_remove_ServerCertValidation_m1143339871 (SslClientStream_t3914624661 * __this, CertificateValidationCallback_t4091668218 * ___value0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (SslClientStream_remove_ServerCertValidation_m1143339871_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
CertificateValidationCallback_t4091668218 * L_0 = __this->get_ServerCertValidation_16();
CertificateValidationCallback_t4091668218 * L_1 = ___value0;
Delegate_t1188392813 * L_2 = Delegate_Remove_m334097152(NULL /*static, unused*/, L_0, L_1, /*hidden argument*/NULL);
__this->set_ServerCertValidation_16(((CertificateValidationCallback_t4091668218 *)CastclassSealed((RuntimeObject*)L_2, CertificateValidationCallback_t4091668218_il2cpp_TypeInfo_var)));
return;
}
}
// System.Void Mono.Security.Protocol.Tls.SslClientStream::add_ClientCertSelection(Mono.Security.Protocol.Tls.CertificateSelectionCallback)
extern "C" IL2CPP_METHOD_ATTR void SslClientStream_add_ClientCertSelection_m1387948363 (SslClientStream_t3914624661 * __this, CertificateSelectionCallback_t3743405224 * ___value0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (SslClientStream_add_ClientCertSelection_m1387948363_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
CertificateSelectionCallback_t3743405224 * L_0 = __this->get_ClientCertSelection_17();
CertificateSelectionCallback_t3743405224 * L_1 = ___value0;
Delegate_t1188392813 * L_2 = Delegate_Combine_m1859655160(NULL /*static, unused*/, L_0, L_1, /*hidden argument*/NULL);
__this->set_ClientCertSelection_17(((CertificateSelectionCallback_t3743405224 *)CastclassSealed((RuntimeObject*)L_2, CertificateSelectionCallback_t3743405224_il2cpp_TypeInfo_var)));
return;
}
}
// System.Void Mono.Security.Protocol.Tls.SslClientStream::remove_ClientCertSelection(Mono.Security.Protocol.Tls.CertificateSelectionCallback)
extern "C" IL2CPP_METHOD_ATTR void SslClientStream_remove_ClientCertSelection_m24681826 (SslClientStream_t3914624661 * __this, CertificateSelectionCallback_t3743405224 * ___value0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (SslClientStream_remove_ClientCertSelection_m24681826_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
CertificateSelectionCallback_t3743405224 * L_0 = __this->get_ClientCertSelection_17();
CertificateSelectionCallback_t3743405224 * L_1 = ___value0;
Delegate_t1188392813 * L_2 = Delegate_Remove_m334097152(NULL /*static, unused*/, L_0, L_1, /*hidden argument*/NULL);
__this->set_ClientCertSelection_17(((CertificateSelectionCallback_t3743405224 *)CastclassSealed((RuntimeObject*)L_2, CertificateSelectionCallback_t3743405224_il2cpp_TypeInfo_var)));
return;
}
}
// System.Void Mono.Security.Protocol.Tls.SslClientStream::add_PrivateKeySelection(Mono.Security.Protocol.Tls.PrivateKeySelectionCallback)
extern "C" IL2CPP_METHOD_ATTR void SslClientStream_add_PrivateKeySelection_m1663125063 (SslClientStream_t3914624661 * __this, PrivateKeySelectionCallback_t3240194217 * ___value0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (SslClientStream_add_PrivateKeySelection_m1663125063_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
PrivateKeySelectionCallback_t3240194217 * L_0 = __this->get_PrivateKeySelection_18();
PrivateKeySelectionCallback_t3240194217 * L_1 = ___value0;
Delegate_t1188392813 * L_2 = Delegate_Combine_m1859655160(NULL /*static, unused*/, L_0, L_1, /*hidden argument*/NULL);
__this->set_PrivateKeySelection_18(((PrivateKeySelectionCallback_t3240194217 *)CastclassSealed((RuntimeObject*)L_2, PrivateKeySelectionCallback_t3240194217_il2cpp_TypeInfo_var)));
return;
}
}
// System.Void Mono.Security.Protocol.Tls.SslClientStream::remove_PrivateKeySelection(Mono.Security.Protocol.Tls.PrivateKeySelectionCallback)
extern "C" IL2CPP_METHOD_ATTR void SslClientStream_remove_PrivateKeySelection_m3637735463 (SslClientStream_t3914624661 * __this, PrivateKeySelectionCallback_t3240194217 * ___value0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (SslClientStream_remove_PrivateKeySelection_m3637735463_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
PrivateKeySelectionCallback_t3240194217 * L_0 = __this->get_PrivateKeySelection_18();
PrivateKeySelectionCallback_t3240194217 * L_1 = ___value0;
Delegate_t1188392813 * L_2 = Delegate_Remove_m334097152(NULL /*static, unused*/, L_0, L_1, /*hidden argument*/NULL);
__this->set_PrivateKeySelection_18(((PrivateKeySelectionCallback_t3240194217 *)CastclassSealed((RuntimeObject*)L_2, PrivateKeySelectionCallback_t3240194217_il2cpp_TypeInfo_var)));
return;
}
}
// System.Void Mono.Security.Protocol.Tls.SslClientStream::add_ServerCertValidation2(Mono.Security.Protocol.Tls.CertificateValidationCallback2)
extern "C" IL2CPP_METHOD_ATTR void SslClientStream_add_ServerCertValidation2_m3943665702 (SslClientStream_t3914624661 * __this, CertificateValidationCallback2_t1842476440 * ___value0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (SslClientStream_add_ServerCertValidation2_m3943665702_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
CertificateValidationCallback2_t1842476440 * L_0 = __this->get_ServerCertValidation2_19();
CertificateValidationCallback2_t1842476440 * L_1 = ___value0;
Delegate_t1188392813 * L_2 = Delegate_Combine_m1859655160(NULL /*static, unused*/, L_0, L_1, /*hidden argument*/NULL);
__this->set_ServerCertValidation2_19(((CertificateValidationCallback2_t1842476440 *)CastclassSealed((RuntimeObject*)L_2, CertificateValidationCallback2_t1842476440_il2cpp_TypeInfo_var)));
return;
}
}
// System.Void Mono.Security.Protocol.Tls.SslClientStream::remove_ServerCertValidation2(Mono.Security.Protocol.Tls.CertificateValidationCallback2)
extern "C" IL2CPP_METHOD_ATTR void SslClientStream_remove_ServerCertValidation2_m4151895043 (SslClientStream_t3914624661 * __this, CertificateValidationCallback2_t1842476440 * ___value0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (SslClientStream_remove_ServerCertValidation2_m4151895043_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
{
CertificateValidationCallback2_t1842476440 * L_0 = __this->get_ServerCertValidation2_19();
CertificateValidationCallback2_t1842476440 * L_1 = ___value0;
Delegate_t1188392813 * L_2 = Delegate_Remove_m334097152(NULL /*static, unused*/, L_0, L_1, /*hidden argument*/NULL);
__this->set_ServerCertValidation2_19(((CertificateValidationCallback2_t1842476440 *)CastclassSealed((RuntimeObject*)L_2, CertificateValidationCallback2_t1842476440_il2cpp_TypeInfo_var)));
return;
}
}
// System.IO.Stream Mono.Security.Protocol.Tls.SslClientStream::get_InputBuffer()
extern "C" IL2CPP_METHOD_ATTR Stream_t1273022909 * SslClientStream_get_InputBuffer_m4092356391 (SslClientStream_t3914624661 * __this, const RuntimeMethod* method)
{
{
MemoryStream_t94973147 * L_0 = ((SslStreamBase_t1667413407 *)__this)->get_inputBuffer_4();
return L_0;
}
}
// System.Security.Cryptography.X509Certificates.X509CertificateCollection Mono.Security.Protocol.Tls.SslClientStream::get_ClientCertificates()
extern "C" IL2CPP_METHOD_ATTR X509CertificateCollection_t3399372417 * SslClientStream_get_ClientCertificates_m998716871 (SslClientStream_t3914624661 * __this, const RuntimeMethod* method)
{
{
Context_t3971234707 * L_0 = ((SslStreamBase_t1667413407 *)__this)->get_context_5();
TlsClientSettings_t2486039503 * L_1 = Context_get_ClientSettings_m2874391194(L_0, /*hidden argument*/NULL);
X509CertificateCollection_t3399372417 * L_2 = TlsClientSettings_get_Certificates_m2671943654(L_1, /*hidden argument*/NULL);
return L_2;
}
}
// System.Security.Cryptography.X509Certificates.X509Certificate Mono.Security.Protocol.Tls.SslClientStream::get_SelectedClientCertificate()
extern "C" IL2CPP_METHOD_ATTR X509Certificate_t713131622 * SslClientStream_get_SelectedClientCertificate_m2941927287 (SslClientStream_t3914624661 * __this, const RuntimeMethod* method)
{
{
Context_t3971234707 * L_0 = ((SslStreamBase_t1667413407 *)__this)->get_context_5();
TlsClientSettings_t2486039503 * L_1 = Context_get_ClientSettings_m2874391194(L_0, /*hidden argument*/NULL);
X509Certificate_t713131622 * L_2 = TlsClientSettings_get_ClientCertificate_m3139459118(L_1, /*hidden argument*/NULL);
return L_2;
}
}
// Mono.Security.Protocol.Tls.CertificateValidationCallback Mono.Security.Protocol.Tls.SslClientStream::get_ServerCertValidationDelegate()
extern "C" IL2CPP_METHOD_ATTR CertificateValidationCallback_t4091668218 * SslClientStream_get_ServerCertValidationDelegate_m2765155187 (SslClientStream_t3914624661 * __this, const RuntimeMethod* method)
{
{
CertificateValidationCallback_t4091668218 * L_0 = __this->get_ServerCertValidation_16();
return L_0;
}
}
// System.Void Mono.Security.Protocol.Tls.SslClientStream::set_ServerCertValidationDelegate(Mono.Security.Protocol.Tls.CertificateValidationCallback)
extern "C" IL2CPP_METHOD_ATTR void SslClientStream_set_ServerCertValidationDelegate_m466396564 (SslClientStream_t3914624661 * __this, CertificateValidationCallback_t4091668218 * ___value0, const RuntimeMethod* method)
{
{
CertificateValidationCallback_t4091668218 * L_0 = ___value0;
__this->set_ServerCertValidation_16(L_0);
return;
}
}
// Mono.Security.Protocol.Tls.CertificateSelectionCallback Mono.Security.Protocol.Tls.SslClientStream::get_ClientCertSelectionDelegate()
extern "C" IL2CPP_METHOD_ATTR CertificateSelectionCallback_t3743405224 * SslClientStream_get_ClientCertSelectionDelegate_m473995521 (SslClientStream_t3914624661 * __this, const RuntimeMethod* method)
{
{
CertificateSelectionCallback_t3743405224 * L_0 = __this->get_ClientCertSelection_17();
return L_0;
}
}
// System.Void Mono.Security.Protocol.Tls.SslClientStream::set_ClientCertSelectionDelegate(Mono.Security.Protocol.Tls.CertificateSelectionCallback)
extern "C" IL2CPP_METHOD_ATTR void SslClientStream_set_ClientCertSelectionDelegate_m1261530976 (SslClientStream_t3914624661 * __this, CertificateSelectionCallback_t3743405224 * ___value0, const RuntimeMethod* method)
{
{
CertificateSelectionCallback_t3743405224 * L_0 = ___value0;
__this->set_ClientCertSelection_17(L_0);
return;
}
}
// Mono.Security.Protocol.Tls.PrivateKeySelectionCallback Mono.Security.Protocol.Tls.SslClientStream::get_PrivateKeyCertSelectionDelegate()
extern "C" IL2CPP_METHOD_ATTR PrivateKeySelectionCallback_t3240194217 * SslClientStream_get_PrivateKeyCertSelectionDelegate_m3868652817 (SslClientStream_t3914624661 * __this, const RuntimeMethod* method)
{
{
PrivateKeySelectionCallback_t3240194217 * L_0 = __this->get_PrivateKeySelection_18();
return L_0;
}
}
// System.Void Mono.Security.Protocol.Tls.SslClientStream::set_PrivateKeyCertSelectionDelegate(Mono.Security.Protocol.Tls.PrivateKeySelectionCallback)
extern "C" IL2CPP_METHOD_ATTR void SslClientStream_set_PrivateKeyCertSelectionDelegate_m4100936974 (SslClientStream_t3914624661 * __this, PrivateKeySelectionCallback_t3240194217 * ___value0, const RuntimeMethod* method)
{
{
PrivateKeySelectionCallback_t3240194217 * L_0 = ___value0;
__this->set_PrivateKeySelection_18(L_0);
return;
}
}
// System.Void Mono.Security.Protocol.Tls.SslClientStream::Finalize()
extern "C" IL2CPP_METHOD_ATTR void SslClientStream_Finalize_m1251363641 (SslClientStream_t3914624661 * __this, const RuntimeMethod* method)
{
Exception_t * __last_unhandled_exception = 0;
NO_UNUSED_WARNING (__last_unhandled_exception);
Exception_t * __exception_local = 0;
NO_UNUSED_WARNING (__exception_local);
int32_t __leave_target = -1;
NO_UNUSED_WARNING (__leave_target);
IL_0000:
try
{ // begin try (depth: 1)
SslStreamBase_Dispose_m3190415328(__this, (bool)0, /*hidden argument*/NULL);
IL2CPP_LEAVE(0x13, FINALLY_000c);
} // end try (depth: 1)
catch(Il2CppExceptionWrapper& e)
{
__last_unhandled_exception = (Exception_t *)e.ex;
goto FINALLY_000c;
}
FINALLY_000c:
{ // begin finally (depth: 1)
SslStreamBase_Finalize_m3260913635(__this, /*hidden argument*/NULL);
IL2CPP_END_FINALLY(12)
} // end finally (depth: 1)
IL2CPP_CLEANUP(12)
{
IL2CPP_JUMP_TBL(0x13, IL_0013)
IL2CPP_RETHROW_IF_UNHANDLED(Exception_t *)
}
IL_0013:
{
return;
}
}
// System.Void Mono.Security.Protocol.Tls.SslClientStream::Dispose(System.Boolean)
extern "C" IL2CPP_METHOD_ATTR void SslClientStream_Dispose_m232031134 (SslClientStream_t3914624661 * __this, bool ___disposing0, const RuntimeMethod* method)
{
{
bool L_0 = ___disposing0;
SslStreamBase_Dispose_m3190415328(__this, L_0, /*hidden argument*/NULL);
bool L_1 = ___disposing0;
if (!L_1)
{
goto IL_0029;
}
}
{
__this->set_ServerCertValidation_16((CertificateValidationCallback_t4091668218 *)NULL);
__this->set_ClientCertSelection_17((CertificateSelectionCallback_t3743405224 *)NULL);
__this->set_PrivateKeySelection_18((PrivateKeySelectionCallback_t3240194217 *)NULL);
__this->set_ServerCertValidation2_19((CertificateValidationCallback2_t1842476440 *)NULL);
}
IL_0029:
{
return;
}
}
// System.IAsyncResult Mono.Security.Protocol.Tls.SslClientStream::OnBeginNegotiateHandshake(System.AsyncCallback,System.Object)
extern "C" IL2CPP_METHOD_ATTR RuntimeObject* SslClientStream_OnBeginNegotiateHandshake_m3734240069 (SslClientStream_t3914624661 * __this, AsyncCallback_t3962456242 * ___callback0, RuntimeObject * ___state1, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (SslClientStream_OnBeginNegotiateHandshake_m3734240069_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
TlsException_t3534743363 * V_0 = NULL;
Exception_t * V_1 = NULL;
RuntimeObject* V_2 = NULL;
Exception_t * __last_unhandled_exception = 0;
NO_UNUSED_WARNING (__last_unhandled_exception);
Exception_t * __exception_local = 0;
NO_UNUSED_WARNING (__exception_local);
int32_t __leave_target = -1;
NO_UNUSED_WARNING (__leave_target);
IL_0000:
try
{ // begin try (depth: 1)
{
Context_t3971234707 * L_0 = ((SslStreamBase_t1667413407 *)__this)->get_context_5();
int32_t L_1 = Context_get_HandshakeState_m2425796590(L_0, /*hidden argument*/NULL);
if (!L_1)
{
goto IL_001b;
}
}
IL_0010:
{
Context_t3971234707 * L_2 = ((SslStreamBase_t1667413407 *)__this)->get_context_5();
VirtActionInvoker0::Invoke(4 /* System.Void Mono.Security.Protocol.Tls.Context::Clear() */, L_2);
}
IL_001b:
{
Context_t3971234707 * L_3 = ((SslStreamBase_t1667413407 *)__this)->get_context_5();
Context_t3971234707 * L_4 = ((SslStreamBase_t1667413407 *)__this)->get_context_5();
int32_t L_5 = Context_get_SecurityProtocol_m3228286292(L_4, /*hidden argument*/NULL);
CipherSuiteCollection_t1129639304 * L_6 = CipherSuiteFactory_GetSupportedCiphers_m3260014148(NULL /*static, unused*/, L_5, /*hidden argument*/NULL);
Context_set_SupportedCiphers_m4238648387(L_3, L_6, /*hidden argument*/NULL);
Context_t3971234707 * L_7 = ((SslStreamBase_t1667413407 *)__this)->get_context_5();
Context_set_HandshakeState_m1329976135(L_7, 1, /*hidden argument*/NULL);
RecordProtocol_t3759049701 * L_8 = ((SslStreamBase_t1667413407 *)__this)->get_protocol_6();
AsyncCallback_t3962456242 * L_9 = ___callback0;
RuntimeObject * L_10 = ___state1;
RuntimeObject* L_11 = RecordProtocol_BeginSendRecord_m615249746(L_8, 1, L_9, L_10, /*hidden argument*/NULL);
V_2 = L_11;
goto IL_009d;
}
IL_0056:
{
; // IL_0056: leave IL_009d
}
} // end try (depth: 1)
catch(Il2CppExceptionWrapper& e)
{
__exception_local = (Exception_t *)e.ex;
if(il2cpp_codegen_class_is_assignable_from (TlsException_t3534743363_il2cpp_TypeInfo_var, il2cpp_codegen_object_class(e.ex)))
goto CATCH_005b;
if(il2cpp_codegen_class_is_assignable_from (Exception_t_il2cpp_TypeInfo_var, il2cpp_codegen_object_class(e.ex)))
goto CATCH_007e;
throw e;
}
CATCH_005b:
{ // begin catch(Mono.Security.Protocol.Tls.TlsException)
{
V_0 = ((TlsException_t3534743363 *)__exception_local);
RecordProtocol_t3759049701 * L_12 = ((SslStreamBase_t1667413407 *)__this)->get_protocol_6();
TlsException_t3534743363 * L_13 = V_0;
Alert_t4059934885 * L_14 = TlsException_get_Alert_m1206526559(L_13, /*hidden argument*/NULL);
RecordProtocol_SendAlert_m3736432480(L_12, L_14, /*hidden argument*/NULL);
TlsException_t3534743363 * L_15 = V_0;
IOException_t4088381929 * L_16 = (IOException_t4088381929 *)il2cpp_codegen_object_new(IOException_t4088381929_il2cpp_TypeInfo_var);
IOException__ctor_m3246761956(L_16, _stringLiteral1867853257, L_15, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_16, NULL, SslClientStream_OnBeginNegotiateHandshake_m3734240069_RuntimeMethod_var);
}
IL_0079:
{
goto IL_009d;
}
} // end catch (depth: 1)
CATCH_007e:
{ // begin catch(System.Exception)
{
V_1 = ((Exception_t *)__exception_local);
RecordProtocol_t3759049701 * L_17 = ((SslStreamBase_t1667413407 *)__this)->get_protocol_6();
RecordProtocol_SendAlert_m1931708341(L_17, ((int32_t)80), /*hidden argument*/NULL);
Exception_t * L_18 = V_1;
IOException_t4088381929 * L_19 = (IOException_t4088381929 *)il2cpp_codegen_object_new(IOException_t4088381929_il2cpp_TypeInfo_var);
IOException__ctor_m3246761956(L_19, _stringLiteral1867853257, L_18, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_19, NULL, SslClientStream_OnBeginNegotiateHandshake_m3734240069_RuntimeMethod_var);
}
IL_0098:
{
goto IL_009d;
}
} // end catch (depth: 1)
IL_009d:
{
RuntimeObject* L_20 = V_2;
return L_20;
}
}
// System.Void Mono.Security.Protocol.Tls.SslClientStream::SafeReceiveRecord(System.IO.Stream)
extern "C" IL2CPP_METHOD_ATTR void SslClientStream_SafeReceiveRecord_m2217679740 (SslClientStream_t3914624661 * __this, Stream_t1273022909 * ___s0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (SslClientStream_SafeReceiveRecord_m2217679740_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
ByteU5BU5D_t4116647657* V_0 = NULL;
{
RecordProtocol_t3759049701 * L_0 = ((SslStreamBase_t1667413407 *)__this)->get_protocol_6();
Stream_t1273022909 * L_1 = ___s0;
ByteU5BU5D_t4116647657* L_2 = RecordProtocol_ReceiveRecord_m3797641756(L_0, L_1, /*hidden argument*/NULL);
V_0 = L_2;
ByteU5BU5D_t4116647657* L_3 = V_0;
if (!L_3)
{
goto IL_001b;
}
}
{
ByteU5BU5D_t4116647657* L_4 = V_0;
if ((((int32_t)((int32_t)(((RuntimeArray *)L_4)->max_length)))))
{
goto IL_0028;
}
}
IL_001b:
{
TlsException_t3534743363 * L_5 = (TlsException_t3534743363 *)il2cpp_codegen_object_new(TlsException_t3534743363_il2cpp_TypeInfo_var);
TlsException__ctor_m3242533711(L_5, ((int32_t)40), _stringLiteral1381488752, /*hidden argument*/NULL);
IL2CPP_RAISE_MANAGED_EXCEPTION(L_5, NULL, SslClientStream_SafeReceiveRecord_m2217679740_RuntimeMethod_var);
}
IL_0028:
{
return;
}
}
// System.Void Mono.Security.Protocol.Tls.SslClientStream::OnNegotiateHandshakeCallback(System.IAsyncResult)
extern "C" IL2CPP_METHOD_ATTR void SslClientStream_OnNegotiateHandshakeCallback_m4211921295 (SslClientStream_t3914624661 * __this, RuntimeObject* ___asyncResult0, const RuntimeMethod* method)
{
static bool s_Il2CppMethodInitialized;
if (!s_Il2CppMethodInitialized)
{
il2cpp_codegen_initialize_method (SslClientStream_OnNegotiateHandshakeCallback_m4211921295_MetadataUsageId);
s_Il2CppMethodInitialized = true;
}
bool V_0 = false;
int32_t G_B14_0 = 0;
{
RecordProtocol_t3759049701 * L_0 = ((SslStreamBase_t1667413407 *)__this)->get_protocol_6();
RuntimeObject* L_1 = ___asyncResult0;
RecordProtocol_EndSendRecord_m4264777321(L_0, L_1, /*hidden argument*/NULL);
goto IL_0043;
}
IL_0011:
{
Stream_t1273022909 * L_2 = ((SslStreamBase_t1667413407 *)__this)->get_innerStream_3();
SslClientStream_SafeReceiveRecord_m2217679740(__this, L_2, /*hidden argument*/NULL);
Context_t3971234707 * L_3 = ((SslStreamBase_t1667413407 *)__this)->get_context_5();
bool L_4 = Context_get_AbbreviatedHandshake_m3907920227(L_3, /*hidden argument*/NULL);
if (!L_4)
{
goto IL_0043;
}
}
{
Context_t3971234707 * L_5 = ((SslStreamBase_t1667413407 *)__this)->get_context_5();
uint8_t L_6 = Context_get_LastHandshakeMsg_m2730646725(L_5, /*hidden argument*/NULL);
if ((!(((uint32_t)L_6) == ((uint32_t)2))))
{
goto IL_0043;
}
}
{
goto IL_0055;
}
IL_0043:
{
Context_t3971234707 * L_7 = ((SslStreamBase_t1667413407 *)__this)->get_context_5();
uint8_t L_8 = Context_get_LastHandshakeMsg_m2730646725(L_7, /*hidden argument*/NULL);
if ((!(((uint32_t)L_8) == ((uint32_t)((int32_t)14)))))
{
goto IL_0011;
}
}
IL_0055:
{
Context_t3971234707 * L_9 = ((SslStreamBase_t1667413407 *)__this)->get_context_5();
bool L_10 = Context_get_AbbreviatedHandshake_m3907920227(L_9, /*hidden argument*/NULL);
if (!L_10)
{
goto IL_00da;
}
}
{
Context_t3971234707 * L_11 = ((SslStreamBase_t1667413407 *)__this)->get_context_5();
IL2CPP_RUNTIME_CLASS_INIT(ClientSessionCache_t2353595803_il2cpp_TypeInfo_var);
ClientSessionCache_SetContextFromCache_m3781380849(NULL /*static, unused*/, L_11, /*hidden argument*/NULL);
Context_t3971234707 * L_12 = ((SslStreamBase_t1667413407 *)__this)->get_context_5();
SecurityParameters_t2199972650 * L_13 = Context_get_Negotiating_m2044579817(L_12, /*hidden argument*/NULL);
CipherSuite_t3414744575 * L_14 = SecurityParameters_get_Cipher_m108846204(L_13, /*hidden argument*/NULL);
VirtActionInvoker0::Invoke(7 /* System.Void Mono.Security.Protocol.Tls.CipherSuite::ComputeKeys() */, L_14);
Context_t3971234707 * L_15 = ((SslStreamBase_t1667413407 *)__this)->get_context_5();
SecurityParameters_t2199972650 * L_16 = Context_get_Negotiating_m2044579817(L_15, /*hidden argument*/NULL);
CipherSuite_t3414744575 * L_17 = SecurityParameters_get_Cipher_m108846204(L_16, /*hidden argument*/NULL);
CipherSuite_InitializeCipher_m2397698608(L_17, /*hidden argument*/NULL);
RecordProtocol_t3759049701 * L_18 = ((SslStreamBase_t1667413407 *)__this)->get_protocol_6();
RecordProtocol_SendChangeCipherSpec_m464005157(L_18, /*hidden argument*/NULL);
goto IL_00b7;
}
IL_00ab:
{
Stream_t1273022909 * L_19 = ((SslStreamBase_t1667413407 *)__this)->get_innerStream_3();
SslClientStream_SafeReceiveRecord_m2217679740(__this, L_19, /*hidden argument*/NULL);
}
IL_00b7:
{
Context_t3971234707 * L_20 = ((SslStreamBase_t1667413407 *)__this)->get_context_5();
int32_t L_21 = Context_get_HandshakeState_m2425796590(L_20, /*hidden argument*/NULL);
if ((!(((uint32_t)L_21) == ((uint32_t)2))))
{
goto IL_00ab;
}
}
{
RecordProtocol_t3759049701 * L_22 = ((SslStreamBase_t1667413407 *)__this)->get_protocol_6();
VirtActionInvoker1< uint8_t >::Invoke(4 /* System.Void Mono.Security.Protocol.Tls.RecordProtocol::SendRecord(Mono.Security.Protocol.Tls.Handshake.HandshakeType) */, L_22, ((int32_t)20));
goto IL_01c5;
}
IL_00da:
{
Context_t3971234707 * L_23 = ((SslStreamBase_t1667413407 *)__this)->get_context_5();
TlsServerSettings_t4144396432 * L_24 = Context_get_ServerSettings_m1982578801(L_23, /*hidden argument*/NULL);
bool L_25 = TlsServerSettings_get_CertificateRequest_m842655670(L_24, /*hidden argument*/NULL);
V_0 = L_25;
Context_t3971234707 * L_26 = ((SslStreamBase_t1667413407 *)__this)->get_context_5();
int32_t L_27 = Context_get_SecurityProtocol_m3228286292(L_26, /*hidden argument*/NULL);
if ((!(((uint32_t)L_27) == ((uint32_t)((int32_t)48)))))
{
goto IL_012e;
}
}
{
Context_t3971234707 * L_28 = ((SslStreamBase_t1667413407 *)__this)->get_context_5();
TlsClientSettings_t2486039503 * L_29 = Context_get_ClientSettings_m2874391194(L_28, /*hidden argument*/NULL);
X509CertificateCollection_t3399372417 * L_30 = TlsClientSettings_get_Certificates_m2671943654(L_29, /*hidden argument*/NULL);
if (!L_30)
{
goto IL_012c;
}
}
{
Context_t3971234707 * L_31 = ((SslStreamBase_t1667413407 *)__this)->get_context_5();
TlsClientSettings_t2486039503 * L_32 = Context_get_ClientSettings_m2874391194(L_31, /*hidden argument*/NULL);
X509CertificateCollection_t3399372417 * L_33 = TlsClientSettings_get_Certificates_m2671943654(L_32, /*hidden argument*/NULL);
int32_t L_34 = CollectionBase_get_Count_m1708965601(L_33, /*hidden argument*/NULL);
G_B14_0 = ((((int32_t)L_34) > ((int32_t)0))? 1 : 0);
goto IL_012d;
}
IL_012c:
{
G_B14_0 = 0;
}
IL_012d:
{
V_0 = (bool)G_B14_0;
}
IL_012e:
{
bool L_35 = V_0;
if (!L_35)
{
goto IL_0141;
}
}
{
RecordProtocol_t3759049701 * L_36 = ((SslStreamBase_t1667413407 *)__this)->get_protocol_6();
VirtActionInvoker1< uint8_t >::Invoke(4 /* System.Void Mono.Security.Protocol.Tls.RecordProtocol::SendRecord(Mono.Security.Protocol.Tls.Handshake.HandshakeType) */, L_36, ((int32_t)11));
}
IL_0141:
{
RecordProtocol_t3759049701 * L_37 = ((SslStreamBase_t1667413407 *)__this)->get_protocol_6();
VirtActionInvoker1< uint8_t >::Invoke(4 /* System.Void Mono.Security.Protocol.Tls.RecordProtocol::SendRecord(Mono.Security.Protocol.Tls.Handshake.HandshakeType) */, L_37, ((int32_t)16));
Context_t3971234707 * L_38 = ((SslStreamBase_t1667413407 *)__this)->get_context_5();
SecurityParameters_t2199972650 * L_39 = Context_get_Negotiating_m2044579817(L_38, /*hidden argument*/NULL);
CipherSuite_t3414744575 * L_40 = SecurityParameters_get_Cipher_m108846204(L_39, /*hidden argument*/NULL);
CipherSuite_InitializeCipher_m2397698608(L_40, /*hidden argument*/NULL);
bool L_41 = V_0;
if (!L_41)
{
goto IL_018b;
}
}
{
Context_t3971234707 * L_42 = ((SslStreamBase_t1667413407 *)__this)->get_context_5();
TlsClientSettings_t2486039503 * L_43 = Context_get_ClientSettings_m2874391194(L_42, /*hidden argument*/NULL);
X509Certificate_t713131622 * L_44 = TlsClientSettings_get_ClientCertificate_m3139459118(L_43, /*hidden argument*/NULL);
if (!L_44)
{
goto IL_018b;
}
}
{
RecordProtocol_t3759049701 * L_45 = ((SslStreamBase_t1667413407 *)__this)->get_protocol_6();
VirtActionInvoker1< uint8_t >::Invoke(4 /* System.Void Mono.Security.Protocol.Tls.RecordProtocol::SendRecord(Mono.Security.Protocol.Tls.Handshake.HandshakeType) */, L_45, ((int32_t)15));
}
IL_018b:
{
RecordProtocol_t3759049701 * L_46 = ((SslStreamBase_t1667413407 *)__this)->get_protocol_6();
RecordProtocol_SendChangeCipherSpec_m464005157(L_46, /*hidden argument*/NULL);
RecordProtocol_t3759049701 * L_47 = ((SslStreamBase_t1667413407 *)__this)->get_protocol_6();
VirtActionInvoker1< uint8_t >::Invoke(4 /* System.Void Mono.Security.Protocol.Tls.RecordProtocol::SendRecord(Mono.Security.Protocol.Tls.Handshake.HandshakeType) */, L_47, ((int32_t)20));
goto IL_01b4;
}
IL_01a8:
{
Stream_t1273022909 * L_48 = ((SslStreamBase_t1667413407 *)__this)->get_innerStream_3();
SslClientStream_SafeReceiveRecord_m2217679740(__this, L_48, /*hidden argument*/NULL);
}
IL_01b4:
{
Context_t3971234707 * L_49 = ((SslStreamBase_t1667413407 *)__this)->get_context_5();
int32_t L_50 = Context_get_HandshakeState_m2425796590(L_49, /*hidden argument*/NULL);
if ((!(((uint32_t)L_50) == ((uint32_t)2))))
{
goto IL_01a8;
}
}
IL_01c5:
{
Context_t3971234707 * L_51 = ((SslStreamBase_t1667413407 *)__this)->get_context_5();
TlsStream_t2365453965 * L_52 = Context_get_HandshakeMessages_m3655705111(L_51, /*hidden argument*/NULL);
TlsStream_Reset_m369197964(L_52, /*hidden argument*/NULL);
Context_t3971234707 * L_53 = ((SslStreamBase_t1667413407 *)__this)->get_context_5();
VirtActionInvoker0::Invoke(5 /* System.Void Mono.Security.Protocol.Tls.Context::ClearKeyInfo() */, L_53);
return;
}
}
// System.Security.Cryptography.X509Certificates.X509Certificate Mono.Security.Protocol.Tls.SslClientStream::OnLocalCertificateSelection(System.Security.Cryptography.X509Certificates.X509CertificateCollection,System.Security.Cryptography.X509Certificates.X509Certificate,System.String,System.Security.Cryptography.X509Certificates.X509CertificateCollection)
extern "C" IL2CPP_METHOD_ATTR X509Certificate_t713131622 * SslClientStream_OnLocalCertificateSelection_m205226847 (SslClientStream_t3914624661 * __this, X509CertificateCollection_t3399372417 * ___clientCertificates0, X509Certificate_t713131622 * ___serverCertificate1, String_t* ___targetHost2, X509CertificateCollection_t3399372417 * ___serverRequestedCertificates3, const RuntimeMethod* method)
{
{
CertificateSelectionCallback_t3743405224 * L_0 = __this->get_ClientCertSelection_17();
if (!L_0)
{
goto IL_001c;
}
}
{
CertificateSelectionCallback_t3743405224 * L_1 = __this->get_ClientCertSelection_17();
X509CertificateCollection_t3399372417 * L_2 = ___clientCertificates0;
X509Certificate_t713131622 * L_3 = ___serverCertificate1;
String_t* L_4 = ___targetHost2;
X509CertificateCollection_t3399372417 * L_5 = ___serverRequestedCertificates3;
X509Certificate_t713131622 * L_6 = CertificateSelectionCallback_Invoke_m3129973019(L_1, L_2, L_3, L_4, L_5, /*hidden argument*/NULL);
return L_6;
}
IL_001c:
{
return (X509Certificate_t713131622 *)NULL;
}
}
// System.Boolean Mono.Security.Protocol.Tls.SslClientStream::get_HaveRemoteValidation2Callback()
extern "C" IL2CPP_METHOD_ATTR bool SslClientStream_get_HaveRemoteValidation2Callback_m2858953511 (SslClientStream_t3914624661 * __this, const RuntimeMethod* method)
{
{
CertificateValidationCallback2_t1842476440 * L_0 = __this->get_ServerCertValidation2_19();
return (bool)((((int32_t)((((RuntimeObject*)(CertificateValidationCallback2_t1842476440 *)L_0) == ((RuntimeObject*)(RuntimeObject *)NULL))? 1 : 0)) == ((int32_t)0))? 1 : 0);
}
}
// Mono.Security.Protocol.Tls.ValidationResult Mono.Security.Protocol.Tls.SslClientStream::OnRemoteCertificateValidation2(Mono.Security.X509.X509CertificateCollection)
extern "C" IL2CPP_METHOD_ATTR ValidationResult_t3834298736 * SslClientStream_OnRemoteCertificateValidation2_m2342781980 (SslClientStream_t3914624661 * __this, X509CertificateCollection_t1542168550 * ___collection0, const RuntimeMethod* method)
{
CertificateValidationCallback2_t1842476440 * V_0 = NULL;
{
CertificateValidationCallback2_t1842476440 * L_0 = __this->get_ServerCertValidation2_19();
V_0 = L_0;
CertificateValidationCallback2_t1842476440 * L_1 = V_0;
if (!L_1)
{
goto IL_0015;
}
}
{
CertificateValidationCallback2_t1842476440 * L_2 = V_0;
X509CertificateCollection_t1542168550 * L_3 = ___collection0;
ValidationResult_t3834298736 * L_4 = CertificateValidationCallback2_Invoke_m3381554834(L_2, L_3, /*hidden argument*/NULL);
return L_4;
}
IL_0015:
{
return (ValidationResult_t3834298736 *)NULL;
}
}
// System.Boolean Mono.Security.Protocol.Tls.SslClientStream::OnRemoteCertificateValidation(System.Security.Cryptography.X509Certificates.X509Certificate,System.Int32[])
extern "C" IL2CPP_METHOD_ATTR bool SslClientStream_OnRemoteCertificateValidation_m2343517080 (SslClientStream_t3914624661 * __this, X509Certificate_t713131622 * ___certificate0, Int32U5BU5D_t385246372* ___errors1, const RuntimeMethod* method)
{
int32_t G_B5_0 = 0;
{
CertificateValidationCallback_t4091668218 * L_0 = __this->get_ServerCertValidation_16();
if (!L_0)
{
goto IL_0019;
}
}
{
CertificateValidationCallback_t4091668218 * L_1 = __this->get_ServerCertValidation_16();
X509Certificate_t713131622 * L_2 = ___certificate0;
Int32U5BU5D_t385246372* L_3 = ___errors1;
bool L_4 = CertificateValidationCallback_Invoke_m1014111289(L_1, L_2, L_3, /*hidden argument*/NULL);
return L_4;
}
IL_0019:
{
Int32U5BU5D_t385246372* L_5 = ___errors1;
if (!L_5)
{
goto IL_0027;
}
}
{
Int32U5BU5D_t385246372* L_6 = ___errors1;
G_B5_0 = ((((int32_t)(((int32_t)((int32_t)(((RuntimeArray *)L_6)->max_length))))) == ((int32_t)0))? 1 : 0);
goto IL_0028;
}
IL_0027:
{
G_B5_0 = 0;
}
IL_0028:
{
return (bool)G_B5_0;
}
}
// System.Boolean Mono.Security.Protocol.Tls.SslClientStream::RaiseServerCertificateValidation(System.Security.Cryptography.X509Certificates.X509Certificate,System.Int32[])
extern "C" IL2CPP_METHOD_ATTR bool SslClientStream_RaiseServerCertificateValidation_m3477149273 (SslClientStream_t3914624661 * __this, X509Certificate_t713131622 * ___certificate0, Int32U5BU5D_t385246372* ___certificateErrors1, const RuntimeMethod* method)
{
{
X509Certificate_t713131622 * L_0 = ___certificate0;
Int32U5BU5D_t385246372* L_1 = ___certificateErrors1;
bool L_2 = SslStreamBase_RaiseRemoteCertificateValidation_m944390272(__this, L_0, L_1, /*hidden argument*/NULL);
return L_2;
}
}
// Mono.Security.Protocol.Tls.ValidationResult Mono.Security.Protocol.Tls.SslClientStream::RaiseServerCertificateValidation2(Mono.Security.X509.X509CertificateCollection)
extern "C" IL2CPP_METHOD_ATTR ValidationResult_t3834298736 * SslClientStream_RaiseServerCertificateValidation2_m2589974695 (SslClientStream_t3914624661 * __this, X509CertificateCollection_t1542168550 * ___collection0, const RuntimeMethod* method)
{
{
X509CertificateCollection_t1542168550 * L_0 = ___collection0;
ValidationResult_t3834298736 * L_1 = SslStreamBase_RaiseRemoteCertificateValidation2_m2908038766(__this, L_0, /*hidden argument*/NULL);
return L_1;
}
}
// System.Security.Cryptography.X509Certificates.X509Certificate Mono.Security.Protocol.Tls.SslClientStream::RaiseClientCertificateSelection(System.Security.Cryptography.X509Certificates.X509CertificateCollection,System.Security.Cryptography.X509Certificates.X509Certificate,System.String,System.Security.Cryptography.X509Certificates.X509CertificateCollection)
extern "C" IL2CPP_METHOD_ATTR X509Certificate_t713131622 * SslClientStream_RaiseClientCertificateSelection_m3936211295 (SslClientStream_t3914624661 * __this, X509CertificateCollection_t3399372417 * ___clientCertificates0, X509Certificate_t713131622 * ___serverCertificate1, String_t* ___targetHost2, X509CertificateCollection_t3399372417 * ___serverRequestedCertificates3, const RuntimeMethod* method)
{
{
X509CertificateCollection_t3399372417 * L_0 = ___clientCertificates0;
X509Certificate_t713131622 * L_1 = ___serverCertificate1;
String_t* L_2 = ___targetHost2;
X509CertificateCollection_t3399372417 * L_3 = ___serverRequestedCertificates3;
X509Certificate_t713131622 * L_4 = SslStreamBase_RaiseLocalCertificateSelection_m980106471(__this, L_0, L_1, L_2, L_3, /*hidden argument*/NULL);
return L_4;
}
}
// System.Security.Cryptography.AsymmetricAlgorithm Mono.Security.Protocol.Tls.SslClientStream::OnLocalPrivateKeySelection(System.Security.Cryptography.X509Certificates.X509Certificate,System.String)
extern "C" IL2CPP_METHOD_ATTR AsymmetricAlgorithm_t932037087 * SslClientStream_OnLocalPrivateKeySelection_m1934775249 (SslClientStream_t3914624661 * __this, X509Certificate_t713131622 * ___certificate0, String_t* ___targetHost1, const RuntimeMethod* method)
{
{
PrivateKeySelectionCallback_t3240194217 * L_0 = __this->get_PrivateKeySelection_18();
if (!L_0)
{
goto IL_0019;
}
}
{
PrivateKeySelectionCallback_t3240194217 * L_1 = __this->get_PrivateKeySelection_18();
X509Certificate_t713131622 * L_2 = ___certificate0;
String_t* L_3 = ___targetHost1;
AsymmetricAlgorithm_t932037087 * L_4 = PrivateKeySelectionCallback_Invoke_m921844982(L_1, L_2, L_3, /*hidden argument*/NULL);
return L_4;
}
IL_0019:
{
return (AsymmetricAlgorithm_t932037087 *)NULL;
}
}
// System.Security.Cryptography.AsymmetricAlgorithm Mono.Security.Protocol.Tls.SslClientStream::RaisePrivateKeySelection(System.Security.Cryptography.X509Certificates.X509Certificate,System.String)
extern "C" IL2CPP_METHOD_ATTR AsymmetricAlgorithm_t932037087 * SslClientStream_RaisePrivateKeySelection_m3394190501 (SslClientStream_t3914624661 * __this, X509Certificate_t713131622 * ___certificate0, String_t* ___targetHost1, const RuntimeMethod* method)
{
{
X509Certificate_t713131622 * L_0 = ___certificate0;
String_t* L_1 = ___targetHost1;
AsymmetricAlgorithm_t932037087 * L_2 = SslStreamBase_RaiseLocalPrivateKeySelection_m4112368540(__this, L_0, L_1, /*hidden argument*/NULL);
return L_2;
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
| [
"duncan.westerdijk@quicknet.nl"
] | duncan.westerdijk@quicknet.nl |
0ae73b4790010d8ad8ecd01d98650f3c1a960405 | 018c888d6a7d7916a7223a2982b574028e0fa88a | /src/test/rpc_tests.cpp | cdbd5847d9b50f2053086ede9222924a2a3bfd72 | [
"MIT"
] | permissive | Bigfootzz/NachoHash | c9f61590c5e30e044ee747700fde6b0084506323 | 9abed2654678a474c1067bbed2ec19abb16968ff | refs/heads/master | 2020-07-04T20:25:40.045003 | 2019-09-14T11:36:38 | 2019-09-14T11:36:38 | 202,404,765 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 12,950 | cpp | // Copyright (c) 2012-2013 The NachoHash Core developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "rpcserver.h"
#include "rpcclient.h"
#include "base58.h"
#include "netbase.h"
#include "util.h"
#include <boost/algorithm/string.hpp>
#include <boost/test/unit_test.hpp>
#include <univalue.h>
using namespace std;
UniValue
createArgs(int nRequired, const char* address1=NULL, const char* address2=NULL)
{
UniValue result(UniValue::VARR);
result.push_back(nRequired);
UniValue addresses(UniValue::VARR);
if (address1) addresses.push_back(address1);
if (address2) addresses.push_back(address2);
result.push_back(addresses);
return result;
}
UniValue CallRPC(string args)
{
vector<string> vArgs;
boost::split(vArgs, args, boost::is_any_of(" \t"));
string strMethod = vArgs[0];
vArgs.erase(vArgs.begin());
UniValue params = RPCConvertValues(strMethod, vArgs);
rpcfn_type method = tableRPC[strMethod]->actor;
try {
UniValue result = (*method)(params, false);
return result;
}
catch (const UniValue& objError) {
throw runtime_error(find_value(objError, "message").get_str());
}
}
BOOST_AUTO_TEST_SUITE(rpc_tests)
BOOST_AUTO_TEST_CASE(rpc_rawparams)
{
// Test raw transaction API argument handling
UniValue r;
BOOST_CHECK_THROW(CallRPC("getrawtransaction"), runtime_error);
BOOST_CHECK_THROW(CallRPC("getrawtransaction not_hex"), runtime_error);
BOOST_CHECK_THROW(CallRPC("getrawtransaction a3b807410df0b60fcb9736768df5823938b2f838694939ba45f3c0a1bff150ed not_int"), runtime_error);
BOOST_CHECK_THROW(CallRPC("createrawtransaction"), runtime_error);
BOOST_CHECK_THROW(CallRPC("createrawtransaction null null"), runtime_error);
BOOST_CHECK_THROW(CallRPC("createrawtransaction not_array"), runtime_error);
BOOST_CHECK_THROW(CallRPC("createrawtransaction [] []"), runtime_error);
BOOST_CHECK_THROW(CallRPC("createrawtransaction {} {}"), runtime_error);
BOOST_CHECK_NO_THROW(CallRPC("createrawtransaction [] {}"));
BOOST_CHECK_THROW(CallRPC("createrawtransaction [] {} extra"), runtime_error);
BOOST_CHECK_THROW(CallRPC("decoderawtransaction"), runtime_error);
BOOST_CHECK_THROW(CallRPC("decoderawtransaction null"), runtime_error);
BOOST_CHECK_THROW(CallRPC("decoderawtransaction DEADBEEF"), runtime_error);
string rawtx = "0100000001a15d57094aa7a21a28cb20b59aab8fc7d1149a3bdbcddba9c622e4f5f6a99ece010000006c493046022100f93bb0e7d8db7bd46e40132d1f8242026e045f03a0efe71bbb8e3f475e970d790221009337cd7f1f929f00cc6ff01f03729b069a7c21b59b1736ddfee5db5946c5da8c0121033b9b137ee87d5a812d6f506efdd37f0affa7ffc310711c06c7f3e097c9447c52ffffffff0100e1f505000000001976a9140389035a9225b3839e2bbf32d826a1e222031fd888ac00000000";
BOOST_CHECK_NO_THROW(r = CallRPC(string("decoderawtransaction ")+rawtx));
BOOST_CHECK_EQUAL(find_value(r.get_obj(), "version").get_int(), 1);
BOOST_CHECK_EQUAL(find_value(r.get_obj(), "locktime").get_int(), 0);
BOOST_CHECK_THROW(r = CallRPC(string("decoderawtransaction ")+rawtx+" extra"), runtime_error);
BOOST_CHECK_THROW(CallRPC("signrawtransaction"), runtime_error);
BOOST_CHECK_THROW(CallRPC("signrawtransaction null"), runtime_error);
BOOST_CHECK_THROW(CallRPC("signrawtransaction ff00"), runtime_error);
BOOST_CHECK_NO_THROW(CallRPC(string("signrawtransaction ")+rawtx));
BOOST_CHECK_NO_THROW(CallRPC(string("signrawtransaction ")+rawtx+" null null NONE|ANYONECANPAY"));
BOOST_CHECK_NO_THROW(CallRPC(string("signrawtransaction ")+rawtx+" [] [] NONE|ANYONECANPAY"));
BOOST_CHECK_THROW(CallRPC(string("signrawtransaction ")+rawtx+" null null badenum"), runtime_error);
// Only check failure cases for sendrawtransaction, there's no network to send to...
BOOST_CHECK_THROW(CallRPC("sendrawtransaction"), runtime_error);
BOOST_CHECK_THROW(CallRPC("sendrawtransaction null"), runtime_error);
BOOST_CHECK_THROW(CallRPC("sendrawtransaction DEADBEEF"), runtime_error);
BOOST_CHECK_THROW(CallRPC(string("sendrawtransaction ")+rawtx+" extra"), runtime_error);
}
BOOST_AUTO_TEST_CASE(rpc_rawsign)
{
UniValue r;
// input is a 1-of-2 multisig (so is output):
string prevout =
"[{\"txid\":\"dd2888870cdc3f6e92661f6b0829667ee4bb07ed086c44205e726bbf3338f726\","
"\"vout\":1,\"scriptPubKey\":\"a914f5404a39a4799d8710e15db4c4512c5e06f97fed87\","
"\"redeemScript\":\"5121021431a18c7039660cd9e3612a2a47dc53b69cb38ea4ad743b7df8245fd0438f8e21029bbeff390ce736bd396af43b52a1c14ed52c086b1e5585c15931f68725772bac52ae\"}]";
r = CallRPC(string("createrawtransaction ")+prevout+" "+
"{\"6ckcNMWRYgTnPcrTXCdwhDnMLwj3zwseej\":1}");
string notsigned = r.get_str();
string privkey1 = "\"YVobcS47fr6kceZy9LzLJR8WQ6YRpUwYKoJhrnEXepebMxaSpbnn\"";
string privkey2 = "\"YRyMjG8hbm8jHeDMAfrzSeHq5GgAj7kuHFvJtMudCUH3sCkq1WtA\"";
r = CallRPC(string("signrawtransaction ")+notsigned+" "+prevout+" "+"[]");
BOOST_CHECK(find_value(r.get_obj(), "complete").get_bool() == false);
r = CallRPC(string("signrawtransaction ")+notsigned+" "+prevout+" "+"["+privkey1+","+privkey2+"]");
BOOST_CHECK(find_value(r.get_obj(), "complete").get_bool() == true);
}
BOOST_AUTO_TEST_CASE(rpc_format_monetary_values)
{
BOOST_CHECK(ValueFromAmount(0LL).write() == "0.00000000");
BOOST_CHECK(ValueFromAmount(1LL).write() == "0.00000001");
BOOST_CHECK(ValueFromAmount(17622195LL).write() == "0.17622195");
BOOST_CHECK(ValueFromAmount(50000000LL).write() == "0.50000000");
BOOST_CHECK(ValueFromAmount(89898989LL).write() == "0.89898989");
BOOST_CHECK(ValueFromAmount(100000000LL).write() == "1.00000000");
BOOST_CHECK(ValueFromAmount(2099999999999990LL).write() == "20999999.99999990");
BOOST_CHECK(ValueFromAmount(2099999999999999LL).write() == "20999999.99999999");
BOOST_CHECK_EQUAL(ValueFromAmount(0).write(), "0.00000000");
BOOST_CHECK_EQUAL(ValueFromAmount((COIN/10000)*123456789).write(), "12345.67890000");
BOOST_CHECK_EQUAL(ValueFromAmount(-COIN).write(), "-1.00000000");
BOOST_CHECK_EQUAL(ValueFromAmount(-COIN/10).write(), "-0.10000000");
BOOST_CHECK_EQUAL(ValueFromAmount(COIN*100000000).write(), "100000000.00000000");
BOOST_CHECK_EQUAL(ValueFromAmount(COIN*10000000).write(), "10000000.00000000");
BOOST_CHECK_EQUAL(ValueFromAmount(COIN*1000000).write(), "1000000.00000000");
BOOST_CHECK_EQUAL(ValueFromAmount(COIN*100000).write(), "100000.00000000");
BOOST_CHECK_EQUAL(ValueFromAmount(COIN*10000).write(), "10000.00000000");
BOOST_CHECK_EQUAL(ValueFromAmount(COIN*1000).write(), "1000.00000000");
BOOST_CHECK_EQUAL(ValueFromAmount(COIN*100).write(), "100.00000000");
BOOST_CHECK_EQUAL(ValueFromAmount(COIN*10).write(), "10.00000000");
BOOST_CHECK_EQUAL(ValueFromAmount(COIN).write(), "1.00000000");
BOOST_CHECK_EQUAL(ValueFromAmount(COIN/10).write(), "0.10000000");
BOOST_CHECK_EQUAL(ValueFromAmount(COIN/100).write(), "0.01000000");
BOOST_CHECK_EQUAL(ValueFromAmount(COIN/1000).write(), "0.00100000");
BOOST_CHECK_EQUAL(ValueFromAmount(COIN/10000).write(), "0.00010000");
BOOST_CHECK_EQUAL(ValueFromAmount(COIN/100000).write(), "0.00001000");
BOOST_CHECK_EQUAL(ValueFromAmount(COIN/1000000).write(), "0.00000100");
BOOST_CHECK_EQUAL(ValueFromAmount(COIN/10000000).write(), "0.00000010");
BOOST_CHECK_EQUAL(ValueFromAmount(COIN/100000000).write(), "0.00000001");
}
static UniValue ValueFromString(const std::string &str)
{
UniValue value;
BOOST_CHECK(value.setNumStr(str));
return value;
}
BOOST_AUTO_TEST_CASE(rpc_parse_monetary_values)
{
BOOST_CHECK_EQUAL(AmountFromValue(ValueFromString("0.00000001")), 1LL);
BOOST_CHECK_EQUAL(AmountFromValue(ValueFromString("0.17622195")), 17622195LL);
BOOST_CHECK_EQUAL(AmountFromValue(ValueFromString("0.5")), 50000000LL);
BOOST_CHECK_EQUAL(AmountFromValue(ValueFromString("0.50000000")), 50000000LL);
BOOST_CHECK_EQUAL(AmountFromValue(ValueFromString("0.89898989")), 89898989LL);
BOOST_CHECK_EQUAL(AmountFromValue(ValueFromString("1.00000000")), 100000000LL);
BOOST_CHECK_EQUAL(AmountFromValue(ValueFromString("20999999.9999999")), 2099999999999990LL);
BOOST_CHECK_EQUAL(AmountFromValue(ValueFromString("20999999.99999999")), 2099999999999999LL);
}
BOOST_AUTO_TEST_CASE(json_parse_errors)
{
// Valid
BOOST_CHECK_EQUAL(ParseNonRFCJSONValue("1.0").get_real(), 1.0);
// Valid, with leading or trailing whitespace
BOOST_CHECK_EQUAL(ParseNonRFCJSONValue(" 1.0").get_real(), 1.0);
BOOST_CHECK_EQUAL(ParseNonRFCJSONValue("1.0 ").get_real(), 1.0);
// Invalid, initial garbage
BOOST_CHECK_THROW(ParseNonRFCJSONValue("[1.0"), std::runtime_error);
BOOST_CHECK_THROW(ParseNonRFCJSONValue("a1.0"), std::runtime_error);
// Invalid, trailing garbage
BOOST_CHECK_THROW(ParseNonRFCJSONValue("1.0sds"), std::runtime_error);
BOOST_CHECK_THROW(ParseNonRFCJSONValue("1.0]"), std::runtime_error);
// BTC addresses should fail parsing
BOOST_CHECK_THROW(ParseNonRFCJSONValue("175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W"), std::runtime_error);
BOOST_CHECK_THROW(ParseNonRFCJSONValue("3J98t1WpEZ73CNmQviecrnyiWrnqRhWNL"), std::runtime_error);
}
BOOST_AUTO_TEST_CASE(rpc_ban)
{
BOOST_CHECK_NO_THROW(CallRPC(string("clearbanned")));
UniValue r;
BOOST_CHECK_NO_THROW(r = CallRPC(string("setban 127.0.0.0 add")));
BOOST_CHECK_THROW(r = CallRPC(string("setban 127.0.0.0:8334")), runtime_error); //portnumber for setban not allowed
BOOST_CHECK_NO_THROW(r = CallRPC(string("listbanned")));
UniValue ar = r.get_array();
UniValue o1 = ar[0].get_obj();
UniValue adr = find_value(o1, "address");
BOOST_CHECK_EQUAL(adr.get_str(), "127.0.0.0/32");
BOOST_CHECK_NO_THROW(CallRPC(string("setban 127.0.0.0 remove")));;
BOOST_CHECK_NO_THROW(r = CallRPC(string("listbanned")));
ar = r.get_array();
BOOST_CHECK_EQUAL(ar.size(), 0);
BOOST_CHECK_NO_THROW(r = CallRPC(string("setban 127.0.0.0/24 add 1607731200 true")));
BOOST_CHECK_NO_THROW(r = CallRPC(string("listbanned")));
ar = r.get_array();
o1 = ar[0].get_obj();
adr = find_value(o1, "address");
UniValue banned_until = find_value(o1, "banned_until");
BOOST_CHECK_EQUAL(adr.get_str(), "127.0.0.0/24");
BOOST_CHECK_EQUAL(banned_until.get_int64(), 1607731200); // absolute time check
BOOST_CHECK_NO_THROW(CallRPC(string("clearbanned")));
BOOST_CHECK_NO_THROW(r = CallRPC(string("setban 127.0.0.0/24 add 200")));
BOOST_CHECK_NO_THROW(r = CallRPC(string("listbanned")));
ar = r.get_array();
o1 = ar[0].get_obj();
adr = find_value(o1, "address");
banned_until = find_value(o1, "banned_until");
BOOST_CHECK_EQUAL(adr.get_str(), "127.0.0.0/24");
int64_t now = GetTime();
BOOST_CHECK(banned_until.get_int64() > now);
BOOST_CHECK(banned_until.get_int64()-now <= 200);
// must throw an exception because 127.0.0.1 is in already banned suubnet range
BOOST_CHECK_THROW(r = CallRPC(string("setban 127.0.0.1 add")), runtime_error);
BOOST_CHECK_NO_THROW(CallRPC(string("setban 127.0.0.0/24 remove")));;
BOOST_CHECK_NO_THROW(r = CallRPC(string("listbanned")));
ar = r.get_array();
BOOST_CHECK_EQUAL(ar.size(), 0);
BOOST_CHECK_NO_THROW(r = CallRPC(string("setban 127.0.0.0/255.255.0.0 add")));
BOOST_CHECK_THROW(r = CallRPC(string("setban 127.0.1.1 add")), runtime_error);
BOOST_CHECK_NO_THROW(CallRPC(string("clearbanned")));
BOOST_CHECK_NO_THROW(r = CallRPC(string("listbanned")));
ar = r.get_array();
BOOST_CHECK_EQUAL(ar.size(), 0);
BOOST_CHECK_THROW(r = CallRPC(string("setban test add")), runtime_error); //invalid IP
//IPv6 tests
BOOST_CHECK_NO_THROW(r = CallRPC(string("setban FE80:0000:0000:0000:0202:B3FF:FE1E:8329 add")));
BOOST_CHECK_NO_THROW(r = CallRPC(string("listbanned")));
ar = r.get_array();
o1 = ar[0].get_obj();
adr = find_value(o1, "address");
BOOST_CHECK_EQUAL(adr.get_str(), "fe80::202:b3ff:fe1e:8329/128");
BOOST_CHECK_NO_THROW(CallRPC(string("clearbanned")));
BOOST_CHECK_NO_THROW(r = CallRPC(string("setban 2001:db8::/ffff:fffc:0:0:0:0:0:0 add")));
BOOST_CHECK_NO_THROW(r = CallRPC(string("listbanned")));
ar = r.get_array();
o1 = ar[0].get_obj();
adr = find_value(o1, "address");
BOOST_CHECK_EQUAL(adr.get_str(), "2001:db8::/30");
BOOST_CHECK_NO_THROW(CallRPC(string("clearbanned")));
BOOST_CHECK_NO_THROW(r = CallRPC(string("setban 2001:4d48:ac57:400:cacf:e9ff:fe1d:9c63/128 add")));
BOOST_CHECK_NO_THROW(r = CallRPC(string("listbanned")));
ar = r.get_array();
o1 = ar[0].get_obj();
adr = find_value(o1, "address");
BOOST_CHECK_EQUAL(adr.get_str(), "2001:4d48:ac57:400:cacf:e9ff:fe1d:9c63/128");
}
BOOST_AUTO_TEST_SUITE_END()
| [
"partridget9@gmail.com"
] | partridget9@gmail.com |
3d268a7edf16a9fa16cd7adb6ea058d80afde752 | 94f31d216037a0ac16c4354d996149275d7d01d4 | /common/contrib/QSsh/inc/sshpacketparser_p.h | d7ed822ea183ce6fce928babd716a0ac514feec9 | [
"MIT"
] | permissive | cbtek/ClockNWork | 5fd62ab61e3b6565e9426ddc928a203384255a9a | 4b23043a8b535059990e4eedb2c0f3a4fb079415 | refs/heads/master | 2020-07-31T23:20:00.668554 | 2017-02-03T17:30:35 | 2017-02-03T17:30:35 | 73,588,090 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,050 | h | /**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact: http://www.qt-project.org/
**
**
** GNU Lesser General Public License Usage
**
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this file.
** Please review the following information to ensure the GNU Lesser General
** Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** Other Usage
**
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**************************************************************************/
#ifndef SSHPACKETPARSER_P_H
#define SSHPACKETPARSER_P_H
#include <botan/inc/botan.h>
#include <QByteArray>
#include <QList>
#include <QString>
namespace QSsh {
namespace Internal {
struct SshNameList
{
SshNameList() : originalLength(0) {}
SshNameList(quint32 originalLength) : originalLength(originalLength) {}
quint32 originalLength;
QList<QByteArray> names;
};
class SshPacketParseException { };
// This class's functions try to read a byte array at a certain offset
// as the respective chunk of data as specified in the SSH RFCs.
// If they succeed, they update the offset, so they can easily
// be called in succession by client code.
// For convenience, some have also versions that don't update the offset,
// so they can be called with rvalues if the new value is not needed.
// If they fail, they throw an SshPacketParseException.
class SshPacketParser
{
public:
static bool asBool(const QByteArray &data, quint32 offset);
static bool asBool(const QByteArray &data, quint32 *offset);
static quint16 asUint16(const QByteArray &data, quint32 offset);
static quint16 asUint16(const QByteArray &data, quint32 *offset);
static quint64 asUint64(const QByteArray &data, quint32 offset);
static quint64 asUint64(const QByteArray &data, quint32 *offset);
static quint32 asUint32(const QByteArray &data, quint32 offset);
static quint32 asUint32(const QByteArray &data, quint32 *offset);
static QByteArray asString(const QByteArray &data, quint32 *offset);
static QString asUserString(const QByteArray &data, quint32 *offset);
static SshNameList asNameList(const QByteArray &data, quint32 *offset);
static Botan::BigInt asBigInt(const QByteArray &data, quint32 *offset);
static QString asUserString(const QByteArray &rawString);
};
} // namespace Internal
} // namespace QSsh
#endif // SSHPACKETPARSER_P_H
| [
"corey.berry@cbtek.net"
] | corey.berry@cbtek.net |
26aae049b73a9398ee6645971023a5cbbf78528b | 51dc61072c6ba314932772b51b0c5457a9cd3983 | /c-c++/data-structures/heap-and-priority-queue/stl-priority-queue-based-minheap-user-defined-class.cpp | 8f0c2709b7abf69d18583e0c2f356927956875ba | [] | no_license | shiv4289/codes | 6bbadfcf1d1dcb1661f329d24a346dc956766a31 | 6d9e4bbbe37ebe2a92b58fa10e9c66b1ccff772d | refs/heads/master | 2021-01-20T14:31:38.981796 | 2017-07-07T13:43:10 | 2017-07-07T13:43:10 | 90,625,900 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,202 | cpp | /*
* stl-priority-queue-based-minheap-user-defined-class.cpp
*
* Created on: 09-May-2017
* Author: shivji
*
* Refrence: http://www.geeksforgeeks.org/implement-min-heap-using-stl/
*/
// C++ program to us priority_queue to implement Min Heap
// for user defined class
#include <bits/stdc++.h>
using namespace std;
// User defined class, Point
class Point
{
int x;
int y;
public:
Point(int _x, int _y)
{
x = _x;
y = _y;
}
int getX() const { return x; }
int getY() const { return y; }
};
// To compare two points
class myComparator
{
public:
int operator() (const Point& p1, const Point& p2)
{
return p1.getX() > p2.getX();
}
};
// Driver code
int main ()
{
// Creates a Min heap of points (order by x coordinate)
priority_queue <Point, vector<Point>, myComparator > pq;
// Insert points into the min heap
pq.push(Point(10, 2));
pq.push(Point(2, 1));
pq.push(Point(1, 5));
// One by one extract items from min heap
while (pq.empty() == false)
{
Point p = pq.top();
cout << "(" << p.getX() << ", " << p.getY() << ")";
cout << endl;
pq.pop();
}
return 0;
}
| [
"shivji.jha@moveinsync.com"
] | shivji.jha@moveinsync.com |
0cba6e9e4e6cfacbc0be786a282f60caf1f9ba16 | 3b9b4049a8e7d38b49e07bb752780b2f1d792851 | /src/third_party/WebKit/Source/core/html/HTMLDetailsElement.cpp | bc329ff6f68854d3a218511215cc37f15f272061 | [
"LGPL-2.0-or-later",
"GPL-1.0-or-later",
"MIT",
"Apache-2.0",
"BSD-3-Clause",
"BSD-2-Clause",
"LGPL-2.1-only",
"LGPL-2.0-only",
"LicenseRef-scancode-warranty-disclaimer",
"GPL-2.0-only",
"LicenseRef-scancode-other-copyleft"
] | permissive | webosce/chromium53 | f8e745e91363586aee9620c609aacf15b3261540 | 9171447efcf0bb393d41d1dc877c7c13c46d8e38 | refs/heads/webosce | 2020-03-26T23:08:14.416858 | 2018-08-23T08:35:17 | 2018-09-20T14:25:18 | 145,513,343 | 0 | 2 | Apache-2.0 | 2019-08-21T22:44:55 | 2018-08-21T05:52:31 | null | UTF-8 | C++ | false | false | 6,014 | cpp | /*
* Copyright (C) 2010, 2011 Nokia Corporation and/or its subsidiary(-ies)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*
*/
#include "core/html/HTMLDetailsElement.h"
#include "bindings/core/v8/ExceptionStatePlaceholder.h"
#include "core/CSSPropertyNames.h"
#include "core/CSSValueKeywords.h"
#include "core/HTMLNames.h"
#include "core/dom/ElementTraversal.h"
#include "core/dom/Text.h"
#include "core/dom/shadow/ShadowRoot.h"
#include "core/events/Event.h"
#include "core/events/EventSender.h"
#include "core/frame/UseCounter.h"
#include "core/html/HTMLContentElement.h"
#include "core/html/HTMLDivElement.h"
#include "core/html/HTMLSummaryElement.h"
#include "core/html/shadow/DetailsMarkerControl.h"
#include "core/html/shadow/ShadowElementNames.h"
#include "core/layout/LayoutBlockFlow.h"
#include "platform/text/PlatformLocale.h"
namespace blink {
using namespace HTMLNames;
class FirstSummarySelectFilter final : public HTMLContentSelectFilter {
public:
virtual ~FirstSummarySelectFilter() { }
static FirstSummarySelectFilter* create()
{
return new FirstSummarySelectFilter();
}
bool canSelectNode(const HeapVector<Member<Node>, 32>& siblings, int nth) const override
{
if (!siblings[nth]->hasTagName(HTMLNames::summaryTag))
return false;
for (int i = nth - 1; i >= 0; --i) {
if (siblings[i]->hasTagName(HTMLNames::summaryTag))
return false;
}
return true;
}
DEFINE_INLINE_VIRTUAL_TRACE()
{
HTMLContentSelectFilter::trace(visitor);
}
private:
FirstSummarySelectFilter() { }
};
static DetailsEventSender& detailsToggleEventSender()
{
DEFINE_STATIC_LOCAL(DetailsEventSender, sharedToggleEventSender, (DetailsEventSender::create(EventTypeNames::toggle)));
return sharedToggleEventSender;
}
HTMLDetailsElement* HTMLDetailsElement::create(Document& document)
{
HTMLDetailsElement* details = new HTMLDetailsElement(document);
details->ensureUserAgentShadowRoot();
return details;
}
HTMLDetailsElement::HTMLDetailsElement(Document& document)
: HTMLElement(detailsTag, document)
, m_isOpen(false)
{
UseCounter::count(document, UseCounter::DetailsElement);
}
HTMLDetailsElement::~HTMLDetailsElement()
{
}
void HTMLDetailsElement::dispatchPendingEvent(DetailsEventSender* eventSender)
{
ASSERT_UNUSED(eventSender, eventSender == &detailsToggleEventSender());
dispatchEvent(Event::create(EventTypeNames::toggle));
}
LayoutObject* HTMLDetailsElement::createLayoutObject(const ComputedStyle&)
{
return new LayoutBlockFlow(this);
}
void HTMLDetailsElement::didAddUserAgentShadowRoot(ShadowRoot& root)
{
HTMLSummaryElement* defaultSummary = HTMLSummaryElement::create(document());
defaultSummary->appendChild(Text::create(document(), locale().queryString(WebLocalizedString::DetailsLabel)));
HTMLContentElement* summary = HTMLContentElement::create(document(), FirstSummarySelectFilter::create());
summary->setIdAttribute(ShadowElementNames::detailsSummary());
summary->appendChild(defaultSummary);
root.appendChild(summary);
HTMLDivElement* content = HTMLDivElement::create(document());
content->setIdAttribute(ShadowElementNames::detailsContent());
content->appendChild(HTMLContentElement::create(document()));
content->setInlineStyleProperty(CSSPropertyDisplay, CSSValueNone);
root.appendChild(content);
}
Element* HTMLDetailsElement::findMainSummary() const
{
if (HTMLSummaryElement* summary = Traversal<HTMLSummaryElement>::firstChild(*this))
return summary;
HTMLContentElement* content = toHTMLContentElement(userAgentShadowRoot()->firstChild());
ASSERT(content->firstChild() && isHTMLSummaryElement(*content->firstChild()));
return toElement(content->firstChild());
}
void HTMLDetailsElement::parseAttribute(const QualifiedName& name, const AtomicString& oldValue, const AtomicString& value)
{
if (name == openAttr) {
bool oldValue = m_isOpen;
m_isOpen = !value.isNull();
if (m_isOpen == oldValue)
return;
// Dispatch toggle event asynchronously.
detailsToggleEventSender().cancelEvent(this);
detailsToggleEventSender().dispatchEventSoon(this);
Element* content = ensureUserAgentShadowRoot().getElementById(ShadowElementNames::detailsContent());
ASSERT(content);
if (m_isOpen)
content->removeInlineStyleProperty(CSSPropertyDisplay);
else
content->setInlineStyleProperty(CSSPropertyDisplay, CSSValueNone);
// Invalidate the LayoutDetailsMarker in order to turn the arrow signifying if the
// details element is open or closed.
Element* summary = findMainSummary();
ASSERT(summary);
Element* control = toHTMLSummaryElement(summary)->markerControl();
if (control && control->layoutObject())
control->layoutObject()->setShouldDoFullPaintInvalidation();
return;
}
HTMLElement::parseAttribute(name, oldValue, value);
}
void HTMLDetailsElement::toggleOpen()
{
setAttribute(openAttr, m_isOpen ? nullAtom : emptyAtom);
}
bool HTMLDetailsElement::isInteractiveContent() const
{
return true;
}
} // namespace blink
| [
"changhyeok.bae@lge.com"
] | changhyeok.bae@lge.com |
0501927f96666c4dae85cc7a079b7176aad2f81e | a0854ba75301d2ee083ddbde125bceb74774abb5 | /src/leveloso.cpp | cb5b3e70bb3ef3c71a429ffea34f336f05b3a69c | [] | no_license | angelmoro/laberinto | 04edddfeb97f1ca0dedb52d0a7e87c87521633e6 | ead523625be35a0c4479dd5a484a130c6acd677d | HEAD | 2016-08-12T04:58:01.843999 | 2016-04-09T12:33:20 | 2016-04-09T12:33:20 | 55,843,720 | 0 | 0 | null | null | null | null | ISO-8859-1 | C++ | false | false | 13,709 | cpp | /*
* leveloso.cpp
*
* Created on: 27/2/2016
* Author: Usuario
*/
#include <stdio.h>
#include <allegro5/allegro.h>
#include <allegro5/allegro_font.h>
#include <allegro5/allegro_ttf.h>
#include <allegro5/allegro_native_dialog.h>
#include <math.h>
#include "level.h"
#include "leveloso.h"
#include "hormiga.h"
#include "comida.h"
#include "veneno.h"
#include "hormiguero.h"
#include "agua.h"
#include "levelgraphic.h"
#include "rana.h"
#include "bolsadinero.h"
#include "records.h"
#include "levelosoconf.h"
#include "tilemap.h"
#include "marca.h"
LevelOso::LevelOso(ActorManager * b,LevelManager * l,
int n, int c, int a, int v, int hv,
int hr, int rt, int bt, int rtd, int btd, TileMap *m):Level(b,l,n)
{
ALLEGRO_PATH *path;
comida = c;
agua = a;
veneno = v;
hormigas_verdes = hv;
hormigas_rojas = hr;
rana_ticks = rt;
rana_ticks_fijados = rt;
bolsa_dinero_ticks = bt;
bolsa_dinero_ticks_fijados = bt;
rana_mov_to_dead = rtd;
bolsa_dinero_mov_to_dead = btd;
mapa = m;
/*
* para crear path relativos y poder distribuir el programa y ejecutarlo
* fuera del IDE
*/
path = al_get_standard_path(ALLEGRO_RESOURCES_PATH);
al_remove_path_component(path,-1);
al_append_path_component(path, "resources");
al_set_path_filename(path, "robinhood.wav");
sonido_fin_nivel = al_load_sample(al_path_cstr(path, '/'));
if(sonido_fin_nivel == NULL)
{
al_show_native_message_box(al_get_current_display(), "Ventana de error",
"error fatal", "Error al cargar resource sonido fin nivel",
NULL, ALLEGRO_MESSAGEBOX_ERROR);
exit(-1);
}
al_set_path_filename(path, "landlucky__game-over.wav");
sonido_game_over = al_load_sample(al_path_cstr(path, '/'));
if(sonido_game_over == NULL)
{
al_show_native_message_box(al_get_current_display(), "Ventana de error",
"error fatal", "Error al cargar resource sonido game over",
NULL, ALLEGRO_MESSAGEBOX_ERROR);
exit(-1);
}
}
LevelOso::~LevelOso()
{
}
void LevelOso::init()
{
}
void LevelOso::iniciar()
{
/*
* establecemos la fase 1
*/
set_estado(INICIALIZADO);
// printf("nivel %d inicializado\n",num_nivel);
/*
* Ticks de esta fase
*/
ticks_inicializado = 250; // 250/70 = 3,57 segundos
/*
* añado al actor manager el nivel que esta activo, este nivel es el que estoy
* activando
*/
am->add(this);
}
void LevelOso::create()
{
int i;
Hormiguero *hormiguero_tmp;
/*
* Creamos la comida
*/
// limite = Game::rnd(0,10);
// limite = 1;
for(i=0; i<comida; i++){
Comida::crear_comida(am);
}
/*
* Creamos el agua
*/
// limite = Game::rnd(0,5);
// limite = 1;
for(i=0; i<agua; i++){
Agua::crear_agua(am);
}
/*
* Creamos el veneno
*/
// limite = Game::rnd(0,1);
// limite = 1;
for(i=0; i<veneno; i++){
Veneno::crear_veneno(am);
}
/*
* Creamos el hormiguero
*/
hormiguero_tmp = Hormiguero::crear_hormiguero(am);
/*
* Creamos hormigas rojas iniciales
*/
// limite = Game::rnd(0,2);
// limite = 1;
for(i=0; i<hormigas_rojas; i++){
Hormiga::crear_hormiga(am,kRedAnt,hormiguero_tmp);
}
/*
* Creamos las hormigas verdes iniciales
*/
// limite = Game::rnd(0,10);
// limite = 1;
for(i=0; i<hormigas_verdes; i++){
Hormiga::crear_hormiga(am,kGreenAnt,hormiguero_tmp);
}
/*
* establecemos estado a creado
*/
set_estado(CREADO);
// printf("nivel %d creado\n",num_nivel);
}
void LevelOso::destroy()
{
list<Actor*>::iterator tmp_iter;
/*
* Eliminamos del actor manager todos los actores que no son validos cuando se
* termina un nivel
*/
for (tmp_iter=am->get_begin_iterator();
tmp_iter!=am->get_end_iterator();
tmp_iter++)
{
switch ((*tmp_iter)->get_team()) {
case TEAM_HORMIGAS_ROJAS:
case TEAM_HORMIGAS_VERDES:
case TEAM_COMIDA:
case TEAM_AGUA:
case TEAM_VENENO:
case TEAM_HORMIGUERO:
// case TEAM_LEVEL: No se deben destruir los actores nivel.
am->del(*tmp_iter);
break;
default:
break;
}
}
/*
* establecemos estado a destruido
*/
set_estado(DESTRUIDO);
// printf("nivel %d destruido\n",num_nivel);
/*
* Ticks de esta fase
*/
ticks_destruido = 250; // 250/70 = 3,57 segundos
}
LevelOso* LevelOso::crear_level(ActorManager *actmgr,LevelManager *levmgr, string nombre,int nivel,
int c,int a,int v,int hv,int hr, int pos_x,int pos_y,
int rt, int bt, int rtd, int btd)
{
ALLEGRO_BITMAP *bmp;
LevelOso *level_oso_tmp;
LevelGraphic *lg;
ALLEGRO_PATH *path;
ALLEGRO_FONT *font;
TileMap *m;
char buffer [256];
/*
* para crear path relativos y poder distribuir el programa y ejecutarlo
* fuera del IDE
*/
path = al_get_standard_path(ALLEGRO_RESOURCES_PATH);
al_remove_path_component(path,-1);
al_append_path_component(path, "resources");
/*
* Creamos el mapa del nivel
*/
sprintf (buffer, "mapa%d.tmx",nivel);
al_set_path_filename(path, buffer);
m = new TileMap(al_path_cstr(path, '/'));
/*
* creamos el nivel
*/
level_oso_tmp = new LevelOso(actmgr,levmgr,nivel,c,a,v,hv,hr,rt,bt,rtd,btd,m);
/*
bmp = al_load_bitmap(al_path_cstr(path, '/'));
if(bmp == NULL)
{
al_show_native_message_box(al_get_current_display(), "Ventana de error",
"error fatal", "Error al cargar resource bitmap",
NULL, ALLEGRO_MESSAGEBOX_ERROR);
exit(-1);
}
*/
lg=new LevelGraphic(level_oso_tmp, m);
al_set_path_filename(path, "comic.ttf");
font = NULL;
font = al_load_ttf_font(al_path_cstr(path, '/'),20,0);
if(font == NULL)
{
al_show_native_message_box(al_get_current_display(), "Ventana de error",
"error fatal", "Error al cargar el font",
NULL, ALLEGRO_MESSAGEBOX_ERROR);
exit(-1);
}
lg->set_font(font);
al_set_path_filename(path, "comic.ttf");
font = NULL;
font = al_load_ttf_font(al_path_cstr(path, '/'),40,0);
if(font == NULL)
{
al_show_native_message_box(al_get_current_display(), "Ventana de error",
"error fatal", "Error al cargar el font",
NULL, ALLEGRO_MESSAGEBOX_ERROR);
exit(-1);
}
lg->set_font_transito(font);
lg->set_title(nombre);
level_oso_tmp->set_actor_graphic(lg);
level_oso_tmp->set_x(pos_x);
level_oso_tmp->set_y(pos_y);
level_oso_tmp->set_is_detected(false); //TDB revisar si el nivel necesita colisionar el bmp que se utilizaba para calcular la colision se ha substituido por el mapa
level_oso_tmp->set_team(TEAM_LEVEL);
level_oso_tmp->set_collision_method(CollisionManager::PP_COLLISION);
al_destroy_path(path);
return level_oso_tmp;
}
void LevelOso::crear_niveles(int niveles,ActorManager *actmgr,LevelManager *levmgr)
{
int i;
LevelOso *level_oso_tmp;
int pos_x,pos_y;
int r_ticks, b_ticks;
int r_mov_to_dead;
int b_mov_to_dead;
LevelOsoConf configuracion;
pos_x = 250;
pos_y = 0;
// float peso_comida,peso_agua,peso_veneno,peso_hormigas_verdes,peso_hormigas_rojas;
// float peso_rana_ticks, peso_bolsa_ticks, peso_rana_to_dead, peso_bolsa_to_dead;
int c,a,v,hr,hv;
/*
* Si se elimna la lectura del fichero de configuracion, se pueden
* establecer los parametros harcoded aqui
*
configuracion.set_peso_comida(1.0);
configuracion.set_peso_agua(1.0);
configuracion.set_peso_veneno(0.3);
configuracion.set_peso_hormigas_verdes(1.5);
configuracion.set_peso_hormigas_rojas(0.5);
configuracion.set_peso_rana_ticks(100.0);
configuracion.set_peso_bolsa_ticks(100.0);
configuracion.set_peso_rana_to_dead(0.5);
configuracion.set_peso_bolsa_to_dead(0.3);
configuracion.set_r_ticks(1000);
configuracion.set_b_ticks(2000);
configuracion.set_r_mov_to_dead(20);
configuracion.set_b_mov_to_dead(10);
configuracion.set_key_pad(false);
*/
/*
* fijamos los ticks base para la rana y la bolsa de dinero, con esto se fija
* el tiempo cada cuanto aparecen 70 ticks es un segundo. El ritmo de ticks podría
* variar en game.
*/
r_ticks = configuracion.get_r_ticks();
b_ticks = configuracion.get_b_ticks();
/*
* Fijamos los saltos antes de desaparecer, esto depende de el nunero de veces que
* se actualiza el estado de los actores. Este ritmo tambien esta en game
*/
r_mov_to_dead = configuracion.get_r_mov_to_dead();
b_mov_to_dead = configuracion.get_b_mov_to_dead();
/*
* Creamos 20 niveles con el numero de comida,agua,veneno,hormiga verde y hormiga roja
* ajustado a su nivel y las apariciones y desapariciones de la rana y la bolsa de dinero
*/
for(i=1; i<=niveles; i++){
c = (int)floor(configuracion.get_peso_comida() * i);
a = (int)floor(configuracion.get_peso_agua() * i);
v = (int)floor(configuracion.get_peso_veneno() * i);
hv = (int)floor(configuracion.get_peso_hormigas_verdes() * i);
hr = (int)floor(configuracion.get_peso_hormigas_rojas() * i);
r_ticks = r_ticks + (int)floor(configuracion.get_peso_rana_ticks() * i);
b_ticks = b_ticks + (int)floor(configuracion.get_peso_bolsa_ticks() * i);
r_mov_to_dead = r_mov_to_dead + (int)floor(configuracion.get_peso_rana_to_dead() * i);
b_mov_to_dead = b_mov_to_dead + (int)floor(configuracion.get_peso_bolsa_to_dead() * i);
// printf("nivel %d, c %d, a %d, v %d, hv %d, hr %d rt %d bt %d rtd %d btd %d\n",
// i,c,a,v,hv,hr,r_ticks,b_ticks,r_mov_to_dead,b_mov_to_dead);
level_oso_tmp = LevelOso::crear_level(actmgr,levmgr,"nivel",i,
c,a,v,hv,hr,pos_x,pos_y,r_ticks,b_ticks,
r_mov_to_dead,b_mov_to_dead);
if (i == niveles) {
level_oso_tmp->set_last_level(TRUE);
} else {
level_oso_tmp->set_last_level(FALSE);
}
levmgr->add(level_oso_tmp);
}
}
void LevelOso::tick()
{
Level * level_tmp;
Level * level_marca_tmp;
Actor actor_tmp;
list<Actor*>::iterator actors_iter_tmp;
Marca *marca_tmp;
int puntuacion;
switch (estado) {
case INICIALIZADO:
ticks_inicializado--;
if (ticks_inicializado == 0) create();
break;
case CREADO:
/*
* Creamos una rana cada 14,28 segundos (1000 ticks/ (70 ticks/seg))
*/
rana_ticks = rana_ticks -1;
if (rana_ticks < 0) {
rana_ticks = rana_ticks_fijados;
Rana::crear_rana(am, rana_mov_to_dead);
}
/*
* Creamos una bolsa de dinero cada 42,85 segundos (1000 ticks/ (70 ticks/seg))
*/
bolsa_dinero_ticks = bolsa_dinero_ticks -1;
if (bolsa_dinero_ticks < 0) {
bolsa_dinero_ticks = bolsa_dinero_ticks_fijados;
BolsaDinero::crear_bolsa_dinero(am,bolsa_dinero_mov_to_dead);
}
/*
* Si todas las hormigas verdes muertas, cambio de nivel
*/
if (Hormiga::num_hormigas_verdes == 0){
level_tmp = le->current();
level_tmp->destroy();
al_play_sample(sonido_fin_nivel, 3.0, 0.0,1.0,ALLEGRO_PLAYMODE_ONCE,NULL);
}
break;
case DESTRUIDO:
ticks_destruido--;
if (ticks_destruido == 0) {
/*
* Desactivamos el nivel y avanzamos al siguiente
* si no es el ultimo
*/
level_tmp = le->next();
level_marca_tmp = level_tmp;
if (!level_tmp->last_level()) {
level_tmp->set_activo(FALSE);
level_tmp = le->current();
if (level_tmp != NULL ) level_tmp->set_activo(TRUE);
} else {
// fin del juego, pedir nombre para almacenar record y mostrar records
al_play_sample(sonido_game_over, 9.0, 0.0,1.0,ALLEGRO_PLAYMODE_ONCE,NULL);
/*
* Buscamos el osohormiguero para obetner la puntuacion
*/
for (actors_iter_tmp=am->get_begin_iterator();
actors_iter_tmp!=am->get_end_iterator();
actors_iter_tmp++)
{
if((*actors_iter_tmp)->get_team()== TEAM_OSO) {
puntuacion = (*actors_iter_tmp)->get_puntuacion();
}
}
/*
* Buscamos los records para añadir una nueva marca
*/
for (actors_iter_tmp=am->get_begin_iterator();
actors_iter_tmp!=am->get_end_iterator();
actors_iter_tmp++)
{
if((*actors_iter_tmp)->get_team()== TEAM_RECORDS) {
(*actors_iter_tmp)->set_estado(CAPTURANDO);
/*
* Creamos una nueva marca y la añadimos a la lista de records.
*/
marca_tmp = new Marca();
marca_tmp->set_nombre(""); //todavia no se el nombre
marca_tmp->set_puntuacion(puntuacion);
marca_tmp->set_level(level_marca_tmp->get_level());
(*actors_iter_tmp)->add(marca_tmp);
}
}
}
}
break;
default:
break;
}
}
void LevelOso::set_activo(bool a)
{
activo = a;
if (activo == TRUE)
{
/*
* Si se activa el nivel notificamos al colision manager
* el colision set de mapa del nivel
*/
// TBD "meta_tiles","colisionable","meta tiles" y "objeto" deberian de ser cadenas parametrizables.
/*
* Registramos el mapa
*/
le->get_game()->collision_manager->registrar_mapa(mapa,
"meta_tiles",
"colisionable",
"objeto",
"meta tiles");
/*
* Creamos un colision set para los objetos "piedra"
*/
le->get_game()->collision_manager->add_colision_set("piedra");
/*
* cramos un clision set para los objetos "agua"
*/
le->get_game()->collision_manager->add_colision_set("agua");
} else
{
/*
* Desregistramos el mapa
*/
le->get_game()->collision_manager->desregistrar_mapa();
}
}
| [
"amoro1@telefonica.net"
] | amoro1@telefonica.net |
c269b19eb7ea35fb7b6114a88f3d378120ceb580 | eb2f8b3271e8ef9c9b092fcaeff3ff8307f7af86 | /Grade 10-12/2018 autumn/NOIP/NOIP2018提高组Day1程序包/GD-Senior/answers/GD-0335/track/track.cpp | 6ebc82e694a8406e0f37db3014e485f6954a5c99 | [] | no_license | Orion545/OI-Record | 0071ecde8f766c6db1f67b9c2adf07d98fd4634f | fa7d3a36c4a184fde889123d0a66d896232ef14c | refs/heads/master | 2022-01-13T19:39:22.590840 | 2019-05-26T07:50:17 | 2019-05-26T07:50:17 | 188,645,194 | 4 | 2 | null | null | null | null | UTF-8 | C++ | false | false | 1,612 | cpp | #include<cstdio>
#include<algorithm>
#include<cstring>
using namespace std;
#define MAXN 50010
struct ins
{
int x,y,z;
}in[MAXN];
inline int read()
{
int f=1,x=0;
char s=getchar();
while(s<'0'||s>'9'){if(s=='-')f=-1;s=getchar();}
while(s>='0'&&s<='9'){x=(x<<3)+(x<<1)+s-48;s=getchar();}
return f*x;
}
int tot=0,head[MAXN],n,m,ands[MAXN],ai=0,total=0;
bool cmp(const ins &a,const ins &b){return a.z>b.z;}
bool amp(const int &a,const int &b){return a>b;}
int main()
{
freopen("track.in","r",stdin);
freopen("track.out","w",stdout);
n=read(),m=read();
int x,y,z;
if(m==1&&n<=10)
{
int map[11][11],q=0,maxs,mays;
bool visit[11];
int dis[11];
memset(map,0,sizeof(map));
for(int i=1;i<n;++i)
{
x=read(),y=read(),z=read();
map[x][y]=z;
map[y][x]=z;
}
for(int w=1;w<=n;w++)
{
memset(visit,0,sizeof(visit));
memset(dis,0,sizeof(dis));
visit[w]=true;
for(int i=1;i<=n;i++)if(i!=w)dis[i]=map[i][w];
for(int k=1;k<=n;k++)
{
maxs=0;mays=0;
for(int i=1;i<=n;i++)if(!visit[i]&&dis[i]>=maxs)maxs=dis[i],mays=i;
if(!mays)break;
visit[mays]=true;
for(int i=1;i<=n;i++)if(!visit[i]&&map[mays][i]!=0&&map[mays][i]+dis[mays]>dis[i])dis[i]=map[mays][i]+dis[mays];
}
maxs=0;
for(int i=1;i<=n;i++)if(dis[i]>maxs)maxs=dis[i];
if(q<=maxs)q=maxs;
}
printf("%d",q);
}
else
{
for(int i=1;i<n;i++)
{
x=read(),y=read(),z=read();
in[i].x=x;in[i].y=y;in[i].z=z;
total+=z;
if(y==x+1)ai++;
ands[x]++;
}
if(ands[1]==n-1||m==n-1)
{
sort(in+1,in+n,cmp);
printf("%d",in[m].z);
}
else printf("15");
}
return 0;
}
| [
"orion545@qq.com"
] | orion545@qq.com |
1f7da9e32817525f871d2f1ac1c55b3602f7b883 | 945e7bf2e9aef413082e32616b0db1d77f5e4c7e | /SceneModeller/SceneModeller/formats/vrml/GroupingNode.h | 0627376c40a805d0ac447c5ac3997ba7c50bd850 | [] | no_license | basarugur/bu-medialab | 90495e391eda11cdaddfedac241c76f4c8ff243d | 45eb9aebb375427f8e247878bc602eaa5aab8e87 | refs/heads/master | 2020-04-18T21:01:41.722022 | 2015-03-15T16:49:29 | 2015-03-15T16:49:29 | 32,266,742 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,617 | h | /******************************************************************
*
* CyberVRML97 for C++
*
* Copyright (C) Satoshi Konno 1996-2002
*
* File: GroupingNode.h
*
******************************************************************/
#ifndef _CV97_GROUPINGNODE_H_
#define _CV97_GROUPINGNODE_H_
#include "Node.h"
#include "BoundingBox.h"
#define addChildrenEventIn "addChildren"
#define removeChildrenEventIn "removeChildren"
#define bboxCenterFieldName "bboxCenter"
#define bboxSizeFieldName "bboxSize"
class GroupingNode : public Node {
SFVec3f *bboxCenterField;
SFVec3f *bboxSizeField;
public:
GroupingNode();
virtual ~GroupingNode();
////////////////////////////////////////////////
// BoundingBoxSize
////////////////////////////////////////////////
SFVec3f *getBoundingBoxSizeField();
void setBoundingBoxSize(float value[]);
void setBoundingBoxSize(float x, float y, float z);
void getBoundingBoxSize(float value[]);
////////////////////////////////////////////////
// BoundingBoxCenter
////////////////////////////////////////////////
SFVec3f *getBoundingBoxCenterField();
void setBoundingBoxCenter(float value[]);
void setBoundingBoxCenter(float x, float y, float z);
void getBoundingBoxCenter(float value[]);
////////////////////////////////////////////////
// BoundingBox
////////////////////////////////////////////////
void setBoundingBox(BoundingBox *bbox);
void recomputeBoundingBox();
////////////////////////////////////////////////
// List
////////////////////////////////////////////////
GroupingNode *next();
GroupingNode *nextTraversal();
};
#endif
| [
"esangin@19b6b63a-0a50-11de-97d8-e990b0f60ea0"
] | esangin@19b6b63a-0a50-11de-97d8-e990b0f60ea0 |
831960fe6ccf4891e3b302ebd91c4e7ba6b21f1d | a26d25c930aff826c25a79f9290748c24a0f43f8 | /src/code-events.h | 437b12c85ac6f438c8f60d31d6d5fd61a0987934 | [
"BSD-3-Clause",
"SunPro",
"bzip2-1.0.6"
] | permissive | saigowthamr/v8 | ce0cd017bc1015228def3289ab2b9d282653fdd9 | a0406ca909fc6848b722bfd543c5d723d55bb88f | refs/heads/master | 2021-09-08T14:07:57.610578 | 2018-03-09T21:49:26 | 2018-03-09T21:49:41 | 124,609,596 | 6 | 0 | null | 2018-03-10T01:03:14 | 2018-03-10T01:03:14 | null | UTF-8 | C++ | false | false | 7,053 | h | // Copyright 2016 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef V8_CODE_EVENTS_H_
#define V8_CODE_EVENTS_H_
#include <unordered_set>
#include "src/base/platform/mutex.h"
#include "src/globals.h"
#include "src/vector.h"
namespace v8 {
namespace internal {
class AbstractCode;
class Name;
class SharedFunctionInfo;
class String;
namespace wasm {
class WasmCode;
using WasmName = Vector<const char>;
} // namespace wasm
#define LOG_EVENTS_AND_TAGS_LIST(V) \
V(CODE_CREATION_EVENT, "code-creation") \
V(CODE_DISABLE_OPT_EVENT, "code-disable-optimization") \
V(CODE_MOVE_EVENT, "code-move") \
V(CODE_DELETE_EVENT, "code-delete") \
V(CODE_MOVING_GC, "code-moving-gc") \
V(SHARED_FUNC_MOVE_EVENT, "sfi-move") \
V(SNAPSHOT_CODE_NAME_EVENT, "snapshot-code-name") \
V(TICK_EVENT, "tick") \
V(BUILTIN_TAG, "Builtin") \
V(CALLBACK_TAG, "Callback") \
V(EVAL_TAG, "Eval") \
V(FUNCTION_TAG, "Function") \
V(HANDLER_TAG, "Handler") \
V(BYTECODE_HANDLER_TAG, "BytecodeHandler") \
V(LAZY_COMPILE_TAG, "LazyCompile") \
V(REG_EXP_TAG, "RegExp") \
V(SCRIPT_TAG, "Script") \
V(STUB_TAG, "Stub") \
V(NATIVE_FUNCTION_TAG, "Function") \
V(NATIVE_LAZY_COMPILE_TAG, "LazyCompile") \
V(NATIVE_SCRIPT_TAG, "Script")
// Note that 'NATIVE_' cases for functions and scripts are mapped onto
// original tags when writing to the log.
#define PROFILE(the_isolate, Call) (the_isolate)->code_event_dispatcher()->Call;
class CodeEventListener {
public:
#define DECLARE_ENUM(enum_item, _) enum_item,
enum LogEventsAndTags {
LOG_EVENTS_AND_TAGS_LIST(DECLARE_ENUM) NUMBER_OF_LOG_EVENTS
};
#undef DECLARE_ENUM
virtual ~CodeEventListener() {}
virtual void CodeCreateEvent(LogEventsAndTags tag, AbstractCode* code,
const char* comment) = 0;
virtual void CodeCreateEvent(LogEventsAndTags tag, AbstractCode* code,
Name* name) = 0;
virtual void CodeCreateEvent(LogEventsAndTags tag, AbstractCode* code,
SharedFunctionInfo* shared, Name* source) = 0;
virtual void CodeCreateEvent(LogEventsAndTags tag, AbstractCode* code,
SharedFunctionInfo* shared, Name* source,
int line, int column) = 0;
virtual void CodeCreateEvent(LogEventsAndTags tag, wasm::WasmCode* code,
wasm::WasmName name) = 0;
virtual void CallbackEvent(Name* name, Address entry_point) = 0;
virtual void GetterCallbackEvent(Name* name, Address entry_point) = 0;
virtual void SetterCallbackEvent(Name* name, Address entry_point) = 0;
virtual void RegExpCodeCreateEvent(AbstractCode* code, String* source) = 0;
virtual void CodeMoveEvent(AbstractCode* from, Address to) = 0;
virtual void SharedFunctionInfoMoveEvent(Address from, Address to) = 0;
virtual void CodeMovingGCEvent() = 0;
virtual void CodeDisableOptEvent(AbstractCode* code,
SharedFunctionInfo* shared) = 0;
enum DeoptKind { kSoft, kLazy, kEager };
virtual void CodeDeoptEvent(Code* code, DeoptKind kind, Address pc,
int fp_to_sp_delta) = 0;
};
class CodeEventDispatcher {
public:
using LogEventsAndTags = CodeEventListener::LogEventsAndTags;
CodeEventDispatcher() {}
bool AddListener(CodeEventListener* listener) {
base::LockGuard<base::Mutex> guard(&mutex_);
return listeners_.insert(listener).second;
}
void RemoveListener(CodeEventListener* listener) {
base::LockGuard<base::Mutex> guard(&mutex_);
listeners_.erase(listener);
}
#define CODE_EVENT_DISPATCH(code) \
base::LockGuard<base::Mutex> guard(&mutex_); \
for (auto it = listeners_.begin(); it != listeners_.end(); ++it) (*it)->code
void CodeCreateEvent(LogEventsAndTags tag, AbstractCode* code,
const char* comment) {
CODE_EVENT_DISPATCH(CodeCreateEvent(tag, code, comment));
}
void CodeCreateEvent(LogEventsAndTags tag, AbstractCode* code, Name* name) {
CODE_EVENT_DISPATCH(CodeCreateEvent(tag, code, name));
}
void CodeCreateEvent(LogEventsAndTags tag, AbstractCode* code,
SharedFunctionInfo* shared, Name* name) {
CODE_EVENT_DISPATCH(CodeCreateEvent(tag, code, shared, name));
}
void CodeCreateEvent(LogEventsAndTags tag, AbstractCode* code,
SharedFunctionInfo* shared, Name* source, int line,
int column) {
CODE_EVENT_DISPATCH(
CodeCreateEvent(tag, code, shared, source, line, column));
}
void CodeCreateEvent(LogEventsAndTags tag, wasm::WasmCode* code,
wasm::WasmName name) {
CODE_EVENT_DISPATCH(CodeCreateEvent(tag, code, name));
}
void CallbackEvent(Name* name, Address entry_point) {
CODE_EVENT_DISPATCH(CallbackEvent(name, entry_point));
}
void GetterCallbackEvent(Name* name, Address entry_point) {
CODE_EVENT_DISPATCH(GetterCallbackEvent(name, entry_point));
}
void SetterCallbackEvent(Name* name, Address entry_point) {
CODE_EVENT_DISPATCH(SetterCallbackEvent(name, entry_point));
}
void RegExpCodeCreateEvent(AbstractCode* code, String* source) {
CODE_EVENT_DISPATCH(RegExpCodeCreateEvent(code, source));
}
void CodeMoveEvent(AbstractCode* from, Address to) {
CODE_EVENT_DISPATCH(CodeMoveEvent(from, to));
}
void SharedFunctionInfoMoveEvent(Address from, Address to) {
CODE_EVENT_DISPATCH(SharedFunctionInfoMoveEvent(from, to));
}
void CodeMovingGCEvent() { CODE_EVENT_DISPATCH(CodeMovingGCEvent()); }
void CodeDisableOptEvent(AbstractCode* code, SharedFunctionInfo* shared) {
CODE_EVENT_DISPATCH(CodeDisableOptEvent(code, shared));
}
void CodeDeoptEvent(Code* code, CodeEventListener::DeoptKind kind, Address pc,
int fp_to_sp_delta) {
CODE_EVENT_DISPATCH(CodeDeoptEvent(code, kind, pc, fp_to_sp_delta));
}
#undef CODE_EVENT_DISPATCH
private:
std::unordered_set<CodeEventListener*> listeners_;
base::Mutex mutex_;
DISALLOW_COPY_AND_ASSIGN(CodeEventDispatcher);
};
} // namespace internal
} // namespace v8
#endif // V8_CODE_EVENTS_H_
| [
"commit-bot@chromium.org"
] | commit-bot@chromium.org |
56ce558f78e29b6242bc5666a76ea09b7e40082c | 0f950f0466a6322842c85b51b8095f874417f718 | /include/EventAction.hh | e95ba24304bab58831f7ea53a9ec337ccbf5f9a3 | [] | no_license | mjkramer/WindowSim | 4e01b225b1ab622296e8273f6818b6ca0a99fa16 | 33b1abec6eb497bae0924d2d3ba8b4ed94475039 | refs/heads/master | 2020-04-02T01:07:56.363498 | 2016-01-25T23:24:11 | 2016-01-25T23:24:11 | 31,445,746 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,188 | hh | #ifndef EventAction_h
#define EventAction_h 1
#include <map>
#include <TFile.h>
#include <TTree.h>
#include <TH1F.h>
#include "G4UserEventAction.hh"
#include "G4UIcmdWithAString.hh"
#include "G4UImessenger.hh"
const int BUFSIZE = 1024;
class G4Track;
class EventAction : public G4UserEventAction, public G4UImessenger
{
public:
EventAction();
~EventAction();
void BeginOfEventAction(const G4Event *event);
void EndOfEventAction(const G4Event *event);
void SetNewValue(G4UIcommand *cmd, G4String args);
protected:
struct ParticleData {
G4int partId;
G4double cosTheta, energyMeV, momMeV, exitXcm, prodXcm, iActXcm;
};
void Register(G4int trackID, const ParticleData& data);
private:
G4UIcmdWithAString* fFileNameCmd;
TFile* fFile;
TTree* fTree;
TH1F* fEdepHist, *fEdepHistIncl; // Incl - includes secondary KE
// key: track ID
std::map<G4int, ParticleData> fSeenParticles;
// branches
int fCount;
int fPartId[BUFSIZE];
float fCosTheta[BUFSIZE], fEnergyMeV[BUFSIZE], fMomMeV[BUFSIZE];
float fExitXcm[BUFSIZE];
float fProdXcm[BUFSIZE];
float fIActXcm[BUFSIZE];
int fTrackId[BUFSIZE];
friend class SteppingAction;
};
#endif
| [
"mkramer@lbl.gov"
] | mkramer@lbl.gov |
dd0db5f114f1c6942d2ac91d2e139d8db02c090a | d10e040d95efb72524fc2a093b3f514070ef54c5 | /Q1/main.cpp | c54996d88fd55de62fca425819cc94ae682ae85a | [] | no_license | lygiaagueda/Roteiro_4 | aa217e7e6154514c91a38307dc1745ed8d91960f | e7c906dac263047ca9d849ec2906683c4528ead3 | refs/heads/master | 2020-03-16T17:25:53.783881 | 2018-05-10T03:12:34 | 2018-05-10T03:12:34 | 132,831,946 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 514 | cpp | #include <iostream>
#include "restaurante_caseiro.h"
#include "mesa_de_restaurante.h"
#include "pedido.h"
using namespace std;
int main() {
Pedido pedido1 = Pedido(1, 1, 10.0, "PF com duas opcoes de carne");
Pedido pedido2 = Pedido(2, 2, 4.0, "Suco de laranja");
MesaDeRestaurante mesa = MesaDeRestaurante(pedido1, 1);
MesaDeRestaurante mesa2 = MesaDeRestaurante(pedido1, 2);
mesa2.adicionarAoPedido(pedido2);
cout << "Total mesa1: " << mesa.calculaTotal() << endl;
return 0;
}
| [
"luanmegax.ll@gmail.com"
] | luanmegax.ll@gmail.com |
047460e17b4befc25826ca22331853c9ae594c62 | e75cf3fc4e6569583270ac0f3626453c464fe020 | /Android/第三方完整APP源码/mogutt/TTWinClient/core/TTProtect/IniConfig.h | c8eea7408ae229140d613916f6b9e2ca4d6e36e7 | [] | no_license | hailongfeng/zhishiku | c87742e8819c1a234f68f3be48108b244e8a265f | b62bb845a88248855d118bc571634cc94f34efcb | refs/heads/master | 2022-12-26T00:00:48.455098 | 2020-02-26T09:22:05 | 2020-02-26T09:22:05 | 133,133,919 | 1 | 9 | null | 2022-12-16T00:35:57 | 2018-05-12T09:56:41 | Java | WINDOWS-1252 | C++ | false | false | 990 | h | /*******************************************************************************
* @file IniConfig.h 2014\9\1 13:15:52 $
* @author ¿ìµ¶<kuaidao@mogujie.com>
* @brief
******************************************************************************/
#ifndef INICONFIG_C0F81335_CB24_4C2D_BA6C_0E00FA00A17D_H__
#define INICONFIG_C0F81335_CB24_4C2D_BA6C_0E00FA00A17D_H__
/******************************************************************************/
class CIniConfig
{
private:
CString m_sIniFile;
public:
void SetString(CString sSection, CString sItem, CString sVal);
CString GetString(CString sSection, CString sItem);
void SetInt(CString sSection, CString sItem, int iVal);
int GetInt(CString sSection, CString sItem);
void SetFile(CString sFile);
CIniConfig(CString sFile);
CIniConfig(void);
~CIniConfig(void);
};
/******************************************************************************/
#endif// INICONFIG_C0F81335_CB24_4C2D_BA6C_0E00FA00A17D_H__ | [
"no_1hailong@yeah.net"
] | no_1hailong@yeah.net |
299b06c12a8f6d58749b805331ed9f5bb75b1c25 | b6f5f44124554a4b57c6d3c051cf596141ee1e57 | /examples/TEST/SI4844_BASS_TREBLE/SI4844_BASS_TREBLE.ino | 34ca0a5f45520c1c4ace930f8ae3d47cf9ef574f | [
"MIT"
] | permissive | pu2clr/SI4844 | 1fa44c4a6c85f702860892d5b91f5c9101da1f5e | 0860ae0159a1a74983ddc7ae5f479ec91862af58 | refs/heads/master | 2023-08-08T15:03:54.546850 | 2023-08-04T01:22:29 | 2023-08-04T01:22:29 | 213,923,162 | 25 | 7 | null | null | null | null | UTF-8 | C++ | false | false | 2,959 | ino | /*
* SI4844 radio. Bass, treble and volume test.
*
* SI4844 and Arduino Pro Mini connections
*
* | SI4844 pin | Arduino pin | Description |
* | --------- | ------------ | ------------------------------------------------- |
* | 2 | 2 | Arduino interrupt pin |
* | 15 | 12 | Regurlar arduino digital pin used to RESET control |
* | 16 | A4 (SDA) | I2C bus (Data) |
* | 17 | A5 (SCL) | I2C bus (Clocl) |
*
* By Ricardo Lima Caratti (PU2CLR), Oct, 2019.
*
*/
#include <SI4844.h>
// Tested on Arduino Pro Mini
#define INTERRUPT_PIN 2
#define RESET_PIN 12
// Pages 17 and 18 from Si48XX ATDD PROGRAMMING GUIDE
#define DEFAULT_BAND 4 // FM => 0 to 19; AM => 20 to 24; SW => 25 to 40
SI4844 si4844;
void setup() {
Serial.begin(9600);
Serial.println("Bass, treble and volume test.");
delay(500);
si4844.setup(RESET_PIN, INTERRUPT_PIN, DEFAULT_BAND);
si4844.setVolume(55); // It can be from 0 to 63.
// See Si48XX ATDD PROGRAMMING GUIDE, page 21
// 3 = Mixed mode 2 (bass/treble and digital volume coexist, max volume = 63)
// 0 = Stereo audio output (default)
// 1 = {–0 dB, -0dB, –0 dB} i.e., adjacent points same volume levels
// 0 = Adjacent points allow stereo separation and stereo indicator on (default)
// 0 = Set audio mode and settings
si4844.setAudioMode(3,0,1,0,0);
instructions();
}
// Shows instruções
void instructions() {
Serial.println("---------------------------------------------------");
Serial.println("Type + or - to sound volume");
Serial.println("Type B to Bass; T to Treeble");
Serial.println("Type M to mute; U to unmute");
Serial.println("---------------------------------------------------");
delay(2000);
}
void loop() {
if (Serial.available() > 0) {
char key = Serial.read();
switch (key)
{
case 'b':
case 'B':
si4844.bassTrebleDown();
break;
case 't':
case 'T':
si4844.bassTrebleUp();
break;
case '+': // sound volume control
si4844.volumeUp();
break;
case '-':
si4844.volumeDown();
break;
case 'M':
case 'm':
si4844.setAudioMute(true);
break;
case 'U':
case 'u':
si4844.setAudioMute(false);
break;
default:
instructions();
break;
}
}
// If you move the tuner, hasStatusChanged returns true
if (si4844.hasStatusChanged())
{
Serial.print("[Band..: ");
Serial.print(si4844.getBandMode());
Serial.print(" - Frequency: ");
Serial.print(si4844.getFrequency(),0);
Serial.print(" KHz");
if (si4844.getStatusBandMode() == 0) {
Serial.print(" - Stereo ");
Serial.print(si4844.getStereoIndicator());
}
Serial.println("]");
}
}
| [
"ricardo.caratti@adm.cogect"
] | ricardo.caratti@adm.cogect |
fc45f9a7997b282affb60cabbe2db699dab43734 | cccfb7be281ca89f8682c144eac0d5d5559b2deb | /components/services/app_service/public/cpp/icon_types.h | 5ec1b5296b018680715f38f79c470596fa6db543 | [
"BSD-3-Clause"
] | permissive | SREERAGI18/chromium | 172b23d07568a4e3873983bf49b37adc92453dd0 | fd8a8914ca0183f0add65ae55f04e287543c7d4a | refs/heads/master | 2023-08-27T17:45:48.928019 | 2021-11-11T22:24:28 | 2021-11-11T22:24:28 | 428,659,250 | 1 | 0 | BSD-3-Clause | 2021-11-16T13:08:14 | 2021-11-16T13:08:14 | null | UTF-8 | C++ | false | false | 4,867 | h | // 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.
#ifndef COMPONENTS_SERVICES_APP_SERVICE_PUBLIC_CPP_ICON_TYPES_H_
#define COMPONENTS_SERVICES_APP_SERVICE_PUBLIC_CPP_ICON_TYPES_H_
#include <vector>
#include "components/services/app_service/public/mojom/types.mojom.h"
#include "ui/gfx/image/image_skia.h"
namespace apps {
struct COMPONENT_EXPORT(ICON_TYPES) IconKey {
IconKey();
IconKey(uint64_t timeline, int32_t resource_id, uint32_t icon_effects);
IconKey(const IconKey&) = delete;
IconKey& operator=(const IconKey&) = delete;
IconKey(IconKey&&) = default;
IconKey& operator=(IconKey&&) = default;
bool operator==(const IconKey& other) const;
~IconKey();
// A timeline value for icons that do not change.
static const uint64_t kDoesNotChangeOverTime;
static const int32_t kInvalidResourceId;
// A monotonically increasing number so that, after an icon update, a new
// IconKey, one that is different in terms of field-by-field equality, can be
// broadcast by a Publisher.
//
// The exact value of the number isn't important, only that newer IconKey's
// (those that were created more recently) have a larger timeline than older
// IconKey's.
//
// This is, in some sense, *a* version number, but the field is not called
// "version", to avoid any possible confusion that it encodes *the* app's
// version number, e.g. the "2.3.5" in "FooBar version 2.3.5 is installed".
//
// For example, if an app is disabled for some reason (so that its icon is
// grayed out), this would result in a different timeline even though the
// app's version is unchanged.
uint64_t timeline;
// If non-zero (or equivalently, not equal to kInvalidResourceId), the
// compressed icon is compiled into the Chromium binary as a statically
// available, int-keyed resource.
int32_t resource_id;
// A bitmask of icon post-processing effects, such as desaturation to gray
// and rounding the corners.
uint32_t icon_effects;
// When adding new fields, also update the IconLoader::Key type in
// components/services/app_service/public/cpp/icon_loader.*
};
enum class IconType {
// Sentinel value used in error cases.
kUnknown,
// Icon as an uncompressed gfx::ImageSkia with no standard Chrome OS mask.
kUncompressed,
// Icon as compressed PNG-encoded bytes with no standard Chrome OS mask.
kCompressed,
// Icon as an uncompressed gfx::ImageSkia with the standard Chrome OS mask
// applied. This is the default suggested icon type.
kStandard,
};
// The return value for the App Service LoadIcon method. The icon will be
// provided in either an uncompressed representation (gfx::ImageSkia), or a
// compressed representation (PNG-encoded bytes) depending on |icon_type|.
struct COMPONENT_EXPORT(ICON_TYPES) IconValue {
IconValue();
IconValue(const IconValue&) = delete;
IconValue& operator=(const IconValue&) = delete;
~IconValue();
IconType icon_type = IconType::kUnknown;
gfx::ImageSkia uncompressed;
// PNG-encoded bytes for the icon
std::vector<uint8_t> compressed;
// Specifies whether the icon provided is a placeholder. That field should
// only be true if the corresponding `LoadIcon` call had
// `allow_placeholder_icon` set to true, which states whether the caller will
// accept a placeholder if the real icon can not be provided at this time.
bool is_placeholder_icon = false;
};
using IconValuePtr = std::unique_ptr<IconValue>;
using LoadIconCallback = base::OnceCallback<void(IconValuePtr)>;
// TODO(crbug.com/1253250): Remove these functions after migrating to non-mojo
// AppService.
COMPONENT_EXPORT(ICON_TYPES)
apps::mojom::IconKeyPtr ConvertIconKeyToMojomIconKey(const IconKey& icon_key);
COMPONENT_EXPORT(ICON_TYPES)
std::unique_ptr<IconKey> ConvertMojomIconKeyToIconKey(
const apps::mojom::IconKeyPtr& mojom_icon_key);
COMPONENT_EXPORT(ICON_TYPES)
apps::mojom::IconType ConvertIconTypeToMojomIconType(IconType icon_type);
COMPONENT_EXPORT(ICON_TYPES)
IconType ConvertMojomIconTypeToIconType(apps::mojom::IconType mojom_icon_type);
COMPONENT_EXPORT(ICON_TYPES)
apps::mojom::IconValuePtr ConvertIconValueToMojomIconValue(
IconValuePtr icon_value);
COMPONENT_EXPORT(ICON_TYPES)
IconValuePtr ConvertMojomIconValueToIconValue(
apps::mojom::IconValuePtr mojom_icon_value);
COMPONENT_EXPORT(ICON_TYPES)
base::OnceCallback<void(IconValuePtr)> IconValueToMojomIconValueCallback(
base::OnceCallback<void(apps::mojom::IconValuePtr)> callback);
COMPONENT_EXPORT(ICON_TYPES)
base::OnceCallback<void(apps::mojom::IconValuePtr)>
MojomIconValueToIconValueCallback(
base::OnceCallback<void(IconValuePtr)> callback);
} // namespace apps
#endif // COMPONENTS_SERVICES_APP_SERVICE_PUBLIC_CPP_ICON_TYPES_H_
| [
"chromium-scoped@luci-project-accounts.iam.gserviceaccount.com"
] | chromium-scoped@luci-project-accounts.iam.gserviceaccount.com |
5195560dca1af243d6b19d2a778eab0fffc92639 | dd949f215d968f2ee69bf85571fd63e4f085a869 | /tools/math/branches/dora-yr4-20120620/src/c++/math/Vector2.h | 16fc257370d0398b0fbc69a302c2616d01b0975a | [] | no_license | marc-hanheide/cogx | a3fd395805f1b0ad7d713a05b9256312757b37a9 | cb9a9c9cdfeba02afac6a83d03b7c6bb778edb95 | refs/heads/master | 2022-03-16T23:36:21.951317 | 2013-12-10T23:49:07 | 2013-12-10T23:49:07 | 219,460,352 | 1 | 2 | null | null | null | null | UTF-8 | C++ | false | false | 14,359 | h | /**
* Yet another set of 2D vector utilities.
*
* Based on code by Marek Kopicky.
*
* A lot of set/get functions are provided to allow You to interface the Vector2
* class to representations or linear algebra packages You are already using.
*
* @author Michael Zillich
* @date February 2009
*/
#ifndef VECTOR2_H
#define VECTOR2_H
#include <iostream>
#include <vector>
#include <stdexcept>
#include <cast/core/CASTUtils.hpp>
#include <cogxmath_base.h>
#include <Math.hpp>
namespace cogx
{
namespace Math
{
using namespace std;
using namespace cast;
/**
* Initialises from 2 scalars.
*/
inline Vector2 vector2(double x, double y)
{
Vector2 a;
a.x = x;
a.y = y;
return a;
}
/**
* Access the data as an array.
* @return const array of 3 doubles
*/
inline const double *get(const Vector2 &a)
{
return &a.x;
}
/**
* Access the data as an array.
* @return array of 3 doubles
*/
inline double* get(Vector2 &a)
{
return &a.x;
}
/**
* Get an element specified via index.
*/
inline double get(const Vector2 &a, int idx) throw(runtime_error)
{
if(idx < 0 || idx > 1)
throw runtime_error(exceptionMessage(__HERE__,
"invlaid index %d must be [0,1]", idx));
return (&a.x)[idx];
}
/**
* Set an element specified via index.
*/
inline void set(Vector2 &a, int idx, double d) throw(runtime_error)
{
if(idx < 0 || idx > 1)
throw runtime_error(exceptionMessage(__HERE__,
"invlaid index %d must be [0,1]", idx));
(&a.x)[idx] = d;
}
/**
* Get the 2 values to a float array.
* @param v array of size at least offset + 2
* @param offset position where to start in the array
*/
inline void get(const Vector2 &a, float v[], size_t offset = 0)
{
v[offset] = (float)a.x;
v[offset + 1] = (float)a.y;
}
/**
* Get the 2 values to a double array.
* @param v array of size at least offset + 2
* @param offset position where to start in the array
*/
inline void get(const Vector2 &a, double v[], size_t offset = 0)
{
v[offset] = a.x;
v[offset + 1] = a.y;
}
/**
* Get the 2 values to a float STL vector.
* @param v STL vector of size at least offset + 2
* @param offset position where to start in the STL vector
*/
inline void get(const Vector2 &a, vector<float> &v, size_t offset = 0)
throw(runtime_error)
{
if(v.size() < offset + 2)
throw runtime_error(exceptionMessage(__HERE__,
"vector not big enough: %d < %d", (int)v.size(), (int)offset + 2));
v[offset] = (float)a.x;
v[offset + 1] = (float)a.y;
}
/**
* Get the 2 values to a double STL vector.
* @param v STL vector of size at least offset + 2
* @param offset position where to start in the STL vector
*/
inline void get(const Vector2 &a, vector<double> &v, size_t offset = 0)
throw(runtime_error)
{
if(v.size() < offset + 2)
throw runtime_error(exceptionMessage(__HERE__,
"vector not big enough: %d < %d", (int)v.size(), (int)offset + 2));
v[offset] = a.x;
v[offset + 1] = a.y;
}
/**
* Set from 2 scalar values.
*/
inline void set(Vector2 &a, double x, double y)
{
a.x = x;
a.y = y;
}
/**
* Set from 2 consecutive values in a float array.
* @param v array of size at least offset + 2
* @param offset position where to start in the array
*/
inline void set(Vector2 &a, const float v[], size_t offset = 0)
{
a.x = (double)v[offset];
a.y = (double)v[offset + 1];
}
/**
* Set from 2 consecutive values in a double array.
* @param v array of size at least offset + 2
* @param offset position where to start in the array
*/
inline void set(Vector2 &a, const double v[], size_t offset = 0)
{
a.x = v[offset];
a.y = v[offset + 1];
}
/**
* Set from 2 consecutive values in a float STL vector.
* @param v STL vector of size at least offset + 2
* @param offset position where to start in the STL vector
*/
inline void set(Vector2 &a, const vector<float> &v, size_t offset = 0)
throw(runtime_error)
{
if(v.size() < offset + 2)
throw runtime_error(exceptionMessage(__HERE__,
"vector not big enough: %d < %d", (int)v.size(), (int)offset + 2));
a.x = (double)v[offset];
a.y = (double)v[offset + 1];
}
/**
* Set from 2 consecutive values in a double STL vector.
* @param v STL vector of size at least offset + 2
* @param offset position where to start in the STL vector
*/
inline void set(Vector2 &a, const vector<double> &v, size_t offset = 0)
throw(runtime_error)
{
if(v.size() < offset + 2)
throw runtime_error(exceptionMessage(__HERE__,
"vector not big enough: %d < %d", (int)v.size(), (int)offset + 2));
a.x = (double)v[offset];
a.y = (double)v[offset + 1];
}
/**
* a = -a
*/
inline void setNegative(Vector2 &a)
{
a.x = -a.x;
a.y = -a.y;
}
inline void setZero(Vector2 &a)
{
a.x = REAL_ZERO;
a.y = REAL_ZERO;
}
/**
* Tests for exact zero vector.
*/
inline bool isZero(const Vector2 &a)
{
return iszero(a.x) && iszero(a.y);
}
/**
* Tests for elementwise positive vector.
*/
inline bool isPositive(const Vector2 &a)
{
return a.x > REAL_ZERO && a.y > REAL_ZERO;
}
/**
* Tests for elementwise negative vector.
*/
inline bool isNegative(const Vector2 &a)
{
return a.x < REAL_ZERO && a.y < REAL_ZERO;
}
/**
* Tests for finite vector.
*/
inline bool isFinite(const Vector2 &a)
{
return isfinite(a.x) && isfinite(a.y);
}
inline Vector2& operator += (Vector2 &a, const Vector2 &b)
{
a.x += b.x;
a.y += b.y;
return a;
}
inline Vector2& operator -= (Vector2 &a, const Vector2 &b)
{
a.x -= b.x;
a.y -= b.y;
return a;
}
inline Vector2& operator *= (Vector2 &a, double s)
{
a.x *= s;
a.y *= s;
return a;
}
inline Vector2& operator /= (Vector2 &a, double s) throw(runtime_error)
{
if(iszero(s))
throw runtime_error(exceptionMessage(__HERE__, "division by zero"));
a.x /= s;
a.y /= s;
return a;
}
/**
* Print a vector in text form to a stream: '[x y]'
*/
inline void writeText(ostream &os, const Vector2 &a)
{
os << '[' << a.x << ' ' << a.y << ']';
}
/**
* Read a vector in text form from a stream.
* The expected format is: '[x y]', white spaces are ignored.
*/
inline void readText(istream &is, Vector2 &a) throw(runtime_error)
{
char c;
is >> c;
if(c == '[')
{
is >> a.x >> a.y >> c;
if(c != ']')
throw runtime_error(exceptionMessage(__HERE__,
"error reading Vector2: ']' expected"));
}
else
throw runtime_error(exceptionMessage(__HERE__,
"error reading Vector2: '[' expected"));
}
/**
* Writing to a stream is taken to be a textual output, rather than a
* serialisation of the actual binary data.
*/
inline ostream& operator << (ostream &os, const Vector2 &a)
{
writeText(os, a);
return os;
}
/**
* Reading from a stream is taken to read a textual input, rather than
* de-serialising the actual binary data.
*/
inline istream& operator >> (istream &is, Vector2 &a)
{
readText(is, a);
return is;
}
/**
* Returns true if the two vectors are exactly equal.
*/
inline bool operator == (const Vector2 &a, const Vector2 &b)
{
return a.x == b.x && a.y == b.y;
}
/**
* Returns true if a and b's elems are within epsilon of each other.
*/
inline bool vequals(const Vector2& a, const Vector2& b, double eps)
{
return equals(a.x, b.x, eps) &&
equals(a.y, b.y, eps);
}
// Is now provided in Ice
// /**
// * Returns true if the two vectors are not exactly equal.
// */
// inline bool operator != (const Vector2 &a, const Vector2 &b)
// {
// return a.x != b.x || a.y != b.y;
// }
inline Vector2 operator - (const Vector2 &a)
{
return vector2(-a.x, -a.y);
}
inline Vector2 operator + (const Vector2 &a, const Vector2 &b)
{
return vector2(a.x + b.x, a.y + b.y);
}
inline Vector2 operator - (const Vector2 &a, const Vector2 &b)
{
return vector2(a.x - b.x, a.y - b.y);
}
inline Vector2 operator * (const double s, const Vector2 &a)
{
return vector2(a.x*s, a.y*s);
}
inline Vector2 operator * (const Vector2 &a, const double s)
{
return s*a;
}
inline Vector2 operator / (const Vector2 &a, const double s) throw(runtime_error)
{
if(iszero(s))
throw runtime_error(exceptionMessage(__HERE__, "division by zero"));
return vector2(a.x/s, a.y/s);
}
/**
* c = a + b
*/
inline void add(const Vector2& a, const Vector2& b, Vector2& c)
{
c.x = a.x + b.x;
c.y = a.y + b.y;
}
/**
* c = a - b
*/
inline void sub(const Vector2& a, const Vector2& b, Vector2& c)
{
c.x = a.x - b.x;
c.y = a.y - b.y;
}
/**
* c = s * a
*/
inline void mult(double s, const Vector2& a, Vector2& c)
{
c.x = a.x * s;
c.y = a.y * s;
}
/**
* c = s * a + b
*/
inline void multAdd(double s, const Vector2 &a, const Vector2 &b, Vector2 &c)
{
c.x = s*a.x + b.x;
c.y = s*a.y + b.y;
}
/**
* c = s * a + t * b
*/
inline void linear(double s, const Vector2 &a, double t, const Vector2 &b,
Vector2 &c)
{
c.x = s*a.x + t*b.x;
c.y = s*a.y + t*b.y;
}
inline double norm(const Vector2 &a)
{
return sqrt(sqr(a.x) + sqr(a.y));
}
inline double normSqr(const Vector2 &a)
{
return sqr(a.x) + sqr(a.y);
}
inline double length(const Vector2 &a)
{
return norm(a);
}
inline double lengthSqr(const Vector2 &a)
{
return normSqr(a);
}
/**
* Euclidian distance.
*/
inline double dist(const Vector2 &a, const Vector2 &b)
{
return sqrt(sqr(a.x - b.x) + sqr(a.y - b.y));
}
/**
* Squared euclidian distance.
*/
inline double distSqr(const Vector2 &a, const Vector2 &b)
{
return sqr(a.x - b.x) + sqr(a.y - b.y);
}
/**
* Normalises the vector, returns the length before normalisation.
*/
inline double normalise(Vector2 &a)
{
double n = norm(a);
a /= n;
return n;
}
/**
* Get any (clockwise or anti-clockwise) normal.
*/
inline Vector2 normal(const Vector2 &a)
{
return vector2(-a.y, a.x);
}
/**
* Get clockwise (mathematically negative) normal, i.e. rotation to the right.
* ATTENTION: For typical image co-ordinate systems with x-axis pointiing to
* the right and y-axis pointing downwards things are reversed: clockwise
* rotation in this case means rotation to the left.
*/
inline Vector2 normalClockwise(const Vector2 &a)
{
return vector2(a.y, -a.x);
}
/**
* Get anti-clockwise (mathematically positive) normal, i.e. rotation to the
* left.
* ATTENTION: For typical image co-ordinate systems with x-axis pointiing to
* the right and y-axis pointing downwards things are reversed: anti-clockwise
* rotation in this case means rotation to the right.
*/
inline Vector2 NormalAntiClockwise(const Vector2 &a)
{
return vector2(-a.y, a.x);
}
inline double polarAngle(const Vector2 &a)
{
return atan2(a.y, a.x);
}
/**
* Vector dot product.
*/
inline double dot(const Vector2 &a, const Vector2 &b)
{
return a.x*b.x + a.y*b.y;
}
/**
* Vector cross product.
* note: positive cross product a x b means b counterclockwise (i.e. left) to a
*/
inline double cross(const Vector2 &a, const Vector2 &b)
{
return a.x*b.y - a.y*b.x;
}
/**
* Returns true if b is counterclockwise to a.
* Same as left of.
*/
inline bool counterClockwiseTo(const Vector2 &a, const Vector2 &b)
{
return cross(a, b) > 0.;
}
/**
* Returns true if b is left of a.
* Same as counterclockwise.
*/
inline bool leftOf(const Vector2 &a, const Vector2 &b)
{
return counterClockwiseTo(a, b);
}
/**
* Returns true if b is clockwise to a.
* Same as right of.
*/
inline bool clockwiseTo(const Vector2 &a, const Vector2 &b)
{
return cross(a, b) < 0.;
}
/**
* Returns true if b is right of a.
* Same as clockwise.
*/
inline bool rightOf(const Vector2 &a, const Vector2 &b)
{
return clockwiseTo(a, b);
}
/**
* Midpoint between two points.
*/
inline Vector2 midPoint(const Vector2 &a, const Vector2 &b)
{
return vector2((a.x + b.x)/2., (a.y + b.y)/2.);
}
/**
* Rotate around angle given in [rad].
*/
inline Vector2 rotate(const Vector2 &a, double phi)
{
double si = sin(phi), co = cos(phi);
return vector2(co*a.x - si*a.y, si*a.x + co*a.y);
}
/**
* Returns signed distance of point q from line defined by point p and unit
* direction vector d.
*/
inline double distPointToLine(const Vector2 &q, const Vector2 &p,
const Vector2 &d)
{
Vector2 p_to_q = q - p;
return cross(p_to_q, d);
}
inline double absDistPointToLine(const Vector2 &q, const Vector2 &p,
const Vector2 &d)
{
return abs(distPointToLine(q, p, d));
}
/**
* Returns intersection of lines defined by point p and direction d (needs not
* be a unit vector).
*/
inline void lineIntersection(const Vector2 &p1, const Vector2 &d1,
const Vector2 &p2, const Vector2 &d2, Vector2 &i) throw(runtime_error)
{
double d = cross(d2, d1);
if(d == 0.)
throw runtime_error(exceptionMessage(__HERE__, "lines do not intersect"));
Vector2 p12 = p2 - p1;
double l = cross(d2, p12)/d;
set(i, p1.x + l*d1.x, p1.y + l*d1.y);
}
/**
* Returns intersection of lines defined by point p and direction d (needs not
* be a unit vector).
* l1 and l2 contain the lengths along the lines where the intersection lies,
* measured in lengths of d1 and d2.
* So if You want l1 and l2 in pixels, d1 and d2 must be unit vectors.
*/
inline void lineIntersection(const Vector2 &p1, const Vector2 &d1,
const Vector2 &p2, const Vector2 &d2, Vector2 &i, double &l1, double &l2)
throw(runtime_error)
{
double d = cross(d2, d1);
if(d == 0.)
throw runtime_error(exceptionMessage(__HERE__, "lines do not intersect"));
Vector2 p12 = p2 - p1;
l1 = cross(d2, p12)/d;
l2 = cross(d1, p12)/d;
set(i, p1.x + l1*d1.x, p1.y + l1*d1.y);
}
/**
* Checks whether lines a and b defined by their end points intersect.
*/
inline bool linesIntersecting(const Vector2 &a1, const Vector2 &a2,
const Vector2 &b1, const Vector2 &b2)
{
double l1 = 0., l2 = 0.;
Vector2 i;
Vector2 a12 = a2 - a1;
Vector2 b12 = b2 - b1;
lineIntersection(a1, a12, b1, b12, i, l1, l2);
return (l1 >= 0. && l1 <= 1.) && (l2 >= 0. && l2 <= 1.);
}
/*
* Calculate center of circle from 3 points.
* note: throws an exception if center cannot be calculated.
*/
inline void circleCenter(const Vector2 &pi, const Vector2 &pj,
const Vector2 &pk, Vector2 &c)
{
// throws an exception if intersection cannot be calculated
lineIntersection(
vector2((pi.x + pj.x)/2., (pi.y + pj.y)/2.),
vector2(pj.y - pi.y, pi.x - pj.x),
vector2((pj.x + pk.x)/2., (pj.y + pk.y)/2.),
vector2(pk.y - pj.y, pj.x - pk.x),
c);
}
}
}
#endif
| [
"krsj@9dca7cc1-ec4f-0410-aedc-c33437d64837"
] | krsj@9dca7cc1-ec4f-0410-aedc-c33437d64837 |
e238968aedcc1f976f612d31104bfb774736a75e | dd0126aadfd73fb0e190dfea24758da558730bbb | /ep3/include/FindCommand.hpp | 2f716bfdfd1406d4f4131504b76c1e6476d3b11f | [] | no_license | Mlordx/sistemasoperacionais | edddab4c45c94e5d7e02d2c63de9309c31c05c2a | 373b4d2eb8c3467454ae5b8c9032587e06de55e3 | refs/heads/master | 2021-01-21T22:26:35.139576 | 2015-11-22T01:54:14 | 2015-11-22T01:54:14 | 41,759,350 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 414 | hpp | #ifndef HPP_FINDCOMMAND_DEFINED
#define HPP_FINDCOMMAND_DEFINED
// Standard Libraries
#include <string>
#include <vector>
// EP3 Classes
#include "Command.hpp"
#include "FileEntry.hpp"
#include "FileSystem.hpp"
class FindCommand : public Command{
private:
std::shared_ptr<FileSystem> fileSystem_;
public:
FindCommand(std::shared_ptr<FileSystem> fs);
int execute(std::vector<std::string> args);
};
#endif
| [
"matbarrosrodrigues@gmail.com"
] | matbarrosrodrigues@gmail.com |
1bb2d02f73bd6525d52bf9cd17083ad043ed3eeb | 39c56def456a50abedd7368d13a9de880955bfa1 | /Boletin2N/Ejercicio19/main.cpp | df9e95ccf03ea86c35fdc73e1da6d097d89a94d7 | [] | no_license | Axyz1398/Boletines | 10ef4bef02e16f542c9c5d8fe0ec1d546adf1ec1 | 9c76aa3f4e64d773889cd659a02510a8bebeb605 | refs/heads/master | 2020-12-09T07:26:18.623000 | 2020-01-11T13:26:43 | 2020-01-11T13:26:43 | 233,236,366 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 581 | cpp | #include "cabecera.h"
#include <iostream>
using namespace std;
int main()
{
int num;
int div;
cout << "Introduzca el dividendo: ";
cin >> num;
cout << "Introduzca el divisor: ";
cin >> div;
cout << "---------NO FINAL----------"<<endl;
muestra(funcionNF(num,div));
cout << "****************************"<<endl;
cout << "------------FINAL----------"<<endl;
muestra(funcionF(num,div));
cout << "****************************"<<endl;
cout << "---------ITERATIVO----------"<<endl;
muestra(funcionI(num,div));
cout << "****************************"<<endl;
return 0;
}
| [
"axyz1398@gmail.com"
] | axyz1398@gmail.com |
6f0fafd05640118397592bc54e959a1ac96cc528 | 0c930838cc851594c9eceab6d3bafe2ceb62500d | /include/boost/numeric/bindings/traits/ublas_hermitian.hpp | 032e7a2321e1f0e0b93ab1c4b91c38b104d80d10 | [
"BSD-3-Clause"
] | permissive | quantmind/jflib | 377a394c17733be9294bbf7056dd8082675cc111 | cc240d2982f1f1e7e9a8629a5db3be434d0f207d | refs/heads/master | 2021-01-19T07:42:43.692197 | 2010-04-19T22:04:51 | 2010-04-19T22:04:51 | 439,289 | 4 | 3 | null | null | null | null | UTF-8 | C++ | false | false | 4,680 | hpp | /*
*
* Copyright (c) 2002, 2003 Kresimir Fresl, Toon Knapen and Karl Meerbergen
*
* 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)
*
* KF acknowledges the support of the Faculty of Civil Engineering,
* University of Zagreb, Croatia.
*
*/
#ifndef BOOST_NUMERIC_BINDINGS_TRAITS_UBLAS_HERMITIAN_H
#define BOOST_NUMERIC_BINDINGS_TRAITS_UBLAS_HERMITIAN_H
#include <boost/numeric/bindings/traits/traits.hpp>
#ifndef BOOST_NUMERIC_BINDINGS_POOR_MANS_TRAITS
#ifndef BOOST_UBLAS_HAVE_BINDINGS
# include <boost/numeric/ublas/hermitian.hpp>
#endif
#include <boost/numeric/bindings/traits/ublas_matrix.hpp>
#include <boost/numeric/bindings/traits/detail/ublas_uplo.hpp>
namespace boost { namespace numeric { namespace bindings { namespace traits {
// ublas::hermitian_matrix<>
template <typename T, typename F1, typename F2, typename A, typename M>
struct matrix_detail_traits<boost::numeric::ublas::hermitian_matrix<T, F1, F2, A>, M>
{
#ifndef BOOST_NUMERIC_BINDINGS_NO_SANITY_CHECK
BOOST_STATIC_ASSERT( (boost::is_same<boost::numeric::ublas::hermitian_matrix<T, F1, F2, A>, typename boost::remove_const<M>::type>::value) );
#endif
#ifdef BOOST_BINDINGS_FORTRAN
BOOST_STATIC_ASSERT((boost::is_same<
typename F2::orientation_category,
boost::numeric::ublas::column_major_tag
>::value));
#endif
typedef boost::numeric::ublas::hermitian_matrix<T, F1, F2, A> identifier_type;
typedef M matrix_type;
typedef hermitian_packed_t matrix_structure;
typedef typename detail::ublas_ordering<
typename F2::orientation_category
>::type ordering_type;
typedef typename detail::ublas_uplo< F1 >::type uplo_type;
typedef T value_type ;
typedef typename detail::generate_const<M,T>::type* pointer ;
static pointer storage (matrix_type& hm) {
typedef typename detail::generate_const<M,A>::type array_type ;
return vector_traits<array_type>::storage (hm.data());
}
static std::ptrdiff_t num_rows (matrix_type& hm) { return hm.size1(); }
static std::ptrdiff_t num_columns (matrix_type& hm) { return hm.size2(); }
};
namespace detail {
template <typename M>
std::ptrdiff_t matrix_bandwidth( M const& m, upper_t ) {
return matrix_traits<M const>::upper_bandwidth( m ) ;
}
template <typename M>
std::ptrdiff_t matrix_bandwidth( M const& m, lower_t ) {
// When the lower triangular band matrix is stored the
// upper bandwidth must be zero
assert( 0 == matrix_traits<M const>::upper_bandwidth( m ) ) ;
return matrix_traits<M const>::lower_bandwidth( m ) ;
}
} // namespace detail
// ublas::hermitian_adaptor<>
template <typename M, typename F1, typename MA>
struct matrix_detail_traits<boost::numeric::ublas::hermitian_adaptor<M, F1>, MA>
{
#ifndef BOOST_NUMERIC_BINDINGS_NO_SANITY_CHECK
BOOST_STATIC_ASSERT( (boost::is_same<boost::numeric::ublas::hermitian_adaptor<M, F1>, typename boost::remove_const<MA>::type>::value) );
#endif
typedef boost::numeric::ublas::hermitian_adaptor<M, F1> identifier_type;
typedef MA matrix_type;
typedef hermitian_t matrix_structure;
typedef typename matrix_traits<M>::ordering_type ordering_type;
typedef typename detail::ublas_uplo< F1 >::type uplo_type;
typedef typename M::value_type value_type;
typedef typename detail::generate_const<MA, value_type>::type* pointer;
private:
typedef typename detail::generate_const<MA, typename MA::matrix_closure_type>::type m_type;
public:
static pointer storage (matrix_type& hm) {
return matrix_traits<m_type>::storage (hm.data());
}
static std::ptrdiff_t num_rows (matrix_type& hm) { return hm.size1(); }
static std::ptrdiff_t num_columns (matrix_type& hm) { return hm.size2(); }
static std::ptrdiff_t leading_dimension (matrix_type& hm) {
return matrix_traits<m_type>::leading_dimension (hm.data());
}
// For banded M
static std::ptrdiff_t upper_bandwidth(matrix_type& hm) {
return detail::matrix_bandwidth( hm.data(), uplo_type() );
}
static std::ptrdiff_t lower_bandwidth(matrix_type& hm) {
return detail::matrix_bandwidth( hm.data(), uplo_type() );
}
};
}}}}
#endif // BOOST_NUMERIC_BINDINGS_POOR_MANS_TRAITS
#endif // BOOST_NUMERIC_BINDINGS_TRAITS_UBLAS_HERMITIAN_H
| [
"info@quantmind.com"
] | info@quantmind.com |
8a135348bda85a158d5ce7376dee829dc16df3fa | be11a31bdca043685f330b9662a49b04fe9f6caf | /Include/AGRLoader.h | 45cf9a38b2d743ded96d47dbfd7d70e3b9028bda | [
"MIT"
] | permissive | mBr001/Cinema-4D-Source-Tools | e5413b9aafae2a6743b5b18d0d34f1a018567588 | 130472179849d935a510bff670662d6eb62dc514 | refs/heads/master | 2020-07-05T13:18:20.862633 | 2018-07-15T06:47:01 | 2018-07-15T06:47:01 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,009 | h | // Copyright (c) 2018 Brett Anthony. All rights reserved.
//
// This work is licensed under the terms of the MIT license.
// For a copy, see <https://opensource.org/licenses/MIT>.
#ifndef ST_AGR_LOADER_H
#define ST_AGR_LOADER_H
#include "c4d.h"
#include "c4d_symbols.h"
#include "c4d_quaternion.h"
#include "fagrloader.h"
#include "fsmdloader.h"
#include "Globals.h"
#include <map>
#include <set>
#include "SMDLoader.h"
#include "stParseTools.h"
#include <vector>
namespace ST
{
struct AGRSettings
{
Filename RootModelDir;
};
class AGRData;
class ModelHandle;
//----------------------------------------------------------------------------------------
/// Allows the importing of Advanced Effects Game Recording (AGR) files.
//----------------------------------------------------------------------------------------
class AGRLoader : public SceneLoaderData
{
public:
Bool Init(GeListNode *node) { m_time[0] = -1; m_time[1] = -1; return true; }
Bool Identify(BaseSceneLoader* node, const Filename& name, UChar* probe, Int32 size);
FILEERROR Load(BaseSceneLoader* node, const Filename& name, BaseDocument* doc, SCENEFILTER filterflags, String* error, BaseThread* bt);
static NodeData* Alloc() { return NewObjClear(AGRLoader); }
private:
void AddToDictionary(const String &value);
String ReadFromDictionary(BaseFile &file);
Vector ReadVector(BaseFile &file, Bool quakeformat = false);
Vector ReadQAngle(BaseFile &file);
Quaternion ReadQuaternion(BaseFile &file);
std::map<Int32, ModelHandle*> m_handles;
std::vector<ModelHandle*> *m_FreeHandles;
std::map<Int32, String> m_dictionary;
Float32 m_time[2];
std::set<Int32> m_hiddenHandles;
std::set<Int32> m_deletedHandles;
std::map<Int32, AGRData> m_raw_data;
std::vector<Vector> CamPos;
std::vector<Vector> CamRot;
std::vector<Float32> CamFov;
Int32 frame;
};
class AGRData
{
public:
Filename Model;
std::vector<Vector> RootPos;
std::vector<Vector> RootRot;
std::vector<std::map<Int32, Vector>> BonePos;
std::vector<std::map<Int32, Quaternion>> BoneRot;
};
class ModelHandle
{
public:
ModelHandle() { m_skeleton = NewObj(std::vector<ST::SourceSkeletonBone*>); }
void Free(GeListNode *node) { DeletePtrVector(m_skeleton); }
//----------------------------------------------------------------------------------------
/// Builds the skeleton cache (m_skeleton) from a qc file.
///
/// @param[in] qc The qc file to build the skeleton from.
//----------------------------------------------------------------------------------------
void BuildSkeletonCache(Filename qc);
Filename Model;
BaseObject *Skeleton;
std::vector<ST::SourceSkeletonBone*> *m_skeleton;
};
}
//----------------------------------------------------------------------------------------
/// Registers the AGR Loader module.
///
/// @return Bool true if successful.
//----------------------------------------------------------------------------------------
Bool RegisterAGRLoader();
#endif | [
"nwpbusiness@gmail.com"
] | nwpbusiness@gmail.com |
e391dffcabb4b370185bc9bd8b1740e4139c02e0 | 30a9b10558e71bf05128c2aff3eee23298ebcbe4 | /external/asio/include/asio/detail/reactive_socket_connect_op.hpp | 7aa54ca6afd726b2c09752cae0ea351c939ae4a6 | [
"BSL-1.0"
] | permissive | obergner/wally-io | e404718ddc585cedfd31cbcf720f143280d0b798 | ece72f22f24c7b91dc6338be18c1cf8c766a7acc | refs/heads/master | 2020-04-12T06:41:17.001595 | 2020-02-02T17:21:02 | 2020-02-02T17:21:02 | 37,421,244 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,888 | hpp | //
// detail/reactive_socket_connect_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// 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 ASIO_DETAIL_REACTIVE_SOCKET_CONNECT_OP_HPP
#define ASIO_DETAIL_REACTIVE_SOCKET_CONNECT_OP_HPP
#if defined( _MSC_VER ) && ( _MSC_VER >= 1200 )
#pragma once
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/addressof.hpp"
#include "asio/detail/bind_handler.hpp"
#include "asio/detail/buffer_sequence_adapter.hpp"
#include "asio/detail/config.hpp"
#include "asio/detail/fenced_block.hpp"
#include "asio/detail/reactor_op.hpp"
#include "asio/detail/socket_ops.hpp"
#include "asio/detail/push_options.hpp"
namespace asio
{
namespace detail
{
class reactive_socket_connect_op_base : public reactor_op
{
public:
reactive_socket_connect_op_base( socket_type socket, func_type complete_func )
: reactor_op( &reactive_socket_connect_op_base::do_perform, complete_func ), socket_( socket )
{
}
static bool do_perform( reactor_op* base )
{
reactive_socket_connect_op_base* o( static_cast<reactive_socket_connect_op_base*>( base ) );
return socket_ops::non_blocking_connect( o->socket_, o->ec_ );
}
private:
socket_type socket_;
};
template <typename Handler>
class reactive_socket_connect_op : public reactive_socket_connect_op_base
{
public:
ASIO_DEFINE_HANDLER_PTR( reactive_socket_connect_op );
reactive_socket_connect_op( socket_type socket, Handler& handler )
: reactive_socket_connect_op_base( socket, &reactive_socket_connect_op::do_complete ),
handler_( ASIO_MOVE_CAST( Handler )( handler ) )
{
}
static void do_complete( io_service_impl* owner,
operation* base,
const asio::error_code& /*ec*/,
std::size_t /*bytes_transferred*/ )
{
// Take ownership of the handler object.
reactive_socket_connect_op* o( static_cast<reactive_socket_connect_op*>( base ) );
ptr p = {asio::detail::addressof( o->handler_ ), o, o};
ASIO_HANDLER_COMPLETION( ( o ) );
// Make a copy of the handler so that the memory can be deallocated before
// the upcall is made. Even if we're not about to make an upcall, a
// sub-object of the handler may be the true owner of the memory associated
// with the handler. Consequently, a local copy of the handler is required
// to ensure that any owning sub-object remains valid until after we have
// deallocated the memory here.
detail::binder1<Handler, asio::error_code> handler( o->handler_, o->ec_ );
p.h = asio::detail::addressof( handler.handler_ );
p.reset( );
// Make the upcall if required.
if ( owner )
{
fenced_block b( fenced_block::half );
ASIO_HANDLER_INVOCATION_BEGIN( ( handler.arg1_ ) );
asio_handler_invoke_helpers::invoke( handler, handler );
ASIO_HANDLER_INVOCATION_END;
}
}
private:
Handler handler_;
};
} // namespace detail
} // namespace asio
#include "asio/detail/pop_options.hpp"
#endif // ASIO_DETAIL_REACTIVE_SOCKET_CONNECT_OP_HPP
| [
"olaf.bergner@gmx.de"
] | olaf.bergner@gmx.de |
5b16a48522c9726ba1b3d41695f0311fd0f46f77 | 0f1ecb7f55872201aa12ae370482f2f37a8b1c32 | /1207_Unique_Number_of_Occurrences.cpp | 79497753eeff5aff8d53704ace98ef8f50136cb3 | [] | no_license | ketkimnaik/Algorithms | ed0c38d3f966be31e9f77f46a9c79adc2d635e73 | 178421c5bab10f18ddd11f865e3eba7b9645ddff | refs/heads/master | 2020-08-22T19:26:30.216871 | 2020-07-29T06:53:47 | 2020-07-29T06:53:47 | 216,464,387 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 410 | cpp | class Solution {
public:
bool uniqueOccurrences(vector<int>& arr) {
unordered_map<int, int> m;
unordered_map<int,int> mp;
for(auto &i : arr)
m[i]++;
for(auto it = m.begin(); it != m.end(); ++it) {
mp[it->second]++;
if(mp[it->second] > 1)
return false;
}
return true;
}
}; | [
"ketkimnaik@gmail.com"
] | ketkimnaik@gmail.com |
c821600150d07913eaf0000ef7a00b002566bf4c | c776476e9d06b3779d744641e758ac3a2c15cddc | /examples/litmus/c/run-scripts/tmp_5/R+rfi-datapl+rfilp-popa.c.cbmc_out.cpp | 73c68ca5fa1a70a83f3f25ea6ec496f86b829b63 | [] | no_license | ashutosh0gupta/llvm_bmc | aaac7961c723ba6f7ffd77a39559e0e52432eade | 0287c4fb180244e6b3c599a9902507f05c8a7234 | refs/heads/master | 2023-08-02T17:14:06.178723 | 2023-07-31T10:46:53 | 2023-07-31T10:46:53 | 143,100,825 | 3 | 4 | null | 2023-05-25T05:50:55 | 2018-08-01T03:47:00 | C++ | UTF-8 | C++ | false | false | 48,642 | cpp | // Global variabls:
// 0:vars:2
// 2:atom_0_X5_2:1
// 3:atom_0_X2_1:1
// 4:atom_1_X2_2:1
// 5:atom_1_X3_0:1
// Local global variabls:
// 0:thr0:1
// 1:thr1:1
#define ADDRSIZE 6
#define LOCALADDRSIZE 2
#define NTHREAD 3
#define NCONTEXT 5
#define ASSUME(stmt) __CPROVER_assume(stmt)
#define ASSERT(stmt) __CPROVER_assert(stmt, "error")
#define max(a,b) (a>b?a:b)
char __get_rng();
char get_rng( char from, char to ) {
char ret = __get_rng();
ASSUME(ret >= from && ret <= to);
return ret;
}
char get_rng_th( char from, char to ) {
char ret = __get_rng();
ASSUME(ret >= from && ret <= to);
return ret;
}
int main(int argc, char **argv) {
// Declare arrays for intial value version in contexts
int local_mem[LOCALADDRSIZE];
// Dumping initializations
local_mem[0+0] = 0;
local_mem[1+0] = 0;
int cstart[NTHREAD];
int creturn[NTHREAD];
// declare arrays for contexts activity
int active[NCONTEXT];
int ctx_used[NCONTEXT];
// declare arrays for intial value version in contexts
int meminit_[ADDRSIZE*NCONTEXT];
#define meminit(x,k) meminit_[(x)*NCONTEXT+k]
int coinit_[ADDRSIZE*NCONTEXT];
#define coinit(x,k) coinit_[(x)*NCONTEXT+k]
int deltainit_[ADDRSIZE*NCONTEXT];
#define deltainit(x,k) deltainit_[(x)*NCONTEXT+k]
// declare arrays for running value version in contexts
int mem_[ADDRSIZE*NCONTEXT];
#define mem(x,k) mem_[(x)*NCONTEXT+k]
int co_[ADDRSIZE*NCONTEXT];
#define co(x,k) co_[(x)*NCONTEXT+k]
int delta_[ADDRSIZE*NCONTEXT];
#define delta(x,k) delta_[(x)*NCONTEXT+k]
// declare arrays for local buffer and observed writes
int buff_[NTHREAD*ADDRSIZE];
#define buff(x,k) buff_[(x)*ADDRSIZE+k]
int pw_[NTHREAD*ADDRSIZE];
#define pw(x,k) pw_[(x)*ADDRSIZE+k]
// declare arrays for context stamps
char cr_[NTHREAD*ADDRSIZE];
#define cr(x,k) cr_[(x)*ADDRSIZE+k]
char iw_[NTHREAD*ADDRSIZE];
#define iw(x,k) iw_[(x)*ADDRSIZE+k]
char cw_[NTHREAD*ADDRSIZE];
#define cw(x,k) cw_[(x)*ADDRSIZE+k]
char cx_[NTHREAD*ADDRSIZE];
#define cx(x,k) cx_[(x)*ADDRSIZE+k]
char is_[NTHREAD*ADDRSIZE];
#define is(x,k) is_[(x)*ADDRSIZE+k]
char cs_[NTHREAD*ADDRSIZE];
#define cs(x,k) cs_[(x)*ADDRSIZE+k]
char crmax_[NTHREAD*ADDRSIZE];
#define crmax(x,k) crmax_[(x)*ADDRSIZE+k]
char sforbid_[ADDRSIZE*NCONTEXT];
#define sforbid(x,k) sforbid_[(x)*NCONTEXT+k]
// declare arrays for synchronizations
int cl[NTHREAD];
int cdy[NTHREAD];
int cds[NTHREAD];
int cdl[NTHREAD];
int cisb[NTHREAD];
int caddr[NTHREAD];
int cctrl[NTHREAD];
int r0= 0;
char creg_r0;
int r1= 0;
char creg_r1;
int r2= 0;
char creg_r2;
int r3= 0;
char creg_r3;
char creg__r3__2_;
char creg__r0__1_;
int r4= 0;
char creg_r4;
int r5= 0;
char creg_r5;
char creg__r4__2_;
char creg__r5__0_;
int r6= 0;
char creg_r6;
int r7= 0;
char creg_r7;
int r8= 0;
char creg_r8;
int r9= 0;
char creg_r9;
char creg__r9__1_;
int r10= 0;
char creg_r10;
char creg__r10__2_;
int r11= 0;
char creg_r11;
int r12= 0;
char creg_r12;
int r13= 0;
char creg_r13;
int r14= 0;
char creg_r14;
int r15= 0;
char creg_r15;
int r16= 0;
char creg_r16;
int r17= 0;
char creg_r17;
int r18= 0;
char creg_r18;
int r19= 0;
char creg_r19;
char creg__r19__1_;
int r20= 0;
char creg_r20;
char old_cctrl= 0;
char old_cr= 0;
char old_cdy= 0;
char old_cw= 0;
char new_creg= 0;
buff(0,0) = 0;
pw(0,0) = 0;
cr(0,0) = 0;
iw(0,0) = 0;
cw(0,0) = 0;
cx(0,0) = 0;
is(0,0) = 0;
cs(0,0) = 0;
crmax(0,0) = 0;
buff(0,1) = 0;
pw(0,1) = 0;
cr(0,1) = 0;
iw(0,1) = 0;
cw(0,1) = 0;
cx(0,1) = 0;
is(0,1) = 0;
cs(0,1) = 0;
crmax(0,1) = 0;
buff(0,2) = 0;
pw(0,2) = 0;
cr(0,2) = 0;
iw(0,2) = 0;
cw(0,2) = 0;
cx(0,2) = 0;
is(0,2) = 0;
cs(0,2) = 0;
crmax(0,2) = 0;
buff(0,3) = 0;
pw(0,3) = 0;
cr(0,3) = 0;
iw(0,3) = 0;
cw(0,3) = 0;
cx(0,3) = 0;
is(0,3) = 0;
cs(0,3) = 0;
crmax(0,3) = 0;
buff(0,4) = 0;
pw(0,4) = 0;
cr(0,4) = 0;
iw(0,4) = 0;
cw(0,4) = 0;
cx(0,4) = 0;
is(0,4) = 0;
cs(0,4) = 0;
crmax(0,4) = 0;
buff(0,5) = 0;
pw(0,5) = 0;
cr(0,5) = 0;
iw(0,5) = 0;
cw(0,5) = 0;
cx(0,5) = 0;
is(0,5) = 0;
cs(0,5) = 0;
crmax(0,5) = 0;
cl[0] = 0;
cdy[0] = 0;
cds[0] = 0;
cdl[0] = 0;
cisb[0] = 0;
caddr[0] = 0;
cctrl[0] = 0;
cstart[0] = get_rng(0,NCONTEXT-1);
creturn[0] = get_rng(0,NCONTEXT-1);
buff(1,0) = 0;
pw(1,0) = 0;
cr(1,0) = 0;
iw(1,0) = 0;
cw(1,0) = 0;
cx(1,0) = 0;
is(1,0) = 0;
cs(1,0) = 0;
crmax(1,0) = 0;
buff(1,1) = 0;
pw(1,1) = 0;
cr(1,1) = 0;
iw(1,1) = 0;
cw(1,1) = 0;
cx(1,1) = 0;
is(1,1) = 0;
cs(1,1) = 0;
crmax(1,1) = 0;
buff(1,2) = 0;
pw(1,2) = 0;
cr(1,2) = 0;
iw(1,2) = 0;
cw(1,2) = 0;
cx(1,2) = 0;
is(1,2) = 0;
cs(1,2) = 0;
crmax(1,2) = 0;
buff(1,3) = 0;
pw(1,3) = 0;
cr(1,3) = 0;
iw(1,3) = 0;
cw(1,3) = 0;
cx(1,3) = 0;
is(1,3) = 0;
cs(1,3) = 0;
crmax(1,3) = 0;
buff(1,4) = 0;
pw(1,4) = 0;
cr(1,4) = 0;
iw(1,4) = 0;
cw(1,4) = 0;
cx(1,4) = 0;
is(1,4) = 0;
cs(1,4) = 0;
crmax(1,4) = 0;
buff(1,5) = 0;
pw(1,5) = 0;
cr(1,5) = 0;
iw(1,5) = 0;
cw(1,5) = 0;
cx(1,5) = 0;
is(1,5) = 0;
cs(1,5) = 0;
crmax(1,5) = 0;
cl[1] = 0;
cdy[1] = 0;
cds[1] = 0;
cdl[1] = 0;
cisb[1] = 0;
caddr[1] = 0;
cctrl[1] = 0;
cstart[1] = get_rng(0,NCONTEXT-1);
creturn[1] = get_rng(0,NCONTEXT-1);
buff(2,0) = 0;
pw(2,0) = 0;
cr(2,0) = 0;
iw(2,0) = 0;
cw(2,0) = 0;
cx(2,0) = 0;
is(2,0) = 0;
cs(2,0) = 0;
crmax(2,0) = 0;
buff(2,1) = 0;
pw(2,1) = 0;
cr(2,1) = 0;
iw(2,1) = 0;
cw(2,1) = 0;
cx(2,1) = 0;
is(2,1) = 0;
cs(2,1) = 0;
crmax(2,1) = 0;
buff(2,2) = 0;
pw(2,2) = 0;
cr(2,2) = 0;
iw(2,2) = 0;
cw(2,2) = 0;
cx(2,2) = 0;
is(2,2) = 0;
cs(2,2) = 0;
crmax(2,2) = 0;
buff(2,3) = 0;
pw(2,3) = 0;
cr(2,3) = 0;
iw(2,3) = 0;
cw(2,3) = 0;
cx(2,3) = 0;
is(2,3) = 0;
cs(2,3) = 0;
crmax(2,3) = 0;
buff(2,4) = 0;
pw(2,4) = 0;
cr(2,4) = 0;
iw(2,4) = 0;
cw(2,4) = 0;
cx(2,4) = 0;
is(2,4) = 0;
cs(2,4) = 0;
crmax(2,4) = 0;
buff(2,5) = 0;
pw(2,5) = 0;
cr(2,5) = 0;
iw(2,5) = 0;
cw(2,5) = 0;
cx(2,5) = 0;
is(2,5) = 0;
cs(2,5) = 0;
crmax(2,5) = 0;
cl[2] = 0;
cdy[2] = 0;
cds[2] = 0;
cdl[2] = 0;
cisb[2] = 0;
caddr[2] = 0;
cctrl[2] = 0;
cstart[2] = get_rng(0,NCONTEXT-1);
creturn[2] = get_rng(0,NCONTEXT-1);
// Dumping initializations
mem(0+0,0) = 0;
mem(0+1,0) = 0;
mem(2+0,0) = 0;
mem(3+0,0) = 0;
mem(4+0,0) = 0;
mem(5+0,0) = 0;
// Dumping context matching equalities
co(0,0) = 0;
delta(0,0) = -1;
mem(0,1) = meminit(0,1);
co(0,1) = coinit(0,1);
delta(0,1) = deltainit(0,1);
mem(0,2) = meminit(0,2);
co(0,2) = coinit(0,2);
delta(0,2) = deltainit(0,2);
mem(0,3) = meminit(0,3);
co(0,3) = coinit(0,3);
delta(0,3) = deltainit(0,3);
mem(0,4) = meminit(0,4);
co(0,4) = coinit(0,4);
delta(0,4) = deltainit(0,4);
co(1,0) = 0;
delta(1,0) = -1;
mem(1,1) = meminit(1,1);
co(1,1) = coinit(1,1);
delta(1,1) = deltainit(1,1);
mem(1,2) = meminit(1,2);
co(1,2) = coinit(1,2);
delta(1,2) = deltainit(1,2);
mem(1,3) = meminit(1,3);
co(1,3) = coinit(1,3);
delta(1,3) = deltainit(1,3);
mem(1,4) = meminit(1,4);
co(1,4) = coinit(1,4);
delta(1,4) = deltainit(1,4);
co(2,0) = 0;
delta(2,0) = -1;
mem(2,1) = meminit(2,1);
co(2,1) = coinit(2,1);
delta(2,1) = deltainit(2,1);
mem(2,2) = meminit(2,2);
co(2,2) = coinit(2,2);
delta(2,2) = deltainit(2,2);
mem(2,3) = meminit(2,3);
co(2,3) = coinit(2,3);
delta(2,3) = deltainit(2,3);
mem(2,4) = meminit(2,4);
co(2,4) = coinit(2,4);
delta(2,4) = deltainit(2,4);
co(3,0) = 0;
delta(3,0) = -1;
mem(3,1) = meminit(3,1);
co(3,1) = coinit(3,1);
delta(3,1) = deltainit(3,1);
mem(3,2) = meminit(3,2);
co(3,2) = coinit(3,2);
delta(3,2) = deltainit(3,2);
mem(3,3) = meminit(3,3);
co(3,3) = coinit(3,3);
delta(3,3) = deltainit(3,3);
mem(3,4) = meminit(3,4);
co(3,4) = coinit(3,4);
delta(3,4) = deltainit(3,4);
co(4,0) = 0;
delta(4,0) = -1;
mem(4,1) = meminit(4,1);
co(4,1) = coinit(4,1);
delta(4,1) = deltainit(4,1);
mem(4,2) = meminit(4,2);
co(4,2) = coinit(4,2);
delta(4,2) = deltainit(4,2);
mem(4,3) = meminit(4,3);
co(4,3) = coinit(4,3);
delta(4,3) = deltainit(4,3);
mem(4,4) = meminit(4,4);
co(4,4) = coinit(4,4);
delta(4,4) = deltainit(4,4);
co(5,0) = 0;
delta(5,0) = -1;
mem(5,1) = meminit(5,1);
co(5,1) = coinit(5,1);
delta(5,1) = deltainit(5,1);
mem(5,2) = meminit(5,2);
co(5,2) = coinit(5,2);
delta(5,2) = deltainit(5,2);
mem(5,3) = meminit(5,3);
co(5,3) = coinit(5,3);
delta(5,3) = deltainit(5,3);
mem(5,4) = meminit(5,4);
co(5,4) = coinit(5,4);
delta(5,4) = deltainit(5,4);
// Dumping thread 1
int ret_thread_1 = 0;
cdy[1] = get_rng(0,NCONTEXT-1);
ASSUME(cdy[1] >= cstart[1]);
T1BLOCK0:
// call void @llvm.dbg.value(metadata i8* %arg, metadata !40, metadata !DIExpression()), !dbg !61
// br label %label_1, !dbg !62
goto T1BLOCK1;
T1BLOCK1:
// call void @llvm.dbg.label(metadata !60), !dbg !63
// call void @llvm.dbg.value(metadata i64* getelementptr inbounds ([2 x i64], [2 x i64]* @vars, i64 0, i64 0), metadata !41, metadata !DIExpression()), !dbg !64
// call void @llvm.dbg.value(metadata i64 1, metadata !44, metadata !DIExpression()), !dbg !64
// store atomic i64 1, i64* getelementptr inbounds ([2 x i64], [2 x i64]* @vars, i64 0, i64 0) monotonic, align 8, !dbg !65
// ST: Guess
iw(1,0) = get_rng(0,NCONTEXT-1);// 1 ASSIGN STIW _l22_c3
old_cw = cw(1,0);
cw(1,0) = get_rng(0,NCONTEXT-1);// 1 ASSIGN STCOM _l22_c3
// Check
ASSUME(active[iw(1,0)] == 1);
ASSUME(active[cw(1,0)] == 1);
ASSUME(sforbid(0,cw(1,0))== 0);
ASSUME(iw(1,0) >= 0);
ASSUME(iw(1,0) >= 0);
ASSUME(cw(1,0) >= iw(1,0));
ASSUME(cw(1,0) >= old_cw);
ASSUME(cw(1,0) >= cr(1,0));
ASSUME(cw(1,0) >= cl[1]);
ASSUME(cw(1,0) >= cisb[1]);
ASSUME(cw(1,0) >= cdy[1]);
ASSUME(cw(1,0) >= cdl[1]);
ASSUME(cw(1,0) >= cds[1]);
ASSUME(cw(1,0) >= cctrl[1]);
ASSUME(cw(1,0) >= caddr[1]);
// Update
caddr[1] = max(caddr[1],0);
buff(1,0) = 1;
mem(0,cw(1,0)) = 1;
co(0,cw(1,0))+=1;
delta(0,cw(1,0)) = -1;
ASSUME(creturn[1] >= cw(1,0));
// call void @llvm.dbg.value(metadata i64* getelementptr inbounds ([2 x i64], [2 x i64]* @vars, i64 0, i64 0), metadata !46, metadata !DIExpression()), !dbg !66
// %0 = load atomic i64, i64* getelementptr inbounds ([2 x i64], [2 x i64]* @vars, i64 0, i64 0) monotonic, align 8, !dbg !67
// LD: Guess
old_cr = cr(1,0);
cr(1,0) = get_rng(0,NCONTEXT-1);// 1 ASSIGN LDCOM _l23_c15
// Check
ASSUME(active[cr(1,0)] == 1);
ASSUME(cr(1,0) >= iw(1,0));
ASSUME(cr(1,0) >= 0);
ASSUME(cr(1,0) >= cdy[1]);
ASSUME(cr(1,0) >= cisb[1]);
ASSUME(cr(1,0) >= cdl[1]);
ASSUME(cr(1,0) >= cl[1]);
// Update
creg_r0 = cr(1,0);
crmax(1,0) = max(crmax(1,0),cr(1,0));
caddr[1] = max(caddr[1],0);
if(cr(1,0) < cw(1,0)) {
r0 = buff(1,0);
ASSUME((!(( (cw(1,0) < 1) && (1 < crmax(1,0)) )))||(sforbid(0,1)> 0));
ASSUME((!(( (cw(1,0) < 2) && (2 < crmax(1,0)) )))||(sforbid(0,2)> 0));
ASSUME((!(( (cw(1,0) < 3) && (3 < crmax(1,0)) )))||(sforbid(0,3)> 0));
ASSUME((!(( (cw(1,0) < 4) && (4 < crmax(1,0)) )))||(sforbid(0,4)> 0));
} else {
if(pw(1,0) != co(0,cr(1,0))) {
ASSUME(cr(1,0) >= old_cr);
}
pw(1,0) = co(0,cr(1,0));
r0 = mem(0,cr(1,0));
}
ASSUME(creturn[1] >= cr(1,0));
// call void @llvm.dbg.value(metadata i64 %0, metadata !48, metadata !DIExpression()), !dbg !66
// %conv = trunc i64 %0 to i32, !dbg !68
// call void @llvm.dbg.value(metadata i32 %conv, metadata !45, metadata !DIExpression()), !dbg !61
// %xor = xor i32 %conv, %conv, !dbg !69
creg_r1 = creg_r0;
r1 = r0 ^ r0;
// call void @llvm.dbg.value(metadata i32 %xor, metadata !49, metadata !DIExpression()), !dbg !61
// %add = add nsw i32 %xor, 1, !dbg !70
creg_r2 = max(0,creg_r1);
r2 = r1 + 1;
// call void @llvm.dbg.value(metadata i32 %add, metadata !50, metadata !DIExpression()), !dbg !61
// call void @llvm.dbg.value(metadata i64* getelementptr inbounds ([2 x i64], [2 x i64]* @vars, i64 0, i64 1), metadata !51, metadata !DIExpression()), !dbg !71
// %conv3 = sext i32 %add to i64, !dbg !72
// call void @llvm.dbg.value(metadata i64 %conv3, metadata !53, metadata !DIExpression()), !dbg !71
// store atomic i64 %conv3, i64* getelementptr inbounds ([2 x i64], [2 x i64]* @vars, i64 0, i64 1) release, align 8, !dbg !72
// ST: Guess
// : Release
iw(1,0+1*1) = get_rng(0,NCONTEXT-1);// 1 ASSIGN STIW _l26_c3
old_cw = cw(1,0+1*1);
cw(1,0+1*1) = get_rng(0,NCONTEXT-1);// 1 ASSIGN STCOM _l26_c3
// Check
ASSUME(active[iw(1,0+1*1)] == 1);
ASSUME(active[cw(1,0+1*1)] == 1);
ASSUME(sforbid(0+1*1,cw(1,0+1*1))== 0);
ASSUME(iw(1,0+1*1) >= creg_r2);
ASSUME(iw(1,0+1*1) >= 0);
ASSUME(cw(1,0+1*1) >= iw(1,0+1*1));
ASSUME(cw(1,0+1*1) >= old_cw);
ASSUME(cw(1,0+1*1) >= cr(1,0+1*1));
ASSUME(cw(1,0+1*1) >= cl[1]);
ASSUME(cw(1,0+1*1) >= cisb[1]);
ASSUME(cw(1,0+1*1) >= cdy[1]);
ASSUME(cw(1,0+1*1) >= cdl[1]);
ASSUME(cw(1,0+1*1) >= cds[1]);
ASSUME(cw(1,0+1*1) >= cctrl[1]);
ASSUME(cw(1,0+1*1) >= caddr[1]);
ASSUME(cw(1,0+1*1) >= cr(1,0+0));
ASSUME(cw(1,0+1*1) >= cr(1,0+1));
ASSUME(cw(1,0+1*1) >= cr(1,2+0));
ASSUME(cw(1,0+1*1) >= cr(1,3+0));
ASSUME(cw(1,0+1*1) >= cr(1,4+0));
ASSUME(cw(1,0+1*1) >= cr(1,5+0));
ASSUME(cw(1,0+1*1) >= cw(1,0+0));
ASSUME(cw(1,0+1*1) >= cw(1,0+1));
ASSUME(cw(1,0+1*1) >= cw(1,2+0));
ASSUME(cw(1,0+1*1) >= cw(1,3+0));
ASSUME(cw(1,0+1*1) >= cw(1,4+0));
ASSUME(cw(1,0+1*1) >= cw(1,5+0));
// Update
caddr[1] = max(caddr[1],0);
buff(1,0+1*1) = r2;
mem(0+1*1,cw(1,0+1*1)) = r2;
co(0+1*1,cw(1,0+1*1))+=1;
delta(0+1*1,cw(1,0+1*1)) = -1;
is(1,0+1*1) = iw(1,0+1*1);
cs(1,0+1*1) = cw(1,0+1*1);
ASSUME(creturn[1] >= cw(1,0+1*1));
// call void @llvm.dbg.value(metadata i64* getelementptr inbounds ([2 x i64], [2 x i64]* @vars, i64 0, i64 1), metadata !55, metadata !DIExpression()), !dbg !73
// %1 = load atomic i64, i64* getelementptr inbounds ([2 x i64], [2 x i64]* @vars, i64 0, i64 1) monotonic, align 8, !dbg !74
// LD: Guess
old_cr = cr(1,0+1*1);
cr(1,0+1*1) = get_rng(0,NCONTEXT-1);// 1 ASSIGN LDCOM _l27_c15
// Check
ASSUME(active[cr(1,0+1*1)] == 1);
ASSUME(cr(1,0+1*1) >= iw(1,0+1*1));
ASSUME(cr(1,0+1*1) >= 0);
ASSUME(cr(1,0+1*1) >= cdy[1]);
ASSUME(cr(1,0+1*1) >= cisb[1]);
ASSUME(cr(1,0+1*1) >= cdl[1]);
ASSUME(cr(1,0+1*1) >= cl[1]);
// Update
creg_r3 = cr(1,0+1*1);
crmax(1,0+1*1) = max(crmax(1,0+1*1),cr(1,0+1*1));
caddr[1] = max(caddr[1],0);
if(cr(1,0+1*1) < cw(1,0+1*1)) {
r3 = buff(1,0+1*1);
ASSUME((!(( (cw(1,0+1*1) < 1) && (1 < crmax(1,0+1*1)) )))||(sforbid(0+1*1,1)> 0));
ASSUME((!(( (cw(1,0+1*1) < 2) && (2 < crmax(1,0+1*1)) )))||(sforbid(0+1*1,2)> 0));
ASSUME((!(( (cw(1,0+1*1) < 3) && (3 < crmax(1,0+1*1)) )))||(sforbid(0+1*1,3)> 0));
ASSUME((!(( (cw(1,0+1*1) < 4) && (4 < crmax(1,0+1*1)) )))||(sforbid(0+1*1,4)> 0));
} else {
if(pw(1,0+1*1) != co(0+1*1,cr(1,0+1*1))) {
ASSUME(cr(1,0+1*1) >= old_cr);
}
pw(1,0+1*1) = co(0+1*1,cr(1,0+1*1));
r3 = mem(0+1*1,cr(1,0+1*1));
}
ASSUME(creturn[1] >= cr(1,0+1*1));
// call void @llvm.dbg.value(metadata i64 %1, metadata !57, metadata !DIExpression()), !dbg !73
// %conv7 = trunc i64 %1 to i32, !dbg !75
// call void @llvm.dbg.value(metadata i32 %conv7, metadata !54, metadata !DIExpression()), !dbg !61
// %cmp = icmp eq i32 %conv7, 2, !dbg !76
creg__r3__2_ = max(0,creg_r3);
// %conv8 = zext i1 %cmp to i32, !dbg !76
// call void @llvm.dbg.value(metadata i32 %conv8, metadata !58, metadata !DIExpression()), !dbg !61
// store i32 %conv8, i32* @atom_0_X5_2, align 4, !dbg !77, !tbaa !78
// ST: Guess
iw(1,2) = get_rng(0,NCONTEXT-1);// 1 ASSIGN STIW _l29_c15
old_cw = cw(1,2);
cw(1,2) = get_rng(0,NCONTEXT-1);// 1 ASSIGN STCOM _l29_c15
// Check
ASSUME(active[iw(1,2)] == 1);
ASSUME(active[cw(1,2)] == 1);
ASSUME(sforbid(2,cw(1,2))== 0);
ASSUME(iw(1,2) >= creg__r3__2_);
ASSUME(iw(1,2) >= 0);
ASSUME(cw(1,2) >= iw(1,2));
ASSUME(cw(1,2) >= old_cw);
ASSUME(cw(1,2) >= cr(1,2));
ASSUME(cw(1,2) >= cl[1]);
ASSUME(cw(1,2) >= cisb[1]);
ASSUME(cw(1,2) >= cdy[1]);
ASSUME(cw(1,2) >= cdl[1]);
ASSUME(cw(1,2) >= cds[1]);
ASSUME(cw(1,2) >= cctrl[1]);
ASSUME(cw(1,2) >= caddr[1]);
// Update
caddr[1] = max(caddr[1],0);
buff(1,2) = (r3==2);
mem(2,cw(1,2)) = (r3==2);
co(2,cw(1,2))+=1;
delta(2,cw(1,2)) = -1;
ASSUME(creturn[1] >= cw(1,2));
// %cmp9 = icmp eq i32 %conv, 1, !dbg !82
creg__r0__1_ = max(0,creg_r0);
// %conv10 = zext i1 %cmp9 to i32, !dbg !82
// call void @llvm.dbg.value(metadata i32 %conv10, metadata !59, metadata !DIExpression()), !dbg !61
// store i32 %conv10, i32* @atom_0_X2_1, align 4, !dbg !83, !tbaa !78
// ST: Guess
iw(1,3) = get_rng(0,NCONTEXT-1);// 1 ASSIGN STIW _l31_c15
old_cw = cw(1,3);
cw(1,3) = get_rng(0,NCONTEXT-1);// 1 ASSIGN STCOM _l31_c15
// Check
ASSUME(active[iw(1,3)] == 1);
ASSUME(active[cw(1,3)] == 1);
ASSUME(sforbid(3,cw(1,3))== 0);
ASSUME(iw(1,3) >= creg__r0__1_);
ASSUME(iw(1,3) >= 0);
ASSUME(cw(1,3) >= iw(1,3));
ASSUME(cw(1,3) >= old_cw);
ASSUME(cw(1,3) >= cr(1,3));
ASSUME(cw(1,3) >= cl[1]);
ASSUME(cw(1,3) >= cisb[1]);
ASSUME(cw(1,3) >= cdy[1]);
ASSUME(cw(1,3) >= cdl[1]);
ASSUME(cw(1,3) >= cds[1]);
ASSUME(cw(1,3) >= cctrl[1]);
ASSUME(cw(1,3) >= caddr[1]);
// Update
caddr[1] = max(caddr[1],0);
buff(1,3) = (r0==1);
mem(3,cw(1,3)) = (r0==1);
co(3,cw(1,3))+=1;
delta(3,cw(1,3)) = -1;
ASSUME(creturn[1] >= cw(1,3));
// ret i8* null, !dbg !84
ret_thread_1 = (- 1);
goto T1BLOCK_END;
T1BLOCK_END:
// Dumping thread 2
int ret_thread_2 = 0;
cdy[2] = get_rng(0,NCONTEXT-1);
ASSUME(cdy[2] >= cstart[2]);
T2BLOCK0:
// call void @llvm.dbg.value(metadata i8* %arg, metadata !87, metadata !DIExpression()), !dbg !102
// br label %label_2, !dbg !57
goto T2BLOCK1;
T2BLOCK1:
// call void @llvm.dbg.label(metadata !101), !dbg !104
// call void @llvm.dbg.value(metadata i64* getelementptr inbounds ([2 x i64], [2 x i64]* @vars, i64 0, i64 1), metadata !88, metadata !DIExpression()), !dbg !105
// call void @llvm.dbg.value(metadata i64 2, metadata !90, metadata !DIExpression()), !dbg !105
// store atomic i64 2, i64* getelementptr inbounds ([2 x i64], [2 x i64]* @vars, i64 0, i64 1) release, align 8, !dbg !60
// ST: Guess
// : Release
iw(2,0+1*1) = get_rng(0,NCONTEXT-1);// 2 ASSIGN STIW _l37_c3
old_cw = cw(2,0+1*1);
cw(2,0+1*1) = get_rng(0,NCONTEXT-1);// 2 ASSIGN STCOM _l37_c3
// Check
ASSUME(active[iw(2,0+1*1)] == 2);
ASSUME(active[cw(2,0+1*1)] == 2);
ASSUME(sforbid(0+1*1,cw(2,0+1*1))== 0);
ASSUME(iw(2,0+1*1) >= 0);
ASSUME(iw(2,0+1*1) >= 0);
ASSUME(cw(2,0+1*1) >= iw(2,0+1*1));
ASSUME(cw(2,0+1*1) >= old_cw);
ASSUME(cw(2,0+1*1) >= cr(2,0+1*1));
ASSUME(cw(2,0+1*1) >= cl[2]);
ASSUME(cw(2,0+1*1) >= cisb[2]);
ASSUME(cw(2,0+1*1) >= cdy[2]);
ASSUME(cw(2,0+1*1) >= cdl[2]);
ASSUME(cw(2,0+1*1) >= cds[2]);
ASSUME(cw(2,0+1*1) >= cctrl[2]);
ASSUME(cw(2,0+1*1) >= caddr[2]);
ASSUME(cw(2,0+1*1) >= cr(2,0+0));
ASSUME(cw(2,0+1*1) >= cr(2,0+1));
ASSUME(cw(2,0+1*1) >= cr(2,2+0));
ASSUME(cw(2,0+1*1) >= cr(2,3+0));
ASSUME(cw(2,0+1*1) >= cr(2,4+0));
ASSUME(cw(2,0+1*1) >= cr(2,5+0));
ASSUME(cw(2,0+1*1) >= cw(2,0+0));
ASSUME(cw(2,0+1*1) >= cw(2,0+1));
ASSUME(cw(2,0+1*1) >= cw(2,2+0));
ASSUME(cw(2,0+1*1) >= cw(2,3+0));
ASSUME(cw(2,0+1*1) >= cw(2,4+0));
ASSUME(cw(2,0+1*1) >= cw(2,5+0));
// Update
caddr[2] = max(caddr[2],0);
buff(2,0+1*1) = 2;
mem(0+1*1,cw(2,0+1*1)) = 2;
co(0+1*1,cw(2,0+1*1))+=1;
delta(0+1*1,cw(2,0+1*1)) = -1;
is(2,0+1*1) = iw(2,0+1*1);
cs(2,0+1*1) = cw(2,0+1*1);
ASSUME(creturn[2] >= cw(2,0+1*1));
// call void @llvm.dbg.value(metadata i64* getelementptr inbounds ([2 x i64], [2 x i64]* @vars, i64 0, i64 1), metadata !92, metadata !DIExpression()), !dbg !107
// %0 = load atomic i64, i64* getelementptr inbounds ([2 x i64], [2 x i64]* @vars, i64 0, i64 1) monotonic, align 8, !dbg !62
// LD: Guess
old_cr = cr(2,0+1*1);
cr(2,0+1*1) = get_rng(0,NCONTEXT-1);// 2 ASSIGN LDCOM _l38_c16
// Check
ASSUME(active[cr(2,0+1*1)] == 2);
ASSUME(cr(2,0+1*1) >= iw(2,0+1*1));
ASSUME(cr(2,0+1*1) >= 0);
ASSUME(cr(2,0+1*1) >= cdy[2]);
ASSUME(cr(2,0+1*1) >= cisb[2]);
ASSUME(cr(2,0+1*1) >= cdl[2]);
ASSUME(cr(2,0+1*1) >= cl[2]);
// Update
creg_r4 = cr(2,0+1*1);
crmax(2,0+1*1) = max(crmax(2,0+1*1),cr(2,0+1*1));
caddr[2] = max(caddr[2],0);
if(cr(2,0+1*1) < cw(2,0+1*1)) {
r4 = buff(2,0+1*1);
ASSUME((!(( (cw(2,0+1*1) < 1) && (1 < crmax(2,0+1*1)) )))||(sforbid(0+1*1,1)> 0));
ASSUME((!(( (cw(2,0+1*1) < 2) && (2 < crmax(2,0+1*1)) )))||(sforbid(0+1*1,2)> 0));
ASSUME((!(( (cw(2,0+1*1) < 3) && (3 < crmax(2,0+1*1)) )))||(sforbid(0+1*1,3)> 0));
ASSUME((!(( (cw(2,0+1*1) < 4) && (4 < crmax(2,0+1*1)) )))||(sforbid(0+1*1,4)> 0));
} else {
if(pw(2,0+1*1) != co(0+1*1,cr(2,0+1*1))) {
ASSUME(cr(2,0+1*1) >= old_cr);
}
pw(2,0+1*1) = co(0+1*1,cr(2,0+1*1));
r4 = mem(0+1*1,cr(2,0+1*1));
}
ASSUME(creturn[2] >= cr(2,0+1*1));
// call void @llvm.dbg.value(metadata i64 %0, metadata !94, metadata !DIExpression()), !dbg !107
// %conv = trunc i64 %0 to i32, !dbg !63
// call void @llvm.dbg.value(metadata i32 %conv, metadata !91, metadata !DIExpression()), !dbg !102
// call void @llvm.dbg.value(metadata i64* getelementptr inbounds ([2 x i64], [2 x i64]* @vars, i64 0, i64 0), metadata !96, metadata !DIExpression()), !dbg !110
// %1 = load atomic i64, i64* getelementptr inbounds ([2 x i64], [2 x i64]* @vars, i64 0, i64 0) acquire, align 8, !dbg !65
// LD: Guess
// : Acquire
old_cr = cr(2,0);
cr(2,0) = get_rng(0,NCONTEXT-1);// 2 ASSIGN LDCOM _l39_c16
// Check
ASSUME(active[cr(2,0)] == 2);
ASSUME(cr(2,0) >= iw(2,0));
ASSUME(cr(2,0) >= 0);
ASSUME(cr(2,0) >= cdy[2]);
ASSUME(cr(2,0) >= cisb[2]);
ASSUME(cr(2,0) >= cdl[2]);
ASSUME(cr(2,0) >= cl[2]);
ASSUME(cr(2,0) >= cx(2,0));
ASSUME(cr(2,0) >= cs(2,0+0));
ASSUME(cr(2,0) >= cs(2,0+1));
ASSUME(cr(2,0) >= cs(2,2+0));
ASSUME(cr(2,0) >= cs(2,3+0));
ASSUME(cr(2,0) >= cs(2,4+0));
ASSUME(cr(2,0) >= cs(2,5+0));
// Update
creg_r5 = cr(2,0);
crmax(2,0) = max(crmax(2,0),cr(2,0));
caddr[2] = max(caddr[2],0);
if(cr(2,0) < cw(2,0)) {
r5 = buff(2,0);
ASSUME((!(( (cw(2,0) < 1) && (1 < crmax(2,0)) )))||(sforbid(0,1)> 0));
ASSUME((!(( (cw(2,0) < 2) && (2 < crmax(2,0)) )))||(sforbid(0,2)> 0));
ASSUME((!(( (cw(2,0) < 3) && (3 < crmax(2,0)) )))||(sforbid(0,3)> 0));
ASSUME((!(( (cw(2,0) < 4) && (4 < crmax(2,0)) )))||(sforbid(0,4)> 0));
} else {
if(pw(2,0) != co(0,cr(2,0))) {
ASSUME(cr(2,0) >= old_cr);
}
pw(2,0) = co(0,cr(2,0));
r5 = mem(0,cr(2,0));
}
cl[2] = max(cl[2],cr(2,0));
ASSUME(creturn[2] >= cr(2,0));
// call void @llvm.dbg.value(metadata i64 %1, metadata !98, metadata !DIExpression()), !dbg !110
// %conv4 = trunc i64 %1 to i32, !dbg !66
// call void @llvm.dbg.value(metadata i32 %conv4, metadata !95, metadata !DIExpression()), !dbg !102
// %cmp = icmp eq i32 %conv, 2, !dbg !67
creg__r4__2_ = max(0,creg_r4);
// %conv5 = zext i1 %cmp to i32, !dbg !67
// call void @llvm.dbg.value(metadata i32 %conv5, metadata !99, metadata !DIExpression()), !dbg !102
// store i32 %conv5, i32* @atom_1_X2_2, align 4, !dbg !68, !tbaa !69
// ST: Guess
iw(2,4) = get_rng(0,NCONTEXT-1);// 2 ASSIGN STIW _l41_c15
old_cw = cw(2,4);
cw(2,4) = get_rng(0,NCONTEXT-1);// 2 ASSIGN STCOM _l41_c15
// Check
ASSUME(active[iw(2,4)] == 2);
ASSUME(active[cw(2,4)] == 2);
ASSUME(sforbid(4,cw(2,4))== 0);
ASSUME(iw(2,4) >= creg__r4__2_);
ASSUME(iw(2,4) >= 0);
ASSUME(cw(2,4) >= iw(2,4));
ASSUME(cw(2,4) >= old_cw);
ASSUME(cw(2,4) >= cr(2,4));
ASSUME(cw(2,4) >= cl[2]);
ASSUME(cw(2,4) >= cisb[2]);
ASSUME(cw(2,4) >= cdy[2]);
ASSUME(cw(2,4) >= cdl[2]);
ASSUME(cw(2,4) >= cds[2]);
ASSUME(cw(2,4) >= cctrl[2]);
ASSUME(cw(2,4) >= caddr[2]);
// Update
caddr[2] = max(caddr[2],0);
buff(2,4) = (r4==2);
mem(4,cw(2,4)) = (r4==2);
co(4,cw(2,4))+=1;
delta(4,cw(2,4)) = -1;
ASSUME(creturn[2] >= cw(2,4));
// %cmp6 = icmp eq i32 %conv4, 0, !dbg !73
creg__r5__0_ = max(0,creg_r5);
// %conv7 = zext i1 %cmp6 to i32, !dbg !73
// call void @llvm.dbg.value(metadata i32 %conv7, metadata !100, metadata !DIExpression()), !dbg !102
// store i32 %conv7, i32* @atom_1_X3_0, align 4, !dbg !74, !tbaa !69
// ST: Guess
iw(2,5) = get_rng(0,NCONTEXT-1);// 2 ASSIGN STIW _l43_c15
old_cw = cw(2,5);
cw(2,5) = get_rng(0,NCONTEXT-1);// 2 ASSIGN STCOM _l43_c15
// Check
ASSUME(active[iw(2,5)] == 2);
ASSUME(active[cw(2,5)] == 2);
ASSUME(sforbid(5,cw(2,5))== 0);
ASSUME(iw(2,5) >= creg__r5__0_);
ASSUME(iw(2,5) >= 0);
ASSUME(cw(2,5) >= iw(2,5));
ASSUME(cw(2,5) >= old_cw);
ASSUME(cw(2,5) >= cr(2,5));
ASSUME(cw(2,5) >= cl[2]);
ASSUME(cw(2,5) >= cisb[2]);
ASSUME(cw(2,5) >= cdy[2]);
ASSUME(cw(2,5) >= cdl[2]);
ASSUME(cw(2,5) >= cds[2]);
ASSUME(cw(2,5) >= cctrl[2]);
ASSUME(cw(2,5) >= caddr[2]);
// Update
caddr[2] = max(caddr[2],0);
buff(2,5) = (r5==0);
mem(5,cw(2,5)) = (r5==0);
co(5,cw(2,5))+=1;
delta(5,cw(2,5)) = -1;
ASSUME(creturn[2] >= cw(2,5));
// ret i8* null, !dbg !75
ret_thread_2 = (- 1);
goto T2BLOCK_END;
T2BLOCK_END:
// Dumping thread 0
int ret_thread_0 = 0;
cdy[0] = get_rng(0,NCONTEXT-1);
ASSUME(cdy[0] >= cstart[0]);
T0BLOCK0:
// %thr0 = alloca i64, align 8
// %thr1 = alloca i64, align 8
// call void @llvm.dbg.value(metadata i32 %argc, metadata !125, metadata !DIExpression()), !dbg !157
// call void @llvm.dbg.value(metadata i8** %argv, metadata !126, metadata !DIExpression()), !dbg !157
// %0 = bitcast i64* %thr0 to i8*, !dbg !77
// call void @llvm.lifetime.start.p0i8(i64 8, i8* %0) #7, !dbg !77
// call void @llvm.dbg.declare(metadata i64* %thr0, metadata !127, metadata !DIExpression()), !dbg !159
// %1 = bitcast i64* %thr1 to i8*, !dbg !79
// call void @llvm.lifetime.start.p0i8(i64 8, i8* %1) #7, !dbg !79
// call void @llvm.dbg.declare(metadata i64* %thr1, metadata !131, metadata !DIExpression()), !dbg !161
// call void @llvm.dbg.value(metadata i64* getelementptr inbounds ([2 x i64], [2 x i64]* @vars, i64 0, i64 1), metadata !132, metadata !DIExpression()), !dbg !162
// call void @llvm.dbg.value(metadata i64 0, metadata !134, metadata !DIExpression()), !dbg !162
// store atomic i64 0, i64* getelementptr inbounds ([2 x i64], [2 x i64]* @vars, i64 0, i64 1) monotonic, align 8, !dbg !82
// ST: Guess
iw(0,0+1*1) = get_rng(0,NCONTEXT-1);// 0 ASSIGN STIW _l51_c3
old_cw = cw(0,0+1*1);
cw(0,0+1*1) = get_rng(0,NCONTEXT-1);// 0 ASSIGN STCOM _l51_c3
// Check
ASSUME(active[iw(0,0+1*1)] == 0);
ASSUME(active[cw(0,0+1*1)] == 0);
ASSUME(sforbid(0+1*1,cw(0,0+1*1))== 0);
ASSUME(iw(0,0+1*1) >= 0);
ASSUME(iw(0,0+1*1) >= 0);
ASSUME(cw(0,0+1*1) >= iw(0,0+1*1));
ASSUME(cw(0,0+1*1) >= old_cw);
ASSUME(cw(0,0+1*1) >= cr(0,0+1*1));
ASSUME(cw(0,0+1*1) >= cl[0]);
ASSUME(cw(0,0+1*1) >= cisb[0]);
ASSUME(cw(0,0+1*1) >= cdy[0]);
ASSUME(cw(0,0+1*1) >= cdl[0]);
ASSUME(cw(0,0+1*1) >= cds[0]);
ASSUME(cw(0,0+1*1) >= cctrl[0]);
ASSUME(cw(0,0+1*1) >= caddr[0]);
// Update
caddr[0] = max(caddr[0],0);
buff(0,0+1*1) = 0;
mem(0+1*1,cw(0,0+1*1)) = 0;
co(0+1*1,cw(0,0+1*1))+=1;
delta(0+1*1,cw(0,0+1*1)) = -1;
ASSUME(creturn[0] >= cw(0,0+1*1));
// call void @llvm.dbg.value(metadata i64* getelementptr inbounds ([2 x i64], [2 x i64]* @vars, i64 0, i64 0), metadata !135, metadata !DIExpression()), !dbg !164
// call void @llvm.dbg.value(metadata i64 0, metadata !137, metadata !DIExpression()), !dbg !164
// store atomic i64 0, i64* getelementptr inbounds ([2 x i64], [2 x i64]* @vars, i64 0, i64 0) monotonic, align 8, !dbg !84
// ST: Guess
iw(0,0) = get_rng(0,NCONTEXT-1);// 0 ASSIGN STIW _l52_c3
old_cw = cw(0,0);
cw(0,0) = get_rng(0,NCONTEXT-1);// 0 ASSIGN STCOM _l52_c3
// Check
ASSUME(active[iw(0,0)] == 0);
ASSUME(active[cw(0,0)] == 0);
ASSUME(sforbid(0,cw(0,0))== 0);
ASSUME(iw(0,0) >= 0);
ASSUME(iw(0,0) >= 0);
ASSUME(cw(0,0) >= iw(0,0));
ASSUME(cw(0,0) >= old_cw);
ASSUME(cw(0,0) >= cr(0,0));
ASSUME(cw(0,0) >= cl[0]);
ASSUME(cw(0,0) >= cisb[0]);
ASSUME(cw(0,0) >= cdy[0]);
ASSUME(cw(0,0) >= cdl[0]);
ASSUME(cw(0,0) >= cds[0]);
ASSUME(cw(0,0) >= cctrl[0]);
ASSUME(cw(0,0) >= caddr[0]);
// Update
caddr[0] = max(caddr[0],0);
buff(0,0) = 0;
mem(0,cw(0,0)) = 0;
co(0,cw(0,0))+=1;
delta(0,cw(0,0)) = -1;
ASSUME(creturn[0] >= cw(0,0));
// store i32 0, i32* @atom_0_X5_2, align 4, !dbg !85, !tbaa !86
// ST: Guess
iw(0,2) = get_rng(0,NCONTEXT-1);// 0 ASSIGN STIW _l53_c15
old_cw = cw(0,2);
cw(0,2) = get_rng(0,NCONTEXT-1);// 0 ASSIGN STCOM _l53_c15
// Check
ASSUME(active[iw(0,2)] == 0);
ASSUME(active[cw(0,2)] == 0);
ASSUME(sforbid(2,cw(0,2))== 0);
ASSUME(iw(0,2) >= 0);
ASSUME(iw(0,2) >= 0);
ASSUME(cw(0,2) >= iw(0,2));
ASSUME(cw(0,2) >= old_cw);
ASSUME(cw(0,2) >= cr(0,2));
ASSUME(cw(0,2) >= cl[0]);
ASSUME(cw(0,2) >= cisb[0]);
ASSUME(cw(0,2) >= cdy[0]);
ASSUME(cw(0,2) >= cdl[0]);
ASSUME(cw(0,2) >= cds[0]);
ASSUME(cw(0,2) >= cctrl[0]);
ASSUME(cw(0,2) >= caddr[0]);
// Update
caddr[0] = max(caddr[0],0);
buff(0,2) = 0;
mem(2,cw(0,2)) = 0;
co(2,cw(0,2))+=1;
delta(2,cw(0,2)) = -1;
ASSUME(creturn[0] >= cw(0,2));
// store i32 0, i32* @atom_0_X2_1, align 4, !dbg !90, !tbaa !86
// ST: Guess
iw(0,3) = get_rng(0,NCONTEXT-1);// 0 ASSIGN STIW _l54_c15
old_cw = cw(0,3);
cw(0,3) = get_rng(0,NCONTEXT-1);// 0 ASSIGN STCOM _l54_c15
// Check
ASSUME(active[iw(0,3)] == 0);
ASSUME(active[cw(0,3)] == 0);
ASSUME(sforbid(3,cw(0,3))== 0);
ASSUME(iw(0,3) >= 0);
ASSUME(iw(0,3) >= 0);
ASSUME(cw(0,3) >= iw(0,3));
ASSUME(cw(0,3) >= old_cw);
ASSUME(cw(0,3) >= cr(0,3));
ASSUME(cw(0,3) >= cl[0]);
ASSUME(cw(0,3) >= cisb[0]);
ASSUME(cw(0,3) >= cdy[0]);
ASSUME(cw(0,3) >= cdl[0]);
ASSUME(cw(0,3) >= cds[0]);
ASSUME(cw(0,3) >= cctrl[0]);
ASSUME(cw(0,3) >= caddr[0]);
// Update
caddr[0] = max(caddr[0],0);
buff(0,3) = 0;
mem(3,cw(0,3)) = 0;
co(3,cw(0,3))+=1;
delta(3,cw(0,3)) = -1;
ASSUME(creturn[0] >= cw(0,3));
// store i32 0, i32* @atom_1_X2_2, align 4, !dbg !91, !tbaa !86
// ST: Guess
iw(0,4) = get_rng(0,NCONTEXT-1);// 0 ASSIGN STIW _l55_c15
old_cw = cw(0,4);
cw(0,4) = get_rng(0,NCONTEXT-1);// 0 ASSIGN STCOM _l55_c15
// Check
ASSUME(active[iw(0,4)] == 0);
ASSUME(active[cw(0,4)] == 0);
ASSUME(sforbid(4,cw(0,4))== 0);
ASSUME(iw(0,4) >= 0);
ASSUME(iw(0,4) >= 0);
ASSUME(cw(0,4) >= iw(0,4));
ASSUME(cw(0,4) >= old_cw);
ASSUME(cw(0,4) >= cr(0,4));
ASSUME(cw(0,4) >= cl[0]);
ASSUME(cw(0,4) >= cisb[0]);
ASSUME(cw(0,4) >= cdy[0]);
ASSUME(cw(0,4) >= cdl[0]);
ASSUME(cw(0,4) >= cds[0]);
ASSUME(cw(0,4) >= cctrl[0]);
ASSUME(cw(0,4) >= caddr[0]);
// Update
caddr[0] = max(caddr[0],0);
buff(0,4) = 0;
mem(4,cw(0,4)) = 0;
co(4,cw(0,4))+=1;
delta(4,cw(0,4)) = -1;
ASSUME(creturn[0] >= cw(0,4));
// store i32 0, i32* @atom_1_X3_0, align 4, !dbg !92, !tbaa !86
// ST: Guess
iw(0,5) = get_rng(0,NCONTEXT-1);// 0 ASSIGN STIW _l56_c15
old_cw = cw(0,5);
cw(0,5) = get_rng(0,NCONTEXT-1);// 0 ASSIGN STCOM _l56_c15
// Check
ASSUME(active[iw(0,5)] == 0);
ASSUME(active[cw(0,5)] == 0);
ASSUME(sforbid(5,cw(0,5))== 0);
ASSUME(iw(0,5) >= 0);
ASSUME(iw(0,5) >= 0);
ASSUME(cw(0,5) >= iw(0,5));
ASSUME(cw(0,5) >= old_cw);
ASSUME(cw(0,5) >= cr(0,5));
ASSUME(cw(0,5) >= cl[0]);
ASSUME(cw(0,5) >= cisb[0]);
ASSUME(cw(0,5) >= cdy[0]);
ASSUME(cw(0,5) >= cdl[0]);
ASSUME(cw(0,5) >= cds[0]);
ASSUME(cw(0,5) >= cctrl[0]);
ASSUME(cw(0,5) >= caddr[0]);
// Update
caddr[0] = max(caddr[0],0);
buff(0,5) = 0;
mem(5,cw(0,5)) = 0;
co(5,cw(0,5))+=1;
delta(5,cw(0,5)) = -1;
ASSUME(creturn[0] >= cw(0,5));
// %call = call i32 @pthread_create(i64* noundef %thr0, %union.pthread_attr_t* noundef null, i8* (i8*)* noundef @t0, i8* noundef null) #7, !dbg !93
// dumbsy: Guess
old_cdy = cdy[0];
cdy[0] = get_rng(0,NCONTEXT-1);
// Check
ASSUME(cdy[0] >= old_cdy);
ASSUME(cdy[0] >= cisb[0]);
ASSUME(cdy[0] >= cdl[0]);
ASSUME(cdy[0] >= cds[0]);
ASSUME(cdy[0] >= cctrl[0]);
ASSUME(cdy[0] >= cw(0,0+0));
ASSUME(cdy[0] >= cw(0,0+1));
ASSUME(cdy[0] >= cw(0,2+0));
ASSUME(cdy[0] >= cw(0,3+0));
ASSUME(cdy[0] >= cw(0,4+0));
ASSUME(cdy[0] >= cw(0,5+0));
ASSUME(cdy[0] >= cr(0,0+0));
ASSUME(cdy[0] >= cr(0,0+1));
ASSUME(cdy[0] >= cr(0,2+0));
ASSUME(cdy[0] >= cr(0,3+0));
ASSUME(cdy[0] >= cr(0,4+0));
ASSUME(cdy[0] >= cr(0,5+0));
ASSUME(creturn[0] >= cdy[0]);
ASSUME(cstart[1] >= cdy[0]);
// %call3 = call i32 @pthread_create(i64* noundef %thr1, %union.pthread_attr_t* noundef null, i8* (i8*)* noundef @t1, i8* noundef null) #7, !dbg !94
// dumbsy: Guess
old_cdy = cdy[0];
cdy[0] = get_rng(0,NCONTEXT-1);
// Check
ASSUME(cdy[0] >= old_cdy);
ASSUME(cdy[0] >= cisb[0]);
ASSUME(cdy[0] >= cdl[0]);
ASSUME(cdy[0] >= cds[0]);
ASSUME(cdy[0] >= cctrl[0]);
ASSUME(cdy[0] >= cw(0,0+0));
ASSUME(cdy[0] >= cw(0,0+1));
ASSUME(cdy[0] >= cw(0,2+0));
ASSUME(cdy[0] >= cw(0,3+0));
ASSUME(cdy[0] >= cw(0,4+0));
ASSUME(cdy[0] >= cw(0,5+0));
ASSUME(cdy[0] >= cr(0,0+0));
ASSUME(cdy[0] >= cr(0,0+1));
ASSUME(cdy[0] >= cr(0,2+0));
ASSUME(cdy[0] >= cr(0,3+0));
ASSUME(cdy[0] >= cr(0,4+0));
ASSUME(cdy[0] >= cr(0,5+0));
ASSUME(creturn[0] >= cdy[0]);
ASSUME(cstart[2] >= cdy[0]);
// %2 = load i64, i64* %thr0, align 8, !dbg !95, !tbaa !96
r7 = local_mem[0];
// %call4 = call i32 @pthread_join(i64 noundef %2, i8** noundef null), !dbg !98
// dumbsy: Guess
old_cdy = cdy[0];
cdy[0] = get_rng(0,NCONTEXT-1);
// Check
ASSUME(cdy[0] >= old_cdy);
ASSUME(cdy[0] >= cisb[0]);
ASSUME(cdy[0] >= cdl[0]);
ASSUME(cdy[0] >= cds[0]);
ASSUME(cdy[0] >= cctrl[0]);
ASSUME(cdy[0] >= cw(0,0+0));
ASSUME(cdy[0] >= cw(0,0+1));
ASSUME(cdy[0] >= cw(0,2+0));
ASSUME(cdy[0] >= cw(0,3+0));
ASSUME(cdy[0] >= cw(0,4+0));
ASSUME(cdy[0] >= cw(0,5+0));
ASSUME(cdy[0] >= cr(0,0+0));
ASSUME(cdy[0] >= cr(0,0+1));
ASSUME(cdy[0] >= cr(0,2+0));
ASSUME(cdy[0] >= cr(0,3+0));
ASSUME(cdy[0] >= cr(0,4+0));
ASSUME(cdy[0] >= cr(0,5+0));
ASSUME(creturn[0] >= cdy[0]);
ASSUME(cdy[0] >= creturn[1]);
// %3 = load i64, i64* %thr1, align 8, !dbg !99, !tbaa !96
r8 = local_mem[1];
// %call5 = call i32 @pthread_join(i64 noundef %3, i8** noundef null), !dbg !100
// dumbsy: Guess
old_cdy = cdy[0];
cdy[0] = get_rng(0,NCONTEXT-1);
// Check
ASSUME(cdy[0] >= old_cdy);
ASSUME(cdy[0] >= cisb[0]);
ASSUME(cdy[0] >= cdl[0]);
ASSUME(cdy[0] >= cds[0]);
ASSUME(cdy[0] >= cctrl[0]);
ASSUME(cdy[0] >= cw(0,0+0));
ASSUME(cdy[0] >= cw(0,0+1));
ASSUME(cdy[0] >= cw(0,2+0));
ASSUME(cdy[0] >= cw(0,3+0));
ASSUME(cdy[0] >= cw(0,4+0));
ASSUME(cdy[0] >= cw(0,5+0));
ASSUME(cdy[0] >= cr(0,0+0));
ASSUME(cdy[0] >= cr(0,0+1));
ASSUME(cdy[0] >= cr(0,2+0));
ASSUME(cdy[0] >= cr(0,3+0));
ASSUME(cdy[0] >= cr(0,4+0));
ASSUME(cdy[0] >= cr(0,5+0));
ASSUME(creturn[0] >= cdy[0]);
ASSUME(cdy[0] >= creturn[2]);
// call void @llvm.dbg.value(metadata i64* getelementptr inbounds ([2 x i64], [2 x i64]* @vars, i64 0, i64 0), metadata !139, metadata !DIExpression()), !dbg !178
// %4 = load atomic i64, i64* getelementptr inbounds ([2 x i64], [2 x i64]* @vars, i64 0, i64 0) monotonic, align 8, !dbg !102
// LD: Guess
old_cr = cr(0,0);
cr(0,0) = get_rng(0,NCONTEXT-1);// 0 ASSIGN LDCOM _l64_c13
// Check
ASSUME(active[cr(0,0)] == 0);
ASSUME(cr(0,0) >= iw(0,0));
ASSUME(cr(0,0) >= 0);
ASSUME(cr(0,0) >= cdy[0]);
ASSUME(cr(0,0) >= cisb[0]);
ASSUME(cr(0,0) >= cdl[0]);
ASSUME(cr(0,0) >= cl[0]);
// Update
creg_r9 = cr(0,0);
crmax(0,0) = max(crmax(0,0),cr(0,0));
caddr[0] = max(caddr[0],0);
if(cr(0,0) < cw(0,0)) {
r9 = buff(0,0);
ASSUME((!(( (cw(0,0) < 1) && (1 < crmax(0,0)) )))||(sforbid(0,1)> 0));
ASSUME((!(( (cw(0,0) < 2) && (2 < crmax(0,0)) )))||(sforbid(0,2)> 0));
ASSUME((!(( (cw(0,0) < 3) && (3 < crmax(0,0)) )))||(sforbid(0,3)> 0));
ASSUME((!(( (cw(0,0) < 4) && (4 < crmax(0,0)) )))||(sforbid(0,4)> 0));
} else {
if(pw(0,0) != co(0,cr(0,0))) {
ASSUME(cr(0,0) >= old_cr);
}
pw(0,0) = co(0,cr(0,0));
r9 = mem(0,cr(0,0));
}
ASSUME(creturn[0] >= cr(0,0));
// call void @llvm.dbg.value(metadata i64 %4, metadata !141, metadata !DIExpression()), !dbg !178
// %conv = trunc i64 %4 to i32, !dbg !103
// call void @llvm.dbg.value(metadata i32 %conv, metadata !138, metadata !DIExpression()), !dbg !157
// %cmp = icmp eq i32 %conv, 1, !dbg !104
creg__r9__1_ = max(0,creg_r9);
// %conv6 = zext i1 %cmp to i32, !dbg !104
// call void @llvm.dbg.value(metadata i32 %conv6, metadata !142, metadata !DIExpression()), !dbg !157
// call void @llvm.dbg.value(metadata i64* getelementptr inbounds ([2 x i64], [2 x i64]* @vars, i64 0, i64 1), metadata !144, metadata !DIExpression()), !dbg !182
// %5 = load atomic i64, i64* getelementptr inbounds ([2 x i64], [2 x i64]* @vars, i64 0, i64 1) monotonic, align 8, !dbg !106
// LD: Guess
old_cr = cr(0,0+1*1);
cr(0,0+1*1) = get_rng(0,NCONTEXT-1);// 0 ASSIGN LDCOM _l66_c13
// Check
ASSUME(active[cr(0,0+1*1)] == 0);
ASSUME(cr(0,0+1*1) >= iw(0,0+1*1));
ASSUME(cr(0,0+1*1) >= 0);
ASSUME(cr(0,0+1*1) >= cdy[0]);
ASSUME(cr(0,0+1*1) >= cisb[0]);
ASSUME(cr(0,0+1*1) >= cdl[0]);
ASSUME(cr(0,0+1*1) >= cl[0]);
// Update
creg_r10 = cr(0,0+1*1);
crmax(0,0+1*1) = max(crmax(0,0+1*1),cr(0,0+1*1));
caddr[0] = max(caddr[0],0);
if(cr(0,0+1*1) < cw(0,0+1*1)) {
r10 = buff(0,0+1*1);
ASSUME((!(( (cw(0,0+1*1) < 1) && (1 < crmax(0,0+1*1)) )))||(sforbid(0+1*1,1)> 0));
ASSUME((!(( (cw(0,0+1*1) < 2) && (2 < crmax(0,0+1*1)) )))||(sforbid(0+1*1,2)> 0));
ASSUME((!(( (cw(0,0+1*1) < 3) && (3 < crmax(0,0+1*1)) )))||(sforbid(0+1*1,3)> 0));
ASSUME((!(( (cw(0,0+1*1) < 4) && (4 < crmax(0,0+1*1)) )))||(sforbid(0+1*1,4)> 0));
} else {
if(pw(0,0+1*1) != co(0+1*1,cr(0,0+1*1))) {
ASSUME(cr(0,0+1*1) >= old_cr);
}
pw(0,0+1*1) = co(0+1*1,cr(0,0+1*1));
r10 = mem(0+1*1,cr(0,0+1*1));
}
ASSUME(creturn[0] >= cr(0,0+1*1));
// call void @llvm.dbg.value(metadata i64 %5, metadata !146, metadata !DIExpression()), !dbg !182
// %conv10 = trunc i64 %5 to i32, !dbg !107
// call void @llvm.dbg.value(metadata i32 %conv10, metadata !143, metadata !DIExpression()), !dbg !157
// %cmp11 = icmp eq i32 %conv10, 2, !dbg !108
creg__r10__2_ = max(0,creg_r10);
// %conv12 = zext i1 %cmp11 to i32, !dbg !108
// call void @llvm.dbg.value(metadata i32 %conv12, metadata !147, metadata !DIExpression()), !dbg !157
// %6 = load i32, i32* @atom_0_X5_2, align 4, !dbg !109, !tbaa !86
// LD: Guess
old_cr = cr(0,2);
cr(0,2) = get_rng(0,NCONTEXT-1);// 0 ASSIGN LDCOM _l68_c13
// Check
ASSUME(active[cr(0,2)] == 0);
ASSUME(cr(0,2) >= iw(0,2));
ASSUME(cr(0,2) >= 0);
ASSUME(cr(0,2) >= cdy[0]);
ASSUME(cr(0,2) >= cisb[0]);
ASSUME(cr(0,2) >= cdl[0]);
ASSUME(cr(0,2) >= cl[0]);
// Update
creg_r11 = cr(0,2);
crmax(0,2) = max(crmax(0,2),cr(0,2));
caddr[0] = max(caddr[0],0);
if(cr(0,2) < cw(0,2)) {
r11 = buff(0,2);
ASSUME((!(( (cw(0,2) < 1) && (1 < crmax(0,2)) )))||(sforbid(2,1)> 0));
ASSUME((!(( (cw(0,2) < 2) && (2 < crmax(0,2)) )))||(sforbid(2,2)> 0));
ASSUME((!(( (cw(0,2) < 3) && (3 < crmax(0,2)) )))||(sforbid(2,3)> 0));
ASSUME((!(( (cw(0,2) < 4) && (4 < crmax(0,2)) )))||(sforbid(2,4)> 0));
} else {
if(pw(0,2) != co(2,cr(0,2))) {
ASSUME(cr(0,2) >= old_cr);
}
pw(0,2) = co(2,cr(0,2));
r11 = mem(2,cr(0,2));
}
ASSUME(creturn[0] >= cr(0,2));
// call void @llvm.dbg.value(metadata i32 %6, metadata !148, metadata !DIExpression()), !dbg !157
// %7 = load i32, i32* @atom_0_X2_1, align 4, !dbg !110, !tbaa !86
// LD: Guess
old_cr = cr(0,3);
cr(0,3) = get_rng(0,NCONTEXT-1);// 0 ASSIGN LDCOM _l69_c13
// Check
ASSUME(active[cr(0,3)] == 0);
ASSUME(cr(0,3) >= iw(0,3));
ASSUME(cr(0,3) >= 0);
ASSUME(cr(0,3) >= cdy[0]);
ASSUME(cr(0,3) >= cisb[0]);
ASSUME(cr(0,3) >= cdl[0]);
ASSUME(cr(0,3) >= cl[0]);
// Update
creg_r12 = cr(0,3);
crmax(0,3) = max(crmax(0,3),cr(0,3));
caddr[0] = max(caddr[0],0);
if(cr(0,3) < cw(0,3)) {
r12 = buff(0,3);
ASSUME((!(( (cw(0,3) < 1) && (1 < crmax(0,3)) )))||(sforbid(3,1)> 0));
ASSUME((!(( (cw(0,3) < 2) && (2 < crmax(0,3)) )))||(sforbid(3,2)> 0));
ASSUME((!(( (cw(0,3) < 3) && (3 < crmax(0,3)) )))||(sforbid(3,3)> 0));
ASSUME((!(( (cw(0,3) < 4) && (4 < crmax(0,3)) )))||(sforbid(3,4)> 0));
} else {
if(pw(0,3) != co(3,cr(0,3))) {
ASSUME(cr(0,3) >= old_cr);
}
pw(0,3) = co(3,cr(0,3));
r12 = mem(3,cr(0,3));
}
ASSUME(creturn[0] >= cr(0,3));
// call void @llvm.dbg.value(metadata i32 %7, metadata !149, metadata !DIExpression()), !dbg !157
// %8 = load i32, i32* @atom_1_X2_2, align 4, !dbg !111, !tbaa !86
// LD: Guess
old_cr = cr(0,4);
cr(0,4) = get_rng(0,NCONTEXT-1);// 0 ASSIGN LDCOM _l70_c13
// Check
ASSUME(active[cr(0,4)] == 0);
ASSUME(cr(0,4) >= iw(0,4));
ASSUME(cr(0,4) >= 0);
ASSUME(cr(0,4) >= cdy[0]);
ASSUME(cr(0,4) >= cisb[0]);
ASSUME(cr(0,4) >= cdl[0]);
ASSUME(cr(0,4) >= cl[0]);
// Update
creg_r13 = cr(0,4);
crmax(0,4) = max(crmax(0,4),cr(0,4));
caddr[0] = max(caddr[0],0);
if(cr(0,4) < cw(0,4)) {
r13 = buff(0,4);
ASSUME((!(( (cw(0,4) < 1) && (1 < crmax(0,4)) )))||(sforbid(4,1)> 0));
ASSUME((!(( (cw(0,4) < 2) && (2 < crmax(0,4)) )))||(sforbid(4,2)> 0));
ASSUME((!(( (cw(0,4) < 3) && (3 < crmax(0,4)) )))||(sforbid(4,3)> 0));
ASSUME((!(( (cw(0,4) < 4) && (4 < crmax(0,4)) )))||(sforbid(4,4)> 0));
} else {
if(pw(0,4) != co(4,cr(0,4))) {
ASSUME(cr(0,4) >= old_cr);
}
pw(0,4) = co(4,cr(0,4));
r13 = mem(4,cr(0,4));
}
ASSUME(creturn[0] >= cr(0,4));
// call void @llvm.dbg.value(metadata i32 %8, metadata !150, metadata !DIExpression()), !dbg !157
// %9 = load i32, i32* @atom_1_X3_0, align 4, !dbg !112, !tbaa !86
// LD: Guess
old_cr = cr(0,5);
cr(0,5) = get_rng(0,NCONTEXT-1);// 0 ASSIGN LDCOM _l71_c13
// Check
ASSUME(active[cr(0,5)] == 0);
ASSUME(cr(0,5) >= iw(0,5));
ASSUME(cr(0,5) >= 0);
ASSUME(cr(0,5) >= cdy[0]);
ASSUME(cr(0,5) >= cisb[0]);
ASSUME(cr(0,5) >= cdl[0]);
ASSUME(cr(0,5) >= cl[0]);
// Update
creg_r14 = cr(0,5);
crmax(0,5) = max(crmax(0,5),cr(0,5));
caddr[0] = max(caddr[0],0);
if(cr(0,5) < cw(0,5)) {
r14 = buff(0,5);
ASSUME((!(( (cw(0,5) < 1) && (1 < crmax(0,5)) )))||(sforbid(5,1)> 0));
ASSUME((!(( (cw(0,5) < 2) && (2 < crmax(0,5)) )))||(sforbid(5,2)> 0));
ASSUME((!(( (cw(0,5) < 3) && (3 < crmax(0,5)) )))||(sforbid(5,3)> 0));
ASSUME((!(( (cw(0,5) < 4) && (4 < crmax(0,5)) )))||(sforbid(5,4)> 0));
} else {
if(pw(0,5) != co(5,cr(0,5))) {
ASSUME(cr(0,5) >= old_cr);
}
pw(0,5) = co(5,cr(0,5));
r14 = mem(5,cr(0,5));
}
ASSUME(creturn[0] >= cr(0,5));
// call void @llvm.dbg.value(metadata i32 %9, metadata !151, metadata !DIExpression()), !dbg !157
// %and = and i32 %8, %9, !dbg !113
creg_r15 = max(creg_r13,creg_r14);
r15 = r13 & r14;
// call void @llvm.dbg.value(metadata i32 %and, metadata !152, metadata !DIExpression()), !dbg !157
// %and13 = and i32 %7, %and, !dbg !114
creg_r16 = max(creg_r12,creg_r15);
r16 = r12 & r15;
// call void @llvm.dbg.value(metadata i32 %and13, metadata !153, metadata !DIExpression()), !dbg !157
// %and14 = and i32 %6, %and13, !dbg !115
creg_r17 = max(creg_r11,creg_r16);
r17 = r11 & r16;
// call void @llvm.dbg.value(metadata i32 %and14, metadata !154, metadata !DIExpression()), !dbg !157
// %and15 = and i32 %conv12, %and14, !dbg !116
creg_r18 = max(creg__r10__2_,creg_r17);
r18 = (r10==2) & r17;
// call void @llvm.dbg.value(metadata i32 %and15, metadata !155, metadata !DIExpression()), !dbg !157
// %and16 = and i32 %conv6, %and15, !dbg !117
creg_r19 = max(creg__r9__1_,creg_r18);
r19 = (r9==1) & r18;
// call void @llvm.dbg.value(metadata i32 %and16, metadata !156, metadata !DIExpression()), !dbg !157
// %cmp17 = icmp eq i32 %and16, 1, !dbg !118
creg__r19__1_ = max(0,creg_r19);
// br i1 %cmp17, label %if.then, label %if.end, !dbg !120
old_cctrl = cctrl[0];
cctrl[0] = get_rng(0,NCONTEXT-1);
ASSUME(cctrl[0] >= old_cctrl);
ASSUME(cctrl[0] >= creg__r19__1_);
if((r19==1)) {
goto T0BLOCK1;
} else {
goto T0BLOCK2;
}
T0BLOCK1:
// call void @__assert_fail(i8* noundef getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* noundef getelementptr inbounds ([108 x i8], [108 x i8]* @.str.1, i64 0, i64 0), i32 noundef 77, i8* noundef getelementptr inbounds ([23 x i8], [23 x i8]* @__PRETTY_FUNCTION__.main, i64 0, i64 0)) #8, !dbg !121
// unreachable, !dbg !121
r20 = 1;
goto T0BLOCK_END;
T0BLOCK2:
// %10 = bitcast i64* %thr1 to i8*, !dbg !124
// call void @llvm.lifetime.end.p0i8(i64 8, i8* %10) #7, !dbg !124
// %11 = bitcast i64* %thr0 to i8*, !dbg !124
// call void @llvm.lifetime.end.p0i8(i64 8, i8* %11) #7, !dbg !124
// ret i32 0, !dbg !125
ret_thread_0 = 0;
goto T0BLOCK_END;
T0BLOCK_END:
ASSUME(meminit(0,1) == mem(0,0));
ASSUME(coinit(0,1) == co(0,0));
ASSUME(deltainit(0,1) == delta(0,0));
ASSUME(meminit(0,2) == mem(0,1));
ASSUME(coinit(0,2) == co(0,1));
ASSUME(deltainit(0,2) == delta(0,1));
ASSUME(meminit(0,3) == mem(0,2));
ASSUME(coinit(0,3) == co(0,2));
ASSUME(deltainit(0,3) == delta(0,2));
ASSUME(meminit(0,4) == mem(0,3));
ASSUME(coinit(0,4) == co(0,3));
ASSUME(deltainit(0,4) == delta(0,3));
ASSUME(meminit(1,1) == mem(1,0));
ASSUME(coinit(1,1) == co(1,0));
ASSUME(deltainit(1,1) == delta(1,0));
ASSUME(meminit(1,2) == mem(1,1));
ASSUME(coinit(1,2) == co(1,1));
ASSUME(deltainit(1,2) == delta(1,1));
ASSUME(meminit(1,3) == mem(1,2));
ASSUME(coinit(1,3) == co(1,2));
ASSUME(deltainit(1,3) == delta(1,2));
ASSUME(meminit(1,4) == mem(1,3));
ASSUME(coinit(1,4) == co(1,3));
ASSUME(deltainit(1,4) == delta(1,3));
ASSUME(meminit(2,1) == mem(2,0));
ASSUME(coinit(2,1) == co(2,0));
ASSUME(deltainit(2,1) == delta(2,0));
ASSUME(meminit(2,2) == mem(2,1));
ASSUME(coinit(2,2) == co(2,1));
ASSUME(deltainit(2,2) == delta(2,1));
ASSUME(meminit(2,3) == mem(2,2));
ASSUME(coinit(2,3) == co(2,2));
ASSUME(deltainit(2,3) == delta(2,2));
ASSUME(meminit(2,4) == mem(2,3));
ASSUME(coinit(2,4) == co(2,3));
ASSUME(deltainit(2,4) == delta(2,3));
ASSUME(meminit(3,1) == mem(3,0));
ASSUME(coinit(3,1) == co(3,0));
ASSUME(deltainit(3,1) == delta(3,0));
ASSUME(meminit(3,2) == mem(3,1));
ASSUME(coinit(3,2) == co(3,1));
ASSUME(deltainit(3,2) == delta(3,1));
ASSUME(meminit(3,3) == mem(3,2));
ASSUME(coinit(3,3) == co(3,2));
ASSUME(deltainit(3,3) == delta(3,2));
ASSUME(meminit(3,4) == mem(3,3));
ASSUME(coinit(3,4) == co(3,3));
ASSUME(deltainit(3,4) == delta(3,3));
ASSUME(meminit(4,1) == mem(4,0));
ASSUME(coinit(4,1) == co(4,0));
ASSUME(deltainit(4,1) == delta(4,0));
ASSUME(meminit(4,2) == mem(4,1));
ASSUME(coinit(4,2) == co(4,1));
ASSUME(deltainit(4,2) == delta(4,1));
ASSUME(meminit(4,3) == mem(4,2));
ASSUME(coinit(4,3) == co(4,2));
ASSUME(deltainit(4,3) == delta(4,2));
ASSUME(meminit(4,4) == mem(4,3));
ASSUME(coinit(4,4) == co(4,3));
ASSUME(deltainit(4,4) == delta(4,3));
ASSUME(meminit(5,1) == mem(5,0));
ASSUME(coinit(5,1) == co(5,0));
ASSUME(deltainit(5,1) == delta(5,0));
ASSUME(meminit(5,2) == mem(5,1));
ASSUME(coinit(5,2) == co(5,1));
ASSUME(deltainit(5,2) == delta(5,1));
ASSUME(meminit(5,3) == mem(5,2));
ASSUME(coinit(5,3) == co(5,2));
ASSUME(deltainit(5,3) == delta(5,2));
ASSUME(meminit(5,4) == mem(5,3));
ASSUME(coinit(5,4) == co(5,3));
ASSUME(deltainit(5,4) == delta(5,3));
ASSERT(r20== 0);
}
| [
"tuan-phong.ngo@it.uu.se"
] | tuan-phong.ngo@it.uu.se |
3823dc465196493bc1313f97a5040440f620e3ba | 6253ab92ce2e85b4db9393aa630bde24655bd9b4 | /Common/Ibeo/IbeoTahoeCalibration.h | e58f3b0ab7b8d6fe16ec041401df1c40bacbd649 | [] | no_license | Aand1/cornell-urban-challenge | 94fd4df18fd4b6cc6e12d30ed8eed280826d4aed | 779daae8703fe68e7c6256932883de32a309a119 | refs/heads/master | 2021-01-18T11:57:48.267384 | 2008-10-01T06:43:18 | 2008-10-01T06:43:18 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,468 | h | #ifndef IBEO_TAHOE_CALIBRATION_H_SEPT_28_2007_SVL5
#define IBEO_TAHOE_CALIBRATION_H_SEPT_28_2007_SVL5
#include "../Math/Angle.h"
#include "../Fusion/Sensor.h"
#define __IBEO_SENSOR_CALIBRATION_CHEAT\
inline Sensor SensorCalibration(){\
Sensor ret;\
ret.SensorX = x;\
ret.SensorY = y;\
ret.SensorZ = z;\
ret.SensorYaw = yaw;\
ret.SensorPitch = pitch;\
ret.SensorRoll = roll;\
return ret;\
}
#define __IBEO_CALIBRATION_XYZ_YPR_RAD(X,Y,Z,YAW,PITCH,ROLL)\
const float x=(float)X),y=(float)(Y),z=(float)(Z),yaw=(float)(YAW),pitch=(float)(PITCH),roll=(float)(ROLL);\
__IBEO_SENSOR_CALIBRATION_CHEAT;
#define __IBEO_CALIBRATION_XYZ_YPR_DEG(X,Y,Z,YAW,PITCH,ROLL)\
const float x=(float)(X),y=(float)(Y),z=(float)(Z),yaw=Deg2Rad((float)(YAW)),pitch=Deg2Rad((float)(PITCH)),roll=Deg2Rad((float)(ROLL));\
__IBEO_SENSOR_CALIBRATION_CHEAT;
// all parameters IMU-relative
namespace IBEO_CALIBRATION{
namespace AUG_2007{
namespace FRONT_LEFT{
__IBEO_CALIBRATION_XYZ_YPR_DEG(3.5306,0.8,-0.5118,37.05,-1.1,-0.9);
}
namespace FRONT_CENTER{
__IBEO_CALIBRATION_XYZ_YPR_DEG(3.6449,0.0f,-0.0508,0,0,0);
}
namespace FRONT_RIGHT{
__IBEO_CALIBRATION_XYZ_YPR_DEG(3.5306,-0.8,-0.5118,-41.5,-.7,1);
}
}
namespace SEPT_21_2007{
namespace FRONT_LEFT{
__IBEO_CALIBRATION_XYZ_YPR_DEG(3.5306,0.8,-0.4118,-37.05,1.1,0.4);
}
namespace FRONT_CENTER{
__IBEO_CALIBRATION_XYZ_YPR_DEG(3.6449,0.0f,-0.0508,0,0,0);
}
namespace FRONT_RIGHT{
__IBEO_CALIBRATION_XYZ_YPR_DEG(3.5306,-0.8,-0.4118,41.5,.7,-.2);
}
}
namespace OCT_2_2007{
namespace FRONT_LEFT{
__IBEO_CALIBRATION_XYZ_YPR_DEG(3.5306,0.8,-0.4118,-37.05,1.1,0.4);
}
namespace FRONT_CENTER{
__IBEO_CALIBRATION_XYZ_YPR_DEG(3.6449,0.0f,-0.0508,0,0,0);
}
namespace FRONT_RIGHT{
__IBEO_CALIBRATION_XYZ_YPR_DEG(3.5306,-0.8,-0.4118,41.5,.9,-.3);
}
}
//OCT_2_2007
namespace CURRENT{
namespace FRONT_LEFT{
__IBEO_CALIBRATION_XYZ_YPR_DEG(3.5306,0.8,-0.4118,-37.05,1.1,0.4);
}
namespace FRONT_CENTER{
__IBEO_CALIBRATION_XYZ_YPR_DEG(3.6449,0.0f,-0.0508,0,0,0);
}
namespace FRONT_RIGHT{
__IBEO_CALIBRATION_XYZ_YPR_DEG(3.5306,-0.8,-0.4118,41.5,1,-.4);
}
}
};
#endif //IBEO_TAHOE_CALIBRATION_H_SEPT_28_2007_SVL5
| [
"anathan@5031bdca-8e6f-11dd-8a4e-8714b3728bc5"
] | anathan@5031bdca-8e6f-11dd-8a4e-8714b3728bc5 |
c34e5bfea26ef4ab8a21670090466588095aac9b | 02bb3366a65aaa0c5699a22aef4aafbbc9e93dcb | /workspace_c++/Skill_Set_TSP/src/functions.h | 1f3fba24cd402d58e810055c12f2fc8c97b52b5e | [] | no_license | xiaolindong/cppWorkspace | ec8f257c0a65be7176c66b86ff2fb83dde646c62 | ff370bdbfc9a306f8f1c60f876d315b2d28a416d | refs/heads/master | 2021-05-30T12:27:14.499318 | 2016-02-18T22:11:12 | 2016-02-18T22:11:12 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 15,469 | h | /*
* functions.h
*
* Created on: Mar 23, 2012
* Author: eia2
*/
#ifndef FUNCTIONS_H_
#define FUNCTIONS_H_
using namespace std;
/*********check a particular skill is in the worker's set*********************/
bool checkskill(int workerid, int jobskill)
{
if(jobskill >= skilllow[workerid] && jobskill <= skillhigh[workerid])
return true;
else
return false;
}
/**************read data from tsp.txt******************/
void readfile(){
ifstream fin;
fin.open("/cs/grad3/eia2/workspace/Generator/tsp1 (copy).txt");
fin>>num_job>>num_worker;
cout<<num_job<<" "<<num_worker<<endl;
for(int i = 1; i <= num_job; i++){
fin>>jobid[i];
fin>>job_skill[i];
cout<<jobid[i]<<" "<<job_skill[i]<<endl;
}
cout<<endl;
for(int i = 0; i < num_worker; i++){
fin>>skilllow[i]>>skillhigh[i];
cout<<skilllow[i]<<" "<<skillhigh[i]<<endl;
}
for(int i = 0; i <= num_job; i++){
for(int j = 0; j <= num_job; j++)
{
fin>>cost[i][j];
cout<<cost[i][j]<<" ";
}
cout<<endl;
}
}
/************Searching for the index of an ID in the vector******************/
int Find_In_Vector(vector<Node> v, int id){
vector<Node>::iterator p = v.begin();
int index = -1;
int i = 0;
while (p != v.end()){
if (p->id == id){
index = i;
break;
}
else
i++;
p++;
}
return index;
}
/************************* priting only Y **********************************/
void Print_Solution(IloEnv env, IloCplex cplex,ThreeDMatrix y){
IloNumArray vals(env);
env.out() << "Solution status = " << cplex. getStatus () << endl;
env.out() << "Solution value = " << cplex. getObjValue () << endl;
//Printing Y
for(int k = 0; k < num_worker; k++){
cout<<"Worker #"<<k+1<<": "<<endl;
for(int i = 0; i < num_job; i++){
cout<<"y["<<i<<"]= ";
for(int j = 0; j < num_job; j++)
env.out() <<cplex.getValue(y[k][i][j])<<" ";
cout<<endl;
}
cout<<endl;
}
cout<<"##########################" <<endl;
}
/******************************* copy Y ****************************/
vector<vector<vector<bool> > > Copy_Y(IloCplex cplex, ThreeDMatrix y){
vector<vector<vector<bool> > > y_copy;
y_copy.resize(num_worker);
for (int k = 0; k < num_worker; k++)
y_copy.at(k).resize(num_job);
for (int k = 0; k < num_worker; k++)
for (int i = 0; i < num_job; i++)
for (int j = 0; j < num_job; j++)
if (cplex.getValue(y[k][i][j]))
y_copy.at(k).at(i).push_back(true);
else
y_copy.at(k).at(i).push_back(false);
return y_copy;
}
/************************* adding cycle constraints************/
void AddConnectivityConstarint(IloEnv &env, IloModel &model,IloCplex &cplex, set<int> s,vector<vector<Node> > Graph,ThreeDMatrix y, int driver){
//cout<< "This is addConnectivity function"<<endl;
set<int>::iterator p;
IloExpr e(env);
for (p = s.begin(); p != s.end(); p++){
int i = (*p);
for (int j = 1; j < num_job; j++){
if (j != i){
int index = Find_In_Vector(Graph.at(driver), j);
if (index !=-1)
if (s.count(j) == 0){
if (checkskill(driver, job_skill[j]))
e += y[driver][i][j] ;
}
}
}
}
model.add( e >= 1);
//cout <<" This is the end of addConnecticity" << endl;
}
/****** finding a component in the graph of a driver *********/
set<int> Find_Component(vector<vector<Node> > Graph, int k){
list<Node> s; // works as an stack
set<int> iSolated_Comp; //keep the component
if (!Graph.at(k).empty()){
s.push_front(Graph.at(k).front());
while (!s.empty()){
Node temp = s.front();
s.pop_front();
iSolated_Comp.insert(temp.id); // insert the ID to component
/*** insert the links of ID to the stack ****/
vector<Node> ::iterator p;
for (p = temp.links.begin(); p != temp.links.end(); p++){
int index = Find_In_Vector(Graph.at(k),p->id);
if (index != -1)
s.push_front(Graph.at(k).at(index));
else{
cout << "error in finding the index of specific ID" << endl;
break;
}
}
/**** end of inserting links of ID to stack***/
}
}
return iSolated_Comp;
}
/*********************check a boolean array to be all true**************/
bool CheckBoolArray(bool a[], int size){
for (int i = 0; i < size; i++)
if(!a[i])
return false;
return true;
}
/*********************** find a node which is not connected to the other component***/
int FindVertexNonHited(bool vertex_hit[], int graph_nodeSize){
int i = 0;
while( i < graph_nodeSize){
if (!vertex_hit[i])
return i ;
i++;
}
return -1;
}
/****** finding all of the component of driver K in the graph *********/
vector<set<int> > FindAllComponent(vector<vector<Node> > Graph, int k){
vector<set<int> > all_comp;
if (!Graph.at(k).empty()){
int graph_nodeSize = Graph.at(k).size();
bool vertex_hit[graph_nodeSize];
for (int i = 0; i < graph_nodeSize; i++)
vertex_hit[i] = false;
while (!CheckBoolArray(vertex_hit,graph_nodeSize)){
list<Node> s; // works as an stack
set<int> isolated_comp; //keep the component
int indexx = FindVertexNonHited(vertex_hit, graph_nodeSize);
if (indexx == -1)
cout << "error in finding a node" << endl;
else
{
vertex_hit[indexx] = true;
s.push_front(Graph.at(k).at(indexx));
while (!s.empty()){
Node temp = s.front();
s.pop_front();
isolated_comp.insert(temp.id); // insert the ID to component
/*** insert the links of ID to the stack ****/
vector<Node> ::iterator p;
for (p = temp.links.begin(); p != temp.links.end(); p++){
int index = Find_In_Vector(Graph.at(k),p->id);
if (index != -1){
if (!vertex_hit[index]){
s.push_front(Graph.at(k).at(index));
vertex_hit[index] = true;
}
}
else{
cout << "error in finding the index of specific ID" << endl;
break;
}
}
/**** end of inserting links of ID to stack***/
}
}
all_comp.push_back(isolated_comp);
}
}
return all_comp;
}
/*********************check dirivers tree connectivity**************/
bool Check_Connectivity(bool tree_connectivity[]){
for (int i = 0; i < num_worker; i++)
if(!tree_connectivity[i])
return false;
return true;
}
/***************** print the graph***************/
void PrintGraph(vector<vector<Node> > Graph, ofstream &fout){
for (int k = 0; k < num_worker; k++){
fout<< "Driver " << k << " graph is :" << endl;
for (int i = 0; i < Graph.at(k).size(); i++ ){
fout << "Node " << Graph.at(k).at(i).id << " :" ;
vector<Node>::iterator p;
for (p = Graph.at(k).at(i).links.begin(); p!= Graph.at(k).at(i).links.end(); p++){
fout << " -> ";
fout << p->id ;
}
fout << endl;
}
fout << "-------------------" ;
fout << endl;
}
fout << "****************************************************" <<endl ;
}
/*********Updating the connectivity graph for each driver***************/
void Update_Graph(IloCplex & cplex, vector< vector<Node> > &Graph, BoolVarMatrix x,ThreeDMatrix y){
for (int k = 0; k < num_worker; k++)
for (int i= 1; i < num_job; i++)
if (cplex.getValue(x[i][k])){
// find the index of the node with (id = i)
int index = Find_In_Vector(Graph.at(k),i); // check if index != -1
/*
vector<Node>::iterator p;
vector<Node> temp = Graph.at(k);
int index = 0;
for (p = temp.begin(); p != temp.end(); p++){
if (p->id != i)
index++;
}*/
// add to the neighbor of node with (id = i) all of it adjacents nodes
for (int j = 1; j < num_job; j++){
if ((cplex.getValue(y[k][i][j])) || (cplex.getValue(y[k][j][i])))
Graph.at(k).at(index).AddNeighbor(j);
}
}
}
/*********constructing the connectivity graph for each driver***************/
vector<vector<Node> > Drivers_Connectivity_Graph_Construct (IloCplex & cplex, BoolVarMatrix x,ThreeDMatrix y){
vector<vector<Node> > Graph;
Graph.resize (num_worker);
for (int k = 0; k < num_worker; k++){
for (int i = 1; i < num_job; i++)
if (cplex.getValue(x[i][k])){
Node newNode (i);
Graph.at(k).push_back(newNode);
}
}
Update_Graph(cplex, Graph, x, y);
return Graph;
}
/**********************create the input matrix *********************/
void Creat_Input(IloEnv env,BoolVarMatrix &x,ThreeDMatrix &y,BoolVarMatrix &z){
for(int i = 0; i < num_job; i++){
x[i] = IloBoolVarArray(env, num_worker);
}
// create the y matrix
for(int k = 0; k < num_worker; k++){
y[k] = BoolVarMatrix(env, num_job);
for ( int i = 0; i < num_job; i++){
y[k][i] = IloBoolVarArray(env, num_job);
}
}
//create matrix z
for (int i =0 ; i < num_job ; i++){
z[i] = IloBoolVarArray(env, num_job);
}
}
/*********construct object function***************/
IloExpr generate_obj_fun(IloEnv env,BoolVarMatrix z ){
IloExpr e(env);
for(int i = 0; i < num_job; i++)
for(int j = 0; j < i; j++)
//if (i != j)
e += cost[i][j] * z[i][j];
return e;
}
/************************ adding easy constraints*****************/
void AddEasyConstraint(IloEnv &env , IloModel &model, BoolVarMatrix x, ThreeDMatrix y, BoolVarMatrix z){
// initial most of the x_uj=0 regarding to the skill requirement of job u and and skill of work j
for (int i = 1; i < num_job; i++)
for (int k=0; k < num_worker; k++)
if(!checkskill(k,job_skill[i]))
model.add(x[i][k] == 0);
// initial most of the y_ek=0 regarding to the skill requirement of job e = (i,j) and and skill of work k
for (int k = 0 ; k < num_worker; k++)
for (int i = 1; i < num_job; i++)
if (!checkskill(k,job_skill[i]))
for(int j = 1; j < num_job; j++)
model.add(y[k][i][j] == 0);
// y[k][i][i]=0
for (int k = 0; k < num_worker; k++)
for (int i = 0; i < num_job; i++)
model.add(y[k][i][i] == 0);
// sum_{j \in s(u)}x_{uj}=1
for( int i = 1 ; i < num_job; i++){
IloExpr e(env);
for(int k = 0; k < num_worker; k++){
if (checkskill(k, job_skill[i]))
e += x[i][k];
else
model.add(x[i][k] == 0);
}
model.add(e == 1);
}
//y_[k][i][j] \le x_[i][k] & x_[j][k]
/*
for (int k = 0; k < num_worker; k++)
for (int i = 1; i < num_job; i++)
for (int j = 1; j < num_job; j++){
model.add(y[k][i][j] <= x[i][k]);
model.add(y[k][i][j] <= x[j][k]);
model.add(y[k][j][i] <= x[i][k]);
model.add(y[k][j][i] <= x[j][k]);
}
*/
// y_{ej} <= x_{uj} + x_{vj} / 2
for (int k =0; k < num_worker; k++)
for (int i = 0; i < num_job; i++)
for (int j = 0; j < num_job; j++){
model.add(y[k][i][j] <= (x[i][k] + x[j][k]) / 2 );
}
// y_[]k[i][j]= y[k][j][i]
/*
for (int k =0; k < num_worker; k++)
for (int i = 0; i < num_job; i++)
for (int j = 0; j < num_job; j++){
model.add(y[k][i][j]- y[k][j][i] == 0);
}*/
// z=sum_{ j \in worker}y_{ej}
for (int i = 0; i < num_job; i++)
for (int j = 0; j < num_job; j++){
IloExpr e(env);
for (int k = 0; k < num_worker; k++){
e += y[k][i][j] ;
//e += y[k][j][i];
//e =+ y[k][j][i]*y[k][i][j];
}
model.add(z[i][j] == e );
}
/*
for (int i = 0; i < num_job; i++)
for (int j = 0; j < i; j++)
for (int k = 0; k < num_worker; k++){
model.add(y[k][i][j] <= z[i][j]);
model.add(y[k][j][i] <= z[i][j]);
model.add(y[k][i][j] <= z[j][i]);
model.add(y[k][j][i] <= z[j][i]);
}
*/
// z[i][j]= z[j][i]
for (int i = 0; i < num_job; i++)
for (int j = 0; j < num_job; j++)
model.add(z[i][j]- z[j][i] == 0);
}
/*******************print solution ******************/
void Print_Solution(IloEnv env, IloCplex &cplex,BoolVarMatrix x,ThreeDMatrix y,BoolVarMatrix z){
IloNumArray vals(env);
env.out() << "Solution status = " << cplex. getStatus () << endl;
env.out() << "Solution value = " << cplex. getObjValue () << endl;
// Printing X
for (int i = 1; i< num_job; i++){
cplex.getValues(vals,x[i]);
cout << "x[" << i <<"]=" << vals << endl;
}
cout << endl;
// Printing Z
for (int i = 0; i< num_job; i++){
cplex.getValues(vals,z[i]);
cout << "z[" << i << "]=" << vals<< endl;
}
cout << endl;
//Printing Y
for(int k = 0; k < num_worker; k++){
cout<<"Worker #"<<k+1<<": "<<endl;
for(int i = 0; i < num_job; i++){
cout<<"y["<<i<<"]= ";
for(int j = 0; j < num_job; j++)
env.out() <<cplex.getValue(y[k][i][j])<<" ";
cout<<endl;
}
cout<<endl;
}
cout<<"##########################" <<endl;
}
/**************************Add cardinality constraints**********************************/
void addCardinalityConstraint(IloEnv &env,IloModel &model,set<int> isolated_comp, ThreeDMatrix y, int driverId){
set<int>::iterator p,q;
IloExpr e(env);
for (p = isolated_comp.begin(); p != isolated_comp.end(); p++)
for (q = isolated_comp.begin(); q != isolated_comp.end(); q++)
if(p != q)
e += y[driverId][(*p)][(*q)];
int comp_size = isolated_comp.size();
model.add(e <= (--comp_size));
}
/*************** add depot connectivity constraints**************************/
void AddDepotConnectivityConstraints(IloEnv &env, IloModel &model, vector<vector<Node> > Graph, ThreeDMatrix y){
IloExpr e(env);
for (int k = 0; k < num_worker; k++){
vector<Node>::iterator p;
for (p = Graph.at(k).begin(); p != Graph.at(k).end(); p++)
e += y[k][0][p->id];
model.add(e == 1);
}
}
/**************************add all Complicated constraints******************************/
void AddComplicatedConstraints (IloEnv &env, IloModel model, IloCplex cplex, BoolVarMatrix x, ThreeDMatrix y, BoolVarMatrix z){
vector<vector<Node> > Graph = Drivers_Connectivity_Graph_Construct (cplex, x, y);
ofstream result_graph;
result_graph.open("graph.txt");
PrintGraph(Graph,result_graph);
vector<vector<vector<bool> > > y_copy = Copy_Y(cplex, y);
bool tree_connectivity[num_worker];
for (int i = 0; i < num_worker; i ++)
tree_connectivity[i] = false;
while(!Check_Connectivity(tree_connectivity)){
for (int k = 0; k < num_worker; k++){
if (Graph.at(k).empty())
tree_connectivity[k] = true;
else{
vector<set<int> > driverKComponents = FindAllComponent(Graph, k); //keep the component
vector<set<int> > ::iterator p;
for (p = driverKComponents.begin(); p != driverKComponents.end(); p++){
set<int> isolated_comp = *p;
//cout << "compsize ="<< isolated_comp.size() << endl;
//cout << "graph k ="<< Graph.at(k).size()<< endl;
if (isolated_comp.size() == Graph.at(k).size()){
//cout << " the tree of driver " << k << "is connected" << endl;
tree_connectivity[k] = true;
}
else{
tree_connectivity[k] = false;
//addCardinalityConstraint(env,model,isolated_comp,y, k);
AddConnectivityConstarint(env,model,cplex,isolated_comp,Graph,y, k); //generate constarint for this isolated component
//cout << "hi" << endl;
}
//isolated_comp.clear();
}
}
}
//AddDepotConnectivityConstraints(env, model, Graph, y);
if (!Check_Connectivity(tree_connectivity)){
cplex.setParam(IloCplex::EpGap,.1);
if ( !cplex.solve() ) {
env.error() << "Failed to optimize LP." << endl;
throw (-1);
}
}
cout<<"####################solved"<<endl;
Graph = Drivers_Connectivity_Graph_Construct (cplex, x, y);
// print the solution
PrintGraph(Graph,result_graph);
y_copy = Copy_Y(cplex, y);
Print_Solution(env,cplex,x,y,z);
//Check_Connectivity(tree_connectivity);
}
}
#endif /* FUNCTIONS_H_ */
| [
"Ehsan@Ehsans-MacBook-Pro.local"
] | Ehsan@Ehsans-MacBook-Pro.local |
53e04d2cb76ce6493fd4008066806e7913d80e5b | f50da5dfb1d27cf737825705ce5e286bde578820 | /Temp/il2cppOutput/il2cppOutput/mscorlib_System_Nullable_1_gen2303330647.h | 33dde5c4a7c6c83abf372743a357ea37cb4c43e7 | [] | no_license | magonicolas/OXpecker | 03f0ea81d0dedd030d892bfa2afa4e787e855f70 | f08475118dc8f29fc9c89aafea5628ab20c173f7 | refs/heads/master | 2020-07-05T11:07:21.694986 | 2016-09-12T16:20:33 | 2016-09-12T16:20:33 | 67,150,904 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,422 | h | #pragma once
#include "il2cpp-config.h"
#ifndef _MSC_VER
# include <alloca.h>
#else
# include <malloc.h>
#endif
#include <stdint.h>
#include "mscorlib_System_ValueType4014882752.h"
#include "mscorlib_System_DateTimeOffset3712260035.h"
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Nullable`1<System.DateTimeOffset>
struct Nullable_1_t2303330647
{
public:
// T System.Nullable`1::value
DateTimeOffset_t3712260035 ___value_0;
// System.Boolean System.Nullable`1::has_value
bool ___has_value_1;
public:
inline static int32_t get_offset_of_value_0() { return static_cast<int32_t>(offsetof(Nullable_1_t2303330647, ___value_0)); }
inline DateTimeOffset_t3712260035 get_value_0() const { return ___value_0; }
inline DateTimeOffset_t3712260035 * get_address_of_value_0() { return &___value_0; }
inline void set_value_0(DateTimeOffset_t3712260035 value)
{
___value_0 = value;
}
inline static int32_t get_offset_of_has_value_1() { return static_cast<int32_t>(offsetof(Nullable_1_t2303330647, ___has_value_1)); }
inline bool get_has_value_1() const { return ___has_value_1; }
inline bool* get_address_of_has_value_1() { return &___has_value_1; }
inline void set_has_value_1(bool value)
{
___has_value_1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
| [
"magonicolas@gmail.com"
] | magonicolas@gmail.com |
5140592d0c8bf765f9cbda19cb9347f9ad398090 | 9a1976051036656364e51e7f225f3a442c6c6667 | /src/graph/ConvertGraph.h | 983a9869c1a8037973a5a6580e7a70e826adc053 | [
"MIT"
] | permissive | tbor8080/rannc | 4ada389fee533b10733397ba492b9677d154e738 | 2c7cae00a17d3dfec8a059638f6788a307d3c6a4 | refs/heads/main | 2023-05-09T20:31:17.262285 | 2021-06-09T04:34:20 | 2021-06-09T04:34:20 | 376,823,819 | 1 | 0 | MIT | 2021-06-14T12:59:10 | 2021-06-14T12:59:10 | null | UTF-8 | C++ | false | false | 2,001 | h | //
// Created by Masahiro Tanaka on 2018/11/30.
//
#ifndef PT_RANNC_RANNC_COMMON_H
#define PT_RANNC_RANNC_COMMON_H
#include <torch/csrc/jit/ir/ir.h>
#include <torch/TorchUtil.h>
#include "graph/ir.h"
namespace rannc {
//
// Forward declarations
//
class FunctionStorage;
class ConvertGraph {
public:
ConvertGraph() {}
std::shared_ptr<torch::jit::Graph> toTorch(
const std::shared_ptr<IRGraph>& irGraph,
const IValueMap& constants,
const FunctionStorage & functions);
std::shared_ptr<torch::jit::Graph> toTorchNoMerge(
const std::shared_ptr<IRGraph>& irGraph,
const IValueMap& constants,
const FunctionStorage & functions);
private:
void doToTorch(
std::shared_ptr<torch::jit::Graph>& graph,
std::unordered_map<std::string, torch::jit::Value*>& regValues,
const std::shared_ptr<IRGraph>& irGraph,
const IValueMap& constants,
const FunctionStorage & functions,
const std::vector<IRValue>& no_param_inputs);
};
IRValue toIRValue(torch::jit::Value* value);
std::shared_ptr<IRGraph> fromTorch(const std::string &name, const std::shared_ptr<torch::jit::Graph> &graph,
size_t real_input_num);
torch::jit::TypePtr fromIRType(const IRType& ir_type);
std::shared_ptr<IRGraph> guessBatchValuesByReachability(const std::shared_ptr<IRGraph>& g);
std::shared_ptr<IRGraph> setValueTypes(const std::shared_ptr<IRGraph>& g,
const std::unordered_map<std::string, IRType>& value_types);
std::shared_ptr<torch::jit::Graph> disableDropout(const std::shared_ptr<torch::jit::Graph>& g);
IValueMap createInputMap(const std::vector<torch::jit::IValue>& input_ivals,
const std::shared_ptr<IRGraph>& graph);
}
#endif //PT_RANNC_RANNC_COMMON_H
| [
"mtnk@nict.go.jp"
] | mtnk@nict.go.jp |
5aec8e06f61e6fa51b07857b28df02ab3001e38c | 12a149c91541243f7e0f9b9e834e7cea3be83ab9 | /chrome/browser/apps/app_service/app_platform_metrics.cc | 8ddbb9a8dc30573a06095ad2bd9e6834d3a8b39b | [
"BSD-3-Clause"
] | permissive | liutao5/chromium | 6840deed48ae77e961cbf7969519d6adcfecab31 | b4da5b0d03ed5f5f1961caca5e3b1e68889cdfcc | refs/heads/main | 2023-06-28T18:05:01.192638 | 2021-09-03T07:28:50 | 2021-09-03T07:28:50 | 402,694,820 | 1 | 0 | BSD-3-Clause | 2021-09-03T08:08:55 | 2021-09-03T08:08:54 | null | UTF-8 | C++ | false | false | 46,245 | 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 "chrome/browser/apps/app_service/app_platform_metrics.h"
#include <set>
#include "base/containers/contains.h"
#include "base/json/values_util.h"
#include "base/metrics/histogram_functions.h"
#include "base/no_destructor.h"
#include "chrome/browser/apps/app_service/app_service_metrics.h"
#include "chrome/browser/apps/app_service/app_service_proxy.h"
#include "chrome/browser/apps/app_service/app_service_proxy_factory.h"
#include "chrome/browser/ash/policy/core/browser_policy_connector_ash.h"
#include "chrome/browser/ash/profiles/profile_helper.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/browser_process_platform_part.h"
#include "chrome/browser/extensions/launch_util.h"
#include "chrome/browser/metrics/usertype_by_devicetype_metrics_provider.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/sync/sync_service_factory.h"
#include "chrome/browser/ui/app_list/arc/arc_app_utils.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_finder.h"
#include "chrome/browser/ui/extensions/application_launch.h"
#include "chrome/browser/web_applications/web_app.h"
#include "chrome/browser/web_applications/web_app_provider.h"
#include "chrome/browser/web_applications/web_app_registrar.h"
#include "components/prefs/pref_service.h"
#include "components/prefs/scoped_user_pref_update.h"
#include "components/services/app_service/public/cpp/app_update.h"
#include "components/sync/base/model_type.h"
#include "components/sync/driver/sync_service.h"
#include "components/sync/driver/sync_service_utils.h"
#include "components/ukm/app_source_url_recorder.h"
#include "components/user_manager/user_manager.h"
#include "extensions/browser/extension_prefs.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/common/constants.h"
#include "extensions/common/extension.h"
#include "services/metrics/public/cpp/ukm_builders.h"
#include "services/metrics/public/cpp/ukm_recorder.h"
#include "ui/aura/window.h"
namespace {
// UMA metrics for a snapshot count of installed apps.
constexpr char kAppsCountHistogramPrefix[] = "Apps.AppsCount.";
constexpr char kAppsCountPerInstallSourceHistogramPrefix[] =
"Apps.AppsCountPerInstallSource.";
constexpr char kAppsRunningDurationHistogramPrefix[] = "Apps.RunningDuration.";
constexpr char kAppsRunningPercentageHistogramPrefix[] =
"Apps.RunningPercentage.";
constexpr char kAppsActivatedCountHistogramPrefix[] = "Apps.ActivatedCount.";
constexpr char kAppsUsageTimeHistogramPrefix[] = "Apps.UsageTime.";
constexpr char kAppsUsageTimeHistogramPrefixV2[] = "Apps.UsageTimeV2.";
constexpr char kAppPreviousReadinessStatus[] = "Apps.PreviousReadinessStatus.";
constexpr char kInstallSourceUnknownHistogram[] = "Unknown";
constexpr char kInstallSourceSystemHistogram[] = "System";
constexpr char kInstallSourcePolicyHistogram[] = "Policy";
constexpr char kInstallSourceOemHistogram[] = "Oem";
constexpr char kInstallSourcePreloadHistogram[] = "Preload";
constexpr char kInstallSourceSyncHistogram[] = "Sync";
constexpr char kInstallSourceUserHistogram[] = "User";
constexpr base::TimeDelta kMinDuration = base::TimeDelta::FromSeconds(1);
constexpr base::TimeDelta kMaxDuration = base::TimeDelta::FromDays(1);
constexpr base::TimeDelta kMaxUsageDuration = base::TimeDelta::FromMinutes(5);
constexpr int kDurationBuckets = 100;
constexpr int kUsageTimeBuckets = 50;
std::set<apps::AppTypeName>& GetAppTypeNameSet() {
static base::NoDestructor<std::set<apps::AppTypeName>> app_type_name_map;
if (app_type_name_map->empty()) {
app_type_name_map->insert(apps::AppTypeName::kArc);
app_type_name_map->insert(apps::AppTypeName::kBuiltIn);
app_type_name_map->insert(apps::AppTypeName::kCrostini);
app_type_name_map->insert(apps::AppTypeName::kChromeApp);
app_type_name_map->insert(apps::AppTypeName::kWeb);
app_type_name_map->insert(apps::AppTypeName::kMacOs);
app_type_name_map->insert(apps::AppTypeName::kPluginVm);
app_type_name_map->insert(apps::AppTypeName::kStandaloneBrowser);
app_type_name_map->insert(apps::AppTypeName::kRemote);
app_type_name_map->insert(apps::AppTypeName::kBorealis);
app_type_name_map->insert(apps::AppTypeName::kSystemWeb);
app_type_name_map->insert(apps::AppTypeName::kChromeBrowser);
app_type_name_map->insert(apps::AppTypeName::kStandaloneBrowserExtension);
}
return *app_type_name_map;
}
// Determines what app type a Chrome App should be logged as based on its launch
// container and app id. In particular, Chrome apps in tabs are logged as part
// of Chrome browser.
apps::AppTypeName GetAppTypeNameForChromeApp(
Profile* profile,
const std::string& app_id,
apps::mojom::LaunchContainer container) {
if (app_id == extension_misc::kChromeAppId) {
return apps::AppTypeName::kChromeBrowser;
}
DCHECK(profile);
extensions::ExtensionRegistry* registry =
extensions::ExtensionRegistry::Get(profile);
DCHECK(registry);
const extensions::Extension* extension =
registry->GetInstalledExtension(app_id);
if (!extension || !extension->is_app()) {
return apps::AppTypeName::kUnknown;
}
if (CanLaunchViaEvent(extension)) {
return apps::AppTypeName::kChromeApp;
}
switch (container) {
case apps::mojom::LaunchContainer::kLaunchContainerWindow:
return apps::AppTypeName::kChromeApp;
case apps::mojom::LaunchContainer::kLaunchContainerTab:
return apps::AppTypeName::kChromeBrowser;
default:
break;
}
apps::mojom::LaunchContainer launch_container =
extensions::GetLaunchContainer(extensions::ExtensionPrefs::Get(profile),
extension);
if (launch_container == apps::mojom::LaunchContainer::kLaunchContainerTab) {
return apps::AppTypeName::kChromeBrowser;
}
return apps::AppTypeName::kChromeApp;
}
// Determines what app type a web app should be logged as based on its launch
// container and app id. In particular, web apps in tabs are logged as part of
// Chrome browser.
apps::AppTypeName GetAppTypeNameForWebApp(
Profile* profile,
const std::string& app_id,
apps::mojom::LaunchContainer container) {
apps::AppTypeName type_name = apps::AppTypeName::kChromeBrowser;
apps::mojom::WindowMode window_mode = apps::mojom::WindowMode::kBrowser;
apps::AppServiceProxyFactory::GetForProfile(profile)
->AppRegistryCache()
.ForOneApp(
app_id, [&type_name, &window_mode](const apps::AppUpdate& update) {
DCHECK(update.AppType() == apps::mojom::AppType::kWeb ||
update.AppType() == apps::mojom::AppType::kSystemWeb);
// For system web apps, the install source is |kSystem|.
// The app type may be kSystemWeb (system web apps in Ash when
// Lacros web apps are enabled), or kWeb (all other cases).
type_name =
(update.InstallSource() == apps::mojom::InstallSource::kSystem)
? apps::AppTypeName::kSystemWeb
: apps::AppTypeName::kWeb;
window_mode = update.WindowMode();
});
if (type_name != apps::AppTypeName::kWeb) {
return type_name;
}
switch (container) {
case apps::mojom::LaunchContainer::kLaunchContainerWindow:
return apps::AppTypeName::kWeb;
case apps::mojom::LaunchContainer::kLaunchContainerTab:
return apps::AppTypeName::kChromeBrowser;
default:
break;
}
if (window_mode == apps::mojom::WindowMode::kBrowser) {
return apps::AppTypeName::kChromeBrowser;
}
return apps::AppTypeName::kWeb;
}
std::string GetInstallSource(apps::mojom::InstallSource install_source) {
switch (install_source) {
case apps::mojom::InstallSource::kUnknown:
return kInstallSourceUnknownHistogram;
case apps::mojom::InstallSource::kSystem:
return kInstallSourceSystemHistogram;
case apps::mojom::InstallSource::kPolicy:
return kInstallSourcePolicyHistogram;
case apps::mojom::InstallSource::kOem:
return kInstallSourceOemHistogram;
case apps::mojom::InstallSource::kDefault:
return kInstallSourcePreloadHistogram;
case apps::mojom::InstallSource::kSync:
return kInstallSourceSyncHistogram;
case apps::mojom::InstallSource::kUser:
return kInstallSourceUserHistogram;
}
}
// Returns false if |window| is a Chrome app window or a standalone web app
// window. Otherwise, return true;
bool IsBrowser(aura::Window* window) {
Browser* browser = chrome::FindBrowserWithWindow(window->GetToplevelWindow());
if (!browser || browser->is_type_app() || browser->is_type_app_popup()) {
return false;
}
return true;
}
// Returns true if the app with |app_id| is opened as a tab in a browser window.
// Otherwise, return false;
bool IsAppOpenedInTab(apps::AppTypeName app_type_name,
const std::string& app_id) {
return app_type_name == apps::AppTypeName::kChromeBrowser &&
app_id != extension_misc::kChromeAppId;
}
// Determines what app type a web app should be logged as based on |window|. In
// particular, web apps in tabs are logged as part of Chrome browser.
apps::AppTypeName GetAppTypeNameForWebAppWindow(Profile* profile,
const std::string& app_id,
aura::Window* window) {
if (IsBrowser(window)) {
return apps::AppTypeName::kChromeBrowser;
}
if (GetAppTypeNameForWebApp(
profile, app_id,
apps::mojom::LaunchContainer::kLaunchContainerNone) ==
apps::AppTypeName::kSystemWeb) {
return apps::AppTypeName::kSystemWeb;
}
return apps::AppTypeName::kWeb;
}
// Returns AppTypeName used for app running metrics.
apps::AppTypeName GetAppTypeNameForWindow(Profile* profile,
apps::mojom::AppType app_type,
const std::string& app_id,
aura::Window* window) {
switch (app_type) {
case apps::mojom::AppType::kUnknown:
return apps::AppTypeName::kUnknown;
case apps::mojom::AppType::kArc:
return apps::AppTypeName::kArc;
case apps::mojom::AppType::kBuiltIn:
return apps::AppTypeName::kBuiltIn;
case apps::mojom::AppType::kCrostini:
return apps::AppTypeName::kCrostini;
case apps::mojom::AppType::kExtension:
return IsBrowser(window) ? apps::AppTypeName::kChromeBrowser
: apps::AppTypeName::kChromeApp;
case apps::mojom::AppType::kWeb:
return GetAppTypeNameForWebAppWindow(profile, app_id, window);
case apps::mojom::AppType::kMacOs:
return apps::AppTypeName::kMacOs;
case apps::mojom::AppType::kPluginVm:
return apps::AppTypeName::kPluginVm;
case apps::mojom::AppType::kStandaloneBrowser:
return apps::AppTypeName::kStandaloneBrowser;
case apps::mojom::AppType::kRemote:
return apps::AppTypeName::kRemote;
case apps::mojom::AppType::kBorealis:
return apps::AppTypeName::kBorealis;
case apps::mojom::AppType::kSystemWeb:
return apps::AppTypeName::kSystemWeb;
case apps::mojom::AppType::kStandaloneBrowserExtension:
return apps::AppTypeName::kStandaloneBrowserExtension;
}
}
// Returns AppTypeNameV2 used for app running metrics.
apps::AppTypeNameV2 GetAppTypeNameV2(Profile* profile,
apps::mojom::AppType app_type,
const std::string& app_id,
aura::Window* window) {
switch (app_type) {
case apps::mojom::AppType::kUnknown:
return apps::AppTypeNameV2::kUnknown;
case apps::mojom::AppType::kArc:
return apps::AppTypeNameV2::kArc;
case apps::mojom::AppType::kBuiltIn:
return apps::AppTypeNameV2::kBuiltIn;
case apps::mojom::AppType::kCrostini:
return apps::AppTypeNameV2::kCrostini;
case apps::mojom::AppType::kExtension:
return IsBrowser(window) ? apps::AppTypeNameV2::kChromeAppTab
: apps::AppTypeNameV2::kChromeAppWindow;
case apps::mojom::AppType::kWeb: {
apps::AppTypeName app_type_name =
GetAppTypeNameForWebAppWindow(profile, app_id, window);
if (app_type_name == apps::AppTypeName::kChromeBrowser) {
return apps::AppTypeNameV2::kWebTab;
} else if (app_type_name == apps::AppTypeName::kSystemWeb) {
return apps::AppTypeNameV2::kSystemWeb;
} else {
return apps::AppTypeNameV2::kWebWindow;
}
}
case apps::mojom::AppType::kMacOs:
return apps::AppTypeNameV2::kMacOs;
case apps::mojom::AppType::kPluginVm:
return apps::AppTypeNameV2::kPluginVm;
case apps::mojom::AppType::kStandaloneBrowser:
return apps::AppTypeNameV2::kStandaloneBrowser;
case apps::mojom::AppType::kRemote:
return apps::AppTypeNameV2::kRemote;
case apps::mojom::AppType::kBorealis:
return apps::AppTypeNameV2::kBorealis;
case apps::mojom::AppType::kSystemWeb:
return apps::AppTypeNameV2::kSystemWeb;
case apps::mojom::AppType::kStandaloneBrowserExtension:
return apps::AppTypeNameV2::kStandaloneBrowserExtension;
}
}
// Records the number of times Chrome OS apps are launched grouped by the launch
// source.
void RecordAppLaunchSource(apps::mojom::LaunchSource launch_source) {
base::UmaHistogramEnumeration("Apps.AppLaunchSource", launch_source);
}
// Records the number of times Chrome OS apps are launched grouped by the app
// type.
void RecordAppLaunchPerAppType(apps::AppTypeName app_type_name) {
if (app_type_name == apps::AppTypeName::kUnknown) {
return;
}
base::UmaHistogramEnumeration("Apps.AppLaunchPerAppType", app_type_name);
}
// Due to the privacy limitation, only ARC apps, Chrome apps and web apps(PWA),
// system web apps and builtin apps are recorded because they are synced to
// server/cloud, or part of OS. Other app types, e.g. Crostini, remote apps,
// etc, are not recorded. So returns true if the app_type_name is allowed to
// record UKM. Otherwise, returns false.
//
// See DD: go/app-platform-metrics-using-ukm for details.
bool ShouldRecordUkmForAppTypeName(apps::AppTypeName app_type_name) {
switch (app_type_name) {
case apps::AppTypeName::kArc:
case apps::AppTypeName::kBuiltIn:
case apps::AppTypeName::kChromeApp:
case apps::AppTypeName::kChromeBrowser:
case apps::AppTypeName::kWeb:
case apps::AppTypeName::kSystemWeb:
return true;
case apps::AppTypeName::kUnknown:
case apps::AppTypeName::kCrostini:
case apps::AppTypeName::kMacOs:
case apps::AppTypeName::kPluginVm:
case apps::AppTypeName::kStandaloneBrowser:
case apps::AppTypeName::kStandaloneBrowserExtension:
case apps::AppTypeName::kRemote:
case apps::AppTypeName::kBorealis:
return false;
}
}
int GetUserTypeByDeviceTypeMetrics() {
const user_manager::User* primary_user =
user_manager::UserManager::Get()->GetPrimaryUser();
DCHECK(primary_user);
DCHECK(primary_user->is_profile_created());
Profile* profile =
chromeos::ProfileHelper::Get()->GetProfileByUser(primary_user);
DCHECK(profile);
UserTypeByDeviceTypeMetricsProvider::UserSegment user_segment =
UserTypeByDeviceTypeMetricsProvider::GetUserSegment(profile);
policy::BrowserPolicyConnectorAsh* connector =
g_browser_process->platform_part()->browser_policy_connector_ash();
policy::MarketSegment device_segment =
connector->GetEnterpriseMarketSegment();
return UserTypeByDeviceTypeMetricsProvider::ConstructUmaValue(user_segment,
device_segment);
}
} // namespace
namespace apps {
constexpr char kAppRunningDuration[] =
"app_platform_metrics.app_running_duration";
constexpr char kAppActivatedCount[] =
"app_platform_metrics.app_activated_count";
constexpr char kArcHistogramName[] = "Arc";
constexpr char kBuiltInHistogramName[] = "BuiltIn";
constexpr char kCrostiniHistogramName[] = "Crostini";
constexpr char kChromeAppHistogramName[] = "ChromeApp";
constexpr char kWebAppHistogramName[] = "WebApp";
constexpr char kMacOsHistogramName[] = "MacOs";
constexpr char kPluginVmHistogramName[] = "PluginVm";
constexpr char kStandaloneBrowserHistogramName[] = "StandaloneBrowser";
constexpr char kRemoteHistogramName[] = "RemoteApp";
constexpr char kBorealisHistogramName[] = "Borealis";
constexpr char kSystemWebAppHistogramName[] = "SystemWebApp";
constexpr char kChromeBrowserHistogramName[] = "ChromeBrowser";
constexpr char kStandaloneBrowserExtensionHistogramName[] =
"StandaloneBrowserExtension";
constexpr char kChromeAppTabHistogramName[] = "ChromeAppTab";
constexpr char kChromeAppWindowHistogramName[] = "ChromeAppWindow";
constexpr char kWebAppTabHistogramName[] = "WebAppTab";
constexpr char kWebAppWindowHistogramName[] = "WebAppWindow";
std::string GetAppTypeHistogramName(apps::AppTypeName app_type_name) {
switch (app_type_name) {
case apps::AppTypeName::kUnknown:
return std::string();
case apps::AppTypeName::kArc:
return kArcHistogramName;
case apps::AppTypeName::kBuiltIn:
return kBuiltInHistogramName;
case apps::AppTypeName::kCrostini:
return kCrostiniHistogramName;
case apps::AppTypeName::kChromeApp:
return kChromeAppHistogramName;
case apps::AppTypeName::kWeb:
return kWebAppHistogramName;
case apps::AppTypeName::kMacOs:
return kMacOsHistogramName;
case apps::AppTypeName::kPluginVm:
return kPluginVmHistogramName;
case apps::AppTypeName::kStandaloneBrowser:
return kStandaloneBrowserHistogramName;
case apps::AppTypeName::kRemote:
return kRemoteHistogramName;
case apps::AppTypeName::kBorealis:
return kBorealisHistogramName;
case apps::AppTypeName::kSystemWeb:
return kSystemWebAppHistogramName;
case apps::AppTypeName::kChromeBrowser:
return kChromeBrowserHistogramName;
case apps::AppTypeName::kStandaloneBrowserExtension:
return kStandaloneBrowserExtensionHistogramName;
}
}
std::string GetAppTypeHistogramNameV2(apps::AppTypeNameV2 app_type_name) {
switch (app_type_name) {
case apps::AppTypeNameV2::kUnknown:
return std::string();
case apps::AppTypeNameV2::kArc:
return kArcHistogramName;
case apps::AppTypeNameV2::kBuiltIn:
return kBuiltInHistogramName;
case apps::AppTypeNameV2::kCrostini:
return kCrostiniHistogramName;
case apps::AppTypeNameV2::kChromeAppWindow:
return kChromeAppWindowHistogramName;
case apps::AppTypeNameV2::kChromeAppTab:
return kChromeAppTabHistogramName;
case apps::AppTypeNameV2::kWebWindow:
return kWebAppWindowHistogramName;
case apps::AppTypeNameV2::kWebTab:
return kWebAppTabHistogramName;
case apps::AppTypeNameV2::kMacOs:
return kMacOsHistogramName;
case apps::AppTypeNameV2::kPluginVm:
return kPluginVmHistogramName;
case apps::AppTypeNameV2::kStandaloneBrowser:
return kStandaloneBrowserHistogramName;
case apps::AppTypeNameV2::kRemote:
return kRemoteHistogramName;
case apps::AppTypeNameV2::kBorealis:
return kBorealisHistogramName;
case apps::AppTypeNameV2::kSystemWeb:
return kSystemWebAppHistogramName;
case apps::AppTypeNameV2::kChromeBrowser:
return kChromeBrowserHistogramName;
case apps::AppTypeNameV2::kStandaloneBrowserExtension:
return kStandaloneBrowserExtensionHistogramName;
}
}
const std::set<apps::AppTypeName>& GetAppTypeNameSet() {
return ::GetAppTypeNameSet();
}
apps::AppTypeName GetAppTypeName(Profile* profile,
apps::mojom::AppType app_type,
const std::string& app_id,
apps::mojom::LaunchContainer container) {
switch (app_type) {
case apps::mojom::AppType::kUnknown:
return apps::AppTypeName::kUnknown;
case apps::mojom::AppType::kArc:
return apps::AppTypeName::kArc;
case apps::mojom::AppType::kBuiltIn:
return apps::AppTypeName::kBuiltIn;
case apps::mojom::AppType::kCrostini:
return apps::AppTypeName::kCrostini;
case apps::mojom::AppType::kExtension:
return GetAppTypeNameForChromeApp(profile, app_id, container);
case apps::mojom::AppType::kWeb:
return GetAppTypeNameForWebApp(profile, app_id, container);
case apps::mojom::AppType::kMacOs:
return apps::AppTypeName::kMacOs;
case apps::mojom::AppType::kPluginVm:
return apps::AppTypeName::kPluginVm;
case apps::mojom::AppType::kStandaloneBrowser:
return apps::AppTypeName::kStandaloneBrowser;
case apps::mojom::AppType::kRemote:
return apps::AppTypeName::kRemote;
case apps::mojom::AppType::kBorealis:
return apps::AppTypeName::kBorealis;
case apps::mojom::AppType::kSystemWeb:
return apps::AppTypeName::kSystemWeb;
case apps::mojom::AppType::kStandaloneBrowserExtension:
return apps::AppTypeName::kStandaloneBrowserExtension;
}
}
void RecordAppLaunchMetrics(Profile* profile,
apps::mojom::AppType app_type,
const std::string& app_id,
apps::mojom::LaunchSource launch_source,
apps::mojom::LaunchContainer container) {
if (app_type == apps::mojom::AppType::kUnknown) {
return;
}
RecordAppLaunchSource(launch_source);
RecordAppLaunchPerAppType(
GetAppTypeName(profile, app_type, app_id, container));
auto* proxy = apps::AppServiceProxyFactory::GetForProfile(profile);
if (proxy && proxy->AppPlatformMetrics()) {
proxy->AppPlatformMetrics()->RecordAppLaunchUkm(app_type, app_id,
launch_source, container);
}
}
AppPlatformMetrics::BrowserToTab::BrowserToTab(
const Instance::InstanceKey& browser_key,
const Instance::InstanceKey& tab_key)
: browser_key(Instance::InstanceKey(browser_key)),
tab_key(Instance::InstanceKey(tab_key)) {}
AppPlatformMetrics::AppPlatformMetrics(
Profile* profile,
apps::AppRegistryCache& app_registry_cache,
InstanceRegistry& instance_registry)
: profile_(profile), app_registry_cache_(app_registry_cache) {
apps::AppRegistryCache::Observer::Observe(&app_registry_cache);
apps::InstanceRegistry::Observer::Observe(&instance_registry);
user_type_by_device_type_ = GetUserTypeByDeviceTypeMetrics();
InitRunningDuration();
}
AppPlatformMetrics::~AppPlatformMetrics() {
for (auto it : running_start_time_) {
running_duration_[it.second.app_type_name] +=
base::TimeTicks::Now() - it.second.start_time;
}
OnTenMinutes();
RecordAppsUsageTime();
}
// static
std::string AppPlatformMetrics::GetAppsCountHistogramNameForTest(
AppTypeName app_type_name) {
return kAppsCountHistogramPrefix + GetAppTypeHistogramName(app_type_name);
}
// static
std::string
AppPlatformMetrics::GetAppsCountPerInstallSourceHistogramNameForTest(
AppTypeName app_type_name,
apps::mojom::InstallSource install_source) {
return kAppsCountPerInstallSourceHistogramPrefix +
GetAppTypeHistogramName(app_type_name) + "." +
GetInstallSource(install_source);
}
// static
std::string AppPlatformMetrics::GetAppsRunningDurationHistogramNameForTest(
AppTypeName app_type_name) {
return kAppsRunningDurationHistogramPrefix +
GetAppTypeHistogramName(app_type_name);
}
// static
std::string AppPlatformMetrics::GetAppsRunningPercentageHistogramNameForTest(
AppTypeName app_type_name) {
return kAppsRunningPercentageHistogramPrefix +
GetAppTypeHistogramName(app_type_name);
}
// static
std::string AppPlatformMetrics::GetAppsActivatedCountHistogramNameForTest(
AppTypeName app_type_name) {
return kAppsActivatedCountHistogramPrefix +
GetAppTypeHistogramName(app_type_name);
}
std::string AppPlatformMetrics::GetAppsUsageTimeHistogramNameForTest(
AppTypeName app_type_name) {
return kAppsUsageTimeHistogramPrefix + GetAppTypeHistogramName(app_type_name);
}
std::string AppPlatformMetrics::GetAppsUsageTimeHistogramNameForTest(
AppTypeNameV2 app_type_name) {
return kAppsUsageTimeHistogramPrefix +
GetAppTypeHistogramNameV2(app_type_name);
}
void AppPlatformMetrics::OnNewDay() {
should_record_metrics_on_new_day_ = true;
RecordAppsCount(apps::mojom::AppType::kUnknown);
RecordAppsRunningDuration();
}
void AppPlatformMetrics::OnTenMinutes() {
if (should_refresh_activated_count_pref) {
should_refresh_activated_count_pref = false;
DictionaryPrefUpdate activated_count_update(profile_->GetPrefs(),
kAppActivatedCount);
for (auto it : activated_count_) {
std::string app_type_name = GetAppTypeHistogramName(it.first);
DCHECK(!app_type_name.empty());
activated_count_update->SetIntKey(app_type_name, it.second);
}
}
if (should_refresh_duration_pref) {
should_refresh_duration_pref = false;
DictionaryPrefUpdate running_duration_update(profile_->GetPrefs(),
kAppRunningDuration);
for (auto it : running_duration_) {
std::string app_type_name = GetAppTypeHistogramName(it.first);
DCHECK(!app_type_name.empty());
running_duration_update->SetPath(app_type_name,
base::TimeDeltaToValue(it.second));
}
}
}
void AppPlatformMetrics::OnFiveMinutes() {
RecordAppsUsageTime();
}
void AppPlatformMetrics::RecordAppLaunchUkm(
apps::mojom::AppType app_type,
const std::string& app_id,
apps::mojom::LaunchSource launch_source,
apps::mojom::LaunchContainer container) {
if (app_type == apps::mojom::AppType::kUnknown || !ShouldRecordUkm()) {
return;
}
apps::AppTypeName app_type_name =
GetAppTypeName(profile_, app_type, app_id, container);
if (!ShouldRecordUkmForAppTypeName(app_type_name)) {
return;
}
ukm::SourceId source_id = GetSourceId(app_id);
if (source_id == ukm::kInvalidSourceId) {
return;
}
ukm::builders::ChromeOSApp_Launch builder(source_id);
builder.SetAppType((int)app_type_name)
.SetLaunchSource((int)launch_source)
.SetUserDeviceMatrix(GetUserTypeByDeviceTypeMetrics())
.Record(ukm::UkmRecorder::Get());
ukm::AppSourceUrlRecorder::MarkSourceForDeletion(source_id);
}
void AppPlatformMetrics::RecordAppUninstallUkm(
apps::mojom::AppType app_type,
const std::string& app_id,
apps::mojom::UninstallSource uninstall_source) {
AppTypeName app_type_name =
GetAppTypeName(profile_, app_type, app_id,
apps::mojom::LaunchContainer::kLaunchContainerNone);
if (!ShouldRecordUkmForAppTypeName(app_type_name)) {
return;
}
ukm::SourceId source_id = GetSourceId(app_id);
if (source_id == ukm::kInvalidSourceId) {
return;
}
ukm::builders::ChromeOSApp_UninstallApp builder(source_id);
builder.SetAppType((int)app_type_name)
.SetUninstallSource((int)uninstall_source)
.SetUserDeviceMatrix(user_type_by_device_type_)
.Record(ukm::UkmRecorder::Get());
ukm::AppSourceUrlRecorder::MarkSourceForDeletion(source_id);
}
void AppPlatformMetrics::OnAppTypeInitialized(apps::mojom::AppType app_type) {
if (should_record_metrics_on_new_day_) {
RecordAppsCount(app_type);
}
initialized_app_types.insert(app_type);
}
void AppPlatformMetrics::OnAppRegistryCacheWillBeDestroyed(
apps::AppRegistryCache* cache) {
apps::AppRegistryCache::Observer::Observe(nullptr);
}
void AppPlatformMetrics::OnAppUpdate(const apps::AppUpdate& update) {
if (!ShouldRecordUkm()) {
return;
}
if (!update.ReadinessChanged() ||
update.Readiness() != apps::mojom::Readiness::kReady) {
return;
}
if (update.AppId() == extension_misc::kFilesManagerAppId ||
update.AppId() == arc::kPlayStoreAppId ||
update.AppId() == arc::kAndroidContactsAppId) {
RecordAppReadinessStatus(update);
}
InstallTime install_time =
base::Contains(initialized_app_types, update.AppType())
? InstallTime::kRunning
: InstallTime::kInit;
RecordAppsInstallUkm(update, install_time);
}
void AppPlatformMetrics::OnInstanceUpdate(const apps::InstanceUpdate& update) {
if (!update.StateChanged()) {
return;
}
auto app_id = update.AppId();
auto app_type = app_registry_cache_.GetAppType(app_id);
if (app_type == apps::mojom::AppType::kUnknown) {
return;
}
bool is_active = update.State() & apps::InstanceState::kActive;
if (is_active) {
auto* window = update.InstanceKey().GetEnclosingAppWindow();
AppTypeName app_type_name =
GetAppTypeNameForWindow(profile_, app_type, app_id, window);
if (app_type_name == apps::AppTypeName::kUnknown) {
return;
}
apps::InstanceState kInActivated = static_cast<apps::InstanceState>(
apps::InstanceState::kVisible | apps::InstanceState::kRunning);
// For the browser window, if a tab of the browser is activated, we don't
// need to calculate the browser window running time.
if (app_id == extension_misc::kChromeAppId &&
HasActivatedTab(update.InstanceKey())) {
SetWindowInActivated(app_id, update.InstanceKey(), kInActivated);
return;
}
// For web apps open in tabs, set the top browser window as inactive to stop
// calculating the browser window running time.
if (IsAppOpenedInTab(app_type_name, app_id)) {
RemoveActivatedTab(update.InstanceKey());
auto browser_key = Instance::InstanceKey::ForWindowBasedApp(window);
AddActivatedTab(browser_key, update.InstanceKey());
SetWindowInActivated(extension_misc::kChromeAppId, browser_key,
kInActivated);
}
AppTypeNameV2 app_type_name_v2 =
GetAppTypeNameV2(profile_, app_type, app_id, window);
SetWindowActivated(app_type, app_type_name, app_type_name_v2, app_id,
update.InstanceKey());
return;
}
AppTypeName app_type_name = AppTypeName::kUnknown;
auto it = running_start_time_.find(update.InstanceKey());
if (it != running_start_time_.end()) {
app_type_name = it->second.app_type_name;
}
if (IsAppOpenedInTab(app_type_name, app_id)) {
UpdateBrowserWindowStatus(update.InstanceKey());
}
SetWindowInActivated(app_id, update.InstanceKey(), update.State());
}
void AppPlatformMetrics::OnInstanceRegistryWillBeDestroyed(
apps::InstanceRegistry* cache) {
apps::InstanceRegistry::Observer::Observe(nullptr);
}
void AppPlatformMetrics::UpdateBrowserWindowStatus(
const Instance::InstanceKey& tab_key) {
auto* browser_window = GetBrowserWindow(tab_key);
if (!browser_window) {
return;
}
// Remove `instance_key` from `active_browser_to_tabs_`.
RemoveActivatedTab(tab_key);
// If there are other activated web app tab, we don't need to set the browser
// window as activated.
auto browser_key = Instance::InstanceKey::ForWindowBasedApp(browser_window);
if (HasActivatedTab(browser_key)) {
return;
}
auto* proxy = apps::AppServiceProxyFactory::GetForProfile(profile_);
DCHECK(proxy);
auto state = proxy->InstanceRegistry().GetState(browser_key);
if (state & InstanceState::kActive) {
// The browser window is activated, start calculating the browser window
// running time.
SetWindowActivated(apps::mojom::AppType::kExtension,
AppTypeName::kChromeBrowser,
AppTypeNameV2::kChromeBrowser,
extension_misc::kChromeAppId, browser_key);
}
}
bool AppPlatformMetrics::HasActivatedTab(
const Instance::InstanceKey& browser_key) {
for (const auto& it : active_browsers_to_tabs_) {
if (it.browser_key == browser_key) {
return true;
}
}
return false;
}
aura::Window* AppPlatformMetrics::GetBrowserWindow(
const Instance::InstanceKey& tab_key) const {
for (const auto& it : active_browsers_to_tabs_) {
if (it.tab_key == tab_key) {
return it.browser_key.GetEnclosingAppWindow();
}
}
return nullptr;
}
void AppPlatformMetrics::AddActivatedTab(
const Instance::InstanceKey& browser_key,
const Instance::InstanceKey& tab_key) {
bool found = false;
for (const auto& it : active_browsers_to_tabs_) {
if (it.browser_key == browser_key && it.tab_key == tab_key) {
found = true;
break;
}
}
if (!found) {
active_browsers_to_tabs_.push_back(BrowserToTab(browser_key, tab_key));
}
}
void AppPlatformMetrics::RemoveActivatedTab(
const Instance::InstanceKey& tab_key) {
active_browsers_to_tabs_.remove_if(
[&tab_key](const BrowserToTab& item) { return item.tab_key == tab_key; });
}
void AppPlatformMetrics::SetWindowActivated(
apps::mojom::AppType app_type,
AppTypeName app_type_name,
AppTypeNameV2 app_type_name_v2,
const std::string& app_id,
const apps::Instance::InstanceKey& instance_key) {
auto it = running_start_time_.find(instance_key);
if (it != running_start_time_.end()) {
return;
}
running_start_time_[instance_key].start_time = base::TimeTicks::Now();
running_start_time_[instance_key].app_type_name = app_type_name;
running_start_time_[instance_key].app_type_name_v2 = app_type_name_v2;
++activated_count_[app_type_name];
should_refresh_activated_count_pref = true;
start_time_per_five_minutes_[instance_key].start_time =
base::TimeTicks::Now();
start_time_per_five_minutes_[instance_key].app_type_name = app_type_name;
start_time_per_five_minutes_[instance_key].app_type_name_v2 =
app_type_name_v2;
start_time_per_five_minutes_[instance_key].app_id = app_id;
}
void AppPlatformMetrics::SetWindowInActivated(
const std::string& app_id,
const apps::Instance::InstanceKey& instance_key,
apps::InstanceState state) {
bool is_close = state & apps::InstanceState::kDestroyed;
auto usage_time_it = usage_time_per_five_minutes_.find(instance_key);
if (is_close && usage_time_it != usage_time_per_five_minutes_.end()) {
usage_time_it->second.window_is_closed = true;
}
auto it = running_start_time_.find(instance_key);
if (it == running_start_time_.end()) {
return;
}
AppTypeName app_type_name = it->second.app_type_name;
AppTypeNameV2 app_type_name_v2 = it->second.app_type_name_v2;
if (usage_time_it == usage_time_per_five_minutes_.end()) {
usage_time_per_five_minutes_[it->first].source_id = GetSourceId(app_id);
usage_time_it = usage_time_per_five_minutes_.find(it->first);
}
usage_time_it->second.app_type_name = app_type_name;
running_duration_[app_type_name] +=
base::TimeTicks::Now() - it->second.start_time;
base::TimeDelta running_time =
base::TimeTicks::Now() -
start_time_per_five_minutes_[instance_key].start_time;
app_type_running_time_per_five_minutes_[app_type_name] += running_time;
app_type_v2_running_time_per_five_minutes_[app_type_name_v2] += running_time;
usage_time_it->second.running_time += running_time;
running_start_time_.erase(it);
start_time_per_five_minutes_.erase(instance_key);
should_refresh_duration_pref = true;
}
void AppPlatformMetrics::InitRunningDuration() {
DictionaryPrefUpdate running_duration_update(profile_->GetPrefs(),
kAppRunningDuration);
DictionaryPrefUpdate activated_count_update(profile_->GetPrefs(),
kAppActivatedCount);
for (auto app_type_name : GetAppTypeNameSet()) {
std::string key = GetAppTypeHistogramName(app_type_name);
if (key.empty()) {
continue;
}
absl::optional<base::TimeDelta> unreported_duration =
base::ValueToTimeDelta(running_duration_update->FindPath(key));
if (unreported_duration.has_value()) {
running_duration_[app_type_name] = unreported_duration.value();
}
absl::optional<int> count = activated_count_update->FindIntPath(key);
if (count.has_value()) {
activated_count_[app_type_name] = count.value();
}
}
}
void AppPlatformMetrics::ClearRunningDuration() {
running_duration_.clear();
activated_count_.clear();
DictionaryPrefUpdate running_duration_update(profile_->GetPrefs(),
kAppRunningDuration);
running_duration_update->Clear();
DictionaryPrefUpdate activated_count_update(profile_->GetPrefs(),
kAppActivatedCount);
activated_count_update->Clear();
}
void AppPlatformMetrics::RecordAppsCount(apps::mojom::AppType app_type) {
std::map<AppTypeName, int> app_count;
std::map<AppTypeName, std::map<apps::mojom::InstallSource, int>>
app_count_per_install_source;
app_registry_cache_.ForEachApp(
[app_type, this, &app_count,
&app_count_per_install_source](const apps::AppUpdate& update) {
if (app_type != apps::mojom::AppType::kUnknown &&
(update.AppType() != app_type ||
update.AppId() == extension_misc::kChromeAppId)) {
return;
}
AppTypeName app_type_name =
GetAppTypeName(profile_, update.AppType(), update.AppId(),
apps::mojom::LaunchContainer::kLaunchContainerNone);
if (app_type_name == AppTypeName::kChromeBrowser ||
app_type_name == AppTypeName::kUnknown) {
return;
}
++app_count[app_type_name];
++app_count_per_install_source[app_type_name][update.InstallSource()];
});
for (auto it : app_count) {
std::string histogram_name = GetAppTypeHistogramName(it.first);
if (!histogram_name.empty() &&
histogram_name != kChromeBrowserHistogramName) {
// If there are more than a thousand apps installed, then that count is
// going into an overflow bucket. We don't expect this scenario to happen
// often.
base::UmaHistogramCounts1000(kAppsCountHistogramPrefix + histogram_name,
it.second);
for (auto install_source_it : app_count_per_install_source[it.first]) {
base::UmaHistogramCounts1000(
kAppsCountPerInstallSourceHistogramPrefix + histogram_name + "." +
GetInstallSource(install_source_it.first),
install_source_it.second);
}
}
}
}
void AppPlatformMetrics::RecordAppsRunningDuration() {
for (auto& it : running_start_time_) {
running_duration_[it.second.app_type_name] +=
base::TimeTicks::Now() - it.second.start_time;
it.second.start_time = base::TimeTicks::Now();
}
base::TimeDelta total_running_duration;
for (auto it : running_duration_) {
base::UmaHistogramCustomTimes(
kAppsRunningDurationHistogramPrefix + GetAppTypeHistogramName(it.first),
it.second, kMinDuration, kMaxDuration, kDurationBuckets);
total_running_duration += it.second;
}
if (!total_running_duration.is_zero()) {
for (auto it : running_duration_) {
base::UmaHistogramPercentage(kAppsRunningPercentageHistogramPrefix +
GetAppTypeHistogramName(it.first),
100 * (it.second / total_running_duration));
}
}
for (auto it : activated_count_) {
base::UmaHistogramCounts10000(
kAppsActivatedCountHistogramPrefix + GetAppTypeHistogramName(it.first),
it.second);
}
ClearRunningDuration();
}
void AppPlatformMetrics::RecordAppsUsageTime() {
for (auto& it : start_time_per_five_minutes_) {
base::TimeDelta running_time =
base::TimeTicks::Now() - it.second.start_time;
app_type_running_time_per_five_minutes_[it.second.app_type_name] +=
running_time;
app_type_v2_running_time_per_five_minutes_[it.second.app_type_name_v2] +=
running_time;
auto usage_time_it = usage_time_per_five_minutes_.find(it.first);
if (usage_time_it == usage_time_per_five_minutes_.end()) {
usage_time_per_five_minutes_[it.first].source_id =
GetSourceId(it.second.app_id);
usage_time_it = usage_time_per_five_minutes_.find(it.first);
}
usage_time_it->second.app_type_name = it.second.app_type_name;
usage_time_it->second.running_time += running_time;
it.second.start_time = base::TimeTicks::Now();
}
for (auto it : app_type_running_time_per_five_minutes_) {
base::UmaHistogramCustomTimes(
kAppsUsageTimeHistogramPrefix + GetAppTypeHistogramName(it.first),
it.second, kMinDuration, kMaxUsageDuration, kUsageTimeBuckets);
}
for (auto it : app_type_v2_running_time_per_five_minutes_) {
base::UmaHistogramCustomTimes(
kAppsUsageTimeHistogramPrefixV2 + GetAppTypeHistogramNameV2(it.first),
it.second, kMinDuration, kMaxUsageDuration, kUsageTimeBuckets);
}
app_type_running_time_per_five_minutes_.clear();
app_type_v2_running_time_per_five_minutes_.clear();
RecordAppsUsageTimeUkm();
}
void AppPlatformMetrics::RecordAppsUsageTimeUkm() {
if (!ShouldRecordUkm()) {
return;
}
std::vector<apps::Instance::InstanceKey> closed_window_instances;
for (auto& it : usage_time_per_five_minutes_) {
apps::AppTypeName app_type_name = it.second.app_type_name;
if (!ShouldRecordUkmForAppTypeName(app_type_name)) {
continue;
}
ukm::SourceId source_id = it.second.source_id;
if (source_id != ukm::kInvalidSourceId &&
!it.second.running_time.is_zero()) {
ukm::builders::ChromeOSApp_UsageTime builder(source_id);
builder.SetAppType((int)app_type_name)
.SetDuration(it.second.running_time.InMilliseconds())
.SetUserDeviceMatrix(user_type_by_device_type_)
.Record(ukm::UkmRecorder::Get());
}
if (it.second.window_is_closed) {
closed_window_instances.push_back(it.first);
ukm::AppSourceUrlRecorder::MarkSourceForDeletion(source_id);
} else {
it.second.running_time = base::TimeDelta();
}
}
for (const auto& closed_instance : closed_window_instances) {
usage_time_per_five_minutes_.erase(closed_instance);
}
}
void AppPlatformMetrics::RecordAppsInstallUkm(const apps::AppUpdate& update,
InstallTime install_time) {
AppTypeName app_type_name =
GetAppTypeName(profile_, update.AppType(), update.AppId(),
apps::mojom::LaunchContainer::kLaunchContainerNone);
if (!ShouldRecordUkmForAppTypeName(app_type_name)) {
return;
}
ukm::SourceId source_id = GetSourceId(update.AppId());
if (source_id == ukm::kInvalidSourceId) {
return;
}
ukm::builders::ChromeOSApp_InstalledApp builder(source_id);
builder.SetAppType((int)app_type_name)
.SetInstallSource((int)update.InstallSource())
.SetInstallTime((int)install_time)
.SetUserDeviceMatrix(user_type_by_device_type_)
.Record(ukm::UkmRecorder::Get());
ukm::AppSourceUrlRecorder::MarkSourceForDeletion(source_id);
}
bool AppPlatformMetrics::ShouldRecordUkm() {
switch (syncer::GetUploadToGoogleState(
SyncServiceFactory::GetForProfile(profile_), syncer::ModelType::APPS)) {
case syncer::UploadState::NOT_ACTIVE:
return false;
case syncer::UploadState::INITIALIZING:
// Note that INITIALIZING is considered good enough, because syncing apps
// is known to be enabled, and transient errors don't really matter here.
case syncer::UploadState::ACTIVE:
return true;
}
}
ukm::SourceId AppPlatformMetrics::GetSourceId(const std::string& app_id) {
ukm::SourceId source_id = ukm::kInvalidSourceId;
apps::mojom::AppType app_type = app_registry_cache_.GetAppType(app_id);
switch (app_type) {
case apps::mojom::AppType::kBuiltIn:
case apps::mojom::AppType::kExtension:
source_id = ukm::AppSourceUrlRecorder::GetSourceIdForChromeApp(app_id);
break;
case apps::mojom::AppType::kArc:
case apps::mojom::AppType::kWeb:
case apps::mojom::AppType::kSystemWeb: {
std::string publisher_id;
app_registry_cache_.ForOneApp(
app_id, [&publisher_id](const apps::AppUpdate& update) {
publisher_id = update.PublisherId();
});
if (publisher_id.empty()) {
return ukm::kInvalidSourceId;
}
if (app_type == apps::mojom::AppType::kArc) {
source_id = ukm::AppSourceUrlRecorder::GetSourceIdForArcPackageName(
publisher_id);
break;
}
source_id =
ukm::AppSourceUrlRecorder::GetSourceIdForPWA(GURL(publisher_id));
break;
}
case apps::mojom::AppType::kUnknown:
case apps::mojom::AppType::kCrostini:
case apps::mojom::AppType::kMacOs:
case apps::mojom::AppType::kPluginVm:
case apps::mojom::AppType::kStandaloneBrowser:
case apps::mojom::AppType::kStandaloneBrowserExtension:
case apps::mojom::AppType::kRemote:
case apps::mojom::AppType::kBorealis:
return ukm::kInvalidSourceId;
}
return source_id;
}
void AppPlatformMetrics::RecordAppReadinessStatus(
const apps::AppUpdate& update) {
std::string histogram_name = kAppPreviousReadinessStatus;
auto readiness = update.PriorReadiness();
if (update.AppId() == extension_misc::kFilesManagerAppId) {
histogram_name += "FileManager";
if (!base::Contains(initialized_app_types,
apps::mojom::AppType::kExtension)) {
readiness = apps::mojom::Readiness::kReady;
}
} else if (update.AppId() == arc::kPlayStoreAppId) {
histogram_name += "PlayStore";
if (!base::Contains(initialized_app_types, apps::mojom::AppType::kArc)) {
readiness = apps::mojom::Readiness::kReady;
}
} else if (update.AppId() == arc::kAndroidContactsAppId) {
histogram_name += "Contacts";
if (!base::Contains(initialized_app_types, apps::mojom::AppType::kArc)) {
readiness = apps::mojom::Readiness::kReady;
}
} else {
return;
}
base::UmaHistogramEnumeration(histogram_name, readiness);
}
} // namespace apps
| [
"chromium-scoped@luci-project-accounts.iam.gserviceaccount.com"
] | chromium-scoped@luci-project-accounts.iam.gserviceaccount.com |
e1ab66a7d8297ce4746e107a41fff60509290186 | 344247a30d3ea1992a4592d05a60c61b2a28363f | /include/game_init.h | a01b46aadaedde1f5e43d5d81a77783d45fc87d7 | [] | no_license | VikBelt/Pong-Clone-Cpp | bb5ce27260f887c6c8280507a6adb389db2e519f | cfee2ec9d9f8a54cee5524a4383418cebad83bda | refs/heads/master | 2022-11-06T10:31:21.344266 | 2020-06-23T21:02:53 | 2020-06-23T21:02:53 | 273,309,776 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,257 | h | #pragma once
#define SDL_MAIN_HANDLED
#include <iostream>
#include <chrono>
#include <SDL.h>
#include <SDL_ttf.h>
namespace Pong
{
constexpr int START_WIDTH{ 900 };
constexpr int START_HEIGHT{ 800 };
bool StartMenu()
{
bool proceed = true;
SDL_Init(SDL_INIT_EVERYTHING);
TTF_Init();
SDL_Window* swindow = SDL_CreateWindow("START MENU", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, START_WIDTH, START_HEIGHT, SDL_WINDOW_RESIZABLE);
SDL_Renderer* srenderer = SDL_CreateRenderer(swindow, -1, 0);
//Welcome Text
TTF_Font* font = TTF_OpenFont("ostrich-regular.ttf", 30);
SDL_Color White = { 255,255,255 };
SDL_Surface* surface = TTF_RenderText_Solid(font, "Welcome to HD Pong!", White);
SDL_Texture* message = SDL_CreateTextureFromSurface(srenderer, surface);
SDL_Rect textbox{};
textbox.x = 0;
textbox.y = 100;
textbox.w = 900;
textbox.h = 200;
//Credits test
SDL_Surface* credit_surf = TTF_RenderText_Solid(font, "Created with C++ by Vikram Belthur", White);
SDL_Texture* credit = SDL_CreateTextureFromSurface(srenderer, credit_surf);
SDL_Rect creditbox{};
creditbox.x = 50;
creditbox.y = 350;
creditbox.w = 800;
creditbox.h = 80;
SDL_SetRenderDrawColor(srenderer, 0, 0, 128, 0); //window background
SDL_RenderClear(srenderer);
SDL_RenderPresent(srenderer);
//Show Welcome Text
SDL_RenderCopy(srenderer, message, nullptr, &textbox);
SDL_RenderCopy(srenderer, credit, nullptr, &creditbox);
SDL_RenderPresent(srenderer);
bool running = true;
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_INFORMATION, "What do you want to do?", "Press G to proceed to the HD-PONG, or Q to exit", swindow);
while (running) {
SDL_Event event;
while (SDL_PollEvent(&event)) {
if (event.type == SDL_KEYDOWN) {
if (event.key.keysym.sym == SDLK_q) {
proceed = false;
running = false;
}
else if (event.key.keysym.sym == SDLK_g) {
proceed = true;
running = false;
}
}
}
}
//cleanup
SDL_DestroyRenderer(srenderer);
SDL_DestroyTexture(message);
SDL_FreeSurface(surface);
SDL_FreeSurface(credit_surf);
SDL_DestroyWindow(swindow);
TTF_CloseFont(font);
TTF_Quit();
SDL_Quit();
return proceed;
}
} //namespace Pong
| [
"noreply@github.com"
] | VikBelt.noreply@github.com |
6c117243c008efcf50ac7d9457f1a5fd2d00c783 | d1a7ec8df100d717f196bead369e8f72713476ff | /reserva/Reserva.cpp | ec5c495a15cfc0ed535a004ac9c5731a31c6b931 | [] | no_license | rosalia00/deustoparking | 7ff1964035e13fa493a914442951e030754f21b3 | 4e31a12737ec504906f9ce72dfabd672d223be15 | refs/heads/main | 2023-05-12T19:07:46.415955 | 2021-06-05T16:36:17 | 2021-06-05T16:36:17 | 352,308,789 | 1 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 1,975 | cpp | #include <iostream>
#include "Reserva.h"
using namespace std;
Reserva::Reserva() {
this->nombre = '\0';
this->apellido = '\0';
this->bono = 0;
this->datafin = '\0';
this->datainicio = '\0';
this->dni = '\0';
this->horainicio = 0;
this->horafinal = 0;
this->matricula = '\0';
this->plaza = '\0';
this->precio = 0.0;
this->tarjeta = 0;
}
const char* Reserva::getDni() {
return this->dni;
}
char* Reserva::getNombre() {
return this->nombre;
}
char* Reserva::getApellido() {
return this->apellido;
}
int Reserva::getTarjeta() {
return this->tarjeta;
}
int Reserva::getHorainicio() {
return this->horainicio;
}
int Reserva::getHorafinal() {
return this->horafinal;
}
char* Reserva::getDatainicio() {
return this->datainicio;
}
char* Reserva::getDatafin() {
return this->datafin;
}
float Reserva::getPrecio() {
return this->precio;
}
int Reserva::getBono() {
return this->bono;
}
char* Reserva::getMatricula() {
return this->matricula;
}
int Reserva::getPlaza() {
return this->plaza;
}
void Reserva::setDni(const char *dni) {
this->dni = dni;
}
void Reserva::setNombre(char *nombre) {
this->nombre = nombre;
}
void Reserva::setApellido(char *apellido) {
this->apellido = apellido;
}
void Reserva::setTarjeta(int tarjeta) {
this->tarjeta = tarjeta;
}
void Reserva::setHorainicio(int horainicio) {
this->horainicio = horainicio;
}
void Reserva::setHorafin(int horafin) {
this->horafinal = horafin;
}
void Reserva::setDatainicio(char *datainicio) {
this->datainicio = datainicio;
}
void Reserva::setDatafin(char *datafin) {
this->datafin = datafin;
}
void Reserva::setPrecio(float precio) {
this->precio = precio;
}
void Reserva::setBono(int bono) {
this->bono = bono;
}
void Reserva::setMatricula(char *matricula) {
this->matricula = matricula;
}
void Reserva::setPlaza(int plaza) {
this->plaza = plaza;
}
| [
"tylerdemier@opendeusto.es"
] | tylerdemier@opendeusto.es |
80d6e6e0db9185f9e1587ff7a70fedfee45397e2 | 53cab9b585bcf81ba350e0148e268df077385fea | /UnitTestApp1/UnitTestApp1/util/Rotation2D.cpp | 59b19f3784801f9d1f03b31d2ed48d0a751e854e | [] | no_license | Frc2481/frc-2017 | 99653ec3d260b7533887640f02609f456e3bea0d | 8e37880f7c25d1a56e2c7d30e8b8a5b3a0ea3aad | refs/heads/master | 2021-03-19T08:58:57.360987 | 2017-07-21T23:45:25 | 2017-07-21T23:45:25 | 79,522,810 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,073 | cpp | #include <pch.h>
#include <cmath>
#include <limits>
#include "Rotation2D.h"
Rotation2D::Rotation2D()
{
Rotation2D(0, 1, false);
}
Rotation2D::Rotation2D(double x, double y, bool normalized)
: m_cos(x), m_sin(y) {
if (normalized) {
normalize();
}
}
Rotation2D::Rotation2D(const Rotation2D &other)
: m_cos(other.m_cos), m_sin(other.m_sin) {
}
Rotation2D::~Rotation2D()
{
}
Rotation2D& Rotation2D::operator=(Rotation2D other) {
m_cos = other.m_cos;
m_sin = other.m_sin;
return *this;
}
Rotation2D Rotation2D::fromRadians(double angle_radians) {
return Rotation2D(cos(angle_radians), sin(angle_radians), false);
}
Rotation2D Rotation2D::fromDegrees(double angle_degrees) {
return fromRadians(angle_degrees * (M_PI / 180));
}
void Rotation2D::normalize() {
double magnitude = hypot(m_cos, m_sin);
if (magnitude > kEpsilon) {
m_sin /= magnitude;
m_cos /= magnitude;
}
else {
m_sin = 0;
m_cos = 1;
}
}
void Rotation2D::setCos(double x) {
m_cos = x;
}
void Rotation2D::setSin(double y) {
m_sin = y;
}
double Rotation2D::getCos() const{
return m_cos;
}
double Rotation2D::getSin() const{
return m_sin;
}
double Rotation2D::getTan() const {
if (m_cos < kEpsilon) {
if (m_sin >= 0.0) {
return std::numeric_limits<double>::infinity();
}
else {
return -std::numeric_limits<double>::infinity();
}
}
return m_sin / m_cos;
}
double Rotation2D::getRadians() const{
return atan2(m_sin, m_cos);
}
double Rotation2D::getDegrees() const{
return getRadians() * 180 / M_PI;
}
Rotation2D Rotation2D::rotateBy(const Rotation2D &other)const {
return Rotation2D(m_cos * other.m_cos - m_sin * other.m_sin,
m_cos * other.m_sin + m_sin * other.m_cos, true);
}
Rotation2D Rotation2D::inverse()const {
return Rotation2D(m_cos, -m_sin, false);
}
Rotation2D Rotation2D::interpolate(const Rotation2D &other, double x)const
{
if (x <= 0) {
return Rotation2D(*this);
}
else if (x >= 1) {
return Rotation2D(other);
}
double angle_diff = inverse().rotateBy(other).getRadians();
return this->rotateBy(fromRadians(angle_diff * x));
}
| [
"kyle@team2481.com"
] | kyle@team2481.com |
8b9910e4abc5e4bc681d1fce2cbc72c88d646943 | 1edaa128b372b5894261de722f5161281c9f747c | /GLEANKernel/GLEANLib/Utility Classes/Numeric_utilities.h | d5015ff5d37bdfe9f078f92bf289991c75b32d6f | [
"MIT"
] | permissive | dekieras/GLEANKernel | 204878e82606871164f03dae91bb760cb2e3ad59 | fac01f025b65273be96c5ea677c0ce192c570799 | refs/heads/master | 2021-01-17T08:45:05.673100 | 2016-06-27T20:41:15 | 2016-06-27T20:41:15 | 62,086,577 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,323 | h | #ifndef NUMERIC_UTILITIES_H
#define NUMERIC_UTILITIES_H
#include <string>
// rounds x to an integer value returned in a double
double round_to_integer(double x);
// writes an integer value to a string
std::string int_to_string(int i);
// convert hours, minutes, and seconds to milliseconds (note long integer returned)
long time_convert(long hours, long minutes, long seconds);
// convert milliseconds into hours, minutes, seconds, and milliseconds
void time_convert(long time_ms, int& hours, int& minutes, int& seconds, int& milliseconds);
// convert milliseconds into hours, minutes, and double seconds
void time_convert(long time_ms, int& hours, int& minutes, double& seconds);
// compute the base 2 log of the supplied value
double logb2(double x);
/* Random variable generation */
// Returns a random integer in the range 0 ... range - 1 inclusive
int random_int(int range);
double unit_uniform_random_variable();
double uniform_random_variable(double mean, double deviation);
double unit_normal_random_variable();
double normal_random_variable(double mean, double sd);
double exponential_random_variable(double theta);
double floored_exponential_random_variable(double theta, double floor);
double gamma_random_variable(double theta, int n);
double log_normal_random_variable(double m, double s);
#endif
| [
"kieras@umich.edu"
] | kieras@umich.edu |
c0e7edfde051e5f8086295910b5afddd3cd8088e | 0aa273d9ede80dac001657e78e6c1dc87b4f1572 | /pa2/test_BST (2).cpp | 91be7d02effa57cebc262d61bcf2df38f7c0ce62 | [] | no_license | adj006/CSE_100 | 0f9c60c771b26a6499876cd2e274ddf2db7d03bf | 1ce8b6b2bdd7ea74707e66a99d6ab9cdd3aa8ca6 | refs/heads/master | 2020-09-14T06:16:38.292723 | 2019-11-20T23:33:30 | 2019-11-20T23:33:30 | 223,046,357 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,122 | cpp | #include "BST.hpp"
#include <iostream>
#include <algorithm>
#include <vector>
using std::cout;
using std::endl;
using std::vector;
/**
* A simple test driver for the BST class template.
* P1 CSE 100 2012
* Author: P. Kube (c) 2012
*/
int main() {
/* Create an STL vector of some ints */
vector<int> v;
v.push_back(30);
v.push_back(40);
v.push_back(1);
v.push_back(100);
v.push_back(-33);
v.push_back(15);
v.push_back(7);
v.push_back(39);
v.push_back(101);
v.push_back(80);
/* Create an instance of BST holding int */
BST<int> b;
/* Insert a few data items. */
vector<int>::iterator vit = v.begin();
vector<int>::iterator ven = v.end();
for(; vit != ven; ++vit) {
// all these inserts are unique, so should return true
if(! b.insert(*vit) ) {
cout << "Incorrect return value when inserting " << *vit << endl;
return -1;
}
}
vit = v.begin();
for(; vit != ven; ++vit) {
// all these inserts are duplicates, so should return false
if( b.insert(*vit) ) {
cout << "Incorrect return value when re-inserting " << *vit << endl;
return -1;
}
}
/* Test size. */
cout << "Size is: " << b.size() << endl;
if(b.size() != v.size()) {
cout << "... which is incorrect." << endl;
return -1;
}
/* Test find return value. */
vit = v.begin();
for(; vit != ven; ++vit) {
if(*(b.find(*vit)) != *vit) {
cout << "Incorrect return value when finding " << *vit << endl;
return -1;
}
}
/* Sort the vector, to compare with inorder iteration on the BST */
sort(v.begin(),v.end());
b.inorder();
/* Test BST iterator; should iterate inorder */
cout << "traversal using iterator:" << endl;
vit = v.begin();
BST<int>::iterator en = b.end();
BST<int>::iterator it = b.begin();
for(; vit != ven; ++vit) {
cout << *it << endl;
if(*it != *vit) {
cout << *it << "," << *vit << ": Incorrect inorder iteration of BST." << endl;
return -1;
}
++it;
}
cout << "OK." << endl;
}
| [
"ajim1989@gmail.com"
] | ajim1989@gmail.com |
1ef4019f8bc28244c01594b48e8578062d187377 | a0a6463c41494d16c93b17ad234cf4618154f13c | /src/protocols/ppp/CAuthen.h | a277512695b641c4db8f1bd6610f6c1bcf3ee177 | [
"BSD-3-Clause"
] | permissive | acoderhz/openbras-1 | 2f1f6d95302b9a489b846404f17e800a4e4042ef | cb227f48c5839ec95296c532b177a6639bfbd657 | refs/heads/master | 2021-09-13T06:48:41.247341 | 2018-04-26T05:12:16 | 2018-04-26T05:12:16 | null | 0 | 0 | null | null | null | null | GB18030 | C++ | false | false | 2,087 | h | /***********************************************************************
Copyright (c) 2017, The OpenBRAS project authors. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
* Neither the name of OpenBRAS nor the names of its contributors may
be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
**********************************************************************/
#ifndef CAUTHEN_H
#define CAUTHEN_H
#include "IAuthManager.h"
class IAuthenSvrSink
{
public:
virtual ~IAuthenSvrSink(){};
virtual void SendAuthRequest2AM(Auth_Request &authReq) = 0;
virtual void OnAuthenOutput(unsigned char *packet, size_t size) = 0;
virtual void OnAuthenResult(int result, int protocol) = 0; // result为1表示认证成功,为0表示认证失败。
};
#endif // CAUTHEN_H
| [
"contact@wfnex.com"
] | contact@wfnex.com |
37b8c8c1ef5cbe2cefc49fa90d743a72dfa37827 | f926639250ab2f47d1b35b012c143f1127cc4965 | /legacy/platform/mt6755/v3/hwnode/test/RAW16Node/main.cpp | 13b9361d535bf0d00edd7424e16027d8d304d212 | [] | no_license | cllanjim/stereoCam | 4c5b8f18808c96581ccd14be2593d41de9e0cf35 | e2df856ed1a2c45f6ab8dd52b67d7eae824174cf | refs/heads/master | 2020-03-17T11:26:49.570352 | 2017-03-14T08:48:08 | 2017-03-14T08:48:08 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 23,538 | cpp | /* Copyright Statement:
*
* This software/firmware and related documentation ("MediaTek Software") are
* protected under relevant copyright laws. The information contained herein is
* confidential and proprietary to MediaTek Inc. and/or its licensors. Without
* the prior written permission of MediaTek inc. and/or its licensors, any
* reproduction, modification, use or disclosure of MediaTek Software, and
* information contained herein, in whole or in part, shall be strictly
* prohibited.
*
* MediaTek Inc. (C) 2010. All rights reserved.
*
* BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
* THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
* RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER
* ON AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL
* WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
* WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR
* NONINFRINGEMENT. NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH
* RESPECT TO THE SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY,
* INCORPORATED IN, OR SUPPLIED WITH THE MEDIATEK SOFTWARE, AND RECEIVER AGREES
* TO LOOK ONLY TO SUCH THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO.
* RECEIVER EXPRESSLY ACKNOWLEDGES THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO
* OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES CONTAINED IN MEDIATEK
* SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE
* RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR
* STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S
* ENTIRE AND CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE
* RELEASED HEREUNDER WILL BE, AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE
* MEDIATEK SOFTWARE AT ISSUE, OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE
* CHARGE PAID BY RECEIVER TO MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
*
* The following software/firmware and/or related documentation ("MediaTek
* Software") have been modified by MediaTek Inc. All revisions are subject to
* any receiver's applicable license agreements with MediaTek Inc.
*/
#define LOG_TAG "RAW16NodeTest"
//
#include <mtkcam/Log.h>
//
#include <stdlib.h>
#include <utils/Errors.h>
#include <utils/List.h>
#include <utils/RefBase.h>
//
#include <mtkcam/metadata/client/mtk_metadata_tag.h>
//
#include <mtkcam/v3/pipeline/IPipelineDAG.h>
#include <mtkcam/v3/pipeline/IPipelineNode.h>
#include <mtkcam/v3/pipeline/IPipelineNodeMapControl.h>
#include <mtkcam/v3/pipeline/IPipelineFrameControl.h>
//
#include <mtkcam/v3/utils/streambuf/StreamBufferPool.h>
#include <mtkcam/v3/utils/streambuf/StreamBuffers.h>
#include <mtkcam/v3/utils/streaminfo/MetaStreamInfo.h>
#include <mtkcam/v3/utils/streaminfo/ImageStreamInfo.h>
//
#include <mtkcam/utils/imagebuf/IIonImageBufferHeap.h>
//
#include <mtkcam/hal/IHalSensor.h>
//
#include <mtkcam/v3/hwnode/RAW16Node.h>
using namespace NSCam;
using namespace v3;
using namespace NSCam::v3::Utils;
using namespace android;
/******************************************************************************
*
******************************************************************************/
#define MY_LOGV(fmt, arg...) CAM_LOGV("(%d)[%s] " fmt, ::gettid(), __FUNCTION__, ##arg)
#define MY_LOGD(fmt, arg...) CAM_LOGD("(%d)[%s] " fmt, ::gettid(), __FUNCTION__, ##arg)
#define MY_LOGI(fmt, arg...) CAM_LOGI("(%d)[%s] " fmt, ::gettid(), __FUNCTION__, ##arg)
#define MY_LOGW(fmt, arg...) CAM_LOGW("(%d)[%s] " fmt, ::gettid(), __FUNCTION__, ##arg)
#define MY_LOGE(fmt, arg...) CAM_LOGE("(%d)[%s] " fmt, ::gettid(), __FUNCTION__, ##arg)
//
#define MY_LOGV_IF(cond, ...) do { if ( (cond) ) { MY_LOGV(__VA_ARGS__); } }while(0)
#define MY_LOGD_IF(cond, ...) do { if ( (cond) ) { MY_LOGD(__VA_ARGS__); } }while(0)
#define MY_LOGI_IF(cond, ...) do { if ( (cond) ) { MY_LOGI(__VA_ARGS__); } }while(0)
#define MY_LOGW_IF(cond, ...) do { if ( (cond) ) { MY_LOGW(__VA_ARGS__); } }while(0)
#define MY_LOGE_IF(cond, ...) do { if ( (cond) ) { MY_LOGE(__VA_ARGS__); } }while(0)
//
#define TEST(cond, result) do { if ( (cond) == (result) ) { printf("Pass\n"); } else { printf("Failed\n"); } }while(0)
#define FUNCTION_IN MY_LOGD_IF(1, "+");
/******************************************************************************
*
******************************************************************************/
void help()
{
printf("RAW16Node <test>\n");
}
/******************************************************************************
*
******************************************************************************/
namespace {
enum STREAM_ID{
STREAM_ID_IN = 1,
STREAM_ID_OUT
};
enum NODE_ID{
NODE_ID_NODE1 = 1,
NODE_ID_NODE2,
};
class AppSimulator
: public virtual RefBase
{
};
//
android::sp<AppSimulator> mpAppSimulator;
//
sp<HalImageStreamBuffer::Allocator::StreamBufferPoolT> mpPool_HalImageRAW10;
sp<HalImageStreamBuffer::Allocator::StreamBufferPoolT> mpPool_HalImageRAW16;
//
IHalSensor* mpSensorHalObj;
//
typedef NSCam::v3::Utils::IStreamInfoSetControl IStreamInfoSetControlT;
android::sp<IStreamInfoSetControlT> mpStreamInfoSet;
android::sp<IPipelineNodeMapControl>mpPipelineNodeMap;
android::sp<IPipelineDAG> mpPipelineDAG;
android::sp<RAW16Node> mpNode1;
//remember output stream buffer for dump file
android::sp<HalImageStreamBuffer> mpHalImageStreamBuffer;
//
static int gSensorId = 0;
}; // namespace
/******************************************************************************
*
******************************************************************************/
android::sp<IPipelineNodeMapControl>
getPipelineNodeMapControl()
{
return mpPipelineNodeMap;
}
/******************************************************************************
*
******************************************************************************/
android::sp<IStreamInfoSet>
getStreamInfoSet()
{
return mpStreamInfoSet;
}
/******************************************************************************
*
******************************************************************************/
android::sp<IPipelineNodeMap>
getPipelineNodeMap()
{
return mpPipelineNodeMap;
}
/******************************************************************************
*
******************************************************************************/
android::sp<IPipelineDAG>
getPipelineDAG()
{
return mpPipelineDAG;
}
/******************************************************************************
*
******************************************************************************/
void clear_global_var()
{
//mpPipelineNodeMap = NULL;
//mpStreamInfoSet = NULL;
//mpPipelineDAG = NULL;
//mpPool_HalImageRAW10->uninitPool("Tester");
//mpPool_HalImageRAW10 = NULL;
//mpPool_HalImageRAW16->uninitPool("Tester");
//mpPool_HalImageRAW16 = NULL;
//mpAppSimulator = NULL;
}
/******************************************************************************
*
******************************************************************************/
void prepareSensor()
{
IHalSensorList* const pHalSensorList = IHalSensorList::get();
pHalSensorList->searchSensors();
mpSensorHalObj = pHalSensorList->createSensor("tester", gSensorId);
MUINT32 sensorArray[1] = {(MUINT32)gSensorId};
mpSensorHalObj->powerOn("tester", 1, &sensorArray[0]);
}
/******************************************************************************
*
******************************************************************************/
void closeSensor()
{
MUINT32 sensorArray[1] = {(MUINT32)gSensorId};
mpSensorHalObj->powerOff("tester", 1, &sensorArray[0]);
mpSensorHalObj->destroyInstance("tester");
mpSensorHalObj = NULL;
}
/******************************************************************************
*
******************************************************************************/
void
saveToFile(const char *filename, StreamId_T const streamid)
{
StreamId_T const streamId = streamid;
sp<HalImageStreamBuffer> pStreamBuffer;
//
sp<IImageStreamInfo> pStreamInfo = getStreamInfoSet()->getImageInfoFor(streamId);
//
//acquireFromPool
MY_LOGD("[acquireFromPool] + %s ", pStreamInfo->getStreamName());
MERROR err = mpPool_HalImageRAW16->acquireFromPool(
"Tester", pStreamBuffer, ::s2ns(30)
);
MY_LOGD("[acquireFromPool] - %s %p err:%d", pStreamInfo->getStreamName(), pStreamBuffer.get(), err);
MY_LOGE_IF(OK!=err || pStreamBuffer==0, "pStreamBuffer==0");
sp<IImageBufferHeap> pImageBufferHeap = NULL;
IImageBuffer* pImageBuffer = NULL;
if (pStreamBuffer == NULL) {
MY_LOGE("pStreamBuffer == NULL");
}
pImageBufferHeap = pStreamBuffer->tryReadLock(LOG_TAG);
if (pImageBufferHeap == NULL) {
MY_LOGE("pImageBufferHeap == NULL");
}
pImageBuffer = pImageBufferHeap->createImageBuffer();
if (pImageBuffer == NULL) {
MY_LOGE("rpImageBuffer == NULL");
}
pImageBuffer->lockBuf(LOG_TAG, eBUFFER_USAGE_SW_MASK);
MY_LOGD("@@@fist byte:%x", *(reinterpret_cast<MINT8*>(pImageBuffer->getBufVA(0))));
pImageBuffer->saveToFile(filename);
pImageBuffer->unlockBuf(LOG_TAG);
pStreamBuffer->unlock(LOG_TAG, pImageBufferHeap.get());
}
/******************************************************************************
*
******************************************************************************/
void prepareConfig()
{
printf("prepareConfig + \n");
//
//params.type = P2Node::PASS2_STREAM;
//
mpStreamInfoSet = IStreamInfoSetControl::create();
mpPipelineNodeMap = IPipelineNodeMapControl::create();
mpPipelineDAG = IPipelineDAG::create();
//
//android::Vector<android::sp<IImageStreamInfo> > pvHalImageRaw;
//sp<IMetaStreamInfo> pHalMetaPlatform = 0;
sp<ImageStreamInfo> pHalImageIn = 0;
sp<ImageStreamInfo> pHalImageOut = 0;
printf("create raw10 image buffer\n");
//Image src: raw10
{
StreamId_T const streamId = STREAM_ID_IN;
MSize const imgSize(4176, 3088);//
MINT const format = eImgFmt_BAYER10;
MUINT const usage = eBUFFER_USAGE_SW_MASK;
IImageStreamInfo::BufPlanes_t bufPlanes;
IImageStreamInfo::BufPlane bufPlane;
//
bufPlane.rowStrideInBytes = imgSize.w * 10 / 8;
bufPlane.sizeInBytes = bufPlane.rowStrideInBytes * imgSize.h;
bufPlanes.push_back(bufPlane);
//
sp<ImageStreamInfo>
pStreamInfo = new ImageStreamInfo(
"Hal:Image RAW10",
streamId,
eSTREAMTYPE_IMAGE_INOUT,
1, 1,
usage, format, imgSize, bufPlanes
);
pHalImageIn = pStreamInfo;
//
//
size_t bufStridesInBytes[3] = {0};
size_t bufBoundaryInBytes[3]= {0};
for (size_t i = 0; i < bufPlanes.size(); i++) {
bufStridesInBytes[i] = bufPlanes[i].rowStrideInBytes;
}
IIonImageBufferHeap::AllocImgParam_t const allocImgParam(
format, imgSize,
bufStridesInBytes, bufBoundaryInBytes,
bufPlanes.size()
);
MY_LOGD("format=0x%x, imgSize=%dx%d, stride=%zu\n",format, imgSize.w, imgSize.h, bufStridesInBytes[0]);
mpPool_HalImageRAW10 = new HalImageStreamBuffer::Allocator::StreamBufferPoolT(
pStreamInfo->getStreamName(),
HalImageStreamBuffer::Allocator(pStreamInfo.get(), allocImgParam)
);
MERROR err = mpPool_HalImageRAW10->initPool("Tester", pStreamInfo->getMaxBufNum(), pStreamInfo->getMinInitBufNum());
if ( err ) {
MY_LOGE("mpPool_ImageRAW10 init fail");
}
}
//Hal:Image: RAW16
{
StreamId_T const streamId = STREAM_ID_OUT;
MSize const imgSize(4176, 3088);
MINT const format = eImgFmt_RAW16;
MUINT const usage = eBUFFER_USAGE_SW_MASK;
IImageStreamInfo::BufPlanes_t bufPlanes;
//[++]
IImageStreamInfo::BufPlane bufPlane;
bufPlane.rowStrideInBytes = imgSize.w * 2;
bufPlane.sizeInBytes = bufPlane.rowStrideInBytes * imgSize.h;
bufPlanes.push_back(bufPlane);
//
sp<ImageStreamInfo>
pStreamInfo = new ImageStreamInfo(
"Hal:Image: RAW16",
streamId,
eSTREAMTYPE_IMAGE_INOUT,
1, 1,
usage, format, imgSize, bufPlanes
);
pHalImageOut = pStreamInfo;
//
//
size_t bufStridesInBytes[3] = {0};
size_t bufBoundaryInBytes[3]= {0};
for (size_t i = 0; i < bufPlanes.size(); i++) {
bufStridesInBytes[i] = bufPlanes[i].rowStrideInBytes;
}
IIonImageBufferHeap::AllocImgParam_t const allocImgParam(
format, imgSize,
bufStridesInBytes, bufBoundaryInBytes,
bufPlanes.size()
);
//MY_LOGE("Jpeg format=%#x, imgSize=%dx%d\n",format, imgSize.w, imgSize.h);
mpPool_HalImageRAW16 = new HalImageStreamBuffer::Allocator::StreamBufferPoolT(
pStreamInfo->getStreamName(),
HalImageStreamBuffer::Allocator(pStreamInfo.get(), allocImgParam)
);
MERROR err = mpPool_HalImageRAW16->initPool("Tester", pStreamInfo->getMaxBufNum(), pStreamInfo->getMinInitBufNum());
if ( err ) {
MY_LOGE("mpPool_HalImageRAW16 init fail");
}
}
////////////////////////////////////////////////////////////////////////////
//
/////////////////////////////////////////////////////////////////////////////
printf("add stream to streamInfoset\n");
mpStreamInfoSet->editHalImage().addStream(pHalImageIn);
mpStreamInfoSet->editHalImage().addStream(pHalImageOut);
////////////////////////////////////////////////////////////////////////////
//
/////////////////////////////////////////////////////////////////////////////
//
//
printf("add stream to pipelineNodeMap\n");
mpPipelineNodeMap->setCapacity(1);
//
{
mpPipelineDAG->addNode(NODE_ID_NODE1);
ssize_t const tmpNodeIndex = mpPipelineNodeMap->add(NODE_ID_NODE1, mpNode1);
//
sp<IStreamInfoSetControl> const&
rpInpStreams = mpPipelineNodeMap->getNodeAt(tmpNodeIndex)->editInStreams();
sp<IStreamInfoSetControl> const&
rpOutStreams = mpPipelineNodeMap->getNodeAt(tmpNodeIndex)->editOutStreams();
//
// [input]
// Hal:Image:RAW10
// [output]
// Hal:Image:RAW16
rpInpStreams->editHalImage().addStream(pHalImageIn);
//
rpOutStreams->editHalImage().addStream(pHalImageOut);
//
// TODO: re-config flow
//P2Node::ConfigParams cfgParams;
//mpNode1->config(cfgParams);
}
//
#if (0)
{
//
mpPipelineDAG->addNode(NODE_ID_NODE2);
ssize_t const tmpNodeIndex = mpPipelineNodeMap->add(NODE_ID_NODE2, mpNode2);
}
//
mpPipelineDAG->addEdge(mpNode1->getNodeId(), mpNode2->getNodeId());
#endif
mpPipelineDAG->setRootNode(mpNode1->getNodeId());
for (size_t i = 0; i < mpPipelineNodeMap->size(); i++)
{
mpPipelineDAG->setNodeValue(mpPipelineNodeMap->nodeAt(i)->getNodeId(), i);
printf("setNodeValue%zu\n", i);
}
mpAppSimulator = new AppSimulator;
printf("prepareConfig - \n");
}
/******************************************************************************
*
******************************************************************************/
void
prepareRequest(android::sp<IPipelineFrameControl> &pFrame, const char *filename)
{
printf("prepare request\n");
pFrame = IPipelineFrameControl::create(0);
pFrame->setPipelineNodeMap(getPipelineNodeMapControl());
pFrame->setPipelineDAG(getPipelineDAG());
pFrame->setStreamInfoSet(getStreamInfoSet());
//RAW16 Node
{
IPipelineNode::NodeId_T const nodeId = NODE_ID_NODE1;
//
IPipelineFrame::InfoIOMapSet aInfoIOMapSet;
IPipelineFrame::ImageInfoIOMapSet& rImageInfoIOMapSet = aInfoIOMapSet.mImageInfoIOMapSet;
//
//
sp<IPipelineNodeMapControl::INode> pNodeExt = getPipelineNodeMapControl()->getNodeFor(nodeId);
sp<IStreamInfoSet const> pInStream = pNodeExt->getInStreams();
sp<IStreamInfoSet const> pOutStream= pNodeExt->getOutStreams();
//
// Image
{
IPipelineFrame::ImageInfoIOMap& rMap =
rImageInfoIOMapSet.editItemAt(rImageInfoIOMapSet.add());
//
//Input
for (size_t i = 0; i < pInStream->getImageInfoNum(); i++)
{
sp<IImageStreamInfo> p = pInStream->getImageInfoAt(i);
rMap.vIn.add(p->getStreamId(), p);
}
//
//Output
for (size_t i = 0; i < pOutStream->getImageInfoNum(); i++)
{
sp<IImageStreamInfo> p = pOutStream->getImageInfoAt(i);
rMap.vOut.add(p->getStreamId(), p);
}
}
//
pFrame->addInfoIOMapSet(nodeId, aInfoIOMapSet);
}
////////////////////////////////////////////////////////////////////////////
//
// pFrame->setStreamBufferSet(...);
//
////////////////////////////////////////////////////////////////////////////
//IAppPipeline::AppCallbackParams aAppCallbackParams;
//aAppCallbackParams.mpBuffersCallback = pAppSimulator;
sp<IStreamBufferSetControl> pBufferSetControl = IStreamBufferSetControl::create(
0, NULL
);
//
//
{
//
StreamId_T const streamId = STREAM_ID_IN;
//
sp<IImageStreamInfo> pStreamInfo = getStreamInfoSet()->getImageInfoFor(streamId);
sp<HalImageStreamBuffer> pStreamBuffer;
//
//acquireFromPool
MY_LOGD("[acquireFromPool] + %s ", pStreamInfo->getStreamName());
MERROR err = mpPool_HalImageRAW10->acquireFromPool(
"Tester", pStreamBuffer, ::s2ns(30)
);
MY_LOGD("[acquireFromPool] - %s %p err:%d", pStreamInfo->getStreamName(), pStreamBuffer.get(), err);
MY_LOGE_IF(OK!=err || pStreamBuffer==0, "pStreamBuffer==0");
//write raw10 to src buffer
{
sp<IImageBufferHeap> pImageBufferHeap = NULL;
IImageBuffer* pImageBuffer = NULL;
pImageBufferHeap = pStreamBuffer->tryWriteLock(LOG_TAG);
if (pImageBufferHeap == NULL) {
MY_LOGE("pImageBufferHeap == NULL");
}
pImageBuffer = pImageBufferHeap->createImageBuffer();
if (pImageBuffer == NULL) {
MY_LOGE("pImageBuffer == NULL");
}
//pImageBuffer->lockBuf(LOG_TAG, eBUFFER_USAGE_SW_MASK);
printf("load image:%s\n", filename);
pImageBuffer->loadFromFile(filename);
printf("@@BufSize = %zu\n",
pImageBuffer->getBufSizeInBytes(0));
//MY_LOGD("@@%x", *(reinterpret_cast<MINT8*>(pImageBuffer->getBufVA(0))));
//pImageBuffer->saveToFile("/data/raw16_result.raw");
//printf("@@BufSize = %zu",
// pImageBuffer->getBufSizeInBytes(0));
pImageBuffer->lockBuf(LOG_TAG, eBUFFER_USAGE_SW_MASK);
//pImageBuffer->getBufVA(0);
//pImageBuffer->saveToFile("/data/raw16_result.raw");
MY_LOGD("@@fist byte:%x", *(reinterpret_cast<MINT8*>(pImageBuffer->getBufVA(0))));
pImageBuffer->unlockBuf(LOG_TAG);
pStreamBuffer->unlock(LOG_TAG, pImageBufferHeap.get());
//saveToFile("/data/raw16_result.raw", STREAM_ID_IN);
}
ssize_t userGroupIndex = 0;
//User Group1
{
sp<IUsersManager::IUserGraph> pUserGraph = pStreamBuffer->createGraph();
IUsersManager::User user;
//
user.mUserId = NODE_ID_NODE1;
user.mCategory = IUsersManager::Category::CONSUMER;
user.mUsage = pStreamInfo->getUsageForAllocator();
pUserGraph->addUser(user);
userGroupIndex = pStreamBuffer->enqueUserGraph(pUserGraph.get());
}
//
pBufferSetControl->editMap_HalImage()->add(pStreamBuffer);
}
{
//
StreamId_T const streamId = STREAM_ID_OUT;
//
sp<IImageStreamInfo> pStreamInfo = getStreamInfoSet()->getImageInfoFor(streamId);
sp<HalImageStreamBuffer> pStreamBuffer;
//
//acquireFromPool
MY_LOGD("[acquireFromPool] + %s ", pStreamInfo->getStreamName());
MERROR err = mpPool_HalImageRAW16->acquireFromPool(
"Tester", pStreamBuffer, ::s2ns(30)
);
MY_LOGD("[acquireFromPool] - %s %p err:%d", pStreamInfo->getStreamName(), pStreamBuffer.get(), err);
MY_LOGE_IF(OK!=err || pStreamBuffer==0, "pStreamBuffer==0");
//
ssize_t userGroupIndex = 0;
//User Group1
{
sp<IUsersManager::IUserGraph> pUserGraph = pStreamBuffer->createGraph();
IUsersManager::User user;
//
user.mUserId = NODE_ID_NODE1;
user.mCategory = IUsersManager::Category::PRODUCER;
user.mUsage = pStreamInfo->getUsageForAllocator();
pUserGraph->addUser(user);
userGroupIndex = pStreamBuffer->enqueUserGraph(pUserGraph.get());
}
pBufferSetControl->editMap_HalImage()->add(pStreamBuffer);
//mpHalImageStreamBuffer = pStreamBuffer;
}
//
pFrame->setStreamBufferSet(pBufferSetControl);
}
/******************************************************************************
*
******************************************************************************/
int main(/*int argc, char** argv*/)
{
printf("%s\n","start test");
//printf("Usage: test_raw16node <filename> <out_filename>\n");
//image size 4176x3088
//filename = argv[1];
//out_filename = argv[2];
const char *filename = "/sdcard/DCIM/Camera/testRaw123.raw";
const char *out_filename = "/sdcard/result16.raw";
printf("src=%s dst=%s\n", filename, out_filename);
mpNode1 = RAW16Node::createInstance();
//
MUINT32 frameNo = 0;
//
//init
{
struct RAW16Node::InitParams params;
params.openId = gSensorId;
params.nodeName = "Raw16Tester";
params.nodeId = NODE_ID_NODE1;
mpNode1->init(params);
};
//----------test 1 ------------//
//config
{
RAW16Node::ConfigParams params;
prepareConfig();
mpNode1->config(params);
}
//request
{
android::sp<IPipelineFrameControl> pFrame;
prepareRequest(pFrame, filename);
mpNode1->queue(pFrame);
}
printf("save to file\n");
saveToFile(out_filename, STREAM_ID_OUT);
usleep(100000);
//save to file
//flush
printf("flush\n");
mpNode1->flush();
//uninit
printf("uninit\n");
mpNode1->uninit();
mpPool_HalImageRAW16 = NULL;
printf("end of test\n");
MY_LOGD("end of test");
return 0;
}
| [
"Bret_liu@tw.shuttle.com"
] | Bret_liu@tw.shuttle.com |
1746f96cadacc611ce1261b7b65387ff3e7120f1 | ca02d8a19bc0c06b2ee58d01d520f86ff7ae8279 | /midterm/midterm/Strategy.h | 0f9cbb1e79093d8bbe854c2be474906d4bab8879 | [] | no_license | K39101348/computational | 2a5db26f8bbf1d436c0dc03e9f4f2966f1d6ba6c | 5fc8e155a747247049fdfe786aa7630c9b937bec | refs/heads/master | 2023-02-04T23:21:31.510921 | 2020-12-27T07:16:19 | 2020-12-27T07:16:19 | 324,707,696 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 5,037 | h | #ifndef Strategy_h
#define Strategy_h
#include <vector>
#include <map>
#include <string>
#include <iostream>
#include<cmath>
/// Add Code Here -->
/// <-- Add Code Here
using namespace std;
/// user to item tabel RecomdList At most K Proposed Items user size item size
void Algorithm(vector<vector<double> > Table, vector<vector<int> > &RecomdList, const int K, const int user_size, const int item_size)
{
int count = 0;
int countt = 0;
vector<double>total(item_size);
vector<double>average(item_size);
vector<vector<double> >list(user_size);
vector<double>averagee(user_size);
vector<double>sum(user_size);
vector<double>std1(user_size);
for (int i = 0; i < user_size; i++) {
list[i].resize(item_size);
}
int maximum=0;
int maximum2=0;
/**
TABLE
Index Content
int User double Rating
int Item
Format
Table[User][Item]=Rating
STRUCTURE
Table
| User1
| --- Item1 Item2 Item4 ...
| R1 R2 R3
|
| User2
| --- Item2 Item5 Item7 ...
| R4 R5 R6
|
| User3
| --- Item3 Item4 Item6 ...
| R4 R5 R6
:
:
*/
/**
RECOMDLIST
Index Content
int User int Item
int Idx
Format
Table[User][Idx]=Item
STRUCTURE
RecomdList
| User1
| --- 0 1 2 ... K-1
| Item3 Item8 Item9 ... Item?
|
| User2
| --- 0 1 2 ... K-1
| Item4 Item1 Item3 ... Item?
|
| User3
| --- 0 1 2 ... K-1
| Item5 Item7 Item1 ... Item?
:
:
*/
for (int i = 0; i < user_size; i++) {
sum[i] = 0 ;
countt = 0;
for (int j=0; j < item_size; j++) {
if (Table[i][j] >=0)
{
sum[i] += Table[i][j];
countt++;
}
}
averagee[i] = sum[i] / countt;
}
for (int i = 0; i < user_size; i++) {
std1[i] = 0 ;
countt = 0;
for (int j=0; j < item_size; j++) {
if (Table[i][j]>=0) {
std1[i] += (Table[i][j]- averagee[i]) * (Table[i][j]- averagee[i]);
countt++;
}
}
std1[i] /= countt;
std1[i] = sqrt(std1[i]);
}
for (int i = 0; i < user_size; i++) {
for (int j=0; j < item_size; j++) {
if (Table[i][j] >=0) {
Table[i][j] = 50+10*((Table[i][j] - averagee[i]) / std1[i]);
}
}
}
/* for (int x = 0; x < item_size ; x++) {
count = 0;
average[x] = 0;
for (int y = 0; y < user_size ; y++) {
if (Table[y][x] >= 0) {
average[x] += Table[y][x];
count++;
}
}
if (count != 0) {
average[x] = average[x] / count;
}
}
for (int x = 0; x < item_size; x++) {
for (int y = 0; y < user_size; y++) {
list[y][x] = average[x];
}
}
for (int k = 0; k < K; k++) {
for (int i = 0; i < user_size; i++) {
maximum = 0;
for (int j = 0; j < item_size; j++) {
if ((list[i][j] >= maximum) && (Table[i][j] < 0)) {
maximum = list[i][j];
maximum2 = j;
}
}
list[i][maximum2] = -2;
RecomdList[i][k] = maximum2;
}
}*/
for (int i=0; i < item_size; i++) {
total[i] = 0;
for (int j = 0; j < user_size; j++) {
if (Table[j][i] > 0) {
total[i] += Table[j][i];
}
}
//cout << total[i] << endl;
}
for (int x = 0; x < item_size; x++) {
for (int y = 0; y < user_size; y++) {
list[y][x] = total[x];
}
}
for (int k = 0; k < K; k++) {
for (int i = 0; i < user_size; i++) {
maximum = 0;
for (int j = 0; j < item_size; j++) {
if ((list[i][j] >= maximum) && (Table[i][j] < 0)) {
maximum = list[i][j];
maximum2 = j;
}
}
list[i][maximum2] = -2;
RecomdList[i][k] = maximum2;
}
//cout << RecomdList[i][k] << endl;
}
/*
for (int i = 0; i < user_size; i++) {
cout << "User_" << i << ": " << endl;
for (int j = 0; j < K; i++) {
cout << "Item_" << j << ": " << RecomdList[i][j] << endl;
}
}
*/
}
#endif /* Strategy_h */
| [
"K39101348@gmail.com"
] | K39101348@gmail.com |
4bfbc7e74da1082f9377b104aae3c7d6278f96f9 | 0aa325d6d4e71aa66aa6101781476493bab85d19 | /Talkers/Behaviours/T-11/B-170/B-170.hpp | 1a40186066fc2ecf537b5fd134fe13bf2ee25f8d | [] | no_license | valentin-dufois/Protocol-Bernardo | 7a14004bd85000e7f3cbd25e5952f258c0b9a99c | 0e2225bb7f170e7517d2d55ea5a4aff3667c8ca3 | refs/heads/master | 2022-04-03T09:48:39.971882 | 2020-02-18T22:18:47 | 2020-02-18T22:18:47 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 655 | hpp | //
// B-170.hpp
// Talkers
//
// Created by Valentin Dufois on 2020-02-03.
//
#ifndef B_170_hpp
#define B_170_hpp
#ifdef B170
#undef B170
#endif
#include "../../Behaviour.hpp"
class B170: public Behaviour {
public:
B170(): Behaviour(170, // ID
11, // Tree ID
1, // Is tree start ?
0, // Force start ?
{ // Expected inputs
},
{ // Expected outputs
167,
}) {}
virtual bool execute(Machine * machine) override {
/*
Action:
*/
return true;
}
};
#endif /* B_170_hpp */
| [
"valentin@dufois.fr"
] | valentin@dufois.fr |
7abda08bac1b1175e6ffe513754e0adec539f346 | e8fff28763ecfa1df2f726ec44e9b90ad5482527 | /DeeBook/IEDumper.h | b3c97f43b7c7350f8b7017b39df12cb2407d7bfb | [
"WTFPL"
] | permissive | cdfmr/deebook | 285657851f9551f40bf309199b0be151c6faa830 | a351e6719d0f85e33b390115a30cff827efb5f20 | refs/heads/master | 2020-04-22T13:01:07.421813 | 2014-09-06T06:51:39 | 2014-09-06T06:51:39 | 23,728,499 | 1 | 2 | null | null | null | null | UTF-8 | C++ | false | false | 6,113 | h | // IEDumper.h: interface for the CIEDumper class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_IEDUMPER_H__ECB86F48_5092_47E8_82E9_FDD9E3992ABC__INCLUDED_)
#define AFX_IEDUMPER_H__ECB86F48_5092_47E8_82E9_FDD9E3992ABC__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include <mshtml.h>
#include <map>
#include "../HTMLReader/LiteHTMLReader.h"
using namespace std;
#pragma pack(1)
#define IDN_PROGRESS 12850
typedef struct tagIDNMHDR
{
NMHDR nmhdr;
DWORD dwData;
} IDNMHDR;
class CIEDumper : public ILiteHTMLReaderEvents
{
public:
CIEDumper();
virtual ~CIEDumper();
// chm options structure
typedef struct tagCHMOptions
{
BOOL bCreateCHM;
BOOL bCompileCHM;
CString csHomePage;
CString csProjectFile;
CString csContentFile;
CString csWindowTitle;
CSize szWindowSize;
UINT nPaneWidth;
BOOL bHideToolbarText;
BOOL bRememberWinPos;
BOOL bFullTextSearch;
UINT nLanguage;
} CHM_OPTIONS;
// get IHTMLDocument2 interface
static IHTMLDocument2* GetDocInterface(HWND hIECtrl);
static IHTMLDocument2* GetDocInterfaceByMSAA(HWND hIECtrl);
// get/set window handles
inline HWND GetIECtrlHandle() { return m_hIECtrl; }
inline HWND GetTreeCtrlHandle() { return m_hTreeCtrl; }
BOOL SetIECtrlHandle(HWND hIECtrl);
BOOL SetTreeCtrlHandle(HWND hTreeCtrl);
// set decompiling parameters
inline void SetOwnerWindow(HWND hOwner) { m_hOwner = hOwner; }
inline void SetURLBase(LPCTSTR lpURLBase) { m_csURLBase = lpURLBase; }
inline void SetOutputDir(LPCTSTR lpDir) { m_csOutputDir = lpDir; }
inline void SetLoadTimeout(DWORD dwValue) { m_dwLoadTimeout = dwValue; }
inline void SetLoadWait(DWORD dwValue) { m_dwLoadWait = dwValue; }
inline void SetCHMOptions(CHM_OPTIONS chmOptions) { m_chmOptions = chmOptions; }
inline void SetSnapImages(BOOL bSnap) { m_bSnap = bSnap; }
inline void SetJPEGQuality(UINT nQuality) { m_nJPEGQuality = nQuality; }
// get url of current page
CString GetPageURL();
// start/stop decompiling
void Decompile(BOOL bOnePageOnly = FALSE);
inline void Terminate() { m_bBreakFlag = TRUE; }
private:
// injection code to call StealFile
typedef struct tagStealFile
{
// get current address
BYTE __call0; // E8 00 00 00 00
DWORD __callAddr;
BYTE __popEAX; // 58
// push file name
BYTE __addEAX15; // 05 15 00 00 00
DWORD __addVal1;
BYTE __pushEAX1; // 50
// push url
BYTE __addEAX400_1; // 05 00 04 00 00
DWORD __addVal2;
BYTE __pushEAX2; // 50
// get procedure address
BYTE __addEAX400_2; // 05 00 04 00 00
DWORD __addVal3;
// call
WORD __callEAX; // FF 10
BYTE __ret; // C3
char cFile[1024];
char cURL[1024];
void* pStealFile;
} FLN_STEAL_FILE;
// inject code to call SeleteTreeItem
typedef struct tagSelectTreeItem
{
// get current address
BYTE __call0; // E8 00 00 00 00
DWORD __callAddr;
BYTE __popEAX; // 58
// push htreeitem
BYTE __pushHITEM; // 68 00 00 00 00
DWORD dwItem;
// push htree
BYTE __pushHTREE; // 68 00 00 00 00
DWORD dwTree;
// get procedure address
BYTE __addEAX13; // 05 13 00 00 00
DWORD __addVal;
// call
WORD __callEAX; // FF 10
BYTE __ret; // C3
void* pSelectTreeItem;
} FLN_SELECT_TREE_ITEM;
// page element information
typedef struct tagElementInfo
{
CString csURL;
BOOL bSaved;
} ELEMENT_INFO;
// url map
typedef map<CString, ELEMENT_INFO> CURLMap;
// class to write text file with line break
class CLineFile : public CStdioFile
{
public:
void WriteString(LPCTSTR lpsz)
{
CString csLine = lpsz;
csLine += _T("\n");
CStdioFile::WriteString(csLine);
}
BOOL IsOpen()
{
return m_pStream != NULL;
}
};
BOOL m_bBreakFlag; // break decompiling
DWORD m_dwProcId; // process id of ebook
HWND m_hIECtrl; // internet explorer window
HWND m_hTreeCtrl; // navigation tree window
IHTMLDocument2* m_pHtmlDoc2; // IHTMLDocument2 interface
HWND m_hOwner; // owner window
DWORD m_dwLoadWait; // wait time for loading page
DWORD m_dwLoadTimeout; // time out for loading page
CString m_csOutputDir; // output directory
CString m_csURLBase; // base url
CHM_OPTIONS m_chmOptions; // chm options
BOOL m_bSnap; // snap images
UINT m_nJPEGQuality; // jpeg quality
CURLMap m_mapPage; // web pages in ebook
CURLMap m_mapOther; // other files in ebook
CString m_csCurrentURL; // current page url
CLineFile fileHHP; // html help project file
CLineFile fileHHC; // html help content file
FLN_STEAL_FILE m_StealFileCode; // injection code to call StealFile
FLN_SELECT_TREE_ITEM m_SelTreeItemCode; // injection code to call SelectTreeItem
CString NormalizeURL(LPCTSTR lpURL);
BOOL IsPageNeedProcess(LPCTSTR lpURL);
BOOL IsPageProcessed(LPCTSTR lpURL);
void AddURLToMap(LPCTSTR lpURL, CURLMap& mapURL, BOOL bSaved = FALSE);
ELEMENT_INFO* GetFileToProcess(CURLMap& mapURL);
CString GetFileName(LPCTSTR lpURL);
BOOL InjectIEThief();
void ProcessNavigationTree();
void ProcessTreeItem(HTREEITEM hItem);
void ProcessPageMap(BOOL bOnePageOnly = FALSE);
void ProcessFileMap();
void WaitForLoadingDocument();
BOOL SaveHTMLSource(LPCTSTR lpFileName);
void ParsePage(LPCTSTR lpFileName);
void StartTag(CLiteHTMLTag *pTag, DWORD dwAppData, bool &bAbort);
CString SafeGetAttrValue(CLiteHTMLTag* pTag, LPCTSTR lpAttrName);
void DownloadFile(LPCTSTR lpURL, LPCTSTR lpFileName);
void SnapImage(LPCTSTR lpURL, LPCTSTR lpFileName, DWORD dwFormat);
void CreateCHMProject();
void SearchCHMFileList();
void CompileCHMProject();
};
#endif // !defined(AFX_IEDUMPER_H__ECB86F48_5092_47E8_82E9_FDD9E3992ABC__INCLUDED_)
| [
"im.linfan@gmail.com"
] | im.linfan@gmail.com |
36b2f5009809e7fc22dea64309a3df8b77ed18d5 | ad0bf144e8a6f9731a090e54b6b1e23d375cc1a0 | /16.cpp | 3fc7fb16e8e18cd5ad3e336d269eaa724c9d60f6 | [] | no_license | nflath/advent2017 | 060d6d52c36cf819dbc032172cdbd880dca8837f | 29043bdedd5c8564f21e1db0907be83e879623ea | refs/heads/master | 2021-09-01T15:04:42.911210 | 2017-12-27T15:55:49 | 2017-12-27T15:55:49 | 115,536,252 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,106 | cpp | #include <vector>
#include <map>
#include <iostream>
#include <fstream>
#include <set>
class List {
public:
List* next;
char name;
List(char name): name(name) {}
};
class Operation {
public:
char op;
int arg1;
int arg2;
Operation(char op, int arg1, int arg2):op(op),arg1(arg1),arg2(arg2) {}
};
int main() {
std::map<char, int> map;
std::vector<char> v;
int listlen = 16;
for(int i = 0; i < 16; i++) {
v.push_back('a' + i);
map['a'+i] = i;
}
std::vector<Operation*> ops;
std::ifstream infile("day16input");
char comma;
char op;
int total_spin_length;
while(infile >> op) {
if(op == 's') {
int len;
infile >> len;
ops.push_back(new Operation('s',len,0));
total_spin_length += len;
} else if(op == 'x') {
int A, B;
char slash;
infile >> A >> comma >> B;
ops.push_back(new Operation('x',A,B));
} else if(op == 'p') {
char A, B;
char slash;
infile >> A >> comma >> B;
ops.push_back(new Operation('p',A,B));
}
char comma;
infile >> comma;
}
//int num_dances = 1;
//ops.push_back(new Operation('s', total_spin_length % listlen, 0));
int opcount = 0;
int cycle_length = 0;
int num_dances = 1000000000;
for(int i = 0; i < num_dances; i++) {
//if(!(i%1000))std::cout << i << std::endl;
for(int j = 0; j < ops.size(); ++j) {
Operation* op = ops[j];
++opcount;
if(op->op == 's') {
std::vector<char> v2;
int i = listlen - op->arg1;
for(; i < 16; ++i) {
v2.push_back(v[i]);
}
for(int i = 0; i < listlen - op->arg1;++i) {
v2.push_back(v[i]);
}
v = v2;
for(int i = 0; i < listlen; i++) {
map[v[i]] = i;
}
} else if(op->op == 'x') {
char tmp = v[op->arg1];
v[op->arg1] = v[op->arg2];
v[op->arg2] = tmp;
map[char(v[op->arg1])] = op->arg1;
map[char(v[op->arg2])] = op->arg2;
} else if(op->op == 'p') {
// std::cout << "p " << char(op->arg1) << "/" << char(op->arg2) << std::endl;
// std::cout << map[(char)op->arg1] << " " << map[(char)op->arg2] << std::endl;
v[map[(char)op->arg1]] = op->arg2;
v[map[(char)op->arg2]] = op->arg1;
//deagpfjklmnohibc
// v[6] = 'k';
//v[110] = 'g'
int tmp = map[(char)op->arg1];
map[(char)op->arg1] = map[(char)op->arg2];
map[(char)op->arg2] = tmp;
// std::cout << op->op << " " << op->arg1 << "/" << op->arg2 << " ";
// for(int i = 0; i < 16; ++i) {
// std::cout << v[i];
// }
// std::cout << std::endl;
// return 0;
}
bool same = true;
for(int j = 0; j < 16; ++j) {
if(v[j] != 'a'+j) {
same = false;
break;
}
}
if(same&&!cycle_length) {
std::cout << "cycle found at: " << opcount << " " << i << std::endl;
cycle_length = opcount;
long long total_ops = num_dances * ops.size();
long long remainder = total_ops % cycle_length;
std::cout << "remainder: " << remainder << std::endl;
i = num_dances - (remainder / ops.size())-1;
j = ops.size()-(remainder % ops.size());
std::cout << "Setting i to: " << i << std::endl;
std::cout << "Setting j to: " << j << std::endl;
}
}
//std::set<char> s;
//std::cout << op->op << " " << op->arg1 << "/" << op->arg2 << " ";
for(int i = 0; i < 16; ++i) {
std::cout << v[i];
}
std::cout << std::endl;
// for(int i = 0; i < 16; ++i) {
// if(s.count(v[i])) {
// std::cout << "exit due to duplicate" << std::endl;
// return 0;
// }
// if(i != map[v[i]] ){
// std::cout << "exit due to incorrect map" << std::endl;
// for(int j = 0; j < 16; j++) {
// std::cout << (char)('a'+j) << ": " <<map['a'+j] << std::endl;
// }
// return 0;
// }
// s.insert(v[i]);
// }
}
}
| [
"nflath@Nathaniels-MacBook-Pro.local"
] | nflath@Nathaniels-MacBook-Pro.local |
8a12b7086ad98edbb2a9e6f40c5309e63b3eae2e | 3debbd631621eb898f8efa5d87b765adb927d5c2 | /math_vector.h | 2d7a2affa93a78e11e81c2e72d2429259bac2225 | [] | no_license | trololohunter/advanced | e4783287ed7b67418a956780ca51b84ecaa4071f | 640803ab39b4e86c2fadf397bfdd49b3b6dbfb0c | refs/heads/master | 2020-04-02T15:00:21.506574 | 2018-11-22T18:05:49 | 2018-11-22T18:05:49 | 154,547,878 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 545 | h | //
// Created by vover on 10/24/18.
//
#ifndef ADVANCED_MATH_VECTOR_H
#define ADVANCED_MATH_VECTOR_H
#include <vector>
#include <cstdint>
#include <tgmath.h>
double norm (const std::vector<double> &v);
double scalar_product (const std::vector<double> &v1, const std::vector<double> &v2);
std::vector<double> Projection (const std::vector<double> &a, const std::vector<double> &b);
std::vector<double> Multiply_Coef (const std::vector<double> &a, double coef);
void print_vector(const std::vector<double> &v);
#endif //ADVANCED_MATH_VECTOR_H
| [
"vovik_n@mail.ru"
] | vovik_n@mail.ru |
9997a0a38640a06dbf635d3309e19e945daaf4ee | 48b428695ad6b12390b068ae0994494edcfd893b | /Header Files/BitmapHandler.h | d307ff4ac517dcdabd99ab901041294f72dc35dc | [] | no_license | 0000duck/OLProgram | ba20ebe6239563f7c52416a65d892e9dfbd7f9fc | b1f1d1b40e3f7c1b237770834b42bbf11a04135a | refs/heads/master | 2020-04-12T08:37:18.793007 | 2016-11-11T09:37:04 | 2016-11-11T09:37:04 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,194 | h | // BitmapHandler.h : Declaration of the CBitmapHandler
#pragma once
#include "EliteSoftWare_i.h"
#include "resource.h" // main symbols
#include <comsvcs.h>
#include <list>
// CBitmapHandler
class ATL_NO_VTABLE CBitmapHandler :
public CComObjectRootEx<CComSingleThreadModel>,
public CComCoClass<CBitmapHandler, &CLSID_BitmapHandler>,
public IDispatchImpl<IBitmapHandler, &IID_IBitmapHandler, &LIBID_EliteSoftWareLib, /*wMajor =*/ 1, /*wMinor =*/ 0>
{
public:
CBitmapHandler()
{
}
DECLARE_PROTECT_FINAL_CONSTRUCT()
HRESULT FinalConstruct()
{
return S_OK;
}
void FinalRelease()
{
}
DECLARE_REGISTRY_RESOURCEID(IDR_BITMAPHANDLER)
DECLARE_NOT_AGGREGATABLE(CBitmapHandler)
BEGIN_COM_MAP(CBitmapHandler)
COM_INTERFACE_ENTRY(IBitmapHandler)
COM_INTERFACE_ENTRY(IDispatch)
END_COM_MAP()
public:
STDMETHOD(CreateBitmapFileFromResource)(DWORD resID, BSTR* retval);
STDMETHOD(Dispose)();
protected:
CComBSTR CreateUniqueFileName();
BOOL SaveHBitmapToDisk(LPCTSTR filename, HBITMAP hBmp, HPALETTE hPal);
BOOL CleanFilesFromDisk();
private:
std::list<CString> createdFiles;
// IBitmapHandler
public:
};
OBJECT_ENTRY_AUTO(__uuidof(BitmapHandler), CBitmapHandler)
| [
"qqs318@126.com"
] | qqs318@126.com |
dc7db6a79dd53e10ef65be58d257a52c2779c1d4 | 8cfda3fdba467cb5220e7858de29dbdb307c770b | /tale/ReturnExpr.h | 230d54e7e34ff879a5606d054f886bf5b03a56f0 | [] | no_license | HanzhouTang/Tale | 9a4e29edc629784ac57c7a25b982376a78ecb646 | a6bbb224cea29899390869973f12f7835122a5d3 | refs/heads/master | 2021-07-06T15:32:55.601463 | 2019-04-03T04:45:58 | 2019-04-03T04:45:58 | 143,662,758 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 973 | h | #pragma once
#include"Expr.h"
namespace expr {
struct ReturnExpr :Expr {
std::shared_ptr<Expr> content;
ReturnExpr(const std::shared_ptr<Expr>& runtime, const std::shared_ptr<Expr>& c) :
Expr(runtime), content(c) {
setType(TYPE_RETURN);
}
std::shared_ptr<Expr> getContent() { return content; }
static std::shared_ptr<ReturnExpr> createReturnExpr(const std::shared_ptr<Expr>& runtime, const std::shared_ptr<Expr>& content) {
auto ret = std::make_shared<ReturnExpr>(runtime, content);
ret->getContent()->setRunTime(ret);
return ret;
}
static std::shared_ptr<ReturnExpr> createReturnExpr(const std::shared_ptr<Expr>& content) {
return createReturnExpr(nullptr, content);
}
virtual std::shared_ptr<Expr> getValue() override;
virtual std::shared_ptr<Expr> clone() override {
return createReturnExpr(getRunTime(), content->clone());
}
virtual std::wstring toString() override {
return L"return " + content->toString();
}
};
} | [
"hanzhoutang@gmail.com"
] | hanzhoutang@gmail.com |
f72097065154a1040305de5bb7345b1c827d1f98 | 316b8ce861009661c2d00233c701da70b14bfc27 | /backend/src/common_bk/message_store/message_store.h | b9f364e381a57f9ca2c0a09a85ed616e4235c222 | [] | no_license | oxfordyang2016/profitcode | eb2b35bf47469410ddef22647789071b40618617 | c587ad5093ed78699e5ba96fb85eb4023267c895 | refs/heads/master | 2020-03-23T14:37:33.288869 | 2018-07-20T08:53:44 | 2018-07-20T08:53:44 | 141,688,355 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 611 | h | #ifndef SRC_COMMON_MESSAGE_STORE_MESSAGE_STORE_H_
#define SRC_COMMON_MESSAGE_STORE_MESSAGE_STORE_H_
#include <vector>
#include "common/message_store/order_blob.h"
#include "zshared/lock.h"
class MessageStore {
public:
explicit MessageStore(int store_size = 500);
void Store(int msg_seq_num,
OrderSide::Enum side,
const char* order_id,
const char* cl_order_id);
OrderBlob Retrieve(int msg_seq_num);
private:
size_t current_idx_;
zshared::SpinLock spin_lock_;
std::vector<OrderBlob> order_blobs_;
};
#endif // SRC_COMMON_MESSAGE_STORE_MESSAGE_STORE_H_
| [
"rcy-fudan@ioeb-FUDANdeMacBook-Pro.local"
] | rcy-fudan@ioeb-FUDANdeMacBook-Pro.local |
a2d1e168680eaf009a606e9e22794b225c0b197a | 63b6d834c7e04747874ef022ac3b33ae1d190133 | /libcef_dll/ctocpp/views/window_ctocpp.h | 77e4e05a7035b28fa10522d8bfd59340b4e0a8f3 | [
"BSD-3-Clause"
] | permissive | errNo7/cef | 2144485a9d8f2d91c3cd26dc71c5a554b505489f | 6f6072b857847af276cb84caec0948d5d442521d | refs/heads/master | 2023-08-19T10:34:29.985938 | 2021-09-09T07:50:10 | 2021-09-09T07:50:10 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 5,952 | h | // Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=f2fbf4be1755ed8793c2d471d65eddbdf4ba148b$
//
#ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_WINDOW_CTOCPP_H_
#define CEF_LIBCEF_DLL_CTOCPP_VIEWS_WINDOW_CTOCPP_H_
#pragma once
#if !defined(WRAPPING_CEF_SHARED)
#error This file can be included wrapper-side only
#endif
#include <vector>
#include "include/capi/views/cef_window_capi.h"
#include "include/views/cef_window.h"
#include "libcef_dll/ctocpp/ctocpp_ref_counted.h"
// Wrap a C structure with a C++ class.
// This class may be instantiated and accessed wrapper-side only.
class CefWindowCToCpp
: public CefCToCppRefCounted<CefWindowCToCpp, CefWindow, cef_window_t> {
public:
CefWindowCToCpp();
virtual ~CefWindowCToCpp();
// CefWindow methods.
void Show() override;
void Hide() override;
void CenterWindow(const CefSize& size) override;
void Close() override;
bool IsClosed() override;
void Activate() override;
void Deactivate() override;
bool IsActive() override;
void BringToTop() override;
void SetAlwaysOnTop(bool on_top) override;
bool IsAlwaysOnTop() override;
void Maximize() override;
void Minimize() override;
void Restore() override;
void SetFullscreen(bool fullscreen) override;
bool IsMaximized() override;
bool IsMinimized() override;
bool IsFullscreen() override;
void SetTitle(const CefString& title) override;
CefString GetTitle() override;
void SetWindowIcon(CefRefPtr<CefImage> image) override;
CefRefPtr<CefImage> GetWindowIcon() override;
void SetWindowAppIcon(CefRefPtr<CefImage> image) override;
CefRefPtr<CefImage> GetWindowAppIcon() override;
void ShowMenu(CefRefPtr<CefMenuModel> menu_model,
const CefPoint& screen_point,
cef_menu_anchor_position_t anchor_position) override;
void CancelMenu() override;
CefRefPtr<CefDisplay> GetDisplay() override;
CefRect GetClientAreaBoundsInScreen() override;
void SetDraggableRegions(
const std::vector<CefDraggableRegion>& regions) override;
CefWindowHandle GetWindowHandle() override;
void SendKeyPress(int key_code, uint32 event_flags) override;
void SendMouseMove(int screen_x, int screen_y) override;
void SendMouseEvents(cef_mouse_button_type_t button,
bool mouse_down,
bool mouse_up) override;
void SetAccelerator(int command_id,
int key_code,
bool shift_pressed,
bool ctrl_pressed,
bool alt_pressed) override;
void RemoveAccelerator(int command_id) override;
void RemoveAllAccelerators() override;
// CefPanel methods.
CefRefPtr<CefWindow> AsWindow() override;
CefRefPtr<CefFillLayout> SetToFillLayout() override;
CefRefPtr<CefBoxLayout> SetToBoxLayout(
const CefBoxLayoutSettings& settings) override;
CefRefPtr<CefLayout> GetLayout() override;
void Layout() override;
void AddChildView(CefRefPtr<CefView> view) override;
void AddChildViewAt(CefRefPtr<CefView> view, int index) override;
void ReorderChildView(CefRefPtr<CefView> view, int index) override;
void RemoveChildView(CefRefPtr<CefView> view) override;
void RemoveAllChildViews() override;
size_t GetChildViewCount() override;
CefRefPtr<CefView> GetChildViewAt(int index) override;
// CefView methods.
CefRefPtr<CefBrowserView> AsBrowserView() override;
CefRefPtr<CefButton> AsButton() override;
CefRefPtr<CefPanel> AsPanel() override;
CefRefPtr<CefScrollView> AsScrollView() override;
CefRefPtr<CefTextfield> AsTextfield() override;
CefString GetTypeString() override;
CefString ToString(bool include_children) override;
bool IsValid() override;
bool IsAttached() override;
bool IsSame(CefRefPtr<CefView> that) override;
CefRefPtr<CefViewDelegate> GetDelegate() override;
CefRefPtr<CefWindow> GetWindow() override;
int GetID() override;
void SetID(int id) override;
int GetGroupID() override;
void SetGroupID(int group_id) override;
CefRefPtr<CefView> GetParentView() override;
CefRefPtr<CefView> GetViewForID(int id) override;
void SetBounds(const CefRect& bounds) override;
CefRect GetBounds() override;
CefRect GetBoundsInScreen() override;
void SetSize(const CefSize& size) override;
CefSize GetSize() override;
void SetPosition(const CefPoint& position) override;
CefPoint GetPosition() override;
CefSize GetPreferredSize() override;
void SizeToPreferredSize() override;
CefSize GetMinimumSize() override;
CefSize GetMaximumSize() override;
int GetHeightForWidth(int width) override;
void InvalidateLayout() override;
void SetVisible(bool visible) override;
bool IsVisible() override;
bool IsDrawn() override;
void SetEnabled(bool enabled) override;
bool IsEnabled() override;
void SetFocusable(bool focusable) override;
bool IsFocusable() override;
bool IsAccessibilityFocusable() override;
void RequestFocus() override;
void SetBackgroundColor(cef_color_t color) override;
cef_color_t GetBackgroundColor() override;
bool ConvertPointToScreen(CefPoint& point) override;
bool ConvertPointFromScreen(CefPoint& point) override;
bool ConvertPointToWindow(CefPoint& point) override;
bool ConvertPointFromWindow(CefPoint& point) override;
bool ConvertPointToView(CefRefPtr<CefView> view, CefPoint& point) override;
bool ConvertPointFromView(CefRefPtr<CefView> view, CefPoint& point) override;
};
#endif // CEF_LIBCEF_DLL_CTOCPP_VIEWS_WINDOW_CTOCPP_H_
| [
"magreenblatt@gmail.com"
] | magreenblatt@gmail.com |
f5f4b5cad902c3aa9d532929f0026936c8347ffb | ca29748604f0ab70b0e83f3d9cd4d1ed8684ef98 | /diamond.cpp | 6c9df8b3ec52c21468d83ea1cb0522419da261bd | [] | no_license | Sindhu624/my_first | 26d603ecf704c44ff4285d9ed1fc469d74c661c5 | e407cf294e5ed89d3c6debd044c6bc67e50669bf | refs/heads/master | 2022-02-22T10:45:33.799063 | 2019-10-04T12:20:03 | 2019-10-04T12:20:03 | 206,754,171 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 718 | cpp | #include<iostream>
using namespace std;
class Person {
// Data members of person
public:
Person(int x) { cout << "Person::Person(int ) called" << endl; }
};
class Faculty : public Person {
// data members of Faculty
public:
Faculty(int x):Person(x) {
cout<<"Faculty::Faculty(int ) called"<< endl;
}
};
class Student : public Person {
// data members of Student
public:
Student(int x):Person(x) {
cout<<"Student::Student(int ) called"<< endl;
}
};
class TA : public Faculty, public Student {
public:
TA(int x):Student(x), Faculty(x) {
cout<<"TA::TA(int ) called"<< endl;
}
};
int main() {
TA ta1(30);
}
| [
"Sindhu624"
] | Sindhu624 |
99cf9edd1af81c0ea4048ffdbb9c34817f8acb62 | 87e646034192ec657eead214c2592ac489cc2893 | /chapter4/DepthFirstPaths.hpp | 65182634d68047d9196b060b9b29e0d8c40a3b7e | [] | no_license | LurenAA/Algorithms | 4fcfe5cd99d6f5bc01d86648d2fa8abf919a1c52 | 5750022e75f96cabfdca8518fc9fc22380b393c0 | refs/heads/master | 2020-12-06T06:05:15.933130 | 2020-02-14T13:20:03 | 2020-02-14T13:20:03 | 232,366,889 | 16 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,283 | hpp | /*
* @Author: XiaoGongBai
* @Date: 2020-01-25 19:14:34
* @Last Modified by: XiaoGongBai
* @Last Modified time: 2020-01-25 20:27:27
*/
#pragma once
#include <list>
#include <fstream>
#include <vector>
#include <string>
#include <iterator>
#include <algorithm>
#include <Graph.hpp>
using namespace std;
/**
* 深度优先搜索
* 寻找路径
**/
class DepthFirstPaths
{
public:
DepthFirstPaths(Graph& g, int s);
~DepthFirstPaths() {delete [] edgeTo; delete [] marked;}
bool hasPathTo(int v) const {return marked[v];};
vector<int> pathTo(int v);
private:
void dfs(Graph& g, int v);
int *edgeTo;
bool *marked;
int s; //起点
};
DepthFirstPaths::DepthFirstPaths(Graph& g, int s)
: edgeTo(nullptr), marked(nullptr), s(s)
{
edgeTo = new int [g.V()];
marked = new bool [g.V()] ;
for(int i = 0;i < g.V(); ++i) {
marked[i] = false;
}
dfs(g, s);
}
void DepthFirstPaths::dfs(Graph& g, int v)
{
marked[v] = true;
for(auto x : g.adj(v)) {
if(!marked[x]) {
edgeTo[x] = v;
dfs(g, x);
}
}
}
vector<int>
DepthFirstPaths::pathTo(int v)
{
vector<int> vec;
if(!marked[v]) return vec;
vec.push_back(v);
while(v != s)
{
v = edgeTo[v];
vec.push_back(v);
}
reverse(vec.begin(), vec.end());
return vec;
} | [
"978601499@qq.com"
] | 978601499@qq.com |
8dd03c25d7cd6f47225b05cacb6285e0419a37e7 | 1414c4394b3f3fbd8f2ee027e699277a2f704374 | /node/src/node_clock.cpp | d340aa7dca1b0680dc32872f049ddc05f711c7ba | [
"Apache-2.0"
] | permissive | tempbottle/sopmq | f6810258d872d00c557007e9f388652dee3b348e | c940bcba5f9f69190e73f1628909ec344acdb374 | refs/heads/master | 2021-01-15T18:22:15.875738 | 2014-11-29T05:28:26 | 2014-11-29T05:28:26 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,029 | cpp | /*
* SOPMQ - Scalable optionally persistent message queue
* Copyright 2014 InWorldz, LLC
*
* 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 "node_clock.h"
#include "comparison_error.h"
namespace sopmq {
namespace node {
void node_clock::to_protobuf(NodeClock* pbclock) const
{
pbclock->set_node_id(this->node_id);
pbclock->set_generation(this->generation);
pbclock->set_clock(this->clock);
}
bool operator ==(const node_clock& lhs, const node_clock& rhs)
{
return lhs.node_id == rhs.node_id &&
lhs.generation == rhs.generation &&
lhs.clock == rhs.clock;
}
bool operator !=(const node_clock& lhs, const node_clock& rhs)
{
return !(lhs == rhs);
}
bool operator <(const node_clock& lhs, const node_clock& rhs)
{
if (lhs.node_id != rhs.node_id)
{
throw comparison_error("< and > not valid for node_clocks on different servers");
}
if (lhs.generation < rhs.generation ||
(lhs.generation == rhs.generation && lhs.clock < rhs.clock))
{
return true;
}
return false;
}
bool operator >(const node_clock& lhs, const node_clock& rhs)
{
return (!(lhs < rhs)) && (lhs != rhs);
}
}
} | [
"david.daeschler@gmail.com"
] | david.daeschler@gmail.com |
370b7d684a5b6080d5fdf55a4679f0d1d61306e1 | 6b2a8dd202fdce77c971c412717e305e1caaac51 | /solutions_2464487_0/C++/haker4o/A.cpp | d428bebf6e5b4b36ebc06e8f70f5138801bc6a36 | [] | no_license | alexandraback/datacollection | 0bc67a9ace00abbc843f4912562f3a064992e0e9 | 076a7bc7693f3abf07bfdbdac838cb4ef65ccfcf | refs/heads/master | 2021-01-24T18:27:24.417992 | 2017-05-23T09:23:38 | 2017-05-23T09:23:38 | 84,313,442 | 2 | 4 | null | null | null | null | UTF-8 | C++ | false | false | 1,051 | cpp | #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <vector>
#include <string>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <queue>
#include <set>
#include <map>
#include <stack>
#include <sstream>
#define mp make_pair
#define MAXLL ((1LL<<63)-1)
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
ll Sk(ll a, ll k) {
ll res=a+2*k-2;
if (MAXLL / res < k) return MAXLL;
res *= k;
return res;
}
int main() {
freopen("A-small-attempt0.in", "r", stdin);
freopen("A-small-attempt0.out", "w", stdout);
int T, NT;
ll i, j;
ll r, t;
cin>>NT;
ll res;
for(T=1; T<=NT; ++T) {
cin>>r>>t;
res = 0;
ll b, e;
b = 0;
e = (1LL<<40);
ll a = 2*r+1;
while(e-b>1) {
ll m = (b+e)/2;
if (Sk(a, m) <= t) b = m;
else e = m;
}
cout<<"Case #"<<T<<": "<<b<<endl;
}
return 0;
}
| [
"eewestman@gmail.com"
] | eewestman@gmail.com |
4ba32c4d678d61f7a0106a46cea5a782808b40c4 | 6a4a2eb5cb08ea805733bd677ec44c62fb32ee91 | /host/test/cache.cpp | 7b9e0fb60cdbe39c1e2eb3b7dae946dc46fdc28f | [] | no_license | agrigomi/pre-te-o | 7b737dc715b6432880aeaa030421d35c0620d0c3 | ed469c549b1571e1dadf186330ee4c44d001925e | refs/heads/master | 2020-05-15T13:41:51.793581 | 2019-04-19T18:44:28 | 2019-04-19T18:44:28 | 182,310,069 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 32 | cpp | ../../core/driver/bdev/cache.cpp | [
"agrigomi@abv.bg"
] | agrigomi@abv.bg |
2451b77db070a35a7ddd92cf242502cc9ba3e902 | 6dfdbefc50f6dc4aa84e01ac2aabf0df5d07ca39 | /mudclient/src/propertiesPages/propertiesPageHotkeys.h | 2ad1d9423e90d6f4c7709c2bda523b26b087b24b | [] | no_license | kvirund/tortilla | 04a6f8c1802294f09db79c5b61e675c8da54d8b9 | 338f2cf575a8b90057d291ba79a164ade749a635 | refs/heads/master | 2020-04-08T03:48:49.591154 | 2018-11-30T02:34:48 | 2018-11-30T02:34:48 | 158,787,484 | 0 | 0 | null | 2018-11-23T06:01:59 | 2018-11-23T06:01:58 | null | WINDOWS-1251 | C++ | false | false | 19,299 | h | #pragma once
#include "hotkeyTable.h"
#include "propertiesSaveHelper.h"
class HotkeyBox : public CWindowImpl<HotkeyBox, CEdit>
{
HotkeyTable m_table;
BEGIN_MSG_MAP(HotkeyBox)
MESSAGE_HANDLER(WM_KEYUP, OnKeyUp)
MESSAGE_HANDLER(WM_SYSKEYUP, OnKeyUp)
MESSAGE_HANDLER(WM_KEYDOWN, OnBlock)
MESSAGE_HANDLER(WM_SYSKEYDOWN, OnBlock)
MESSAGE_HANDLER(WM_CHAR, OnBlock)
END_MSG_MAP()
LRESULT OnKeyUp(UINT, WPARAM wparam, LPARAM lparam, BOOL& bHandled)
{
tstring key;
m_table.recognize(wparam, lparam, &key);
if (!key.empty())
{
SetWindowText(key.c_str());
::SendMessage(GetParent(), WM_USER, 0, 0);
}
else
bHandled = FALSE;
return 0;
}
LRESULT OnBlock(UINT, WPARAM, LPARAM, BOOL& bHandled)
{
return 0;
}
};
class PropertyHotkeys : public CDialogImpl<PropertyHotkeys>
{
PropertiesValues *propValues;
PropertiesValues *propGroups;
PropertiesValuesT<tstring> m_list_values;
std::vector<int> m_list_positions;
PropertyListCtrl m_list;
CBevelLine m_bl1;
CBevelLine m_bl2;
HotkeyBox m_hotkey;
CEdit m_text;
CButton m_add;
CButton m_del;
CButton m_replace;
CButton m_reset;
CButton m_up;
CButton m_down;
CComboBox m_filter;
CComboBox m_cbox;
int m_filterMode;
tstring m_currentGroup;
tstring m_loadedGroup;
bool m_deleted;
bool m_update_mode;
PropertiesDlgPageState *dlg_state;
PropertiesSaveHelper m_state_helper;
public:
enum { IDD = IDD_PROPERTY_HOTKEYS };
PropertyHotkeys(PropertiesData *data) : propValues(NULL), propGroups(NULL), m_filterMode(0), m_deleted(false), m_update_mode(false), dlg_state(NULL)
{
propValues = &data->hotkeys;
propGroups = &data->groups;
}
void setParams( PropertiesDlgPageState *state)
{
dlg_state = state;
}
bool updateChangedTemplate(bool check)
{
int item = m_list.getOnlySingleSelection();
if (item != -1)
{
tstring pattern;
getWindowText(m_hotkey, &pattern);
property_value& v = m_list_values.getw(item);
if (v.key != pattern && !pattern.empty())
{
if (!check) {
tstring text;
getWindowText(m_text, &text);
v.key = pattern; v.value = text; v.group = m_currentGroup;
}
return true;
}
}
return false;
}
private:
BEGIN_MSG_MAP(PropertyHotkeys)
MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
MESSAGE_HANDLER(WM_DESTROY, OnCloseDialog)
MESSAGE_HANDLER(WM_SHOWWINDOW, OnShowWindow)
MESSAGE_HANDLER(WM_USER+1, OnSetFocus)
MESSAGE_HANDLER(WM_USER, OnHotkeyEditChanged)
MESSAGE_HANDLER(WM_USER+2, OnKeyDown)
COMMAND_ID_HANDLER(IDC_BUTTON_ADD, OnAddElement)
COMMAND_ID_HANDLER(IDC_BUTTON_DEL, OnDeleteElement)
COMMAND_ID_HANDLER(IDC_BUTTON_REPLACE, OnReplaceElement)
COMMAND_ID_HANDLER(IDC_BUTTON_RESET, OnResetData)
COMMAND_ID_HANDLER(IDC_BUTTON_UP, OnUpElement)
COMMAND_ID_HANDLER(IDC_BUTTON_DOWN, OnDownElement)
COMMAND_HANDLER(IDC_COMBO_FILTER, CBN_SELCHANGE, OnFilter)
COMMAND_HANDLER(IDC_COMBO_GROUP, CBN_SELCHANGE, OnGroupChanged)
COMMAND_HANDLER(IDC_EDIT_HOTKEY_TEXT, EN_CHANGE, OnHotkeyTextChanged)
NOTIFY_HANDLER(IDC_LIST, LVN_ITEMCHANGED, OnListItemChanged)
NOTIFY_HANDLER(IDC_LIST, NM_SETFOCUS, OnListItemChanged)
//NOTIFY_HANDLER(IDC_LIST, NM_KILLFOCUS, OnListKillFocus)
REFLECT_NOTIFICATIONS()
END_MSG_MAP()
LRESULT OnKeyDown(UINT, WPARAM wparam, LPARAM, BOOL&)
{
if (wparam == VK_DELETE)
{
if (m_del.IsWindowEnabled()) {
BOOL b = FALSE;
OnDeleteElement(0, 0, 0, b);
}
return 1;
}
return 0;
}
LRESULT OnAddElement(WORD, WORD, HWND, BOOL&)
{
tstring hotkey, text;
getWindowText(m_hotkey, &hotkey);
getWindowText(m_text, &text);
int index = m_list_values.find(hotkey, m_currentGroup);
if (index == -1 && m_filterMode)
{
int index2 = propValues->find(hotkey, m_currentGroup);
if (index2 != -1)
propValues->del(index2);
}
if (index == -1)
{
index = m_list.getOnlySingleSelection() + 1;
m_list_values.insert(index, hotkey, text, m_currentGroup);
m_list.addItem(index, 0, hotkey);
m_list.addItem(index, 1, text);
m_list.addItem(index, 2, m_currentGroup);
}
else
{
m_list_values.add(index, hotkey, text, m_currentGroup);
m_list.setItem(index, 0, hotkey);
m_list.setItem(index, 1, text);
m_list.setItem(index, 2, m_currentGroup);
}
m_list.SelectItem(index);
m_list.SetFocus();
return 0;
}
LRESULT OnDeleteElement(WORD, WORD, HWND, BOOL&)
{
std::vector<int> selected;
m_list.getSelected(&selected);
int items = selected.size();
if (items == 1)
m_deleted = true;
for (int i = 0; i < items; ++i)
{
int index = selected[i];
m_list.DeleteItem(index);
m_list_values.del(index);
if (m_filterMode)
m_list_positions.erase(m_list_positions.begin()+index);
}
m_deleted = false;
m_list.SetFocus();
return 0;
}
LRESULT OnReplaceElement(WORD, WORD, HWND, BOOL&)
{
tstring hotkey, text;
getWindowText(m_hotkey, &hotkey);
getWindowText(m_text, &text);
int index = m_list.getOnlySingleSelection();
m_list_values.add(index, hotkey, text, m_currentGroup);
m_list.setItem(index, 0, hotkey);
m_list.setItem(index, 1, text);
m_list.setItem(index, 2, m_currentGroup);
m_list.SelectItem(index);
m_list.SetFocus();
return 0;
}
LRESULT OnResetData(WORD, WORD, HWND, BOOL&)
{
m_update_mode = true;
m_text.SetWindowText(L"");
m_hotkey.SetWindowText(L"");
m_list.SelectItem(-1);
updateButtons();
m_hotkey.SetFocus();
m_update_mode = false;
return 0;
}
LRESULT OnUpElement(WORD, WORD, HWND, BOOL&)
{
propertiesUpDown<tstring> ud;
ud.up(m_list, m_list_values, false);
return 0;
}
LRESULT OnDownElement(WORD, WORD, HWND, BOOL&)
{
propertiesUpDown<tstring> ud;
ud.down(m_list, m_list_values, false);
return 0;
}
LRESULT OnFilter(WORD, WORD, HWND, BOOL&)
{
saveValues();
m_filterMode = m_filter.GetCurSel();
loadValues();
update();
updateButtons();
m_state_helper.setCanSaveState();
return 0;
}
LRESULT OnGroupChanged(WORD, WORD, HWND, BOOL&)
{
tstring group;
getCurrentGroup(&group);
if (m_currentGroup == group) return 0;
tstring pattern;
getWindowText(m_hotkey, &pattern);
m_currentGroup = group;
int index = m_list_values.find(pattern, group);
if (index != -1)
{
m_list.SelectItem(index);
updateButtons();
return 0;
}
if (m_filterMode && m_list.GetSelectedCount() == 0) {
loadValues();
update();
}
updateButtons();
return 0;
}
LRESULT OnHotkeyEditChanged(UINT, WPARAM, LPARAM, BOOL&)
{
if (m_update_mode)
return 0;
BOOL currelement = FALSE;
int len = m_hotkey.GetWindowTextLength();
int selected = m_list.getOnlySingleSelection();
if (len > 0)
{
tstring hotkey;
getWindowText(m_hotkey, &hotkey);
int index = m_list_values.find(hotkey, m_currentGroup);
if (index != -1 && !currelement)
{
m_list.SelectItem(index);
m_hotkey.SetSel(len, len);
}
}
updateButtons();
return 0;
}
bool updateCurrentItem()
{
int item = m_list.getOnlySingleSelection();
if (item == -1) return false;
m_update_mode = true;
tstring hotkey;
getWindowText(m_hotkey, &hotkey);
property_value& v = m_list_values.getw(item);
if (v.key != hotkey) return false;
tstring text;
getWindowText(m_text, &text);
if (v.value != text)
{
v.value = text;
m_list.setItem(item, 1, text);
}
if (v.group != m_currentGroup)
{
v.group = m_currentGroup;
m_list.setItem(item, 2, m_currentGroup);
}
m_update_mode = false;
return true;
}
LRESULT OnHotkeyTextChanged(WORD, WORD, HWND, BOOL&)
{
if (m_update_mode)
return 0;
int item = m_list.getOnlySingleSelection();
if (item != -1)
{
const property_value& v = m_list_values.get(item);
if (v.group != m_currentGroup)
return 0;
}
updateCurrentItem();
return 0;
}
LRESULT OnListItemChanged(int , LPNMHDR , BOOL&)
{
if (m_update_mode)
return 0;
m_update_mode = true;
int items_selected = m_list.GetSelectedCount();
if (items_selected == 0)
{
if (!m_deleted)
{
m_hotkey.SetWindowText(L"");
m_text.SetWindowText(L"");
}
}
else if (items_selected == 1)
{
int item = m_list.getOnlySingleSelection();
const property_value& v = m_list_values.get(item);
m_hotkey.SetWindowText( v.key.c_str() );
m_text.SetWindowText( v.value.c_str() );
int index = getGroupIndex(v.group);
m_cbox.SetCurSel(index);
m_currentGroup = v.group;
}
else
{
m_hotkey.SetWindowText(L"");
m_text.SetWindowText(L"");
}
updateButtons();
m_update_mode = false;
return 0;
}
LRESULT OnShowWindow(UINT, WPARAM wparam, LPARAM, BOOL&)
{
if (wparam)
{
loadValues();
m_update_mode = true;
m_hotkey.SetWindowText(L"");
m_text.SetWindowText(L"");
m_update_mode = false;
update();
PostMessage(WM_USER+1); // OnSetFocus to list
m_state_helper.setCanSaveState();
}
else
{
saveValues();
}
return 0;
}
LRESULT OnSetFocus(UINT, WPARAM, LPARAM, BOOL&)
{
m_list.SetFocus();
return 0;
}
LRESULT OnInitDialog(UINT, WPARAM, LPARAM, BOOL&)
{
m_hotkey.SubclassWindow(GetDlgItem(IDC_EDIT_HOTKEY));
m_text.Attach(GetDlgItem(IDC_EDIT_HOTKEY_TEXT));
m_add.Attach(GetDlgItem(IDC_BUTTON_ADD));
m_del.Attach(GetDlgItem(IDC_BUTTON_DEL));
m_replace.Attach(GetDlgItem(IDC_BUTTON_REPLACE));
m_reset.Attach(GetDlgItem(IDC_BUTTON_RESET));
m_up.Attach(GetDlgItem(IDC_BUTTON_UP));
m_down.Attach(GetDlgItem(IDC_BUTTON_DOWN));
m_filter.Attach(GetDlgItem(IDC_COMBO_FILTER));
m_list.Attach(GetDlgItem(IDC_LIST));
m_list.addColumn(L"Hotkey", 20);
m_list.addColumn(L"Текст", 60);
m_list.addColumn(L"Группа", 20);
m_list.SetExtendedListViewStyle( m_list.GetExtendedListViewStyle() | LVS_EX_GRIDLINES | LVS_EX_FULLROWSELECT);
m_list.setKeyDownMessageHandler(m_hWnd, WM_USER+2);
m_bl1.SubclassWindow(GetDlgItem(IDC_STATIC_BL1));
m_bl2.SubclassWindow(GetDlgItem(IDC_STATIC_BL2));
m_cbox.Attach(GetDlgItem(IDC_COMBO_GROUP));
m_state_helper.init(dlg_state, &m_list);
m_state_helper.loadGroupAndFilter(m_currentGroup, m_filterMode);
m_filter.AddString(L"Все группы");
m_filter.AddString(L"Текущая группа");
m_filter.AddString(L"Активные группы");
m_filter.SetCurSel(m_filterMode);
loadValues();
updateButtons();
return 0;
}
LRESULT OnCloseDialog(UINT, WPARAM, LPARAM, BOOL&)
{
saveValues();
return 0;
}
void update()
{
int current_index = 0;
m_cbox.ResetContent();
for (int i=0,e=propGroups->size(); i<e; ++i)
{
const property_value& g = propGroups->get(i);
int pos = m_cbox.AddString(g.key.c_str());
if (g.key == m_currentGroup)
{ current_index = pos; }
}
m_cbox.SetCurSel(current_index);
getCurrentGroup(&m_currentGroup);
m_list.DeleteAllItems();
for (int i=0,e=m_list_values.size(); i<e; ++i)
{
const property_value& v = m_list_values.get(i);
m_list.addItem(i, 0, v.key);
m_list.addItem(i, 1, v.value);
m_list.addItem(i, 2, v.group);
}
m_state_helper.loadCursorAndTopPos(2);
}
void updateButtons()
{
if (m_filterMode == 2 && m_cbox.GetCount() == 0) {
m_add.EnableWindow(FALSE);
m_del.EnableWindow(FALSE);
m_up.EnableWindow(FALSE);
m_down.EnableWindow(FALSE);
m_replace.EnableWindow(FALSE);
m_reset.EnableWindow(FALSE);
return;
}
m_reset.EnableWindow(TRUE);
bool pattern_empty = m_hotkey.GetWindowTextLength() == 0;
bool text_empty = m_text.GetWindowTextLength() == 0;
int items_selected = m_list.GetSelectedCount();
if (items_selected == 0)
{
m_add.EnableWindow(pattern_empty ? FALSE : TRUE);
m_del.EnableWindow(FALSE);
m_up.EnableWindow(FALSE);
m_down.EnableWindow(FALSE);
m_replace.EnableWindow(FALSE);
}
else if(items_selected == 1)
{
m_del.EnableWindow(TRUE);
m_up.EnableWindow(TRUE);
m_down.EnableWindow(TRUE);
bool mode = FALSE;
if (!pattern_empty)
{
int selected = m_list.getOnlySingleSelection();
const property_value& v = m_list_values.get(selected);
mode = TRUE;
if (m_currentGroup == v.group)
{
tstring pattern;
getWindowText(m_hotkey, &pattern);
mode = (pattern == v.key) ? FALSE : TRUE;
}
}
m_replace.EnableWindow(mode);
m_add.EnableWindow(mode);
}
else
{
m_add.EnableWindow(FALSE);
m_del.EnableWindow(TRUE);
m_up.EnableWindow(TRUE);
m_down.EnableWindow(TRUE);
m_replace.EnableWindow(FALSE);
}
}
void swapItems(int index1, int index2)
{
const property_value& i1 = m_list_values.get(index1);
const property_value& i2 = m_list_values.get(index2);
m_list.setItem(index1, 0, i2.key);
m_list.setItem(index1, 1, i2.value);
m_list.setItem(index1, 2, i2.group);
m_list.setItem(index2, 0, i1.key);
m_list.setItem(index2, 1, i1.value);
m_list.setItem(index2, 2, i1.group);
m_list_values.swap(index1, index2);
}
void loadValues()
{
m_loadedGroup = m_currentGroup;
if (!m_filterMode)
{
m_list_values = *propValues;
return;
}
PropertiesGroupFilter gf(propGroups);
m_list_values.clear();
m_list_positions.clear();
for (int i=0,e=propValues->size(); i<e; ++i)
{
const property_value& v = propValues->get(i);
if (m_filterMode == 1) {
if (v.group != m_currentGroup)
continue;
}
else if (m_filterMode == 2) {
if (!gf.isGroupActive(v.group))
continue;
}
else {
assert(false);
}
m_list_values.add(-1, v.key, v.value, v.group);
m_list_positions.push_back(i);
}
}
void saveValues()
{
if (!m_state_helper.save(m_loadedGroup, m_filterMode))
return;
if (!m_filterMode)
{
*propValues = m_list_values;
return;
}
PropertiesGroupFilter gf(propGroups);
std::vector<int> todelete;
for (int i=0,e=propValues->size(); i<e; ++i)
{
const property_value& v = propValues->get(i);
bool filter = false;
if (m_filterMode == 1) {
filter = (v.group == m_loadedGroup);
} else if (m_filterMode == 2) {
filter = gf.isGroupActive(v.group);
} else {
assert(false);
}
if (filter)
{
bool exist = std::find(m_list_positions.begin(), m_list_positions.end(), i) != m_list_positions.end();
if (!exist)
todelete.push_back(i);
}
}
for (int i=todelete.size()-1; i>=0; --i)
{
int pos = todelete[i];
propValues->del(pos);
for (int j=0,je=m_list_positions.size();j<je;++j) {
if (m_list_positions[j] > pos)
m_list_positions[j]--;
}
}
todelete.clear();
int pos_count = m_list_positions.size();
int elem_count = m_list_values.size();
for (int i=0; i<elem_count; ++i)
{
int index = (i < pos_count) ? m_list_positions[i] : -1;
const property_value& v = m_list_values.get(i);
int pos = propValues->find(v.key, v.group);
if (pos != -1 && pos != index)
todelete.push_back(pos);
propValues->add(index, v.key, v.value, v.group);
}
for (int i=todelete.size()-1; i>=0; --i)
{
int pos = todelete[i];
propValues->del(pos);
}
}
int getGroupIndex(const tstring& group)
{
int count = m_cbox.GetCount();
MemoryBuffer mb;
for (int i=0; i<count; ++i)
{
int len = m_cbox.GetLBTextLen(i) + 1;
mb.alloc(len * sizeof(tchar));
tchar* buffer = reinterpret_cast<tchar*>(mb.getData());
m_cbox.GetLBText(i, buffer);
tstring name(buffer);
if (group == name)
return i;
}
return -1;
}
void getCurrentGroup(tstring *group)
{
int index = m_cbox.GetCurSel();
if (index == -1) return;
int len = m_cbox.GetLBTextLen(index) + 1;
WCHAR *buffer = new WCHAR[len];
m_cbox.GetLBText(index, buffer);
group->assign(buffer);
delete[]buffer;
}
};
| [
"gm79@list.ru"
] | gm79@list.ru |
5803af6c99ccc2343e5f7b19346e63f75f6ead0c | 5456502f97627278cbd6e16d002d50f1de3da7bb | /device/geolocation/geolocation_provider_impl.cc | 298366f8b49aa61fdcdd19e1c249c7f491006c7f | [
"BSD-3-Clause"
] | permissive | TrellixVulnTeam/Chromium_7C66 | 72d108a413909eb3bd36c73a6c2f98de1573b6e5 | c8649ab2a0f5a747369ed50351209a42f59672ee | refs/heads/master | 2023-03-16T12:51:40.231959 | 2017-12-20T10:38:26 | 2017-12-20T10:38:26 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 6,890 | cc | // Copyright (c) 2012 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 "device/geolocation/geolocation_provider_impl.h"
#include <utility>
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/callback.h"
#include "base/lazy_instance.h"
#include "base/location.h"
#include "base/logging.h"
#include "base/memory/ptr_util.h"
#include "base/memory/singleton.h"
#include "base/single_thread_task_runner.h"
#include "base/threading/thread_task_runner_handle.h"
#include "device/geolocation/geolocation_delegate.h"
#include "device/geolocation/location_arbitrator.h"
namespace device {
namespace {
base::LazyInstance<std::unique_ptr<GeolocationDelegate>>::Leaky g_delegate =
LAZY_INSTANCE_INITIALIZER;
} // anonymous namespace
// static
GeolocationProvider* GeolocationProvider::GetInstance() {
return GeolocationProviderImpl::GetInstance();
}
// static
void GeolocationProvider::SetGeolocationDelegate(
GeolocationDelegate* delegate) {
DCHECK(!g_delegate.Get());
g_delegate.Get().reset(delegate);
}
std::unique_ptr<GeolocationProvider::Subscription>
GeolocationProviderImpl::AddLocationUpdateCallback(
const LocationUpdateCallback& callback,
bool enable_high_accuracy) {
DCHECK(main_task_runner_->BelongsToCurrentThread());
std::unique_ptr<GeolocationProvider::Subscription> subscription;
if (enable_high_accuracy) {
subscription = high_accuracy_callbacks_.Add(callback);
} else {
subscription = low_accuracy_callbacks_.Add(callback);
}
OnClientsChanged();
if (position_.Validate() ||
position_.error_code != Geoposition::ERROR_CODE_NONE) {
callback.Run(position_);
}
return subscription;
}
void GeolocationProviderImpl::UserDidOptIntoLocationServices() {
DCHECK(main_task_runner_->BelongsToCurrentThread());
bool was_permission_granted = user_did_opt_into_location_services_;
user_did_opt_into_location_services_ = true;
if (IsRunning() && !was_permission_granted)
InformProvidersPermissionGranted();
}
void GeolocationProviderImpl::OverrideLocationForTesting(
const Geoposition& position) {
DCHECK(main_task_runner_->BelongsToCurrentThread());
ignore_location_updates_ = true;
NotifyClients(position);
}
void GeolocationProviderImpl::OnLocationUpdate(const LocationProvider* provider,
const Geoposition& position) {
DCHECK(OnGeolocationThread());
// Will be true only in testing.
if (ignore_location_updates_)
return;
main_task_runner_->PostTask(
FROM_HERE, base::Bind(&GeolocationProviderImpl::NotifyClients,
base::Unretained(this), position));
}
// static
GeolocationProviderImpl* GeolocationProviderImpl::GetInstance() {
return base::Singleton<GeolocationProviderImpl>::get();
}
GeolocationProviderImpl::GeolocationProviderImpl()
: base::Thread("Geolocation"),
user_did_opt_into_location_services_(false),
ignore_location_updates_(false),
main_task_runner_(base::ThreadTaskRunnerHandle::Get()) {
DCHECK(main_task_runner_->BelongsToCurrentThread());
high_accuracy_callbacks_.set_removal_callback(base::Bind(
&GeolocationProviderImpl::OnClientsChanged, base::Unretained(this)));
low_accuracy_callbacks_.set_removal_callback(base::Bind(
&GeolocationProviderImpl::OnClientsChanged, base::Unretained(this)));
}
GeolocationProviderImpl::~GeolocationProviderImpl() {
Stop();
DCHECK(!arbitrator_);
}
void GeolocationProviderImpl::SetArbitratorForTesting(
std::unique_ptr<LocationProvider> arbitrator) {
arbitrator_ = std::move(arbitrator);
}
bool GeolocationProviderImpl::OnGeolocationThread() const {
return task_runner()->BelongsToCurrentThread();
}
void GeolocationProviderImpl::OnClientsChanged() {
DCHECK(main_task_runner_->BelongsToCurrentThread());
base::Closure task;
if (high_accuracy_callbacks_.empty() && low_accuracy_callbacks_.empty()) {
DCHECK(IsRunning());
if (!ignore_location_updates_) {
// We have no more observers, so we clear the cached geoposition so that
// when the next observer is added we will not provide a stale position.
position_ = Geoposition();
}
task = base::Bind(&GeolocationProviderImpl::StopProviders,
base::Unretained(this));
} else {
if (!IsRunning()) {
Start();
if (user_did_opt_into_location_services_)
InformProvidersPermissionGranted();
}
// Determine a set of options that satisfies all clients.
bool enable_high_accuracy = !high_accuracy_callbacks_.empty();
// Send the current options to the providers as they may have changed.
task = base::Bind(&GeolocationProviderImpl::StartProviders,
base::Unretained(this), enable_high_accuracy);
}
task_runner()->PostTask(FROM_HERE, task);
}
void GeolocationProviderImpl::StopProviders() {
DCHECK(OnGeolocationThread());
DCHECK(arbitrator_);
arbitrator_->StopProvider();
}
void GeolocationProviderImpl::StartProviders(bool enable_high_accuracy) {
DCHECK(OnGeolocationThread());
DCHECK(arbitrator_);
arbitrator_->StartProvider(enable_high_accuracy);
}
void GeolocationProviderImpl::InformProvidersPermissionGranted() {
DCHECK(IsRunning());
if (!OnGeolocationThread()) {
task_runner()->PostTask(
FROM_HERE,
base::Bind(&GeolocationProviderImpl::InformProvidersPermissionGranted,
base::Unretained(this)));
return;
}
DCHECK(OnGeolocationThread());
DCHECK(arbitrator_);
arbitrator_->OnPermissionGranted();
}
void GeolocationProviderImpl::NotifyClients(const Geoposition& position) {
DCHECK(main_task_runner_->BelongsToCurrentThread());
DCHECK(position.Validate() ||
position.error_code != Geoposition::ERROR_CODE_NONE);
position_ = position;
high_accuracy_callbacks_.Notify(position_);
low_accuracy_callbacks_.Notify(position_);
}
void GeolocationProviderImpl::Init() {
DCHECK(OnGeolocationThread());
if (!arbitrator_) {
LocationProvider::LocationProviderUpdateCallback callback = base::Bind(
&GeolocationProviderImpl::OnLocationUpdate, base::Unretained(this));
// Use the embedder's |g_delegate| or fall back to the default one.
if (!g_delegate.Get())
g_delegate.Get().reset(new GeolocationDelegate);
arbitrator_ = base::MakeUnique<LocationArbitrator>(
base::WrapUnique(g_delegate.Get().get()));
arbitrator_->SetUpdateCallback(callback);
}
}
void GeolocationProviderImpl::CleanUp() {
DCHECK(OnGeolocationThread());
arbitrator_.reset();
}
} // namespace device
| [
"lixiaodonglove7@aliyun.com"
] | lixiaodonglove7@aliyun.com |
0622c69aa490235a284d6dc86425f07b312e421b | a1d319f22634908f4fb31ac7c2a21f66225cc991 | /Shared/cpp/openfst-1.2.10/src/include/fst/equivalent.h | f778c1e9af854ba84bd3f5ba374c1d647c025e85 | [
"Apache-2.0"
] | permissive | sdl-research/sdl-externals | 2ee2ae43a5d641cc0e2c0a7c642f48d15f32fbeb | 56459e0124eadf38ff551494b81544cb678a71d7 | refs/heads/master | 2021-01-17T15:06:59.783100 | 2016-07-10T06:40:45 | 2016-07-10T06:40:45 | 28,290,682 | 4 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 9,331 | h | // equivalent.h
// 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.
//
// Copyright 2005-2010 Google, Inc.
// Author: wojciech@google.com (Wojciech Skut)
//
// \file Functions and classes to determine the equivalence of two
// FSTs.
#ifndef FST_LIB_EQUIVALENT_H__
#define FST_LIB_EQUIVALENT_H__
#include <algorithm>
#include <deque>
#include <tr1/unordered_map>
#include <utility>
using std::pair; using std::make_pair;
#include <vector>
using std::vector;
#include <fst/encode.h>
#include <fst/push.h>
#include <fst/union-find.h>
#include <fst/vector-fst.h>
namespace fst {
// Traits-like struct holding utility functions/typedefs/constants for
// the equivalence algorithm.
//
// Encoding device: in order to make the statesets of the two acceptors
// disjoint, we map Arc::StateId on the type MappedId. The states of
// the first acceptor are mapped on odd numbers (s -> 2s + 1), and
// those of the second one on even numbers (s -> 2s + 2). The number 0
// is reserved for an implicit (non-final) 'dead state' (required for
// the correct treatment of non-coaccessible states; kNoStateId is
// mapped to kDeadState for both acceptors). The union-find algorithm
// operates on the mapped IDs.
template <class Arc>
struct EquivalenceUtil {
typedef typename Arc::StateId StateId;
typedef typename Arc::Weight Weight;
typedef StateId MappedId; // ID for an equivalence class.
// MappedId for an implicit dead state.
static const MappedId kDeadState = 0;
// MappedId for lookup failure.
static const MappedId kInvalidId = -1;
// Maps state ID to the representative of the corresponding
// equivalence class. The parameter 'which_fst' takes the values 1
// and 2, identifying the input FST.
static MappedId MapState(StateId s, int32 which_fst) {
return
(kNoStateId == s)
?
kDeadState
:
(static_cast<MappedId>(s) << 1) + which_fst;
}
// Maps set ID to State ID.
static StateId UnMapState(MappedId id) {
return static_cast<StateId>((--id) >> 1);
}
// Convenience function: checks if state with MappedId 's' is final
// in acceptor 'fa'.
static bool IsFinal(const Fst<Arc> &fa, MappedId s) {
return
(kDeadState == s) ?
false : (fa.Final(UnMapState(s)) != Weight::Zero());
}
// Convenience function: returns the representative of 'id' in 'sets',
// creating a new set if needed.
static MappedId FindSet(UnionFind<MappedId> *sets, MappedId id) {
MappedId repr = sets->FindSet(id);
if (repr != kInvalidId) {
return repr;
} else {
sets->MakeSet(id);
return id;
}
}
};
template <class Arc> const
typename EquivalenceUtil<Arc>::MappedId EquivalenceUtil<Arc>::kDeadState;
template <class Arc> const
typename EquivalenceUtil<Arc>::MappedId EquivalenceUtil<Arc>::kInvalidId;
// Equivalence checking algorithm: determines if the two FSTs
// <code>fst1</code> and <code>fst2</code> are equivalent. The input
// FSTs must be deterministic input-side epsilon-free acceptors,
// unweighted or with weights over a left semiring. Two acceptors are
// considered equivalent if they accept exactly the same set of
// strings (with the same weights).
//
// The algorithm (cf. Aho, Hopcroft and Ullman, "The Design and
// Analysis of Computer Programs") successively constructs sets of
// states that can be reached by the same prefixes, starting with a
// set containing the start states of both acceptors. A disjoint tree
// forest (the union-find algorithm) is used to represent the sets of
// states. The algorithm returns 'false' if one of the constructed
// sets contains both final and non-final states.
//
// Complexity: quasi-linear, i.e. O(n G(n)), where
// n = |S1| + |S2| is the number of states in both acceptors
// G(n) is a very slowly growing function that can be approximated
// by 4 by all practical purposes.
//
template <class Arc>
bool Equivalent(const Fst<Arc> &fst1,
const Fst<Arc> &fst2,
double delta = kDelta) {
typedef typename Arc::Weight Weight;
// Check that the symbol table are compatible
if (!CompatSymbols(fst1.InputSymbols(), fst2.InputSymbols()) ||
!CompatSymbols(fst1.OutputSymbols(), fst2.OutputSymbols()))
LOG(FATAL) << "Equivalent: input/output symbol tables of 1st argument "
<< "do not match input/output symbol tables of 2nd argument";
// Check properties first:
uint64 props = kNoEpsilons | kIDeterministic | kAcceptor;
if (fst1.Properties(props, true) != props) {
LOG(FATAL) << "Equivalent: first argument not an"
<< " epsilon-free deterministic acceptor";
}
if (fst2.Properties(props, true) != props) {
LOG(FATAL) << "Equivalent: second argument not an"
<< " epsilon-free deterministic acceptor";
}
if ((fst1.Properties(kUnweighted , true) != kUnweighted)
|| (fst2.Properties(kUnweighted , true) != kUnweighted)) {
VectorFst<Arc> efst1(fst1);
VectorFst<Arc> efst2(fst2);
Push(&efst1, REWEIGHT_TO_INITIAL, delta);
Push(&efst2, REWEIGHT_TO_INITIAL, delta);
ArcMap(&efst1, QuantizeMapper<Arc>(delta));
ArcMap(&efst2, QuantizeMapper<Arc>(delta));
EncodeMapper<Arc> mapper(kEncodeWeights|kEncodeLabels, ENCODE);
ArcMap(&efst1, &mapper);
ArcMap(&efst2, &mapper);
return Equivalent(efst1, efst2);
}
// Convenience typedefs:
typedef typename Arc::StateId StateId;
typedef EquivalenceUtil<Arc> Util;
typedef typename Util::MappedId MappedId;
enum { FST1 = 1, FST2 = 2 }; // Required by Util::MapState(...)
MappedId s1 = Util::MapState(fst1.Start(), FST1);
MappedId s2 = Util::MapState(fst2.Start(), FST2);
// The union-find structure.
UnionFind<MappedId> eq_classes(1000, Util::kInvalidId);
// Initialize the union-find structure.
eq_classes.MakeSet(s1);
eq_classes.MakeSet(s2);
// Early return if the start states differ w.r.t. being final.
if (Util::IsFinal(fst1, s1) != Util::IsFinal(fst2, s2)) {
return false;
}
// Data structure for the (partial) acceptor transition function of
// fst1 and fst2: input labels mapped to pairs of MappedId's
// representing destination states of the corresponding arcs in fst1
// and fst2, respectively.
typedef
std::tr1::unordered_map<typename Arc::Label, pair<MappedId, MappedId> >
Label2StatePairMap;
Label2StatePairMap arc_pairs;
// Pairs of MappedId's to be processed, organized in a queue.
deque<pair<MappedId, MappedId> > q;
// Main loop: explores the two acceptors in a breadth-first manner,
// updating the equivalence relation on the statesets. Loop
// invariant: each block of states contains either final states only
// or non-final states only.
for (q.push_back(make_pair(s1, s2)); !q.empty(); q.pop_front()) {
s1 = q.front().first;
s2 = q.front().second;
// Representatives of the equivalence classes of s1/s2.
MappedId rep1 = Util::FindSet(&eq_classes, s1);
MappedId rep2 = Util::FindSet(&eq_classes, s2);
if (rep1 != rep2) {
eq_classes.Union(rep1, rep2);
arc_pairs.clear();
// Copy outgoing arcs starting at s1 into the hashtable.
if (Util::kDeadState != s1) {
ArcIterator<Fst<Arc> > arc_iter(fst1, Util::UnMapState(s1));
for (; !arc_iter.Done(); arc_iter.Next()) {
const Arc &arc = arc_iter.Value();
if (arc.weight != Weight::Zero()) { // Zero-weight arcs
// are treated as
// non-exisitent.
arc_pairs[arc.ilabel].first = Util::MapState(arc.nextstate, FST1);
}
}
}
// Copy outgoing arcs starting at s2 into the hashtable.
if (Util::kDeadState != s2) {
ArcIterator<Fst<Arc> > arc_iter(fst2, Util::UnMapState(s2));
for (; !arc_iter.Done(); arc_iter.Next()) {
const Arc &arc = arc_iter.Value();
if (arc.weight != Weight::Zero()) { // Zero-weight arcs
// are treated as
// non-existent.
arc_pairs[arc.ilabel].second = Util::MapState(arc.nextstate, FST2);
}
}
}
// Iterate through the hashtable and process pairs of target
// states.
for (typename Label2StatePairMap::const_iterator
arc_iter = arc_pairs.begin();
arc_iter != arc_pairs.end();
++arc_iter) {
const pair<MappedId, MappedId> &p = arc_iter->second;
if (Util::IsFinal(fst1, p.first) != Util::IsFinal(fst2, p.second)) {
// Detected inconsistency: return false.
return false;
}
q.push_back(p);
}
}
}
return true;
}
} // namespace fst
#endif // FST_LIB_EQUIVALENT_H__
| [
"mdreyer@sdl.com"
] | mdreyer@sdl.com |
66f7d29ad14eba4e1967df493a8b3d8d40cee0fc | e17c43db9488f57cb835129fa954aa2edfdea8d5 | /Libraries/IFC/IFC4/include/IfcNumericMeasure.h | e023089d1665969c3d7931afe424172261ead4d4 | [] | no_license | claudioperez/Rts | 6e5868ab8d05ea194a276b8059730dbe322653a7 | 3609161c34f19f1649b713b09ccef0c8795f8fe7 | refs/heads/master | 2022-11-06T15:57:39.794397 | 2020-06-27T23:00:11 | 2020-06-27T23:00:11 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 919 | h | /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */
#pragma once
#include <vector>
#include <map>
#include <sstream>
#include <string>
#include "IfcPPBasicTypes.h"
#include "IfcPPObject.h"
#include "IfcPPGlobal.h"
#include "IfcMeasureValue.h"
// TYPE IfcNumericMeasure = NUMBER;
class IFCPP_EXPORT IfcNumericMeasure : public IfcMeasureValue
{
public:
IfcNumericMeasure();
IfcNumericMeasure( int value );
~IfcNumericMeasure();
virtual const char* className() const { return "IfcNumericMeasure"; }
virtual shared_ptr<IfcPPObject> getDeepCopy( IfcPPCopyOptions& options );
virtual void getStepParameter( std::stringstream& stream, bool is_select_type = false ) const;
virtual const std::wstring toString() const;
static shared_ptr<IfcNumericMeasure> createObjectFromSTEP( const std::wstring& arg, const std::map<int,shared_ptr<IfcPPEntity> >& map );
int m_value;
};
| [
"steva44@hotmail.com"
] | steva44@hotmail.com |
1aabad11c009f894aac3f7e5124f7e40c6497cc7 | e6bea28502312c031f522cda6c77005881c9105c | /test/common/TestDiscreteDistribution.cpp | 839a4e413c6a3c51792c0226b872b9937e8164b1 | [] | no_license | tomvidm/preppers-brainstorm-repo | 6ff1d9c3eab91f4849069ab756a28a1add8cb7b2 | 7de21c4734bcafc301478690eb421580370b58bf | refs/heads/master | 2021-08-29T15:46:33.967151 | 2017-12-14T06:32:59 | 2017-12-14T06:32:59 | 110,565,258 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 924 | cpp | #include <vector>
#include "gtest/gtest.h"
#include "common/DiscreteDistribution.h"
TEST(TestDiscreteDistribution, WorkisAsIntended)
{
std::vector<int> w1 = { 4, 3, 2, 1 };
std::vector<int> w2 = { 1, 2, 3, 4 };
int hist1[4];
int hist2[4];
int hist3[4];
common::DiscreteDistribution pdf;
pdf.setWeights(w1);
for (int i = 0; i < 1000; i++)
{
hist1[pdf.rand()]++;
}
for (int i = 0; i < 1000; i++)
{
hist2[pdf.rand(w2)]++;
}
for (int i = 0; i < 1000; i++)
{
hist3[pdf.rand()]++;
}
EXPECT_TRUE(hist1[0] > hist1[1]);
EXPECT_TRUE(hist1[1] > hist1[2]);
EXPECT_TRUE(hist1[2] > hist1[3]);
EXPECT_TRUE(hist2[0] < hist2[1]);
EXPECT_TRUE(hist2[1] < hist2[2]);
EXPECT_TRUE(hist2[2] < hist2[3]);
EXPECT_TRUE(hist3[0] > hist3[1]);
EXPECT_TRUE(hist3[1] > hist3[2]);
EXPECT_TRUE(hist3[2] > hist3[3]);
} | [
"tomvidm@gmail.com"
] | tomvidm@gmail.com |
405cba984f1af2900f30a5141c237a2d567c07b1 | f64462af1aaa8e9be719346f7a57f06e9b4bb984 | /Archive/C++/Data_Structure/Trees/traversal.cpp | ead2c7ecdbc68174065d534569c81130b25221a5 | [] | no_license | tushar-rishav/Algorithms | 4cc5f4b94b5c70d05cf06a5e4394bf2c2670286a | 51062dcdaa5287f457c251de59c8694463e01e99 | refs/heads/master | 2020-05-20T07:27:06.933182 | 2016-11-11T18:50:00 | 2016-11-11T19:33:23 | 40,429,054 | 3 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 2,357 | cpp | /*
Implementation of Preorder, Inorder, Postorder traversals in a Tree
*/
#include <bits/stdc++.h>
using namespace std;
struct node{
int data;
int key;
struct node* left;
struct node* right;
};
class Tree{
private:
node* root;
int node_count = 0;
public:
void insert(node**, int);
node** get_root();
void update_root(node** ptr);
void preorder(node**);
void inorder(node**);
void postorder(node**);
int search(node**, int);
};
node** Tree::get_root()
{
return &(this->root);
}
void Tree::update_root(node** ptr)
{
this->root = *ptr;
}
void Tree::insert(node** head, int item)
{
if(*head){
if((*head)->data > item)
this->insert(&(*head)->left, item);
else
this->insert(&(*head)->right, item);
}
else{
*head = new node; // create a new node to insert the value
(*head)->data = item;
(*head)->left = NULL;
(*head)->right = NULL;
this->node_count++;
(*head)->key = this->node_count;
printf("Node inserted with value : %d\n", item);
}
}
int Tree::search(node** head, int key)
{
if(!*(head))
return -1;
if(key == (*head)->data)
return (*head)->key;
else if(key > (*head)->data)
return (this->search(&((*head)->right),key));
else
return (this->search(&((*head)->left), key));
}
void Tree::preorder(node** head)
{
if(*head){
cout<< (*head)->data<<" ";
this->preorder(&((*head)->left));
this->preorder(&((*head)->right));
}
}
void Tree::inorder(node** head)
{
if(*head){
this->inorder(&((*head)->left));
cout<< (*head)->data<<" ";
this->inorder(&((*head)->right));
}
}
void Tree::postorder(node** head)
{
if(*head){
this->postorder(&((*head)->right));
this->postorder(&((*head)->left));
cout<< (*head)->data<<" ";
}
}
int main()
{
node* head = NULL;
Tree tree;
tree.insert(&head, 10);
tree.insert(&head, 4);
tree.insert(&head, 20);
tree.insert(&head, 30);
tree.insert(&head, 8);
tree.insert(&head, 23);
tree.insert(&head, 1);
tree.insert(&head, 21);
tree.update_root(&head);
tree.preorder(tree.get_root());
cout<<"\tPreorder"<<endl;
tree.inorder(tree.get_root());
cout<<"\tInorder"<<endl;
tree.postorder(tree.get_root());
cout<<"\tPostorder"<<endl;
cout<<"Enter an item to search\t";
int n;
cin>>n;
int pos = tree.search(tree.get_root(),n);
if(pos!=-1)
cout<<"\nFound at position "<<pos<<endl;
else
cout<<"\nNot Found\n";
return 0;
} | [
"tushar.rishav@gmail.com"
] | tushar.rishav@gmail.com |
444bfaa7398dc7325720c2ae0fde90358b2945c7 | ee4b1e3b47252e89af7583d5d62750eef6729ed3 | /10/ConsoleApplication10.cpp | c3cf8070ace45e5a0e41586c6926ed7129158549 | [] | no_license | kadzisu/Zaharov- | 4e9f3f55ed61354319870951fba200c7131f652e | e4935b83106746c02c925341ec6b148697a7b39b | refs/heads/master | 2020-05-04T20:49:08.236269 | 2019-05-16T22:15:44 | 2019-05-16T22:15:44 | 179,452,332 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,148 | cpp | #pragma once
#include "pch.h"
#include <iostream>
#include <string>
#include "Time.h"
using namespace std;
int maxminute = 60;
void Time::setTime(long newHours, unsigned char newMinutes)
{
hours = newHours;
minutes = newMinutes;
}
long Time::getHours()
{
return this->hours;
}
long Time::getMinutes()
{
return this->minutes;
}
Time Time::operator+(Time &plusTime)
{
Time param;
param.hours = this->hours + plusTime.hours;
param.minutes = this->minutes + plusTime.minutes;
if (param.minutes >= maxminute) {
param.hours++;
param.minutes -= maxminute;
}
return param;
}
Time Time::operator-(Time & minusTime)
{
Time param;
param.hours = this->hours - minusTime.hours;
param.minutes = this->minutes - minusTime.minutes;
if (param.minutes <= 0) {
param.hours--;
param.minutes += maxminute;
}
return param;
}
Time Time::operator*(int multTimes)
{
Time param;
unsigned char param2;
param.hours = this->hours * multTimes;
param.minutes = this->minutes * multTimes;
param2 = param.minutes / maxminute;
param.hours += (int)param2;
while (param.minutes >= maxminute)
param.minutes -= maxminute;
return param;
}
bool Time::operator<(Time & minusTimes)
{
if (this->hours < minusTimes.hours) {
return 1;
}
else if (this->hours == minusTimes.hours) {
if (this->minutes < minusTimes.minutes) {
return 1;
}
else if (this->minutes == minusTimes.minutes) {
return 0;
}
else {
return 0;
}
}
else {
return 0;
}
}
bool Time::operator>(Time & minusTimes)
{
if (this->hours > minusTimes.hours) {
return 1;
}
else if (this->hours == minusTimes.hours) {
if (this->minutes > minusTimes.minutes) {
return 1;
}
else if (this->minutes == minusTimes.minutes) {
return 0;
}
else {
return 0;
}
}
else {
return 0;
}
}
bool Time::operator<=(Time & minusTimes)
{
if (this->hours <= minusTimes.hours) {
if (this->hours == minusTimes.hours) {
if (this->minutes <= minusTimes.minutes) {
return 1;
}
else {
return 0;
}
}
else {
return 1;
}
}
else {
return 0;
}
}
bool Time::operator>=(Time & minusTimes)
{
if (this->hours >= minusTimes.hours) {
if (this->hours == minusTimes.hours) {
if (this->minutes >= minusTimes.minutes) {
return 1;
}
else{
return 0;
}
}
else {
return 1;
}
}
else {
return 0;
}
}
bool Time::operator==(Time & minusTimes)
{
if (this->hours == minusTimes.hours && this->minutes == minusTimes.minutes) {
return 1;
}
else {
return 0;
}
}
bool Time::operator!=(Time & minusTimes)
{
if (this->hours != minusTimes.hours || this->minutes != minusTimes.minutes) {
return 1;
}
else {
return 0;
}
}
void Time::Result()
{
cout << this->hours << " hours " << this->minutes << " minuts" << endl;
}
void Time::Result2(Time param1, Time param2, std::string param3)
{
cout << endl;
param1.Result();
cout << " "<< param3 << " ";
param2.Result();
}
void main()
{
Time a;
Time b;
Time plus;
Time minus;
Time umnoj;
Time sravnenie;
Time arrA[10];
int chisloUmnoj = 7;
a.setTime(10, 42);
b.setTime(4, 30);
plus=a+b;
minus=a-b;
umnoj =a*valueMult;
plus.Result();
minus.Result();
umnoj.Result();
if (a < b)
sravnenie.Result2(a, b, "<");
if (a > b)
sravnenie.Result2(a, b, ">");
if (a <= b)
sravnenie.Result2(a, b, "<=");
if (a >= b)
sravnenie.Result2(a, b, ">=");
if (a == b)
sravnenie.Result2(a, b, "==");
if (a != b)
sravnenie.Result2(a, b, "!=");
for (int i = 0; i < 10; i++)
{
arrA[i].setTime(rand() % 23 +1 ,rand() % 59 +0);
arrB[i].setTime(rand() % 23 +1,rand() % 59 +0);
}
Time temp;
Time temp2;
//Metod puzirka
for (int i = 0; i < 10 - 1; i++) {
for (int j = 0; j < 10 - i - 1; j++) {
if (arrA[j] > arrA[j + 1]) {
temp = arrA[j];
arrA[j] = arrA[j + 1];
arrA[j + 1] = temp;
}
}
}
for (int i = 0; i < 10; i++)
{
arrA[i].Result();
}
} | [
"noreply@github.com"
] | kadzisu.noreply@github.com |
deb96de62f026156485714813b96eecdc37e10c5 | ab964b34945e3f759818571daa65edde91287ec4 | /chapter2/2_2.cpp | e0265b85a821816be5203374fdbabbb841eb8094 | [] | no_license | wtfenfenmiao/zishuCode | bd53f9f5bfbe498008efecb9a7da8046dc4a8f51 | 11d1b2980c2a7824337c2b058c2e154633c1b164 | refs/heads/master | 2020-03-14T17:19:19.300374 | 2018-10-19T02:23:13 | 2018-10-19T02:23:13 | 131,716,561 | 0 | 0 | null | null | null | null | GB18030 | C++ | false | false | 479 | cpp | #include<stdio.h>
int main()
{
int n;
while(scanf("%d",&n)!=EOF)
{
int count=0;
long long temp=n; //输入987654321程序会崩,然而这个987654321在10^9内,所以要加这一个,防止溢出
while(temp>1)
{
if(temp%2==1)
temp=3*temp+1;
else
temp/=2;
++count;
//printf("%d\n",temp); 调试用
}
printf("%d\n",count);
}
}
| [
"wtbupt@outlook.com"
] | wtbupt@outlook.com |
fa366c25dab24747b281a19d30e5690155434fec | bb512814479e2ce521cc442f7bce776e6b78d1ef | /moore/moorenode/daemon.hpp | 59b389f287c548f0ff175ac135fcbf8c3411610b | [
"BSD-2-Clause"
] | permissive | guanzhongheng/project_my | 3cbdf94b7b4ba2f8fc9f91c028338285a4aade35 | 6268a73222dcf3263f5cf8192f374e5c7119ec29 | refs/heads/master | 2020-04-12T10:36:58.724854 | 2018-12-21T07:26:02 | 2018-12-21T07:26:02 | 162,435,264 | 3 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 536 | hpp | #include <moore/node/node.hpp>
#include <moore/node/rpc.hpp>
namespace moore_daemon
{
class daemon
{
public:
void run (boost::filesystem::path const &);
};
class daemon_config
{
public:
daemon_config (boost::filesystem::path const &);
bool deserialize_json (bool &, boost::property_tree::ptree &);
void serialize_json (boost::property_tree::ptree &);
bool upgrade_json (unsigned, boost::property_tree::ptree &);
bool rpc_enable;
rai::rpc_config rpc;
rai::node_config node;
bool opencl_enable;
rai::opencl_config opencl;
};
}
| [
"373284103@qq.com"
] | 373284103@qq.com |
3ebd81cfd02a398474dd86720181a7f32a30ff55 | 309fceba389acdb74c4de9570bfc7c43427372df | /Project2010/Bishamon/include/bm3/core/type/bm3_Keyframe.h | 274a05e25620df472edc0101dc19fc70bb1c3f7d | [] | no_license | Mooliecool/DemiseOfDemon | 29a6f329b4133310d92777a6de591e9b37beea94 | f02f7c68d30953ddcea2fa637a8ac8f7c53fc8b9 | refs/heads/master | 2020-07-16T06:07:48.382009 | 2017-06-08T04:21:48 | 2017-06-08T04:21:48 | null | 0 | 0 | null | null | null | null | WINDOWS-1252 | C++ | false | false | 3,964 | h | #ifndef BM3_SDK_INC_BM3_CORE_TYPE_BM3_KEYFRAME_H
#define BM3_SDK_INC_BM3_CORE_TYPE_BM3_KEYFRAME_H
#include <ml/utility/ml_assert.h>
#include "../../system/bm3_Config.h"
#include "../bm3_Const.h"
#include "../bm3_CoreType.h"
namespace bm3{
BM3_BEGIN_PLATFORM_NAMESPACE
namespace internal{
template<typename T> struct KeyframeValueElement;
template<> struct KeyframeValueElement<float>{ enum{ Count = 1 }; };
template<> struct KeyframeValueElement<ml::vector3d>{ enum{ Count = 3 }; };
//template<> struct KeyframeValueElement<ml::color_rgba<float> >{ enum{ Count = 4 }; };
template<> struct KeyframeValueElement<ml::color_rgba<float> >{ enum{ Count = 3 }; };
} // namespace internal
/// @brief KeyframeƒNƒ‰ƒX
template<typename T>
class Keyframe{
public:
enum{
ValueElementCount = internal::KeyframeValueElement<T>::Count
};
Keyframe() :
value_(T()){
#if defined(BM3_TARGET_IDE)
selected_keyframe_ = false;
for(int i=0 ; i<internal::KeyframeValueElement<T>::Count ; ++i){
selected_keyframe_value_[i] = false;
}
#endif
}
KeyframeTypeConst KeyframeType(int element_no) const{ ML_ASSERT((element_no >= 0) && (element_no < ValueElementCount));
return element_info_[element_no].keyframe_type_; }
float SlopeL(int element_no) const{ ML_ASSERT((element_no >= 0) && (element_no < ValueElementCount));
return element_info_[element_no].slope_l_; }
float SlopeR(int element_no) const{ ML_ASSERT((element_no >= 0) && (element_no < ValueElementCount));
return element_info_[element_no].slope_r_; }
const KeyframeElementInfo * ElementInfoArray() const{ return element_info_; }
const T & Value() const{ return value_; }
bool IsBreakSlope(int element_no) const{ ML_ASSERT((element_no >= 0) && (element_no < ValueElementCount));
return (element_info_[element_no].keyframe_type_ == KeyframeTypeConst_BreakSpline); }
bool IsSpline(int element_no) const{ ML_ASSERT((element_no >= 0) && (element_no < ValueElementCount));
return (element_info_[element_no].keyframe_type_ == KeyframeTypeConst_Spline ) ||
(element_info_[element_no].keyframe_type_ == KeyframeTypeConst_BreakSpline); }
void SetKeyframeType(int element_no, KeyframeTypeConst t){ ML_ASSERT((element_no >= 0) && (element_no < ValueElementCount));
element_info_[element_no].keyframe_type_ = t; }
void SetSlopeL(int element_no, float s){ ML_ASSERT((element_no >= 0) && (element_no < ValueElementCount));
element_info_[element_no].slope_l_ = s;
if(IsBreakSlope(element_no) == false){
element_info_[element_no].slope_r_ = s;
} }
void SetSlopeR(int element_no, float s){ ML_ASSERT((element_no >= 0) && (element_no < ValueElementCount));
element_info_[element_no].slope_r_ = s;
if(IsBreakSlope(element_no) == false){
element_info_[element_no].slope_l_ = s;
} }
void SetValue(const T &v){ value_ = v; }
#if defined(BM3_TARGET_IDE)
bool SelectedKeyframe(){ return selected_keyframe_; }
void SetSelectedKeyframe(bool value){ selected_keyframe_ = value; }
bool SelectedKeyframeValue(int element_no){ return selected_keyframe_value_[element_no]; }
void SetSelectedKeyframeValue(int element_no, bool value){ selected_keyframe_value_[element_no]= value; }
#endif
private:
KeyframeElementInfo element_info_[ValueElementCount];
T value_;
#if defined(BM3_TARGET_IDE)
bool selected_keyframe_;
bool selected_keyframe_value_[internal::KeyframeValueElement<T>::Count];
#endif
};
BM3_END_PLATFORM_NAMESPACE
} // namespace bm3
#endif // #ifndef BM3_SDK_INC_BM3_CORE_TYPE_BM3_KEYFRAME_H
| [
"tetares4@gmail.com"
] | tetares4@gmail.com |
d4e5af009aa7b9c010bf82a389f97c3eba3532e4 | 003305cdacdb538de90cea987b5d85f12dbd73e0 | /BasicModule/inc/inc_det/svBase/sv_utils.h | cbd997e44da082bd370bd7d47993dbda7949feed | [] | no_license | github188/EC700IR | a1a66fc88b1256bb60ddb0ec0d33cd3386cf6a63 | d7976578c627d9eaa04078fbd7a48d4a211ae3a0 | refs/heads/master | 2021-01-17T14:01:31.259583 | 2016-05-13T02:28:04 | 2016-05-13T02:28:04 | 66,121,249 | 2 | 0 | null | 2016-08-20T01:02:58 | 2016-08-20T01:02:58 | null | GB18030 | C++ | false | false | 6,745 | h | /// @file
/// @brief 工具函数定义
/// @author liaoy
/// @date 2013/8/26 10:46:40
///
/// 修改说明:
/// [2013/8/26 10:46:40 liaoy] 最初版本
#pragma once
#include "sv_basetype.h"
#include "sv_error.h"
#include "sv_rect.h"
#include "sv_image.h"
#if SV_RUN_PLATFORM == SV_PLATFORM_WIN
#include <stdio.h>
#endif
namespace sv
{
/// 文本信息输出回调原型
typedef int (*TRACE_CALLBACK_TXT)(
const char* szInfo, ///< 字符串
int nLen ///< 字符串长度+1
);
/// 设置文本输出回调
void utSetTraceCallBack_TXT(
TRACE_CALLBACK_TXT hCallBack ///< 回调函数指针
);
/// 调试信息输出
/// @note 信息长度不能超过640字节
void utTrace(
char* szFmt, ///< 输出格式
...
);
/// 取得系统TICK毫秒数
/// @return 系统TICK毫秒数
SV_UINT32 utGetSystemTick();
/// 计时开始
#define TS(tag) SV_UINT32 nTime_##tag = sv::utGetSystemTick(); //
/// 计时结束
#define TE(tag) utTrace("%s: %d ms\n", #tag, sv::utGetSystemTick()-nTime_##tag); //
#define SAFE_DELETE(p) if(p) {delete p; p = NULL;}
/// 画竖线
SV_RESULT utMarkLine(
const SV_IMAGE* pImgSrc, ///< 源图像
int nLinePos, ///< 画线位置
SV_UINT8 nColor ///< 线颜色
);
/// 画框
SV_RESULT utMarkRect(
const SV_IMAGE* pImgSrc, ///< 源图像
const SV_RECT* pRect, ///< 画框位置
SV_UINT8 nColor ///< 框颜色
);
/// 保存灰度内存图
SV_RESULT utSaveGrayImage(
const SV_WCHAR* szPath, ///< 保存路径
const void* pImgBuf, ///< 图像数据
int nWidth, ///< 宽
int nHeight, ///< 高
int nStrideWidth ///< 内存扫描行宽
);
/// 保存灰度内存图
SV_RESULT utSaveGrayImage(
const char* szPath, ///< 保存路径
const void* pImgBuf, ///< 图像数据
int nWidth, ///< 宽
int nHeight, ///< 高
int nStrideWidth ///< 内存扫描行宽
);
/// 保存BMP图片
SV_RESULT utSaveImage(
const SV_WCHAR* szPath, ///< 保存路径
const SV_IMAGE* pImg ///< 源图像
);
/// 保存BMP图片
SV_RESULT utSaveImage(
const char* szPath, ///< 保存路径
const SV_IMAGE* pImg ///< 源图像
);
/// 保存JPEG图片,可支持GRAY和YUV422类型
SV_RESULT utSaveImage_Jpeg(
const SV_WCHAR* szPath, ///< 保存路径
const SV_IMAGE* pImg, ///< 源图像
int nQuality = 95 ///< 压缩质量
);
/// 保存JPEG图片,可支持GRAY和YUV422类型
SV_RESULT utSaveImage_Jpeg(
const char* szPath, ///< 保存路径
const SV_IMAGE* pImg, ///< 源图像
int nQuality = 95 ///< 压缩质量
);
/// 读取JPEG图片
/// @note 可通过pImg 传入
SV_RESULT utReadImage_Jpeg(
const SV_UINT8* pJpegDat, ///< JPEG数据
int nDatLen, ///< 数据长度
SV_IMAGE* pImg, ///< 解压后图像,只支持YUV422格式
int* pWidth, ///< 宽
int* pHeight ///< 高
);
#if SV_RUN_PLATFORM == SV_PLATFORM_WIN
/// 保存内存数据到文本文件
template<typename T>
SV_RESULT utMemDump(
const char* szDumpFile,
const T* pDat,
int nWidth,
int nHeight,
int nStride = -1
)
{
FILE* hFile = NULL;
fopen_s(&hFile, szDumpFile, "w");
if(hFile == NULL)
{
return RS_E_UNEXPECTED;
}
if(nStride == -1)
{
nStride = nWidth;
}
T* pLine = (T*)pDat;
for(int i = 0; i < nHeight; i++, pLine += nStride)
{
for(int j = 0; j < nWidth; j++)
{
fprintf(hFile, "%8.3f,", (float)pLine[j]);
}
fprintf(hFile, "\n");
}
fclose(hFile);
return RS_S_OK;
}
/// 读取文本文件到内存
template<typename T>
SV_RESULT utLoadMem(
const char* szMemFile,
T* pDat,
int nLen,
int* pWidth,
int* pHeight
)
{
if(pDat == NULL || pWidth == NULL || pHeight == NULL)
{
return RS_E_INVALIDARG;
}
*pWidth = 0;
*pHeight = 0;
FILE* hFile = NULL;
fopen_s(&hFile, szMemFile, "r");
if(hFile == NULL)
{
return RS_E_UNEXPECTED;
}
const int nMaxLen = 100000;
CMemAlloc cAlloc;
char* pLine = (char*)cAlloc.Alloc(nMaxLen * sizeof(char));
if(pLine == NULL)
{
return RS_E_UNEXPECTED;
}
SV_BOOL fLoadOK = TRUE;
int nReadCount = 0;
int nHeight = 0;
int nWidth = 0;
while(fgets(pLine, nMaxLen, hFile))
{
pLine[strlen(pLine) - 1] = '\0';
char* pTokNext = NULL;
int nLineWidth = 0;
char* pTok = strtok_s(pLine, ",", &pTokNext);
while(pTok)
{
if(nReadCount >= nLen)
{
fLoadOK = FALSE;
break;
}
pDat[nReadCount++] = (T)atof(pTok);
pTok = strtok_s(NULL, ",", &pTokNext);
nLineWidth++;
}
nWidth = SV_MAX(nWidth, nLineWidth);
nHeight++;
}
fclose(hFile);
if(!fLoadOK)
{
return RS_E_OUTOFMEMORY;
}
*pWidth = nWidth;
*pHeight = nHeight;
return RS_S_OK;
}
#else
template<typename T>
SV_RESULT utMemDump(
const char* szDumpFile,
const T* pDat,
int nWidth,
int nHeight,
int nStride = -1
)
{
return RS_E_NOTIMPL;
}
template<typename T>
SV_RESULT utLoadMem(
const char* szMemFile,
T* pDat,
int nLen,
int* pWidth,
int* pHeight
)
{
return RS_E_NOTIMPL;
}
#endif
} // sv
| [
"cangmu2007@163.com"
] | cangmu2007@163.com |
c553bc896cc0d7e311219a8b895a5b01776971b5 | 3ea829b5ad3cf1cc9e6eb9b208532cf57b7ba90f | /libvpvl2/include/vpvl2/extensions/icu4c/String.h | 0f8f8347c36158c9dc7b439b9a687e2debd34c20 | [] | no_license | hkrn/MMDAI | 2ae70c9be7301e496e9113477d4a5ebdc5dc0a29 | 9ca74bf9f6f979f510f5355d80805f935cc7e610 | refs/heads/master | 2021-01-18T21:30:22.057260 | 2016-05-10T16:30:41 | 2016-05-10T16:30:41 | 1,257,502 | 74 | 22 | null | 2013-07-13T21:28:16 | 2011-01-15T12:05:26 | C++ | UTF-8 | C++ | false | false | 4,351 | h | /**
Copyright (c) 2010-2014 hkrn
All rights reserved.
Redistribution and use in source and binary forms, with or
without modification, are permitted provided that the following
conditions are met:
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
- Neither the name of the MMDAI project team nor the names of
its contributors may be used to endorse or promote products
derived from this software without specific prior written
permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
#pragma once
#ifndef VPVL2_EXTENSIONS_ICU_STRING_H_
#define VPVL2_EXTENSIONS_ICU_STRING_H_
/* ICU */
#include <unicode/unistr.h>
#include <unicode/ucnv.h>
#include <string>
#include <vpvl2/IString.h>
namespace vpvl2
{
namespace VPVL2_VERSION_NS
{
namespace extensions
{
namespace icu4c
{
class VPVL2_API String VPVL2_DECL_FINAL : public IString {
public:
struct Converter {
Converter()
: shiftJIS(0),
utf8(0),
utf16(0)
{
}
~Converter() {
ucnv_close(utf8);
utf8 = 0;
ucnv_close(utf16);
utf16 = 0;
ucnv_close(shiftJIS);
shiftJIS = 0;
}
void initialize() {
UErrorCode status = U_ZERO_ERROR;
utf8 = ucnv_open("utf-8", &status);
utf16 = ucnv_open("utf-16le", &status);
shiftJIS = ucnv_open("ibm-943_P15A-2003", &status);
}
UConverter *converterFromCodec(IString::Codec codec) const {
switch (codec) {
case IString::kShiftJIS:
return shiftJIS;
case IString::kUTF8:
return utf8;
case IString::kUTF16:
return utf16;
case IString::kMaxCodecType:
default:
return 0;
}
}
UConverter *shiftJIS;
UConverter *utf8;
UConverter *utf16;
};
struct Less {
/* use custom std::less alternative to prevent warning on MSVC */
bool operator()(const UnicodeString &left, const UnicodeString &right) const {
return left.compare(right) == -1;
}
};
static IString *create(const std::string &value);
static std::string toStdString(const UnicodeString &value);
explicit String(const UnicodeString &value, IString::Codec codec = IString::kUTF8, const Converter *converterRef = 0);
~String();
bool startsWith(const IString *value) const;
bool contains(const IString *value) const;
bool endsWith(const IString *value) const;
void split(const IString *separator, int maxTokens, Array<IString *> &tokens) const;
IString *join(const Array<IString *> &tokens) const;
IString *clone() const;
const HashString toHashString() const;
bool equals(const IString *value) const;
UnicodeString value() const;
std::string toStdString() const;
const uint8 *toByteArray() const;
vsize size() const;
private:
const Converter *m_converterRef;
const UnicodeString m_value;
const IString::Codec m_codec;
const std::string m_utf8;
VPVL2_DISABLE_COPY_AND_ASSIGN(String)
};
} /* namespace icu */
} /* namespace extensions */
} /* namespace VPVL2_VERSION_NS */
using namespace VPVL2_VERSION_NS;
} /* namespace vpvl2 */
#endif
| [
"hikarin.jp@gmail.com"
] | hikarin.jp@gmail.com |
63dba5473c259e4d964dbbbf3ac9a594d70d9ac8 | 50a570c7afc812fe43a1f7bf689b62d6ce6b6e8f | /src/net_main.cpp | 71dc74cc9a2c40720deb10bce1b0aec6d73b922a | [] | no_license | gsherwin3/opx-nas-linux | 2061d71ba5fbdb83082c064b77f45a363d3891bd | 78470fbf9e48ce8b21d2e2e96504d2a4bda42ca3 | refs/heads/master | 2021-01-11T20:01:20.057775 | 2017-02-13T15:12:44 | 2017-02-13T15:12:44 | 79,449,683 | 0 | 0 | null | 2017-01-19T12:08:48 | 2017-01-19T12:08:48 | null | UTF-8 | C++ | false | false | 25,285 | cpp | /*
* Copyright (c) 2016 Dell Inc.
*
* 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
*
* THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT
* LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS
* FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
*
* See the Apache Version 2.0 License for specific language governing
* permissions and limitations under the License.
*/
/*!
* \file net_main.c
* \brief Thread for all notification from kernel
* \date 11-2013
*/
#include "ds_api_linux_interface.h"
#include "ds_api_linux_neigh.h"
#include "nas_os_if_priv.h"
#include "os_if_utils.h"
#include "event_log.h"
#include "ds_api_linux_route.h"
#include "std_utils.h"
#include "db_linux_event_register.h"
#include "cps_api_interface_types.h"
#include "cps_api_object_category.h"
#include "cps_api_operation.h"
#include "std_socket_tools.h"
#include "netlink_tools.h"
#include "std_thread_tools.h"
#include "std_ip_utils.h"
#include "nas_nlmsg.h"
#include "dell-base-l2-mac.h"
#include "cps_api_route.h"
#include "nas_nlmsg_object_utils.h"
#include <limits.h>
#include <unistd.h>
#include <netinet/in.h>
#include <ifaddrs.h>
#include <netdb.h>
#include <stdio.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <linux/rtnetlink.h>
#include <linux/if.h>
#include <map>
/*
* Global variables
*/
typedef bool (*fn_nl_msg_handle)(int type, struct nlmsghdr * nh, void *context);
static std::map<int,nas_nl_sock_TYPES> nlm_sockets;
static INTERFACE *g_if_db;
INTERFACE *os_get_if_db_hdlr() {
return g_if_db;
}
static if_bridge *g_if_bridge_db;
if_bridge *os_get_bridge_db_hdlr() {
return g_if_bridge_db;
}
static if_bond *g_if_bond_db;
if_bond *os_get_bond_db_hdlr() {
return g_if_bond_db;
}
extern "C" {
/*
* Pthread variables
*/
static uint64_t _local_event_count = 0;
static std_thread_create_param_t _net_main_thr;
static cps_api_event_service_handle_t _handle;
const static int MAX_CPS_MSG_SIZE=10000;
/* Netlink message counters */
struct nl_stats_desc {
uint32_t num_events_rcvd;
uint32_t num_bulk_events_rcvd;
uint32_t max_events_rcvd_in_bulk;
uint32_t min_events_rcvd_in_bulk;
uint32_t num_add_events;
uint32_t num_del_events;
uint32_t num_get_events;
uint32_t num_invalid_add_events;
uint32_t num_invalid_del_events;
uint32_t num_invalid_get_events;
uint32_t num_add_events_pub;
uint32_t num_del_events_pub;
uint32_t num_get_events_pub;
uint32_t num_add_events_pub_failed;
uint32_t num_del_events_pub_failed;
uint32_t num_get_events_pub_failed;
void (*reset)(nas_nl_sock_TYPES type);
void (*print)(nas_nl_sock_TYPES type);
void (*print_msg_detail)(nas_nl_sock_TYPES type);
void (*print_pub_detail)(nas_nl_sock_TYPES type);
};
static void nl_stats_reset(nas_nl_sock_TYPES type);
static void nl_stats_print(nas_nl_sock_TYPES type);
static void nl_stats_print_msg_detail (nas_nl_sock_TYPES type);
static void nl_stats_print_pub_detail (nas_nl_sock_TYPES type);
static std::map<nas_nl_sock_TYPES,nl_stats_desc > nlm_counters = {
{ nas_nl_sock_T_ROUTE , { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, &nl_stats_reset, &nl_stats_print,
&nl_stats_print_msg_detail, &nl_stats_print_pub_detail} } ,
{ nas_nl_sock_T_INT ,{ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, &nl_stats_reset, &nl_stats_print,
&nl_stats_print_msg_detail, &nl_stats_print_pub_detail} },
{ nas_nl_sock_T_NEI ,{ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, &nl_stats_reset, &nl_stats_print,
&nl_stats_print_msg_detail, &nl_stats_print_pub_detail} },
};
/*
* Functions
*/
#define KN_DEBUG(x,...) EV_LOG_TRACE (ev_log_t_NETLINK,0,"NL-DBG",x, ##__VA_ARGS__)
cps_api_return_code_t net_publish_event(cps_api_object_t msg) {
cps_api_return_code_t rc = cps_api_ret_code_OK;
++_local_event_count;
rc = cps_api_event_publish(_handle,msg);
cps_api_object_delete(msg);
return rc;
}
void cps_api_event_count_clear(void) {
_local_event_count = 0;
}
uint64_t cps_api_event_count_get(void) {
return _local_event_count;
}
void rta_add_mac( struct nlattr* rtatp, cps_api_object_t obj, uint32_t attr) {
cps_api_object_attr_add(obj,attr,nla_data(rtatp),nla_len(rtatp));
}
void rta_add_mask(int family, uint_t prefix_len, cps_api_object_t obj, uint32_t attr) {
hal_ip_addr_t mask;
std_ip_get_mask_from_prefix_len(family,prefix_len,&mask);
cps_api_object_attr_add(obj,attr,&mask,sizeof(mask));
}
void rta_add_e_ip( struct nlattr* rtatp,int family, cps_api_object_t obj,
cps_api_attr_id_t *attr, size_t attr_id_len) {
hal_ip_addr_t ip;
if(family == AF_INET) {
struct in_addr *inp = (struct in_addr *) nla_data(rtatp);
std_ip_from_inet(&ip,inp);
} else {
struct in6_addr *inp6 = (struct in6_addr *) nla_data(rtatp);
std_ip_from_inet6(&ip,inp6);
}
cps_api_object_e_add(obj,attr,attr_id_len, cps_api_object_ATTR_T_BIN,
&ip,sizeof(ip));
}
unsigned int rta_add_name( struct nlattr* rtatp,cps_api_object_t obj, uint32_t attr_id) {
char buff[PATH_MAX];
memset(buff,0,sizeof(buff));
size_t len = (size_t)nla_len(rtatp) < (sizeof(buff)-1) ? nla_len(rtatp) : sizeof(buff)-1;
memcpy(buff,nla_data(rtatp),len);
len = strlen(buff)+1;
cps_api_object_attr_add(obj,attr_id,buff,len);
return len;
}
static inline void netlink_tot_msg_stat_update(nas_nl_sock_TYPES sock_type, int rt_msg_type) {
if ((rt_msg_type == RTM_NEWLINK) || (rt_msg_type == RTM_NEWADDR) ||
(rt_msg_type == RTM_NEWROUTE) || (rt_msg_type == RTM_NEWNEIGH)) {
nlm_counters[sock_type].num_add_events++;
} else if ((rt_msg_type == RTM_DELLINK) || (rt_msg_type == RTM_DELADDR) ||
(rt_msg_type == RTM_DELROUTE) || (rt_msg_type == RTM_DELNEIGH)) {
nlm_counters[sock_type].num_del_events++;
} else if ((rt_msg_type == RTM_GETLINK) || (rt_msg_type == RTM_GETADDR) ||
(rt_msg_type == RTM_GETROUTE) || (rt_msg_type == RTM_GETNEIGH)) {
nlm_counters[sock_type].num_get_events++;
}
}
static inline void netlink_invalid_msg_stat_update(nas_nl_sock_TYPES sock_type, int rt_msg_type) {
if ((rt_msg_type == RTM_NEWLINK) || (rt_msg_type == RTM_NEWADDR) ||
(rt_msg_type == RTM_NEWROUTE) || (rt_msg_type == RTM_NEWNEIGH)) {
nlm_counters[sock_type].num_invalid_add_events++;
} else if ((rt_msg_type == RTM_DELLINK) || (rt_msg_type == RTM_DELADDR) ||
(rt_msg_type == RTM_DELROUTE) || (rt_msg_type == RTM_DELNEIGH)) {
nlm_counters[sock_type].num_invalid_del_events++;
} else if ((rt_msg_type == RTM_GETLINK) || (rt_msg_type == RTM_GETADDR) ||
(rt_msg_type == RTM_GETROUTE) || (rt_msg_type == RTM_GETNEIGH)) {
nlm_counters[sock_type].num_invalid_get_events++;
}
}
static inline void netlink_pub_msg_stat_update(nas_nl_sock_TYPES sock_type, int rt_msg_type) {
if ((rt_msg_type == RTM_NEWLINK) || (rt_msg_type == RTM_NEWADDR) ||
(rt_msg_type == RTM_NEWROUTE) || (rt_msg_type == RTM_NEWNEIGH)) {
nlm_counters[sock_type].num_add_events_pub++;
} else if ((rt_msg_type == RTM_DELLINK) || (rt_msg_type == RTM_DELADDR) ||
(rt_msg_type == RTM_DELROUTE) || (rt_msg_type == RTM_DELNEIGH)) {
nlm_counters[sock_type].num_del_events_pub++;
} else if ((rt_msg_type == RTM_GETLINK) || (rt_msg_type == RTM_GETADDR) ||
(rt_msg_type == RTM_GETROUTE) || (rt_msg_type == RTM_GETNEIGH)) {
nlm_counters[sock_type].num_get_events_pub++;
}
}
static inline void netlink_pub_msg_failed_stat_update(nas_nl_sock_TYPES sock_type, int rt_msg_type) {
if ((rt_msg_type == RTM_NEWLINK) || (rt_msg_type == RTM_NEWADDR) ||
(rt_msg_type == RTM_NEWROUTE) || (rt_msg_type == RTM_NEWNEIGH)) {
nlm_counters[sock_type].num_add_events_pub_failed++;
} else if ((rt_msg_type == RTM_DELLINK) || (rt_msg_type == RTM_DELADDR) ||
(rt_msg_type == RTM_DELROUTE) || (rt_msg_type == RTM_DELNEIGH)) {
nlm_counters[sock_type].num_del_events_pub_failed++;
} else if ((rt_msg_type == RTM_GETLINK) || (rt_msg_type == RTM_GETADDR) ||
(rt_msg_type == RTM_GETROUTE) || (rt_msg_type == RTM_GETNEIGH)) {
nlm_counters[sock_type].num_get_events_pub_failed++;
}
}
static bool get_netlink_data(int rt_msg_type, struct nlmsghdr *hdr, void *data) {
static char buff[MAX_CPS_MSG_SIZE];
cps_api_object_t obj = cps_api_object_init(buff,sizeof(buff));
if (rt_msg_type < RTM_BASE)
return false;
/*!
* Range upto SET_LINK
*/
if (rt_msg_type <= RTM_SETLINK) {
netlink_tot_msg_stat_update(nas_nl_sock_T_INT, rt_msg_type);
if (os_interface_to_object(rt_msg_type,hdr,obj)) {
netlink_pub_msg_stat_update(nas_nl_sock_T_INT, rt_msg_type);
if (net_publish_event(obj) != cps_api_ret_code_OK) {
netlink_pub_msg_failed_stat_update(nas_nl_sock_T_INT, rt_msg_type);
}
} else {
netlink_invalid_msg_stat_update(nas_nl_sock_T_INT, rt_msg_type);
}
return true;
}
/*!
* Range upto GET_ADDRRESS
*/
if (rt_msg_type <= RTM_GETADDR) {
netlink_tot_msg_stat_update(nas_nl_sock_T_INT, rt_msg_type);
if (nl_get_ip_info(rt_msg_type,hdr,obj)) {
netlink_pub_msg_stat_update(nas_nl_sock_T_INT, rt_msg_type);
if (net_publish_event(obj) != cps_api_ret_code_OK) {
netlink_pub_msg_failed_stat_update(nas_nl_sock_T_INT, rt_msg_type);
}
} else {
netlink_invalid_msg_stat_update(nas_nl_sock_T_INT, rt_msg_type);
}
return true;
}
/*!
* Range upto GET_ROUTE
*/
if (rt_msg_type <= RTM_GETROUTE) {
netlink_tot_msg_stat_update(nas_nl_sock_T_ROUTE, rt_msg_type);
if (nl_to_route_info(rt_msg_type,hdr, obj)) {
netlink_pub_msg_stat_update(nas_nl_sock_T_ROUTE, rt_msg_type);
if (net_publish_event(obj) != cps_api_ret_code_OK) {
netlink_pub_msg_failed_stat_update(nas_nl_sock_T_ROUTE, rt_msg_type);
}
} else {
netlink_invalid_msg_stat_update(nas_nl_sock_T_ROUTE, rt_msg_type);
}
return true;
}
/*!
* Range upto GET_NEIGHBOR
*/
if (rt_msg_type <= RTM_GETNEIGH) {
netlink_tot_msg_stat_update(nas_nl_sock_T_NEI, rt_msg_type);
if (nl_to_neigh_info(rt_msg_type, hdr,obj)) {
cps_api_key_init(cps_api_object_key(obj),cps_api_qualifier_TARGET,
cps_api_obj_cat_ROUTE,cps_api_route_obj_NEIBH,0);
netlink_pub_msg_stat_update(nas_nl_sock_T_NEI, rt_msg_type);
if (net_publish_event(obj) != cps_api_ret_code_OK) {
netlink_pub_msg_failed_stat_update(nas_nl_sock_T_NEI, rt_msg_type);
}
} else {
netlink_invalid_msg_stat_update(nas_nl_sock_T_NEI, rt_msg_type);
}
return true;
}
return false;
}
static void publish_existing()
{
struct ifaddrs *if_addr, *ifa;
int family, s;
char name[NI_MAXHOST];
if(getifaddrs(&if_addr) == -1) {
return;
}
for (ifa = if_addr; ifa; ifa = ifa->ifa_next)
{
if(ifa->ifa_addr == NULL)
continue;
family = ifa->ifa_addr->sa_family;
if (family == AF_INET || family == AF_INET6)
{
KN_DEBUG("%s - family: %d%s, flags 0x%x",
ifa->ifa_name, family,
(family == AF_INET)?"(AF_INET)":
(family == AF_INET6)?"(AF_INET6)":"", ifa->ifa_flags);
s = getnameinfo(ifa->ifa_addr,
(family == AF_INET)? sizeof(struct sockaddr_in):
sizeof(struct sockaddr_in6),
name, NI_MAXHOST, NULL, 0, NI_NUMERICHOST);
if (!s)
KN_DEBUG(" Address %s", name);
else
KN_DEBUG(" get name failed");
s = getnameinfo(ifa->ifa_netmask,
(family == AF_INET)? sizeof(struct sockaddr_in):
sizeof(struct sockaddr_in6),
name, NI_MAXHOST, NULL, 0, NI_NUMERICHOST);
if (!s)
KN_DEBUG(" Mask %s strlen %d", name, (int)strlen(name));
else
KN_DEBUG(" get name failed");
cps_api_object_t obj = cps_api_object_create();
cps_api_object_attr_add(obj,cps_api_if_ADDR_A_NAME,
ifa->ifa_name,strlen(ifa->ifa_name)+1);
if (family == AF_INET) {
hal_ip_addr_t ip;
std_ip_from_inet(&ip,&(((struct sockaddr_in *)ifa->ifa_addr)->sin_addr));
cps_api_object_attr_add(obj,cps_api_if_ADDR_A_IF_ADDR,
&ip,sizeof(ip));
std_ip_from_inet(&ip,&(((struct sockaddr_in *)ifa->ifa_netmask)->sin_addr));
cps_api_object_attr_add(obj,cps_api_if_ADDR_A_IF_MASK,
&ip,sizeof(ip));
}
else {
hal_ip_addr_t ip;
std_ip_from_inet6(&ip,&(((struct sockaddr_in6 *)ifa->ifa_addr)->sin6_addr));
cps_api_object_attr_add(obj,cps_api_if_ADDR_A_IF_ADDR,
&ip,sizeof(ip));
std_ip_from_inet6(&ip,&(((struct sockaddr_in6 *)ifa->ifa_netmask)->sin6_addr));
cps_api_object_attr_add(obj,cps_api_if_ADDR_A_IF_MASK,
&ip,sizeof(ip));
}
cps_api_key_init(cps_api_object_key(obj),cps_api_qualifier_TARGET,
cps_api_obj_cat_INTERFACE,cps_api_int_obj_INTERFACE_ADDR,0);
net_publish_event(obj);
}
}
freeifaddrs(if_addr);
return;
}
static char buf[NL_SCRATCH_BUFFER_LEN];
static inline void add_fd_set(int fd, fd_set &fdset, int &max_fd) {
FD_SET(fd, &fdset);
if (fd>max_fd) max_fd = fd;
}
struct nl_event_desc {
fn_nl_msg_handle process;
bool (*trigger)(int sock, int id);
} ;
static bool trigger_route(int sock, int reqid);
static bool trigger_neighbour(int sock, int reqid);
static std::map<nas_nl_sock_TYPES,nl_event_desc > nlm_handlers = {
{ nas_nl_sock_T_ROUTE , { get_netlink_data, &trigger_route} } ,
{ nas_nl_sock_T_INT ,{ get_netlink_data, nl_interface_get_request} },
{ nas_nl_sock_T_NEI ,{ get_netlink_data,&trigger_neighbour } },
};
static bool trigger_route(int sock, int reqid) {
if (nl_request_existing_routes(sock,AF_INET,++reqid)) {
netlink_tools_process_socket(sock,nlm_handlers[nas_nl_sock_T_ROUTE].process,
NULL,buf,sizeof(buf),&reqid,NULL);
}
if (nl_request_existing_routes(sock,AF_INET6,++reqid)) {
netlink_tools_process_socket(sock,nlm_handlers[nas_nl_sock_T_ROUTE].process,
NULL,buf,sizeof(buf),&reqid,NULL);
}
return true;
}
static bool trigger_neighbour(int sock, int reqid) {
if (nl_neigh_get_all_request(sock,AF_INET,++reqid)) {
netlink_tools_process_socket(sock,nlm_handlers[nas_nl_sock_T_NEI].process,
NULL,buf,sizeof(buf),&reqid,NULL);
}
if (nl_neigh_get_all_request(sock,AF_INET6,++reqid)) {
netlink_tools_process_socket(sock,nlm_handlers[nas_nl_sock_T_NEI].process,
NULL,buf,sizeof(buf),&reqid,NULL);
}
return true;
}
void nl_stats_update (int sock, uint32_t bulk_msg_count) {
for ( auto &it : nlm_sockets) {
if (it.first == sock ) {
nlm_counters[it.second].num_events_rcvd += bulk_msg_count;
if (bulk_msg_count > 1) //increment bulk rcvd count only if the count is > 1.
{
nlm_counters[it.second].num_bulk_events_rcvd++;
if (bulk_msg_count > nlm_counters[it.second].max_events_rcvd_in_bulk)
nlm_counters[it.second].max_events_rcvd_in_bulk = bulk_msg_count;
if (bulk_msg_count < nlm_counters[it.second].min_events_rcvd_in_bulk)
nlm_counters[it.second].min_events_rcvd_in_bulk = bulk_msg_count;
else if (nlm_counters[it.second].min_events_rcvd_in_bulk == 0)
nlm_counters[it.second].min_events_rcvd_in_bulk = bulk_msg_count;
}
}
}
return;
}
static void nl_stats_reset (nas_nl_sock_TYPES type) {
nlm_counters[type].num_events_rcvd = 0;
nlm_counters[type].num_bulk_events_rcvd = 0;
nlm_counters[type].max_events_rcvd_in_bulk = 0;
nlm_counters[type].min_events_rcvd_in_bulk = 0;
nlm_counters[type].num_add_events= 0;
nlm_counters[type].num_del_events= 0;
nlm_counters[type].num_get_events= 0;
nlm_counters[type].num_invalid_add_events= 0;
nlm_counters[type].num_invalid_del_events= 0;
nlm_counters[type].num_invalid_get_events= 0;
nlm_counters[type].num_add_events_pub= 0;
nlm_counters[type].num_del_events_pub= 0;
nlm_counters[type].num_get_events_pub= 0;
nlm_counters[type].num_add_events_pub_failed= 0;
nlm_counters[type].num_del_events_pub_failed= 0;
nlm_counters[type].num_get_events_pub_failed= 0;
return;
}
static const std::map<nas_nl_sock_TYPES, std::string> _sock_type_to_str = {
{ nas_nl_sock_T_ROUTE, "ROUTE" },
{ nas_nl_sock_T_INT, "INT" },
{ nas_nl_sock_T_NEI, "NEIGH" },
};
static void nl_stats_print (nas_nl_sock_TYPES type) {
auto it = _sock_type_to_str.find(type);
if (it == _sock_type_to_str.end()) {
// invalid socket group for stats_print.
return;
}
printf("\r %-10s | %-10d | %-10d | %-10d | %-10d\r\n",
it->second.c_str(),
nlm_counters[type].num_events_rcvd,
nlm_counters[type].num_bulk_events_rcvd,
nlm_counters[type].max_events_rcvd_in_bulk,
nlm_counters[type].min_events_rcvd_in_bulk);
return;
}
static void nl_stats_print_msg_detail (nas_nl_sock_TYPES type) {
auto it = _sock_type_to_str.find(type);
if (it == _sock_type_to_str.end()) {
// invalid socket group for stats_print.
return;
}
printf("\r %-10s | %-10d | %-10d | %-10d | %-12d | %-12d | %-12d\r\n",
it->second.c_str(),
nlm_counters[type].num_add_events,
nlm_counters[type].num_del_events,
nlm_counters[type].num_get_events,
nlm_counters[type].num_invalid_add_events,
nlm_counters[type].num_invalid_del_events,
nlm_counters[type].num_invalid_get_events);
return;
}
static void nl_stats_print_pub_detail (nas_nl_sock_TYPES type) {
auto it = _sock_type_to_str.find(type);
if (it == _sock_type_to_str.end()) {
// invalid socket group for stats_print.
return;
}
printf("\r %-10s | %-10d | %-10d | %-10d | %-13d | %-13d | %-13d\r\n",
it->second.c_str(),
nlm_counters[type].num_add_events_pub,
nlm_counters[type].num_del_events_pub,
nlm_counters[type].num_get_events_pub,
nlm_counters[type].num_add_events_pub_failed,
nlm_counters[type].num_del_events_pub_failed,
nlm_counters[type].num_get_events_pub_failed);
return;
}
void os_debug_nl_stats_reset () {
for ( auto &it : nlm_sockets) {
if (nlm_counters[it.second].reset !=NULL) {
nlm_counters[it.second].reset(it.second);
}
}
}
void os_debug_nl_stats_print () {
printf("\r\n NETLINK STATS INFORMATION socket-rx-buf-size:%d scratch buf-size:%d\r\n",
NL_SOCKET_BUFFER_LEN, NL_SCRATCH_BUFFER_LEN);
for ( auto &it : nlm_sockets) {
printf("Socket type:%s sock-fd:%d\r\n",
((it.second == nas_nl_sock_T_ROUTE) ? "Route" :
(it.second == nas_nl_sock_T_INT) ? "Intf" : "Nbr"), it.first);
}
printf("\r =========================\r\n");
printf("\r\n %-10s | %-10s | %-10s | %-10s | %-10s\r\n", "Sock Type", "#events", "#bulk", "#max_bulk", "min_bulk");
printf("\r %-10s | %-10s | %-10s | %-10s | %-10s\r\n",
"==========",
"==========",
"==========",
"==========",
"==========");
for ( auto &it : nlm_sockets) {
if (nlm_counters[it.second].print!=NULL) {
nlm_counters[it.second].print(it.second);
}
}
printf(" \r\n===============================Netlink Message Details=========================================\r\n");
printf("\r %-10s | %-10s | %-10s | %-10s | %-12s | %-12s | %-12s\r\n",
"Sock Type", "#add", "#del", "#get", "#invalid_add", "#invalid_del", "#invalid_get");
printf("\r %-10s | %-10s | %-10s | %-10s | %-12s | %-12s | %-12s\r\n",
"==========", "==========", "==========", "==========", "============",
"============", "============");
for ( auto &it : nlm_sockets) {
if (nlm_counters[it.second].print_msg_detail!=NULL) {
nlm_counters[it.second].print_msg_detail(it.second);
}
}
printf(" \r\n===============================Netlink Message Publish Details====================================\r\n");
printf("\r %-10s | %-10s | %-10s | %-10s | %-13s | %-13s | %-13s\r\n",
"Sock Type", "#add_pub", "#del_pub", "#get_pub", "#add_pub_fail", "#del_pub_fail", "#get_pub_fail");
printf("\r %-10s | %-10s | %-10s | %-10s | %-13s | %-13s | %-13s\r\n",
"==========", "==========", "==========", "==========", "=============",
"=============", "=============");
for ( auto &it : nlm_sockets) {
if (nlm_counters[it.second].print_pub_detail!=NULL) {
nlm_counters[it.second].print_pub_detail(it.second);
}
}
}
void os_send_refresh(nas_nl_sock_TYPES type) {
int RANDOM_REQ_ID = 0xee00;
for ( auto &it : nlm_sockets) {
if (it.second == type && nlm_handlers[it.second].trigger!=NULL) {
nlm_handlers[it.second].trigger(it.first,RANDOM_REQ_ID);
}
}
}
int net_main() {
int max_fd = -1;
struct sockaddr_nl sa;
fd_set read_fds, sel_fds;
FD_ZERO(&read_fds);
memset(&sa, 0, sizeof(sa));
size_t ix = nas_nl_sock_T_ROUTE;
for ( ; ix < (size_t)nas_nl_sock_T_MAX; ++ix ) {
int sock = nas_nl_sock_create((nas_nl_sock_TYPES)(ix),true);
if(sock==-1) {
EV_LOG(ERR,NETLINK,0,"INIT","Failed to initialize sockets...%d",errno);
exit(-1);
}
EV_LOG(INFO,NETLINK,2, "NET-NOTIFY","Socket: ix %d, sock id %d", ix, sock);
nlm_sockets[sock] = (nas_nl_sock_TYPES)(ix);
add_fd_set(sock,read_fds,max_fd);
}
//Publish existing..
publish_existing();
nas_nl_sock_TYPES _refresh_list[] = {
nas_nl_sock_T_INT,
nas_nl_sock_T_NEI,
nas_nl_sock_T_ROUTE
};
g_if_db = new (std::nothrow) (INTERFACE);
g_if_bridge_db = new (std::nothrow) (if_bridge);
g_if_bond_db = new (std::nothrow) (if_bond);
if(g_if_db == nullptr || g_if_bridge_db == nullptr || g_if_bridge_db == nullptr)
EV_LOG(ERR,NETLINK,0,"INIT","Allocation failed for class objects...");
ix = 0;
size_t refresh_mx = sizeof(_refresh_list)/sizeof(*_refresh_list);
for ( ; ix < refresh_mx ; ++ix ) {
os_send_refresh(_refresh_list[ix]);
}
while (1) {
memcpy ((char *) &sel_fds, (char *) &read_fds, sizeof(fd_set));
if(select((max_fd+1), &sel_fds, NULL, NULL, NULL) <= 0)
continue;
for ( auto &it : nlm_sockets) {
if (FD_ISSET(it.first,&sel_fds)) {
netlink_tools_receive_event(it.first,nlm_handlers[it.second].process,
NULL,buf,sizeof(buf),NULL);
}
}
}
return 0;
}
t_std_error cps_api_net_notify_init(void) {
EV_LOG_TRACE(ev_log_t_NULL, 3, "NET-NOTIFY","Initializing Net Notify Thread");
if (cps_api_event_client_connect(&_handle)!=STD_ERR_OK) {
EV_LOG_ERR(ev_log_t_NULL, 3, "NET-NOTIFY","Failed to initialize");
return STD_ERR(INTERFACE,FAIL,0);
}
std_thread_init_struct(&_net_main_thr);
_net_main_thr.name = "db-api-linux-events";
_net_main_thr.thread_function = (std_thread_function_t)net_main;
t_std_error rc = std_thread_create(&_net_main_thr);
if (rc!=STD_ERR_OK) {
EV_LOG(ERR,INTERFACE,3,"db-api-linux-event-init-fail","Failed to "
"initialize event service due");
}
cps_api_operation_handle_t handle;
if (cps_api_operation_subsystem_init(&handle,1)!=STD_ERR_OK) {
return STD_ERR(INTERFACE,FAIL,0);
}
if (os_interface_object_reg(handle)!=STD_ERR_OK) {
return STD_ERR(INTERFACE,FAIL,0);
}
return rc;
}
}
| [
"J.T.Conklin@Dell.Com"
] | J.T.Conklin@Dell.Com |
1a9f08fb09dcee59512c5725dc176e213ef82fe6 | 98ec42398374ef91666550255e4958be69820cae | /emilib/profiler.cpp | d98bddf3d8fafd5acbc4034febe33127192ffe50 | [
"LicenseRef-scancode-other-permissive",
"LicenseRef-scancode-public-domain",
"LicenseRef-scancode-public-domain-disclaimer"
] | permissive | Zabrane/emilib | fde23b7e00f345db7c8a9b4e5b390f686885eff6 | 0d90f4c0cd44813f6898b417bf3f4ef574a5b136 | refs/heads/master | 2022-04-23T10:52:29.257760 | 2020-04-23T10:13:57 | 2020-04-23T10:13:57 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 7,574 | cpp | // Created by Emil Ernerfeldt on 2014-05-22.
// Copyright (c) 2015 Emil Ernerfeldt. All rights reserved.
//
#include "profiler.hpp"
#include <loguru.hpp>
#ifdef __APPLE__
#include "TargetConditionals.h"
#endif
namespace profiler {
using namespace std;
using namespace std::chrono;
const bool OUTPUT_STALLS = false;
const char* FRAME_ID = "Frame";
// ------------------------------------------------------------------------
uint64_t now_ns()
{
using Clock = std::chrono::high_resolution_clock;
return std::chrono::duration_cast<std::chrono::nanoseconds>(Clock::now().time_since_epoch()).count();
}
template<typename T>
void encode_int(Stream& out_stream, T value)
{
out_stream.insert(out_stream.end(), (uint8_t*)&value, (uint8_t*)&value + sizeof(value));
}
void encode_time(Stream& out_stream)
{
encode_int(out_stream, now_ns());
}
void encode_string(Stream& out_stream, const char* str)
{
do { out_stream.push_back(*str); } while (*str++);
}
template<typename T>
T parse_int(const Stream& stream, size_t& io_offset)
{
CHECK_LE_F(io_offset + sizeof(T), stream.size());
auto result = *(const T*)&stream[io_offset];
io_offset += sizeof(T);
return result;
}
const char* parse_string(const Stream& stream, size_t& io_offset)
{
CHECK_LE_F(io_offset, stream.size());
const char* result = reinterpret_cast<const char*>(&stream[io_offset]);
while (stream[io_offset] != 0) {
++io_offset;
}
++io_offset;
return result;
}
std::string format(unsigned indent, const char* id, const char* extra, NanoSeconds ns)
{
auto indentation = std::string(4 * indent, ' ');
return loguru::strprintf("%10.3f ms:%s %s %s", ns / 1e6, indentation.c_str(), id, extra);
}
// ------------------------------------------------------------------------
boost::optional<Scope> parse_scope(const Stream& stream, size_t offset)
{
if (offset >= stream.size()) { return boost::none; }
if (stream[offset] != kScopeBegin) { return boost::none; }
++offset;
Scope scope;
scope.record.start_ns = parse_int<NanoSeconds>(stream, offset);
scope.record.id = parse_string(stream, offset);
scope.record.extra = parse_string(stream, offset);
const auto scope_size = parse_int<ScopeSize>(stream, offset);
if (scope_size == ScopeSize(-1))
{
// Scope started but never ended.
return boost::none;
}
scope.child_idx = offset;
scope.child_end_idx = offset + scope_size;
CHECK_LT_F(scope.child_end_idx, stream.size());
CHECK_EQ_F(stream[scope.child_end_idx], kScopeEnd);
auto next_idx = scope.child_end_idx + 1;
auto stop_ns = parse_int<NanoSeconds>(stream, next_idx);
CHECK_LE_F(scope.record.start_ns, stop_ns);
scope.record.duration_ns = stop_ns - scope.record.start_ns;
scope.next_idx = next_idx;
return scope;
}
std::vector<Scope> collectScopes(const Stream& stream, size_t offset)
{
std::vector<Scope> result;
while (auto scope = parse_scope(stream, offset))
{
result.push_back(*scope);
offset = scope->next_idx;
}
return result;
}
// ------------------------------------------------------------------------
NanoSeconds check_for_stalls(const Stream& stream, const Scope& scope, NanoSeconds stall_cutoff_ns, unsigned depth)
{
auto parent_ns = scope.record.duration_ns;
if (OUTPUT_STALLS && parent_ns > stall_cutoff_ns) {
LOG_S(INFO) << format(depth, scope.record.id, scope.record.extra, parent_ns);
// Process children:
NanoSeconds child_ns = 0;
size_t idx = scope.child_idx;
while (auto child = parse_scope(stream, idx)) {
child_ns += check_for_stalls(stream, *child, stall_cutoff_ns, depth + 1);
idx = child->next_idx;
}
CHECK_EQ_F(idx, scope.child_end_idx);
if (child_ns > stall_cutoff_ns) {
auto missing = parent_ns - child_ns;
if (missing > stall_cutoff_ns) {
LOG_S(INFO) << format(depth + 1, "* Unaccounted", "", missing);
}
}
}
return parent_ns;
}
// ------------------------------------------------------------------------
ProfilerMngr& ProfilerMngr::instance()
{
static ProfilerMngr s_profile_mngr;
return s_profile_mngr;
}
ProfilerMngr::ProfilerMngr()
{
set_stall_cutoff(0.010);
auto frame_str = std::to_string(_frame_counter);
_frame_offset = get_thread_profiler().start(FRAME_ID, frame_str.c_str());
}
void ProfilerMngr::set_stall_cutoff(double secs)
{
_stall_cutoff_ns = static_cast<NanoSeconds>(secs * 1e9);
}
void ProfilerMngr::update()
{
std::lock_guard<std::recursive_mutex> lock(_mutex);
get_thread_profiler().stop(_frame_offset);
_frame_counter += 1;
for (const auto& p : _streams) {
ERROR_CONTEXT("thread name", p.second.thread_info.name.c_str());
size_t idx = 0;
while (auto scope = parse_scope(p.second.stream, idx)) {
check_for_stalls(p.second.stream, *scope, _stall_cutoff_ns, 0);
idx = scope->next_idx;
}
CHECK_EQ_F(idx, p.second.stream.size());
}
_last_frame.swap(_streams);
_streams.clear();
if (_first_frame.empty()) {
_first_frame = _last_frame;
}
auto frame_str = std::to_string(_frame_counter);
_frame_offset = get_thread_profiler().start(FRAME_ID, frame_str.c_str());
}
void ProfilerMngr::report(const ThreadInfo& thread_info, const Stream& stream)
{
std::lock_guard<std::recursive_mutex> lock(_mutex);
auto& thread_stream = _streams[thread_info.id];
thread_stream.thread_info = thread_info;
thread_stream.stream.insert(thread_stream.stream.end(),
stream.begin(), stream.end());
}
// ----------------------------------------------------------------------------
ThreadProfiler::ThreadProfiler()
: _start_time_ns(now_ns())
{
}
Offset ThreadProfiler::start(const char* id, const char* extra)
{
_depth += 1;
_stream.push_back(kScopeBegin);
encode_time(_stream);
encode_string(_stream, id);
encode_string(_stream, extra);
// Make room for writing size of this scope:
auto offset = _stream.size();
encode_int(_stream, ScopeSize(-1));
return offset;
}
void ThreadProfiler::stop(Offset start_offset)
{
CHECK_GT_F(_depth, 0u);
_depth -= 1;
auto skip = _stream.size() - (start_offset + sizeof(ScopeSize));
CHECK_LE_F(start_offset + sizeof(ScopeSize), _stream.size());
*reinterpret_cast<ScopeSize*>(&_stream[start_offset]) = static_cast<ScopeSize>(skip);
_stream.push_back(kScopeEnd);
encode_time(_stream);
if (_depth == 0) {
char thread_name[17];
loguru::get_thread_name(thread_name, sizeof(thread_name), false);
ThreadInfo thread_info {
std::this_thread::get_id(),
thread_name,
_start_time_ns
};
ProfilerMngr::instance().report(thread_info, _stream);
_stream.clear();
}
}
// ----------------------------------------------------------------------------
#if !defined(__APPLE__)
static thread_local ThreadProfiler thread_profiler_object;
ThreadProfiler& get_thread_profiler()
{
return thread_profiler_object;
}
#else // !thread_local
static pthread_once_t s_profiler_pthread_once = PTHREAD_ONCE_INIT;
static pthread_key_t s_profiler_pthread_key;
void free_thread_profiler(void* io_error_context)
{
delete reinterpret_cast<ThreadProfiler*>(io_error_context);
}
void profiler_make_pthread_key()
{
(void)pthread_key_create(&s_profiler_pthread_key, free_thread_profiler);
}
ThreadProfiler& get_thread_profiler()
{
(void)pthread_once(&s_profiler_pthread_once, profiler_make_pthread_key);
auto ec = reinterpret_cast<ThreadProfiler*>(pthread_getspecific(s_profiler_pthread_key));
if (ec == nullptr) {
ec = new ThreadProfiler();
(void)pthread_setspecific(s_profiler_pthread_key, ec);
}
return *ec;
}
#endif // !thread_local
// ----------------------------------------------------------------------------
} // namespace profiler
| [
"emilernerfeldt@gmail.com"
] | emilernerfeldt@gmail.com |
74269d4d777545a89ceb113e15cb28beb3d10d63 | 503d6e66cd9d93cce8464a386aa8116013964e6d | /labs/WS01/Lab1/tools.h | 6044523207e200044f53df94d637a3740fa10526 | [] | no_license | Jegurfinkel/OOP244Term2 | baad2b1e0170e9ac3d133e590fd8d4739f2748fa | 1d82b40b6353887044cdec6aaf28bab338295085 | refs/heads/master | 2020-03-19T10:41:38.171503 | 2018-06-07T00:41:06 | 2018-06-07T00:41:06 | 136,393,159 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 603 | h | /***********************************************************************
// OOP244 Workshop 1: Compiling modular source code
// File tools.h
// Version 1.0
// Date 2018/05/18
// Author Jeffrey Gurfinkel, jegurfinkel@myseneca.ca, 066364092
// Description
// provides tools
//
/////////////////////////////////////////////////////////////////
***********************************************************************/
#ifndef sict_tools_H
#define sict_tools_H
namespace sict {
// Displays the user interface menu
int menu();
// Performs a fool-proof integer entry
int getInt(int min, int max);
}
#endif | [
"jeffrey.gurfinkel@gmail.com"
] | jeffrey.gurfinkel@gmail.com |
bd42e4b7e2bade87b94ea776e5ce61d535c968e7 | c03be8c14d1f50f0f5aa4140dcd72aae0e8d54a5 | /chartdelegate.h | 5a58e617c34f5f822d5a8dd47104e19a40cc9cfc | [] | no_license | reignofwebber/chart | 74a26a549fc0b63be01cdfca4297c9c152a84019 | 4c69c1399c98c1bcba134fe774347ded8b287ad5 | refs/heads/master | 2020-04-14T00:17:47.836127 | 2019-01-04T07:48:46 | 2019-01-04T07:48:46 | 163,529,692 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 831 | h | #ifndef CHARTDELEGATE_H
#define CHARTDELEGATE_H
#include <QStyledItemDelegate>
class ChartCheckBoxDelegate : public QStyledItemDelegate
{
public:
ChartCheckBoxDelegate(QObject *parent = 0);
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const;
bool editorEvent(QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option, const QModelIndex &index);
};
class ChartButtonDelegate : public QStyledItemDelegate
{
public:
ChartButtonDelegate(QObject *parent = 0);
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const;
bool editorEvent(QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option, const QModelIndex &index);
};
#endif // CHARTDELEGATE_H
| [
"shadowitnesslasher@gmail.com"
] | shadowitnesslasher@gmail.com |
4de6bc276e05de90281a3a5ce0df422d6cba9499 | dae883ee037ad0680e8aff4936f4880be98acaee | /lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 8f05c61a957f8b9e95e911e6cee21ffdf7116871 | [
"NCSA"
] | permissive | frankroeder/llvm_mpi_checks | 25af07d680f825fe2f0871abcd8658ffedcec4a7 | d1f6385f3739bd746329276822d42efb6385941c | refs/heads/master | 2021-07-01T00:50:27.308673 | 2017-09-21T20:30:07 | 2017-09-21T20:30:07 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 632,278 | cpp | //===-- DAGCombiner.cpp - Implement a DAG node combiner -------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This pass combines dag nodes to form fewer, simpler DAG nodes. It can be run
// both before and after the DAG is legalized.
//
// This pass is not a substitute for the LLVM IR instcombine pass. This pass is
// primarily intended to handle simplification opportunities that are implicit
// in the LLVM IR and exposed by the various codegen lowering phases.
//
//===----------------------------------------------------------------------===//
#include "llvm/ADT/SetVector.h"
#include "llvm/ADT/SmallBitVector.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/SelectionDAG.h"
#include "llvm/CodeGen/SelectionDAGTargetInfo.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Target/TargetLowering.h"
#include "llvm/Target/TargetOptions.h"
#include "llvm/Target/TargetRegisterInfo.h"
#include "llvm/Target/TargetSubtargetInfo.h"
#include <algorithm>
using namespace llvm;
#define DEBUG_TYPE "dagcombine"
STATISTIC(NodesCombined , "Number of dag nodes combined");
STATISTIC(PreIndexedNodes , "Number of pre-indexed nodes created");
STATISTIC(PostIndexedNodes, "Number of post-indexed nodes created");
STATISTIC(OpsNarrowed , "Number of load/op/store narrowed");
STATISTIC(LdStFP2Int , "Number of fp load/store pairs transformed to int");
STATISTIC(SlicedLoads, "Number of load sliced");
namespace {
static cl::opt<bool>
CombinerGlobalAA("combiner-global-alias-analysis", cl::Hidden,
cl::desc("Enable DAG combiner's use of IR alias analysis"));
static cl::opt<bool>
UseTBAA("combiner-use-tbaa", cl::Hidden, cl::init(true),
cl::desc("Enable DAG combiner's use of TBAA"));
#ifndef NDEBUG
static cl::opt<std::string>
CombinerAAOnlyFunc("combiner-aa-only-func", cl::Hidden,
cl::desc("Only use DAG-combiner alias analysis in this"
" function"));
#endif
/// Hidden option to stress test load slicing, i.e., when this option
/// is enabled, load slicing bypasses most of its profitability guards.
static cl::opt<bool>
StressLoadSlicing("combiner-stress-load-slicing", cl::Hidden,
cl::desc("Bypass the profitability model of load "
"slicing"),
cl::init(false));
static cl::opt<bool>
MaySplitLoadIndex("combiner-split-load-index", cl::Hidden, cl::init(true),
cl::desc("DAG combiner may split indexing from loads"));
//------------------------------ DAGCombiner ---------------------------------//
class DAGCombiner {
SelectionDAG &DAG;
const TargetLowering &TLI;
CombineLevel Level;
CodeGenOpt::Level OptLevel;
bool LegalOperations;
bool LegalTypes;
bool ForCodeSize;
/// \brief Worklist of all of the nodes that need to be simplified.
///
/// This must behave as a stack -- new nodes to process are pushed onto the
/// back and when processing we pop off of the back.
///
/// The worklist will not contain duplicates but may contain null entries
/// due to nodes being deleted from the underlying DAG.
SmallVector<SDNode *, 64> Worklist;
/// \brief Mapping from an SDNode to its position on the worklist.
///
/// This is used to find and remove nodes from the worklist (by nulling
/// them) when they are deleted from the underlying DAG. It relies on
/// stable indices of nodes within the worklist.
DenseMap<SDNode *, unsigned> WorklistMap;
/// \brief Set of nodes which have been combined (at least once).
///
/// This is used to allow us to reliably add any operands of a DAG node
/// which have not yet been combined to the worklist.
SmallPtrSet<SDNode *, 32> CombinedNodes;
// AA - Used for DAG load/store alias analysis.
AliasAnalysis &AA;
/// When an instruction is simplified, add all users of the instruction to
/// the work lists because they might get more simplified now.
void AddUsersToWorklist(SDNode *N) {
for (SDNode *Node : N->uses())
AddToWorklist(Node);
}
/// Call the node-specific routine that folds each particular type of node.
SDValue visit(SDNode *N);
public:
/// Add to the worklist making sure its instance is at the back (next to be
/// processed.)
void AddToWorklist(SDNode *N) {
assert(N->getOpcode() != ISD::DELETED_NODE &&
"Deleted Node added to Worklist");
// Skip handle nodes as they can't usefully be combined and confuse the
// zero-use deletion strategy.
if (N->getOpcode() == ISD::HANDLENODE)
return;
if (WorklistMap.insert(std::make_pair(N, Worklist.size())).second)
Worklist.push_back(N);
}
/// Remove all instances of N from the worklist.
void removeFromWorklist(SDNode *N) {
CombinedNodes.erase(N);
auto It = WorklistMap.find(N);
if (It == WorklistMap.end())
return; // Not in the worklist.
// Null out the entry rather than erasing it to avoid a linear operation.
Worklist[It->second] = nullptr;
WorklistMap.erase(It);
}
void deleteAndRecombine(SDNode *N);
bool recursivelyDeleteUnusedNodes(SDNode *N);
/// Replaces all uses of the results of one DAG node with new values.
SDValue CombineTo(SDNode *N, const SDValue *To, unsigned NumTo,
bool AddTo = true);
/// Replaces all uses of the results of one DAG node with new values.
SDValue CombineTo(SDNode *N, SDValue Res, bool AddTo = true) {
return CombineTo(N, &Res, 1, AddTo);
}
/// Replaces all uses of the results of one DAG node with new values.
SDValue CombineTo(SDNode *N, SDValue Res0, SDValue Res1,
bool AddTo = true) {
SDValue To[] = { Res0, Res1 };
return CombineTo(N, To, 2, AddTo);
}
void CommitTargetLoweringOpt(const TargetLowering::TargetLoweringOpt &TLO);
private:
unsigned MaximumLegalStoreInBits;
/// Check the specified integer node value to see if it can be simplified or
/// if things it uses can be simplified by bit propagation.
/// If so, return true.
bool SimplifyDemandedBits(SDValue Op) {
unsigned BitWidth = Op.getScalarValueSizeInBits();
APInt Demanded = APInt::getAllOnesValue(BitWidth);
return SimplifyDemandedBits(Op, Demanded);
}
bool SimplifyDemandedBits(SDValue Op, const APInt &Demanded);
bool CombineToPreIndexedLoadStore(SDNode *N);
bool CombineToPostIndexedLoadStore(SDNode *N);
SDValue SplitIndexingFromLoad(LoadSDNode *LD);
bool SliceUpLoad(SDNode *N);
/// \brief Replace an ISD::EXTRACT_VECTOR_ELT of a load with a narrowed
/// load.
///
/// \param EVE ISD::EXTRACT_VECTOR_ELT to be replaced.
/// \param InVecVT type of the input vector to EVE with bitcasts resolved.
/// \param EltNo index of the vector element to load.
/// \param OriginalLoad load that EVE came from to be replaced.
/// \returns EVE on success SDValue() on failure.
SDValue ReplaceExtractVectorEltOfLoadWithNarrowedLoad(
SDNode *EVE, EVT InVecVT, SDValue EltNo, LoadSDNode *OriginalLoad);
void ReplaceLoadWithPromotedLoad(SDNode *Load, SDNode *ExtLoad);
SDValue PromoteOperand(SDValue Op, EVT PVT, bool &Replace);
SDValue SExtPromoteOperand(SDValue Op, EVT PVT);
SDValue ZExtPromoteOperand(SDValue Op, EVT PVT);
SDValue PromoteIntBinOp(SDValue Op);
SDValue PromoteIntShiftOp(SDValue Op);
SDValue PromoteExtend(SDValue Op);
bool PromoteLoad(SDValue Op);
void ExtendSetCCUses(const SmallVectorImpl<SDNode *> &SetCCs, SDValue Trunc,
SDValue ExtLoad, const SDLoc &DL,
ISD::NodeType ExtType);
/// Call the node-specific routine that knows how to fold each
/// particular type of node. If that doesn't do anything, try the
/// target-specific DAG combines.
SDValue combine(SDNode *N);
// Visitation implementation - Implement dag node combining for different
// node types. The semantics are as follows:
// Return Value:
// SDValue.getNode() == 0 - No change was made
// SDValue.getNode() == N - N was replaced, is dead and has been handled.
// otherwise - N should be replaced by the returned Operand.
//
SDValue visitTokenFactor(SDNode *N);
SDValue visitMERGE_VALUES(SDNode *N);
SDValue visitADD(SDNode *N);
SDValue visitADDLike(SDValue N0, SDValue N1, SDNode *LocReference);
SDValue visitSUB(SDNode *N);
SDValue visitADDC(SDNode *N);
SDValue visitUADDO(SDNode *N);
SDValue visitSUBC(SDNode *N);
SDValue visitUSUBO(SDNode *N);
SDValue visitADDE(SDNode *N);
SDValue visitSUBE(SDNode *N);
SDValue visitMUL(SDNode *N);
SDValue useDivRem(SDNode *N);
SDValue visitSDIV(SDNode *N);
SDValue visitUDIV(SDNode *N);
SDValue visitREM(SDNode *N);
SDValue visitMULHU(SDNode *N);
SDValue visitMULHS(SDNode *N);
SDValue visitSMUL_LOHI(SDNode *N);
SDValue visitUMUL_LOHI(SDNode *N);
SDValue visitSMULO(SDNode *N);
SDValue visitUMULO(SDNode *N);
SDValue visitIMINMAX(SDNode *N);
SDValue visitAND(SDNode *N);
SDValue visitANDLike(SDValue N0, SDValue N1, SDNode *LocReference);
SDValue visitOR(SDNode *N);
SDValue visitORLike(SDValue N0, SDValue N1, SDNode *LocReference);
SDValue visitXOR(SDNode *N);
SDValue SimplifyVBinOp(SDNode *N);
SDValue visitSHL(SDNode *N);
SDValue visitSRA(SDNode *N);
SDValue visitSRL(SDNode *N);
SDValue visitRotate(SDNode *N);
SDValue visitABS(SDNode *N);
SDValue visitBSWAP(SDNode *N);
SDValue visitBITREVERSE(SDNode *N);
SDValue visitCTLZ(SDNode *N);
SDValue visitCTLZ_ZERO_UNDEF(SDNode *N);
SDValue visitCTTZ(SDNode *N);
SDValue visitCTTZ_ZERO_UNDEF(SDNode *N);
SDValue visitCTPOP(SDNode *N);
SDValue visitSELECT(SDNode *N);
SDValue visitVSELECT(SDNode *N);
SDValue visitSELECT_CC(SDNode *N);
SDValue visitSETCC(SDNode *N);
SDValue visitSETCCE(SDNode *N);
SDValue visitSIGN_EXTEND(SDNode *N);
SDValue visitZERO_EXTEND(SDNode *N);
SDValue visitANY_EXTEND(SDNode *N);
SDValue visitAssertZext(SDNode *N);
SDValue visitSIGN_EXTEND_INREG(SDNode *N);
SDValue visitSIGN_EXTEND_VECTOR_INREG(SDNode *N);
SDValue visitZERO_EXTEND_VECTOR_INREG(SDNode *N);
SDValue visitTRUNCATE(SDNode *N);
SDValue visitBITCAST(SDNode *N);
SDValue visitBUILD_PAIR(SDNode *N);
SDValue visitFADD(SDNode *N);
SDValue visitFSUB(SDNode *N);
SDValue visitFMUL(SDNode *N);
SDValue visitFMA(SDNode *N);
SDValue visitFDIV(SDNode *N);
SDValue visitFREM(SDNode *N);
SDValue visitFSQRT(SDNode *N);
SDValue visitFCOPYSIGN(SDNode *N);
SDValue visitSINT_TO_FP(SDNode *N);
SDValue visitUINT_TO_FP(SDNode *N);
SDValue visitFP_TO_SINT(SDNode *N);
SDValue visitFP_TO_UINT(SDNode *N);
SDValue visitFP_ROUND(SDNode *N);
SDValue visitFP_ROUND_INREG(SDNode *N);
SDValue visitFP_EXTEND(SDNode *N);
SDValue visitFNEG(SDNode *N);
SDValue visitFABS(SDNode *N);
SDValue visitFCEIL(SDNode *N);
SDValue visitFTRUNC(SDNode *N);
SDValue visitFFLOOR(SDNode *N);
SDValue visitFMINNUM(SDNode *N);
SDValue visitFMAXNUM(SDNode *N);
SDValue visitBRCOND(SDNode *N);
SDValue visitBR_CC(SDNode *N);
SDValue visitLOAD(SDNode *N);
SDValue replaceStoreChain(StoreSDNode *ST, SDValue BetterChain);
SDValue replaceStoreOfFPConstant(StoreSDNode *ST);
SDValue visitSTORE(SDNode *N);
SDValue visitINSERT_VECTOR_ELT(SDNode *N);
SDValue visitEXTRACT_VECTOR_ELT(SDNode *N);
SDValue visitBUILD_VECTOR(SDNode *N);
SDValue visitCONCAT_VECTORS(SDNode *N);
SDValue visitEXTRACT_SUBVECTOR(SDNode *N);
SDValue visitVECTOR_SHUFFLE(SDNode *N);
SDValue visitSCALAR_TO_VECTOR(SDNode *N);
SDValue visitINSERT_SUBVECTOR(SDNode *N);
SDValue visitMLOAD(SDNode *N);
SDValue visitMSTORE(SDNode *N);
SDValue visitMGATHER(SDNode *N);
SDValue visitMSCATTER(SDNode *N);
SDValue visitFP_TO_FP16(SDNode *N);
SDValue visitFP16_TO_FP(SDNode *N);
SDValue visitFADDForFMACombine(SDNode *N);
SDValue visitFSUBForFMACombine(SDNode *N);
SDValue visitFMULForFMADistributiveCombine(SDNode *N);
SDValue XformToShuffleWithZero(SDNode *N);
SDValue ReassociateOps(unsigned Opc, const SDLoc &DL, SDValue LHS,
SDValue RHS);
SDValue visitShiftByConstant(SDNode *N, ConstantSDNode *Amt);
SDValue foldSelectOfConstants(SDNode *N);
SDValue foldBinOpIntoSelect(SDNode *BO);
bool SimplifySelectOps(SDNode *SELECT, SDValue LHS, SDValue RHS);
SDValue SimplifyBinOpWithSameOpcodeHands(SDNode *N);
SDValue SimplifySelect(const SDLoc &DL, SDValue N0, SDValue N1, SDValue N2);
SDValue SimplifySelectCC(const SDLoc &DL, SDValue N0, SDValue N1,
SDValue N2, SDValue N3, ISD::CondCode CC,
bool NotExtCompare = false);
SDValue foldSelectCCToShiftAnd(const SDLoc &DL, SDValue N0, SDValue N1,
SDValue N2, SDValue N3, ISD::CondCode CC);
SDValue foldLogicOfSetCCs(bool IsAnd, SDValue N0, SDValue N1,
const SDLoc &DL);
SDValue SimplifySetCC(EVT VT, SDValue N0, SDValue N1, ISD::CondCode Cond,
const SDLoc &DL, bool foldBooleans = true);
bool isSetCCEquivalent(SDValue N, SDValue &LHS, SDValue &RHS,
SDValue &CC) const;
bool isOneUseSetCC(SDValue N) const;
SDValue SimplifyNodeWithTwoResults(SDNode *N, unsigned LoOp,
unsigned HiOp);
SDValue CombineConsecutiveLoads(SDNode *N, EVT VT);
SDValue CombineExtLoad(SDNode *N);
SDValue combineRepeatedFPDivisors(SDNode *N);
SDValue ConstantFoldBITCASTofBUILD_VECTOR(SDNode *, EVT);
SDValue BuildSDIV(SDNode *N);
SDValue BuildSDIVPow2(SDNode *N);
SDValue BuildUDIV(SDNode *N);
SDValue BuildLogBase2(SDValue Op, const SDLoc &DL);
SDValue BuildReciprocalEstimate(SDValue Op, SDNodeFlags *Flags);
SDValue buildRsqrtEstimate(SDValue Op, SDNodeFlags *Flags);
SDValue buildSqrtEstimate(SDValue Op, SDNodeFlags *Flags);
SDValue buildSqrtEstimateImpl(SDValue Op, SDNodeFlags *Flags, bool Recip);
SDValue buildSqrtNROneConst(SDValue Op, SDValue Est, unsigned Iterations,
SDNodeFlags *Flags, bool Reciprocal);
SDValue buildSqrtNRTwoConst(SDValue Op, SDValue Est, unsigned Iterations,
SDNodeFlags *Flags, bool Reciprocal);
SDValue MatchBSwapHWordLow(SDNode *N, SDValue N0, SDValue N1,
bool DemandHighBits = true);
SDValue MatchBSwapHWord(SDNode *N, SDValue N0, SDValue N1);
SDNode *MatchRotatePosNeg(SDValue Shifted, SDValue Pos, SDValue Neg,
SDValue InnerPos, SDValue InnerNeg,
unsigned PosOpcode, unsigned NegOpcode,
const SDLoc &DL);
SDNode *MatchRotate(SDValue LHS, SDValue RHS, const SDLoc &DL);
SDValue MatchLoadCombine(SDNode *N);
SDValue ReduceLoadWidth(SDNode *N);
SDValue ReduceLoadOpStoreWidth(SDNode *N);
SDValue splitMergedValStore(StoreSDNode *ST);
SDValue TransformFPLoadStorePair(SDNode *N);
SDValue reduceBuildVecExtToExtBuildVec(SDNode *N);
SDValue reduceBuildVecConvertToConvertBuildVec(SDNode *N);
SDValue reduceBuildVecToShuffle(SDNode *N);
SDValue createBuildVecShuffle(const SDLoc &DL, SDNode *N,
ArrayRef<int> VectorMask, SDValue VecIn1,
SDValue VecIn2, unsigned LeftIdx);
SDValue GetDemandedBits(SDValue V, const APInt &Mask);
/// Walk up chain skipping non-aliasing memory nodes,
/// looking for aliasing nodes and adding them to the Aliases vector.
void GatherAllAliases(SDNode *N, SDValue OriginalChain,
SmallVectorImpl<SDValue> &Aliases);
/// Return true if there is any possibility that the two addresses overlap.
bool isAlias(LSBaseSDNode *Op0, LSBaseSDNode *Op1) const;
/// Walk up chain skipping non-aliasing memory nodes, looking for a better
/// chain (aliasing node.)
SDValue FindBetterChain(SDNode *N, SDValue Chain);
/// Try to replace a store and any possibly adjacent stores on
/// consecutive chains with better chains. Return true only if St is
/// replaced.
///
/// Notice that other chains may still be replaced even if the function
/// returns false.
bool findBetterNeighborChains(StoreSDNode *St);
/// Match "(X shl/srl V1) & V2" where V2 may not be present.
bool MatchRotateHalf(SDValue Op, SDValue &Shift, SDValue &Mask);
/// Holds a pointer to an LSBaseSDNode as well as information on where it
/// is located in a sequence of memory operations connected by a chain.
struct MemOpLink {
MemOpLink(LSBaseSDNode *N, int64_t Offset)
: MemNode(N), OffsetFromBase(Offset) {}
// Ptr to the mem node.
LSBaseSDNode *MemNode;
// Offset from the base ptr.
int64_t OffsetFromBase;
};
/// This is a helper function for visitMUL to check the profitability
/// of folding (mul (add x, c1), c2) -> (add (mul x, c2), c1*c2).
/// MulNode is the original multiply, AddNode is (add x, c1),
/// and ConstNode is c2.
bool isMulAddWithConstProfitable(SDNode *MulNode,
SDValue &AddNode,
SDValue &ConstNode);
/// This is a helper function for visitAND and visitZERO_EXTEND. Returns
/// true if the (and (load x) c) pattern matches an extload. ExtVT returns
/// the type of the loaded value to be extended. LoadedVT returns the type
/// of the original loaded value. NarrowLoad returns whether the load would
/// need to be narrowed in order to match.
bool isAndLoadExtLoad(ConstantSDNode *AndC, LoadSDNode *LoadN,
EVT LoadResultTy, EVT &ExtVT, EVT &LoadedVT,
bool &NarrowLoad);
/// This is a helper function for MergeConsecutiveStores. When the source
/// elements of the consecutive stores are all constants or all extracted
/// vector elements, try to merge them into one larger store.
/// \return True if a merged store was created.
bool MergeStoresOfConstantsOrVecElts(SmallVectorImpl<MemOpLink> &StoreNodes,
EVT MemVT, unsigned NumStores,
bool IsConstantSrc, bool UseVector);
/// This is a helper function for MergeConsecutiveStores.
/// Stores that may be merged are placed in StoreNodes.
void getStoreMergeCandidates(StoreSDNode *St,
SmallVectorImpl<MemOpLink> &StoreNodes);
/// Helper function for MergeConsecutiveStores. Checks if
/// Candidate stores have indirect dependency through their
/// operands. \return True if safe to merge
bool checkMergeStoreCandidatesForDependencies(
SmallVectorImpl<MemOpLink> &StoreNodes);
/// Merge consecutive store operations into a wide store.
/// This optimization uses wide integers or vectors when possible.
/// \return number of stores that were merged into a merged store (the
/// affected nodes are stored as a prefix in \p StoreNodes).
bool MergeConsecutiveStores(StoreSDNode *N);
/// \brief Try to transform a truncation where C is a constant:
/// (trunc (and X, C)) -> (and (trunc X), (trunc C))
///
/// \p N needs to be a truncation and its first operand an AND. Other
/// requirements are checked by the function (e.g. that trunc is
/// single-use) and if missed an empty SDValue is returned.
SDValue distributeTruncateThroughAnd(SDNode *N);
public:
DAGCombiner(SelectionDAG &D, AliasAnalysis &A, CodeGenOpt::Level OL)
: DAG(D), TLI(D.getTargetLoweringInfo()), Level(BeforeLegalizeTypes),
OptLevel(OL), LegalOperations(false), LegalTypes(false), AA(A) {
ForCodeSize = DAG.getMachineFunction().getFunction()->optForSize();
MaximumLegalStoreInBits = 0;
for (MVT VT : MVT::all_valuetypes())
if (EVT(VT).isSimple() && VT != MVT::Other &&
TLI.isTypeLegal(EVT(VT)) &&
VT.getSizeInBits() >= MaximumLegalStoreInBits)
MaximumLegalStoreInBits = VT.getSizeInBits();
}
/// Runs the dag combiner on all nodes in the work list
void Run(CombineLevel AtLevel);
SelectionDAG &getDAG() const { return DAG; }
/// Returns a type large enough to hold any valid shift amount - before type
/// legalization these can be huge.
EVT getShiftAmountTy(EVT LHSTy) {
assert(LHSTy.isInteger() && "Shift amount is not an integer type!");
if (LHSTy.isVector())
return LHSTy;
auto &DL = DAG.getDataLayout();
return LegalTypes ? TLI.getScalarShiftAmountTy(DL, LHSTy)
: TLI.getPointerTy(DL);
}
/// This method returns true if we are running before type legalization or
/// if the specified VT is legal.
bool isTypeLegal(const EVT &VT) {
if (!LegalTypes) return true;
return TLI.isTypeLegal(VT);
}
/// Convenience wrapper around TargetLowering::getSetCCResultType
EVT getSetCCResultType(EVT VT) const {
return TLI.getSetCCResultType(DAG.getDataLayout(), *DAG.getContext(), VT);
}
};
}
namespace {
/// This class is a DAGUpdateListener that removes any deleted
/// nodes from the worklist.
class WorklistRemover : public SelectionDAG::DAGUpdateListener {
DAGCombiner &DC;
public:
explicit WorklistRemover(DAGCombiner &dc)
: SelectionDAG::DAGUpdateListener(dc.getDAG()), DC(dc) {}
void NodeDeleted(SDNode *N, SDNode *E) override {
DC.removeFromWorklist(N);
}
};
}
//===----------------------------------------------------------------------===//
// TargetLowering::DAGCombinerInfo implementation
//===----------------------------------------------------------------------===//
void TargetLowering::DAGCombinerInfo::AddToWorklist(SDNode *N) {
((DAGCombiner*)DC)->AddToWorklist(N);
}
SDValue TargetLowering::DAGCombinerInfo::
CombineTo(SDNode *N, ArrayRef<SDValue> To, bool AddTo) {
return ((DAGCombiner*)DC)->CombineTo(N, &To[0], To.size(), AddTo);
}
SDValue TargetLowering::DAGCombinerInfo::
CombineTo(SDNode *N, SDValue Res, bool AddTo) {
return ((DAGCombiner*)DC)->CombineTo(N, Res, AddTo);
}
SDValue TargetLowering::DAGCombinerInfo::
CombineTo(SDNode *N, SDValue Res0, SDValue Res1, bool AddTo) {
return ((DAGCombiner*)DC)->CombineTo(N, Res0, Res1, AddTo);
}
void TargetLowering::DAGCombinerInfo::
CommitTargetLoweringOpt(const TargetLowering::TargetLoweringOpt &TLO) {
return ((DAGCombiner*)DC)->CommitTargetLoweringOpt(TLO);
}
//===----------------------------------------------------------------------===//
// Helper Functions
//===----------------------------------------------------------------------===//
void DAGCombiner::deleteAndRecombine(SDNode *N) {
removeFromWorklist(N);
// If the operands of this node are only used by the node, they will now be
// dead. Make sure to re-visit them and recursively delete dead nodes.
for (const SDValue &Op : N->ops())
// For an operand generating multiple values, one of the values may
// become dead allowing further simplification (e.g. split index
// arithmetic from an indexed load).
if (Op->hasOneUse() || Op->getNumValues() > 1)
AddToWorklist(Op.getNode());
DAG.DeleteNode(N);
}
/// Return 1 if we can compute the negated form of the specified expression for
/// the same cost as the expression itself, or 2 if we can compute the negated
/// form more cheaply than the expression itself.
static char isNegatibleForFree(SDValue Op, bool LegalOperations,
const TargetLowering &TLI,
const TargetOptions *Options,
unsigned Depth = 0) {
// fneg is removable even if it has multiple uses.
if (Op.getOpcode() == ISD::FNEG) return 2;
// Don't allow anything with multiple uses.
if (!Op.hasOneUse()) return 0;
// Don't recurse exponentially.
if (Depth > 6) return 0;
switch (Op.getOpcode()) {
default: return false;
case ISD::ConstantFP: {
if (!LegalOperations)
return 1;
// Don't invert constant FP values after legalization unless the target says
// the negated constant is legal.
EVT VT = Op.getValueType();
return TLI.isOperationLegal(ISD::ConstantFP, VT) ||
TLI.isFPImmLegal(neg(cast<ConstantFPSDNode>(Op)->getValueAPF()), VT);
}
case ISD::FADD:
// FIXME: determine better conditions for this xform.
if (!Options->UnsafeFPMath) return 0;
// After operation legalization, it might not be legal to create new FSUBs.
if (LegalOperations &&
!TLI.isOperationLegalOrCustom(ISD::FSUB, Op.getValueType()))
return 0;
// fold (fneg (fadd A, B)) -> (fsub (fneg A), B)
if (char V = isNegatibleForFree(Op.getOperand(0), LegalOperations, TLI,
Options, Depth + 1))
return V;
// fold (fneg (fadd A, B)) -> (fsub (fneg B), A)
return isNegatibleForFree(Op.getOperand(1), LegalOperations, TLI, Options,
Depth + 1);
case ISD::FSUB:
// We can't turn -(A-B) into B-A when we honor signed zeros.
if (!Options->NoSignedZerosFPMath &&
!Op.getNode()->getFlags()->hasNoSignedZeros())
return 0;
// fold (fneg (fsub A, B)) -> (fsub B, A)
return 1;
case ISD::FMUL:
case ISD::FDIV:
if (Options->HonorSignDependentRoundingFPMath()) return 0;
// fold (fneg (fmul X, Y)) -> (fmul (fneg X), Y) or (fmul X, (fneg Y))
if (char V = isNegatibleForFree(Op.getOperand(0), LegalOperations, TLI,
Options, Depth + 1))
return V;
return isNegatibleForFree(Op.getOperand(1), LegalOperations, TLI, Options,
Depth + 1);
case ISD::FP_EXTEND:
case ISD::FP_ROUND:
case ISD::FSIN:
return isNegatibleForFree(Op.getOperand(0), LegalOperations, TLI, Options,
Depth + 1);
}
}
/// If isNegatibleForFree returns true, return the newly negated expression.
static SDValue GetNegatedExpression(SDValue Op, SelectionDAG &DAG,
bool LegalOperations, unsigned Depth = 0) {
const TargetOptions &Options = DAG.getTarget().Options;
// fneg is removable even if it has multiple uses.
if (Op.getOpcode() == ISD::FNEG) return Op.getOperand(0);
// Don't allow anything with multiple uses.
assert(Op.hasOneUse() && "Unknown reuse!");
assert(Depth <= 6 && "GetNegatedExpression doesn't match isNegatibleForFree");
const SDNodeFlags *Flags = Op.getNode()->getFlags();
switch (Op.getOpcode()) {
default: llvm_unreachable("Unknown code");
case ISD::ConstantFP: {
APFloat V = cast<ConstantFPSDNode>(Op)->getValueAPF();
V.changeSign();
return DAG.getConstantFP(V, SDLoc(Op), Op.getValueType());
}
case ISD::FADD:
// FIXME: determine better conditions for this xform.
assert(Options.UnsafeFPMath);
// fold (fneg (fadd A, B)) -> (fsub (fneg A), B)
if (isNegatibleForFree(Op.getOperand(0), LegalOperations,
DAG.getTargetLoweringInfo(), &Options, Depth+1))
return DAG.getNode(ISD::FSUB, SDLoc(Op), Op.getValueType(),
GetNegatedExpression(Op.getOperand(0), DAG,
LegalOperations, Depth+1),
Op.getOperand(1), Flags);
// fold (fneg (fadd A, B)) -> (fsub (fneg B), A)
return DAG.getNode(ISD::FSUB, SDLoc(Op), Op.getValueType(),
GetNegatedExpression(Op.getOperand(1), DAG,
LegalOperations, Depth+1),
Op.getOperand(0), Flags);
case ISD::FSUB:
// fold (fneg (fsub 0, B)) -> B
if (ConstantFPSDNode *N0CFP = dyn_cast<ConstantFPSDNode>(Op.getOperand(0)))
if (N0CFP->isZero())
return Op.getOperand(1);
// fold (fneg (fsub A, B)) -> (fsub B, A)
return DAG.getNode(ISD::FSUB, SDLoc(Op), Op.getValueType(),
Op.getOperand(1), Op.getOperand(0), Flags);
case ISD::FMUL:
case ISD::FDIV:
assert(!Options.HonorSignDependentRoundingFPMath());
// fold (fneg (fmul X, Y)) -> (fmul (fneg X), Y)
if (isNegatibleForFree(Op.getOperand(0), LegalOperations,
DAG.getTargetLoweringInfo(), &Options, Depth+1))
return DAG.getNode(Op.getOpcode(), SDLoc(Op), Op.getValueType(),
GetNegatedExpression(Op.getOperand(0), DAG,
LegalOperations, Depth+1),
Op.getOperand(1), Flags);
// fold (fneg (fmul X, Y)) -> (fmul X, (fneg Y))
return DAG.getNode(Op.getOpcode(), SDLoc(Op), Op.getValueType(),
Op.getOperand(0),
GetNegatedExpression(Op.getOperand(1), DAG,
LegalOperations, Depth+1), Flags);
case ISD::FP_EXTEND:
case ISD::FSIN:
return DAG.getNode(Op.getOpcode(), SDLoc(Op), Op.getValueType(),
GetNegatedExpression(Op.getOperand(0), DAG,
LegalOperations, Depth+1));
case ISD::FP_ROUND:
return DAG.getNode(ISD::FP_ROUND, SDLoc(Op), Op.getValueType(),
GetNegatedExpression(Op.getOperand(0), DAG,
LegalOperations, Depth+1),
Op.getOperand(1));
}
}
// APInts must be the same size for most operations, this helper
// function zero extends the shorter of the pair so that they match.
// We provide an Offset so that we can create bitwidths that won't overflow.
static void zeroExtendToMatch(APInt &LHS, APInt &RHS, unsigned Offset = 0) {
unsigned Bits = Offset + std::max(LHS.getBitWidth(), RHS.getBitWidth());
LHS = LHS.zextOrSelf(Bits);
RHS = RHS.zextOrSelf(Bits);
}
// Return true if this node is a setcc, or is a select_cc
// that selects between the target values used for true and false, making it
// equivalent to a setcc. Also, set the incoming LHS, RHS, and CC references to
// the appropriate nodes based on the type of node we are checking. This
// simplifies life a bit for the callers.
bool DAGCombiner::isSetCCEquivalent(SDValue N, SDValue &LHS, SDValue &RHS,
SDValue &CC) const {
if (N.getOpcode() == ISD::SETCC) {
LHS = N.getOperand(0);
RHS = N.getOperand(1);
CC = N.getOperand(2);
return true;
}
if (N.getOpcode() != ISD::SELECT_CC ||
!TLI.isConstTrueVal(N.getOperand(2).getNode()) ||
!TLI.isConstFalseVal(N.getOperand(3).getNode()))
return false;
if (TLI.getBooleanContents(N.getValueType()) ==
TargetLowering::UndefinedBooleanContent)
return false;
LHS = N.getOperand(0);
RHS = N.getOperand(1);
CC = N.getOperand(4);
return true;
}
/// Return true if this is a SetCC-equivalent operation with only one use.
/// If this is true, it allows the users to invert the operation for free when
/// it is profitable to do so.
bool DAGCombiner::isOneUseSetCC(SDValue N) const {
SDValue N0, N1, N2;
if (isSetCCEquivalent(N, N0, N1, N2) && N.getNode()->hasOneUse())
return true;
return false;
}
// \brief Returns the SDNode if it is a constant float BuildVector
// or constant float.
static SDNode *isConstantFPBuildVectorOrConstantFP(SDValue N) {
if (isa<ConstantFPSDNode>(N))
return N.getNode();
if (ISD::isBuildVectorOfConstantFPSDNodes(N.getNode()))
return N.getNode();
return nullptr;
}
// Determines if it is a constant integer or a build vector of constant
// integers (and undefs).
// Do not permit build vector implicit truncation.
static bool isConstantOrConstantVector(SDValue N, bool NoOpaques = false) {
if (ConstantSDNode *Const = dyn_cast<ConstantSDNode>(N))
return !(Const->isOpaque() && NoOpaques);
if (N.getOpcode() != ISD::BUILD_VECTOR)
return false;
unsigned BitWidth = N.getScalarValueSizeInBits();
for (const SDValue &Op : N->op_values()) {
if (Op.isUndef())
continue;
ConstantSDNode *Const = dyn_cast<ConstantSDNode>(Op);
if (!Const || Const->getAPIntValue().getBitWidth() != BitWidth ||
(Const->isOpaque() && NoOpaques))
return false;
}
return true;
}
// Determines if it is a constant null integer or a splatted vector of a
// constant null integer (with no undefs).
// Build vector implicit truncation is not an issue for null values.
static bool isNullConstantOrNullSplatConstant(SDValue N) {
if (ConstantSDNode *Splat = isConstOrConstSplat(N))
return Splat->isNullValue();
return false;
}
// Determines if it is a constant integer of one or a splatted vector of a
// constant integer of one (with no undefs).
// Do not permit build vector implicit truncation.
static bool isOneConstantOrOneSplatConstant(SDValue N) {
unsigned BitWidth = N.getScalarValueSizeInBits();
if (ConstantSDNode *Splat = isConstOrConstSplat(N))
return Splat->isOne() && Splat->getAPIntValue().getBitWidth() == BitWidth;
return false;
}
// Determines if it is a constant integer of all ones or a splatted vector of a
// constant integer of all ones (with no undefs).
// Do not permit build vector implicit truncation.
static bool isAllOnesConstantOrAllOnesSplatConstant(SDValue N) {
unsigned BitWidth = N.getScalarValueSizeInBits();
if (ConstantSDNode *Splat = isConstOrConstSplat(N))
return Splat->isAllOnesValue() &&
Splat->getAPIntValue().getBitWidth() == BitWidth;
return false;
}
// Determines if a BUILD_VECTOR is composed of all-constants possibly mixed with
// undef's.
static bool isAnyConstantBuildVector(const SDNode *N) {
return ISD::isBuildVectorOfConstantSDNodes(N) ||
ISD::isBuildVectorOfConstantFPSDNodes(N);
}
SDValue DAGCombiner::ReassociateOps(unsigned Opc, const SDLoc &DL, SDValue N0,
SDValue N1) {
EVT VT = N0.getValueType();
if (N0.getOpcode() == Opc) {
if (SDNode *L = DAG.isConstantIntBuildVectorOrConstantInt(N0.getOperand(1))) {
if (SDNode *R = DAG.isConstantIntBuildVectorOrConstantInt(N1)) {
// reassoc. (op (op x, c1), c2) -> (op x, (op c1, c2))
if (SDValue OpNode = DAG.FoldConstantArithmetic(Opc, DL, VT, L, R))
return DAG.getNode(Opc, DL, VT, N0.getOperand(0), OpNode);
return SDValue();
}
if (N0.hasOneUse()) {
// reassoc. (op (op x, c1), y) -> (op (op x, y), c1) iff x+c1 has one
// use
SDValue OpNode = DAG.getNode(Opc, SDLoc(N0), VT, N0.getOperand(0), N1);
if (!OpNode.getNode())
return SDValue();
AddToWorklist(OpNode.getNode());
return DAG.getNode(Opc, DL, VT, OpNode, N0.getOperand(1));
}
}
}
if (N1.getOpcode() == Opc) {
if (SDNode *R = DAG.isConstantIntBuildVectorOrConstantInt(N1.getOperand(1))) {
if (SDNode *L = DAG.isConstantIntBuildVectorOrConstantInt(N0)) {
// reassoc. (op c2, (op x, c1)) -> (op x, (op c1, c2))
if (SDValue OpNode = DAG.FoldConstantArithmetic(Opc, DL, VT, R, L))
return DAG.getNode(Opc, DL, VT, N1.getOperand(0), OpNode);
return SDValue();
}
if (N1.hasOneUse()) {
// reassoc. (op x, (op y, c1)) -> (op (op x, y), c1) iff x+c1 has one
// use
SDValue OpNode = DAG.getNode(Opc, SDLoc(N0), VT, N0, N1.getOperand(0));
if (!OpNode.getNode())
return SDValue();
AddToWorklist(OpNode.getNode());
return DAG.getNode(Opc, DL, VT, OpNode, N1.getOperand(1));
}
}
}
return SDValue();
}
SDValue DAGCombiner::CombineTo(SDNode *N, const SDValue *To, unsigned NumTo,
bool AddTo) {
assert(N->getNumValues() == NumTo && "Broken CombineTo call!");
++NodesCombined;
DEBUG(dbgs() << "\nReplacing.1 ";
N->dump(&DAG);
dbgs() << "\nWith: ";
To[0].getNode()->dump(&DAG);
dbgs() << " and " << NumTo-1 << " other values\n");
for (unsigned i = 0, e = NumTo; i != e; ++i)
assert((!To[i].getNode() ||
N->getValueType(i) == To[i].getValueType()) &&
"Cannot combine value to value of different type!");
WorklistRemover DeadNodes(*this);
DAG.ReplaceAllUsesWith(N, To);
if (AddTo) {
// Push the new nodes and any users onto the worklist
for (unsigned i = 0, e = NumTo; i != e; ++i) {
if (To[i].getNode()) {
AddToWorklist(To[i].getNode());
AddUsersToWorklist(To[i].getNode());
}
}
}
// Finally, if the node is now dead, remove it from the graph. The node
// may not be dead if the replacement process recursively simplified to
// something else needing this node.
if (N->use_empty())
deleteAndRecombine(N);
return SDValue(N, 0);
}
void DAGCombiner::
CommitTargetLoweringOpt(const TargetLowering::TargetLoweringOpt &TLO) {
// Replace all uses. If any nodes become isomorphic to other nodes and
// are deleted, make sure to remove them from our worklist.
WorklistRemover DeadNodes(*this);
DAG.ReplaceAllUsesOfValueWith(TLO.Old, TLO.New);
// Push the new node and any (possibly new) users onto the worklist.
AddToWorklist(TLO.New.getNode());
AddUsersToWorklist(TLO.New.getNode());
// Finally, if the node is now dead, remove it from the graph. The node
// may not be dead if the replacement process recursively simplified to
// something else needing this node.
if (TLO.Old.getNode()->use_empty())
deleteAndRecombine(TLO.Old.getNode());
}
/// Check the specified integer node value to see if it can be simplified or if
/// things it uses can be simplified by bit propagation. If so, return true.
bool DAGCombiner::SimplifyDemandedBits(SDValue Op, const APInt &Demanded) {
TargetLowering::TargetLoweringOpt TLO(DAG, LegalTypes, LegalOperations);
APInt KnownZero, KnownOne;
if (!TLI.SimplifyDemandedBits(Op, Demanded, KnownZero, KnownOne, TLO))
return false;
// Revisit the node.
AddToWorklist(Op.getNode());
// Replace the old value with the new one.
++NodesCombined;
DEBUG(dbgs() << "\nReplacing.2 ";
TLO.Old.getNode()->dump(&DAG);
dbgs() << "\nWith: ";
TLO.New.getNode()->dump(&DAG);
dbgs() << '\n');
CommitTargetLoweringOpt(TLO);
return true;
}
void DAGCombiner::ReplaceLoadWithPromotedLoad(SDNode *Load, SDNode *ExtLoad) {
SDLoc DL(Load);
EVT VT = Load->getValueType(0);
SDValue Trunc = DAG.getNode(ISD::TRUNCATE, DL, VT, SDValue(ExtLoad, 0));
DEBUG(dbgs() << "\nReplacing.9 ";
Load->dump(&DAG);
dbgs() << "\nWith: ";
Trunc.getNode()->dump(&DAG);
dbgs() << '\n');
WorklistRemover DeadNodes(*this);
DAG.ReplaceAllUsesOfValueWith(SDValue(Load, 0), Trunc);
DAG.ReplaceAllUsesOfValueWith(SDValue(Load, 1), SDValue(ExtLoad, 1));
deleteAndRecombine(Load);
AddToWorklist(Trunc.getNode());
}
SDValue DAGCombiner::PromoteOperand(SDValue Op, EVT PVT, bool &Replace) {
Replace = false;
SDLoc DL(Op);
if (ISD::isUNINDEXEDLoad(Op.getNode())) {
LoadSDNode *LD = cast<LoadSDNode>(Op);
EVT MemVT = LD->getMemoryVT();
ISD::LoadExtType ExtType = ISD::isNON_EXTLoad(LD)
? (TLI.isLoadExtLegal(ISD::ZEXTLOAD, PVT, MemVT) ? ISD::ZEXTLOAD
: ISD::EXTLOAD)
: LD->getExtensionType();
Replace = true;
return DAG.getExtLoad(ExtType, DL, PVT,
LD->getChain(), LD->getBasePtr(),
MemVT, LD->getMemOperand());
}
unsigned Opc = Op.getOpcode();
switch (Opc) {
default: break;
case ISD::AssertSext:
return DAG.getNode(ISD::AssertSext, DL, PVT,
SExtPromoteOperand(Op.getOperand(0), PVT),
Op.getOperand(1));
case ISD::AssertZext:
return DAG.getNode(ISD::AssertZext, DL, PVT,
ZExtPromoteOperand(Op.getOperand(0), PVT),
Op.getOperand(1));
case ISD::Constant: {
unsigned ExtOpc =
Op.getValueType().isByteSized() ? ISD::SIGN_EXTEND : ISD::ZERO_EXTEND;
return DAG.getNode(ExtOpc, DL, PVT, Op);
}
}
if (!TLI.isOperationLegal(ISD::ANY_EXTEND, PVT))
return SDValue();
return DAG.getNode(ISD::ANY_EXTEND, DL, PVT, Op);
}
SDValue DAGCombiner::SExtPromoteOperand(SDValue Op, EVT PVT) {
if (!TLI.isOperationLegal(ISD::SIGN_EXTEND_INREG, PVT))
return SDValue();
EVT OldVT = Op.getValueType();
SDLoc DL(Op);
bool Replace = false;
SDValue NewOp = PromoteOperand(Op, PVT, Replace);
if (!NewOp.getNode())
return SDValue();
AddToWorklist(NewOp.getNode());
if (Replace)
ReplaceLoadWithPromotedLoad(Op.getNode(), NewOp.getNode());
return DAG.getNode(ISD::SIGN_EXTEND_INREG, DL, NewOp.getValueType(), NewOp,
DAG.getValueType(OldVT));
}
SDValue DAGCombiner::ZExtPromoteOperand(SDValue Op, EVT PVT) {
EVT OldVT = Op.getValueType();
SDLoc DL(Op);
bool Replace = false;
SDValue NewOp = PromoteOperand(Op, PVT, Replace);
if (!NewOp.getNode())
return SDValue();
AddToWorklist(NewOp.getNode());
if (Replace)
ReplaceLoadWithPromotedLoad(Op.getNode(), NewOp.getNode());
return DAG.getZeroExtendInReg(NewOp, DL, OldVT);
}
/// Promote the specified integer binary operation if the target indicates it is
/// beneficial. e.g. On x86, it's usually better to promote i16 operations to
/// i32 since i16 instructions are longer.
SDValue DAGCombiner::PromoteIntBinOp(SDValue Op) {
if (!LegalOperations)
return SDValue();
EVT VT = Op.getValueType();
if (VT.isVector() || !VT.isInteger())
return SDValue();
// If operation type is 'undesirable', e.g. i16 on x86, consider
// promoting it.
unsigned Opc = Op.getOpcode();
if (TLI.isTypeDesirableForOp(Opc, VT))
return SDValue();
EVT PVT = VT;
// Consult target whether it is a good idea to promote this operation and
// what's the right type to promote it to.
if (TLI.IsDesirableToPromoteOp(Op, PVT)) {
assert(PVT != VT && "Don't know what type to promote to!");
DEBUG(dbgs() << "\nPromoting "; Op.getNode()->dump(&DAG));
bool Replace0 = false;
SDValue N0 = Op.getOperand(0);
SDValue NN0 = PromoteOperand(N0, PVT, Replace0);
bool Replace1 = false;
SDValue N1 = Op.getOperand(1);
SDValue NN1 = PromoteOperand(N1, PVT, Replace1);
SDLoc DL(Op);
SDValue RV =
DAG.getNode(ISD::TRUNCATE, DL, VT, DAG.getNode(Opc, DL, PVT, NN0, NN1));
// New replace instances of N0 and N1
if (Replace0 && N0 && N0.getOpcode() != ISD::DELETED_NODE && NN0 &&
NN0.getOpcode() != ISD::DELETED_NODE) {
AddToWorklist(NN0.getNode());
ReplaceLoadWithPromotedLoad(N0.getNode(), NN0.getNode());
}
if (Replace1 && N1 && N1.getOpcode() != ISD::DELETED_NODE && NN1 &&
NN1.getOpcode() != ISD::DELETED_NODE) {
AddToWorklist(NN1.getNode());
ReplaceLoadWithPromotedLoad(N1.getNode(), NN1.getNode());
}
// Deal with Op being deleted.
if (Op && Op.getOpcode() != ISD::DELETED_NODE)
return RV;
}
return SDValue();
}
/// Promote the specified integer shift operation if the target indicates it is
/// beneficial. e.g. On x86, it's usually better to promote i16 operations to
/// i32 since i16 instructions are longer.
SDValue DAGCombiner::PromoteIntShiftOp(SDValue Op) {
if (!LegalOperations)
return SDValue();
EVT VT = Op.getValueType();
if (VT.isVector() || !VT.isInteger())
return SDValue();
// If operation type is 'undesirable', e.g. i16 on x86, consider
// promoting it.
unsigned Opc = Op.getOpcode();
if (TLI.isTypeDesirableForOp(Opc, VT))
return SDValue();
EVT PVT = VT;
// Consult target whether it is a good idea to promote this operation and
// what's the right type to promote it to.
if (TLI.IsDesirableToPromoteOp(Op, PVT)) {
assert(PVT != VT && "Don't know what type to promote to!");
DEBUG(dbgs() << "\nPromoting "; Op.getNode()->dump(&DAG));
bool Replace = false;
SDValue N0 = Op.getOperand(0);
SDValue N1 = Op.getOperand(1);
if (Opc == ISD::SRA)
N0 = SExtPromoteOperand(N0, PVT);
else if (Opc == ISD::SRL)
N0 = ZExtPromoteOperand(N0, PVT);
else
N0 = PromoteOperand(N0, PVT, Replace);
if (!N0.getNode())
return SDValue();
SDLoc DL(Op);
SDValue RV =
DAG.getNode(ISD::TRUNCATE, DL, VT, DAG.getNode(Opc, DL, PVT, N0, N1));
AddToWorklist(N0.getNode());
if (Replace)
ReplaceLoadWithPromotedLoad(Op.getOperand(0).getNode(), N0.getNode());
// Deal with Op being deleted.
if (Op && Op.getOpcode() != ISD::DELETED_NODE)
return RV;
}
return SDValue();
}
SDValue DAGCombiner::PromoteExtend(SDValue Op) {
if (!LegalOperations)
return SDValue();
EVT VT = Op.getValueType();
if (VT.isVector() || !VT.isInteger())
return SDValue();
// If operation type is 'undesirable', e.g. i16 on x86, consider
// promoting it.
unsigned Opc = Op.getOpcode();
if (TLI.isTypeDesirableForOp(Opc, VT))
return SDValue();
EVT PVT = VT;
// Consult target whether it is a good idea to promote this operation and
// what's the right type to promote it to.
if (TLI.IsDesirableToPromoteOp(Op, PVT)) {
assert(PVT != VT && "Don't know what type to promote to!");
// fold (aext (aext x)) -> (aext x)
// fold (aext (zext x)) -> (zext x)
// fold (aext (sext x)) -> (sext x)
DEBUG(dbgs() << "\nPromoting ";
Op.getNode()->dump(&DAG));
return DAG.getNode(Op.getOpcode(), SDLoc(Op), VT, Op.getOperand(0));
}
return SDValue();
}
bool DAGCombiner::PromoteLoad(SDValue Op) {
if (!LegalOperations)
return false;
if (!ISD::isUNINDEXEDLoad(Op.getNode()))
return false;
EVT VT = Op.getValueType();
if (VT.isVector() || !VT.isInteger())
return false;
// If operation type is 'undesirable', e.g. i16 on x86, consider
// promoting it.
unsigned Opc = Op.getOpcode();
if (TLI.isTypeDesirableForOp(Opc, VT))
return false;
EVT PVT = VT;
// Consult target whether it is a good idea to promote this operation and
// what's the right type to promote it to.
if (TLI.IsDesirableToPromoteOp(Op, PVT)) {
assert(PVT != VT && "Don't know what type to promote to!");
SDLoc DL(Op);
SDNode *N = Op.getNode();
LoadSDNode *LD = cast<LoadSDNode>(N);
EVT MemVT = LD->getMemoryVT();
ISD::LoadExtType ExtType = ISD::isNON_EXTLoad(LD)
? (TLI.isLoadExtLegal(ISD::ZEXTLOAD, PVT, MemVT) ? ISD::ZEXTLOAD
: ISD::EXTLOAD)
: LD->getExtensionType();
SDValue NewLD = DAG.getExtLoad(ExtType, DL, PVT,
LD->getChain(), LD->getBasePtr(),
MemVT, LD->getMemOperand());
SDValue Result = DAG.getNode(ISD::TRUNCATE, DL, VT, NewLD);
DEBUG(dbgs() << "\nPromoting ";
N->dump(&DAG);
dbgs() << "\nTo: ";
Result.getNode()->dump(&DAG);
dbgs() << '\n');
WorklistRemover DeadNodes(*this);
DAG.ReplaceAllUsesOfValueWith(SDValue(N, 0), Result);
DAG.ReplaceAllUsesOfValueWith(SDValue(N, 1), NewLD.getValue(1));
deleteAndRecombine(N);
AddToWorklist(Result.getNode());
return true;
}
return false;
}
/// \brief Recursively delete a node which has no uses and any operands for
/// which it is the only use.
///
/// Note that this both deletes the nodes and removes them from the worklist.
/// It also adds any nodes who have had a user deleted to the worklist as they
/// may now have only one use and subject to other combines.
bool DAGCombiner::recursivelyDeleteUnusedNodes(SDNode *N) {
if (!N->use_empty())
return false;
SmallSetVector<SDNode *, 16> Nodes;
Nodes.insert(N);
do {
N = Nodes.pop_back_val();
if (!N)
continue;
if (N->use_empty()) {
for (const SDValue &ChildN : N->op_values())
Nodes.insert(ChildN.getNode());
removeFromWorklist(N);
DAG.DeleteNode(N);
} else {
AddToWorklist(N);
}
} while (!Nodes.empty());
return true;
}
//===----------------------------------------------------------------------===//
// Main DAG Combiner implementation
//===----------------------------------------------------------------------===//
void DAGCombiner::Run(CombineLevel AtLevel) {
// set the instance variables, so that the various visit routines may use it.
Level = AtLevel;
LegalOperations = Level >= AfterLegalizeVectorOps;
LegalTypes = Level >= AfterLegalizeTypes;
// Add all the dag nodes to the worklist.
for (SDNode &Node : DAG.allnodes())
AddToWorklist(&Node);
// Create a dummy node (which is not added to allnodes), that adds a reference
// to the root node, preventing it from being deleted, and tracking any
// changes of the root.
HandleSDNode Dummy(DAG.getRoot());
// While the worklist isn't empty, find a node and try to combine it.
while (!WorklistMap.empty()) {
SDNode *N;
// The Worklist holds the SDNodes in order, but it may contain null entries.
do {
N = Worklist.pop_back_val();
} while (!N);
bool GoodWorklistEntry = WorklistMap.erase(N);
(void)GoodWorklistEntry;
assert(GoodWorklistEntry &&
"Found a worklist entry without a corresponding map entry!");
// If N has no uses, it is dead. Make sure to revisit all N's operands once
// N is deleted from the DAG, since they too may now be dead or may have a
// reduced number of uses, allowing other xforms.
if (recursivelyDeleteUnusedNodes(N))
continue;
WorklistRemover DeadNodes(*this);
// If this combine is running after legalizing the DAG, re-legalize any
// nodes pulled off the worklist.
if (Level == AfterLegalizeDAG) {
SmallSetVector<SDNode *, 16> UpdatedNodes;
bool NIsValid = DAG.LegalizeOp(N, UpdatedNodes);
for (SDNode *LN : UpdatedNodes) {
AddToWorklist(LN);
AddUsersToWorklist(LN);
}
if (!NIsValid)
continue;
}
DEBUG(dbgs() << "\nCombining: "; N->dump(&DAG));
// Add any operands of the new node which have not yet been combined to the
// worklist as well. Because the worklist uniques things already, this
// won't repeatedly process the same operand.
CombinedNodes.insert(N);
for (const SDValue &ChildN : N->op_values())
if (!CombinedNodes.count(ChildN.getNode()))
AddToWorklist(ChildN.getNode());
SDValue RV = combine(N);
if (!RV.getNode())
continue;
++NodesCombined;
// If we get back the same node we passed in, rather than a new node or
// zero, we know that the node must have defined multiple values and
// CombineTo was used. Since CombineTo takes care of the worklist
// mechanics for us, we have no work to do in this case.
if (RV.getNode() == N)
continue;
assert(N->getOpcode() != ISD::DELETED_NODE &&
RV.getOpcode() != ISD::DELETED_NODE &&
"Node was deleted but visit returned new node!");
DEBUG(dbgs() << " ... into: ";
RV.getNode()->dump(&DAG));
if (N->getNumValues() == RV.getNode()->getNumValues())
DAG.ReplaceAllUsesWith(N, RV.getNode());
else {
assert(N->getValueType(0) == RV.getValueType() &&
N->getNumValues() == 1 && "Type mismatch");
DAG.ReplaceAllUsesWith(N, &RV);
}
// Push the new node and any users onto the worklist
AddToWorklist(RV.getNode());
AddUsersToWorklist(RV.getNode());
// Finally, if the node is now dead, remove it from the graph. The node
// may not be dead if the replacement process recursively simplified to
// something else needing this node. This will also take care of adding any
// operands which have lost a user to the worklist.
recursivelyDeleteUnusedNodes(N);
}
// If the root changed (e.g. it was a dead load, update the root).
DAG.setRoot(Dummy.getValue());
DAG.RemoveDeadNodes();
}
SDValue DAGCombiner::visit(SDNode *N) {
switch (N->getOpcode()) {
default: break;
case ISD::TokenFactor: return visitTokenFactor(N);
case ISD::MERGE_VALUES: return visitMERGE_VALUES(N);
case ISD::ADD: return visitADD(N);
case ISD::SUB: return visitSUB(N);
case ISD::ADDC: return visitADDC(N);
case ISD::UADDO: return visitUADDO(N);
case ISD::SUBC: return visitSUBC(N);
case ISD::USUBO: return visitUSUBO(N);
case ISD::ADDE: return visitADDE(N);
case ISD::SUBE: return visitSUBE(N);
case ISD::MUL: return visitMUL(N);
case ISD::SDIV: return visitSDIV(N);
case ISD::UDIV: return visitUDIV(N);
case ISD::SREM:
case ISD::UREM: return visitREM(N);
case ISD::MULHU: return visitMULHU(N);
case ISD::MULHS: return visitMULHS(N);
case ISD::SMUL_LOHI: return visitSMUL_LOHI(N);
case ISD::UMUL_LOHI: return visitUMUL_LOHI(N);
case ISD::SMULO: return visitSMULO(N);
case ISD::UMULO: return visitUMULO(N);
case ISD::SMIN:
case ISD::SMAX:
case ISD::UMIN:
case ISD::UMAX: return visitIMINMAX(N);
case ISD::AND: return visitAND(N);
case ISD::OR: return visitOR(N);
case ISD::XOR: return visitXOR(N);
case ISD::SHL: return visitSHL(N);
case ISD::SRA: return visitSRA(N);
case ISD::SRL: return visitSRL(N);
case ISD::ROTR:
case ISD::ROTL: return visitRotate(N);
case ISD::ABS: return visitABS(N);
case ISD::BSWAP: return visitBSWAP(N);
case ISD::BITREVERSE: return visitBITREVERSE(N);
case ISD::CTLZ: return visitCTLZ(N);
case ISD::CTLZ_ZERO_UNDEF: return visitCTLZ_ZERO_UNDEF(N);
case ISD::CTTZ: return visitCTTZ(N);
case ISD::CTTZ_ZERO_UNDEF: return visitCTTZ_ZERO_UNDEF(N);
case ISD::CTPOP: return visitCTPOP(N);
case ISD::SELECT: return visitSELECT(N);
case ISD::VSELECT: return visitVSELECT(N);
case ISD::SELECT_CC: return visitSELECT_CC(N);
case ISD::SETCC: return visitSETCC(N);
case ISD::SETCCE: return visitSETCCE(N);
case ISD::SIGN_EXTEND: return visitSIGN_EXTEND(N);
case ISD::ZERO_EXTEND: return visitZERO_EXTEND(N);
case ISD::ANY_EXTEND: return visitANY_EXTEND(N);
case ISD::AssertZext: return visitAssertZext(N);
case ISD::SIGN_EXTEND_INREG: return visitSIGN_EXTEND_INREG(N);
case ISD::SIGN_EXTEND_VECTOR_INREG: return visitSIGN_EXTEND_VECTOR_INREG(N);
case ISD::ZERO_EXTEND_VECTOR_INREG: return visitZERO_EXTEND_VECTOR_INREG(N);
case ISD::TRUNCATE: return visitTRUNCATE(N);
case ISD::BITCAST: return visitBITCAST(N);
case ISD::BUILD_PAIR: return visitBUILD_PAIR(N);
case ISD::FADD: return visitFADD(N);
case ISD::FSUB: return visitFSUB(N);
case ISD::FMUL: return visitFMUL(N);
case ISD::FMA: return visitFMA(N);
case ISD::FDIV: return visitFDIV(N);
case ISD::FREM: return visitFREM(N);
case ISD::FSQRT: return visitFSQRT(N);
case ISD::FCOPYSIGN: return visitFCOPYSIGN(N);
case ISD::SINT_TO_FP: return visitSINT_TO_FP(N);
case ISD::UINT_TO_FP: return visitUINT_TO_FP(N);
case ISD::FP_TO_SINT: return visitFP_TO_SINT(N);
case ISD::FP_TO_UINT: return visitFP_TO_UINT(N);
case ISD::FP_ROUND: return visitFP_ROUND(N);
case ISD::FP_ROUND_INREG: return visitFP_ROUND_INREG(N);
case ISD::FP_EXTEND: return visitFP_EXTEND(N);
case ISD::FNEG: return visitFNEG(N);
case ISD::FABS: return visitFABS(N);
case ISD::FFLOOR: return visitFFLOOR(N);
case ISD::FMINNUM: return visitFMINNUM(N);
case ISD::FMAXNUM: return visitFMAXNUM(N);
case ISD::FCEIL: return visitFCEIL(N);
case ISD::FTRUNC: return visitFTRUNC(N);
case ISD::BRCOND: return visitBRCOND(N);
case ISD::BR_CC: return visitBR_CC(N);
case ISD::LOAD: return visitLOAD(N);
case ISD::STORE: return visitSTORE(N);
case ISD::INSERT_VECTOR_ELT: return visitINSERT_VECTOR_ELT(N);
case ISD::EXTRACT_VECTOR_ELT: return visitEXTRACT_VECTOR_ELT(N);
case ISD::BUILD_VECTOR: return visitBUILD_VECTOR(N);
case ISD::CONCAT_VECTORS: return visitCONCAT_VECTORS(N);
case ISD::EXTRACT_SUBVECTOR: return visitEXTRACT_SUBVECTOR(N);
case ISD::VECTOR_SHUFFLE: return visitVECTOR_SHUFFLE(N);
case ISD::SCALAR_TO_VECTOR: return visitSCALAR_TO_VECTOR(N);
case ISD::INSERT_SUBVECTOR: return visitINSERT_SUBVECTOR(N);
case ISD::MGATHER: return visitMGATHER(N);
case ISD::MLOAD: return visitMLOAD(N);
case ISD::MSCATTER: return visitMSCATTER(N);
case ISD::MSTORE: return visitMSTORE(N);
case ISD::FP_TO_FP16: return visitFP_TO_FP16(N);
case ISD::FP16_TO_FP: return visitFP16_TO_FP(N);
}
return SDValue();
}
SDValue DAGCombiner::combine(SDNode *N) {
SDValue RV = visit(N);
// If nothing happened, try a target-specific DAG combine.
if (!RV.getNode()) {
assert(N->getOpcode() != ISD::DELETED_NODE &&
"Node was deleted but visit returned NULL!");
if (N->getOpcode() >= ISD::BUILTIN_OP_END ||
TLI.hasTargetDAGCombine((ISD::NodeType)N->getOpcode())) {
// Expose the DAG combiner to the target combiner impls.
TargetLowering::DAGCombinerInfo
DagCombineInfo(DAG, Level, false, this);
RV = TLI.PerformDAGCombine(N, DagCombineInfo);
}
}
// If nothing happened still, try promoting the operation.
if (!RV.getNode()) {
switch (N->getOpcode()) {
default: break;
case ISD::ADD:
case ISD::SUB:
case ISD::MUL:
case ISD::AND:
case ISD::OR:
case ISD::XOR:
RV = PromoteIntBinOp(SDValue(N, 0));
break;
case ISD::SHL:
case ISD::SRA:
case ISD::SRL:
RV = PromoteIntShiftOp(SDValue(N, 0));
break;
case ISD::SIGN_EXTEND:
case ISD::ZERO_EXTEND:
case ISD::ANY_EXTEND:
RV = PromoteExtend(SDValue(N, 0));
break;
case ISD::LOAD:
if (PromoteLoad(SDValue(N, 0)))
RV = SDValue(N, 0);
break;
}
}
// If N is a commutative binary node, try commuting it to enable more
// sdisel CSE.
if (!RV.getNode() && SelectionDAG::isCommutativeBinOp(N->getOpcode()) &&
N->getNumValues() == 1) {
SDValue N0 = N->getOperand(0);
SDValue N1 = N->getOperand(1);
// Constant operands are canonicalized to RHS.
if (isa<ConstantSDNode>(N0) || !isa<ConstantSDNode>(N1)) {
SDValue Ops[] = {N1, N0};
SDNode *CSENode = DAG.getNodeIfExists(N->getOpcode(), N->getVTList(), Ops,
N->getFlags());
if (CSENode)
return SDValue(CSENode, 0);
}
}
return RV;
}
/// Given a node, return its input chain if it has one, otherwise return a null
/// sd operand.
static SDValue getInputChainForNode(SDNode *N) {
if (unsigned NumOps = N->getNumOperands()) {
if (N->getOperand(0).getValueType() == MVT::Other)
return N->getOperand(0);
if (N->getOperand(NumOps-1).getValueType() == MVT::Other)
return N->getOperand(NumOps-1);
for (unsigned i = 1; i < NumOps-1; ++i)
if (N->getOperand(i).getValueType() == MVT::Other)
return N->getOperand(i);
}
return SDValue();
}
SDValue DAGCombiner::visitTokenFactor(SDNode *N) {
// If N has two operands, where one has an input chain equal to the other,
// the 'other' chain is redundant.
if (N->getNumOperands() == 2) {
if (getInputChainForNode(N->getOperand(0).getNode()) == N->getOperand(1))
return N->getOperand(0);
if (getInputChainForNode(N->getOperand(1).getNode()) == N->getOperand(0))
return N->getOperand(1);
}
SmallVector<SDNode *, 8> TFs; // List of token factors to visit.
SmallVector<SDValue, 8> Ops; // Ops for replacing token factor.
SmallPtrSet<SDNode*, 16> SeenOps;
bool Changed = false; // If we should replace this token factor.
// Start out with this token factor.
TFs.push_back(N);
// Iterate through token factors. The TFs grows when new token factors are
// encountered.
for (unsigned i = 0; i < TFs.size(); ++i) {
SDNode *TF = TFs[i];
// Check each of the operands.
for (const SDValue &Op : TF->op_values()) {
switch (Op.getOpcode()) {
case ISD::EntryToken:
// Entry tokens don't need to be added to the list. They are
// redundant.
Changed = true;
break;
case ISD::TokenFactor:
if (Op.hasOneUse() && !is_contained(TFs, Op.getNode())) {
// Queue up for processing.
TFs.push_back(Op.getNode());
// Clean up in case the token factor is removed.
AddToWorklist(Op.getNode());
Changed = true;
break;
}
LLVM_FALLTHROUGH;
default:
// Only add if it isn't already in the list.
if (SeenOps.insert(Op.getNode()).second)
Ops.push_back(Op);
else
Changed = true;
break;
}
}
}
// Remove Nodes that are chained to another node in the list. Do so
// by walking up chains breath-first stopping when we've seen
// another operand. In general we must climb to the EntryNode, but we can exit
// early if we find all remaining work is associated with just one operand as
// no further pruning is possible.
// List of nodes to search through and original Ops from which they originate.
SmallVector<std::pair<SDNode *, unsigned>, 8> Worklist;
SmallVector<unsigned, 8> OpWorkCount; // Count of work for each Op.
SmallPtrSet<SDNode *, 16> SeenChains;
bool DidPruneOps = false;
unsigned NumLeftToConsider = 0;
for (const SDValue &Op : Ops) {
Worklist.push_back(std::make_pair(Op.getNode(), NumLeftToConsider++));
OpWorkCount.push_back(1);
}
auto AddToWorklist = [&](unsigned CurIdx, SDNode *Op, unsigned OpNumber) {
// If this is an Op, we can remove the op from the list. Remark any
// search associated with it as from the current OpNumber.
if (SeenOps.count(Op) != 0) {
Changed = true;
DidPruneOps = true;
unsigned OrigOpNumber = 0;
while (OrigOpNumber < Ops.size() && Ops[OrigOpNumber].getNode() != Op)
OrigOpNumber++;
assert((OrigOpNumber != Ops.size()) &&
"expected to find TokenFactor Operand");
// Re-mark worklist from OrigOpNumber to OpNumber
for (unsigned i = CurIdx + 1; i < Worklist.size(); ++i) {
if (Worklist[i].second == OrigOpNumber) {
Worklist[i].second = OpNumber;
}
}
OpWorkCount[OpNumber] += OpWorkCount[OrigOpNumber];
OpWorkCount[OrigOpNumber] = 0;
NumLeftToConsider--;
}
// Add if it's a new chain
if (SeenChains.insert(Op).second) {
OpWorkCount[OpNumber]++;
Worklist.push_back(std::make_pair(Op, OpNumber));
}
};
for (unsigned i = 0; i < Worklist.size() && i < 1024; ++i) {
// We need at least be consider at least 2 Ops to prune.
if (NumLeftToConsider <= 1)
break;
auto CurNode = Worklist[i].first;
auto CurOpNumber = Worklist[i].second;
assert((OpWorkCount[CurOpNumber] > 0) &&
"Node should not appear in worklist");
switch (CurNode->getOpcode()) {
case ISD::EntryToken:
// Hitting EntryToken is the only way for the search to terminate without
// hitting
// another operand's search. Prevent us from marking this operand
// considered.
NumLeftToConsider++;
break;
case ISD::TokenFactor:
for (const SDValue &Op : CurNode->op_values())
AddToWorklist(i, Op.getNode(), CurOpNumber);
break;
case ISD::CopyFromReg:
case ISD::CopyToReg:
AddToWorklist(i, CurNode->getOperand(0).getNode(), CurOpNumber);
break;
default:
if (auto *MemNode = dyn_cast<MemSDNode>(CurNode))
AddToWorklist(i, MemNode->getChain().getNode(), CurOpNumber);
break;
}
OpWorkCount[CurOpNumber]--;
if (OpWorkCount[CurOpNumber] == 0)
NumLeftToConsider--;
}
SDValue Result;
// If we've changed things around then replace token factor.
if (Changed) {
if (Ops.empty()) {
// The entry token is the only possible outcome.
Result = DAG.getEntryNode();
} else {
if (DidPruneOps) {
SmallVector<SDValue, 8> PrunedOps;
//
for (const SDValue &Op : Ops) {
if (SeenChains.count(Op.getNode()) == 0)
PrunedOps.push_back(Op);
}
Result = DAG.getNode(ISD::TokenFactor, SDLoc(N), MVT::Other, PrunedOps);
} else {
Result = DAG.getNode(ISD::TokenFactor, SDLoc(N), MVT::Other, Ops);
}
}
// Add users to worklist, since we may introduce a lot of new
// chained token factors while removing memory deps.
return CombineTo(N, Result, true /*add to worklist*/);
}
return Result;
}
/// MERGE_VALUES can always be eliminated.
SDValue DAGCombiner::visitMERGE_VALUES(SDNode *N) {
WorklistRemover DeadNodes(*this);
// Replacing results may cause a different MERGE_VALUES to suddenly
// be CSE'd with N, and carry its uses with it. Iterate until no
// uses remain, to ensure that the node can be safely deleted.
// First add the users of this node to the work list so that they
// can be tried again once they have new operands.
AddUsersToWorklist(N);
do {
for (unsigned i = 0, e = N->getNumOperands(); i != e; ++i)
DAG.ReplaceAllUsesOfValueWith(SDValue(N, i), N->getOperand(i));
} while (!N->use_empty());
deleteAndRecombine(N);
return SDValue(N, 0); // Return N so it doesn't get rechecked!
}
/// If \p N is a ConstantSDNode with isOpaque() == false return it casted to a
/// ConstantSDNode pointer else nullptr.
static ConstantSDNode *getAsNonOpaqueConstant(SDValue N) {
ConstantSDNode *Const = dyn_cast<ConstantSDNode>(N);
return Const != nullptr && !Const->isOpaque() ? Const : nullptr;
}
SDValue DAGCombiner::foldBinOpIntoSelect(SDNode *BO) {
auto BinOpcode = BO->getOpcode();
assert((BinOpcode == ISD::ADD || BinOpcode == ISD::SUB ||
BinOpcode == ISD::MUL || BinOpcode == ISD::SDIV ||
BinOpcode == ISD::UDIV || BinOpcode == ISD::SREM ||
BinOpcode == ISD::UREM || BinOpcode == ISD::AND ||
BinOpcode == ISD::OR || BinOpcode == ISD::XOR ||
BinOpcode == ISD::SHL || BinOpcode == ISD::SRL ||
BinOpcode == ISD::SRA || BinOpcode == ISD::FADD ||
BinOpcode == ISD::FSUB || BinOpcode == ISD::FMUL ||
BinOpcode == ISD::FDIV || BinOpcode == ISD::FREM) &&
"Unexpected binary operator");
// Bail out if any constants are opaque because we can't constant fold those.
SDValue C1 = BO->getOperand(1);
if (!isConstantOrConstantVector(C1, true) &&
!isConstantFPBuildVectorOrConstantFP(C1))
return SDValue();
// Don't do this unless the old select is going away. We want to eliminate the
// binary operator, not replace a binop with a select.
// TODO: Handle ISD::SELECT_CC.
SDValue Sel = BO->getOperand(0);
if (Sel.getOpcode() != ISD::SELECT || !Sel.hasOneUse())
return SDValue();
SDValue CT = Sel.getOperand(1);
if (!isConstantOrConstantVector(CT, true) &&
!isConstantFPBuildVectorOrConstantFP(CT))
return SDValue();
SDValue CF = Sel.getOperand(2);
if (!isConstantOrConstantVector(CF, true) &&
!isConstantFPBuildVectorOrConstantFP(CF))
return SDValue();
// We have a select-of-constants followed by a binary operator with a
// constant. Eliminate the binop by pulling the constant math into the select.
// Example: add (select Cond, CT, CF), C1 --> select Cond, CT + C1, CF + C1
EVT VT = Sel.getValueType();
SDLoc DL(Sel);
SDValue NewCT = DAG.getNode(BinOpcode, DL, VT, CT, C1);
assert((NewCT.isUndef() || isConstantOrConstantVector(NewCT) ||
isConstantFPBuildVectorOrConstantFP(NewCT)) &&
"Failed to constant fold a binop with constant operands");
SDValue NewCF = DAG.getNode(BinOpcode, DL, VT, CF, C1);
assert((NewCF.isUndef() || isConstantOrConstantVector(NewCF) ||
isConstantFPBuildVectorOrConstantFP(NewCF)) &&
"Failed to constant fold a binop with constant operands");
return DAG.getSelect(DL, VT, Sel.getOperand(0), NewCT, NewCF);
}
SDValue DAGCombiner::visitADD(SDNode *N) {
SDValue N0 = N->getOperand(0);
SDValue N1 = N->getOperand(1);
EVT VT = N0.getValueType();
SDLoc DL(N);
// fold vector ops
if (VT.isVector()) {
if (SDValue FoldedVOp = SimplifyVBinOp(N))
return FoldedVOp;
// fold (add x, 0) -> x, vector edition
if (ISD::isBuildVectorAllZeros(N1.getNode()))
return N0;
if (ISD::isBuildVectorAllZeros(N0.getNode()))
return N1;
}
// fold (add x, undef) -> undef
if (N0.isUndef())
return N0;
if (N1.isUndef())
return N1;
if (DAG.isConstantIntBuildVectorOrConstantInt(N0)) {
// canonicalize constant to RHS
if (!DAG.isConstantIntBuildVectorOrConstantInt(N1))
return DAG.getNode(ISD::ADD, DL, VT, N1, N0);
// fold (add c1, c2) -> c1+c2
return DAG.FoldConstantArithmetic(ISD::ADD, DL, VT, N0.getNode(),
N1.getNode());
}
// fold (add x, 0) -> x
if (isNullConstant(N1))
return N0;
// fold ((c1-A)+c2) -> (c1+c2)-A
if (isConstantOrConstantVector(N1, /* NoOpaque */ true)) {
if (N0.getOpcode() == ISD::SUB)
if (isConstantOrConstantVector(N0.getOperand(0), /* NoOpaque */ true)) {
return DAG.getNode(ISD::SUB, DL, VT,
DAG.getNode(ISD::ADD, DL, VT, N1, N0.getOperand(0)),
N0.getOperand(1));
}
}
if (SDValue NewSel = foldBinOpIntoSelect(N))
return NewSel;
// reassociate add
if (SDValue RADD = ReassociateOps(ISD::ADD, DL, N0, N1))
return RADD;
// fold ((0-A) + B) -> B-A
if (N0.getOpcode() == ISD::SUB &&
isNullConstantOrNullSplatConstant(N0.getOperand(0)))
return DAG.getNode(ISD::SUB, DL, VT, N1, N0.getOperand(1));
// fold (A + (0-B)) -> A-B
if (N1.getOpcode() == ISD::SUB &&
isNullConstantOrNullSplatConstant(N1.getOperand(0)))
return DAG.getNode(ISD::SUB, DL, VT, N0, N1.getOperand(1));
// fold (A+(B-A)) -> B
if (N1.getOpcode() == ISD::SUB && N0 == N1.getOperand(1))
return N1.getOperand(0);
// fold ((B-A)+A) -> B
if (N0.getOpcode() == ISD::SUB && N1 == N0.getOperand(1))
return N0.getOperand(0);
// fold (A+(B-(A+C))) to (B-C)
if (N1.getOpcode() == ISD::SUB && N1.getOperand(1).getOpcode() == ISD::ADD &&
N0 == N1.getOperand(1).getOperand(0))
return DAG.getNode(ISD::SUB, DL, VT, N1.getOperand(0),
N1.getOperand(1).getOperand(1));
// fold (A+(B-(C+A))) to (B-C)
if (N1.getOpcode() == ISD::SUB && N1.getOperand(1).getOpcode() == ISD::ADD &&
N0 == N1.getOperand(1).getOperand(1))
return DAG.getNode(ISD::SUB, DL, VT, N1.getOperand(0),
N1.getOperand(1).getOperand(0));
// fold (A+((B-A)+or-C)) to (B+or-C)
if ((N1.getOpcode() == ISD::SUB || N1.getOpcode() == ISD::ADD) &&
N1.getOperand(0).getOpcode() == ISD::SUB &&
N0 == N1.getOperand(0).getOperand(1))
return DAG.getNode(N1.getOpcode(), DL, VT, N1.getOperand(0).getOperand(0),
N1.getOperand(1));
// fold (A-B)+(C-D) to (A+C)-(B+D) when A or C is constant
if (N0.getOpcode() == ISD::SUB && N1.getOpcode() == ISD::SUB) {
SDValue N00 = N0.getOperand(0);
SDValue N01 = N0.getOperand(1);
SDValue N10 = N1.getOperand(0);
SDValue N11 = N1.getOperand(1);
if (isConstantOrConstantVector(N00) || isConstantOrConstantVector(N10))
return DAG.getNode(ISD::SUB, DL, VT,
DAG.getNode(ISD::ADD, SDLoc(N0), VT, N00, N10),
DAG.getNode(ISD::ADD, SDLoc(N1), VT, N01, N11));
}
if (SimplifyDemandedBits(SDValue(N, 0)))
return SDValue(N, 0);
// fold (a+b) -> (a|b) iff a and b share no bits.
if ((!LegalOperations || TLI.isOperationLegal(ISD::OR, VT)) &&
VT.isInteger() && DAG.haveNoCommonBitsSet(N0, N1))
return DAG.getNode(ISD::OR, DL, VT, N0, N1);
if (SDValue Combined = visitADDLike(N0, N1, N))
return Combined;
if (SDValue Combined = visitADDLike(N1, N0, N))
return Combined;
return SDValue();
}
SDValue DAGCombiner::visitADDLike(SDValue N0, SDValue N1, SDNode *LocReference) {
EVT VT = N0.getValueType();
SDLoc DL(LocReference);
// fold (add x, shl(0 - y, n)) -> sub(x, shl(y, n))
if (N1.getOpcode() == ISD::SHL && N1.getOperand(0).getOpcode() == ISD::SUB &&
isNullConstantOrNullSplatConstant(N1.getOperand(0).getOperand(0)))
return DAG.getNode(ISD::SUB, DL, VT, N0,
DAG.getNode(ISD::SHL, DL, VT,
N1.getOperand(0).getOperand(1),
N1.getOperand(1)));
if (N1.getOpcode() == ISD::AND) {
SDValue AndOp0 = N1.getOperand(0);
unsigned NumSignBits = DAG.ComputeNumSignBits(AndOp0);
unsigned DestBits = VT.getScalarSizeInBits();
// (add z, (and (sbbl x, x), 1)) -> (sub z, (sbbl x, x))
// and similar xforms where the inner op is either ~0 or 0.
if (NumSignBits == DestBits &&
isOneConstantOrOneSplatConstant(N1->getOperand(1)))
return DAG.getNode(ISD::SUB, DL, VT, N0, AndOp0);
}
// add (sext i1), X -> sub X, (zext i1)
if (N0.getOpcode() == ISD::SIGN_EXTEND &&
N0.getOperand(0).getValueType() == MVT::i1 &&
!TLI.isOperationLegal(ISD::SIGN_EXTEND, MVT::i1)) {
SDValue ZExt = DAG.getNode(ISD::ZERO_EXTEND, DL, VT, N0.getOperand(0));
return DAG.getNode(ISD::SUB, DL, VT, N1, ZExt);
}
// add X, (sextinreg Y i1) -> sub X, (and Y 1)
if (N1.getOpcode() == ISD::SIGN_EXTEND_INREG) {
VTSDNode *TN = cast<VTSDNode>(N1.getOperand(1));
if (TN->getVT() == MVT::i1) {
SDValue ZExt = DAG.getNode(ISD::AND, DL, VT, N1.getOperand(0),
DAG.getConstant(1, DL, VT));
return DAG.getNode(ISD::SUB, DL, VT, N0, ZExt);
}
}
return SDValue();
}
SDValue DAGCombiner::visitADDC(SDNode *N) {
SDValue N0 = N->getOperand(0);
SDValue N1 = N->getOperand(1);
EVT VT = N0.getValueType();
SDLoc DL(N);
// If the flag result is dead, turn this into an ADD.
if (!N->hasAnyUseOfValue(1))
return CombineTo(N, DAG.getNode(ISD::ADD, DL, VT, N0, N1),
DAG.getNode(ISD::CARRY_FALSE, DL, MVT::Glue));
// canonicalize constant to RHS.
ConstantSDNode *N0C = dyn_cast<ConstantSDNode>(N0);
ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1);
if (N0C && !N1C)
return DAG.getNode(ISD::ADDC, DL, N->getVTList(), N1, N0);
// fold (addc x, 0) -> x + no carry out
if (isNullConstant(N1))
return CombineTo(N, N0, DAG.getNode(ISD::CARRY_FALSE,
DL, MVT::Glue));
// If it cannot overflow, transform into an add.
if (DAG.computeOverflowKind(N0, N1) == SelectionDAG::OFK_Never)
return CombineTo(N, DAG.getNode(ISD::ADD, DL, VT, N0, N1),
DAG.getNode(ISD::CARRY_FALSE, DL, MVT::Glue));
return SDValue();
}
SDValue DAGCombiner::visitUADDO(SDNode *N) {
SDValue N0 = N->getOperand(0);
SDValue N1 = N->getOperand(1);
EVT VT = N0.getValueType();
if (VT.isVector())
return SDValue();
EVT CarryVT = N->getValueType(1);
SDLoc DL(N);
// If the flag result is dead, turn this into an ADD.
if (!N->hasAnyUseOfValue(1))
return CombineTo(N, DAG.getNode(ISD::ADD, DL, VT, N0, N1),
DAG.getUNDEF(CarryVT));
// canonicalize constant to RHS.
ConstantSDNode *N0C = dyn_cast<ConstantSDNode>(N0);
ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1);
if (N0C && !N1C)
return DAG.getNode(ISD::UADDO, DL, N->getVTList(), N1, N0);
// fold (uaddo x, 0) -> x + no carry out
if (isNullConstant(N1))
return CombineTo(N, N0, DAG.getConstant(0, DL, CarryVT));
// If it cannot overflow, transform into an add.
if (DAG.computeOverflowKind(N0, N1) == SelectionDAG::OFK_Never)
return CombineTo(N, DAG.getNode(ISD::ADD, DL, VT, N0, N1),
DAG.getConstant(0, DL, CarryVT));
return SDValue();
}
SDValue DAGCombiner::visitADDE(SDNode *N) {
SDValue N0 = N->getOperand(0);
SDValue N1 = N->getOperand(1);
SDValue CarryIn = N->getOperand(2);
// canonicalize constant to RHS
ConstantSDNode *N0C = dyn_cast<ConstantSDNode>(N0);
ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1);
if (N0C && !N1C)
return DAG.getNode(ISD::ADDE, SDLoc(N), N->getVTList(),
N1, N0, CarryIn);
// fold (adde x, y, false) -> (addc x, y)
if (CarryIn.getOpcode() == ISD::CARRY_FALSE)
return DAG.getNode(ISD::ADDC, SDLoc(N), N->getVTList(), N0, N1);
return SDValue();
}
// Since it may not be valid to emit a fold to zero for vector initializers
// check if we can before folding.
static SDValue tryFoldToZero(const SDLoc &DL, const TargetLowering &TLI, EVT VT,
SelectionDAG &DAG, bool LegalOperations,
bool LegalTypes) {
if (!VT.isVector())
return DAG.getConstant(0, DL, VT);
if (!LegalOperations || TLI.isOperationLegal(ISD::BUILD_VECTOR, VT))
return DAG.getConstant(0, DL, VT);
return SDValue();
}
SDValue DAGCombiner::visitSUB(SDNode *N) {
SDValue N0 = N->getOperand(0);
SDValue N1 = N->getOperand(1);
EVT VT = N0.getValueType();
SDLoc DL(N);
// fold vector ops
if (VT.isVector()) {
if (SDValue FoldedVOp = SimplifyVBinOp(N))
return FoldedVOp;
// fold (sub x, 0) -> x, vector edition
if (ISD::isBuildVectorAllZeros(N1.getNode()))
return N0;
}
// fold (sub x, x) -> 0
// FIXME: Refactor this and xor and other similar operations together.
if (N0 == N1)
return tryFoldToZero(DL, TLI, VT, DAG, LegalOperations, LegalTypes);
if (DAG.isConstantIntBuildVectorOrConstantInt(N0) &&
DAG.isConstantIntBuildVectorOrConstantInt(N1)) {
// fold (sub c1, c2) -> c1-c2
return DAG.FoldConstantArithmetic(ISD::SUB, DL, VT, N0.getNode(),
N1.getNode());
}
if (SDValue NewSel = foldBinOpIntoSelect(N))
return NewSel;
ConstantSDNode *N1C = getAsNonOpaqueConstant(N1);
// fold (sub x, c) -> (add x, -c)
if (N1C) {
return DAG.getNode(ISD::ADD, DL, VT, N0,
DAG.getConstant(-N1C->getAPIntValue(), DL, VT));
}
if (isNullConstantOrNullSplatConstant(N0)) {
unsigned BitWidth = VT.getScalarSizeInBits();
// Right-shifting everything out but the sign bit followed by negation is
// the same as flipping arithmetic/logical shift type without the negation:
// -(X >>u 31) -> (X >>s 31)
// -(X >>s 31) -> (X >>u 31)
if (N1->getOpcode() == ISD::SRA || N1->getOpcode() == ISD::SRL) {
ConstantSDNode *ShiftAmt = isConstOrConstSplat(N1.getOperand(1));
if (ShiftAmt && ShiftAmt->getZExtValue() == BitWidth - 1) {
auto NewSh = N1->getOpcode() == ISD::SRA ? ISD::SRL : ISD::SRA;
if (!LegalOperations || TLI.isOperationLegal(NewSh, VT))
return DAG.getNode(NewSh, DL, VT, N1.getOperand(0), N1.getOperand(1));
}
}
// 0 - X --> 0 if the sub is NUW.
if (N->getFlags()->hasNoUnsignedWrap())
return N0;
if (DAG.MaskedValueIsZero(N1, ~APInt::getSignBit(BitWidth))) {
// N1 is either 0 or the minimum signed value. If the sub is NSW, then
// N1 must be 0 because negating the minimum signed value is undefined.
if (N->getFlags()->hasNoSignedWrap())
return N0;
// 0 - X --> X if X is 0 or the minimum signed value.
return N1;
}
}
// Canonicalize (sub -1, x) -> ~x, i.e. (xor x, -1)
if (isAllOnesConstantOrAllOnesSplatConstant(N0))
return DAG.getNode(ISD::XOR, DL, VT, N1, N0);
// fold A-(A-B) -> B
if (N1.getOpcode() == ISD::SUB && N0 == N1.getOperand(0))
return N1.getOperand(1);
// fold (A+B)-A -> B
if (N0.getOpcode() == ISD::ADD && N0.getOperand(0) == N1)
return N0.getOperand(1);
// fold (A+B)-B -> A
if (N0.getOpcode() == ISD::ADD && N0.getOperand(1) == N1)
return N0.getOperand(0);
// fold C2-(A+C1) -> (C2-C1)-A
if (N1.getOpcode() == ISD::ADD) {
SDValue N11 = N1.getOperand(1);
if (isConstantOrConstantVector(N0, /* NoOpaques */ true) &&
isConstantOrConstantVector(N11, /* NoOpaques */ true)) {
SDValue NewC = DAG.getNode(ISD::SUB, DL, VT, N0, N11);
return DAG.getNode(ISD::SUB, DL, VT, NewC, N1.getOperand(0));
}
}
// fold ((A+(B+or-C))-B) -> A+or-C
if (N0.getOpcode() == ISD::ADD &&
(N0.getOperand(1).getOpcode() == ISD::SUB ||
N0.getOperand(1).getOpcode() == ISD::ADD) &&
N0.getOperand(1).getOperand(0) == N1)
return DAG.getNode(N0.getOperand(1).getOpcode(), DL, VT, N0.getOperand(0),
N0.getOperand(1).getOperand(1));
// fold ((A+(C+B))-B) -> A+C
if (N0.getOpcode() == ISD::ADD && N0.getOperand(1).getOpcode() == ISD::ADD &&
N0.getOperand(1).getOperand(1) == N1)
return DAG.getNode(ISD::ADD, DL, VT, N0.getOperand(0),
N0.getOperand(1).getOperand(0));
// fold ((A-(B-C))-C) -> A-B
if (N0.getOpcode() == ISD::SUB && N0.getOperand(1).getOpcode() == ISD::SUB &&
N0.getOperand(1).getOperand(1) == N1)
return DAG.getNode(ISD::SUB, DL, VT, N0.getOperand(0),
N0.getOperand(1).getOperand(0));
// If either operand of a sub is undef, the result is undef
if (N0.isUndef())
return N0;
if (N1.isUndef())
return N1;
// If the relocation model supports it, consider symbol offsets.
if (GlobalAddressSDNode *GA = dyn_cast<GlobalAddressSDNode>(N0))
if (!LegalOperations && TLI.isOffsetFoldingLegal(GA)) {
// fold (sub Sym, c) -> Sym-c
if (N1C && GA->getOpcode() == ISD::GlobalAddress)
return DAG.getGlobalAddress(GA->getGlobal(), SDLoc(N1C), VT,
GA->getOffset() -
(uint64_t)N1C->getSExtValue());
// fold (sub Sym+c1, Sym+c2) -> c1-c2
if (GlobalAddressSDNode *GB = dyn_cast<GlobalAddressSDNode>(N1))
if (GA->getGlobal() == GB->getGlobal())
return DAG.getConstant((uint64_t)GA->getOffset() - GB->getOffset(),
DL, VT);
}
// sub X, (sextinreg Y i1) -> add X, (and Y 1)
if (N1.getOpcode() == ISD::SIGN_EXTEND_INREG) {
VTSDNode *TN = cast<VTSDNode>(N1.getOperand(1));
if (TN->getVT() == MVT::i1) {
SDValue ZExt = DAG.getNode(ISD::AND, DL, VT, N1.getOperand(0),
DAG.getConstant(1, DL, VT));
return DAG.getNode(ISD::ADD, DL, VT, N0, ZExt);
}
}
return SDValue();
}
SDValue DAGCombiner::visitSUBC(SDNode *N) {
SDValue N0 = N->getOperand(0);
SDValue N1 = N->getOperand(1);
EVT VT = N0.getValueType();
SDLoc DL(N);
// If the flag result is dead, turn this into an SUB.
if (!N->hasAnyUseOfValue(1))
return CombineTo(N, DAG.getNode(ISD::SUB, DL, VT, N0, N1),
DAG.getNode(ISD::CARRY_FALSE, DL, MVT::Glue));
// fold (subc x, x) -> 0 + no borrow
if (N0 == N1)
return CombineTo(N, DAG.getConstant(0, DL, VT),
DAG.getNode(ISD::CARRY_FALSE, DL, MVT::Glue));
// fold (subc x, 0) -> x + no borrow
if (isNullConstant(N1))
return CombineTo(N, N0, DAG.getNode(ISD::CARRY_FALSE, DL, MVT::Glue));
// Canonicalize (sub -1, x) -> ~x, i.e. (xor x, -1) + no borrow
if (isAllOnesConstant(N0))
return CombineTo(N, DAG.getNode(ISD::XOR, DL, VT, N1, N0),
DAG.getNode(ISD::CARRY_FALSE, DL, MVT::Glue));
return SDValue();
}
SDValue DAGCombiner::visitUSUBO(SDNode *N) {
SDValue N0 = N->getOperand(0);
SDValue N1 = N->getOperand(1);
EVT VT = N0.getValueType();
if (VT.isVector())
return SDValue();
EVT CarryVT = N->getValueType(1);
SDLoc DL(N);
// If the flag result is dead, turn this into an SUB.
if (!N->hasAnyUseOfValue(1))
return CombineTo(N, DAG.getNode(ISD::SUB, DL, VT, N0, N1),
DAG.getUNDEF(CarryVT));
// fold (usubo x, x) -> 0 + no borrow
if (N0 == N1)
return CombineTo(N, DAG.getConstant(0, DL, VT),
DAG.getConstant(0, DL, CarryVT));
// fold (usubo x, 0) -> x + no borrow
if (isNullConstant(N1))
return CombineTo(N, N0, DAG.getConstant(0, DL, CarryVT));
// Canonicalize (usubo -1, x) -> ~x, i.e. (xor x, -1) + no borrow
if (isAllOnesConstant(N0))
return CombineTo(N, DAG.getNode(ISD::XOR, DL, VT, N1, N0),
DAG.getConstant(0, DL, CarryVT));
return SDValue();
}
SDValue DAGCombiner::visitSUBE(SDNode *N) {
SDValue N0 = N->getOperand(0);
SDValue N1 = N->getOperand(1);
SDValue CarryIn = N->getOperand(2);
// fold (sube x, y, false) -> (subc x, y)
if (CarryIn.getOpcode() == ISD::CARRY_FALSE)
return DAG.getNode(ISD::SUBC, SDLoc(N), N->getVTList(), N0, N1);
return SDValue();
}
SDValue DAGCombiner::visitMUL(SDNode *N) {
SDValue N0 = N->getOperand(0);
SDValue N1 = N->getOperand(1);
EVT VT = N0.getValueType();
// fold (mul x, undef) -> 0
if (N0.isUndef() || N1.isUndef())
return DAG.getConstant(0, SDLoc(N), VT);
bool N0IsConst = false;
bool N1IsConst = false;
bool N1IsOpaqueConst = false;
bool N0IsOpaqueConst = false;
APInt ConstValue0, ConstValue1;
// fold vector ops
if (VT.isVector()) {
if (SDValue FoldedVOp = SimplifyVBinOp(N))
return FoldedVOp;
N0IsConst = ISD::isConstantSplatVector(N0.getNode(), ConstValue0);
N1IsConst = ISD::isConstantSplatVector(N1.getNode(), ConstValue1);
} else {
N0IsConst = isa<ConstantSDNode>(N0);
if (N0IsConst) {
ConstValue0 = cast<ConstantSDNode>(N0)->getAPIntValue();
N0IsOpaqueConst = cast<ConstantSDNode>(N0)->isOpaque();
}
N1IsConst = isa<ConstantSDNode>(N1);
if (N1IsConst) {
ConstValue1 = cast<ConstantSDNode>(N1)->getAPIntValue();
N1IsOpaqueConst = cast<ConstantSDNode>(N1)->isOpaque();
}
}
// fold (mul c1, c2) -> c1*c2
if (N0IsConst && N1IsConst && !N0IsOpaqueConst && !N1IsOpaqueConst)
return DAG.FoldConstantArithmetic(ISD::MUL, SDLoc(N), VT,
N0.getNode(), N1.getNode());
// canonicalize constant to RHS (vector doesn't have to splat)
if (DAG.isConstantIntBuildVectorOrConstantInt(N0) &&
!DAG.isConstantIntBuildVectorOrConstantInt(N1))
return DAG.getNode(ISD::MUL, SDLoc(N), VT, N1, N0);
// fold (mul x, 0) -> 0
if (N1IsConst && ConstValue1 == 0)
return N1;
// We require a splat of the entire scalar bit width for non-contiguous
// bit patterns.
bool IsFullSplat =
ConstValue1.getBitWidth() == VT.getScalarSizeInBits();
// fold (mul x, 1) -> x
if (N1IsConst && ConstValue1 == 1 && IsFullSplat)
return N0;
if (SDValue NewSel = foldBinOpIntoSelect(N))
return NewSel;
// fold (mul x, -1) -> 0-x
if (N1IsConst && ConstValue1.isAllOnesValue()) {
SDLoc DL(N);
return DAG.getNode(ISD::SUB, DL, VT,
DAG.getConstant(0, DL, VT), N0);
}
// fold (mul x, (1 << c)) -> x << c
if (N1IsConst && !N1IsOpaqueConst && ConstValue1.isPowerOf2() &&
IsFullSplat) {
SDLoc DL(N);
return DAG.getNode(ISD::SHL, DL, VT, N0,
DAG.getConstant(ConstValue1.logBase2(), DL,
getShiftAmountTy(N0.getValueType())));
}
// fold (mul x, -(1 << c)) -> -(x << c) or (-x) << c
if (N1IsConst && !N1IsOpaqueConst && (-ConstValue1).isPowerOf2() &&
IsFullSplat) {
unsigned Log2Val = (-ConstValue1).logBase2();
SDLoc DL(N);
// FIXME: If the input is something that is easily negated (e.g. a
// single-use add), we should put the negate there.
return DAG.getNode(ISD::SUB, DL, VT,
DAG.getConstant(0, DL, VT),
DAG.getNode(ISD::SHL, DL, VT, N0,
DAG.getConstant(Log2Val, DL,
getShiftAmountTy(N0.getValueType()))));
}
// (mul (shl X, c1), c2) -> (mul X, c2 << c1)
if (N0.getOpcode() == ISD::SHL &&
isConstantOrConstantVector(N1, /* NoOpaques */ true) &&
isConstantOrConstantVector(N0.getOperand(1), /* NoOpaques */ true)) {
SDValue C3 = DAG.getNode(ISD::SHL, SDLoc(N), VT, N1, N0.getOperand(1));
if (isConstantOrConstantVector(C3))
return DAG.getNode(ISD::MUL, SDLoc(N), VT, N0.getOperand(0), C3);
}
// Change (mul (shl X, C), Y) -> (shl (mul X, Y), C) when the shift has one
// use.
{
SDValue Sh(nullptr, 0), Y(nullptr, 0);
// Check for both (mul (shl X, C), Y) and (mul Y, (shl X, C)).
if (N0.getOpcode() == ISD::SHL &&
isConstantOrConstantVector(N0.getOperand(1)) &&
N0.getNode()->hasOneUse()) {
Sh = N0; Y = N1;
} else if (N1.getOpcode() == ISD::SHL &&
isConstantOrConstantVector(N1.getOperand(1)) &&
N1.getNode()->hasOneUse()) {
Sh = N1; Y = N0;
}
if (Sh.getNode()) {
SDValue Mul = DAG.getNode(ISD::MUL, SDLoc(N), VT, Sh.getOperand(0), Y);
return DAG.getNode(ISD::SHL, SDLoc(N), VT, Mul, Sh.getOperand(1));
}
}
// fold (mul (add x, c1), c2) -> (add (mul x, c2), c1*c2)
if (DAG.isConstantIntBuildVectorOrConstantInt(N1) &&
N0.getOpcode() == ISD::ADD &&
DAG.isConstantIntBuildVectorOrConstantInt(N0.getOperand(1)) &&
isMulAddWithConstProfitable(N, N0, N1))
return DAG.getNode(ISD::ADD, SDLoc(N), VT,
DAG.getNode(ISD::MUL, SDLoc(N0), VT,
N0.getOperand(0), N1),
DAG.getNode(ISD::MUL, SDLoc(N1), VT,
N0.getOperand(1), N1));
// reassociate mul
if (SDValue RMUL = ReassociateOps(ISD::MUL, SDLoc(N), N0, N1))
return RMUL;
return SDValue();
}
/// Return true if divmod libcall is available.
static bool isDivRemLibcallAvailable(SDNode *Node, bool isSigned,
const TargetLowering &TLI) {
RTLIB::Libcall LC;
EVT NodeType = Node->getValueType(0);
if (!NodeType.isSimple())
return false;
switch (NodeType.getSimpleVT().SimpleTy) {
default: return false; // No libcall for vector types.
case MVT::i8: LC= isSigned ? RTLIB::SDIVREM_I8 : RTLIB::UDIVREM_I8; break;
case MVT::i16: LC= isSigned ? RTLIB::SDIVREM_I16 : RTLIB::UDIVREM_I16; break;
case MVT::i32: LC= isSigned ? RTLIB::SDIVREM_I32 : RTLIB::UDIVREM_I32; break;
case MVT::i64: LC= isSigned ? RTLIB::SDIVREM_I64 : RTLIB::UDIVREM_I64; break;
case MVT::i128: LC= isSigned ? RTLIB::SDIVREM_I128:RTLIB::UDIVREM_I128; break;
}
return TLI.getLibcallName(LC) != nullptr;
}
/// Issue divrem if both quotient and remainder are needed.
SDValue DAGCombiner::useDivRem(SDNode *Node) {
if (Node->use_empty())
return SDValue(); // This is a dead node, leave it alone.
unsigned Opcode = Node->getOpcode();
bool isSigned = (Opcode == ISD::SDIV) || (Opcode == ISD::SREM);
unsigned DivRemOpc = isSigned ? ISD::SDIVREM : ISD::UDIVREM;
// DivMod lib calls can still work on non-legal types if using lib-calls.
EVT VT = Node->getValueType(0);
if (VT.isVector() || !VT.isInteger())
return SDValue();
if (!TLI.isTypeLegal(VT) && !TLI.isOperationCustom(DivRemOpc, VT))
return SDValue();
// If DIVREM is going to get expanded into a libcall,
// but there is no libcall available, then don't combine.
if (!TLI.isOperationLegalOrCustom(DivRemOpc, VT) &&
!isDivRemLibcallAvailable(Node, isSigned, TLI))
return SDValue();
// If div is legal, it's better to do the normal expansion
unsigned OtherOpcode = 0;
if ((Opcode == ISD::SDIV) || (Opcode == ISD::UDIV)) {
OtherOpcode = isSigned ? ISD::SREM : ISD::UREM;
if (TLI.isOperationLegalOrCustom(Opcode, VT))
return SDValue();
} else {
OtherOpcode = isSigned ? ISD::SDIV : ISD::UDIV;
if (TLI.isOperationLegalOrCustom(OtherOpcode, VT))
return SDValue();
}
SDValue Op0 = Node->getOperand(0);
SDValue Op1 = Node->getOperand(1);
SDValue combined;
for (SDNode::use_iterator UI = Op0.getNode()->use_begin(),
UE = Op0.getNode()->use_end(); UI != UE;) {
SDNode *User = *UI++;
if (User == Node || User->use_empty())
continue;
// Convert the other matching node(s), too;
// otherwise, the DIVREM may get target-legalized into something
// target-specific that we won't be able to recognize.
unsigned UserOpc = User->getOpcode();
if ((UserOpc == Opcode || UserOpc == OtherOpcode || UserOpc == DivRemOpc) &&
User->getOperand(0) == Op0 &&
User->getOperand(1) == Op1) {
if (!combined) {
if (UserOpc == OtherOpcode) {
SDVTList VTs = DAG.getVTList(VT, VT);
combined = DAG.getNode(DivRemOpc, SDLoc(Node), VTs, Op0, Op1);
} else if (UserOpc == DivRemOpc) {
combined = SDValue(User, 0);
} else {
assert(UserOpc == Opcode);
continue;
}
}
if (UserOpc == ISD::SDIV || UserOpc == ISD::UDIV)
CombineTo(User, combined);
else if (UserOpc == ISD::SREM || UserOpc == ISD::UREM)
CombineTo(User, combined.getValue(1));
}
}
return combined;
}
static SDValue simplifyDivRem(SDNode *N, SelectionDAG &DAG) {
SDValue N0 = N->getOperand(0);
SDValue N1 = N->getOperand(1);
EVT VT = N->getValueType(0);
SDLoc DL(N);
if (DAG.isUndef(N->getOpcode(), {N0, N1}))
return DAG.getUNDEF(VT);
// undef / X -> 0
// undef % X -> 0
if (N0.isUndef())
return DAG.getConstant(0, DL, VT);
return SDValue();
}
SDValue DAGCombiner::visitSDIV(SDNode *N) {
SDValue N0 = N->getOperand(0);
SDValue N1 = N->getOperand(1);
EVT VT = N->getValueType(0);
// fold vector ops
if (VT.isVector())
if (SDValue FoldedVOp = SimplifyVBinOp(N))
return FoldedVOp;
SDLoc DL(N);
// fold (sdiv c1, c2) -> c1/c2
ConstantSDNode *N0C = isConstOrConstSplat(N0);
ConstantSDNode *N1C = isConstOrConstSplat(N1);
if (N0C && N1C && !N0C->isOpaque() && !N1C->isOpaque())
return DAG.FoldConstantArithmetic(ISD::SDIV, DL, VT, N0C, N1C);
// fold (sdiv X, 1) -> X
if (N1C && N1C->isOne())
return N0;
// fold (sdiv X, -1) -> 0-X
if (N1C && N1C->isAllOnesValue())
return DAG.getNode(ISD::SUB, DL, VT, DAG.getConstant(0, DL, VT), N0);
if (SDValue V = simplifyDivRem(N, DAG))
return V;
if (SDValue NewSel = foldBinOpIntoSelect(N))
return NewSel;
// If we know the sign bits of both operands are zero, strength reduce to a
// udiv instead. Handles (X&15) /s 4 -> X&15 >> 2
if (DAG.SignBitIsZero(N1) && DAG.SignBitIsZero(N0))
return DAG.getNode(ISD::UDIV, DL, N1.getValueType(), N0, N1);
// fold (sdiv X, pow2) -> simple ops after legalize
// FIXME: We check for the exact bit here because the generic lowering gives
// better results in that case. The target-specific lowering should learn how
// to handle exact sdivs efficiently.
if (N1C && !N1C->isNullValue() && !N1C->isOpaque() &&
!cast<BinaryWithFlagsSDNode>(N)->Flags.hasExact() &&
(N1C->getAPIntValue().isPowerOf2() ||
(-N1C->getAPIntValue()).isPowerOf2())) {
// Target-specific implementation of sdiv x, pow2.
if (SDValue Res = BuildSDIVPow2(N))
return Res;
unsigned lg2 = N1C->getAPIntValue().countTrailingZeros();
// Splat the sign bit into the register
SDValue SGN =
DAG.getNode(ISD::SRA, DL, VT, N0,
DAG.getConstant(VT.getScalarSizeInBits() - 1, DL,
getShiftAmountTy(N0.getValueType())));
AddToWorklist(SGN.getNode());
// Add (N0 < 0) ? abs2 - 1 : 0;
SDValue SRL =
DAG.getNode(ISD::SRL, DL, VT, SGN,
DAG.getConstant(VT.getScalarSizeInBits() - lg2, DL,
getShiftAmountTy(SGN.getValueType())));
SDValue ADD = DAG.getNode(ISD::ADD, DL, VT, N0, SRL);
AddToWorklist(SRL.getNode());
AddToWorklist(ADD.getNode()); // Divide by pow2
SDValue SRA = DAG.getNode(ISD::SRA, DL, VT, ADD,
DAG.getConstant(lg2, DL,
getShiftAmountTy(ADD.getValueType())));
// If we're dividing by a positive value, we're done. Otherwise, we must
// negate the result.
if (N1C->getAPIntValue().isNonNegative())
return SRA;
AddToWorklist(SRA.getNode());
return DAG.getNode(ISD::SUB, DL, VT, DAG.getConstant(0, DL, VT), SRA);
}
// If integer divide is expensive and we satisfy the requirements, emit an
// alternate sequence. Targets may check function attributes for size/speed
// trade-offs.
AttributeList Attr = DAG.getMachineFunction().getFunction()->getAttributes();
if (N1C && !TLI.isIntDivCheap(N->getValueType(0), Attr))
if (SDValue Op = BuildSDIV(N))
return Op;
// sdiv, srem -> sdivrem
// If the divisor is constant, then return DIVREM only if isIntDivCheap() is
// true. Otherwise, we break the simplification logic in visitREM().
if (!N1C || TLI.isIntDivCheap(N->getValueType(0), Attr))
if (SDValue DivRem = useDivRem(N))
return DivRem;
return SDValue();
}
SDValue DAGCombiner::visitUDIV(SDNode *N) {
SDValue N0 = N->getOperand(0);
SDValue N1 = N->getOperand(1);
EVT VT = N->getValueType(0);
// fold vector ops
if (VT.isVector())
if (SDValue FoldedVOp = SimplifyVBinOp(N))
return FoldedVOp;
SDLoc DL(N);
// fold (udiv c1, c2) -> c1/c2
ConstantSDNode *N0C = isConstOrConstSplat(N0);
ConstantSDNode *N1C = isConstOrConstSplat(N1);
if (N0C && N1C)
if (SDValue Folded = DAG.FoldConstantArithmetic(ISD::UDIV, DL, VT,
N0C, N1C))
return Folded;
if (SDValue V = simplifyDivRem(N, DAG))
return V;
if (SDValue NewSel = foldBinOpIntoSelect(N))
return NewSel;
// fold (udiv x, (1 << c)) -> x >>u c
if (isConstantOrConstantVector(N1, /*NoOpaques*/ true) &&
DAG.isKnownToBeAPowerOfTwo(N1)) {
SDValue LogBase2 = BuildLogBase2(N1, DL);
AddToWorklist(LogBase2.getNode());
EVT ShiftVT = getShiftAmountTy(N0.getValueType());
SDValue Trunc = DAG.getZExtOrTrunc(LogBase2, DL, ShiftVT);
AddToWorklist(Trunc.getNode());
return DAG.getNode(ISD::SRL, DL, VT, N0, Trunc);
}
// fold (udiv x, (shl c, y)) -> x >>u (log2(c)+y) iff c is power of 2
if (N1.getOpcode() == ISD::SHL) {
SDValue N10 = N1.getOperand(0);
if (isConstantOrConstantVector(N10, /*NoOpaques*/ true) &&
DAG.isKnownToBeAPowerOfTwo(N10)) {
SDValue LogBase2 = BuildLogBase2(N10, DL);
AddToWorklist(LogBase2.getNode());
EVT ADDVT = N1.getOperand(1).getValueType();
SDValue Trunc = DAG.getZExtOrTrunc(LogBase2, DL, ADDVT);
AddToWorklist(Trunc.getNode());
SDValue Add = DAG.getNode(ISD::ADD, DL, ADDVT, N1.getOperand(1), Trunc);
AddToWorklist(Add.getNode());
return DAG.getNode(ISD::SRL, DL, VT, N0, Add);
}
}
// fold (udiv x, c) -> alternate
AttributeList Attr = DAG.getMachineFunction().getFunction()->getAttributes();
if (N1C && !TLI.isIntDivCheap(N->getValueType(0), Attr))
if (SDValue Op = BuildUDIV(N))
return Op;
// sdiv, srem -> sdivrem
// If the divisor is constant, then return DIVREM only if isIntDivCheap() is
// true. Otherwise, we break the simplification logic in visitREM().
if (!N1C || TLI.isIntDivCheap(N->getValueType(0), Attr))
if (SDValue DivRem = useDivRem(N))
return DivRem;
return SDValue();
}
// handles ISD::SREM and ISD::UREM
SDValue DAGCombiner::visitREM(SDNode *N) {
unsigned Opcode = N->getOpcode();
SDValue N0 = N->getOperand(0);
SDValue N1 = N->getOperand(1);
EVT VT = N->getValueType(0);
bool isSigned = (Opcode == ISD::SREM);
SDLoc DL(N);
// fold (rem c1, c2) -> c1%c2
ConstantSDNode *N0C = isConstOrConstSplat(N0);
ConstantSDNode *N1C = isConstOrConstSplat(N1);
if (N0C && N1C)
if (SDValue Folded = DAG.FoldConstantArithmetic(Opcode, DL, VT, N0C, N1C))
return Folded;
if (SDValue V = simplifyDivRem(N, DAG))
return V;
if (SDValue NewSel = foldBinOpIntoSelect(N))
return NewSel;
if (isSigned) {
// If we know the sign bits of both operands are zero, strength reduce to a
// urem instead. Handles (X & 0x0FFFFFFF) %s 16 -> X&15
if (DAG.SignBitIsZero(N1) && DAG.SignBitIsZero(N0))
return DAG.getNode(ISD::UREM, DL, VT, N0, N1);
} else {
SDValue NegOne = DAG.getAllOnesConstant(DL, VT);
if (DAG.isKnownToBeAPowerOfTwo(N1)) {
// fold (urem x, pow2) -> (and x, pow2-1)
SDValue Add = DAG.getNode(ISD::ADD, DL, VT, N1, NegOne);
AddToWorklist(Add.getNode());
return DAG.getNode(ISD::AND, DL, VT, N0, Add);
}
if (N1.getOpcode() == ISD::SHL &&
DAG.isKnownToBeAPowerOfTwo(N1.getOperand(0))) {
// fold (urem x, (shl pow2, y)) -> (and x, (add (shl pow2, y), -1))
SDValue Add = DAG.getNode(ISD::ADD, DL, VT, N1, NegOne);
AddToWorklist(Add.getNode());
return DAG.getNode(ISD::AND, DL, VT, N0, Add);
}
}
AttributeList Attr = DAG.getMachineFunction().getFunction()->getAttributes();
// If X/C can be simplified by the division-by-constant logic, lower
// X%C to the equivalent of X-X/C*C.
// To avoid mangling nodes, this simplification requires that the combine()
// call for the speculative DIV must not cause a DIVREM conversion. We guard
// against this by skipping the simplification if isIntDivCheap(). When
// div is not cheap, combine will not return a DIVREM. Regardless,
// checking cheapness here makes sense since the simplification results in
// fatter code.
if (N1C && !N1C->isNullValue() && !TLI.isIntDivCheap(VT, Attr)) {
unsigned DivOpcode = isSigned ? ISD::SDIV : ISD::UDIV;
SDValue Div = DAG.getNode(DivOpcode, DL, VT, N0, N1);
AddToWorklist(Div.getNode());
SDValue OptimizedDiv = combine(Div.getNode());
if (OptimizedDiv.getNode() && OptimizedDiv.getNode() != Div.getNode()) {
assert((OptimizedDiv.getOpcode() != ISD::UDIVREM) &&
(OptimizedDiv.getOpcode() != ISD::SDIVREM));
SDValue Mul = DAG.getNode(ISD::MUL, DL, VT, OptimizedDiv, N1);
SDValue Sub = DAG.getNode(ISD::SUB, DL, VT, N0, Mul);
AddToWorklist(Mul.getNode());
return Sub;
}
}
// sdiv, srem -> sdivrem
if (SDValue DivRem = useDivRem(N))
return DivRem.getValue(1);
return SDValue();
}
SDValue DAGCombiner::visitMULHS(SDNode *N) {
SDValue N0 = N->getOperand(0);
SDValue N1 = N->getOperand(1);
EVT VT = N->getValueType(0);
SDLoc DL(N);
// fold (mulhs x, 0) -> 0
if (isNullConstant(N1))
return N1;
// fold (mulhs x, 1) -> (sra x, size(x)-1)
if (isOneConstant(N1)) {
SDLoc DL(N);
return DAG.getNode(ISD::SRA, DL, N0.getValueType(), N0,
DAG.getConstant(N0.getValueSizeInBits() - 1, DL,
getShiftAmountTy(N0.getValueType())));
}
// fold (mulhs x, undef) -> 0
if (N0.isUndef() || N1.isUndef())
return DAG.getConstant(0, SDLoc(N), VT);
// If the type twice as wide is legal, transform the mulhs to a wider multiply
// plus a shift.
if (VT.isSimple() && !VT.isVector()) {
MVT Simple = VT.getSimpleVT();
unsigned SimpleSize = Simple.getSizeInBits();
EVT NewVT = EVT::getIntegerVT(*DAG.getContext(), SimpleSize*2);
if (TLI.isOperationLegal(ISD::MUL, NewVT)) {
N0 = DAG.getNode(ISD::SIGN_EXTEND, DL, NewVT, N0);
N1 = DAG.getNode(ISD::SIGN_EXTEND, DL, NewVT, N1);
N1 = DAG.getNode(ISD::MUL, DL, NewVT, N0, N1);
N1 = DAG.getNode(ISD::SRL, DL, NewVT, N1,
DAG.getConstant(SimpleSize, DL,
getShiftAmountTy(N1.getValueType())));
return DAG.getNode(ISD::TRUNCATE, DL, VT, N1);
}
}
return SDValue();
}
SDValue DAGCombiner::visitMULHU(SDNode *N) {
SDValue N0 = N->getOperand(0);
SDValue N1 = N->getOperand(1);
EVT VT = N->getValueType(0);
SDLoc DL(N);
// fold (mulhu x, 0) -> 0
if (isNullConstant(N1))
return N1;
// fold (mulhu x, 1) -> 0
if (isOneConstant(N1))
return DAG.getConstant(0, DL, N0.getValueType());
// fold (mulhu x, undef) -> 0
if (N0.isUndef() || N1.isUndef())
return DAG.getConstant(0, DL, VT);
// If the type twice as wide is legal, transform the mulhu to a wider multiply
// plus a shift.
if (VT.isSimple() && !VT.isVector()) {
MVT Simple = VT.getSimpleVT();
unsigned SimpleSize = Simple.getSizeInBits();
EVT NewVT = EVT::getIntegerVT(*DAG.getContext(), SimpleSize*2);
if (TLI.isOperationLegal(ISD::MUL, NewVT)) {
N0 = DAG.getNode(ISD::ZERO_EXTEND, DL, NewVT, N0);
N1 = DAG.getNode(ISD::ZERO_EXTEND, DL, NewVT, N1);
N1 = DAG.getNode(ISD::MUL, DL, NewVT, N0, N1);
N1 = DAG.getNode(ISD::SRL, DL, NewVT, N1,
DAG.getConstant(SimpleSize, DL,
getShiftAmountTy(N1.getValueType())));
return DAG.getNode(ISD::TRUNCATE, DL, VT, N1);
}
}
return SDValue();
}
/// Perform optimizations common to nodes that compute two values. LoOp and HiOp
/// give the opcodes for the two computations that are being performed. Return
/// true if a simplification was made.
SDValue DAGCombiner::SimplifyNodeWithTwoResults(SDNode *N, unsigned LoOp,
unsigned HiOp) {
// If the high half is not needed, just compute the low half.
bool HiExists = N->hasAnyUseOfValue(1);
if (!HiExists &&
(!LegalOperations ||
TLI.isOperationLegalOrCustom(LoOp, N->getValueType(0)))) {
SDValue Res = DAG.getNode(LoOp, SDLoc(N), N->getValueType(0), N->ops());
return CombineTo(N, Res, Res);
}
// If the low half is not needed, just compute the high half.
bool LoExists = N->hasAnyUseOfValue(0);
if (!LoExists &&
(!LegalOperations ||
TLI.isOperationLegal(HiOp, N->getValueType(1)))) {
SDValue Res = DAG.getNode(HiOp, SDLoc(N), N->getValueType(1), N->ops());
return CombineTo(N, Res, Res);
}
// If both halves are used, return as it is.
if (LoExists && HiExists)
return SDValue();
// If the two computed results can be simplified separately, separate them.
if (LoExists) {
SDValue Lo = DAG.getNode(LoOp, SDLoc(N), N->getValueType(0), N->ops());
AddToWorklist(Lo.getNode());
SDValue LoOpt = combine(Lo.getNode());
if (LoOpt.getNode() && LoOpt.getNode() != Lo.getNode() &&
(!LegalOperations ||
TLI.isOperationLegal(LoOpt.getOpcode(), LoOpt.getValueType())))
return CombineTo(N, LoOpt, LoOpt);
}
if (HiExists) {
SDValue Hi = DAG.getNode(HiOp, SDLoc(N), N->getValueType(1), N->ops());
AddToWorklist(Hi.getNode());
SDValue HiOpt = combine(Hi.getNode());
if (HiOpt.getNode() && HiOpt != Hi &&
(!LegalOperations ||
TLI.isOperationLegal(HiOpt.getOpcode(), HiOpt.getValueType())))
return CombineTo(N, HiOpt, HiOpt);
}
return SDValue();
}
SDValue DAGCombiner::visitSMUL_LOHI(SDNode *N) {
if (SDValue Res = SimplifyNodeWithTwoResults(N, ISD::MUL, ISD::MULHS))
return Res;
EVT VT = N->getValueType(0);
SDLoc DL(N);
// If the type is twice as wide is legal, transform the mulhu to a wider
// multiply plus a shift.
if (VT.isSimple() && !VT.isVector()) {
MVT Simple = VT.getSimpleVT();
unsigned SimpleSize = Simple.getSizeInBits();
EVT NewVT = EVT::getIntegerVT(*DAG.getContext(), SimpleSize*2);
if (TLI.isOperationLegal(ISD::MUL, NewVT)) {
SDValue Lo = DAG.getNode(ISD::SIGN_EXTEND, DL, NewVT, N->getOperand(0));
SDValue Hi = DAG.getNode(ISD::SIGN_EXTEND, DL, NewVT, N->getOperand(1));
Lo = DAG.getNode(ISD::MUL, DL, NewVT, Lo, Hi);
// Compute the high part as N1.
Hi = DAG.getNode(ISD::SRL, DL, NewVT, Lo,
DAG.getConstant(SimpleSize, DL,
getShiftAmountTy(Lo.getValueType())));
Hi = DAG.getNode(ISD::TRUNCATE, DL, VT, Hi);
// Compute the low part as N0.
Lo = DAG.getNode(ISD::TRUNCATE, DL, VT, Lo);
return CombineTo(N, Lo, Hi);
}
}
return SDValue();
}
SDValue DAGCombiner::visitUMUL_LOHI(SDNode *N) {
if (SDValue Res = SimplifyNodeWithTwoResults(N, ISD::MUL, ISD::MULHU))
return Res;
EVT VT = N->getValueType(0);
SDLoc DL(N);
// If the type is twice as wide is legal, transform the mulhu to a wider
// multiply plus a shift.
if (VT.isSimple() && !VT.isVector()) {
MVT Simple = VT.getSimpleVT();
unsigned SimpleSize = Simple.getSizeInBits();
EVT NewVT = EVT::getIntegerVT(*DAG.getContext(), SimpleSize*2);
if (TLI.isOperationLegal(ISD::MUL, NewVT)) {
SDValue Lo = DAG.getNode(ISD::ZERO_EXTEND, DL, NewVT, N->getOperand(0));
SDValue Hi = DAG.getNode(ISD::ZERO_EXTEND, DL, NewVT, N->getOperand(1));
Lo = DAG.getNode(ISD::MUL, DL, NewVT, Lo, Hi);
// Compute the high part as N1.
Hi = DAG.getNode(ISD::SRL, DL, NewVT, Lo,
DAG.getConstant(SimpleSize, DL,
getShiftAmountTy(Lo.getValueType())));
Hi = DAG.getNode(ISD::TRUNCATE, DL, VT, Hi);
// Compute the low part as N0.
Lo = DAG.getNode(ISD::TRUNCATE, DL, VT, Lo);
return CombineTo(N, Lo, Hi);
}
}
return SDValue();
}
SDValue DAGCombiner::visitSMULO(SDNode *N) {
// (smulo x, 2) -> (saddo x, x)
if (ConstantSDNode *C2 = dyn_cast<ConstantSDNode>(N->getOperand(1)))
if (C2->getAPIntValue() == 2)
return DAG.getNode(ISD::SADDO, SDLoc(N), N->getVTList(),
N->getOperand(0), N->getOperand(0));
return SDValue();
}
SDValue DAGCombiner::visitUMULO(SDNode *N) {
// (umulo x, 2) -> (uaddo x, x)
if (ConstantSDNode *C2 = dyn_cast<ConstantSDNode>(N->getOperand(1)))
if (C2->getAPIntValue() == 2)
return DAG.getNode(ISD::UADDO, SDLoc(N), N->getVTList(),
N->getOperand(0), N->getOperand(0));
return SDValue();
}
SDValue DAGCombiner::visitIMINMAX(SDNode *N) {
SDValue N0 = N->getOperand(0);
SDValue N1 = N->getOperand(1);
EVT VT = N0.getValueType();
// fold vector ops
if (VT.isVector())
if (SDValue FoldedVOp = SimplifyVBinOp(N))
return FoldedVOp;
// fold (add c1, c2) -> c1+c2
ConstantSDNode *N0C = getAsNonOpaqueConstant(N0);
ConstantSDNode *N1C = getAsNonOpaqueConstant(N1);
if (N0C && N1C)
return DAG.FoldConstantArithmetic(N->getOpcode(), SDLoc(N), VT, N0C, N1C);
// canonicalize constant to RHS
if (DAG.isConstantIntBuildVectorOrConstantInt(N0) &&
!DAG.isConstantIntBuildVectorOrConstantInt(N1))
return DAG.getNode(N->getOpcode(), SDLoc(N), VT, N1, N0);
return SDValue();
}
/// If this is a binary operator with two operands of the same opcode, try to
/// simplify it.
SDValue DAGCombiner::SimplifyBinOpWithSameOpcodeHands(SDNode *N) {
SDValue N0 = N->getOperand(0), N1 = N->getOperand(1);
EVT VT = N0.getValueType();
assert(N0.getOpcode() == N1.getOpcode() && "Bad input!");
// Bail early if none of these transforms apply.
if (N0.getNumOperands() == 0) return SDValue();
// For each of OP in AND/OR/XOR:
// fold (OP (zext x), (zext y)) -> (zext (OP x, y))
// fold (OP (sext x), (sext y)) -> (sext (OP x, y))
// fold (OP (aext x), (aext y)) -> (aext (OP x, y))
// fold (OP (bswap x), (bswap y)) -> (bswap (OP x, y))
// fold (OP (trunc x), (trunc y)) -> (trunc (OP x, y)) (if trunc isn't free)
//
// do not sink logical op inside of a vector extend, since it may combine
// into a vsetcc.
EVT Op0VT = N0.getOperand(0).getValueType();
if ((N0.getOpcode() == ISD::ZERO_EXTEND ||
N0.getOpcode() == ISD::SIGN_EXTEND ||
N0.getOpcode() == ISD::BSWAP ||
// Avoid infinite looping with PromoteIntBinOp.
(N0.getOpcode() == ISD::ANY_EXTEND &&
(!LegalTypes || TLI.isTypeDesirableForOp(N->getOpcode(), Op0VT))) ||
(N0.getOpcode() == ISD::TRUNCATE &&
(!TLI.isZExtFree(VT, Op0VT) ||
!TLI.isTruncateFree(Op0VT, VT)) &&
TLI.isTypeLegal(Op0VT))) &&
!VT.isVector() &&
Op0VT == N1.getOperand(0).getValueType() &&
(!LegalOperations || TLI.isOperationLegal(N->getOpcode(), Op0VT))) {
SDValue ORNode = DAG.getNode(N->getOpcode(), SDLoc(N0),
N0.getOperand(0).getValueType(),
N0.getOperand(0), N1.getOperand(0));
AddToWorklist(ORNode.getNode());
return DAG.getNode(N0.getOpcode(), SDLoc(N), VT, ORNode);
}
// For each of OP in SHL/SRL/SRA/AND...
// fold (and (OP x, z), (OP y, z)) -> (OP (and x, y), z)
// fold (or (OP x, z), (OP y, z)) -> (OP (or x, y), z)
// fold (xor (OP x, z), (OP y, z)) -> (OP (xor x, y), z)
if ((N0.getOpcode() == ISD::SHL || N0.getOpcode() == ISD::SRL ||
N0.getOpcode() == ISD::SRA || N0.getOpcode() == ISD::AND) &&
N0.getOperand(1) == N1.getOperand(1)) {
SDValue ORNode = DAG.getNode(N->getOpcode(), SDLoc(N0),
N0.getOperand(0).getValueType(),
N0.getOperand(0), N1.getOperand(0));
AddToWorklist(ORNode.getNode());
return DAG.getNode(N0.getOpcode(), SDLoc(N), VT,
ORNode, N0.getOperand(1));
}
// Simplify xor/and/or (bitcast(A), bitcast(B)) -> bitcast(op (A,B))
// Only perform this optimization up until type legalization, before
// LegalizeVectorOprs. LegalizeVectorOprs promotes vector operations by
// adding bitcasts. For example (xor v4i32) is promoted to (v2i64), and
// we don't want to undo this promotion.
// We also handle SCALAR_TO_VECTOR because xor/or/and operations are cheaper
// on scalars.
if ((N0.getOpcode() == ISD::BITCAST ||
N0.getOpcode() == ISD::SCALAR_TO_VECTOR) &&
Level <= AfterLegalizeTypes) {
SDValue In0 = N0.getOperand(0);
SDValue In1 = N1.getOperand(0);
EVT In0Ty = In0.getValueType();
EVT In1Ty = In1.getValueType();
SDLoc DL(N);
// If both incoming values are integers, and the original types are the
// same.
if (In0Ty.isInteger() && In1Ty.isInteger() && In0Ty == In1Ty) {
SDValue Op = DAG.getNode(N->getOpcode(), DL, In0Ty, In0, In1);
SDValue BC = DAG.getNode(N0.getOpcode(), DL, VT, Op);
AddToWorklist(Op.getNode());
return BC;
}
}
// Xor/and/or are indifferent to the swizzle operation (shuffle of one value).
// Simplify xor/and/or (shuff(A), shuff(B)) -> shuff(op (A,B))
// If both shuffles use the same mask, and both shuffle within a single
// vector, then it is worthwhile to move the swizzle after the operation.
// The type-legalizer generates this pattern when loading illegal
// vector types from memory. In many cases this allows additional shuffle
// optimizations.
// There are other cases where moving the shuffle after the xor/and/or
// is profitable even if shuffles don't perform a swizzle.
// If both shuffles use the same mask, and both shuffles have the same first
// or second operand, then it might still be profitable to move the shuffle
// after the xor/and/or operation.
if (N0.getOpcode() == ISD::VECTOR_SHUFFLE && Level < AfterLegalizeDAG) {
ShuffleVectorSDNode *SVN0 = cast<ShuffleVectorSDNode>(N0);
ShuffleVectorSDNode *SVN1 = cast<ShuffleVectorSDNode>(N1);
assert(N0.getOperand(0).getValueType() == N1.getOperand(0).getValueType() &&
"Inputs to shuffles are not the same type");
// Check that both shuffles use the same mask. The masks are known to be of
// the same length because the result vector type is the same.
// Check also that shuffles have only one use to avoid introducing extra
// instructions.
if (SVN0->hasOneUse() && SVN1->hasOneUse() &&
SVN0->getMask().equals(SVN1->getMask())) {
SDValue ShOp = N0->getOperand(1);
// Don't try to fold this node if it requires introducing a
// build vector of all zeros that might be illegal at this stage.
if (N->getOpcode() == ISD::XOR && !ShOp.isUndef()) {
if (!LegalTypes)
ShOp = DAG.getConstant(0, SDLoc(N), VT);
else
ShOp = SDValue();
}
// (AND (shuf (A, C), shuf (B, C)) -> shuf (AND (A, B), C)
// (OR (shuf (A, C), shuf (B, C)) -> shuf (OR (A, B), C)
// (XOR (shuf (A, C), shuf (B, C)) -> shuf (XOR (A, B), V_0)
if (N0.getOperand(1) == N1.getOperand(1) && ShOp.getNode()) {
SDValue NewNode = DAG.getNode(N->getOpcode(), SDLoc(N), VT,
N0->getOperand(0), N1->getOperand(0));
AddToWorklist(NewNode.getNode());
return DAG.getVectorShuffle(VT, SDLoc(N), NewNode, ShOp,
SVN0->getMask());
}
// Don't try to fold this node if it requires introducing a
// build vector of all zeros that might be illegal at this stage.
ShOp = N0->getOperand(0);
if (N->getOpcode() == ISD::XOR && !ShOp.isUndef()) {
if (!LegalTypes)
ShOp = DAG.getConstant(0, SDLoc(N), VT);
else
ShOp = SDValue();
}
// (AND (shuf (C, A), shuf (C, B)) -> shuf (C, AND (A, B))
// (OR (shuf (C, A), shuf (C, B)) -> shuf (C, OR (A, B))
// (XOR (shuf (C, A), shuf (C, B)) -> shuf (V_0, XOR (A, B))
if (N0->getOperand(0) == N1->getOperand(0) && ShOp.getNode()) {
SDValue NewNode = DAG.getNode(N->getOpcode(), SDLoc(N), VT,
N0->getOperand(1), N1->getOperand(1));
AddToWorklist(NewNode.getNode());
return DAG.getVectorShuffle(VT, SDLoc(N), ShOp, NewNode,
SVN0->getMask());
}
}
}
return SDValue();
}
/// Try to make (and/or setcc (LL, LR), setcc (RL, RR)) more efficient.
SDValue DAGCombiner::foldLogicOfSetCCs(bool IsAnd, SDValue N0, SDValue N1,
const SDLoc &DL) {
SDValue LL, LR, RL, RR, N0CC, N1CC;
if (!isSetCCEquivalent(N0, LL, LR, N0CC) ||
!isSetCCEquivalent(N1, RL, RR, N1CC))
return SDValue();
assert(N0.getValueType() == N1.getValueType() &&
"Unexpected operand types for bitwise logic op");
assert(LL.getValueType() == LR.getValueType() &&
RL.getValueType() == RR.getValueType() &&
"Unexpected operand types for setcc");
// If we're here post-legalization or the logic op type is not i1, the logic
// op type must match a setcc result type. Also, all folds require new
// operations on the left and right operands, so those types must match.
EVT VT = N0.getValueType();
EVT OpVT = LL.getValueType();
if (LegalOperations || VT != MVT::i1)
if (VT != getSetCCResultType(OpVT))
return SDValue();
if (OpVT != RL.getValueType())
return SDValue();
ISD::CondCode CC0 = cast<CondCodeSDNode>(N0CC)->get();
ISD::CondCode CC1 = cast<CondCodeSDNode>(N1CC)->get();
bool IsInteger = OpVT.isInteger();
if (LR == RR && CC0 == CC1 && IsInteger) {
bool IsZero = isNullConstantOrNullSplatConstant(LR);
bool IsNeg1 = isAllOnesConstantOrAllOnesSplatConstant(LR);
// All bits clear?
bool AndEqZero = IsAnd && CC1 == ISD::SETEQ && IsZero;
// All sign bits clear?
bool AndGtNeg1 = IsAnd && CC1 == ISD::SETGT && IsNeg1;
// Any bits set?
bool OrNeZero = !IsAnd && CC1 == ISD::SETNE && IsZero;
// Any sign bits set?
bool OrLtZero = !IsAnd && CC1 == ISD::SETLT && IsZero;
// (and (seteq X, 0), (seteq Y, 0)) --> (seteq (or X, Y), 0)
// (and (setgt X, -1), (setgt Y, -1)) --> (setgt (or X, Y), -1)
// (or (setne X, 0), (setne Y, 0)) --> (setne (or X, Y), 0)
// (or (setlt X, 0), (setlt Y, 0)) --> (setlt (or X, Y), 0)
if (AndEqZero || AndGtNeg1 || OrNeZero || OrLtZero) {
SDValue Or = DAG.getNode(ISD::OR, SDLoc(N0), OpVT, LL, RL);
AddToWorklist(Or.getNode());
return DAG.getSetCC(DL, VT, Or, LR, CC1);
}
// All bits set?
bool AndEqNeg1 = IsAnd && CC1 == ISD::SETEQ && IsNeg1;
// All sign bits set?
bool AndLtZero = IsAnd && CC1 == ISD::SETLT && IsZero;
// Any bits clear?
bool OrNeNeg1 = !IsAnd && CC1 == ISD::SETNE && IsNeg1;
// Any sign bits clear?
bool OrGtNeg1 = !IsAnd && CC1 == ISD::SETGT && IsNeg1;
// (and (seteq X, -1), (seteq Y, -1)) --> (seteq (and X, Y), -1)
// (and (setlt X, 0), (setlt Y, 0)) --> (setlt (and X, Y), 0)
// (or (setne X, -1), (setne Y, -1)) --> (setne (and X, Y), -1)
// (or (setgt X, -1), (setgt Y -1)) --> (setgt (and X, Y), -1)
if (AndEqNeg1 || AndLtZero || OrNeNeg1 || OrGtNeg1) {
SDValue And = DAG.getNode(ISD::AND, SDLoc(N0), OpVT, LL, RL);
AddToWorklist(And.getNode());
return DAG.getSetCC(DL, VT, And, LR, CC1);
}
}
// TODO: What is the 'or' equivalent of this fold?
// (and (setne X, 0), (setne X, -1)) --> (setuge (add X, 1), 2)
if (IsAnd && LL == RL && CC0 == CC1 && IsInteger && CC0 == ISD::SETNE &&
((isNullConstant(LR) && isAllOnesConstant(RR)) ||
(isAllOnesConstant(LR) && isNullConstant(RR)))) {
SDValue One = DAG.getConstant(1, DL, OpVT);
SDValue Two = DAG.getConstant(2, DL, OpVT);
SDValue Add = DAG.getNode(ISD::ADD, SDLoc(N0), OpVT, LL, One);
AddToWorklist(Add.getNode());
return DAG.getSetCC(DL, VT, Add, Two, ISD::SETUGE);
}
// Try more general transforms if the predicates match and the only user of
// the compares is the 'and' or 'or'.
if (IsInteger && TLI.convertSetCCLogicToBitwiseLogic(OpVT) && CC0 == CC1 &&
N0.hasOneUse() && N1.hasOneUse()) {
// and (seteq A, B), (seteq C, D) --> seteq (or (xor A, B), (xor C, D)), 0
// or (setne A, B), (setne C, D) --> setne (or (xor A, B), (xor C, D)), 0
if ((IsAnd && CC1 == ISD::SETEQ) || (!IsAnd && CC1 == ISD::SETNE)) {
SDValue XorL = DAG.getNode(ISD::XOR, SDLoc(N0), OpVT, LL, LR);
SDValue XorR = DAG.getNode(ISD::XOR, SDLoc(N1), OpVT, RL, RR);
SDValue Or = DAG.getNode(ISD::OR, DL, OpVT, XorL, XorR);
SDValue Zero = DAG.getConstant(0, DL, OpVT);
return DAG.getSetCC(DL, VT, Or, Zero, CC1);
}
}
// Canonicalize equivalent operands to LL == RL.
if (LL == RR && LR == RL) {
CC1 = ISD::getSetCCSwappedOperands(CC1);
std::swap(RL, RR);
}
// (and (setcc X, Y, CC0), (setcc X, Y, CC1)) --> (setcc X, Y, NewCC)
// (or (setcc X, Y, CC0), (setcc X, Y, CC1)) --> (setcc X, Y, NewCC)
if (LL == RL && LR == RR) {
ISD::CondCode NewCC = IsAnd ? ISD::getSetCCAndOperation(CC0, CC1, IsInteger)
: ISD::getSetCCOrOperation(CC0, CC1, IsInteger);
if (NewCC != ISD::SETCC_INVALID &&
(!LegalOperations ||
(TLI.isCondCodeLegal(NewCC, LL.getSimpleValueType()) &&
TLI.isOperationLegal(ISD::SETCC, OpVT))))
return DAG.getSetCC(DL, VT, LL, LR, NewCC);
}
return SDValue();
}
/// This contains all DAGCombine rules which reduce two values combined by
/// an And operation to a single value. This makes them reusable in the context
/// of visitSELECT(). Rules involving constants are not included as
/// visitSELECT() already handles those cases.
SDValue DAGCombiner::visitANDLike(SDValue N0, SDValue N1, SDNode *N) {
EVT VT = N1.getValueType();
SDLoc DL(N);
// fold (and x, undef) -> 0
if (N0.isUndef() || N1.isUndef())
return DAG.getConstant(0, DL, VT);
if (SDValue V = foldLogicOfSetCCs(true, N0, N1, DL))
return V;
if (N0.getOpcode() == ISD::ADD && N1.getOpcode() == ISD::SRL &&
VT.getSizeInBits() <= 64) {
if (ConstantSDNode *ADDI = dyn_cast<ConstantSDNode>(N0.getOperand(1))) {
APInt ADDC = ADDI->getAPIntValue();
if (!TLI.isLegalAddImmediate(ADDC.getSExtValue())) {
// Look for (and (add x, c1), (lshr y, c2)). If C1 wasn't a legal
// immediate for an add, but it is legal if its top c2 bits are set,
// transform the ADD so the immediate doesn't need to be materialized
// in a register.
if (ConstantSDNode *SRLI = dyn_cast<ConstantSDNode>(N1.getOperand(1))) {
APInt Mask = APInt::getHighBitsSet(VT.getSizeInBits(),
SRLI->getZExtValue());
if (DAG.MaskedValueIsZero(N0.getOperand(1), Mask)) {
ADDC |= Mask;
if (TLI.isLegalAddImmediate(ADDC.getSExtValue())) {
SDLoc DL0(N0);
SDValue NewAdd =
DAG.getNode(ISD::ADD, DL0, VT,
N0.getOperand(0), DAG.getConstant(ADDC, DL, VT));
CombineTo(N0.getNode(), NewAdd);
// Return N so it doesn't get rechecked!
return SDValue(N, 0);
}
}
}
}
}
}
// Reduce bit extract of low half of an integer to the narrower type.
// (and (srl i64:x, K), KMask) ->
// (i64 zero_extend (and (srl (i32 (trunc i64:x)), K)), KMask)
if (N0.getOpcode() == ISD::SRL && N0.hasOneUse()) {
if (ConstantSDNode *CAnd = dyn_cast<ConstantSDNode>(N1)) {
if (ConstantSDNode *CShift = dyn_cast<ConstantSDNode>(N0.getOperand(1))) {
unsigned Size = VT.getSizeInBits();
const APInt &AndMask = CAnd->getAPIntValue();
unsigned ShiftBits = CShift->getZExtValue();
// Bail out, this node will probably disappear anyway.
if (ShiftBits == 0)
return SDValue();
unsigned MaskBits = AndMask.countTrailingOnes();
EVT HalfVT = EVT::getIntegerVT(*DAG.getContext(), Size / 2);
if (AndMask.isMask() &&
// Required bits must not span the two halves of the integer and
// must fit in the half size type.
(ShiftBits + MaskBits <= Size / 2) &&
TLI.isNarrowingProfitable(VT, HalfVT) &&
TLI.isTypeDesirableForOp(ISD::AND, HalfVT) &&
TLI.isTypeDesirableForOp(ISD::SRL, HalfVT) &&
TLI.isTruncateFree(VT, HalfVT) &&
TLI.isZExtFree(HalfVT, VT)) {
// The isNarrowingProfitable is to avoid regressions on PPC and
// AArch64 which match a few 64-bit bit insert / bit extract patterns
// on downstream users of this. Those patterns could probably be
// extended to handle extensions mixed in.
SDValue SL(N0);
assert(MaskBits <= Size);
// Extracting the highest bit of the low half.
EVT ShiftVT = TLI.getShiftAmountTy(HalfVT, DAG.getDataLayout());
SDValue Trunc = DAG.getNode(ISD::TRUNCATE, SL, HalfVT,
N0.getOperand(0));
SDValue NewMask = DAG.getConstant(AndMask.trunc(Size / 2), SL, HalfVT);
SDValue ShiftK = DAG.getConstant(ShiftBits, SL, ShiftVT);
SDValue Shift = DAG.getNode(ISD::SRL, SL, HalfVT, Trunc, ShiftK);
SDValue And = DAG.getNode(ISD::AND, SL, HalfVT, Shift, NewMask);
return DAG.getNode(ISD::ZERO_EXTEND, SL, VT, And);
}
}
}
}
return SDValue();
}
bool DAGCombiner::isAndLoadExtLoad(ConstantSDNode *AndC, LoadSDNode *LoadN,
EVT LoadResultTy, EVT &ExtVT, EVT &LoadedVT,
bool &NarrowLoad) {
uint32_t ActiveBits = AndC->getAPIntValue().getActiveBits();
if (ActiveBits == 0 || !AndC->getAPIntValue().isMask(ActiveBits))
return false;
ExtVT = EVT::getIntegerVT(*DAG.getContext(), ActiveBits);
LoadedVT = LoadN->getMemoryVT();
if (ExtVT == LoadedVT &&
(!LegalOperations ||
TLI.isLoadExtLegal(ISD::ZEXTLOAD, LoadResultTy, ExtVT))) {
// ZEXTLOAD will match without needing to change the size of the value being
// loaded.
NarrowLoad = false;
return true;
}
// Do not change the width of a volatile load.
if (LoadN->isVolatile())
return false;
// Do not generate loads of non-round integer types since these can
// be expensive (and would be wrong if the type is not byte sized).
if (!LoadedVT.bitsGT(ExtVT) || !ExtVT.isRound())
return false;
if (LegalOperations &&
!TLI.isLoadExtLegal(ISD::ZEXTLOAD, LoadResultTy, ExtVT))
return false;
if (!TLI.shouldReduceLoadWidth(LoadN, ISD::ZEXTLOAD, ExtVT))
return false;
NarrowLoad = true;
return true;
}
SDValue DAGCombiner::visitAND(SDNode *N) {
SDValue N0 = N->getOperand(0);
SDValue N1 = N->getOperand(1);
EVT VT = N1.getValueType();
// x & x --> x
if (N0 == N1)
return N0;
// fold vector ops
if (VT.isVector()) {
if (SDValue FoldedVOp = SimplifyVBinOp(N))
return FoldedVOp;
// fold (and x, 0) -> 0, vector edition
if (ISD::isBuildVectorAllZeros(N0.getNode()))
// do not return N0, because undef node may exist in N0
return DAG.getConstant(APInt::getNullValue(N0.getScalarValueSizeInBits()),
SDLoc(N), N0.getValueType());
if (ISD::isBuildVectorAllZeros(N1.getNode()))
// do not return N1, because undef node may exist in N1
return DAG.getConstant(APInt::getNullValue(N1.getScalarValueSizeInBits()),
SDLoc(N), N1.getValueType());
// fold (and x, -1) -> x, vector edition
if (ISD::isBuildVectorAllOnes(N0.getNode()))
return N1;
if (ISD::isBuildVectorAllOnes(N1.getNode()))
return N0;
}
// fold (and c1, c2) -> c1&c2
ConstantSDNode *N0C = getAsNonOpaqueConstant(N0);
ConstantSDNode *N1C = isConstOrConstSplat(N1);
if (N0C && N1C && !N1C->isOpaque())
return DAG.FoldConstantArithmetic(ISD::AND, SDLoc(N), VT, N0C, N1C);
// canonicalize constant to RHS
if (DAG.isConstantIntBuildVectorOrConstantInt(N0) &&
!DAG.isConstantIntBuildVectorOrConstantInt(N1))
return DAG.getNode(ISD::AND, SDLoc(N), VT, N1, N0);
// fold (and x, -1) -> x
if (isAllOnesConstant(N1))
return N0;
// if (and x, c) is known to be zero, return 0
unsigned BitWidth = VT.getScalarSizeInBits();
if (N1C && DAG.MaskedValueIsZero(SDValue(N, 0),
APInt::getAllOnesValue(BitWidth)))
return DAG.getConstant(0, SDLoc(N), VT);
if (SDValue NewSel = foldBinOpIntoSelect(N))
return NewSel;
// reassociate and
if (SDValue RAND = ReassociateOps(ISD::AND, SDLoc(N), N0, N1))
return RAND;
// fold (and (or x, C), D) -> D if (C & D) == D
if (N1C && N0.getOpcode() == ISD::OR)
if (ConstantSDNode *ORI = isConstOrConstSplat(N0.getOperand(1)))
if ((ORI->getAPIntValue() & N1C->getAPIntValue()) == N1C->getAPIntValue())
return N1;
// fold (and (any_ext V), c) -> (zero_ext V) if 'and' only clears top bits.
if (N1C && N0.getOpcode() == ISD::ANY_EXTEND) {
SDValue N0Op0 = N0.getOperand(0);
APInt Mask = ~N1C->getAPIntValue();
Mask = Mask.trunc(N0Op0.getScalarValueSizeInBits());
if (DAG.MaskedValueIsZero(N0Op0, Mask)) {
SDValue Zext = DAG.getNode(ISD::ZERO_EXTEND, SDLoc(N),
N0.getValueType(), N0Op0);
// Replace uses of the AND with uses of the Zero extend node.
CombineTo(N, Zext);
// We actually want to replace all uses of the any_extend with the
// zero_extend, to avoid duplicating things. This will later cause this
// AND to be folded.
CombineTo(N0.getNode(), Zext);
return SDValue(N, 0); // Return N so it doesn't get rechecked!
}
}
// similarly fold (and (X (load ([non_ext|any_ext|zero_ext] V))), c) ->
// (X (load ([non_ext|zero_ext] V))) if 'and' only clears top bits which must
// already be zero by virtue of the width of the base type of the load.
//
// the 'X' node here can either be nothing or an extract_vector_elt to catch
// more cases.
if ((N0.getOpcode() == ISD::EXTRACT_VECTOR_ELT &&
N0.getValueSizeInBits() == N0.getOperand(0).getScalarValueSizeInBits() &&
N0.getOperand(0).getOpcode() == ISD::LOAD &&
N0.getOperand(0).getResNo() == 0) ||
(N0.getOpcode() == ISD::LOAD && N0.getResNo() == 0)) {
LoadSDNode *Load = cast<LoadSDNode>( (N0.getOpcode() == ISD::LOAD) ?
N0 : N0.getOperand(0) );
// Get the constant (if applicable) the zero'th operand is being ANDed with.
// This can be a pure constant or a vector splat, in which case we treat the
// vector as a scalar and use the splat value.
APInt Constant = APInt::getNullValue(1);
if (const ConstantSDNode *C = dyn_cast<ConstantSDNode>(N1)) {
Constant = C->getAPIntValue();
} else if (BuildVectorSDNode *Vector = dyn_cast<BuildVectorSDNode>(N1)) {
APInt SplatValue, SplatUndef;
unsigned SplatBitSize;
bool HasAnyUndefs;
bool IsSplat = Vector->isConstantSplat(SplatValue, SplatUndef,
SplatBitSize, HasAnyUndefs);
if (IsSplat) {
// Undef bits can contribute to a possible optimisation if set, so
// set them.
SplatValue |= SplatUndef;
// The splat value may be something like "0x00FFFFFF", which means 0 for
// the first vector value and FF for the rest, repeating. We need a mask
// that will apply equally to all members of the vector, so AND all the
// lanes of the constant together.
EVT VT = Vector->getValueType(0);
unsigned BitWidth = VT.getScalarSizeInBits();
// If the splat value has been compressed to a bitlength lower
// than the size of the vector lane, we need to re-expand it to
// the lane size.
if (BitWidth > SplatBitSize)
for (SplatValue = SplatValue.zextOrTrunc(BitWidth);
SplatBitSize < BitWidth;
SplatBitSize = SplatBitSize * 2)
SplatValue |= SplatValue.shl(SplatBitSize);
// Make sure that variable 'Constant' is only set if 'SplatBitSize' is a
// multiple of 'BitWidth'. Otherwise, we could propagate a wrong value.
if (SplatBitSize % BitWidth == 0) {
Constant = APInt::getAllOnesValue(BitWidth);
for (unsigned i = 0, n = SplatBitSize/BitWidth; i < n; ++i)
Constant &= SplatValue.lshr(i*BitWidth).zextOrTrunc(BitWidth);
}
}
}
// If we want to change an EXTLOAD to a ZEXTLOAD, ensure a ZEXTLOAD is
// actually legal and isn't going to get expanded, else this is a false
// optimisation.
bool CanZextLoadProfitably = TLI.isLoadExtLegal(ISD::ZEXTLOAD,
Load->getValueType(0),
Load->getMemoryVT());
// Resize the constant to the same size as the original memory access before
// extension. If it is still the AllOnesValue then this AND is completely
// unneeded.
Constant = Constant.zextOrTrunc(Load->getMemoryVT().getScalarSizeInBits());
bool B;
switch (Load->getExtensionType()) {
default: B = false; break;
case ISD::EXTLOAD: B = CanZextLoadProfitably; break;
case ISD::ZEXTLOAD:
case ISD::NON_EXTLOAD: B = true; break;
}
if (B && Constant.isAllOnesValue()) {
// If the load type was an EXTLOAD, convert to ZEXTLOAD in order to
// preserve semantics once we get rid of the AND.
SDValue NewLoad(Load, 0);
// Fold the AND away. NewLoad may get replaced immediately.
CombineTo(N, (N0.getNode() == Load) ? NewLoad : N0);
if (Load->getExtensionType() == ISD::EXTLOAD) {
NewLoad = DAG.getLoad(Load->getAddressingMode(), ISD::ZEXTLOAD,
Load->getValueType(0), SDLoc(Load),
Load->getChain(), Load->getBasePtr(),
Load->getOffset(), Load->getMemoryVT(),
Load->getMemOperand());
// Replace uses of the EXTLOAD with the new ZEXTLOAD.
if (Load->getNumValues() == 3) {
// PRE/POST_INC loads have 3 values.
SDValue To[] = { NewLoad.getValue(0), NewLoad.getValue(1),
NewLoad.getValue(2) };
CombineTo(Load, To, 3, true);
} else {
CombineTo(Load, NewLoad.getValue(0), NewLoad.getValue(1));
}
}
return SDValue(N, 0); // Return N so it doesn't get rechecked!
}
}
// fold (and (load x), 255) -> (zextload x, i8)
// fold (and (extload x, i16), 255) -> (zextload x, i8)
// fold (and (any_ext (extload x, i16)), 255) -> (zextload x, i8)
if (!VT.isVector() && N1C && (N0.getOpcode() == ISD::LOAD ||
(N0.getOpcode() == ISD::ANY_EXTEND &&
N0.getOperand(0).getOpcode() == ISD::LOAD))) {
bool HasAnyExt = N0.getOpcode() == ISD::ANY_EXTEND;
LoadSDNode *LN0 = HasAnyExt
? cast<LoadSDNode>(N0.getOperand(0))
: cast<LoadSDNode>(N0);
if (LN0->getExtensionType() != ISD::SEXTLOAD &&
LN0->isUnindexed() && N0.hasOneUse() && SDValue(LN0, 0).hasOneUse()) {
auto NarrowLoad = false;
EVT LoadResultTy = HasAnyExt ? LN0->getValueType(0) : VT;
EVT ExtVT, LoadedVT;
if (isAndLoadExtLoad(N1C, LN0, LoadResultTy, ExtVT, LoadedVT,
NarrowLoad)) {
if (!NarrowLoad) {
SDValue NewLoad =
DAG.getExtLoad(ISD::ZEXTLOAD, SDLoc(LN0), LoadResultTy,
LN0->getChain(), LN0->getBasePtr(), ExtVT,
LN0->getMemOperand());
AddToWorklist(N);
CombineTo(LN0, NewLoad, NewLoad.getValue(1));
return SDValue(N, 0); // Return N so it doesn't get rechecked!
} else {
EVT PtrType = LN0->getOperand(1).getValueType();
unsigned Alignment = LN0->getAlignment();
SDValue NewPtr = LN0->getBasePtr();
// For big endian targets, we need to add an offset to the pointer
// to load the correct bytes. For little endian systems, we merely
// need to read fewer bytes from the same pointer.
if (DAG.getDataLayout().isBigEndian()) {
unsigned LVTStoreBytes = LoadedVT.getStoreSize();
unsigned EVTStoreBytes = ExtVT.getStoreSize();
unsigned PtrOff = LVTStoreBytes - EVTStoreBytes;
SDLoc DL(LN0);
NewPtr = DAG.getNode(ISD::ADD, DL, PtrType,
NewPtr, DAG.getConstant(PtrOff, DL, PtrType));
Alignment = MinAlign(Alignment, PtrOff);
}
AddToWorklist(NewPtr.getNode());
SDValue Load = DAG.getExtLoad(
ISD::ZEXTLOAD, SDLoc(LN0), LoadResultTy, LN0->getChain(), NewPtr,
LN0->getPointerInfo(), ExtVT, Alignment,
LN0->getMemOperand()->getFlags(), LN0->getAAInfo());
AddToWorklist(N);
CombineTo(LN0, Load, Load.getValue(1));
return SDValue(N, 0); // Return N so it doesn't get rechecked!
}
}
}
}
if (SDValue Combined = visitANDLike(N0, N1, N))
return Combined;
// Simplify: (and (op x...), (op y...)) -> (op (and x, y))
if (N0.getOpcode() == N1.getOpcode())
if (SDValue Tmp = SimplifyBinOpWithSameOpcodeHands(N))
return Tmp;
// Masking the negated extension of a boolean is just the zero-extended
// boolean:
// and (sub 0, zext(bool X)), 1 --> zext(bool X)
// and (sub 0, sext(bool X)), 1 --> zext(bool X)
//
// Note: the SimplifyDemandedBits fold below can make an information-losing
// transform, and then we have no way to find this better fold.
if (N1C && N1C->isOne() && N0.getOpcode() == ISD::SUB) {
ConstantSDNode *SubLHS = isConstOrConstSplat(N0.getOperand(0));
SDValue SubRHS = N0.getOperand(1);
if (SubLHS && SubLHS->isNullValue()) {
if (SubRHS.getOpcode() == ISD::ZERO_EXTEND &&
SubRHS.getOperand(0).getScalarValueSizeInBits() == 1)
return SubRHS;
if (SubRHS.getOpcode() == ISD::SIGN_EXTEND &&
SubRHS.getOperand(0).getScalarValueSizeInBits() == 1)
return DAG.getNode(ISD::ZERO_EXTEND, SDLoc(N), VT, SubRHS.getOperand(0));
}
}
// fold (and (sign_extend_inreg x, i16 to i32), 1) -> (and x, 1)
// fold (and (sra)) -> (and (srl)) when possible.
if (!VT.isVector() && SimplifyDemandedBits(SDValue(N, 0)))
return SDValue(N, 0);
// fold (zext_inreg (extload x)) -> (zextload x)
if (ISD::isEXTLoad(N0.getNode()) && ISD::isUNINDEXEDLoad(N0.getNode())) {
LoadSDNode *LN0 = cast<LoadSDNode>(N0);
EVT MemVT = LN0->getMemoryVT();
// If we zero all the possible extended bits, then we can turn this into
// a zextload if we are running before legalize or the operation is legal.
unsigned BitWidth = N1.getScalarValueSizeInBits();
if (DAG.MaskedValueIsZero(N1, APInt::getHighBitsSet(BitWidth,
BitWidth - MemVT.getScalarSizeInBits())) &&
((!LegalOperations && !LN0->isVolatile()) ||
TLI.isLoadExtLegal(ISD::ZEXTLOAD, VT, MemVT))) {
SDValue ExtLoad = DAG.getExtLoad(ISD::ZEXTLOAD, SDLoc(N0), VT,
LN0->getChain(), LN0->getBasePtr(),
MemVT, LN0->getMemOperand());
AddToWorklist(N);
CombineTo(N0.getNode(), ExtLoad, ExtLoad.getValue(1));
return SDValue(N, 0); // Return N so it doesn't get rechecked!
}
}
// fold (zext_inreg (sextload x)) -> (zextload x) iff load has one use
if (ISD::isSEXTLoad(N0.getNode()) && ISD::isUNINDEXEDLoad(N0.getNode()) &&
N0.hasOneUse()) {
LoadSDNode *LN0 = cast<LoadSDNode>(N0);
EVT MemVT = LN0->getMemoryVT();
// If we zero all the possible extended bits, then we can turn this into
// a zextload if we are running before legalize or the operation is legal.
unsigned BitWidth = N1.getScalarValueSizeInBits();
if (DAG.MaskedValueIsZero(N1, APInt::getHighBitsSet(BitWidth,
BitWidth - MemVT.getScalarSizeInBits())) &&
((!LegalOperations && !LN0->isVolatile()) ||
TLI.isLoadExtLegal(ISD::ZEXTLOAD, VT, MemVT))) {
SDValue ExtLoad = DAG.getExtLoad(ISD::ZEXTLOAD, SDLoc(N0), VT,
LN0->getChain(), LN0->getBasePtr(),
MemVT, LN0->getMemOperand());
AddToWorklist(N);
CombineTo(N0.getNode(), ExtLoad, ExtLoad.getValue(1));
return SDValue(N, 0); // Return N so it doesn't get rechecked!
}
}
// fold (and (or (srl N, 8), (shl N, 8)), 0xffff) -> (srl (bswap N), const)
if (N1C && N1C->getAPIntValue() == 0xffff && N0.getOpcode() == ISD::OR) {
if (SDValue BSwap = MatchBSwapHWordLow(N0.getNode(), N0.getOperand(0),
N0.getOperand(1), false))
return BSwap;
}
return SDValue();
}
/// Match (a >> 8) | (a << 8) as (bswap a) >> 16.
SDValue DAGCombiner::MatchBSwapHWordLow(SDNode *N, SDValue N0, SDValue N1,
bool DemandHighBits) {
if (!LegalOperations)
return SDValue();
EVT VT = N->getValueType(0);
if (VT != MVT::i64 && VT != MVT::i32 && VT != MVT::i16)
return SDValue();
if (!TLI.isOperationLegal(ISD::BSWAP, VT))
return SDValue();
// Recognize (and (shl a, 8), 0xff), (and (srl a, 8), 0xff00)
bool LookPassAnd0 = false;
bool LookPassAnd1 = false;
if (N0.getOpcode() == ISD::AND && N0.getOperand(0).getOpcode() == ISD::SRL)
std::swap(N0, N1);
if (N1.getOpcode() == ISD::AND && N1.getOperand(0).getOpcode() == ISD::SHL)
std::swap(N0, N1);
if (N0.getOpcode() == ISD::AND) {
if (!N0.getNode()->hasOneUse())
return SDValue();
ConstantSDNode *N01C = dyn_cast<ConstantSDNode>(N0.getOperand(1));
if (!N01C || N01C->getZExtValue() != 0xFF00)
return SDValue();
N0 = N0.getOperand(0);
LookPassAnd0 = true;
}
if (N1.getOpcode() == ISD::AND) {
if (!N1.getNode()->hasOneUse())
return SDValue();
ConstantSDNode *N11C = dyn_cast<ConstantSDNode>(N1.getOperand(1));
if (!N11C || N11C->getZExtValue() != 0xFF)
return SDValue();
N1 = N1.getOperand(0);
LookPassAnd1 = true;
}
if (N0.getOpcode() == ISD::SRL && N1.getOpcode() == ISD::SHL)
std::swap(N0, N1);
if (N0.getOpcode() != ISD::SHL || N1.getOpcode() != ISD::SRL)
return SDValue();
if (!N0.getNode()->hasOneUse() || !N1.getNode()->hasOneUse())
return SDValue();
ConstantSDNode *N01C = dyn_cast<ConstantSDNode>(N0.getOperand(1));
ConstantSDNode *N11C = dyn_cast<ConstantSDNode>(N1.getOperand(1));
if (!N01C || !N11C)
return SDValue();
if (N01C->getZExtValue() != 8 || N11C->getZExtValue() != 8)
return SDValue();
// Look for (shl (and a, 0xff), 8), (srl (and a, 0xff00), 8)
SDValue N00 = N0->getOperand(0);
if (!LookPassAnd0 && N00.getOpcode() == ISD::AND) {
if (!N00.getNode()->hasOneUse())
return SDValue();
ConstantSDNode *N001C = dyn_cast<ConstantSDNode>(N00.getOperand(1));
if (!N001C || N001C->getZExtValue() != 0xFF)
return SDValue();
N00 = N00.getOperand(0);
LookPassAnd0 = true;
}
SDValue N10 = N1->getOperand(0);
if (!LookPassAnd1 && N10.getOpcode() == ISD::AND) {
if (!N10.getNode()->hasOneUse())
return SDValue();
ConstantSDNode *N101C = dyn_cast<ConstantSDNode>(N10.getOperand(1));
if (!N101C || N101C->getZExtValue() != 0xFF00)
return SDValue();
N10 = N10.getOperand(0);
LookPassAnd1 = true;
}
if (N00 != N10)
return SDValue();
// Make sure everything beyond the low halfword gets set to zero since the SRL
// 16 will clear the top bits.
unsigned OpSizeInBits = VT.getSizeInBits();
if (DemandHighBits && OpSizeInBits > 16) {
// If the left-shift isn't masked out then the only way this is a bswap is
// if all bits beyond the low 8 are 0. In that case the entire pattern
// reduces to a left shift anyway: leave it for other parts of the combiner.
if (!LookPassAnd0)
return SDValue();
// However, if the right shift isn't masked out then it might be because
// it's not needed. See if we can spot that too.
if (!LookPassAnd1 &&
!DAG.MaskedValueIsZero(
N10, APInt::getHighBitsSet(OpSizeInBits, OpSizeInBits - 16)))
return SDValue();
}
SDValue Res = DAG.getNode(ISD::BSWAP, SDLoc(N), VT, N00);
if (OpSizeInBits > 16) {
SDLoc DL(N);
Res = DAG.getNode(ISD::SRL, DL, VT, Res,
DAG.getConstant(OpSizeInBits - 16, DL,
getShiftAmountTy(VT)));
}
return Res;
}
/// Return true if the specified node is an element that makes up a 32-bit
/// packed halfword byteswap.
/// ((x & 0x000000ff) << 8) |
/// ((x & 0x0000ff00) >> 8) |
/// ((x & 0x00ff0000) << 8) |
/// ((x & 0xff000000) >> 8)
static bool isBSwapHWordElement(SDValue N, MutableArrayRef<SDNode *> Parts) {
if (!N.getNode()->hasOneUse())
return false;
unsigned Opc = N.getOpcode();
if (Opc != ISD::AND && Opc != ISD::SHL && Opc != ISD::SRL)
return false;
ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N.getOperand(1));
if (!N1C)
return false;
unsigned Num;
switch (N1C->getZExtValue()) {
default:
return false;
case 0xFF: Num = 0; break;
case 0xFF00: Num = 1; break;
case 0xFF0000: Num = 2; break;
case 0xFF000000: Num = 3; break;
}
// Look for (x & 0xff) << 8 as well as ((x << 8) & 0xff00).
SDValue N0 = N.getOperand(0);
if (Opc == ISD::AND) {
if (Num == 0 || Num == 2) {
// (x >> 8) & 0xff
// (x >> 8) & 0xff0000
if (N0.getOpcode() != ISD::SRL)
return false;
ConstantSDNode *C = dyn_cast<ConstantSDNode>(N0.getOperand(1));
if (!C || C->getZExtValue() != 8)
return false;
} else {
// (x << 8) & 0xff00
// (x << 8) & 0xff000000
if (N0.getOpcode() != ISD::SHL)
return false;
ConstantSDNode *C = dyn_cast<ConstantSDNode>(N0.getOperand(1));
if (!C || C->getZExtValue() != 8)
return false;
}
} else if (Opc == ISD::SHL) {
// (x & 0xff) << 8
// (x & 0xff0000) << 8
if (Num != 0 && Num != 2)
return false;
ConstantSDNode *C = dyn_cast<ConstantSDNode>(N.getOperand(1));
if (!C || C->getZExtValue() != 8)
return false;
} else { // Opc == ISD::SRL
// (x & 0xff00) >> 8
// (x & 0xff000000) >> 8
if (Num != 1 && Num != 3)
return false;
ConstantSDNode *C = dyn_cast<ConstantSDNode>(N.getOperand(1));
if (!C || C->getZExtValue() != 8)
return false;
}
if (Parts[Num])
return false;
Parts[Num] = N0.getOperand(0).getNode();
return true;
}
/// Match a 32-bit packed halfword bswap. That is
/// ((x & 0x000000ff) << 8) |
/// ((x & 0x0000ff00) >> 8) |
/// ((x & 0x00ff0000) << 8) |
/// ((x & 0xff000000) >> 8)
/// => (rotl (bswap x), 16)
SDValue DAGCombiner::MatchBSwapHWord(SDNode *N, SDValue N0, SDValue N1) {
if (!LegalOperations)
return SDValue();
EVT VT = N->getValueType(0);
if (VT != MVT::i32)
return SDValue();
if (!TLI.isOperationLegal(ISD::BSWAP, VT))
return SDValue();
// Look for either
// (or (or (and), (and)), (or (and), (and)))
// (or (or (or (and), (and)), (and)), (and))
if (N0.getOpcode() != ISD::OR)
return SDValue();
SDValue N00 = N0.getOperand(0);
SDValue N01 = N0.getOperand(1);
SDNode *Parts[4] = {};
if (N1.getOpcode() == ISD::OR &&
N00.getNumOperands() == 2 && N01.getNumOperands() == 2) {
// (or (or (and), (and)), (or (and), (and)))
SDValue N000 = N00.getOperand(0);
if (!isBSwapHWordElement(N000, Parts))
return SDValue();
SDValue N001 = N00.getOperand(1);
if (!isBSwapHWordElement(N001, Parts))
return SDValue();
SDValue N010 = N01.getOperand(0);
if (!isBSwapHWordElement(N010, Parts))
return SDValue();
SDValue N011 = N01.getOperand(1);
if (!isBSwapHWordElement(N011, Parts))
return SDValue();
} else {
// (or (or (or (and), (and)), (and)), (and))
if (!isBSwapHWordElement(N1, Parts))
return SDValue();
if (!isBSwapHWordElement(N01, Parts))
return SDValue();
if (N00.getOpcode() != ISD::OR)
return SDValue();
SDValue N000 = N00.getOperand(0);
if (!isBSwapHWordElement(N000, Parts))
return SDValue();
SDValue N001 = N00.getOperand(1);
if (!isBSwapHWordElement(N001, Parts))
return SDValue();
}
// Make sure the parts are all coming from the same node.
if (Parts[0] != Parts[1] || Parts[0] != Parts[2] || Parts[0] != Parts[3])
return SDValue();
SDLoc DL(N);
SDValue BSwap = DAG.getNode(ISD::BSWAP, DL, VT,
SDValue(Parts[0], 0));
// Result of the bswap should be rotated by 16. If it's not legal, then
// do (x << 16) | (x >> 16).
SDValue ShAmt = DAG.getConstant(16, DL, getShiftAmountTy(VT));
if (TLI.isOperationLegalOrCustom(ISD::ROTL, VT))
return DAG.getNode(ISD::ROTL, DL, VT, BSwap, ShAmt);
if (TLI.isOperationLegalOrCustom(ISD::ROTR, VT))
return DAG.getNode(ISD::ROTR, DL, VT, BSwap, ShAmt);
return DAG.getNode(ISD::OR, DL, VT,
DAG.getNode(ISD::SHL, DL, VT, BSwap, ShAmt),
DAG.getNode(ISD::SRL, DL, VT, BSwap, ShAmt));
}
/// This contains all DAGCombine rules which reduce two values combined by
/// an Or operation to a single value \see visitANDLike().
SDValue DAGCombiner::visitORLike(SDValue N0, SDValue N1, SDNode *N) {
EVT VT = N1.getValueType();
SDLoc DL(N);
// fold (or x, undef) -> -1
if (!LegalOperations && (N0.isUndef() || N1.isUndef()))
return DAG.getAllOnesConstant(DL, VT);
if (SDValue V = foldLogicOfSetCCs(false, N0, N1, DL))
return V;
// (or (and X, C1), (and Y, C2)) -> (and (or X, Y), C3) if possible.
if (N0.getOpcode() == ISD::AND && N1.getOpcode() == ISD::AND &&
// Don't increase # computations.
(N0.getNode()->hasOneUse() || N1.getNode()->hasOneUse())) {
// We can only do this xform if we know that bits from X that are set in C2
// but not in C1 are already zero. Likewise for Y.
if (const ConstantSDNode *N0O1C =
getAsNonOpaqueConstant(N0.getOperand(1))) {
if (const ConstantSDNode *N1O1C =
getAsNonOpaqueConstant(N1.getOperand(1))) {
// We can only do this xform if we know that bits from X that are set in
// C2 but not in C1 are already zero. Likewise for Y.
const APInt &LHSMask = N0O1C->getAPIntValue();
const APInt &RHSMask = N1O1C->getAPIntValue();
if (DAG.MaskedValueIsZero(N0.getOperand(0), RHSMask&~LHSMask) &&
DAG.MaskedValueIsZero(N1.getOperand(0), LHSMask&~RHSMask)) {
SDValue X = DAG.getNode(ISD::OR, SDLoc(N0), VT,
N0.getOperand(0), N1.getOperand(0));
return DAG.getNode(ISD::AND, DL, VT, X,
DAG.getConstant(LHSMask | RHSMask, DL, VT));
}
}
}
}
// (or (and X, M), (and X, N)) -> (and X, (or M, N))
if (N0.getOpcode() == ISD::AND &&
N1.getOpcode() == ISD::AND &&
N0.getOperand(0) == N1.getOperand(0) &&
// Don't increase # computations.
(N0.getNode()->hasOneUse() || N1.getNode()->hasOneUse())) {
SDValue X = DAG.getNode(ISD::OR, SDLoc(N0), VT,
N0.getOperand(1), N1.getOperand(1));
return DAG.getNode(ISD::AND, DL, VT, N0.getOperand(0), X);
}
return SDValue();
}
SDValue DAGCombiner::visitOR(SDNode *N) {
SDValue N0 = N->getOperand(0);
SDValue N1 = N->getOperand(1);
EVT VT = N1.getValueType();
// x | x --> x
if (N0 == N1)
return N0;
// fold vector ops
if (VT.isVector()) {
if (SDValue FoldedVOp = SimplifyVBinOp(N))
return FoldedVOp;
// fold (or x, 0) -> x, vector edition
if (ISD::isBuildVectorAllZeros(N0.getNode()))
return N1;
if (ISD::isBuildVectorAllZeros(N1.getNode()))
return N0;
// fold (or x, -1) -> -1, vector edition
if (ISD::isBuildVectorAllOnes(N0.getNode()))
// do not return N0, because undef node may exist in N0
return DAG.getAllOnesConstant(SDLoc(N), N0.getValueType());
if (ISD::isBuildVectorAllOnes(N1.getNode()))
// do not return N1, because undef node may exist in N1
return DAG.getAllOnesConstant(SDLoc(N), N1.getValueType());
// fold (or (shuf A, V_0, MA), (shuf B, V_0, MB)) -> (shuf A, B, Mask)
// Do this only if the resulting shuffle is legal.
if (isa<ShuffleVectorSDNode>(N0) &&
isa<ShuffleVectorSDNode>(N1) &&
// Avoid folding a node with illegal type.
TLI.isTypeLegal(VT)) {
bool ZeroN00 = ISD::isBuildVectorAllZeros(N0.getOperand(0).getNode());
bool ZeroN01 = ISD::isBuildVectorAllZeros(N0.getOperand(1).getNode());
bool ZeroN10 = ISD::isBuildVectorAllZeros(N1.getOperand(0).getNode());
bool ZeroN11 = ISD::isBuildVectorAllZeros(N1.getOperand(1).getNode());
// Ensure both shuffles have a zero input.
if ((ZeroN00 != ZeroN01) && (ZeroN10 != ZeroN11)) {
assert((!ZeroN00 || !ZeroN01) && "Both inputs zero!");
assert((!ZeroN10 || !ZeroN11) && "Both inputs zero!");
const ShuffleVectorSDNode *SV0 = cast<ShuffleVectorSDNode>(N0);
const ShuffleVectorSDNode *SV1 = cast<ShuffleVectorSDNode>(N1);
bool CanFold = true;
int NumElts = VT.getVectorNumElements();
SmallVector<int, 4> Mask(NumElts);
for (int i = 0; i != NumElts; ++i) {
int M0 = SV0->getMaskElt(i);
int M1 = SV1->getMaskElt(i);
// Determine if either index is pointing to a zero vector.
bool M0Zero = M0 < 0 || (ZeroN00 == (M0 < NumElts));
bool M1Zero = M1 < 0 || (ZeroN10 == (M1 < NumElts));
// If one element is zero and the otherside is undef, keep undef.
// This also handles the case that both are undef.
if ((M0Zero && M1 < 0) || (M1Zero && M0 < 0)) {
Mask[i] = -1;
continue;
}
// Make sure only one of the elements is zero.
if (M0Zero == M1Zero) {
CanFold = false;
break;
}
assert((M0 >= 0 || M1 >= 0) && "Undef index!");
// We have a zero and non-zero element. If the non-zero came from
// SV0 make the index a LHS index. If it came from SV1, make it
// a RHS index. We need to mod by NumElts because we don't care
// which operand it came from in the original shuffles.
Mask[i] = M1Zero ? M0 % NumElts : (M1 % NumElts) + NumElts;
}
if (CanFold) {
SDValue NewLHS = ZeroN00 ? N0.getOperand(1) : N0.getOperand(0);
SDValue NewRHS = ZeroN10 ? N1.getOperand(1) : N1.getOperand(0);
bool LegalMask = TLI.isShuffleMaskLegal(Mask, VT);
if (!LegalMask) {
std::swap(NewLHS, NewRHS);
ShuffleVectorSDNode::commuteMask(Mask);
LegalMask = TLI.isShuffleMaskLegal(Mask, VT);
}
if (LegalMask)
return DAG.getVectorShuffle(VT, SDLoc(N), NewLHS, NewRHS, Mask);
}
}
}
}
// fold (or c1, c2) -> c1|c2
ConstantSDNode *N0C = getAsNonOpaqueConstant(N0);
ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1);
if (N0C && N1C && !N1C->isOpaque())
return DAG.FoldConstantArithmetic(ISD::OR, SDLoc(N), VT, N0C, N1C);
// canonicalize constant to RHS
if (DAG.isConstantIntBuildVectorOrConstantInt(N0) &&
!DAG.isConstantIntBuildVectorOrConstantInt(N1))
return DAG.getNode(ISD::OR, SDLoc(N), VT, N1, N0);
// fold (or x, 0) -> x
if (isNullConstant(N1))
return N0;
// fold (or x, -1) -> -1
if (isAllOnesConstant(N1))
return N1;
if (SDValue NewSel = foldBinOpIntoSelect(N))
return NewSel;
// fold (or x, c) -> c iff (x & ~c) == 0
if (N1C && DAG.MaskedValueIsZero(N0, ~N1C->getAPIntValue()))
return N1;
if (SDValue Combined = visitORLike(N0, N1, N))
return Combined;
// Recognize halfword bswaps as (bswap + rotl 16) or (bswap + shl 16)
if (SDValue BSwap = MatchBSwapHWord(N, N0, N1))
return BSwap;
if (SDValue BSwap = MatchBSwapHWordLow(N, N0, N1))
return BSwap;
// reassociate or
if (SDValue ROR = ReassociateOps(ISD::OR, SDLoc(N), N0, N1))
return ROR;
// Canonicalize (or (and X, c1), c2) -> (and (or X, c2), c1|c2)
// iff (c1 & c2) != 0.
if (N1C && N0.getOpcode() == ISD::AND && N0.getNode()->hasOneUse() &&
isa<ConstantSDNode>(N0.getOperand(1))) {
ConstantSDNode *C1 = cast<ConstantSDNode>(N0.getOperand(1));
if ((C1->getAPIntValue() & N1C->getAPIntValue()) != 0) {
if (SDValue COR = DAG.FoldConstantArithmetic(ISD::OR, SDLoc(N1), VT,
N1C, C1))
return DAG.getNode(
ISD::AND, SDLoc(N), VT,
DAG.getNode(ISD::OR, SDLoc(N0), VT, N0.getOperand(0), N1), COR);
return SDValue();
}
}
// Simplify: (or (op x...), (op y...)) -> (op (or x, y))
if (N0.getOpcode() == N1.getOpcode())
if (SDValue Tmp = SimplifyBinOpWithSameOpcodeHands(N))
return Tmp;
// See if this is some rotate idiom.
if (SDNode *Rot = MatchRotate(N0, N1, SDLoc(N)))
return SDValue(Rot, 0);
if (SDValue Load = MatchLoadCombine(N))
return Load;
// Simplify the operands using demanded-bits information.
if (!VT.isVector() &&
SimplifyDemandedBits(SDValue(N, 0)))
return SDValue(N, 0);
return SDValue();
}
/// Match "(X shl/srl V1) & V2" where V2 may not be present.
bool DAGCombiner::MatchRotateHalf(SDValue Op, SDValue &Shift, SDValue &Mask) {
if (Op.getOpcode() == ISD::AND) {
if (DAG.isConstantIntBuildVectorOrConstantInt(Op.getOperand(1))) {
Mask = Op.getOperand(1);
Op = Op.getOperand(0);
} else {
return false;
}
}
if (Op.getOpcode() == ISD::SRL || Op.getOpcode() == ISD::SHL) {
Shift = Op;
return true;
}
return false;
}
// Return true if we can prove that, whenever Neg and Pos are both in the
// range [0, EltSize), Neg == (Pos == 0 ? 0 : EltSize - Pos). This means that
// for two opposing shifts shift1 and shift2 and a value X with OpBits bits:
//
// (or (shift1 X, Neg), (shift2 X, Pos))
//
// reduces to a rotate in direction shift2 by Pos or (equivalently) a rotate
// in direction shift1 by Neg. The range [0, EltSize) means that we only need
// to consider shift amounts with defined behavior.
static bool matchRotateSub(SDValue Pos, SDValue Neg, unsigned EltSize) {
// If EltSize is a power of 2 then:
//
// (a) (Pos == 0 ? 0 : EltSize - Pos) == (EltSize - Pos) & (EltSize - 1)
// (b) Neg == Neg & (EltSize - 1) whenever Neg is in [0, EltSize).
//
// So if EltSize is a power of 2 and Neg is (and Neg', EltSize-1), we check
// for the stronger condition:
//
// Neg & (EltSize - 1) == (EltSize - Pos) & (EltSize - 1) [A]
//
// for all Neg and Pos. Since Neg & (EltSize - 1) == Neg' & (EltSize - 1)
// we can just replace Neg with Neg' for the rest of the function.
//
// In other cases we check for the even stronger condition:
//
// Neg == EltSize - Pos [B]
//
// for all Neg and Pos. Note that the (or ...) then invokes undefined
// behavior if Pos == 0 (and consequently Neg == EltSize).
//
// We could actually use [A] whenever EltSize is a power of 2, but the
// only extra cases that it would match are those uninteresting ones
// where Neg and Pos are never in range at the same time. E.g. for
// EltSize == 32, using [A] would allow a Neg of the form (sub 64, Pos)
// as well as (sub 32, Pos), but:
//
// (or (shift1 X, (sub 64, Pos)), (shift2 X, Pos))
//
// always invokes undefined behavior for 32-bit X.
//
// Below, Mask == EltSize - 1 when using [A] and is all-ones otherwise.
unsigned MaskLoBits = 0;
if (Neg.getOpcode() == ISD::AND && isPowerOf2_64(EltSize)) {
if (ConstantSDNode *NegC = isConstOrConstSplat(Neg.getOperand(1))) {
if (NegC->getAPIntValue() == EltSize - 1) {
Neg = Neg.getOperand(0);
MaskLoBits = Log2_64(EltSize);
}
}
}
// Check whether Neg has the form (sub NegC, NegOp1) for some NegC and NegOp1.
if (Neg.getOpcode() != ISD::SUB)
return false;
ConstantSDNode *NegC = isConstOrConstSplat(Neg.getOperand(0));
if (!NegC)
return false;
SDValue NegOp1 = Neg.getOperand(1);
// On the RHS of [A], if Pos is Pos' & (EltSize - 1), just replace Pos with
// Pos'. The truncation is redundant for the purpose of the equality.
if (MaskLoBits && Pos.getOpcode() == ISD::AND)
if (ConstantSDNode *PosC = isConstOrConstSplat(Pos.getOperand(1)))
if (PosC->getAPIntValue() == EltSize - 1)
Pos = Pos.getOperand(0);
// The condition we need is now:
//
// (NegC - NegOp1) & Mask == (EltSize - Pos) & Mask
//
// If NegOp1 == Pos then we need:
//
// EltSize & Mask == NegC & Mask
//
// (because "x & Mask" is a truncation and distributes through subtraction).
APInt Width;
if (Pos == NegOp1)
Width = NegC->getAPIntValue();
// Check for cases where Pos has the form (add NegOp1, PosC) for some PosC.
// Then the condition we want to prove becomes:
//
// (NegC - NegOp1) & Mask == (EltSize - (NegOp1 + PosC)) & Mask
//
// which, again because "x & Mask" is a truncation, becomes:
//
// NegC & Mask == (EltSize - PosC) & Mask
// EltSize & Mask == (NegC + PosC) & Mask
else if (Pos.getOpcode() == ISD::ADD && Pos.getOperand(0) == NegOp1) {
if (ConstantSDNode *PosC = isConstOrConstSplat(Pos.getOperand(1)))
Width = PosC->getAPIntValue() + NegC->getAPIntValue();
else
return false;
} else
return false;
// Now we just need to check that EltSize & Mask == Width & Mask.
if (MaskLoBits)
// EltSize & Mask is 0 since Mask is EltSize - 1.
return Width.getLoBits(MaskLoBits) == 0;
return Width == EltSize;
}
// A subroutine of MatchRotate used once we have found an OR of two opposite
// shifts of Shifted. If Neg == <operand size> - Pos then the OR reduces
// to both (PosOpcode Shifted, Pos) and (NegOpcode Shifted, Neg), with the
// former being preferred if supported. InnerPos and InnerNeg are Pos and
// Neg with outer conversions stripped away.
SDNode *DAGCombiner::MatchRotatePosNeg(SDValue Shifted, SDValue Pos,
SDValue Neg, SDValue InnerPos,
SDValue InnerNeg, unsigned PosOpcode,
unsigned NegOpcode, const SDLoc &DL) {
// fold (or (shl x, (*ext y)),
// (srl x, (*ext (sub 32, y)))) ->
// (rotl x, y) or (rotr x, (sub 32, y))
//
// fold (or (shl x, (*ext (sub 32, y))),
// (srl x, (*ext y))) ->
// (rotr x, y) or (rotl x, (sub 32, y))
EVT VT = Shifted.getValueType();
if (matchRotateSub(InnerPos, InnerNeg, VT.getScalarSizeInBits())) {
bool HasPos = TLI.isOperationLegalOrCustom(PosOpcode, VT);
return DAG.getNode(HasPos ? PosOpcode : NegOpcode, DL, VT, Shifted,
HasPos ? Pos : Neg).getNode();
}
return nullptr;
}
// MatchRotate - Handle an 'or' of two operands. If this is one of the many
// idioms for rotate, and if the target supports rotation instructions, generate
// a rot[lr].
SDNode *DAGCombiner::MatchRotate(SDValue LHS, SDValue RHS, const SDLoc &DL) {
// Must be a legal type. Expanded 'n promoted things won't work with rotates.
EVT VT = LHS.getValueType();
if (!TLI.isTypeLegal(VT)) return nullptr;
// The target must have at least one rotate flavor.
bool HasROTL = TLI.isOperationLegalOrCustom(ISD::ROTL, VT);
bool HasROTR = TLI.isOperationLegalOrCustom(ISD::ROTR, VT);
if (!HasROTL && !HasROTR) return nullptr;
// Match "(X shl/srl V1) & V2" where V2 may not be present.
SDValue LHSShift; // The shift.
SDValue LHSMask; // AND value if any.
if (!MatchRotateHalf(LHS, LHSShift, LHSMask))
return nullptr; // Not part of a rotate.
SDValue RHSShift; // The shift.
SDValue RHSMask; // AND value if any.
if (!MatchRotateHalf(RHS, RHSShift, RHSMask))
return nullptr; // Not part of a rotate.
if (LHSShift.getOperand(0) != RHSShift.getOperand(0))
return nullptr; // Not shifting the same value.
if (LHSShift.getOpcode() == RHSShift.getOpcode())
return nullptr; // Shifts must disagree.
// Canonicalize shl to left side in a shl/srl pair.
if (RHSShift.getOpcode() == ISD::SHL) {
std::swap(LHS, RHS);
std::swap(LHSShift, RHSShift);
std::swap(LHSMask, RHSMask);
}
unsigned EltSizeInBits = VT.getScalarSizeInBits();
SDValue LHSShiftArg = LHSShift.getOperand(0);
SDValue LHSShiftAmt = LHSShift.getOperand(1);
SDValue RHSShiftArg = RHSShift.getOperand(0);
SDValue RHSShiftAmt = RHSShift.getOperand(1);
// fold (or (shl x, C1), (srl x, C2)) -> (rotl x, C1)
// fold (or (shl x, C1), (srl x, C2)) -> (rotr x, C2)
if (isConstOrConstSplat(LHSShiftAmt) && isConstOrConstSplat(RHSShiftAmt)) {
uint64_t LShVal = isConstOrConstSplat(LHSShiftAmt)->getZExtValue();
uint64_t RShVal = isConstOrConstSplat(RHSShiftAmt)->getZExtValue();
if ((LShVal + RShVal) != EltSizeInBits)
return nullptr;
SDValue Rot = DAG.getNode(HasROTL ? ISD::ROTL : ISD::ROTR, DL, VT,
LHSShiftArg, HasROTL ? LHSShiftAmt : RHSShiftAmt);
// If there is an AND of either shifted operand, apply it to the result.
if (LHSMask.getNode() || RHSMask.getNode()) {
SDValue Mask = DAG.getAllOnesConstant(DL, VT);
if (LHSMask.getNode()) {
APInt RHSBits = APInt::getLowBitsSet(EltSizeInBits, LShVal);
Mask = DAG.getNode(ISD::AND, DL, VT, Mask,
DAG.getNode(ISD::OR, DL, VT, LHSMask,
DAG.getConstant(RHSBits, DL, VT)));
}
if (RHSMask.getNode()) {
APInt LHSBits = APInt::getHighBitsSet(EltSizeInBits, RShVal);
Mask = DAG.getNode(ISD::AND, DL, VT, Mask,
DAG.getNode(ISD::OR, DL, VT, RHSMask,
DAG.getConstant(LHSBits, DL, VT)));
}
Rot = DAG.getNode(ISD::AND, DL, VT, Rot, Mask);
}
return Rot.getNode();
}
// If there is a mask here, and we have a variable shift, we can't be sure
// that we're masking out the right stuff.
if (LHSMask.getNode() || RHSMask.getNode())
return nullptr;
// If the shift amount is sign/zext/any-extended just peel it off.
SDValue LExtOp0 = LHSShiftAmt;
SDValue RExtOp0 = RHSShiftAmt;
if ((LHSShiftAmt.getOpcode() == ISD::SIGN_EXTEND ||
LHSShiftAmt.getOpcode() == ISD::ZERO_EXTEND ||
LHSShiftAmt.getOpcode() == ISD::ANY_EXTEND ||
LHSShiftAmt.getOpcode() == ISD::TRUNCATE) &&
(RHSShiftAmt.getOpcode() == ISD::SIGN_EXTEND ||
RHSShiftAmt.getOpcode() == ISD::ZERO_EXTEND ||
RHSShiftAmt.getOpcode() == ISD::ANY_EXTEND ||
RHSShiftAmt.getOpcode() == ISD::TRUNCATE)) {
LExtOp0 = LHSShiftAmt.getOperand(0);
RExtOp0 = RHSShiftAmt.getOperand(0);
}
SDNode *TryL = MatchRotatePosNeg(LHSShiftArg, LHSShiftAmt, RHSShiftAmt,
LExtOp0, RExtOp0, ISD::ROTL, ISD::ROTR, DL);
if (TryL)
return TryL;
SDNode *TryR = MatchRotatePosNeg(RHSShiftArg, RHSShiftAmt, LHSShiftAmt,
RExtOp0, LExtOp0, ISD::ROTR, ISD::ROTL, DL);
if (TryR)
return TryR;
return nullptr;
}
namespace {
/// Helper struct to parse and store a memory address as base + index + offset.
/// We ignore sign extensions when it is safe to do so.
/// The following two expressions are not equivalent. To differentiate we need
/// to store whether there was a sign extension involved in the index
/// computation.
/// (load (i64 add (i64 copyfromreg %c)
/// (i64 signextend (add (i8 load %index)
/// (i8 1))))
/// vs
///
/// (load (i64 add (i64 copyfromreg %c)
/// (i64 signextend (i32 add (i32 signextend (i8 load %index))
/// (i32 1)))))
struct BaseIndexOffset {
SDValue Base;
SDValue Index;
int64_t Offset;
bool IsIndexSignExt;
BaseIndexOffset() : Offset(0), IsIndexSignExt(false) {}
BaseIndexOffset(SDValue Base, SDValue Index, int64_t Offset,
bool IsIndexSignExt) :
Base(Base), Index(Index), Offset(Offset), IsIndexSignExt(IsIndexSignExt) {}
bool equalBaseIndex(const BaseIndexOffset &Other) {
return Other.Base == Base && Other.Index == Index &&
Other.IsIndexSignExt == IsIndexSignExt;
}
/// Parses tree in Ptr for base, index, offset addresses.
static BaseIndexOffset match(SDValue Ptr, SelectionDAG &DAG,
int64_t PartialOffset = 0) {
bool IsIndexSignExt = false;
// Split up a folded GlobalAddress+Offset into its component parts.
if (GlobalAddressSDNode *GA = dyn_cast<GlobalAddressSDNode>(Ptr))
if (GA->getOpcode() == ISD::GlobalAddress && GA->getOffset() != 0) {
return BaseIndexOffset(DAG.getGlobalAddress(GA->getGlobal(),
SDLoc(GA),
GA->getValueType(0),
/*Offset=*/PartialOffset,
/*isTargetGA=*/false,
GA->getTargetFlags()),
SDValue(),
GA->getOffset(),
IsIndexSignExt);
}
// We only can pattern match BASE + INDEX + OFFSET. If Ptr is not an ADD
// instruction, then it could be just the BASE or everything else we don't
// know how to handle. Just use Ptr as BASE and give up.
if (Ptr->getOpcode() != ISD::ADD)
return BaseIndexOffset(Ptr, SDValue(), PartialOffset, IsIndexSignExt);
// We know that we have at least an ADD instruction. Try to pattern match
// the simple case of BASE + OFFSET.
if (isa<ConstantSDNode>(Ptr->getOperand(1))) {
int64_t Offset = cast<ConstantSDNode>(Ptr->getOperand(1))->getSExtValue();
return match(Ptr->getOperand(0), DAG, Offset + PartialOffset);
}
// Inside a loop the current BASE pointer is calculated using an ADD and a
// MUL instruction. In this case Ptr is the actual BASE pointer.
// (i64 add (i64 %array_ptr)
// (i64 mul (i64 %induction_var)
// (i64 %element_size)))
if (Ptr->getOperand(1)->getOpcode() == ISD::MUL)
return BaseIndexOffset(Ptr, SDValue(), PartialOffset, IsIndexSignExt);
// Look at Base + Index + Offset cases.
SDValue Base = Ptr->getOperand(0);
SDValue IndexOffset = Ptr->getOperand(1);
// Skip signextends.
if (IndexOffset->getOpcode() == ISD::SIGN_EXTEND) {
IndexOffset = IndexOffset->getOperand(0);
IsIndexSignExt = true;
}
// Either the case of Base + Index (no offset) or something else.
if (IndexOffset->getOpcode() != ISD::ADD)
return BaseIndexOffset(Base, IndexOffset, PartialOffset, IsIndexSignExt);
// Now we have the case of Base + Index + offset.
SDValue Index = IndexOffset->getOperand(0);
SDValue Offset = IndexOffset->getOperand(1);
if (!isa<ConstantSDNode>(Offset))
return BaseIndexOffset(Ptr, SDValue(), PartialOffset, IsIndexSignExt);
// Ignore signextends.
if (Index->getOpcode() == ISD::SIGN_EXTEND) {
Index = Index->getOperand(0);
IsIndexSignExt = true;
} else IsIndexSignExt = false;
int64_t Off = cast<ConstantSDNode>(Offset)->getSExtValue();
return BaseIndexOffset(Base, Index, Off + PartialOffset, IsIndexSignExt);
}
};
} // namespace
namespace {
/// Represents known origin of an individual byte in load combine pattern. The
/// value of the byte is either constant zero or comes from memory.
struct ByteProvider {
// For constant zero providers Load is set to nullptr. For memory providers
// Load represents the node which loads the byte from memory.
// ByteOffset is the offset of the byte in the value produced by the load.
LoadSDNode *Load;
unsigned ByteOffset;
ByteProvider() : Load(nullptr), ByteOffset(0) {}
static ByteProvider getMemory(LoadSDNode *Load, unsigned ByteOffset) {
return ByteProvider(Load, ByteOffset);
}
static ByteProvider getConstantZero() { return ByteProvider(nullptr, 0); }
bool isConstantZero() const { return !Load; }
bool isMemory() const { return Load; }
bool operator==(const ByteProvider &Other) const {
return Other.Load == Load && Other.ByteOffset == ByteOffset;
}
private:
ByteProvider(LoadSDNode *Load, unsigned ByteOffset)
: Load(Load), ByteOffset(ByteOffset) {}
};
/// Recursively traverses the expression calculating the origin of the requested
/// byte of the given value. Returns None if the provider can't be calculated.
///
/// For all the values except the root of the expression verifies that the value
/// has exactly one use and if it's not true return None. This way if the origin
/// of the byte is returned it's guaranteed that the values which contribute to
/// the byte are not used outside of this expression.
///
/// Because the parts of the expression are not allowed to have more than one
/// use this function iterates over trees, not DAGs. So it never visits the same
/// node more than once.
const Optional<ByteProvider> calculateByteProvider(SDValue Op, unsigned Index,
unsigned Depth,
bool Root = false) {
// Typical i64 by i8 pattern requires recursion up to 8 calls depth
if (Depth == 10)
return None;
if (!Root && !Op.hasOneUse())
return None;
assert(Op.getValueType().isScalarInteger() && "can't handle other types");
unsigned BitWidth = Op.getValueSizeInBits();
if (BitWidth % 8 != 0)
return None;
unsigned ByteWidth = BitWidth / 8;
assert(Index < ByteWidth && "invalid index requested");
(void) ByteWidth;
switch (Op.getOpcode()) {
case ISD::OR: {
auto LHS = calculateByteProvider(Op->getOperand(0), Index, Depth + 1);
if (!LHS)
return None;
auto RHS = calculateByteProvider(Op->getOperand(1), Index, Depth + 1);
if (!RHS)
return None;
if (LHS->isConstantZero())
return RHS;
if (RHS->isConstantZero())
return LHS;
return None;
}
case ISD::SHL: {
auto ShiftOp = dyn_cast<ConstantSDNode>(Op->getOperand(1));
if (!ShiftOp)
return None;
uint64_t BitShift = ShiftOp->getZExtValue();
if (BitShift % 8 != 0)
return None;
uint64_t ByteShift = BitShift / 8;
return Index < ByteShift
? ByteProvider::getConstantZero()
: calculateByteProvider(Op->getOperand(0), Index - ByteShift,
Depth + 1);
}
case ISD::ANY_EXTEND:
case ISD::SIGN_EXTEND:
case ISD::ZERO_EXTEND: {
SDValue NarrowOp = Op->getOperand(0);
unsigned NarrowBitWidth = NarrowOp.getScalarValueSizeInBits();
if (NarrowBitWidth % 8 != 0)
return None;
uint64_t NarrowByteWidth = NarrowBitWidth / 8;
if (Index >= NarrowByteWidth)
return Op.getOpcode() == ISD::ZERO_EXTEND
? Optional<ByteProvider>(ByteProvider::getConstantZero())
: None;
return calculateByteProvider(NarrowOp, Index, Depth + 1);
}
case ISD::BSWAP:
return calculateByteProvider(Op->getOperand(0), ByteWidth - Index - 1,
Depth + 1);
case ISD::LOAD: {
auto L = cast<LoadSDNode>(Op.getNode());
if (L->isVolatile() || L->isIndexed())
return None;
unsigned NarrowBitWidth = L->getMemoryVT().getSizeInBits();
if (NarrowBitWidth % 8 != 0)
return None;
uint64_t NarrowByteWidth = NarrowBitWidth / 8;
if (Index >= NarrowByteWidth)
return L->getExtensionType() == ISD::ZEXTLOAD
? Optional<ByteProvider>(ByteProvider::getConstantZero())
: None;
return ByteProvider::getMemory(L, Index);
}
}
return None;
}
} // namespace
/// Match a pattern where a wide type scalar value is loaded by several narrow
/// loads and combined by shifts and ors. Fold it into a single load or a load
/// and a BSWAP if the targets supports it.
///
/// Assuming little endian target:
/// i8 *a = ...
/// i32 val = a[0] | (a[1] << 8) | (a[2] << 16) | (a[3] << 24)
/// =>
/// i32 val = *((i32)a)
///
/// i8 *a = ...
/// i32 val = (a[0] << 24) | (a[1] << 16) | (a[2] << 8) | a[3]
/// =>
/// i32 val = BSWAP(*((i32)a))
///
/// TODO: This rule matches complex patterns with OR node roots and doesn't
/// interact well with the worklist mechanism. When a part of the pattern is
/// updated (e.g. one of the loads) its direct users are put into the worklist,
/// but the root node of the pattern which triggers the load combine is not
/// necessarily a direct user of the changed node. For example, once the address
/// of t28 load is reassociated load combine won't be triggered:
/// t25: i32 = add t4, Constant:i32<2>
/// t26: i64 = sign_extend t25
/// t27: i64 = add t2, t26
/// t28: i8,ch = load<LD1[%tmp9]> t0, t27, undef:i64
/// t29: i32 = zero_extend t28
/// t32: i32 = shl t29, Constant:i8<8>
/// t33: i32 = or t23, t32
/// As a possible fix visitLoad can check if the load can be a part of a load
/// combine pattern and add corresponding OR roots to the worklist.
SDValue DAGCombiner::MatchLoadCombine(SDNode *N) {
assert(N->getOpcode() == ISD::OR &&
"Can only match load combining against OR nodes");
// Handles simple types only
EVT VT = N->getValueType(0);
if (VT != MVT::i16 && VT != MVT::i32 && VT != MVT::i64)
return SDValue();
unsigned ByteWidth = VT.getSizeInBits() / 8;
const TargetLowering &TLI = DAG.getTargetLoweringInfo();
// Before legalize we can introduce too wide illegal loads which will be later
// split into legal sized loads. This enables us to combine i64 load by i8
// patterns to a couple of i32 loads on 32 bit targets.
if (LegalOperations && !TLI.isOperationLegal(ISD::LOAD, VT))
return SDValue();
std::function<unsigned(unsigned, unsigned)> LittleEndianByteAt = [](
unsigned BW, unsigned i) { return i; };
std::function<unsigned(unsigned, unsigned)> BigEndianByteAt = [](
unsigned BW, unsigned i) { return BW - i - 1; };
bool IsBigEndianTarget = DAG.getDataLayout().isBigEndian();
auto MemoryByteOffset = [&] (ByteProvider P) {
assert(P.isMemory() && "Must be a memory byte provider");
unsigned LoadBitWidth = P.Load->getMemoryVT().getSizeInBits();
assert(LoadBitWidth % 8 == 0 &&
"can only analyze providers for individual bytes not bit");
unsigned LoadByteWidth = LoadBitWidth / 8;
return IsBigEndianTarget
? BigEndianByteAt(LoadByteWidth, P.ByteOffset)
: LittleEndianByteAt(LoadByteWidth, P.ByteOffset);
};
Optional<BaseIndexOffset> Base;
SDValue Chain;
SmallSet<LoadSDNode *, 8> Loads;
Optional<ByteProvider> FirstByteProvider;
int64_t FirstOffset = INT64_MAX;
// Check if all the bytes of the OR we are looking at are loaded from the same
// base address. Collect bytes offsets from Base address in ByteOffsets.
SmallVector<int64_t, 4> ByteOffsets(ByteWidth);
for (unsigned i = 0; i < ByteWidth; i++) {
auto P = calculateByteProvider(SDValue(N, 0), i, 0, /*Root=*/true);
if (!P || !P->isMemory()) // All the bytes must be loaded from memory
return SDValue();
LoadSDNode *L = P->Load;
assert(L->hasNUsesOfValue(1, 0) && !L->isVolatile() && !L->isIndexed() &&
"Must be enforced by calculateByteProvider");
assert(L->getOffset().isUndef() && "Unindexed load must have undef offset");
// All loads must share the same chain
SDValue LChain = L->getChain();
if (!Chain)
Chain = LChain;
else if (Chain != LChain)
return SDValue();
// Loads must share the same base address
BaseIndexOffset Ptr = BaseIndexOffset::match(L->getBasePtr(), DAG);
if (!Base)
Base = Ptr;
else if (!Base->equalBaseIndex(Ptr))
return SDValue();
// Calculate the offset of the current byte from the base address
int64_t ByteOffsetFromBase = Ptr.Offset + MemoryByteOffset(*P);
ByteOffsets[i] = ByteOffsetFromBase;
// Remember the first byte load
if (ByteOffsetFromBase < FirstOffset) {
FirstByteProvider = P;
FirstOffset = ByteOffsetFromBase;
}
Loads.insert(L);
}
assert(Loads.size() > 0 && "All the bytes of the value must be loaded from "
"memory, so there must be at least one load which produces the value");
assert(Base && "Base address of the accessed memory location must be set");
assert(FirstOffset != INT64_MAX && "First byte offset must be set");
// Check if the bytes of the OR we are looking at match with either big or
// little endian value load
bool BigEndian = true, LittleEndian = true;
for (unsigned i = 0; i < ByteWidth; i++) {
int64_t CurrentByteOffset = ByteOffsets[i] - FirstOffset;
LittleEndian &= CurrentByteOffset == LittleEndianByteAt(ByteWidth, i);
BigEndian &= CurrentByteOffset == BigEndianByteAt(ByteWidth, i);
if (!BigEndian && !LittleEndian)
return SDValue();
}
assert((BigEndian != LittleEndian) && "should be either or");
assert(FirstByteProvider && "must be set");
// Ensure that the first byte is loaded from zero offset of the first load.
// So the combined value can be loaded from the first load address.
if (MemoryByteOffset(*FirstByteProvider) != 0)
return SDValue();
LoadSDNode *FirstLoad = FirstByteProvider->Load;
// The node we are looking at matches with the pattern, check if we can
// replace it with a single load and bswap if needed.
// If the load needs byte swap check if the target supports it
bool NeedsBswap = IsBigEndianTarget != BigEndian;
// Before legalize we can introduce illegal bswaps which will be later
// converted to an explicit bswap sequence. This way we end up with a single
// load and byte shuffling instead of several loads and byte shuffling.
if (NeedsBswap && LegalOperations && !TLI.isOperationLegal(ISD::BSWAP, VT))
return SDValue();
// Check that a load of the wide type is both allowed and fast on the target
bool Fast = false;
bool Allowed = TLI.allowsMemoryAccess(*DAG.getContext(), DAG.getDataLayout(),
VT, FirstLoad->getAddressSpace(),
FirstLoad->getAlignment(), &Fast);
if (!Allowed || !Fast)
return SDValue();
SDValue NewLoad =
DAG.getLoad(VT, SDLoc(N), Chain, FirstLoad->getBasePtr(),
FirstLoad->getPointerInfo(), FirstLoad->getAlignment());
// Transfer chain users from old loads to the new load.
for (LoadSDNode *L : Loads)
DAG.ReplaceAllUsesOfValueWith(SDValue(L, 1), SDValue(NewLoad.getNode(), 1));
return NeedsBswap ? DAG.getNode(ISD::BSWAP, SDLoc(N), VT, NewLoad) : NewLoad;
}
SDValue DAGCombiner::visitXOR(SDNode *N) {
SDValue N0 = N->getOperand(0);
SDValue N1 = N->getOperand(1);
EVT VT = N0.getValueType();
// fold vector ops
if (VT.isVector()) {
if (SDValue FoldedVOp = SimplifyVBinOp(N))
return FoldedVOp;
// fold (xor x, 0) -> x, vector edition
if (ISD::isBuildVectorAllZeros(N0.getNode()))
return N1;
if (ISD::isBuildVectorAllZeros(N1.getNode()))
return N0;
}
// fold (xor undef, undef) -> 0. This is a common idiom (misuse).
if (N0.isUndef() && N1.isUndef())
return DAG.getConstant(0, SDLoc(N), VT);
// fold (xor x, undef) -> undef
if (N0.isUndef())
return N0;
if (N1.isUndef())
return N1;
// fold (xor c1, c2) -> c1^c2
ConstantSDNode *N0C = getAsNonOpaqueConstant(N0);
ConstantSDNode *N1C = getAsNonOpaqueConstant(N1);
if (N0C && N1C)
return DAG.FoldConstantArithmetic(ISD::XOR, SDLoc(N), VT, N0C, N1C);
// canonicalize constant to RHS
if (DAG.isConstantIntBuildVectorOrConstantInt(N0) &&
!DAG.isConstantIntBuildVectorOrConstantInt(N1))
return DAG.getNode(ISD::XOR, SDLoc(N), VT, N1, N0);
// fold (xor x, 0) -> x
if (isNullConstant(N1))
return N0;
if (SDValue NewSel = foldBinOpIntoSelect(N))
return NewSel;
// reassociate xor
if (SDValue RXOR = ReassociateOps(ISD::XOR, SDLoc(N), N0, N1))
return RXOR;
// fold !(x cc y) -> (x !cc y)
SDValue LHS, RHS, CC;
if (TLI.isConstTrueVal(N1.getNode()) && isSetCCEquivalent(N0, LHS, RHS, CC)) {
bool isInt = LHS.getValueType().isInteger();
ISD::CondCode NotCC = ISD::getSetCCInverse(cast<CondCodeSDNode>(CC)->get(),
isInt);
if (!LegalOperations ||
TLI.isCondCodeLegal(NotCC, LHS.getSimpleValueType())) {
switch (N0.getOpcode()) {
default:
llvm_unreachable("Unhandled SetCC Equivalent!");
case ISD::SETCC:
return DAG.getSetCC(SDLoc(N0), VT, LHS, RHS, NotCC);
case ISD::SELECT_CC:
return DAG.getSelectCC(SDLoc(N0), LHS, RHS, N0.getOperand(2),
N0.getOperand(3), NotCC);
}
}
}
// fold (not (zext (setcc x, y))) -> (zext (not (setcc x, y)))
if (isOneConstant(N1) && N0.getOpcode() == ISD::ZERO_EXTEND &&
N0.getNode()->hasOneUse() &&
isSetCCEquivalent(N0.getOperand(0), LHS, RHS, CC)){
SDValue V = N0.getOperand(0);
SDLoc DL(N0);
V = DAG.getNode(ISD::XOR, DL, V.getValueType(), V,
DAG.getConstant(1, DL, V.getValueType()));
AddToWorklist(V.getNode());
return DAG.getNode(ISD::ZERO_EXTEND, SDLoc(N), VT, V);
}
// fold (not (or x, y)) -> (and (not x), (not y)) iff x or y are setcc
if (isOneConstant(N1) && VT == MVT::i1 &&
(N0.getOpcode() == ISD::OR || N0.getOpcode() == ISD::AND)) {
SDValue LHS = N0.getOperand(0), RHS = N0.getOperand(1);
if (isOneUseSetCC(RHS) || isOneUseSetCC(LHS)) {
unsigned NewOpcode = N0.getOpcode() == ISD::AND ? ISD::OR : ISD::AND;
LHS = DAG.getNode(ISD::XOR, SDLoc(LHS), VT, LHS, N1); // LHS = ~LHS
RHS = DAG.getNode(ISD::XOR, SDLoc(RHS), VT, RHS, N1); // RHS = ~RHS
AddToWorklist(LHS.getNode()); AddToWorklist(RHS.getNode());
return DAG.getNode(NewOpcode, SDLoc(N), VT, LHS, RHS);
}
}
// fold (not (or x, y)) -> (and (not x), (not y)) iff x or y are constants
if (isAllOnesConstant(N1) &&
(N0.getOpcode() == ISD::OR || N0.getOpcode() == ISD::AND)) {
SDValue LHS = N0.getOperand(0), RHS = N0.getOperand(1);
if (isa<ConstantSDNode>(RHS) || isa<ConstantSDNode>(LHS)) {
unsigned NewOpcode = N0.getOpcode() == ISD::AND ? ISD::OR : ISD::AND;
LHS = DAG.getNode(ISD::XOR, SDLoc(LHS), VT, LHS, N1); // LHS = ~LHS
RHS = DAG.getNode(ISD::XOR, SDLoc(RHS), VT, RHS, N1); // RHS = ~RHS
AddToWorklist(LHS.getNode()); AddToWorklist(RHS.getNode());
return DAG.getNode(NewOpcode, SDLoc(N), VT, LHS, RHS);
}
}
// fold (xor (and x, y), y) -> (and (not x), y)
if (N0.getOpcode() == ISD::AND && N0.getNode()->hasOneUse() &&
N0->getOperand(1) == N1) {
SDValue X = N0->getOperand(0);
SDValue NotX = DAG.getNOT(SDLoc(X), X, VT);
AddToWorklist(NotX.getNode());
return DAG.getNode(ISD::AND, SDLoc(N), VT, NotX, N1);
}
// fold (xor (xor x, c1), c2) -> (xor x, (xor c1, c2))
if (N1C && N0.getOpcode() == ISD::XOR) {
if (const ConstantSDNode *N00C = getAsNonOpaqueConstant(N0.getOperand(0))) {
SDLoc DL(N);
return DAG.getNode(ISD::XOR, DL, VT, N0.getOperand(1),
DAG.getConstant(N1C->getAPIntValue() ^
N00C->getAPIntValue(), DL, VT));
}
if (const ConstantSDNode *N01C = getAsNonOpaqueConstant(N0.getOperand(1))) {
SDLoc DL(N);
return DAG.getNode(ISD::XOR, DL, VT, N0.getOperand(0),
DAG.getConstant(N1C->getAPIntValue() ^
N01C->getAPIntValue(), DL, VT));
}
}
// fold Y = sra (X, size(X)-1); xor (add (X, Y), Y) -> (abs X)
unsigned OpSizeInBits = VT.getScalarSizeInBits();
if (N0.getOpcode() == ISD::ADD && N0.getOperand(1) == N1 &&
N1.getOpcode() == ISD::SRA && N1.getOperand(0) == N0.getOperand(0) &&
TLI.isOperationLegalOrCustom(ISD::ABS, VT)) {
if (ConstantSDNode *C = isConstOrConstSplat(N1.getOperand(1)))
if (C->getAPIntValue() == (OpSizeInBits - 1))
return DAG.getNode(ISD::ABS, SDLoc(N), VT, N0.getOperand(0));
}
// fold (xor x, x) -> 0
if (N0 == N1)
return tryFoldToZero(SDLoc(N), TLI, VT, DAG, LegalOperations, LegalTypes);
// fold (xor (shl 1, x), -1) -> (rotl ~1, x)
// Here is a concrete example of this equivalence:
// i16 x == 14
// i16 shl == 1 << 14 == 16384 == 0b0100000000000000
// i16 xor == ~(1 << 14) == 49151 == 0b1011111111111111
//
// =>
//
// i16 ~1 == 0b1111111111111110
// i16 rol(~1, 14) == 0b1011111111111111
//
// Some additional tips to help conceptualize this transform:
// - Try to see the operation as placing a single zero in a value of all ones.
// - There exists no value for x which would allow the result to contain zero.
// - Values of x larger than the bitwidth are undefined and do not require a
// consistent result.
// - Pushing the zero left requires shifting one bits in from the right.
// A rotate left of ~1 is a nice way of achieving the desired result.
if (TLI.isOperationLegalOrCustom(ISD::ROTL, VT) && N0.getOpcode() == ISD::SHL
&& isAllOnesConstant(N1) && isOneConstant(N0.getOperand(0))) {
SDLoc DL(N);
return DAG.getNode(ISD::ROTL, DL, VT, DAG.getConstant(~1, DL, VT),
N0.getOperand(1));
}
// Simplify: xor (op x...), (op y...) -> (op (xor x, y))
if (N0.getOpcode() == N1.getOpcode())
if (SDValue Tmp = SimplifyBinOpWithSameOpcodeHands(N))
return Tmp;
// Simplify the expression using non-local knowledge.
if (!VT.isVector() &&
SimplifyDemandedBits(SDValue(N, 0)))
return SDValue(N, 0);
return SDValue();
}
/// Handle transforms common to the three shifts, when the shift amount is a
/// constant.
SDValue DAGCombiner::visitShiftByConstant(SDNode *N, ConstantSDNode *Amt) {
SDNode *LHS = N->getOperand(0).getNode();
if (!LHS->hasOneUse()) return SDValue();
// We want to pull some binops through shifts, so that we have (and (shift))
// instead of (shift (and)), likewise for add, or, xor, etc. This sort of
// thing happens with address calculations, so it's important to canonicalize
// it.
bool HighBitSet = false; // Can we transform this if the high bit is set?
switch (LHS->getOpcode()) {
default: return SDValue();
case ISD::OR:
case ISD::XOR:
HighBitSet = false; // We can only transform sra if the high bit is clear.
break;
case ISD::AND:
HighBitSet = true; // We can only transform sra if the high bit is set.
break;
case ISD::ADD:
if (N->getOpcode() != ISD::SHL)
return SDValue(); // only shl(add) not sr[al](add).
HighBitSet = false; // We can only transform sra if the high bit is clear.
break;
}
// We require the RHS of the binop to be a constant and not opaque as well.
ConstantSDNode *BinOpCst = getAsNonOpaqueConstant(LHS->getOperand(1));
if (!BinOpCst) return SDValue();
// FIXME: disable this unless the input to the binop is a shift by a constant
// or is copy/select.Enable this in other cases when figure out it's exactly profitable.
SDNode *BinOpLHSVal = LHS->getOperand(0).getNode();
bool isShift = BinOpLHSVal->getOpcode() == ISD::SHL ||
BinOpLHSVal->getOpcode() == ISD::SRA ||
BinOpLHSVal->getOpcode() == ISD::SRL;
bool isCopyOrSelect = BinOpLHSVal->getOpcode() == ISD::CopyFromReg ||
BinOpLHSVal->getOpcode() == ISD::SELECT;
if ((!isShift || !isa<ConstantSDNode>(BinOpLHSVal->getOperand(1))) &&
!isCopyOrSelect)
return SDValue();
if (isCopyOrSelect && N->hasOneUse())
return SDValue();
EVT VT = N->getValueType(0);
// If this is a signed shift right, and the high bit is modified by the
// logical operation, do not perform the transformation. The highBitSet
// boolean indicates the value of the high bit of the constant which would
// cause it to be modified for this operation.
if (N->getOpcode() == ISD::SRA) {
bool BinOpRHSSignSet = BinOpCst->getAPIntValue().isNegative();
if (BinOpRHSSignSet != HighBitSet)
return SDValue();
}
if (!TLI.isDesirableToCommuteWithShift(LHS))
return SDValue();
// Fold the constants, shifting the binop RHS by the shift amount.
SDValue NewRHS = DAG.getNode(N->getOpcode(), SDLoc(LHS->getOperand(1)),
N->getValueType(0),
LHS->getOperand(1), N->getOperand(1));
assert(isa<ConstantSDNode>(NewRHS) && "Folding was not successful!");
// Create the new shift.
SDValue NewShift = DAG.getNode(N->getOpcode(),
SDLoc(LHS->getOperand(0)),
VT, LHS->getOperand(0), N->getOperand(1));
// Create the new binop.
return DAG.getNode(LHS->getOpcode(), SDLoc(N), VT, NewShift, NewRHS);
}
SDValue DAGCombiner::distributeTruncateThroughAnd(SDNode *N) {
assert(N->getOpcode() == ISD::TRUNCATE);
assert(N->getOperand(0).getOpcode() == ISD::AND);
// (truncate:TruncVT (and N00, N01C)) -> (and (truncate:TruncVT N00), TruncC)
if (N->hasOneUse() && N->getOperand(0).hasOneUse()) {
SDValue N01 = N->getOperand(0).getOperand(1);
if (isConstantOrConstantVector(N01, /* NoOpaques */ true)) {
SDLoc DL(N);
EVT TruncVT = N->getValueType(0);
SDValue N00 = N->getOperand(0).getOperand(0);
SDValue Trunc00 = DAG.getNode(ISD::TRUNCATE, DL, TruncVT, N00);
SDValue Trunc01 = DAG.getNode(ISD::TRUNCATE, DL, TruncVT, N01);
AddToWorklist(Trunc00.getNode());
AddToWorklist(Trunc01.getNode());
return DAG.getNode(ISD::AND, DL, TruncVT, Trunc00, Trunc01);
}
}
return SDValue();
}
SDValue DAGCombiner::visitRotate(SDNode *N) {
// fold (rot* x, (trunc (and y, c))) -> (rot* x, (and (trunc y), (trunc c))).
if (N->getOperand(1).getOpcode() == ISD::TRUNCATE &&
N->getOperand(1).getOperand(0).getOpcode() == ISD::AND) {
if (SDValue NewOp1 =
distributeTruncateThroughAnd(N->getOperand(1).getNode()))
return DAG.getNode(N->getOpcode(), SDLoc(N), N->getValueType(0),
N->getOperand(0), NewOp1);
}
return SDValue();
}
SDValue DAGCombiner::visitSHL(SDNode *N) {
SDValue N0 = N->getOperand(0);
SDValue N1 = N->getOperand(1);
EVT VT = N0.getValueType();
unsigned OpSizeInBits = VT.getScalarSizeInBits();
// fold vector ops
if (VT.isVector()) {
if (SDValue FoldedVOp = SimplifyVBinOp(N))
return FoldedVOp;
BuildVectorSDNode *N1CV = dyn_cast<BuildVectorSDNode>(N1);
// If setcc produces all-one true value then:
// (shl (and (setcc) N01CV) N1CV) -> (and (setcc) N01CV<<N1CV)
if (N1CV && N1CV->isConstant()) {
if (N0.getOpcode() == ISD::AND) {
SDValue N00 = N0->getOperand(0);
SDValue N01 = N0->getOperand(1);
BuildVectorSDNode *N01CV = dyn_cast<BuildVectorSDNode>(N01);
if (N01CV && N01CV->isConstant() && N00.getOpcode() == ISD::SETCC &&
TLI.getBooleanContents(N00.getOperand(0).getValueType()) ==
TargetLowering::ZeroOrNegativeOneBooleanContent) {
if (SDValue C = DAG.FoldConstantArithmetic(ISD::SHL, SDLoc(N), VT,
N01CV, N1CV))
return DAG.getNode(ISD::AND, SDLoc(N), VT, N00, C);
}
}
}
}
ConstantSDNode *N1C = isConstOrConstSplat(N1);
// fold (shl c1, c2) -> c1<<c2
ConstantSDNode *N0C = getAsNonOpaqueConstant(N0);
if (N0C && N1C && !N1C->isOpaque())
return DAG.FoldConstantArithmetic(ISD::SHL, SDLoc(N), VT, N0C, N1C);
// fold (shl 0, x) -> 0
if (isNullConstant(N0))
return N0;
// fold (shl x, c >= size(x)) -> undef
if (N1C && N1C->getAPIntValue().uge(OpSizeInBits))
return DAG.getUNDEF(VT);
// fold (shl x, 0) -> x
if (N1C && N1C->isNullValue())
return N0;
// fold (shl undef, x) -> 0
if (N0.isUndef())
return DAG.getConstant(0, SDLoc(N), VT);
if (SDValue NewSel = foldBinOpIntoSelect(N))
return NewSel;
// if (shl x, c) is known to be zero, return 0
if (DAG.MaskedValueIsZero(SDValue(N, 0),
APInt::getAllOnesValue(OpSizeInBits)))
return DAG.getConstant(0, SDLoc(N), VT);
// fold (shl x, (trunc (and y, c))) -> (shl x, (and (trunc y), (trunc c))).
if (N1.getOpcode() == ISD::TRUNCATE &&
N1.getOperand(0).getOpcode() == ISD::AND) {
if (SDValue NewOp1 = distributeTruncateThroughAnd(N1.getNode()))
return DAG.getNode(ISD::SHL, SDLoc(N), VT, N0, NewOp1);
}
if (N1C && SimplifyDemandedBits(SDValue(N, 0)))
return SDValue(N, 0);
// fold (shl (shl x, c1), c2) -> 0 or (shl x, (add c1, c2))
if (N1C && N0.getOpcode() == ISD::SHL) {
if (ConstantSDNode *N0C1 = isConstOrConstSplat(N0.getOperand(1))) {
SDLoc DL(N);
APInt c1 = N0C1->getAPIntValue();
APInt c2 = N1C->getAPIntValue();
zeroExtendToMatch(c1, c2, 1 /* Overflow Bit */);
APInt Sum = c1 + c2;
if (Sum.uge(OpSizeInBits))
return DAG.getConstant(0, DL, VT);
return DAG.getNode(
ISD::SHL, DL, VT, N0.getOperand(0),
DAG.getConstant(Sum.getZExtValue(), DL, N1.getValueType()));
}
}
// fold (shl (ext (shl x, c1)), c2) -> (ext (shl x, (add c1, c2)))
// For this to be valid, the second form must not preserve any of the bits
// that are shifted out by the inner shift in the first form. This means
// the outer shift size must be >= the number of bits added by the ext.
// As a corollary, we don't care what kind of ext it is.
if (N1C && (N0.getOpcode() == ISD::ZERO_EXTEND ||
N0.getOpcode() == ISD::ANY_EXTEND ||
N0.getOpcode() == ISD::SIGN_EXTEND) &&
N0.getOperand(0).getOpcode() == ISD::SHL) {
SDValue N0Op0 = N0.getOperand(0);
if (ConstantSDNode *N0Op0C1 = isConstOrConstSplat(N0Op0.getOperand(1))) {
APInt c1 = N0Op0C1->getAPIntValue();
APInt c2 = N1C->getAPIntValue();
zeroExtendToMatch(c1, c2, 1 /* Overflow Bit */);
EVT InnerShiftVT = N0Op0.getValueType();
uint64_t InnerShiftSize = InnerShiftVT.getScalarSizeInBits();
if (c2.uge(OpSizeInBits - InnerShiftSize)) {
SDLoc DL(N0);
APInt Sum = c1 + c2;
if (Sum.uge(OpSizeInBits))
return DAG.getConstant(0, DL, VT);
return DAG.getNode(
ISD::SHL, DL, VT,
DAG.getNode(N0.getOpcode(), DL, VT, N0Op0->getOperand(0)),
DAG.getConstant(Sum.getZExtValue(), DL, N1.getValueType()));
}
}
}
// fold (shl (zext (srl x, C)), C) -> (zext (shl (srl x, C), C))
// Only fold this if the inner zext has no other uses to avoid increasing
// the total number of instructions.
if (N1C && N0.getOpcode() == ISD::ZERO_EXTEND && N0.hasOneUse() &&
N0.getOperand(0).getOpcode() == ISD::SRL) {
SDValue N0Op0 = N0.getOperand(0);
if (ConstantSDNode *N0Op0C1 = isConstOrConstSplat(N0Op0.getOperand(1))) {
if (N0Op0C1->getAPIntValue().ult(VT.getScalarSizeInBits())) {
uint64_t c1 = N0Op0C1->getZExtValue();
uint64_t c2 = N1C->getZExtValue();
if (c1 == c2) {
SDValue NewOp0 = N0.getOperand(0);
EVT CountVT = NewOp0.getOperand(1).getValueType();
SDLoc DL(N);
SDValue NewSHL = DAG.getNode(ISD::SHL, DL, NewOp0.getValueType(),
NewOp0,
DAG.getConstant(c2, DL, CountVT));
AddToWorklist(NewSHL.getNode());
return DAG.getNode(ISD::ZERO_EXTEND, SDLoc(N0), VT, NewSHL);
}
}
}
}
// fold (shl (sr[la] exact X, C1), C2) -> (shl X, (C2-C1)) if C1 <= C2
// fold (shl (sr[la] exact X, C1), C2) -> (sr[la] X, (C2-C1)) if C1 > C2
if (N1C && (N0.getOpcode() == ISD::SRL || N0.getOpcode() == ISD::SRA) &&
cast<BinaryWithFlagsSDNode>(N0)->Flags.hasExact()) {
if (ConstantSDNode *N0C1 = isConstOrConstSplat(N0.getOperand(1))) {
uint64_t C1 = N0C1->getZExtValue();
uint64_t C2 = N1C->getZExtValue();
SDLoc DL(N);
if (C1 <= C2)
return DAG.getNode(ISD::SHL, DL, VT, N0.getOperand(0),
DAG.getConstant(C2 - C1, DL, N1.getValueType()));
return DAG.getNode(N0.getOpcode(), DL, VT, N0.getOperand(0),
DAG.getConstant(C1 - C2, DL, N1.getValueType()));
}
}
// fold (shl (srl x, c1), c2) -> (and (shl x, (sub c2, c1), MASK) or
// (and (srl x, (sub c1, c2), MASK)
// Only fold this if the inner shift has no other uses -- if it does, folding
// this will increase the total number of instructions.
if (N1C && N0.getOpcode() == ISD::SRL && N0.hasOneUse()) {
if (ConstantSDNode *N0C1 = isConstOrConstSplat(N0.getOperand(1))) {
uint64_t c1 = N0C1->getZExtValue();
if (c1 < OpSizeInBits) {
uint64_t c2 = N1C->getZExtValue();
APInt Mask = APInt::getHighBitsSet(OpSizeInBits, OpSizeInBits - c1);
SDValue Shift;
if (c2 > c1) {
Mask = Mask.shl(c2 - c1);
SDLoc DL(N);
Shift = DAG.getNode(ISD::SHL, DL, VT, N0.getOperand(0),
DAG.getConstant(c2 - c1, DL, N1.getValueType()));
} else {
Mask = Mask.lshr(c1 - c2);
SDLoc DL(N);
Shift = DAG.getNode(ISD::SRL, DL, VT, N0.getOperand(0),
DAG.getConstant(c1 - c2, DL, N1.getValueType()));
}
SDLoc DL(N0);
return DAG.getNode(ISD::AND, DL, VT, Shift,
DAG.getConstant(Mask, DL, VT));
}
}
}
// fold (shl (sra x, c1), c1) -> (and x, (shl -1, c1))
if (N0.getOpcode() == ISD::SRA && N1 == N0.getOperand(1) &&
isConstantOrConstantVector(N1, /* No Opaques */ true)) {
SDLoc DL(N);
SDValue AllBits = DAG.getAllOnesConstant(DL, VT);
SDValue HiBitsMask = DAG.getNode(ISD::SHL, DL, VT, AllBits, N1);
return DAG.getNode(ISD::AND, DL, VT, N0.getOperand(0), HiBitsMask);
}
// fold (shl (add x, c1), c2) -> (add (shl x, c2), c1 << c2)
// Variant of version done on multiply, except mul by a power of 2 is turned
// into a shift.
if (N0.getOpcode() == ISD::ADD && N0.getNode()->hasOneUse() &&
isConstantOrConstantVector(N1, /* No Opaques */ true) &&
isConstantOrConstantVector(N0.getOperand(1), /* No Opaques */ true)) {
SDValue Shl0 = DAG.getNode(ISD::SHL, SDLoc(N0), VT, N0.getOperand(0), N1);
SDValue Shl1 = DAG.getNode(ISD::SHL, SDLoc(N1), VT, N0.getOperand(1), N1);
AddToWorklist(Shl0.getNode());
AddToWorklist(Shl1.getNode());
return DAG.getNode(ISD::ADD, SDLoc(N), VT, Shl0, Shl1);
}
// fold (shl (mul x, c1), c2) -> (mul x, c1 << c2)
if (N0.getOpcode() == ISD::MUL && N0.getNode()->hasOneUse() &&
isConstantOrConstantVector(N1, /* No Opaques */ true) &&
isConstantOrConstantVector(N0.getOperand(1), /* No Opaques */ true)) {
SDValue Shl = DAG.getNode(ISD::SHL, SDLoc(N1), VT, N0.getOperand(1), N1);
if (isConstantOrConstantVector(Shl))
return DAG.getNode(ISD::MUL, SDLoc(N), VT, N0.getOperand(0), Shl);
}
if (N1C && !N1C->isOpaque())
if (SDValue NewSHL = visitShiftByConstant(N, N1C))
return NewSHL;
return SDValue();
}
SDValue DAGCombiner::visitSRA(SDNode *N) {
SDValue N0 = N->getOperand(0);
SDValue N1 = N->getOperand(1);
EVT VT = N0.getValueType();
unsigned OpSizeInBits = VT.getScalarSizeInBits();
// Arithmetic shifting an all-sign-bit value is a no-op.
if (DAG.ComputeNumSignBits(N0) == OpSizeInBits)
return N0;
// fold vector ops
if (VT.isVector())
if (SDValue FoldedVOp = SimplifyVBinOp(N))
return FoldedVOp;
ConstantSDNode *N1C = isConstOrConstSplat(N1);
// fold (sra c1, c2) -> (sra c1, c2)
ConstantSDNode *N0C = getAsNonOpaqueConstant(N0);
if (N0C && N1C && !N1C->isOpaque())
return DAG.FoldConstantArithmetic(ISD::SRA, SDLoc(N), VT, N0C, N1C);
// fold (sra 0, x) -> 0
if (isNullConstant(N0))
return N0;
// fold (sra -1, x) -> -1
if (isAllOnesConstant(N0))
return N0;
// fold (sra x, c >= size(x)) -> undef
if (N1C && N1C->getAPIntValue().uge(OpSizeInBits))
return DAG.getUNDEF(VT);
// fold (sra x, 0) -> x
if (N1C && N1C->isNullValue())
return N0;
if (SDValue NewSel = foldBinOpIntoSelect(N))
return NewSel;
// fold (sra (shl x, c1), c1) -> sext_inreg for some c1 and target supports
// sext_inreg.
if (N1C && N0.getOpcode() == ISD::SHL && N1 == N0.getOperand(1)) {
unsigned LowBits = OpSizeInBits - (unsigned)N1C->getZExtValue();
EVT ExtVT = EVT::getIntegerVT(*DAG.getContext(), LowBits);
if (VT.isVector())
ExtVT = EVT::getVectorVT(*DAG.getContext(),
ExtVT, VT.getVectorNumElements());
if ((!LegalOperations ||
TLI.isOperationLegal(ISD::SIGN_EXTEND_INREG, ExtVT)))
return DAG.getNode(ISD::SIGN_EXTEND_INREG, SDLoc(N), VT,
N0.getOperand(0), DAG.getValueType(ExtVT));
}
// fold (sra (sra x, c1), c2) -> (sra x, (add c1, c2))
if (N1C && N0.getOpcode() == ISD::SRA) {
if (ConstantSDNode *N0C1 = isConstOrConstSplat(N0.getOperand(1))) {
SDLoc DL(N);
APInt c1 = N0C1->getAPIntValue();
APInt c2 = N1C->getAPIntValue();
zeroExtendToMatch(c1, c2, 1 /* Overflow Bit */);
APInt Sum = c1 + c2;
if (Sum.uge(OpSizeInBits))
Sum = APInt(OpSizeInBits, OpSizeInBits - 1);
return DAG.getNode(
ISD::SRA, DL, VT, N0.getOperand(0),
DAG.getConstant(Sum.getZExtValue(), DL, N1.getValueType()));
}
}
// fold (sra (shl X, m), (sub result_size, n))
// -> (sign_extend (trunc (shl X, (sub (sub result_size, n), m)))) for
// result_size - n != m.
// If truncate is free for the target sext(shl) is likely to result in better
// code.
if (N0.getOpcode() == ISD::SHL && N1C) {
// Get the two constanst of the shifts, CN0 = m, CN = n.
const ConstantSDNode *N01C = isConstOrConstSplat(N0.getOperand(1));
if (N01C) {
LLVMContext &Ctx = *DAG.getContext();
// Determine what the truncate's result bitsize and type would be.
EVT TruncVT = EVT::getIntegerVT(Ctx, OpSizeInBits - N1C->getZExtValue());
if (VT.isVector())
TruncVT = EVT::getVectorVT(Ctx, TruncVT, VT.getVectorNumElements());
// Determine the residual right-shift amount.
int ShiftAmt = N1C->getZExtValue() - N01C->getZExtValue();
// If the shift is not a no-op (in which case this should be just a sign
// extend already), the truncated to type is legal, sign_extend is legal
// on that type, and the truncate to that type is both legal and free,
// perform the transform.
if ((ShiftAmt > 0) &&
TLI.isOperationLegalOrCustom(ISD::SIGN_EXTEND, TruncVT) &&
TLI.isOperationLegalOrCustom(ISD::TRUNCATE, VT) &&
TLI.isTruncateFree(VT, TruncVT)) {
SDLoc DL(N);
SDValue Amt = DAG.getConstant(ShiftAmt, DL,
getShiftAmountTy(N0.getOperand(0).getValueType()));
SDValue Shift = DAG.getNode(ISD::SRL, DL, VT,
N0.getOperand(0), Amt);
SDValue Trunc = DAG.getNode(ISD::TRUNCATE, DL, TruncVT,
Shift);
return DAG.getNode(ISD::SIGN_EXTEND, DL,
N->getValueType(0), Trunc);
}
}
}
// fold (sra x, (trunc (and y, c))) -> (sra x, (and (trunc y), (trunc c))).
if (N1.getOpcode() == ISD::TRUNCATE &&
N1.getOperand(0).getOpcode() == ISD::AND) {
if (SDValue NewOp1 = distributeTruncateThroughAnd(N1.getNode()))
return DAG.getNode(ISD::SRA, SDLoc(N), VT, N0, NewOp1);
}
// fold (sra (trunc (srl x, c1)), c2) -> (trunc (sra x, c1 + c2))
// if c1 is equal to the number of bits the trunc removes
if (N0.getOpcode() == ISD::TRUNCATE &&
(N0.getOperand(0).getOpcode() == ISD::SRL ||
N0.getOperand(0).getOpcode() == ISD::SRA) &&
N0.getOperand(0).hasOneUse() &&
N0.getOperand(0).getOperand(1).hasOneUse() &&
N1C) {
SDValue N0Op0 = N0.getOperand(0);
if (ConstantSDNode *LargeShift = isConstOrConstSplat(N0Op0.getOperand(1))) {
unsigned LargeShiftVal = LargeShift->getZExtValue();
EVT LargeVT = N0Op0.getValueType();
if (LargeVT.getScalarSizeInBits() - OpSizeInBits == LargeShiftVal) {
SDLoc DL(N);
SDValue Amt =
DAG.getConstant(LargeShiftVal + N1C->getZExtValue(), DL,
getShiftAmountTy(N0Op0.getOperand(0).getValueType()));
SDValue SRA = DAG.getNode(ISD::SRA, DL, LargeVT,
N0Op0.getOperand(0), Amt);
return DAG.getNode(ISD::TRUNCATE, DL, VT, SRA);
}
}
}
// Simplify, based on bits shifted out of the LHS.
if (N1C && SimplifyDemandedBits(SDValue(N, 0)))
return SDValue(N, 0);
// If the sign bit is known to be zero, switch this to a SRL.
if (DAG.SignBitIsZero(N0))
return DAG.getNode(ISD::SRL, SDLoc(N), VT, N0, N1);
if (N1C && !N1C->isOpaque())
if (SDValue NewSRA = visitShiftByConstant(N, N1C))
return NewSRA;
return SDValue();
}
SDValue DAGCombiner::visitSRL(SDNode *N) {
SDValue N0 = N->getOperand(0);
SDValue N1 = N->getOperand(1);
EVT VT = N0.getValueType();
unsigned OpSizeInBits = VT.getScalarSizeInBits();
// fold vector ops
if (VT.isVector())
if (SDValue FoldedVOp = SimplifyVBinOp(N))
return FoldedVOp;
ConstantSDNode *N1C = isConstOrConstSplat(N1);
// fold (srl c1, c2) -> c1 >>u c2
ConstantSDNode *N0C = getAsNonOpaqueConstant(N0);
if (N0C && N1C && !N1C->isOpaque())
return DAG.FoldConstantArithmetic(ISD::SRL, SDLoc(N), VT, N0C, N1C);
// fold (srl 0, x) -> 0
if (isNullConstant(N0))
return N0;
// fold (srl x, c >= size(x)) -> undef
if (N1C && N1C->getAPIntValue().uge(OpSizeInBits))
return DAG.getUNDEF(VT);
// fold (srl x, 0) -> x
if (N1C && N1C->isNullValue())
return N0;
if (SDValue NewSel = foldBinOpIntoSelect(N))
return NewSel;
// if (srl x, c) is known to be zero, return 0
if (N1C && DAG.MaskedValueIsZero(SDValue(N, 0),
APInt::getAllOnesValue(OpSizeInBits)))
return DAG.getConstant(0, SDLoc(N), VT);
// fold (srl (srl x, c1), c2) -> 0 or (srl x, (add c1, c2))
if (N1C && N0.getOpcode() == ISD::SRL) {
if (ConstantSDNode *N0C1 = isConstOrConstSplat(N0.getOperand(1))) {
SDLoc DL(N);
APInt c1 = N0C1->getAPIntValue();
APInt c2 = N1C->getAPIntValue();
zeroExtendToMatch(c1, c2, 1 /* Overflow Bit */);
APInt Sum = c1 + c2;
if (Sum.uge(OpSizeInBits))
return DAG.getConstant(0, DL, VT);
return DAG.getNode(
ISD::SRL, DL, VT, N0.getOperand(0),
DAG.getConstant(Sum.getZExtValue(), DL, N1.getValueType()));
}
}
// fold (srl (trunc (srl x, c1)), c2) -> 0 or (trunc (srl x, (add c1, c2)))
if (N1C && N0.getOpcode() == ISD::TRUNCATE &&
N0.getOperand(0).getOpcode() == ISD::SRL &&
isa<ConstantSDNode>(N0.getOperand(0)->getOperand(1))) {
uint64_t c1 =
cast<ConstantSDNode>(N0.getOperand(0)->getOperand(1))->getZExtValue();
uint64_t c2 = N1C->getZExtValue();
EVT InnerShiftVT = N0.getOperand(0).getValueType();
EVT ShiftCountVT = N0.getOperand(0)->getOperand(1).getValueType();
uint64_t InnerShiftSize = InnerShiftVT.getScalarSizeInBits();
// This is only valid if the OpSizeInBits + c1 = size of inner shift.
if (c1 + OpSizeInBits == InnerShiftSize) {
SDLoc DL(N0);
if (c1 + c2 >= InnerShiftSize)
return DAG.getConstant(0, DL, VT);
return DAG.getNode(ISD::TRUNCATE, DL, VT,
DAG.getNode(ISD::SRL, DL, InnerShiftVT,
N0.getOperand(0)->getOperand(0),
DAG.getConstant(c1 + c2, DL,
ShiftCountVT)));
}
}
// fold (srl (shl x, c), c) -> (and x, cst2)
if (N0.getOpcode() == ISD::SHL && N0.getOperand(1) == N1 &&
isConstantOrConstantVector(N1, /* NoOpaques */ true)) {
SDLoc DL(N);
SDValue Mask =
DAG.getNode(ISD::SRL, DL, VT, DAG.getAllOnesConstant(DL, VT), N1);
AddToWorklist(Mask.getNode());
return DAG.getNode(ISD::AND, DL, VT, N0.getOperand(0), Mask);
}
// fold (srl (anyextend x), c) -> (and (anyextend (srl x, c)), mask)
if (N1C && N0.getOpcode() == ISD::ANY_EXTEND) {
// Shifting in all undef bits?
EVT SmallVT = N0.getOperand(0).getValueType();
unsigned BitSize = SmallVT.getScalarSizeInBits();
if (N1C->getZExtValue() >= BitSize)
return DAG.getUNDEF(VT);
if (!LegalTypes || TLI.isTypeDesirableForOp(ISD::SRL, SmallVT)) {
uint64_t ShiftAmt = N1C->getZExtValue();
SDLoc DL0(N0);
SDValue SmallShift = DAG.getNode(ISD::SRL, DL0, SmallVT,
N0.getOperand(0),
DAG.getConstant(ShiftAmt, DL0,
getShiftAmountTy(SmallVT)));
AddToWorklist(SmallShift.getNode());
APInt Mask = APInt::getAllOnesValue(OpSizeInBits).lshr(ShiftAmt);
SDLoc DL(N);
return DAG.getNode(ISD::AND, DL, VT,
DAG.getNode(ISD::ANY_EXTEND, DL, VT, SmallShift),
DAG.getConstant(Mask, DL, VT));
}
}
// fold (srl (sra X, Y), 31) -> (srl X, 31). This srl only looks at the sign
// bit, which is unmodified by sra.
if (N1C && N1C->getZExtValue() + 1 == OpSizeInBits) {
if (N0.getOpcode() == ISD::SRA)
return DAG.getNode(ISD::SRL, SDLoc(N), VT, N0.getOperand(0), N1);
}
// fold (srl (ctlz x), "5") -> x iff x has one bit set (the low bit).
if (N1C && N0.getOpcode() == ISD::CTLZ &&
N1C->getAPIntValue() == Log2_32(OpSizeInBits)) {
APInt KnownZero, KnownOne;
DAG.computeKnownBits(N0.getOperand(0), KnownZero, KnownOne);
// If any of the input bits are KnownOne, then the input couldn't be all
// zeros, thus the result of the srl will always be zero.
if (KnownOne.getBoolValue()) return DAG.getConstant(0, SDLoc(N0), VT);
// If all of the bits input the to ctlz node are known to be zero, then
// the result of the ctlz is "32" and the result of the shift is one.
APInt UnknownBits = ~KnownZero;
if (UnknownBits == 0) return DAG.getConstant(1, SDLoc(N0), VT);
// Otherwise, check to see if there is exactly one bit input to the ctlz.
if ((UnknownBits & (UnknownBits - 1)) == 0) {
// Okay, we know that only that the single bit specified by UnknownBits
// could be set on input to the CTLZ node. If this bit is set, the SRL
// will return 0, if it is clear, it returns 1. Change the CTLZ/SRL pair
// to an SRL/XOR pair, which is likely to simplify more.
unsigned ShAmt = UnknownBits.countTrailingZeros();
SDValue Op = N0.getOperand(0);
if (ShAmt) {
SDLoc DL(N0);
Op = DAG.getNode(ISD::SRL, DL, VT, Op,
DAG.getConstant(ShAmt, DL,
getShiftAmountTy(Op.getValueType())));
AddToWorklist(Op.getNode());
}
SDLoc DL(N);
return DAG.getNode(ISD::XOR, DL, VT,
Op, DAG.getConstant(1, DL, VT));
}
}
// fold (srl x, (trunc (and y, c))) -> (srl x, (and (trunc y), (trunc c))).
if (N1.getOpcode() == ISD::TRUNCATE &&
N1.getOperand(0).getOpcode() == ISD::AND) {
if (SDValue NewOp1 = distributeTruncateThroughAnd(N1.getNode()))
return DAG.getNode(ISD::SRL, SDLoc(N), VT, N0, NewOp1);
}
// fold operands of srl based on knowledge that the low bits are not
// demanded.
if (N1C && SimplifyDemandedBits(SDValue(N, 0)))
return SDValue(N, 0);
if (N1C && !N1C->isOpaque())
if (SDValue NewSRL = visitShiftByConstant(N, N1C))
return NewSRL;
// Attempt to convert a srl of a load into a narrower zero-extending load.
if (SDValue NarrowLoad = ReduceLoadWidth(N))
return NarrowLoad;
// Here is a common situation. We want to optimize:
//
// %a = ...
// %b = and i32 %a, 2
// %c = srl i32 %b, 1
// brcond i32 %c ...
//
// into
//
// %a = ...
// %b = and %a, 2
// %c = setcc eq %b, 0
// brcond %c ...
//
// However when after the source operand of SRL is optimized into AND, the SRL
// itself may not be optimized further. Look for it and add the BRCOND into
// the worklist.
if (N->hasOneUse()) {
SDNode *Use = *N->use_begin();
if (Use->getOpcode() == ISD::BRCOND)
AddToWorklist(Use);
else if (Use->getOpcode() == ISD::TRUNCATE && Use->hasOneUse()) {
// Also look pass the truncate.
Use = *Use->use_begin();
if (Use->getOpcode() == ISD::BRCOND)
AddToWorklist(Use);
}
}
return SDValue();
}
SDValue DAGCombiner::visitABS(SDNode *N) {
SDValue N0 = N->getOperand(0);
EVT VT = N->getValueType(0);
// fold (abs c1) -> c2
if (DAG.isConstantIntBuildVectorOrConstantInt(N0))
return DAG.getNode(ISD::ABS, SDLoc(N), VT, N0);
// fold (abs (abs x)) -> (abs x)
if (N0.getOpcode() == ISD::ABS)
return N0;
// fold (abs x) -> x iff not-negative
if (DAG.SignBitIsZero(N0))
return N0;
return SDValue();
}
SDValue DAGCombiner::visitBSWAP(SDNode *N) {
SDValue N0 = N->getOperand(0);
EVT VT = N->getValueType(0);
// fold (bswap c1) -> c2
if (DAG.isConstantIntBuildVectorOrConstantInt(N0))
return DAG.getNode(ISD::BSWAP, SDLoc(N), VT, N0);
// fold (bswap (bswap x)) -> x
if (N0.getOpcode() == ISD::BSWAP)
return N0->getOperand(0);
return SDValue();
}
SDValue DAGCombiner::visitBITREVERSE(SDNode *N) {
SDValue N0 = N->getOperand(0);
EVT VT = N->getValueType(0);
// fold (bitreverse c1) -> c2
if (DAG.isConstantIntBuildVectorOrConstantInt(N0))
return DAG.getNode(ISD::BITREVERSE, SDLoc(N), VT, N0);
// fold (bitreverse (bitreverse x)) -> x
if (N0.getOpcode() == ISD::BITREVERSE)
return N0.getOperand(0);
return SDValue();
}
SDValue DAGCombiner::visitCTLZ(SDNode *N) {
SDValue N0 = N->getOperand(0);
EVT VT = N->getValueType(0);
// fold (ctlz c1) -> c2
if (DAG.isConstantIntBuildVectorOrConstantInt(N0))
return DAG.getNode(ISD::CTLZ, SDLoc(N), VT, N0);
return SDValue();
}
SDValue DAGCombiner::visitCTLZ_ZERO_UNDEF(SDNode *N) {
SDValue N0 = N->getOperand(0);
EVT VT = N->getValueType(0);
// fold (ctlz_zero_undef c1) -> c2
if (DAG.isConstantIntBuildVectorOrConstantInt(N0))
return DAG.getNode(ISD::CTLZ_ZERO_UNDEF, SDLoc(N), VT, N0);
return SDValue();
}
SDValue DAGCombiner::visitCTTZ(SDNode *N) {
SDValue N0 = N->getOperand(0);
EVT VT = N->getValueType(0);
// fold (cttz c1) -> c2
if (DAG.isConstantIntBuildVectorOrConstantInt(N0))
return DAG.getNode(ISD::CTTZ, SDLoc(N), VT, N0);
return SDValue();
}
SDValue DAGCombiner::visitCTTZ_ZERO_UNDEF(SDNode *N) {
SDValue N0 = N->getOperand(0);
EVT VT = N->getValueType(0);
// fold (cttz_zero_undef c1) -> c2
if (DAG.isConstantIntBuildVectorOrConstantInt(N0))
return DAG.getNode(ISD::CTTZ_ZERO_UNDEF, SDLoc(N), VT, N0);
return SDValue();
}
SDValue DAGCombiner::visitCTPOP(SDNode *N) {
SDValue N0 = N->getOperand(0);
EVT VT = N->getValueType(0);
// fold (ctpop c1) -> c2
if (DAG.isConstantIntBuildVectorOrConstantInt(N0))
return DAG.getNode(ISD::CTPOP, SDLoc(N), VT, N0);
return SDValue();
}
/// \brief Generate Min/Max node
static SDValue combineMinNumMaxNum(const SDLoc &DL, EVT VT, SDValue LHS,
SDValue RHS, SDValue True, SDValue False,
ISD::CondCode CC, const TargetLowering &TLI,
SelectionDAG &DAG) {
if (!(LHS == True && RHS == False) && !(LHS == False && RHS == True))
return SDValue();
switch (CC) {
case ISD::SETOLT:
case ISD::SETOLE:
case ISD::SETLT:
case ISD::SETLE:
case ISD::SETULT:
case ISD::SETULE: {
unsigned Opcode = (LHS == True) ? ISD::FMINNUM : ISD::FMAXNUM;
if (TLI.isOperationLegal(Opcode, VT))
return DAG.getNode(Opcode, DL, VT, LHS, RHS);
return SDValue();
}
case ISD::SETOGT:
case ISD::SETOGE:
case ISD::SETGT:
case ISD::SETGE:
case ISD::SETUGT:
case ISD::SETUGE: {
unsigned Opcode = (LHS == True) ? ISD::FMAXNUM : ISD::FMINNUM;
if (TLI.isOperationLegal(Opcode, VT))
return DAG.getNode(Opcode, DL, VT, LHS, RHS);
return SDValue();
}
default:
return SDValue();
}
}
SDValue DAGCombiner::foldSelectOfConstants(SDNode *N) {
SDValue Cond = N->getOperand(0);
SDValue N1 = N->getOperand(1);
SDValue N2 = N->getOperand(2);
EVT VT = N->getValueType(0);
EVT CondVT = Cond.getValueType();
SDLoc DL(N);
if (!VT.isInteger())
return SDValue();
auto *C1 = dyn_cast<ConstantSDNode>(N1);
auto *C2 = dyn_cast<ConstantSDNode>(N2);
if (!C1 || !C2)
return SDValue();
// Only do this before legalization to avoid conflicting with target-specific
// transforms in the other direction (create a select from a zext/sext). There
// is also a target-independent combine here in DAGCombiner in the other
// direction for (select Cond, -1, 0) when the condition is not i1.
if (CondVT == MVT::i1 && !LegalOperations) {
if (C1->isNullValue() && C2->isOne()) {
// select Cond, 0, 1 --> zext (!Cond)
SDValue NotCond = DAG.getNOT(DL, Cond, MVT::i1);
if (VT != MVT::i1)
NotCond = DAG.getNode(ISD::ZERO_EXTEND, DL, VT, NotCond);
return NotCond;
}
if (C1->isNullValue() && C2->isAllOnesValue()) {
// select Cond, 0, -1 --> sext (!Cond)
SDValue NotCond = DAG.getNOT(DL, Cond, MVT::i1);
if (VT != MVT::i1)
NotCond = DAG.getNode(ISD::SIGN_EXTEND, DL, VT, NotCond);
return NotCond;
}
if (C1->isOne() && C2->isNullValue()) {
// select Cond, 1, 0 --> zext (Cond)
if (VT != MVT::i1)
Cond = DAG.getNode(ISD::ZERO_EXTEND, DL, VT, Cond);
return Cond;
}
if (C1->isAllOnesValue() && C2->isNullValue()) {
// select Cond, -1, 0 --> sext (Cond)
if (VT != MVT::i1)
Cond = DAG.getNode(ISD::SIGN_EXTEND, DL, VT, Cond);
return Cond;
}
// For any constants that differ by 1, we can transform the select into an
// extend and add. Use a target hook because some targets may prefer to
// transform in the other direction.
if (TLI.convertSelectOfConstantsToMath()) {
if (C1->getAPIntValue() - 1 == C2->getAPIntValue()) {
// select Cond, C1, C1-1 --> add (zext Cond), C1-1
if (VT != MVT::i1)
Cond = DAG.getNode(ISD::ZERO_EXTEND, DL, VT, Cond);
return DAG.getNode(ISD::ADD, DL, VT, Cond, N2);
}
if (C1->getAPIntValue() + 1 == C2->getAPIntValue()) {
// select Cond, C1, C1+1 --> add (sext Cond), C1+1
if (VT != MVT::i1)
Cond = DAG.getNode(ISD::SIGN_EXTEND, DL, VT, Cond);
return DAG.getNode(ISD::ADD, DL, VT, Cond, N2);
}
}
return SDValue();
}
// fold (select Cond, 0, 1) -> (xor Cond, 1)
// We can't do this reliably if integer based booleans have different contents
// to floating point based booleans. This is because we can't tell whether we
// have an integer-based boolean or a floating-point-based boolean unless we
// can find the SETCC that produced it and inspect its operands. This is
// fairly easy if C is the SETCC node, but it can potentially be
// undiscoverable (or not reasonably discoverable). For example, it could be
// in another basic block or it could require searching a complicated
// expression.
if (CondVT.isInteger() &&
TLI.getBooleanContents(false, true) ==
TargetLowering::ZeroOrOneBooleanContent &&
TLI.getBooleanContents(false, false) ==
TargetLowering::ZeroOrOneBooleanContent &&
C1->isNullValue() && C2->isOne()) {
SDValue NotCond =
DAG.getNode(ISD::XOR, DL, CondVT, Cond, DAG.getConstant(1, DL, CondVT));
if (VT.bitsEq(CondVT))
return NotCond;
return DAG.getZExtOrTrunc(NotCond, DL, VT);
}
return SDValue();
}
SDValue DAGCombiner::visitSELECT(SDNode *N) {
SDValue N0 = N->getOperand(0);
SDValue N1 = N->getOperand(1);
SDValue N2 = N->getOperand(2);
EVT VT = N->getValueType(0);
EVT VT0 = N0.getValueType();
// fold (select C, X, X) -> X
if (N1 == N2)
return N1;
if (const ConstantSDNode *N0C = dyn_cast<const ConstantSDNode>(N0)) {
// fold (select true, X, Y) -> X
// fold (select false, X, Y) -> Y
return !N0C->isNullValue() ? N1 : N2;
}
// fold (select X, X, Y) -> (or X, Y)
// fold (select X, 1, Y) -> (or C, Y)
if (VT == VT0 && VT == MVT::i1 && (N0 == N1 || isOneConstant(N1)))
return DAG.getNode(ISD::OR, SDLoc(N), VT, N0, N2);
if (SDValue V = foldSelectOfConstants(N))
return V;
// fold (select C, 0, X) -> (and (not C), X)
if (VT == VT0 && VT == MVT::i1 && isNullConstant(N1)) {
SDValue NOTNode = DAG.getNOT(SDLoc(N0), N0, VT);
AddToWorklist(NOTNode.getNode());
return DAG.getNode(ISD::AND, SDLoc(N), VT, NOTNode, N2);
}
// fold (select C, X, 1) -> (or (not C), X)
if (VT == VT0 && VT == MVT::i1 && isOneConstant(N2)) {
SDValue NOTNode = DAG.getNOT(SDLoc(N0), N0, VT);
AddToWorklist(NOTNode.getNode());
return DAG.getNode(ISD::OR, SDLoc(N), VT, NOTNode, N1);
}
// fold (select X, Y, X) -> (and X, Y)
// fold (select X, Y, 0) -> (and X, Y)
if (VT == VT0 && VT == MVT::i1 && (N0 == N2 || isNullConstant(N2)))
return DAG.getNode(ISD::AND, SDLoc(N), VT, N0, N1);
// If we can fold this based on the true/false value, do so.
if (SimplifySelectOps(N, N1, N2))
return SDValue(N, 0); // Don't revisit N.
if (VT0 == MVT::i1) {
// The code in this block deals with the following 2 equivalences:
// select(C0|C1, x, y) <=> select(C0, x, select(C1, x, y))
// select(C0&C1, x, y) <=> select(C0, select(C1, x, y), y)
// The target can specify its preferred form with the
// shouldNormalizeToSelectSequence() callback. However we always transform
// to the right anyway if we find the inner select exists in the DAG anyway
// and we always transform to the left side if we know that we can further
// optimize the combination of the conditions.
bool normalizeToSequence
= TLI.shouldNormalizeToSelectSequence(*DAG.getContext(), VT);
// select (and Cond0, Cond1), X, Y
// -> select Cond0, (select Cond1, X, Y), Y
if (N0->getOpcode() == ISD::AND && N0->hasOneUse()) {
SDValue Cond0 = N0->getOperand(0);
SDValue Cond1 = N0->getOperand(1);
SDValue InnerSelect = DAG.getNode(ISD::SELECT, SDLoc(N),
N1.getValueType(), Cond1, N1, N2);
if (normalizeToSequence || !InnerSelect.use_empty())
return DAG.getNode(ISD::SELECT, SDLoc(N), N1.getValueType(), Cond0,
InnerSelect, N2);
}
// select (or Cond0, Cond1), X, Y -> select Cond0, X, (select Cond1, X, Y)
if (N0->getOpcode() == ISD::OR && N0->hasOneUse()) {
SDValue Cond0 = N0->getOperand(0);
SDValue Cond1 = N0->getOperand(1);
SDValue InnerSelect = DAG.getNode(ISD::SELECT, SDLoc(N),
N1.getValueType(), Cond1, N1, N2);
if (normalizeToSequence || !InnerSelect.use_empty())
return DAG.getNode(ISD::SELECT, SDLoc(N), N1.getValueType(), Cond0, N1,
InnerSelect);
}
// select Cond0, (select Cond1, X, Y), Y -> select (and Cond0, Cond1), X, Y
if (N1->getOpcode() == ISD::SELECT && N1->hasOneUse()) {
SDValue N1_0 = N1->getOperand(0);
SDValue N1_1 = N1->getOperand(1);
SDValue N1_2 = N1->getOperand(2);
if (N1_2 == N2 && N0.getValueType() == N1_0.getValueType()) {
// Create the actual and node if we can generate good code for it.
if (!normalizeToSequence) {
SDValue And = DAG.getNode(ISD::AND, SDLoc(N), N0.getValueType(),
N0, N1_0);
return DAG.getNode(ISD::SELECT, SDLoc(N), N1.getValueType(), And,
N1_1, N2);
}
// Otherwise see if we can optimize the "and" to a better pattern.
if (SDValue Combined = visitANDLike(N0, N1_0, N))
return DAG.getNode(ISD::SELECT, SDLoc(N), N1.getValueType(), Combined,
N1_1, N2);
}
}
// select Cond0, X, (select Cond1, X, Y) -> select (or Cond0, Cond1), X, Y
if (N2->getOpcode() == ISD::SELECT && N2->hasOneUse()) {
SDValue N2_0 = N2->getOperand(0);
SDValue N2_1 = N2->getOperand(1);
SDValue N2_2 = N2->getOperand(2);
if (N2_1 == N1 && N0.getValueType() == N2_0.getValueType()) {
// Create the actual or node if we can generate good code for it.
if (!normalizeToSequence) {
SDValue Or = DAG.getNode(ISD::OR, SDLoc(N), N0.getValueType(),
N0, N2_0);
return DAG.getNode(ISD::SELECT, SDLoc(N), N1.getValueType(), Or,
N1, N2_2);
}
// Otherwise see if we can optimize to a better pattern.
if (SDValue Combined = visitORLike(N0, N2_0, N))
return DAG.getNode(ISD::SELECT, SDLoc(N), N1.getValueType(), Combined,
N1, N2_2);
}
}
}
// select (xor Cond, 1), X, Y -> select Cond, Y, X
if (VT0 == MVT::i1) {
if (N0->getOpcode() == ISD::XOR) {
if (auto *C = dyn_cast<ConstantSDNode>(N0->getOperand(1))) {
SDValue Cond0 = N0->getOperand(0);
if (C->isOne())
return DAG.getNode(ISD::SELECT, SDLoc(N), N1.getValueType(),
Cond0, N2, N1);
}
}
}
// fold selects based on a setcc into other things, such as min/max/abs
if (N0.getOpcode() == ISD::SETCC) {
// select x, y (fcmp lt x, y) -> fminnum x, y
// select x, y (fcmp gt x, y) -> fmaxnum x, y
//
// This is OK if we don't care about what happens if either operand is a
// NaN.
//
// FIXME: Instead of testing for UnsafeFPMath, this should be checking for
// no signed zeros as well as no nans.
const TargetOptions &Options = DAG.getTarget().Options;
if (Options.UnsafeFPMath &&
VT.isFloatingPoint() && N0.hasOneUse() &&
DAG.isKnownNeverNaN(N1) && DAG.isKnownNeverNaN(N2)) {
ISD::CondCode CC = cast<CondCodeSDNode>(N0.getOperand(2))->get();
if (SDValue FMinMax = combineMinNumMaxNum(SDLoc(N), VT, N0.getOperand(0),
N0.getOperand(1), N1, N2, CC,
TLI, DAG))
return FMinMax;
}
if ((!LegalOperations &&
TLI.isOperationLegalOrCustom(ISD::SELECT_CC, VT)) ||
TLI.isOperationLegal(ISD::SELECT_CC, VT))
return DAG.getNode(ISD::SELECT_CC, SDLoc(N), VT,
N0.getOperand(0), N0.getOperand(1),
N1, N2, N0.getOperand(2));
return SimplifySelect(SDLoc(N), N0, N1, N2);
}
return SDValue();
}
static
std::pair<SDValue, SDValue> SplitVSETCC(const SDNode *N, SelectionDAG &DAG) {
SDLoc DL(N);
EVT LoVT, HiVT;
std::tie(LoVT, HiVT) = DAG.GetSplitDestVTs(N->getValueType(0));
// Split the inputs.
SDValue Lo, Hi, LL, LH, RL, RH;
std::tie(LL, LH) = DAG.SplitVectorOperand(N, 0);
std::tie(RL, RH) = DAG.SplitVectorOperand(N, 1);
Lo = DAG.getNode(N->getOpcode(), DL, LoVT, LL, RL, N->getOperand(2));
Hi = DAG.getNode(N->getOpcode(), DL, HiVT, LH, RH, N->getOperand(2));
return std::make_pair(Lo, Hi);
}
// This function assumes all the vselect's arguments are CONCAT_VECTOR
// nodes and that the condition is a BV of ConstantSDNodes (or undefs).
static SDValue ConvertSelectToConcatVector(SDNode *N, SelectionDAG &DAG) {
SDLoc DL(N);
SDValue Cond = N->getOperand(0);
SDValue LHS = N->getOperand(1);
SDValue RHS = N->getOperand(2);
EVT VT = N->getValueType(0);
int NumElems = VT.getVectorNumElements();
assert(LHS.getOpcode() == ISD::CONCAT_VECTORS &&
RHS.getOpcode() == ISD::CONCAT_VECTORS &&
Cond.getOpcode() == ISD::BUILD_VECTOR);
// CONCAT_VECTOR can take an arbitrary number of arguments. We only care about
// binary ones here.
if (LHS->getNumOperands() != 2 || RHS->getNumOperands() != 2)
return SDValue();
// We're sure we have an even number of elements due to the
// concat_vectors we have as arguments to vselect.
// Skip BV elements until we find one that's not an UNDEF
// After we find an UNDEF element, keep looping until we get to half the
// length of the BV and see if all the non-undef nodes are the same.
ConstantSDNode *BottomHalf = nullptr;
for (int i = 0; i < NumElems / 2; ++i) {
if (Cond->getOperand(i)->isUndef())
continue;
if (BottomHalf == nullptr)
BottomHalf = cast<ConstantSDNode>(Cond.getOperand(i));
else if (Cond->getOperand(i).getNode() != BottomHalf)
return SDValue();
}
// Do the same for the second half of the BuildVector
ConstantSDNode *TopHalf = nullptr;
for (int i = NumElems / 2; i < NumElems; ++i) {
if (Cond->getOperand(i)->isUndef())
continue;
if (TopHalf == nullptr)
TopHalf = cast<ConstantSDNode>(Cond.getOperand(i));
else if (Cond->getOperand(i).getNode() != TopHalf)
return SDValue();
}
assert(TopHalf && BottomHalf &&
"One half of the selector was all UNDEFs and the other was all the "
"same value. This should have been addressed before this function.");
return DAG.getNode(
ISD::CONCAT_VECTORS, DL, VT,
BottomHalf->isNullValue() ? RHS->getOperand(0) : LHS->getOperand(0),
TopHalf->isNullValue() ? RHS->getOperand(1) : LHS->getOperand(1));
}
SDValue DAGCombiner::visitMSCATTER(SDNode *N) {
if (Level >= AfterLegalizeTypes)
return SDValue();
MaskedScatterSDNode *MSC = cast<MaskedScatterSDNode>(N);
SDValue Mask = MSC->getMask();
SDValue Data = MSC->getValue();
SDLoc DL(N);
// If the MSCATTER data type requires splitting and the mask is provided by a
// SETCC, then split both nodes and its operands before legalization. This
// prevents the type legalizer from unrolling SETCC into scalar comparisons
// and enables future optimizations (e.g. min/max pattern matching on X86).
if (Mask.getOpcode() != ISD::SETCC)
return SDValue();
// Check if any splitting is required.
if (TLI.getTypeAction(*DAG.getContext(), Data.getValueType()) !=
TargetLowering::TypeSplitVector)
return SDValue();
SDValue MaskLo, MaskHi, Lo, Hi;
std::tie(MaskLo, MaskHi) = SplitVSETCC(Mask.getNode(), DAG);
EVT LoVT, HiVT;
std::tie(LoVT, HiVT) = DAG.GetSplitDestVTs(MSC->getValueType(0));
SDValue Chain = MSC->getChain();
EVT MemoryVT = MSC->getMemoryVT();
unsigned Alignment = MSC->getOriginalAlignment();
EVT LoMemVT, HiMemVT;
std::tie(LoMemVT, HiMemVT) = DAG.GetSplitDestVTs(MemoryVT);
SDValue DataLo, DataHi;
std::tie(DataLo, DataHi) = DAG.SplitVector(Data, DL);
SDValue BasePtr = MSC->getBasePtr();
SDValue IndexLo, IndexHi;
std::tie(IndexLo, IndexHi) = DAG.SplitVector(MSC->getIndex(), DL);
MachineMemOperand *MMO = DAG.getMachineFunction().
getMachineMemOperand(MSC->getPointerInfo(),
MachineMemOperand::MOStore, LoMemVT.getStoreSize(),
Alignment, MSC->getAAInfo(), MSC->getRanges());
SDValue OpsLo[] = { Chain, DataLo, MaskLo, BasePtr, IndexLo };
Lo = DAG.getMaskedScatter(DAG.getVTList(MVT::Other), DataLo.getValueType(),
DL, OpsLo, MMO);
SDValue OpsHi[] = {Chain, DataHi, MaskHi, BasePtr, IndexHi};
Hi = DAG.getMaskedScatter(DAG.getVTList(MVT::Other), DataHi.getValueType(),
DL, OpsHi, MMO);
AddToWorklist(Lo.getNode());
AddToWorklist(Hi.getNode());
return DAG.getNode(ISD::TokenFactor, DL, MVT::Other, Lo, Hi);
}
SDValue DAGCombiner::visitMSTORE(SDNode *N) {
if (Level >= AfterLegalizeTypes)
return SDValue();
MaskedStoreSDNode *MST = dyn_cast<MaskedStoreSDNode>(N);
SDValue Mask = MST->getMask();
SDValue Data = MST->getValue();
EVT VT = Data.getValueType();
SDLoc DL(N);
// If the MSTORE data type requires splitting and the mask is provided by a
// SETCC, then split both nodes and its operands before legalization. This
// prevents the type legalizer from unrolling SETCC into scalar comparisons
// and enables future optimizations (e.g. min/max pattern matching on X86).
if (Mask.getOpcode() == ISD::SETCC) {
// Check if any splitting is required.
if (TLI.getTypeAction(*DAG.getContext(), VT) !=
TargetLowering::TypeSplitVector)
return SDValue();
SDValue MaskLo, MaskHi, Lo, Hi;
std::tie(MaskLo, MaskHi) = SplitVSETCC(Mask.getNode(), DAG);
SDValue Chain = MST->getChain();
SDValue Ptr = MST->getBasePtr();
EVT MemoryVT = MST->getMemoryVT();
unsigned Alignment = MST->getOriginalAlignment();
// if Alignment is equal to the vector size,
// take the half of it for the second part
unsigned SecondHalfAlignment =
(Alignment == VT.getSizeInBits() / 8) ? Alignment / 2 : Alignment;
EVT LoMemVT, HiMemVT;
std::tie(LoMemVT, HiMemVT) = DAG.GetSplitDestVTs(MemoryVT);
SDValue DataLo, DataHi;
std::tie(DataLo, DataHi) = DAG.SplitVector(Data, DL);
MachineMemOperand *MMO = DAG.getMachineFunction().
getMachineMemOperand(MST->getPointerInfo(),
MachineMemOperand::MOStore, LoMemVT.getStoreSize(),
Alignment, MST->getAAInfo(), MST->getRanges());
Lo = DAG.getMaskedStore(Chain, DL, DataLo, Ptr, MaskLo, LoMemVT, MMO,
MST->isTruncatingStore(),
MST->isCompressingStore());
Ptr = TLI.IncrementMemoryAddress(Ptr, MaskLo, DL, LoMemVT, DAG,
MST->isCompressingStore());
MMO = DAG.getMachineFunction().
getMachineMemOperand(MST->getPointerInfo(),
MachineMemOperand::MOStore, HiMemVT.getStoreSize(),
SecondHalfAlignment, MST->getAAInfo(),
MST->getRanges());
Hi = DAG.getMaskedStore(Chain, DL, DataHi, Ptr, MaskHi, HiMemVT, MMO,
MST->isTruncatingStore(),
MST->isCompressingStore());
AddToWorklist(Lo.getNode());
AddToWorklist(Hi.getNode());
return DAG.getNode(ISD::TokenFactor, DL, MVT::Other, Lo, Hi);
}
return SDValue();
}
SDValue DAGCombiner::visitMGATHER(SDNode *N) {
if (Level >= AfterLegalizeTypes)
return SDValue();
MaskedGatherSDNode *MGT = dyn_cast<MaskedGatherSDNode>(N);
SDValue Mask = MGT->getMask();
SDLoc DL(N);
// If the MGATHER result requires splitting and the mask is provided by a
// SETCC, then split both nodes and its operands before legalization. This
// prevents the type legalizer from unrolling SETCC into scalar comparisons
// and enables future optimizations (e.g. min/max pattern matching on X86).
if (Mask.getOpcode() != ISD::SETCC)
return SDValue();
EVT VT = N->getValueType(0);
// Check if any splitting is required.
if (TLI.getTypeAction(*DAG.getContext(), VT) !=
TargetLowering::TypeSplitVector)
return SDValue();
SDValue MaskLo, MaskHi, Lo, Hi;
std::tie(MaskLo, MaskHi) = SplitVSETCC(Mask.getNode(), DAG);
SDValue Src0 = MGT->getValue();
SDValue Src0Lo, Src0Hi;
std::tie(Src0Lo, Src0Hi) = DAG.SplitVector(Src0, DL);
EVT LoVT, HiVT;
std::tie(LoVT, HiVT) = DAG.GetSplitDestVTs(VT);
SDValue Chain = MGT->getChain();
EVT MemoryVT = MGT->getMemoryVT();
unsigned Alignment = MGT->getOriginalAlignment();
EVT LoMemVT, HiMemVT;
std::tie(LoMemVT, HiMemVT) = DAG.GetSplitDestVTs(MemoryVT);
SDValue BasePtr = MGT->getBasePtr();
SDValue Index = MGT->getIndex();
SDValue IndexLo, IndexHi;
std::tie(IndexLo, IndexHi) = DAG.SplitVector(Index, DL);
MachineMemOperand *MMO = DAG.getMachineFunction().
getMachineMemOperand(MGT->getPointerInfo(),
MachineMemOperand::MOLoad, LoMemVT.getStoreSize(),
Alignment, MGT->getAAInfo(), MGT->getRanges());
SDValue OpsLo[] = { Chain, Src0Lo, MaskLo, BasePtr, IndexLo };
Lo = DAG.getMaskedGather(DAG.getVTList(LoVT, MVT::Other), LoVT, DL, OpsLo,
MMO);
SDValue OpsHi[] = {Chain, Src0Hi, MaskHi, BasePtr, IndexHi};
Hi = DAG.getMaskedGather(DAG.getVTList(HiVT, MVT::Other), HiVT, DL, OpsHi,
MMO);
AddToWorklist(Lo.getNode());
AddToWorklist(Hi.getNode());
// Build a factor node to remember that this load is independent of the
// other one.
Chain = DAG.getNode(ISD::TokenFactor, DL, MVT::Other, Lo.getValue(1),
Hi.getValue(1));
// Legalized the chain result - switch anything that used the old chain to
// use the new one.
DAG.ReplaceAllUsesOfValueWith(SDValue(MGT, 1), Chain);
SDValue GatherRes = DAG.getNode(ISD::CONCAT_VECTORS, DL, VT, Lo, Hi);
SDValue RetOps[] = { GatherRes, Chain };
return DAG.getMergeValues(RetOps, DL);
}
SDValue DAGCombiner::visitMLOAD(SDNode *N) {
if (Level >= AfterLegalizeTypes)
return SDValue();
MaskedLoadSDNode *MLD = dyn_cast<MaskedLoadSDNode>(N);
SDValue Mask = MLD->getMask();
SDLoc DL(N);
// If the MLOAD result requires splitting and the mask is provided by a
// SETCC, then split both nodes and its operands before legalization. This
// prevents the type legalizer from unrolling SETCC into scalar comparisons
// and enables future optimizations (e.g. min/max pattern matching on X86).
if (Mask.getOpcode() == ISD::SETCC) {
EVT VT = N->getValueType(0);
// Check if any splitting is required.
if (TLI.getTypeAction(*DAG.getContext(), VT) !=
TargetLowering::TypeSplitVector)
return SDValue();
SDValue MaskLo, MaskHi, Lo, Hi;
std::tie(MaskLo, MaskHi) = SplitVSETCC(Mask.getNode(), DAG);
SDValue Src0 = MLD->getSrc0();
SDValue Src0Lo, Src0Hi;
std::tie(Src0Lo, Src0Hi) = DAG.SplitVector(Src0, DL);
EVT LoVT, HiVT;
std::tie(LoVT, HiVT) = DAG.GetSplitDestVTs(MLD->getValueType(0));
SDValue Chain = MLD->getChain();
SDValue Ptr = MLD->getBasePtr();
EVT MemoryVT = MLD->getMemoryVT();
unsigned Alignment = MLD->getOriginalAlignment();
// if Alignment is equal to the vector size,
// take the half of it for the second part
unsigned SecondHalfAlignment =
(Alignment == MLD->getValueType(0).getSizeInBits()/8) ?
Alignment/2 : Alignment;
EVT LoMemVT, HiMemVT;
std::tie(LoMemVT, HiMemVT) = DAG.GetSplitDestVTs(MemoryVT);
MachineMemOperand *MMO = DAG.getMachineFunction().
getMachineMemOperand(MLD->getPointerInfo(),
MachineMemOperand::MOLoad, LoMemVT.getStoreSize(),
Alignment, MLD->getAAInfo(), MLD->getRanges());
Lo = DAG.getMaskedLoad(LoVT, DL, Chain, Ptr, MaskLo, Src0Lo, LoMemVT, MMO,
ISD::NON_EXTLOAD, MLD->isExpandingLoad());
Ptr = TLI.IncrementMemoryAddress(Ptr, MaskLo, DL, LoMemVT, DAG,
MLD->isExpandingLoad());
MMO = DAG.getMachineFunction().
getMachineMemOperand(MLD->getPointerInfo(),
MachineMemOperand::MOLoad, HiMemVT.getStoreSize(),
SecondHalfAlignment, MLD->getAAInfo(), MLD->getRanges());
Hi = DAG.getMaskedLoad(HiVT, DL, Chain, Ptr, MaskHi, Src0Hi, HiMemVT, MMO,
ISD::NON_EXTLOAD, MLD->isExpandingLoad());
AddToWorklist(Lo.getNode());
AddToWorklist(Hi.getNode());
// Build a factor node to remember that this load is independent of the
// other one.
Chain = DAG.getNode(ISD::TokenFactor, DL, MVT::Other, Lo.getValue(1),
Hi.getValue(1));
// Legalized the chain result - switch anything that used the old chain to
// use the new one.
DAG.ReplaceAllUsesOfValueWith(SDValue(MLD, 1), Chain);
SDValue LoadRes = DAG.getNode(ISD::CONCAT_VECTORS, DL, VT, Lo, Hi);
SDValue RetOps[] = { LoadRes, Chain };
return DAG.getMergeValues(RetOps, DL);
}
return SDValue();
}
SDValue DAGCombiner::visitVSELECT(SDNode *N) {
SDValue N0 = N->getOperand(0);
SDValue N1 = N->getOperand(1);
SDValue N2 = N->getOperand(2);
SDLoc DL(N);
// fold (vselect C, X, X) -> X
if (N1 == N2)
return N1;
// Canonicalize integer abs.
// vselect (setg[te] X, 0), X, -X ->
// vselect (setgt X, -1), X, -X ->
// vselect (setl[te] X, 0), -X, X ->
// Y = sra (X, size(X)-1); xor (add (X, Y), Y)
if (N0.getOpcode() == ISD::SETCC) {
SDValue LHS = N0.getOperand(0), RHS = N0.getOperand(1);
ISD::CondCode CC = cast<CondCodeSDNode>(N0.getOperand(2))->get();
bool isAbs = false;
bool RHSIsAllZeros = ISD::isBuildVectorAllZeros(RHS.getNode());
if (((RHSIsAllZeros && (CC == ISD::SETGT || CC == ISD::SETGE)) ||
(ISD::isBuildVectorAllOnes(RHS.getNode()) && CC == ISD::SETGT)) &&
N1 == LHS && N2.getOpcode() == ISD::SUB && N1 == N2.getOperand(1))
isAbs = ISD::isBuildVectorAllZeros(N2.getOperand(0).getNode());
else if ((RHSIsAllZeros && (CC == ISD::SETLT || CC == ISD::SETLE)) &&
N2 == LHS && N1.getOpcode() == ISD::SUB && N2 == N1.getOperand(1))
isAbs = ISD::isBuildVectorAllZeros(N1.getOperand(0).getNode());
if (isAbs) {
EVT VT = LHS.getValueType();
SDValue Shift = DAG.getNode(
ISD::SRA, DL, VT, LHS,
DAG.getConstant(VT.getScalarSizeInBits() - 1, DL, VT));
SDValue Add = DAG.getNode(ISD::ADD, DL, VT, LHS, Shift);
AddToWorklist(Shift.getNode());
AddToWorklist(Add.getNode());
return DAG.getNode(ISD::XOR, DL, VT, Add, Shift);
}
}
if (SimplifySelectOps(N, N1, N2))
return SDValue(N, 0); // Don't revisit N.
// Fold (vselect (build_vector all_ones), N1, N2) -> N1
if (ISD::isBuildVectorAllOnes(N0.getNode()))
return N1;
// Fold (vselect (build_vector all_zeros), N1, N2) -> N2
if (ISD::isBuildVectorAllZeros(N0.getNode()))
return N2;
// The ConvertSelectToConcatVector function is assuming both the above
// checks for (vselect (build_vector all{ones,zeros) ...) have been made
// and addressed.
if (N1.getOpcode() == ISD::CONCAT_VECTORS &&
N2.getOpcode() == ISD::CONCAT_VECTORS &&
ISD::isBuildVectorOfConstantSDNodes(N0.getNode())) {
if (SDValue CV = ConvertSelectToConcatVector(N, DAG))
return CV;
}
return SDValue();
}
SDValue DAGCombiner::visitSELECT_CC(SDNode *N) {
SDValue N0 = N->getOperand(0);
SDValue N1 = N->getOperand(1);
SDValue N2 = N->getOperand(2);
SDValue N3 = N->getOperand(3);
SDValue N4 = N->getOperand(4);
ISD::CondCode CC = cast<CondCodeSDNode>(N4)->get();
// fold select_cc lhs, rhs, x, x, cc -> x
if (N2 == N3)
return N2;
// Determine if the condition we're dealing with is constant
if (SDValue SCC = SimplifySetCC(getSetCCResultType(N0.getValueType()), N0, N1,
CC, SDLoc(N), false)) {
AddToWorklist(SCC.getNode());
if (ConstantSDNode *SCCC = dyn_cast<ConstantSDNode>(SCC.getNode())) {
if (!SCCC->isNullValue())
return N2; // cond always true -> true val
else
return N3; // cond always false -> false val
} else if (SCC->isUndef()) {
// When the condition is UNDEF, just return the first operand. This is
// coherent the DAG creation, no setcc node is created in this case
return N2;
} else if (SCC.getOpcode() == ISD::SETCC) {
// Fold to a simpler select_cc
return DAG.getNode(ISD::SELECT_CC, SDLoc(N), N2.getValueType(),
SCC.getOperand(0), SCC.getOperand(1), N2, N3,
SCC.getOperand(2));
}
}
// If we can fold this based on the true/false value, do so.
if (SimplifySelectOps(N, N2, N3))
return SDValue(N, 0); // Don't revisit N.
// fold select_cc into other things, such as min/max/abs
return SimplifySelectCC(SDLoc(N), N0, N1, N2, N3, CC);
}
SDValue DAGCombiner::visitSETCC(SDNode *N) {
return SimplifySetCC(N->getValueType(0), N->getOperand(0), N->getOperand(1),
cast<CondCodeSDNode>(N->getOperand(2))->get(),
SDLoc(N));
}
SDValue DAGCombiner::visitSETCCE(SDNode *N) {
SDValue LHS = N->getOperand(0);
SDValue RHS = N->getOperand(1);
SDValue Carry = N->getOperand(2);
SDValue Cond = N->getOperand(3);
// If Carry is false, fold to a regular SETCC.
if (Carry.getOpcode() == ISD::CARRY_FALSE)
return DAG.getNode(ISD::SETCC, SDLoc(N), N->getVTList(), LHS, RHS, Cond);
return SDValue();
}
/// Try to fold a sext/zext/aext dag node into a ConstantSDNode or
/// a build_vector of constants.
/// This function is called by the DAGCombiner when visiting sext/zext/aext
/// dag nodes (see for example method DAGCombiner::visitSIGN_EXTEND).
/// Vector extends are not folded if operations are legal; this is to
/// avoid introducing illegal build_vector dag nodes.
static SDNode *tryToFoldExtendOfConstant(SDNode *N, const TargetLowering &TLI,
SelectionDAG &DAG, bool LegalTypes,
bool LegalOperations) {
unsigned Opcode = N->getOpcode();
SDValue N0 = N->getOperand(0);
EVT VT = N->getValueType(0);
assert((Opcode == ISD::SIGN_EXTEND || Opcode == ISD::ZERO_EXTEND ||
Opcode == ISD::ANY_EXTEND || Opcode == ISD::SIGN_EXTEND_VECTOR_INREG ||
Opcode == ISD::ZERO_EXTEND_VECTOR_INREG)
&& "Expected EXTEND dag node in input!");
// fold (sext c1) -> c1
// fold (zext c1) -> c1
// fold (aext c1) -> c1
if (isa<ConstantSDNode>(N0))
return DAG.getNode(Opcode, SDLoc(N), VT, N0).getNode();
// fold (sext (build_vector AllConstants) -> (build_vector AllConstants)
// fold (zext (build_vector AllConstants) -> (build_vector AllConstants)
// fold (aext (build_vector AllConstants) -> (build_vector AllConstants)
EVT SVT = VT.getScalarType();
if (!(VT.isVector() &&
(!LegalTypes || (!LegalOperations && TLI.isTypeLegal(SVT))) &&
ISD::isBuildVectorOfConstantSDNodes(N0.getNode())))
return nullptr;
// We can fold this node into a build_vector.
unsigned VTBits = SVT.getSizeInBits();
unsigned EVTBits = N0->getValueType(0).getScalarSizeInBits();
SmallVector<SDValue, 8> Elts;
unsigned NumElts = VT.getVectorNumElements();
SDLoc DL(N);
for (unsigned i=0; i != NumElts; ++i) {
SDValue Op = N0->getOperand(i);
if (Op->isUndef()) {
Elts.push_back(DAG.getUNDEF(SVT));
continue;
}
SDLoc DL(Op);
// Get the constant value and if needed trunc it to the size of the type.
// Nodes like build_vector might have constants wider than the scalar type.
APInt C = cast<ConstantSDNode>(Op)->getAPIntValue().zextOrTrunc(EVTBits);
if (Opcode == ISD::SIGN_EXTEND || Opcode == ISD::SIGN_EXTEND_VECTOR_INREG)
Elts.push_back(DAG.getConstant(C.sext(VTBits), DL, SVT));
else
Elts.push_back(DAG.getConstant(C.zext(VTBits), DL, SVT));
}
return DAG.getBuildVector(VT, DL, Elts).getNode();
}
// ExtendUsesToFormExtLoad - Trying to extend uses of a load to enable this:
// "fold ({s|z|a}ext (load x)) -> ({s|z|a}ext (truncate ({s|z|a}extload x)))"
// transformation. Returns true if extension are possible and the above
// mentioned transformation is profitable.
static bool ExtendUsesToFormExtLoad(SDNode *N, SDValue N0,
unsigned ExtOpc,
SmallVectorImpl<SDNode *> &ExtendNodes,
const TargetLowering &TLI) {
bool HasCopyToRegUses = false;
bool isTruncFree = TLI.isTruncateFree(N->getValueType(0), N0.getValueType());
for (SDNode::use_iterator UI = N0.getNode()->use_begin(),
UE = N0.getNode()->use_end();
UI != UE; ++UI) {
SDNode *User = *UI;
if (User == N)
continue;
if (UI.getUse().getResNo() != N0.getResNo())
continue;
// FIXME: Only extend SETCC N, N and SETCC N, c for now.
if (ExtOpc != ISD::ANY_EXTEND && User->getOpcode() == ISD::SETCC) {
ISD::CondCode CC = cast<CondCodeSDNode>(User->getOperand(2))->get();
if (ExtOpc == ISD::ZERO_EXTEND && ISD::isSignedIntSetCC(CC))
// Sign bits will be lost after a zext.
return false;
bool Add = false;
for (unsigned i = 0; i != 2; ++i) {
SDValue UseOp = User->getOperand(i);
if (UseOp == N0)
continue;
if (!isa<ConstantSDNode>(UseOp))
return false;
Add = true;
}
if (Add)
ExtendNodes.push_back(User);
continue;
}
// If truncates aren't free and there are users we can't
// extend, it isn't worthwhile.
if (!isTruncFree)
return false;
// Remember if this value is live-out.
if (User->getOpcode() == ISD::CopyToReg)
HasCopyToRegUses = true;
}
if (HasCopyToRegUses) {
bool BothLiveOut = false;
for (SDNode::use_iterator UI = N->use_begin(), UE = N->use_end();
UI != UE; ++UI) {
SDUse &Use = UI.getUse();
if (Use.getResNo() == 0 && Use.getUser()->getOpcode() == ISD::CopyToReg) {
BothLiveOut = true;
break;
}
}
if (BothLiveOut)
// Both unextended and extended values are live out. There had better be
// a good reason for the transformation.
return ExtendNodes.size();
}
return true;
}
void DAGCombiner::ExtendSetCCUses(const SmallVectorImpl<SDNode *> &SetCCs,
SDValue Trunc, SDValue ExtLoad,
const SDLoc &DL, ISD::NodeType ExtType) {
// Extend SetCC uses if necessary.
for (unsigned i = 0, e = SetCCs.size(); i != e; ++i) {
SDNode *SetCC = SetCCs[i];
SmallVector<SDValue, 4> Ops;
for (unsigned j = 0; j != 2; ++j) {
SDValue SOp = SetCC->getOperand(j);
if (SOp == Trunc)
Ops.push_back(ExtLoad);
else
Ops.push_back(DAG.getNode(ExtType, DL, ExtLoad->getValueType(0), SOp));
}
Ops.push_back(SetCC->getOperand(2));
CombineTo(SetCC, DAG.getNode(ISD::SETCC, DL, SetCC->getValueType(0), Ops));
}
}
// FIXME: Bring more similar combines here, common to sext/zext (maybe aext?).
SDValue DAGCombiner::CombineExtLoad(SDNode *N) {
SDValue N0 = N->getOperand(0);
EVT DstVT = N->getValueType(0);
EVT SrcVT = N0.getValueType();
assert((N->getOpcode() == ISD::SIGN_EXTEND ||
N->getOpcode() == ISD::ZERO_EXTEND) &&
"Unexpected node type (not an extend)!");
// fold (sext (load x)) to multiple smaller sextloads; same for zext.
// For example, on a target with legal v4i32, but illegal v8i32, turn:
// (v8i32 (sext (v8i16 (load x))))
// into:
// (v8i32 (concat_vectors (v4i32 (sextload x)),
// (v4i32 (sextload (x + 16)))))
// Where uses of the original load, i.e.:
// (v8i16 (load x))
// are replaced with:
// (v8i16 (truncate
// (v8i32 (concat_vectors (v4i32 (sextload x)),
// (v4i32 (sextload (x + 16)))))))
//
// This combine is only applicable to illegal, but splittable, vectors.
// All legal types, and illegal non-vector types, are handled elsewhere.
// This combine is controlled by TargetLowering::isVectorLoadExtDesirable.
//
if (N0->getOpcode() != ISD::LOAD)
return SDValue();
LoadSDNode *LN0 = cast<LoadSDNode>(N0);
if (!ISD::isNON_EXTLoad(LN0) || !ISD::isUNINDEXEDLoad(LN0) ||
!N0.hasOneUse() || LN0->isVolatile() || !DstVT.isVector() ||
!DstVT.isPow2VectorType() || !TLI.isVectorLoadExtDesirable(SDValue(N, 0)))
return SDValue();
SmallVector<SDNode *, 4> SetCCs;
if (!ExtendUsesToFormExtLoad(N, N0, N->getOpcode(), SetCCs, TLI))
return SDValue();
ISD::LoadExtType ExtType =
N->getOpcode() == ISD::SIGN_EXTEND ? ISD::SEXTLOAD : ISD::ZEXTLOAD;
// Try to split the vector types to get down to legal types.
EVT SplitSrcVT = SrcVT;
EVT SplitDstVT = DstVT;
while (!TLI.isLoadExtLegalOrCustom(ExtType, SplitDstVT, SplitSrcVT) &&
SplitSrcVT.getVectorNumElements() > 1) {
SplitDstVT = DAG.GetSplitDestVTs(SplitDstVT).first;
SplitSrcVT = DAG.GetSplitDestVTs(SplitSrcVT).first;
}
if (!TLI.isLoadExtLegalOrCustom(ExtType, SplitDstVT, SplitSrcVT))
return SDValue();
SDLoc DL(N);
const unsigned NumSplits =
DstVT.getVectorNumElements() / SplitDstVT.getVectorNumElements();
const unsigned Stride = SplitSrcVT.getStoreSize();
SmallVector<SDValue, 4> Loads;
SmallVector<SDValue, 4> Chains;
SDValue BasePtr = LN0->getBasePtr();
for (unsigned Idx = 0; Idx < NumSplits; Idx++) {
const unsigned Offset = Idx * Stride;
const unsigned Align = MinAlign(LN0->getAlignment(), Offset);
SDValue SplitLoad = DAG.getExtLoad(
ExtType, DL, SplitDstVT, LN0->getChain(), BasePtr,
LN0->getPointerInfo().getWithOffset(Offset), SplitSrcVT, Align,
LN0->getMemOperand()->getFlags(), LN0->getAAInfo());
BasePtr = DAG.getNode(ISD::ADD, DL, BasePtr.getValueType(), BasePtr,
DAG.getConstant(Stride, DL, BasePtr.getValueType()));
Loads.push_back(SplitLoad.getValue(0));
Chains.push_back(SplitLoad.getValue(1));
}
SDValue NewChain = DAG.getNode(ISD::TokenFactor, DL, MVT::Other, Chains);
SDValue NewValue = DAG.getNode(ISD::CONCAT_VECTORS, DL, DstVT, Loads);
// Simplify TF.
AddToWorklist(NewChain.getNode());
CombineTo(N, NewValue);
// Replace uses of the original load (before extension)
// with a truncate of the concatenated sextloaded vectors.
SDValue Trunc =
DAG.getNode(ISD::TRUNCATE, SDLoc(N0), N0.getValueType(), NewValue);
CombineTo(N0.getNode(), Trunc, NewChain);
ExtendSetCCUses(SetCCs, Trunc, NewValue, DL,
(ISD::NodeType)N->getOpcode());
return SDValue(N, 0); // Return N so it doesn't get rechecked!
}
SDValue DAGCombiner::visitSIGN_EXTEND(SDNode *N) {
SDValue N0 = N->getOperand(0);
EVT VT = N->getValueType(0);
SDLoc DL(N);
if (SDNode *Res = tryToFoldExtendOfConstant(N, TLI, DAG, LegalTypes,
LegalOperations))
return SDValue(Res, 0);
// fold (sext (sext x)) -> (sext x)
// fold (sext (aext x)) -> (sext x)
if (N0.getOpcode() == ISD::SIGN_EXTEND || N0.getOpcode() == ISD::ANY_EXTEND)
return DAG.getNode(ISD::SIGN_EXTEND, DL, VT, N0.getOperand(0));
if (N0.getOpcode() == ISD::TRUNCATE) {
// fold (sext (truncate (load x))) -> (sext (smaller load x))
// fold (sext (truncate (srl (load x), c))) -> (sext (smaller load (x+c/n)))
if (SDValue NarrowLoad = ReduceLoadWidth(N0.getNode())) {
SDNode *oye = N0.getOperand(0).getNode();
if (NarrowLoad.getNode() != N0.getNode()) {
CombineTo(N0.getNode(), NarrowLoad);
// CombineTo deleted the truncate, if needed, but not what's under it.
AddToWorklist(oye);
}
return SDValue(N, 0); // Return N so it doesn't get rechecked!
}
// See if the value being truncated is already sign extended. If so, just
// eliminate the trunc/sext pair.
SDValue Op = N0.getOperand(0);
unsigned OpBits = Op.getScalarValueSizeInBits();
unsigned MidBits = N0.getScalarValueSizeInBits();
unsigned DestBits = VT.getScalarSizeInBits();
unsigned NumSignBits = DAG.ComputeNumSignBits(Op);
if (OpBits == DestBits) {
// Op is i32, Mid is i8, and Dest is i32. If Op has more than 24 sign
// bits, it is already ready.
if (NumSignBits > DestBits-MidBits)
return Op;
} else if (OpBits < DestBits) {
// Op is i32, Mid is i8, and Dest is i64. If Op has more than 24 sign
// bits, just sext from i32.
if (NumSignBits > OpBits-MidBits)
return DAG.getNode(ISD::SIGN_EXTEND, DL, VT, Op);
} else {
// Op is i64, Mid is i8, and Dest is i32. If Op has more than 56 sign
// bits, just truncate to i32.
if (NumSignBits > OpBits-MidBits)
return DAG.getNode(ISD::TRUNCATE, DL, VT, Op);
}
// fold (sext (truncate x)) -> (sextinreg x).
if (!LegalOperations || TLI.isOperationLegal(ISD::SIGN_EXTEND_INREG,
N0.getValueType())) {
if (OpBits < DestBits)
Op = DAG.getNode(ISD::ANY_EXTEND, SDLoc(N0), VT, Op);
else if (OpBits > DestBits)
Op = DAG.getNode(ISD::TRUNCATE, SDLoc(N0), VT, Op);
return DAG.getNode(ISD::SIGN_EXTEND_INREG, DL, VT, Op,
DAG.getValueType(N0.getValueType()));
}
}
// fold (sext (load x)) -> (sext (truncate (sextload x)))
// Only generate vector extloads when 1) they're legal, and 2) they are
// deemed desirable by the target.
if (ISD::isNON_EXTLoad(N0.getNode()) && ISD::isUNINDEXEDLoad(N0.getNode()) &&
((!LegalOperations && !VT.isVector() &&
!cast<LoadSDNode>(N0)->isVolatile()) ||
TLI.isLoadExtLegal(ISD::SEXTLOAD, VT, N0.getValueType()))) {
bool DoXform = true;
SmallVector<SDNode*, 4> SetCCs;
if (!N0.hasOneUse())
DoXform = ExtendUsesToFormExtLoad(N, N0, ISD::SIGN_EXTEND, SetCCs, TLI);
if (VT.isVector())
DoXform &= TLI.isVectorLoadExtDesirable(SDValue(N, 0));
if (DoXform) {
LoadSDNode *LN0 = cast<LoadSDNode>(N0);
SDValue ExtLoad = DAG.getExtLoad(ISD::SEXTLOAD, DL, VT, LN0->getChain(),
LN0->getBasePtr(), N0.getValueType(),
LN0->getMemOperand());
CombineTo(N, ExtLoad);
SDValue Trunc = DAG.getNode(ISD::TRUNCATE, SDLoc(N0),
N0.getValueType(), ExtLoad);
CombineTo(N0.getNode(), Trunc, ExtLoad.getValue(1));
ExtendSetCCUses(SetCCs, Trunc, ExtLoad, DL, ISD::SIGN_EXTEND);
return SDValue(N, 0); // Return N so it doesn't get rechecked!
}
}
// fold (sext (load x)) to multiple smaller sextloads.
// Only on illegal but splittable vectors.
if (SDValue ExtLoad = CombineExtLoad(N))
return ExtLoad;
// fold (sext (sextload x)) -> (sext (truncate (sextload x)))
// fold (sext ( extload x)) -> (sext (truncate (sextload x)))
if ((ISD::isSEXTLoad(N0.getNode()) || ISD::isEXTLoad(N0.getNode())) &&
ISD::isUNINDEXEDLoad(N0.getNode()) && N0.hasOneUse()) {
LoadSDNode *LN0 = cast<LoadSDNode>(N0);
EVT MemVT = LN0->getMemoryVT();
if ((!LegalOperations && !LN0->isVolatile()) ||
TLI.isLoadExtLegal(ISD::SEXTLOAD, VT, MemVT)) {
SDValue ExtLoad = DAG.getExtLoad(ISD::SEXTLOAD, DL, VT, LN0->getChain(),
LN0->getBasePtr(), MemVT,
LN0->getMemOperand());
CombineTo(N, ExtLoad);
CombineTo(N0.getNode(),
DAG.getNode(ISD::TRUNCATE, SDLoc(N0),
N0.getValueType(), ExtLoad),
ExtLoad.getValue(1));
return SDValue(N, 0); // Return N so it doesn't get rechecked!
}
}
// fold (sext (and/or/xor (load x), cst)) ->
// (and/or/xor (sextload x), (sext cst))
if ((N0.getOpcode() == ISD::AND || N0.getOpcode() == ISD::OR ||
N0.getOpcode() == ISD::XOR) &&
isa<LoadSDNode>(N0.getOperand(0)) &&
N0.getOperand(1).getOpcode() == ISD::Constant &&
TLI.isLoadExtLegal(ISD::SEXTLOAD, VT, N0.getValueType()) &&
(!LegalOperations && TLI.isOperationLegal(N0.getOpcode(), VT))) {
LoadSDNode *LN0 = cast<LoadSDNode>(N0.getOperand(0));
if (LN0->getExtensionType() != ISD::ZEXTLOAD && LN0->isUnindexed()) {
bool DoXform = true;
SmallVector<SDNode*, 4> SetCCs;
if (!N0.hasOneUse())
DoXform = ExtendUsesToFormExtLoad(N, N0.getOperand(0), ISD::SIGN_EXTEND,
SetCCs, TLI);
if (DoXform) {
SDValue ExtLoad = DAG.getExtLoad(ISD::SEXTLOAD, SDLoc(LN0), VT,
LN0->getChain(), LN0->getBasePtr(),
LN0->getMemoryVT(),
LN0->getMemOperand());
APInt Mask = cast<ConstantSDNode>(N0.getOperand(1))->getAPIntValue();
Mask = Mask.sext(VT.getSizeInBits());
SDValue And = DAG.getNode(N0.getOpcode(), DL, VT,
ExtLoad, DAG.getConstant(Mask, DL, VT));
SDValue Trunc = DAG.getNode(ISD::TRUNCATE,
SDLoc(N0.getOperand(0)),
N0.getOperand(0).getValueType(), ExtLoad);
CombineTo(N, And);
CombineTo(N0.getOperand(0).getNode(), Trunc, ExtLoad.getValue(1));
ExtendSetCCUses(SetCCs, Trunc, ExtLoad, DL, ISD::SIGN_EXTEND);
return SDValue(N, 0); // Return N so it doesn't get rechecked!
}
}
}
if (N0.getOpcode() == ISD::SETCC) {
SDValue N00 = N0.getOperand(0);
SDValue N01 = N0.getOperand(1);
ISD::CondCode CC = cast<CondCodeSDNode>(N0.getOperand(2))->get();
EVT N00VT = N0.getOperand(0).getValueType();
// sext(setcc) -> sext_in_reg(vsetcc) for vectors.
// Only do this before legalize for now.
if (VT.isVector() && !LegalOperations &&
TLI.getBooleanContents(N00VT) ==
TargetLowering::ZeroOrNegativeOneBooleanContent) {
// On some architectures (such as SSE/NEON/etc) the SETCC result type is
// of the same size as the compared operands. Only optimize sext(setcc())
// if this is the case.
EVT SVT = getSetCCResultType(N00VT);
// We know that the # elements of the results is the same as the
// # elements of the compare (and the # elements of the compare result
// for that matter). Check to see that they are the same size. If so,
// we know that the element size of the sext'd result matches the
// element size of the compare operands.
if (VT.getSizeInBits() == SVT.getSizeInBits())
return DAG.getSetCC(DL, VT, N00, N01, CC);
// If the desired elements are smaller or larger than the source
// elements, we can use a matching integer vector type and then
// truncate/sign extend.
EVT MatchingVecType = N00VT.changeVectorElementTypeToInteger();
if (SVT == MatchingVecType) {
SDValue VsetCC = DAG.getSetCC(DL, MatchingVecType, N00, N01, CC);
return DAG.getSExtOrTrunc(VsetCC, DL, VT);
}
}
// sext(setcc x, y, cc) -> (select (setcc x, y, cc), T, 0)
// Here, T can be 1 or -1, depending on the type of the setcc and
// getBooleanContents().
unsigned SetCCWidth = N0.getScalarValueSizeInBits();
// To determine the "true" side of the select, we need to know the high bit
// of the value returned by the setcc if it evaluates to true.
// If the type of the setcc is i1, then the true case of the select is just
// sext(i1 1), that is, -1.
// If the type of the setcc is larger (say, i8) then the value of the high
// bit depends on getBooleanContents(), so ask TLI for a real "true" value
// of the appropriate width.
SDValue ExtTrueVal = (SetCCWidth == 1) ? DAG.getAllOnesConstant(DL, VT)
: TLI.getConstTrueVal(DAG, VT, DL);
SDValue Zero = DAG.getConstant(0, DL, VT);
if (SDValue SCC =
SimplifySelectCC(DL, N00, N01, ExtTrueVal, Zero, CC, true))
return SCC;
if (!VT.isVector()) {
EVT SetCCVT = getSetCCResultType(N00VT);
// Don't do this transform for i1 because there's a select transform
// that would reverse it.
// TODO: We should not do this transform at all without a target hook
// because a sext is likely cheaper than a select?
if (SetCCVT.getScalarSizeInBits() != 1 &&
(!LegalOperations || TLI.isOperationLegal(ISD::SETCC, N00VT))) {
SDValue SetCC = DAG.getSetCC(DL, SetCCVT, N00, N01, CC);
return DAG.getSelect(DL, VT, SetCC, ExtTrueVal, Zero);
}
}
}
// fold (sext x) -> (zext x) if the sign bit is known zero.
if ((!LegalOperations || TLI.isOperationLegal(ISD::ZERO_EXTEND, VT)) &&
DAG.SignBitIsZero(N0))
return DAG.getNode(ISD::ZERO_EXTEND, DL, VT, N0);
return SDValue();
}
// isTruncateOf - If N is a truncate of some other value, return true, record
// the value being truncated in Op and which of Op's bits are zero in KnownZero.
// This function computes KnownZero to avoid a duplicated call to
// computeKnownBits in the caller.
static bool isTruncateOf(SelectionDAG &DAG, SDValue N, SDValue &Op,
APInt &KnownZero) {
APInt KnownOne;
if (N->getOpcode() == ISD::TRUNCATE) {
Op = N->getOperand(0);
DAG.computeKnownBits(Op, KnownZero, KnownOne);
return true;
}
if (N->getOpcode() != ISD::SETCC || N->getValueType(0) != MVT::i1 ||
cast<CondCodeSDNode>(N->getOperand(2))->get() != ISD::SETNE)
return false;
SDValue Op0 = N->getOperand(0);
SDValue Op1 = N->getOperand(1);
assert(Op0.getValueType() == Op1.getValueType());
if (isNullConstant(Op0))
Op = Op1;
else if (isNullConstant(Op1))
Op = Op0;
else
return false;
DAG.computeKnownBits(Op, KnownZero, KnownOne);
if (!(KnownZero | APInt(Op.getValueSizeInBits(), 1)).isAllOnesValue())
return false;
return true;
}
SDValue DAGCombiner::visitZERO_EXTEND(SDNode *N) {
SDValue N0 = N->getOperand(0);
EVT VT = N->getValueType(0);
if (SDNode *Res = tryToFoldExtendOfConstant(N, TLI, DAG, LegalTypes,
LegalOperations))
return SDValue(Res, 0);
// fold (zext (zext x)) -> (zext x)
// fold (zext (aext x)) -> (zext x)
if (N0.getOpcode() == ISD::ZERO_EXTEND || N0.getOpcode() == ISD::ANY_EXTEND)
return DAG.getNode(ISD::ZERO_EXTEND, SDLoc(N), VT,
N0.getOperand(0));
// fold (zext (truncate x)) -> (zext x) or
// (zext (truncate x)) -> (truncate x)
// This is valid when the truncated bits of x are already zero.
// FIXME: We should extend this to work for vectors too.
SDValue Op;
APInt KnownZero;
if (!VT.isVector() && isTruncateOf(DAG, N0, Op, KnownZero)) {
APInt TruncatedBits =
(Op.getValueSizeInBits() == N0.getValueSizeInBits()) ?
APInt(Op.getValueSizeInBits(), 0) :
APInt::getBitsSet(Op.getValueSizeInBits(),
N0.getValueSizeInBits(),
std::min(Op.getValueSizeInBits(),
VT.getSizeInBits()));
if (TruncatedBits == (KnownZero & TruncatedBits)) {
if (VT.bitsGT(Op.getValueType()))
return DAG.getNode(ISD::ZERO_EXTEND, SDLoc(N), VT, Op);
if (VT.bitsLT(Op.getValueType()))
return DAG.getNode(ISD::TRUNCATE, SDLoc(N), VT, Op);
return Op;
}
}
// fold (zext (truncate (load x))) -> (zext (smaller load x))
// fold (zext (truncate (srl (load x), c))) -> (zext (small load (x+c/n)))
if (N0.getOpcode() == ISD::TRUNCATE) {
if (SDValue NarrowLoad = ReduceLoadWidth(N0.getNode())) {
SDNode *oye = N0.getOperand(0).getNode();
if (NarrowLoad.getNode() != N0.getNode()) {
CombineTo(N0.getNode(), NarrowLoad);
// CombineTo deleted the truncate, if needed, but not what's under it.
AddToWorklist(oye);
}
return SDValue(N, 0); // Return N so it doesn't get rechecked!
}
}
// fold (zext (truncate x)) -> (and x, mask)
if (N0.getOpcode() == ISD::TRUNCATE) {
// fold (zext (truncate (load x))) -> (zext (smaller load x))
// fold (zext (truncate (srl (load x), c))) -> (zext (smaller load (x+c/n)))
if (SDValue NarrowLoad = ReduceLoadWidth(N0.getNode())) {
SDNode *oye = N0.getOperand(0).getNode();
if (NarrowLoad.getNode() != N0.getNode()) {
CombineTo(N0.getNode(), NarrowLoad);
// CombineTo deleted the truncate, if needed, but not what's under it.
AddToWorklist(oye);
}
return SDValue(N, 0); // Return N so it doesn't get rechecked!
}
EVT SrcVT = N0.getOperand(0).getValueType();
EVT MinVT = N0.getValueType();
// Try to mask before the extension to avoid having to generate a larger mask,
// possibly over several sub-vectors.
if (SrcVT.bitsLT(VT)) {
if (!LegalOperations || (TLI.isOperationLegal(ISD::AND, SrcVT) &&
TLI.isOperationLegal(ISD::ZERO_EXTEND, VT))) {
SDValue Op = N0.getOperand(0);
Op = DAG.getZeroExtendInReg(Op, SDLoc(N), MinVT.getScalarType());
AddToWorklist(Op.getNode());
return DAG.getZExtOrTrunc(Op, SDLoc(N), VT);
}
}
if (!LegalOperations || TLI.isOperationLegal(ISD::AND, VT)) {
SDValue Op = N0.getOperand(0);
if (SrcVT.bitsLT(VT)) {
Op = DAG.getNode(ISD::ANY_EXTEND, SDLoc(N), VT, Op);
AddToWorklist(Op.getNode());
} else if (SrcVT.bitsGT(VT)) {
Op = DAG.getNode(ISD::TRUNCATE, SDLoc(N), VT, Op);
AddToWorklist(Op.getNode());
}
return DAG.getZeroExtendInReg(Op, SDLoc(N), MinVT.getScalarType());
}
}
// Fold (zext (and (trunc x), cst)) -> (and x, cst),
// if either of the casts is not free.
if (N0.getOpcode() == ISD::AND &&
N0.getOperand(0).getOpcode() == ISD::TRUNCATE &&
N0.getOperand(1).getOpcode() == ISD::Constant &&
(!TLI.isTruncateFree(N0.getOperand(0).getOperand(0).getValueType(),
N0.getValueType()) ||
!TLI.isZExtFree(N0.getValueType(), VT))) {
SDValue X = N0.getOperand(0).getOperand(0);
if (X.getValueType().bitsLT(VT)) {
X = DAG.getNode(ISD::ANY_EXTEND, SDLoc(X), VT, X);
} else if (X.getValueType().bitsGT(VT)) {
X = DAG.getNode(ISD::TRUNCATE, SDLoc(X), VT, X);
}
APInt Mask = cast<ConstantSDNode>(N0.getOperand(1))->getAPIntValue();
Mask = Mask.zext(VT.getSizeInBits());
SDLoc DL(N);
return DAG.getNode(ISD::AND, DL, VT,
X, DAG.getConstant(Mask, DL, VT));
}
// fold (zext (load x)) -> (zext (truncate (zextload x)))
// Only generate vector extloads when 1) they're legal, and 2) they are
// deemed desirable by the target.
if (ISD::isNON_EXTLoad(N0.getNode()) && ISD::isUNINDEXEDLoad(N0.getNode()) &&
((!LegalOperations && !VT.isVector() &&
!cast<LoadSDNode>(N0)->isVolatile()) ||
TLI.isLoadExtLegal(ISD::ZEXTLOAD, VT, N0.getValueType()))) {
bool DoXform = true;
SmallVector<SDNode*, 4> SetCCs;
if (!N0.hasOneUse())
DoXform = ExtendUsesToFormExtLoad(N, N0, ISD::ZERO_EXTEND, SetCCs, TLI);
if (VT.isVector())
DoXform &= TLI.isVectorLoadExtDesirable(SDValue(N, 0));
if (DoXform) {
LoadSDNode *LN0 = cast<LoadSDNode>(N0);
SDValue ExtLoad = DAG.getExtLoad(ISD::ZEXTLOAD, SDLoc(N), VT,
LN0->getChain(),
LN0->getBasePtr(), N0.getValueType(),
LN0->getMemOperand());
SDValue Trunc = DAG.getNode(ISD::TRUNCATE, SDLoc(N0),
N0.getValueType(), ExtLoad);
CombineTo(N0.getNode(), Trunc, ExtLoad.getValue(1));
ExtendSetCCUses(SetCCs, Trunc, ExtLoad, SDLoc(N),
ISD::ZERO_EXTEND);
CombineTo(N, ExtLoad);
return SDValue(N, 0); // Return N so it doesn't get rechecked!
}
}
// fold (zext (load x)) to multiple smaller zextloads.
// Only on illegal but splittable vectors.
if (SDValue ExtLoad = CombineExtLoad(N))
return ExtLoad;
// fold (zext (and/or/xor (load x), cst)) ->
// (and/or/xor (zextload x), (zext cst))
// Unless (and (load x) cst) will match as a zextload already and has
// additional users.
if ((N0.getOpcode() == ISD::AND || N0.getOpcode() == ISD::OR ||
N0.getOpcode() == ISD::XOR) &&
isa<LoadSDNode>(N0.getOperand(0)) &&
N0.getOperand(1).getOpcode() == ISD::Constant &&
TLI.isLoadExtLegal(ISD::ZEXTLOAD, VT, N0.getValueType()) &&
(!LegalOperations && TLI.isOperationLegal(N0.getOpcode(), VT))) {
LoadSDNode *LN0 = cast<LoadSDNode>(N0.getOperand(0));
if (LN0->getExtensionType() != ISD::SEXTLOAD && LN0->isUnindexed()) {
bool DoXform = true;
SmallVector<SDNode*, 4> SetCCs;
if (!N0.hasOneUse()) {
if (N0.getOpcode() == ISD::AND) {
auto *AndC = cast<ConstantSDNode>(N0.getOperand(1));
auto NarrowLoad = false;
EVT LoadResultTy = AndC->getValueType(0);
EVT ExtVT, LoadedVT;
if (isAndLoadExtLoad(AndC, LN0, LoadResultTy, ExtVT, LoadedVT,
NarrowLoad))
DoXform = false;
}
if (DoXform)
DoXform = ExtendUsesToFormExtLoad(N, N0.getOperand(0),
ISD::ZERO_EXTEND, SetCCs, TLI);
}
if (DoXform) {
SDValue ExtLoad = DAG.getExtLoad(ISD::ZEXTLOAD, SDLoc(LN0), VT,
LN0->getChain(), LN0->getBasePtr(),
LN0->getMemoryVT(),
LN0->getMemOperand());
APInt Mask = cast<ConstantSDNode>(N0.getOperand(1))->getAPIntValue();
Mask = Mask.zext(VT.getSizeInBits());
SDLoc DL(N);
SDValue And = DAG.getNode(N0.getOpcode(), DL, VT,
ExtLoad, DAG.getConstant(Mask, DL, VT));
SDValue Trunc = DAG.getNode(ISD::TRUNCATE,
SDLoc(N0.getOperand(0)),
N0.getOperand(0).getValueType(), ExtLoad);
CombineTo(N, And);
CombineTo(N0.getOperand(0).getNode(), Trunc, ExtLoad.getValue(1));
ExtendSetCCUses(SetCCs, Trunc, ExtLoad, DL,
ISD::ZERO_EXTEND);
return SDValue(N, 0); // Return N so it doesn't get rechecked!
}
}
}
// fold (zext (zextload x)) -> (zext (truncate (zextload x)))
// fold (zext ( extload x)) -> (zext (truncate (zextload x)))
if ((ISD::isZEXTLoad(N0.getNode()) || ISD::isEXTLoad(N0.getNode())) &&
ISD::isUNINDEXEDLoad(N0.getNode()) && N0.hasOneUse()) {
LoadSDNode *LN0 = cast<LoadSDNode>(N0);
EVT MemVT = LN0->getMemoryVT();
if ((!LegalOperations && !LN0->isVolatile()) ||
TLI.isLoadExtLegal(ISD::ZEXTLOAD, VT, MemVT)) {
SDValue ExtLoad = DAG.getExtLoad(ISD::ZEXTLOAD, SDLoc(N), VT,
LN0->getChain(),
LN0->getBasePtr(), MemVT,
LN0->getMemOperand());
CombineTo(N, ExtLoad);
CombineTo(N0.getNode(),
DAG.getNode(ISD::TRUNCATE, SDLoc(N0), N0.getValueType(),
ExtLoad),
ExtLoad.getValue(1));
return SDValue(N, 0); // Return N so it doesn't get rechecked!
}
}
if (N0.getOpcode() == ISD::SETCC) {
// Only do this before legalize for now.
if (!LegalOperations && VT.isVector() &&
N0.getValueType().getVectorElementType() == MVT::i1) {
EVT N00VT = N0.getOperand(0).getValueType();
if (getSetCCResultType(N00VT) == N0.getValueType())
return SDValue();
// We know that the # elements of the results is the same as the #
// elements of the compare (and the # elements of the compare result for
// that matter). Check to see that they are the same size. If so, we know
// that the element size of the sext'd result matches the element size of
// the compare operands.
SDLoc DL(N);
SDValue VecOnes = DAG.getConstant(1, DL, VT);
if (VT.getSizeInBits() == N00VT.getSizeInBits()) {
// zext(setcc) -> (and (vsetcc), (1, 1, ...) for vectors.
SDValue VSetCC = DAG.getNode(ISD::SETCC, DL, VT, N0.getOperand(0),
N0.getOperand(1), N0.getOperand(2));
return DAG.getNode(ISD::AND, DL, VT, VSetCC, VecOnes);
}
// If the desired elements are smaller or larger than the source
// elements we can use a matching integer vector type and then
// truncate/sign extend.
EVT MatchingElementType = EVT::getIntegerVT(
*DAG.getContext(), N00VT.getScalarSizeInBits());
EVT MatchingVectorType = EVT::getVectorVT(
*DAG.getContext(), MatchingElementType, N00VT.getVectorNumElements());
SDValue VsetCC =
DAG.getNode(ISD::SETCC, DL, MatchingVectorType, N0.getOperand(0),
N0.getOperand(1), N0.getOperand(2));
return DAG.getNode(ISD::AND, DL, VT, DAG.getSExtOrTrunc(VsetCC, DL, VT),
VecOnes);
}
// zext(setcc x,y,cc) -> select_cc x, y, 1, 0, cc
SDLoc DL(N);
if (SDValue SCC = SimplifySelectCC(
DL, N0.getOperand(0), N0.getOperand(1), DAG.getConstant(1, DL, VT),
DAG.getConstant(0, DL, VT),
cast<CondCodeSDNode>(N0.getOperand(2))->get(), true))
return SCC;
}
// (zext (shl (zext x), cst)) -> (shl (zext x), cst)
if ((N0.getOpcode() == ISD::SHL || N0.getOpcode() == ISD::SRL) &&
isa<ConstantSDNode>(N0.getOperand(1)) &&
N0.getOperand(0).getOpcode() == ISD::ZERO_EXTEND &&
N0.hasOneUse()) {
SDValue ShAmt = N0.getOperand(1);
unsigned ShAmtVal = cast<ConstantSDNode>(ShAmt)->getZExtValue();
if (N0.getOpcode() == ISD::SHL) {
SDValue InnerZExt = N0.getOperand(0);
// If the original shl may be shifting out bits, do not perform this
// transformation.
unsigned KnownZeroBits = InnerZExt.getValueSizeInBits() -
InnerZExt.getOperand(0).getValueSizeInBits();
if (ShAmtVal > KnownZeroBits)
return SDValue();
}
SDLoc DL(N);
// Ensure that the shift amount is wide enough for the shifted value.
if (VT.getSizeInBits() >= 256)
ShAmt = DAG.getNode(ISD::ZERO_EXTEND, DL, MVT::i32, ShAmt);
return DAG.getNode(N0.getOpcode(), DL, VT,
DAG.getNode(ISD::ZERO_EXTEND, DL, VT, N0.getOperand(0)),
ShAmt);
}
return SDValue();
}
SDValue DAGCombiner::visitANY_EXTEND(SDNode *N) {
SDValue N0 = N->getOperand(0);
EVT VT = N->getValueType(0);
if (SDNode *Res = tryToFoldExtendOfConstant(N, TLI, DAG, LegalTypes,
LegalOperations))
return SDValue(Res, 0);
// fold (aext (aext x)) -> (aext x)
// fold (aext (zext x)) -> (zext x)
// fold (aext (sext x)) -> (sext x)
if (N0.getOpcode() == ISD::ANY_EXTEND ||
N0.getOpcode() == ISD::ZERO_EXTEND ||
N0.getOpcode() == ISD::SIGN_EXTEND)
return DAG.getNode(N0.getOpcode(), SDLoc(N), VT, N0.getOperand(0));
// fold (aext (truncate (load x))) -> (aext (smaller load x))
// fold (aext (truncate (srl (load x), c))) -> (aext (small load (x+c/n)))
if (N0.getOpcode() == ISD::TRUNCATE) {
if (SDValue NarrowLoad = ReduceLoadWidth(N0.getNode())) {
SDNode *oye = N0.getOperand(0).getNode();
if (NarrowLoad.getNode() != N0.getNode()) {
CombineTo(N0.getNode(), NarrowLoad);
// CombineTo deleted the truncate, if needed, but not what's under it.
AddToWorklist(oye);
}
return SDValue(N, 0); // Return N so it doesn't get rechecked!
}
}
// fold (aext (truncate x))
if (N0.getOpcode() == ISD::TRUNCATE) {
SDValue TruncOp = N0.getOperand(0);
if (TruncOp.getValueType() == VT)
return TruncOp; // x iff x size == zext size.
if (TruncOp.getValueType().bitsGT(VT))
return DAG.getNode(ISD::TRUNCATE, SDLoc(N), VT, TruncOp);
return DAG.getNode(ISD::ANY_EXTEND, SDLoc(N), VT, TruncOp);
}
// Fold (aext (and (trunc x), cst)) -> (and x, cst)
// if the trunc is not free.
if (N0.getOpcode() == ISD::AND &&
N0.getOperand(0).getOpcode() == ISD::TRUNCATE &&
N0.getOperand(1).getOpcode() == ISD::Constant &&
!TLI.isTruncateFree(N0.getOperand(0).getOperand(0).getValueType(),
N0.getValueType())) {
SDLoc DL(N);
SDValue X = N0.getOperand(0).getOperand(0);
if (X.getValueType().bitsLT(VT)) {
X = DAG.getNode(ISD::ANY_EXTEND, DL, VT, X);
} else if (X.getValueType().bitsGT(VT)) {
X = DAG.getNode(ISD::TRUNCATE, DL, VT, X);
}
APInt Mask = cast<ConstantSDNode>(N0.getOperand(1))->getAPIntValue();
Mask = Mask.zext(VT.getSizeInBits());
return DAG.getNode(ISD::AND, DL, VT,
X, DAG.getConstant(Mask, DL, VT));
}
// fold (aext (load x)) -> (aext (truncate (extload x)))
// None of the supported targets knows how to perform load and any_ext
// on vectors in one instruction. We only perform this transformation on
// scalars.
if (ISD::isNON_EXTLoad(N0.getNode()) && !VT.isVector() &&
ISD::isUNINDEXEDLoad(N0.getNode()) &&
TLI.isLoadExtLegal(ISD::EXTLOAD, VT, N0.getValueType())) {
bool DoXform = true;
SmallVector<SDNode*, 4> SetCCs;
if (!N0.hasOneUse())
DoXform = ExtendUsesToFormExtLoad(N, N0, ISD::ANY_EXTEND, SetCCs, TLI);
if (DoXform) {
LoadSDNode *LN0 = cast<LoadSDNode>(N0);
SDValue ExtLoad = DAG.getExtLoad(ISD::EXTLOAD, SDLoc(N), VT,
LN0->getChain(),
LN0->getBasePtr(), N0.getValueType(),
LN0->getMemOperand());
CombineTo(N, ExtLoad);
SDValue Trunc = DAG.getNode(ISD::TRUNCATE, SDLoc(N0),
N0.getValueType(), ExtLoad);
CombineTo(N0.getNode(), Trunc, ExtLoad.getValue(1));
ExtendSetCCUses(SetCCs, Trunc, ExtLoad, SDLoc(N),
ISD::ANY_EXTEND);
return SDValue(N, 0); // Return N so it doesn't get rechecked!
}
}
// fold (aext (zextload x)) -> (aext (truncate (zextload x)))
// fold (aext (sextload x)) -> (aext (truncate (sextload x)))
// fold (aext ( extload x)) -> (aext (truncate (extload x)))
if (N0.getOpcode() == ISD::LOAD &&
!ISD::isNON_EXTLoad(N0.getNode()) && ISD::isUNINDEXEDLoad(N0.getNode()) &&
N0.hasOneUse()) {
LoadSDNode *LN0 = cast<LoadSDNode>(N0);
ISD::LoadExtType ExtType = LN0->getExtensionType();
EVT MemVT = LN0->getMemoryVT();
if (!LegalOperations || TLI.isLoadExtLegal(ExtType, VT, MemVT)) {
SDValue ExtLoad = DAG.getExtLoad(ExtType, SDLoc(N),
VT, LN0->getChain(), LN0->getBasePtr(),
MemVT, LN0->getMemOperand());
CombineTo(N, ExtLoad);
CombineTo(N0.getNode(),
DAG.getNode(ISD::TRUNCATE, SDLoc(N0),
N0.getValueType(), ExtLoad),
ExtLoad.getValue(1));
return SDValue(N, 0); // Return N so it doesn't get rechecked!
}
}
if (N0.getOpcode() == ISD::SETCC) {
// For vectors:
// aext(setcc) -> vsetcc
// aext(setcc) -> truncate(vsetcc)
// aext(setcc) -> aext(vsetcc)
// Only do this before legalize for now.
if (VT.isVector() && !LegalOperations) {
EVT N0VT = N0.getOperand(0).getValueType();
// We know that the # elements of the results is the same as the
// # elements of the compare (and the # elements of the compare result
// for that matter). Check to see that they are the same size. If so,
// we know that the element size of the sext'd result matches the
// element size of the compare operands.
if (VT.getSizeInBits() == N0VT.getSizeInBits())
return DAG.getSetCC(SDLoc(N), VT, N0.getOperand(0),
N0.getOperand(1),
cast<CondCodeSDNode>(N0.getOperand(2))->get());
// If the desired elements are smaller or larger than the source
// elements we can use a matching integer vector type and then
// truncate/any extend
else {
EVT MatchingVectorType = N0VT.changeVectorElementTypeToInteger();
SDValue VsetCC =
DAG.getSetCC(SDLoc(N), MatchingVectorType, N0.getOperand(0),
N0.getOperand(1),
cast<CondCodeSDNode>(N0.getOperand(2))->get());
return DAG.getAnyExtOrTrunc(VsetCC, SDLoc(N), VT);
}
}
// aext(setcc x,y,cc) -> select_cc x, y, 1, 0, cc
SDLoc DL(N);
if (SDValue SCC = SimplifySelectCC(
DL, N0.getOperand(0), N0.getOperand(1), DAG.getConstant(1, DL, VT),
DAG.getConstant(0, DL, VT),
cast<CondCodeSDNode>(N0.getOperand(2))->get(), true))
return SCC;
}
return SDValue();
}
SDValue DAGCombiner::visitAssertZext(SDNode *N) {
SDValue N0 = N->getOperand(0);
SDValue N1 = N->getOperand(1);
EVT EVT = cast<VTSDNode>(N1)->getVT();
// fold (assertzext (assertzext x, vt), vt) -> (assertzext x, vt)
if (N0.getOpcode() == ISD::AssertZext &&
EVT == cast<VTSDNode>(N0.getOperand(1))->getVT())
return N0;
return SDValue();
}
/// See if the specified operand can be simplified with the knowledge that only
/// the bits specified by Mask are used. If so, return the simpler operand,
/// otherwise return a null SDValue.
///
/// (This exists alongside SimplifyDemandedBits because GetDemandedBits can
/// simplify nodes with multiple uses more aggressively.)
SDValue DAGCombiner::GetDemandedBits(SDValue V, const APInt &Mask) {
switch (V.getOpcode()) {
default: break;
case ISD::Constant: {
const ConstantSDNode *CV = cast<ConstantSDNode>(V.getNode());
assert(CV && "Const value should be ConstSDNode.");
const APInt &CVal = CV->getAPIntValue();
APInt NewVal = CVal & Mask;
if (NewVal != CVal)
return DAG.getConstant(NewVal, SDLoc(V), V.getValueType());
break;
}
case ISD::OR:
case ISD::XOR:
// If the LHS or RHS don't contribute bits to the or, drop them.
if (DAG.MaskedValueIsZero(V.getOperand(0), Mask))
return V.getOperand(1);
if (DAG.MaskedValueIsZero(V.getOperand(1), Mask))
return V.getOperand(0);
break;
case ISD::SRL:
// Only look at single-use SRLs.
if (!V.getNode()->hasOneUse())
break;
if (ConstantSDNode *RHSC = getAsNonOpaqueConstant(V.getOperand(1))) {
// See if we can recursively simplify the LHS.
unsigned Amt = RHSC->getZExtValue();
// Watch out for shift count overflow though.
if (Amt >= Mask.getBitWidth()) break;
APInt NewMask = Mask << Amt;
if (SDValue SimplifyLHS = GetDemandedBits(V.getOperand(0), NewMask))
return DAG.getNode(ISD::SRL, SDLoc(V), V.getValueType(),
SimplifyLHS, V.getOperand(1));
}
break;
case ISD::AND: {
// X & -1 -> X (ignoring bits which aren't demanded).
ConstantSDNode *AndVal = isConstOrConstSplat(V.getOperand(1));
if (AndVal && (AndVal->getAPIntValue() & Mask) == Mask)
return V.getOperand(0);
break;
}
}
return SDValue();
}
/// If the result of a wider load is shifted to right of N bits and then
/// truncated to a narrower type and where N is a multiple of number of bits of
/// the narrower type, transform it to a narrower load from address + N / num of
/// bits of new type. If the result is to be extended, also fold the extension
/// to form a extending load.
SDValue DAGCombiner::ReduceLoadWidth(SDNode *N) {
unsigned Opc = N->getOpcode();
ISD::LoadExtType ExtType = ISD::NON_EXTLOAD;
SDValue N0 = N->getOperand(0);
EVT VT = N->getValueType(0);
EVT ExtVT = VT;
// This transformation isn't valid for vector loads.
if (VT.isVector())
return SDValue();
// Special case: SIGN_EXTEND_INREG is basically truncating to ExtVT then
// extended to VT.
if (Opc == ISD::SIGN_EXTEND_INREG) {
ExtType = ISD::SEXTLOAD;
ExtVT = cast<VTSDNode>(N->getOperand(1))->getVT();
} else if (Opc == ISD::SRL) {
// Another special-case: SRL is basically zero-extending a narrower value.
ExtType = ISD::ZEXTLOAD;
N0 = SDValue(N, 0);
ConstantSDNode *N01 = dyn_cast<ConstantSDNode>(N0.getOperand(1));
if (!N01) return SDValue();
ExtVT = EVT::getIntegerVT(*DAG.getContext(),
VT.getSizeInBits() - N01->getZExtValue());
}
if (LegalOperations && !TLI.isLoadExtLegal(ExtType, VT, ExtVT))
return SDValue();
unsigned EVTBits = ExtVT.getSizeInBits();
// Do not generate loads of non-round integer types since these can
// be expensive (and would be wrong if the type is not byte sized).
if (!ExtVT.isRound())
return SDValue();
unsigned ShAmt = 0;
if (N0.getOpcode() == ISD::SRL && N0.hasOneUse()) {
if (ConstantSDNode *N01 = dyn_cast<ConstantSDNode>(N0.getOperand(1))) {
ShAmt = N01->getZExtValue();
// Is the shift amount a multiple of size of VT?
if ((ShAmt & (EVTBits-1)) == 0) {
N0 = N0.getOperand(0);
// Is the load width a multiple of size of VT?
if ((N0.getValueSizeInBits() & (EVTBits-1)) != 0)
return SDValue();
}
// At this point, we must have a load or else we can't do the transform.
if (!isa<LoadSDNode>(N0)) return SDValue();
// Because a SRL must be assumed to *need* to zero-extend the high bits
// (as opposed to anyext the high bits), we can't combine the zextload
// lowering of SRL and an sextload.
if (cast<LoadSDNode>(N0)->getExtensionType() == ISD::SEXTLOAD)
return SDValue();
// If the shift amount is larger than the input type then we're not
// accessing any of the loaded bytes. If the load was a zextload/extload
// then the result of the shift+trunc is zero/undef (handled elsewhere).
if (ShAmt >= cast<LoadSDNode>(N0)->getMemoryVT().getSizeInBits())
return SDValue();
}
}
// If the load is shifted left (and the result isn't shifted back right),
// we can fold the truncate through the shift.
unsigned ShLeftAmt = 0;
if (ShAmt == 0 && N0.getOpcode() == ISD::SHL && N0.hasOneUse() &&
ExtVT == VT && TLI.isNarrowingProfitable(N0.getValueType(), VT)) {
if (ConstantSDNode *N01 = dyn_cast<ConstantSDNode>(N0.getOperand(1))) {
ShLeftAmt = N01->getZExtValue();
N0 = N0.getOperand(0);
}
}
// If we haven't found a load, we can't narrow it. Don't transform one with
// multiple uses, this would require adding a new load.
if (!isa<LoadSDNode>(N0) || !N0.hasOneUse())
return SDValue();
// Don't change the width of a volatile load.
LoadSDNode *LN0 = cast<LoadSDNode>(N0);
if (LN0->isVolatile())
return SDValue();
// Verify that we are actually reducing a load width here.
if (LN0->getMemoryVT().getSizeInBits() < EVTBits)
return SDValue();
// For the transform to be legal, the load must produce only two values
// (the value loaded and the chain). Don't transform a pre-increment
// load, for example, which produces an extra value. Otherwise the
// transformation is not equivalent, and the downstream logic to replace
// uses gets things wrong.
if (LN0->getNumValues() > 2)
return SDValue();
// If the load that we're shrinking is an extload and we're not just
// discarding the extension we can't simply shrink the load. Bail.
// TODO: It would be possible to merge the extensions in some cases.
if (LN0->getExtensionType() != ISD::NON_EXTLOAD &&
LN0->getMemoryVT().getSizeInBits() < ExtVT.getSizeInBits() + ShAmt)
return SDValue();
if (!TLI.shouldReduceLoadWidth(LN0, ExtType, ExtVT))
return SDValue();
EVT PtrType = N0.getOperand(1).getValueType();
if (PtrType == MVT::Untyped || PtrType.isExtended())
// It's not possible to generate a constant of extended or untyped type.
return SDValue();
// For big endian targets, we need to adjust the offset to the pointer to
// load the correct bytes.
if (DAG.getDataLayout().isBigEndian()) {
unsigned LVTStoreBits = LN0->getMemoryVT().getStoreSizeInBits();
unsigned EVTStoreBits = ExtVT.getStoreSizeInBits();
ShAmt = LVTStoreBits - EVTStoreBits - ShAmt;
}
uint64_t PtrOff = ShAmt / 8;
unsigned NewAlign = MinAlign(LN0->getAlignment(), PtrOff);
SDLoc DL(LN0);
// The original load itself didn't wrap, so an offset within it doesn't.
SDNodeFlags Flags;
Flags.setNoUnsignedWrap(true);
SDValue NewPtr = DAG.getNode(ISD::ADD, DL,
PtrType, LN0->getBasePtr(),
DAG.getConstant(PtrOff, DL, PtrType),
&Flags);
AddToWorklist(NewPtr.getNode());
SDValue Load;
if (ExtType == ISD::NON_EXTLOAD)
Load = DAG.getLoad(VT, SDLoc(N0), LN0->getChain(), NewPtr,
LN0->getPointerInfo().getWithOffset(PtrOff), NewAlign,
LN0->getMemOperand()->getFlags(), LN0->getAAInfo());
else
Load = DAG.getExtLoad(ExtType, SDLoc(N0), VT, LN0->getChain(), NewPtr,
LN0->getPointerInfo().getWithOffset(PtrOff), ExtVT,
NewAlign, LN0->getMemOperand()->getFlags(),
LN0->getAAInfo());
// Replace the old load's chain with the new load's chain.
WorklistRemover DeadNodes(*this);
DAG.ReplaceAllUsesOfValueWith(N0.getValue(1), Load.getValue(1));
// Shift the result left, if we've swallowed a left shift.
SDValue Result = Load;
if (ShLeftAmt != 0) {
EVT ShImmTy = getShiftAmountTy(Result.getValueType());
if (!isUIntN(ShImmTy.getSizeInBits(), ShLeftAmt))
ShImmTy = VT;
// If the shift amount is as large as the result size (but, presumably,
// no larger than the source) then the useful bits of the result are
// zero; we can't simply return the shortened shift, because the result
// of that operation is undefined.
SDLoc DL(N0);
if (ShLeftAmt >= VT.getSizeInBits())
Result = DAG.getConstant(0, DL, VT);
else
Result = DAG.getNode(ISD::SHL, DL, VT,
Result, DAG.getConstant(ShLeftAmt, DL, ShImmTy));
}
// Return the new loaded value.
return Result;
}
SDValue DAGCombiner::visitSIGN_EXTEND_INREG(SDNode *N) {
SDValue N0 = N->getOperand(0);
SDValue N1 = N->getOperand(1);
EVT VT = N->getValueType(0);
EVT EVT = cast<VTSDNode>(N1)->getVT();
unsigned VTBits = VT.getScalarSizeInBits();
unsigned EVTBits = EVT.getScalarSizeInBits();
if (N0.isUndef())
return DAG.getUNDEF(VT);
// fold (sext_in_reg c1) -> c1
if (DAG.isConstantIntBuildVectorOrConstantInt(N0))
return DAG.getNode(ISD::SIGN_EXTEND_INREG, SDLoc(N), VT, N0, N1);
// If the input is already sign extended, just drop the extension.
if (DAG.ComputeNumSignBits(N0) >= VTBits-EVTBits+1)
return N0;
// fold (sext_in_reg (sext_in_reg x, VT2), VT1) -> (sext_in_reg x, minVT) pt2
if (N0.getOpcode() == ISD::SIGN_EXTEND_INREG &&
EVT.bitsLT(cast<VTSDNode>(N0.getOperand(1))->getVT()))
return DAG.getNode(ISD::SIGN_EXTEND_INREG, SDLoc(N), VT,
N0.getOperand(0), N1);
// fold (sext_in_reg (sext x)) -> (sext x)
// fold (sext_in_reg (aext x)) -> (sext x)
// if x is small enough.
if (N0.getOpcode() == ISD::SIGN_EXTEND || N0.getOpcode() == ISD::ANY_EXTEND) {
SDValue N00 = N0.getOperand(0);
if (N00.getScalarValueSizeInBits() <= EVTBits &&
(!LegalOperations || TLI.isOperationLegal(ISD::SIGN_EXTEND, VT)))
return DAG.getNode(ISD::SIGN_EXTEND, SDLoc(N), VT, N00, N1);
}
// fold (sext_in_reg (*_extend_vector_inreg x)) -> (sext_vector_in_reg x)
if ((N0.getOpcode() == ISD::ANY_EXTEND_VECTOR_INREG ||
N0.getOpcode() == ISD::SIGN_EXTEND_VECTOR_INREG ||
N0.getOpcode() == ISD::ZERO_EXTEND_VECTOR_INREG) &&
N0.getOperand(0).getScalarValueSizeInBits() == EVTBits) {
if (!LegalOperations ||
TLI.isOperationLegal(ISD::SIGN_EXTEND_VECTOR_INREG, VT))
return DAG.getSignExtendVectorInReg(N0.getOperand(0), SDLoc(N), VT);
}
// fold (sext_in_reg (zext x)) -> (sext x)
// iff we are extending the source sign bit.
if (N0.getOpcode() == ISD::ZERO_EXTEND) {
SDValue N00 = N0.getOperand(0);
if (N00.getScalarValueSizeInBits() == EVTBits &&
(!LegalOperations || TLI.isOperationLegal(ISD::SIGN_EXTEND, VT)))
return DAG.getNode(ISD::SIGN_EXTEND, SDLoc(N), VT, N00, N1);
}
// fold (sext_in_reg x) -> (zext_in_reg x) if the sign bit is known zero.
if (DAG.MaskedValueIsZero(N0, APInt::getOneBitSet(VTBits, EVTBits - 1)))
return DAG.getZeroExtendInReg(N0, SDLoc(N), EVT.getScalarType());
// fold operands of sext_in_reg based on knowledge that the top bits are not
// demanded.
if (SimplifyDemandedBits(SDValue(N, 0)))
return SDValue(N, 0);
// fold (sext_in_reg (load x)) -> (smaller sextload x)
// fold (sext_in_reg (srl (load x), c)) -> (smaller sextload (x+c/evtbits))
if (SDValue NarrowLoad = ReduceLoadWidth(N))
return NarrowLoad;
// fold (sext_in_reg (srl X, 24), i8) -> (sra X, 24)
// fold (sext_in_reg (srl X, 23), i8) -> (sra X, 23) iff possible.
// We already fold "(sext_in_reg (srl X, 25), i8) -> srl X, 25" above.
if (N0.getOpcode() == ISD::SRL) {
if (ConstantSDNode *ShAmt = dyn_cast<ConstantSDNode>(N0.getOperand(1)))
if (ShAmt->getZExtValue()+EVTBits <= VTBits) {
// We can turn this into an SRA iff the input to the SRL is already sign
// extended enough.
unsigned InSignBits = DAG.ComputeNumSignBits(N0.getOperand(0));
if (VTBits-(ShAmt->getZExtValue()+EVTBits) < InSignBits)
return DAG.getNode(ISD::SRA, SDLoc(N), VT,
N0.getOperand(0), N0.getOperand(1));
}
}
// fold (sext_inreg (extload x)) -> (sextload x)
if (ISD::isEXTLoad(N0.getNode()) &&
ISD::isUNINDEXEDLoad(N0.getNode()) &&
EVT == cast<LoadSDNode>(N0)->getMemoryVT() &&
((!LegalOperations && !cast<LoadSDNode>(N0)->isVolatile()) ||
TLI.isLoadExtLegal(ISD::SEXTLOAD, VT, EVT))) {
LoadSDNode *LN0 = cast<LoadSDNode>(N0);
SDValue ExtLoad = DAG.getExtLoad(ISD::SEXTLOAD, SDLoc(N), VT,
LN0->getChain(),
LN0->getBasePtr(), EVT,
LN0->getMemOperand());
CombineTo(N, ExtLoad);
CombineTo(N0.getNode(), ExtLoad, ExtLoad.getValue(1));
AddToWorklist(ExtLoad.getNode());
return SDValue(N, 0); // Return N so it doesn't get rechecked!
}
// fold (sext_inreg (zextload x)) -> (sextload x) iff load has one use
if (ISD::isZEXTLoad(N0.getNode()) && ISD::isUNINDEXEDLoad(N0.getNode()) &&
N0.hasOneUse() &&
EVT == cast<LoadSDNode>(N0)->getMemoryVT() &&
((!LegalOperations && !cast<LoadSDNode>(N0)->isVolatile()) ||
TLI.isLoadExtLegal(ISD::SEXTLOAD, VT, EVT))) {
LoadSDNode *LN0 = cast<LoadSDNode>(N0);
SDValue ExtLoad = DAG.getExtLoad(ISD::SEXTLOAD, SDLoc(N), VT,
LN0->getChain(),
LN0->getBasePtr(), EVT,
LN0->getMemOperand());
CombineTo(N, ExtLoad);
CombineTo(N0.getNode(), ExtLoad, ExtLoad.getValue(1));
return SDValue(N, 0); // Return N so it doesn't get rechecked!
}
// Form (sext_inreg (bswap >> 16)) or (sext_inreg (rotl (bswap) 16))
if (EVTBits <= 16 && N0.getOpcode() == ISD::OR) {
if (SDValue BSwap = MatchBSwapHWordLow(N0.getNode(), N0.getOperand(0),
N0.getOperand(1), false))
return DAG.getNode(ISD::SIGN_EXTEND_INREG, SDLoc(N), VT,
BSwap, N1);
}
return SDValue();
}
SDValue DAGCombiner::visitSIGN_EXTEND_VECTOR_INREG(SDNode *N) {
SDValue N0 = N->getOperand(0);
EVT VT = N->getValueType(0);
if (N0.isUndef())
return DAG.getUNDEF(VT);
if (SDNode *Res = tryToFoldExtendOfConstant(N, TLI, DAG, LegalTypes,
LegalOperations))
return SDValue(Res, 0);
return SDValue();
}
SDValue DAGCombiner::visitZERO_EXTEND_VECTOR_INREG(SDNode *N) {
SDValue N0 = N->getOperand(0);
EVT VT = N->getValueType(0);
if (N0.isUndef())
return DAG.getUNDEF(VT);
if (SDNode *Res = tryToFoldExtendOfConstant(N, TLI, DAG, LegalTypes,
LegalOperations))
return SDValue(Res, 0);
return SDValue();
}
SDValue DAGCombiner::visitTRUNCATE(SDNode *N) {
SDValue N0 = N->getOperand(0);
EVT VT = N->getValueType(0);
bool isLE = DAG.getDataLayout().isLittleEndian();
// noop truncate
if (N0.getValueType() == N->getValueType(0))
return N0;
// fold (truncate c1) -> c1
if (DAG.isConstantIntBuildVectorOrConstantInt(N0))
return DAG.getNode(ISD::TRUNCATE, SDLoc(N), VT, N0);
// fold (truncate (truncate x)) -> (truncate x)
if (N0.getOpcode() == ISD::TRUNCATE)
return DAG.getNode(ISD::TRUNCATE, SDLoc(N), VT, N0.getOperand(0));
// fold (truncate (ext x)) -> (ext x) or (truncate x) or x
if (N0.getOpcode() == ISD::ZERO_EXTEND ||
N0.getOpcode() == ISD::SIGN_EXTEND ||
N0.getOpcode() == ISD::ANY_EXTEND) {
// if the source is smaller than the dest, we still need an extend.
if (N0.getOperand(0).getValueType().bitsLT(VT))
return DAG.getNode(N0.getOpcode(), SDLoc(N), VT, N0.getOperand(0));
// if the source is larger than the dest, than we just need the truncate.
if (N0.getOperand(0).getValueType().bitsGT(VT))
return DAG.getNode(ISD::TRUNCATE, SDLoc(N), VT, N0.getOperand(0));
// if the source and dest are the same type, we can drop both the extend
// and the truncate.
return N0.getOperand(0);
}
// If this is anyext(trunc), don't fold it, allow ourselves to be folded.
if (N->hasOneUse() && (N->use_begin()->getOpcode() == ISD::ANY_EXTEND))
return SDValue();
// Fold extract-and-trunc into a narrow extract. For example:
// i64 x = EXTRACT_VECTOR_ELT(v2i64 val, i32 1)
// i32 y = TRUNCATE(i64 x)
// -- becomes --
// v16i8 b = BITCAST (v2i64 val)
// i8 x = EXTRACT_VECTOR_ELT(v16i8 b, i32 8)
//
// Note: We only run this optimization after type legalization (which often
// creates this pattern) and before operation legalization after which
// we need to be more careful about the vector instructions that we generate.
if (N0.getOpcode() == ISD::EXTRACT_VECTOR_ELT &&
LegalTypes && !LegalOperations && N0->hasOneUse() && VT != MVT::i1) {
EVT VecTy = N0.getOperand(0).getValueType();
EVT ExTy = N0.getValueType();
EVT TrTy = N->getValueType(0);
unsigned NumElem = VecTy.getVectorNumElements();
unsigned SizeRatio = ExTy.getSizeInBits()/TrTy.getSizeInBits();
EVT NVT = EVT::getVectorVT(*DAG.getContext(), TrTy, SizeRatio * NumElem);
assert(NVT.getSizeInBits() == VecTy.getSizeInBits() && "Invalid Size");
SDValue EltNo = N0->getOperand(1);
if (isa<ConstantSDNode>(EltNo) && isTypeLegal(NVT)) {
int Elt = cast<ConstantSDNode>(EltNo)->getZExtValue();
EVT IndexTy = TLI.getVectorIdxTy(DAG.getDataLayout());
int Index = isLE ? (Elt*SizeRatio) : (Elt*SizeRatio + (SizeRatio-1));
SDLoc DL(N);
return DAG.getNode(ISD::EXTRACT_VECTOR_ELT, DL, TrTy,
DAG.getBitcast(NVT, N0.getOperand(0)),
DAG.getConstant(Index, DL, IndexTy));
}
}
// trunc (select c, a, b) -> select c, (trunc a), (trunc b)
if (N0.getOpcode() == ISD::SELECT && N0.hasOneUse()) {
EVT SrcVT = N0.getValueType();
if ((!LegalOperations || TLI.isOperationLegal(ISD::SELECT, SrcVT)) &&
TLI.isTruncateFree(SrcVT, VT)) {
SDLoc SL(N0);
SDValue Cond = N0.getOperand(0);
SDValue TruncOp0 = DAG.getNode(ISD::TRUNCATE, SL, VT, N0.getOperand(1));
SDValue TruncOp1 = DAG.getNode(ISD::TRUNCATE, SL, VT, N0.getOperand(2));
return DAG.getNode(ISD::SELECT, SDLoc(N), VT, Cond, TruncOp0, TruncOp1);
}
}
// trunc (shl x, K) -> shl (trunc x), K => K < VT.getScalarSizeInBits()
if (N0.getOpcode() == ISD::SHL && N0.hasOneUse() &&
(!LegalOperations || TLI.isOperationLegalOrCustom(ISD::SHL, VT)) &&
TLI.isTypeDesirableForOp(ISD::SHL, VT)) {
if (const ConstantSDNode *CAmt = isConstOrConstSplat(N0.getOperand(1))) {
uint64_t Amt = CAmt->getZExtValue();
unsigned Size = VT.getScalarSizeInBits();
if (Amt < Size) {
SDLoc SL(N);
EVT AmtVT = TLI.getShiftAmountTy(VT, DAG.getDataLayout());
SDValue Trunc = DAG.getNode(ISD::TRUNCATE, SL, VT, N0.getOperand(0));
return DAG.getNode(ISD::SHL, SL, VT, Trunc,
DAG.getConstant(Amt, SL, AmtVT));
}
}
}
// Fold a series of buildvector, bitcast, and truncate if possible.
// For example fold
// (2xi32 trunc (bitcast ((4xi32)buildvector x, x, y, y) 2xi64)) to
// (2xi32 (buildvector x, y)).
if (Level == AfterLegalizeVectorOps && VT.isVector() &&
N0.getOpcode() == ISD::BITCAST && N0.hasOneUse() &&
N0.getOperand(0).getOpcode() == ISD::BUILD_VECTOR &&
N0.getOperand(0).hasOneUse()) {
SDValue BuildVect = N0.getOperand(0);
EVT BuildVectEltTy = BuildVect.getValueType().getVectorElementType();
EVT TruncVecEltTy = VT.getVectorElementType();
// Check that the element types match.
if (BuildVectEltTy == TruncVecEltTy) {
// Now we only need to compute the offset of the truncated elements.
unsigned BuildVecNumElts = BuildVect.getNumOperands();
unsigned TruncVecNumElts = VT.getVectorNumElements();
unsigned TruncEltOffset = BuildVecNumElts / TruncVecNumElts;
assert((BuildVecNumElts % TruncVecNumElts) == 0 &&
"Invalid number of elements");
SmallVector<SDValue, 8> Opnds;
for (unsigned i = 0, e = BuildVecNumElts; i != e; i += TruncEltOffset)
Opnds.push_back(BuildVect.getOperand(i));
return DAG.getBuildVector(VT, SDLoc(N), Opnds);
}
}
// See if we can simplify the input to this truncate through knowledge that
// only the low bits are being used.
// For example "trunc (or (shl x, 8), y)" // -> trunc y
// Currently we only perform this optimization on scalars because vectors
// may have different active low bits.
if (!VT.isVector()) {
if (SDValue Shorter =
GetDemandedBits(N0, APInt::getLowBitsSet(N0.getValueSizeInBits(),
VT.getSizeInBits())))
return DAG.getNode(ISD::TRUNCATE, SDLoc(N), VT, Shorter);
}
// fold (truncate (load x)) -> (smaller load x)
// fold (truncate (srl (load x), c)) -> (smaller load (x+c/evtbits))
if (!LegalTypes || TLI.isTypeDesirableForOp(N0.getOpcode(), VT)) {
if (SDValue Reduced = ReduceLoadWidth(N))
return Reduced;
// Handle the case where the load remains an extending load even
// after truncation.
if (N0.hasOneUse() && ISD::isUNINDEXEDLoad(N0.getNode())) {
LoadSDNode *LN0 = cast<LoadSDNode>(N0);
if (!LN0->isVolatile() &&
LN0->getMemoryVT().getStoreSizeInBits() < VT.getSizeInBits()) {
SDValue NewLoad = DAG.getExtLoad(LN0->getExtensionType(), SDLoc(LN0),
VT, LN0->getChain(), LN0->getBasePtr(),
LN0->getMemoryVT(),
LN0->getMemOperand());
DAG.ReplaceAllUsesOfValueWith(N0.getValue(1), NewLoad.getValue(1));
return NewLoad;
}
}
}
// fold (trunc (concat ... x ...)) -> (concat ..., (trunc x), ...)),
// where ... are all 'undef'.
if (N0.getOpcode() == ISD::CONCAT_VECTORS && !LegalTypes) {
SmallVector<EVT, 8> VTs;
SDValue V;
unsigned Idx = 0;
unsigned NumDefs = 0;
for (unsigned i = 0, e = N0.getNumOperands(); i != e; ++i) {
SDValue X = N0.getOperand(i);
if (!X.isUndef()) {
V = X;
Idx = i;
NumDefs++;
}
// Stop if more than one members are non-undef.
if (NumDefs > 1)
break;
VTs.push_back(EVT::getVectorVT(*DAG.getContext(),
VT.getVectorElementType(),
X.getValueType().getVectorNumElements()));
}
if (NumDefs == 0)
return DAG.getUNDEF(VT);
if (NumDefs == 1) {
assert(V.getNode() && "The single defined operand is empty!");
SmallVector<SDValue, 8> Opnds;
for (unsigned i = 0, e = VTs.size(); i != e; ++i) {
if (i != Idx) {
Opnds.push_back(DAG.getUNDEF(VTs[i]));
continue;
}
SDValue NV = DAG.getNode(ISD::TRUNCATE, SDLoc(V), VTs[i], V);
AddToWorklist(NV.getNode());
Opnds.push_back(NV);
}
return DAG.getNode(ISD::CONCAT_VECTORS, SDLoc(N), VT, Opnds);
}
}
// Fold truncate of a bitcast of a vector to an extract of the low vector
// element.
//
// e.g. trunc (i64 (bitcast v2i32:x)) -> extract_vector_elt v2i32:x, 0
if (N0.getOpcode() == ISD::BITCAST && !VT.isVector()) {
SDValue VecSrc = N0.getOperand(0);
EVT SrcVT = VecSrc.getValueType();
if (SrcVT.isVector() && SrcVT.getScalarType() == VT &&
(!LegalOperations ||
TLI.isOperationLegal(ISD::EXTRACT_VECTOR_ELT, SrcVT))) {
SDLoc SL(N);
EVT IdxVT = TLI.getVectorIdxTy(DAG.getDataLayout());
return DAG.getNode(ISD::EXTRACT_VECTOR_ELT, SL, VT,
VecSrc, DAG.getConstant(0, SL, IdxVT));
}
}
// Simplify the operands using demanded-bits information.
if (!VT.isVector() &&
SimplifyDemandedBits(SDValue(N, 0)))
return SDValue(N, 0);
// (trunc adde(X, Y, Carry)) -> (adde trunc(X), trunc(Y), Carry)
// When the adde's carry is not used.
if (N0.getOpcode() == ISD::ADDE && N0.hasOneUse() &&
!N0.getNode()->hasAnyUseOfValue(1) &&
(!LegalOperations || TLI.isOperationLegal(ISD::ADDE, VT))) {
SDLoc SL(N);
auto X = DAG.getNode(ISD::TRUNCATE, SL, VT, N0.getOperand(0));
auto Y = DAG.getNode(ISD::TRUNCATE, SL, VT, N0.getOperand(1));
return DAG.getNode(ISD::ADDE, SL, DAG.getVTList(VT, MVT::Glue),
X, Y, N0.getOperand(2));
}
return SDValue();
}
static SDNode *getBuildPairElt(SDNode *N, unsigned i) {
SDValue Elt = N->getOperand(i);
if (Elt.getOpcode() != ISD::MERGE_VALUES)
return Elt.getNode();
return Elt.getOperand(Elt.getResNo()).getNode();
}
/// build_pair (load, load) -> load
/// if load locations are consecutive.
SDValue DAGCombiner::CombineConsecutiveLoads(SDNode *N, EVT VT) {
assert(N->getOpcode() == ISD::BUILD_PAIR);
LoadSDNode *LD1 = dyn_cast<LoadSDNode>(getBuildPairElt(N, 0));
LoadSDNode *LD2 = dyn_cast<LoadSDNode>(getBuildPairElt(N, 1));
if (!LD1 || !LD2 || !ISD::isNON_EXTLoad(LD1) || !LD1->hasOneUse() ||
LD1->getAddressSpace() != LD2->getAddressSpace())
return SDValue();
EVT LD1VT = LD1->getValueType(0);
unsigned LD1Bytes = LD1VT.getSizeInBits() / 8;
if (ISD::isNON_EXTLoad(LD2) && LD2->hasOneUse() &&
DAG.areNonVolatileConsecutiveLoads(LD2, LD1, LD1Bytes, 1)) {
unsigned Align = LD1->getAlignment();
unsigned NewAlign = DAG.getDataLayout().getABITypeAlignment(
VT.getTypeForEVT(*DAG.getContext()));
if (NewAlign <= Align &&
(!LegalOperations || TLI.isOperationLegal(ISD::LOAD, VT)))
return DAG.getLoad(VT, SDLoc(N), LD1->getChain(), LD1->getBasePtr(),
LD1->getPointerInfo(), Align);
}
return SDValue();
}
static unsigned getPPCf128HiElementSelector(const SelectionDAG &DAG) {
// On little-endian machines, bitcasting from ppcf128 to i128 does swap the Hi
// and Lo parts; on big-endian machines it doesn't.
return DAG.getDataLayout().isBigEndian() ? 1 : 0;
}
static SDValue foldBitcastedFPLogic(SDNode *N, SelectionDAG &DAG,
const TargetLowering &TLI) {
// If this is not a bitcast to an FP type or if the target doesn't have
// IEEE754-compliant FP logic, we're done.
EVT VT = N->getValueType(0);
if (!VT.isFloatingPoint() || !TLI.hasBitPreservingFPLogic(VT))
return SDValue();
// TODO: Use splat values for the constant-checking below and remove this
// restriction.
SDValue N0 = N->getOperand(0);
EVT SourceVT = N0.getValueType();
if (SourceVT.isVector())
return SDValue();
unsigned FPOpcode;
APInt SignMask;
switch (N0.getOpcode()) {
case ISD::AND:
FPOpcode = ISD::FABS;
SignMask = ~APInt::getSignBit(SourceVT.getSizeInBits());
break;
case ISD::XOR:
FPOpcode = ISD::FNEG;
SignMask = APInt::getSignBit(SourceVT.getSizeInBits());
break;
// TODO: ISD::OR --> ISD::FNABS?
default:
return SDValue();
}
// Fold (bitcast int (and (bitcast fp X to int), 0x7fff...) to fp) -> fabs X
// Fold (bitcast int (xor (bitcast fp X to int), 0x8000...) to fp) -> fneg X
SDValue LogicOp0 = N0.getOperand(0);
ConstantSDNode *LogicOp1 = dyn_cast<ConstantSDNode>(N0.getOperand(1));
if (LogicOp1 && LogicOp1->getAPIntValue() == SignMask &&
LogicOp0.getOpcode() == ISD::BITCAST &&
LogicOp0->getOperand(0).getValueType() == VT)
return DAG.getNode(FPOpcode, SDLoc(N), VT, LogicOp0->getOperand(0));
return SDValue();
}
SDValue DAGCombiner::visitBITCAST(SDNode *N) {
SDValue N0 = N->getOperand(0);
EVT VT = N->getValueType(0);
if (N0.isUndef())
return DAG.getUNDEF(VT);
// If the input is a BUILD_VECTOR with all constant elements, fold this now.
// Only do this before legalize, since afterward the target may be depending
// on the bitconvert.
// First check to see if this is all constant.
if (!LegalTypes &&
N0.getOpcode() == ISD::BUILD_VECTOR && N0.getNode()->hasOneUse() &&
VT.isVector()) {
bool isSimple = cast<BuildVectorSDNode>(N0)->isConstant();
EVT DestEltVT = N->getValueType(0).getVectorElementType();
assert(!DestEltVT.isVector() &&
"Element type of vector ValueType must not be vector!");
if (isSimple)
return ConstantFoldBITCASTofBUILD_VECTOR(N0.getNode(), DestEltVT);
}
// If the input is a constant, let getNode fold it.
if (isa<ConstantSDNode>(N0) || isa<ConstantFPSDNode>(N0)) {
// If we can't allow illegal operations, we need to check that this is just
// a fp -> int or int -> conversion and that the resulting operation will
// be legal.
if (!LegalOperations ||
(isa<ConstantSDNode>(N0) && VT.isFloatingPoint() && !VT.isVector() &&
TLI.isOperationLegal(ISD::ConstantFP, VT)) ||
(isa<ConstantFPSDNode>(N0) && VT.isInteger() && !VT.isVector() &&
TLI.isOperationLegal(ISD::Constant, VT)))
return DAG.getBitcast(VT, N0);
}
// (conv (conv x, t1), t2) -> (conv x, t2)
if (N0.getOpcode() == ISD::BITCAST)
return DAG.getBitcast(VT, N0.getOperand(0));
// fold (conv (load x)) -> (load (conv*)x)
// If the resultant load doesn't need a higher alignment than the original!
if (ISD::isNormalLoad(N0.getNode()) && N0.hasOneUse() &&
// Do not change the width of a volatile load.
!cast<LoadSDNode>(N0)->isVolatile() &&
// Do not remove the cast if the types differ in endian layout.
TLI.hasBigEndianPartOrdering(N0.getValueType(), DAG.getDataLayout()) ==
TLI.hasBigEndianPartOrdering(VT, DAG.getDataLayout()) &&
(!LegalOperations || TLI.isOperationLegal(ISD::LOAD, VT)) &&
TLI.isLoadBitCastBeneficial(N0.getValueType(), VT)) {
LoadSDNode *LN0 = cast<LoadSDNode>(N0);
unsigned OrigAlign = LN0->getAlignment();
bool Fast = false;
if (TLI.allowsMemoryAccess(*DAG.getContext(), DAG.getDataLayout(), VT,
LN0->getAddressSpace(), OrigAlign, &Fast) &&
Fast) {
SDValue Load =
DAG.getLoad(VT, SDLoc(N), LN0->getChain(), LN0->getBasePtr(),
LN0->getPointerInfo(), OrigAlign,
LN0->getMemOperand()->getFlags(), LN0->getAAInfo());
DAG.ReplaceAllUsesOfValueWith(N0.getValue(1), Load.getValue(1));
return Load;
}
}
if (SDValue V = foldBitcastedFPLogic(N, DAG, TLI))
return V;
// fold (bitconvert (fneg x)) -> (xor (bitconvert x), signbit)
// fold (bitconvert (fabs x)) -> (and (bitconvert x), (not signbit))
//
// For ppc_fp128:
// fold (bitcast (fneg x)) ->
// flipbit = signbit
// (xor (bitcast x) (build_pair flipbit, flipbit))
//
// fold (bitcast (fabs x)) ->
// flipbit = (and (extract_element (bitcast x), 0), signbit)
// (xor (bitcast x) (build_pair flipbit, flipbit))
// This often reduces constant pool loads.
if (((N0.getOpcode() == ISD::FNEG && !TLI.isFNegFree(N0.getValueType())) ||
(N0.getOpcode() == ISD::FABS && !TLI.isFAbsFree(N0.getValueType()))) &&
N0.getNode()->hasOneUse() && VT.isInteger() &&
!VT.isVector() && !N0.getValueType().isVector()) {
SDValue NewConv = DAG.getBitcast(VT, N0.getOperand(0));
AddToWorklist(NewConv.getNode());
SDLoc DL(N);
if (N0.getValueType() == MVT::ppcf128 && !LegalTypes) {
assert(VT.getSizeInBits() == 128);
SDValue SignBit = DAG.getConstant(
APInt::getSignBit(VT.getSizeInBits() / 2), SDLoc(N0), MVT::i64);
SDValue FlipBit;
if (N0.getOpcode() == ISD::FNEG) {
FlipBit = SignBit;
AddToWorklist(FlipBit.getNode());
} else {
assert(N0.getOpcode() == ISD::FABS);
SDValue Hi =
DAG.getNode(ISD::EXTRACT_ELEMENT, SDLoc(NewConv), MVT::i64, NewConv,
DAG.getIntPtrConstant(getPPCf128HiElementSelector(DAG),
SDLoc(NewConv)));
AddToWorklist(Hi.getNode());
FlipBit = DAG.getNode(ISD::AND, SDLoc(N0), MVT::i64, Hi, SignBit);
AddToWorklist(FlipBit.getNode());
}
SDValue FlipBits =
DAG.getNode(ISD::BUILD_PAIR, SDLoc(N0), VT, FlipBit, FlipBit);
AddToWorklist(FlipBits.getNode());
return DAG.getNode(ISD::XOR, DL, VT, NewConv, FlipBits);
}
APInt SignBit = APInt::getSignBit(VT.getSizeInBits());
if (N0.getOpcode() == ISD::FNEG)
return DAG.getNode(ISD::XOR, DL, VT,
NewConv, DAG.getConstant(SignBit, DL, VT));
assert(N0.getOpcode() == ISD::FABS);
return DAG.getNode(ISD::AND, DL, VT,
NewConv, DAG.getConstant(~SignBit, DL, VT));
}
// fold (bitconvert (fcopysign cst, x)) ->
// (or (and (bitconvert x), sign), (and cst, (not sign)))
// Note that we don't handle (copysign x, cst) because this can always be
// folded to an fneg or fabs.
//
// For ppc_fp128:
// fold (bitcast (fcopysign cst, x)) ->
// flipbit = (and (extract_element
// (xor (bitcast cst), (bitcast x)), 0),
// signbit)
// (xor (bitcast cst) (build_pair flipbit, flipbit))
if (N0.getOpcode() == ISD::FCOPYSIGN && N0.getNode()->hasOneUse() &&
isa<ConstantFPSDNode>(N0.getOperand(0)) &&
VT.isInteger() && !VT.isVector()) {
unsigned OrigXWidth = N0.getOperand(1).getValueSizeInBits();
EVT IntXVT = EVT::getIntegerVT(*DAG.getContext(), OrigXWidth);
if (isTypeLegal(IntXVT)) {
SDValue X = DAG.getBitcast(IntXVT, N0.getOperand(1));
AddToWorklist(X.getNode());
// If X has a different width than the result/lhs, sext it or truncate it.
unsigned VTWidth = VT.getSizeInBits();
if (OrigXWidth < VTWidth) {
X = DAG.getNode(ISD::SIGN_EXTEND, SDLoc(N), VT, X);
AddToWorklist(X.getNode());
} else if (OrigXWidth > VTWidth) {
// To get the sign bit in the right place, we have to shift it right
// before truncating.
SDLoc DL(X);
X = DAG.getNode(ISD::SRL, DL,
X.getValueType(), X,
DAG.getConstant(OrigXWidth-VTWidth, DL,
X.getValueType()));
AddToWorklist(X.getNode());
X = DAG.getNode(ISD::TRUNCATE, SDLoc(X), VT, X);
AddToWorklist(X.getNode());
}
if (N0.getValueType() == MVT::ppcf128 && !LegalTypes) {
APInt SignBit = APInt::getSignBit(VT.getSizeInBits() / 2);
SDValue Cst = DAG.getBitcast(VT, N0.getOperand(0));
AddToWorklist(Cst.getNode());
SDValue X = DAG.getBitcast(VT, N0.getOperand(1));
AddToWorklist(X.getNode());
SDValue XorResult = DAG.getNode(ISD::XOR, SDLoc(N0), VT, Cst, X);
AddToWorklist(XorResult.getNode());
SDValue XorResult64 = DAG.getNode(
ISD::EXTRACT_ELEMENT, SDLoc(XorResult), MVT::i64, XorResult,
DAG.getIntPtrConstant(getPPCf128HiElementSelector(DAG),
SDLoc(XorResult)));
AddToWorklist(XorResult64.getNode());
SDValue FlipBit =
DAG.getNode(ISD::AND, SDLoc(XorResult64), MVT::i64, XorResult64,
DAG.getConstant(SignBit, SDLoc(XorResult64), MVT::i64));
AddToWorklist(FlipBit.getNode());
SDValue FlipBits =
DAG.getNode(ISD::BUILD_PAIR, SDLoc(N0), VT, FlipBit, FlipBit);
AddToWorklist(FlipBits.getNode());
return DAG.getNode(ISD::XOR, SDLoc(N), VT, Cst, FlipBits);
}
APInt SignBit = APInt::getSignBit(VT.getSizeInBits());
X = DAG.getNode(ISD::AND, SDLoc(X), VT,
X, DAG.getConstant(SignBit, SDLoc(X), VT));
AddToWorklist(X.getNode());
SDValue Cst = DAG.getBitcast(VT, N0.getOperand(0));
Cst = DAG.getNode(ISD::AND, SDLoc(Cst), VT,
Cst, DAG.getConstant(~SignBit, SDLoc(Cst), VT));
AddToWorklist(Cst.getNode());
return DAG.getNode(ISD::OR, SDLoc(N), VT, X, Cst);
}
}
// bitconvert(build_pair(ld, ld)) -> ld iff load locations are consecutive.
if (N0.getOpcode() == ISD::BUILD_PAIR)
if (SDValue CombineLD = CombineConsecutiveLoads(N0.getNode(), VT))
return CombineLD;
// Remove double bitcasts from shuffles - this is often a legacy of
// XformToShuffleWithZero being used to combine bitmaskings (of
// float vectors bitcast to integer vectors) into shuffles.
// bitcast(shuffle(bitcast(s0),bitcast(s1))) -> shuffle(s0,s1)
if (Level < AfterLegalizeDAG && TLI.isTypeLegal(VT) && VT.isVector() &&
N0->getOpcode() == ISD::VECTOR_SHUFFLE &&
VT.getVectorNumElements() >= N0.getValueType().getVectorNumElements() &&
!(VT.getVectorNumElements() % N0.getValueType().getVectorNumElements())) {
ShuffleVectorSDNode *SVN = cast<ShuffleVectorSDNode>(N0);
// If operands are a bitcast, peek through if it casts the original VT.
// If operands are a constant, just bitcast back to original VT.
auto PeekThroughBitcast = [&](SDValue Op) {
if (Op.getOpcode() == ISD::BITCAST &&
Op.getOperand(0).getValueType() == VT)
return SDValue(Op.getOperand(0));
if (ISD::isBuildVectorOfConstantSDNodes(Op.getNode()) ||
ISD::isBuildVectorOfConstantFPSDNodes(Op.getNode()))
return DAG.getBitcast(VT, Op);
return SDValue();
};
SDValue SV0 = PeekThroughBitcast(N0->getOperand(0));
SDValue SV1 = PeekThroughBitcast(N0->getOperand(1));
if (!(SV0 && SV1))
return SDValue();
int MaskScale =
VT.getVectorNumElements() / N0.getValueType().getVectorNumElements();
SmallVector<int, 8> NewMask;
for (int M : SVN->getMask())
for (int i = 0; i != MaskScale; ++i)
NewMask.push_back(M < 0 ? -1 : M * MaskScale + i);
bool LegalMask = TLI.isShuffleMaskLegal(NewMask, VT);
if (!LegalMask) {
std::swap(SV0, SV1);
ShuffleVectorSDNode::commuteMask(NewMask);
LegalMask = TLI.isShuffleMaskLegal(NewMask, VT);
}
if (LegalMask)
return DAG.getVectorShuffle(VT, SDLoc(N), SV0, SV1, NewMask);
}
return SDValue();
}
SDValue DAGCombiner::visitBUILD_PAIR(SDNode *N) {
EVT VT = N->getValueType(0);
return CombineConsecutiveLoads(N, VT);
}
/// We know that BV is a build_vector node with Constant, ConstantFP or Undef
/// operands. DstEltVT indicates the destination element value type.
SDValue DAGCombiner::
ConstantFoldBITCASTofBUILD_VECTOR(SDNode *BV, EVT DstEltVT) {
EVT SrcEltVT = BV->getValueType(0).getVectorElementType();
// If this is already the right type, we're done.
if (SrcEltVT == DstEltVT) return SDValue(BV, 0);
unsigned SrcBitSize = SrcEltVT.getSizeInBits();
unsigned DstBitSize = DstEltVT.getSizeInBits();
// If this is a conversion of N elements of one type to N elements of another
// type, convert each element. This handles FP<->INT cases.
if (SrcBitSize == DstBitSize) {
EVT VT = EVT::getVectorVT(*DAG.getContext(), DstEltVT,
BV->getValueType(0).getVectorNumElements());
// Due to the FP element handling below calling this routine recursively,
// we can end up with a scalar-to-vector node here.
if (BV->getOpcode() == ISD::SCALAR_TO_VECTOR)
return DAG.getNode(ISD::SCALAR_TO_VECTOR, SDLoc(BV), VT,
DAG.getBitcast(DstEltVT, BV->getOperand(0)));
SmallVector<SDValue, 8> Ops;
for (SDValue Op : BV->op_values()) {
// If the vector element type is not legal, the BUILD_VECTOR operands
// are promoted and implicitly truncated. Make that explicit here.
if (Op.getValueType() != SrcEltVT)
Op = DAG.getNode(ISD::TRUNCATE, SDLoc(BV), SrcEltVT, Op);
Ops.push_back(DAG.getBitcast(DstEltVT, Op));
AddToWorklist(Ops.back().getNode());
}
return DAG.getBuildVector(VT, SDLoc(BV), Ops);
}
// Otherwise, we're growing or shrinking the elements. To avoid having to
// handle annoying details of growing/shrinking FP values, we convert them to
// int first.
if (SrcEltVT.isFloatingPoint()) {
// Convert the input float vector to a int vector where the elements are the
// same sizes.
EVT IntVT = EVT::getIntegerVT(*DAG.getContext(), SrcEltVT.getSizeInBits());
BV = ConstantFoldBITCASTofBUILD_VECTOR(BV, IntVT).getNode();
SrcEltVT = IntVT;
}
// Now we know the input is an integer vector. If the output is a FP type,
// convert to integer first, then to FP of the right size.
if (DstEltVT.isFloatingPoint()) {
EVT TmpVT = EVT::getIntegerVT(*DAG.getContext(), DstEltVT.getSizeInBits());
SDNode *Tmp = ConstantFoldBITCASTofBUILD_VECTOR(BV, TmpVT).getNode();
// Next, convert to FP elements of the same size.
return ConstantFoldBITCASTofBUILD_VECTOR(Tmp, DstEltVT);
}
SDLoc DL(BV);
// Okay, we know the src/dst types are both integers of differing types.
// Handling growing first.
assert(SrcEltVT.isInteger() && DstEltVT.isInteger());
if (SrcBitSize < DstBitSize) {
unsigned NumInputsPerOutput = DstBitSize/SrcBitSize;
SmallVector<SDValue, 8> Ops;
for (unsigned i = 0, e = BV->getNumOperands(); i != e;
i += NumInputsPerOutput) {
bool isLE = DAG.getDataLayout().isLittleEndian();
APInt NewBits = APInt(DstBitSize, 0);
bool EltIsUndef = true;
for (unsigned j = 0; j != NumInputsPerOutput; ++j) {
// Shift the previously computed bits over.
NewBits <<= SrcBitSize;
SDValue Op = BV->getOperand(i+ (isLE ? (NumInputsPerOutput-j-1) : j));
if (Op.isUndef()) continue;
EltIsUndef = false;
NewBits |= cast<ConstantSDNode>(Op)->getAPIntValue().
zextOrTrunc(SrcBitSize).zext(DstBitSize);
}
if (EltIsUndef)
Ops.push_back(DAG.getUNDEF(DstEltVT));
else
Ops.push_back(DAG.getConstant(NewBits, DL, DstEltVT));
}
EVT VT = EVT::getVectorVT(*DAG.getContext(), DstEltVT, Ops.size());
return DAG.getBuildVector(VT, DL, Ops);
}
// Finally, this must be the case where we are shrinking elements: each input
// turns into multiple outputs.
unsigned NumOutputsPerInput = SrcBitSize/DstBitSize;
EVT VT = EVT::getVectorVT(*DAG.getContext(), DstEltVT,
NumOutputsPerInput*BV->getNumOperands());
SmallVector<SDValue, 8> Ops;
for (const SDValue &Op : BV->op_values()) {
if (Op.isUndef()) {
Ops.append(NumOutputsPerInput, DAG.getUNDEF(DstEltVT));
continue;
}
APInt OpVal = cast<ConstantSDNode>(Op)->
getAPIntValue().zextOrTrunc(SrcBitSize);
for (unsigned j = 0; j != NumOutputsPerInput; ++j) {
APInt ThisVal = OpVal.trunc(DstBitSize);
Ops.push_back(DAG.getConstant(ThisVal, DL, DstEltVT));
OpVal = OpVal.lshr(DstBitSize);
}
// For big endian targets, swap the order of the pieces of each element.
if (DAG.getDataLayout().isBigEndian())
std::reverse(Ops.end()-NumOutputsPerInput, Ops.end());
}
return DAG.getBuildVector(VT, DL, Ops);
}
static bool isContractable(SDNode *N) {
SDNodeFlags F = cast<BinaryWithFlagsSDNode>(N)->Flags;
return F.hasAllowContract() || F.hasUnsafeAlgebra();
}
/// Try to perform FMA combining on a given FADD node.
SDValue DAGCombiner::visitFADDForFMACombine(SDNode *N) {
SDValue N0 = N->getOperand(0);
SDValue N1 = N->getOperand(1);
EVT VT = N->getValueType(0);
SDLoc SL(N);
const TargetOptions &Options = DAG.getTarget().Options;
// Floating-point multiply-add with intermediate rounding.
bool HasFMAD = (LegalOperations && TLI.isOperationLegal(ISD::FMAD, VT));
// Floating-point multiply-add without intermediate rounding.
bool HasFMA =
TLI.isFMAFasterThanFMulAndFAdd(VT) &&
(!LegalOperations || TLI.isOperationLegalOrCustom(ISD::FMA, VT));
// No valid opcode, do not combine.
if (!HasFMAD && !HasFMA)
return SDValue();
bool AllowFusionGlobally = (Options.AllowFPOpFusion == FPOpFusion::Fast ||
Options.UnsafeFPMath || HasFMAD);
// If the addition is not contractable, do not combine.
if (!AllowFusionGlobally && !isContractable(N))
return SDValue();
const SelectionDAGTargetInfo *STI = DAG.getSubtarget().getSelectionDAGInfo();
if (STI && STI->generateFMAsInMachineCombiner(OptLevel))
return SDValue();
// Always prefer FMAD to FMA for precision.
unsigned PreferredFusedOpcode = HasFMAD ? ISD::FMAD : ISD::FMA;
bool Aggressive = TLI.enableAggressiveFMAFusion(VT);
bool LookThroughFPExt = TLI.isFPExtFree(VT);
// Is the node an FMUL and contractable either due to global flags or
// SDNodeFlags.
auto isContractableFMUL = [AllowFusionGlobally](SDValue N) {
if (N.getOpcode() != ISD::FMUL)
return false;
return AllowFusionGlobally || isContractable(N.getNode());
};
// If we have two choices trying to fold (fadd (fmul u, v), (fmul x, y)),
// prefer to fold the multiply with fewer uses.
if (Aggressive && isContractableFMUL(N0) && isContractableFMUL(N1)) {
if (N0.getNode()->use_size() > N1.getNode()->use_size())
std::swap(N0, N1);
}
// fold (fadd (fmul x, y), z) -> (fma x, y, z)
if (isContractableFMUL(N0) && (Aggressive || N0->hasOneUse())) {
return DAG.getNode(PreferredFusedOpcode, SL, VT,
N0.getOperand(0), N0.getOperand(1), N1);
}
// fold (fadd x, (fmul y, z)) -> (fma y, z, x)
// Note: Commutes FADD operands.
if (isContractableFMUL(N1) && (Aggressive || N1->hasOneUse())) {
return DAG.getNode(PreferredFusedOpcode, SL, VT,
N1.getOperand(0), N1.getOperand(1), N0);
}
// Look through FP_EXTEND nodes to do more combining.
if (LookThroughFPExt) {
// fold (fadd (fpext (fmul x, y)), z) -> (fma (fpext x), (fpext y), z)
if (N0.getOpcode() == ISD::FP_EXTEND) {
SDValue N00 = N0.getOperand(0);
if (isContractableFMUL(N00))
return DAG.getNode(PreferredFusedOpcode, SL, VT,
DAG.getNode(ISD::FP_EXTEND, SL, VT,
N00.getOperand(0)),
DAG.getNode(ISD::FP_EXTEND, SL, VT,
N00.getOperand(1)), N1);
}
// fold (fadd x, (fpext (fmul y, z))) -> (fma (fpext y), (fpext z), x)
// Note: Commutes FADD operands.
if (N1.getOpcode() == ISD::FP_EXTEND) {
SDValue N10 = N1.getOperand(0);
if (isContractableFMUL(N10))
return DAG.getNode(PreferredFusedOpcode, SL, VT,
DAG.getNode(ISD::FP_EXTEND, SL, VT,
N10.getOperand(0)),
DAG.getNode(ISD::FP_EXTEND, SL, VT,
N10.getOperand(1)), N0);
}
}
// More folding opportunities when target permits.
if (Aggressive) {
// fold (fadd (fma x, y, (fmul u, v)), z) -> (fma x, y (fma u, v, z))
// FIXME: The UnsafeAlgebra flag should be propagated to FMA/FMAD, but FMF
// are currently only supported on binary nodes.
if (Options.UnsafeFPMath &&
N0.getOpcode() == PreferredFusedOpcode &&
N0.getOperand(2).getOpcode() == ISD::FMUL &&
N0->hasOneUse() && N0.getOperand(2)->hasOneUse()) {
return DAG.getNode(PreferredFusedOpcode, SL, VT,
N0.getOperand(0), N0.getOperand(1),
DAG.getNode(PreferredFusedOpcode, SL, VT,
N0.getOperand(2).getOperand(0),
N0.getOperand(2).getOperand(1),
N1));
}
// fold (fadd x, (fma y, z, (fmul u, v)) -> (fma y, z (fma u, v, x))
// FIXME: The UnsafeAlgebra flag should be propagated to FMA/FMAD, but FMF
// are currently only supported on binary nodes.
if (Options.UnsafeFPMath &&
N1->getOpcode() == PreferredFusedOpcode &&
N1.getOperand(2).getOpcode() == ISD::FMUL &&
N1->hasOneUse() && N1.getOperand(2)->hasOneUse()) {
return DAG.getNode(PreferredFusedOpcode, SL, VT,
N1.getOperand(0), N1.getOperand(1),
DAG.getNode(PreferredFusedOpcode, SL, VT,
N1.getOperand(2).getOperand(0),
N1.getOperand(2).getOperand(1),
N0));
}
if (LookThroughFPExt) {
// fold (fadd (fma x, y, (fpext (fmul u, v))), z)
// -> (fma x, y, (fma (fpext u), (fpext v), z))
auto FoldFAddFMAFPExtFMul = [&] (
SDValue X, SDValue Y, SDValue U, SDValue V, SDValue Z) {
return DAG.getNode(PreferredFusedOpcode, SL, VT, X, Y,
DAG.getNode(PreferredFusedOpcode, SL, VT,
DAG.getNode(ISD::FP_EXTEND, SL, VT, U),
DAG.getNode(ISD::FP_EXTEND, SL, VT, V),
Z));
};
if (N0.getOpcode() == PreferredFusedOpcode) {
SDValue N02 = N0.getOperand(2);
if (N02.getOpcode() == ISD::FP_EXTEND) {
SDValue N020 = N02.getOperand(0);
if (isContractableFMUL(N020))
return FoldFAddFMAFPExtFMul(N0.getOperand(0), N0.getOperand(1),
N020.getOperand(0), N020.getOperand(1),
N1);
}
}
// fold (fadd (fpext (fma x, y, (fmul u, v))), z)
// -> (fma (fpext x), (fpext y), (fma (fpext u), (fpext v), z))
// FIXME: This turns two single-precision and one double-precision
// operation into two double-precision operations, which might not be
// interesting for all targets, especially GPUs.
auto FoldFAddFPExtFMAFMul = [&] (
SDValue X, SDValue Y, SDValue U, SDValue V, SDValue Z) {
return DAG.getNode(PreferredFusedOpcode, SL, VT,
DAG.getNode(ISD::FP_EXTEND, SL, VT, X),
DAG.getNode(ISD::FP_EXTEND, SL, VT, Y),
DAG.getNode(PreferredFusedOpcode, SL, VT,
DAG.getNode(ISD::FP_EXTEND, SL, VT, U),
DAG.getNode(ISD::FP_EXTEND, SL, VT, V),
Z));
};
if (N0.getOpcode() == ISD::FP_EXTEND) {
SDValue N00 = N0.getOperand(0);
if (N00.getOpcode() == PreferredFusedOpcode) {
SDValue N002 = N00.getOperand(2);
if (isContractableFMUL(N002))
return FoldFAddFPExtFMAFMul(N00.getOperand(0), N00.getOperand(1),
N002.getOperand(0), N002.getOperand(1),
N1);
}
}
// fold (fadd x, (fma y, z, (fpext (fmul u, v)))
// -> (fma y, z, (fma (fpext u), (fpext v), x))
if (N1.getOpcode() == PreferredFusedOpcode) {
SDValue N12 = N1.getOperand(2);
if (N12.getOpcode() == ISD::FP_EXTEND) {
SDValue N120 = N12.getOperand(0);
if (isContractableFMUL(N120))
return FoldFAddFMAFPExtFMul(N1.getOperand(0), N1.getOperand(1),
N120.getOperand(0), N120.getOperand(1),
N0);
}
}
// fold (fadd x, (fpext (fma y, z, (fmul u, v)))
// -> (fma (fpext y), (fpext z), (fma (fpext u), (fpext v), x))
// FIXME: This turns two single-precision and one double-precision
// operation into two double-precision operations, which might not be
// interesting for all targets, especially GPUs.
if (N1.getOpcode() == ISD::FP_EXTEND) {
SDValue N10 = N1.getOperand(0);
if (N10.getOpcode() == PreferredFusedOpcode) {
SDValue N102 = N10.getOperand(2);
if (isContractableFMUL(N102))
return FoldFAddFPExtFMAFMul(N10.getOperand(0), N10.getOperand(1),
N102.getOperand(0), N102.getOperand(1),
N0);
}
}
}
}
return SDValue();
}
/// Try to perform FMA combining on a given FSUB node.
SDValue DAGCombiner::visitFSUBForFMACombine(SDNode *N) {
SDValue N0 = N->getOperand(0);
SDValue N1 = N->getOperand(1);
EVT VT = N->getValueType(0);
SDLoc SL(N);
const TargetOptions &Options = DAG.getTarget().Options;
// Floating-point multiply-add with intermediate rounding.
bool HasFMAD = (LegalOperations && TLI.isOperationLegal(ISD::FMAD, VT));
// Floating-point multiply-add without intermediate rounding.
bool HasFMA =
TLI.isFMAFasterThanFMulAndFAdd(VT) &&
(!LegalOperations || TLI.isOperationLegalOrCustom(ISD::FMA, VT));
// No valid opcode, do not combine.
if (!HasFMAD && !HasFMA)
return SDValue();
bool AllowFusionGlobally = (Options.AllowFPOpFusion == FPOpFusion::Fast ||
Options.UnsafeFPMath || HasFMAD);
// If the subtraction is not contractable, do not combine.
if (!AllowFusionGlobally && !isContractable(N))
return SDValue();
const SelectionDAGTargetInfo *STI = DAG.getSubtarget().getSelectionDAGInfo();
if (STI && STI->generateFMAsInMachineCombiner(OptLevel))
return SDValue();
// Always prefer FMAD to FMA for precision.
unsigned PreferredFusedOpcode = HasFMAD ? ISD::FMAD : ISD::FMA;
bool Aggressive = TLI.enableAggressiveFMAFusion(VT);
bool LookThroughFPExt = TLI.isFPExtFree(VT);
// Is the node an FMUL and contractable either due to global flags or
// SDNodeFlags.
auto isContractableFMUL = [AllowFusionGlobally](SDValue N) {
if (N.getOpcode() != ISD::FMUL)
return false;
return AllowFusionGlobally || isContractable(N.getNode());
};
// fold (fsub (fmul x, y), z) -> (fma x, y, (fneg z))
if (isContractableFMUL(N0) && (Aggressive || N0->hasOneUse())) {
return DAG.getNode(PreferredFusedOpcode, SL, VT,
N0.getOperand(0), N0.getOperand(1),
DAG.getNode(ISD::FNEG, SL, VT, N1));
}
// fold (fsub x, (fmul y, z)) -> (fma (fneg y), z, x)
// Note: Commutes FSUB operands.
if (isContractableFMUL(N1) && (Aggressive || N1->hasOneUse()))
return DAG.getNode(PreferredFusedOpcode, SL, VT,
DAG.getNode(ISD::FNEG, SL, VT,
N1.getOperand(0)),
N1.getOperand(1), N0);
// fold (fsub (fneg (fmul, x, y)), z) -> (fma (fneg x), y, (fneg z))
if (N0.getOpcode() == ISD::FNEG && isContractableFMUL(N0.getOperand(0)) &&
(Aggressive || (N0->hasOneUse() && N0.getOperand(0).hasOneUse()))) {
SDValue N00 = N0.getOperand(0).getOperand(0);
SDValue N01 = N0.getOperand(0).getOperand(1);
return DAG.getNode(PreferredFusedOpcode, SL, VT,
DAG.getNode(ISD::FNEG, SL, VT, N00), N01,
DAG.getNode(ISD::FNEG, SL, VT, N1));
}
// Look through FP_EXTEND nodes to do more combining.
if (LookThroughFPExt) {
// fold (fsub (fpext (fmul x, y)), z)
// -> (fma (fpext x), (fpext y), (fneg z))
if (N0.getOpcode() == ISD::FP_EXTEND) {
SDValue N00 = N0.getOperand(0);
if (isContractableFMUL(N00))
return DAG.getNode(PreferredFusedOpcode, SL, VT,
DAG.getNode(ISD::FP_EXTEND, SL, VT,
N00.getOperand(0)),
DAG.getNode(ISD::FP_EXTEND, SL, VT,
N00.getOperand(1)),
DAG.getNode(ISD::FNEG, SL, VT, N1));
}
// fold (fsub x, (fpext (fmul y, z)))
// -> (fma (fneg (fpext y)), (fpext z), x)
// Note: Commutes FSUB operands.
if (N1.getOpcode() == ISD::FP_EXTEND) {
SDValue N10 = N1.getOperand(0);
if (isContractableFMUL(N10))
return DAG.getNode(PreferredFusedOpcode, SL, VT,
DAG.getNode(ISD::FNEG, SL, VT,
DAG.getNode(ISD::FP_EXTEND, SL, VT,
N10.getOperand(0))),
DAG.getNode(ISD::FP_EXTEND, SL, VT,
N10.getOperand(1)),
N0);
}
// fold (fsub (fpext (fneg (fmul, x, y))), z)
// -> (fneg (fma (fpext x), (fpext y), z))
// Note: This could be removed with appropriate canonicalization of the
// input expression into (fneg (fadd (fpext (fmul, x, y)), z). However, the
// orthogonal flags -fp-contract=fast and -enable-unsafe-fp-math prevent
// from implementing the canonicalization in visitFSUB.
if (N0.getOpcode() == ISD::FP_EXTEND) {
SDValue N00 = N0.getOperand(0);
if (N00.getOpcode() == ISD::FNEG) {
SDValue N000 = N00.getOperand(0);
if (isContractableFMUL(N000)) {
return DAG.getNode(ISD::FNEG, SL, VT,
DAG.getNode(PreferredFusedOpcode, SL, VT,
DAG.getNode(ISD::FP_EXTEND, SL, VT,
N000.getOperand(0)),
DAG.getNode(ISD::FP_EXTEND, SL, VT,
N000.getOperand(1)),
N1));
}
}
}
// fold (fsub (fneg (fpext (fmul, x, y))), z)
// -> (fneg (fma (fpext x)), (fpext y), z)
// Note: This could be removed with appropriate canonicalization of the
// input expression into (fneg (fadd (fpext (fmul, x, y)), z). However, the
// orthogonal flags -fp-contract=fast and -enable-unsafe-fp-math prevent
// from implementing the canonicalization in visitFSUB.
if (N0.getOpcode() == ISD::FNEG) {
SDValue N00 = N0.getOperand(0);
if (N00.getOpcode() == ISD::FP_EXTEND) {
SDValue N000 = N00.getOperand(0);
if (isContractableFMUL(N000)) {
return DAG.getNode(ISD::FNEG, SL, VT,
DAG.getNode(PreferredFusedOpcode, SL, VT,
DAG.getNode(ISD::FP_EXTEND, SL, VT,
N000.getOperand(0)),
DAG.getNode(ISD::FP_EXTEND, SL, VT,
N000.getOperand(1)),
N1));
}
}
}
}
// More folding opportunities when target permits.
if (Aggressive) {
// fold (fsub (fma x, y, (fmul u, v)), z)
// -> (fma x, y (fma u, v, (fneg z)))
// FIXME: The UnsafeAlgebra flag should be propagated to FMA/FMAD, but FMF
// are currently only supported on binary nodes.
if (Options.UnsafeFPMath && N0.getOpcode() == PreferredFusedOpcode &&
isContractableFMUL(N0.getOperand(2)) && N0->hasOneUse() &&
N0.getOperand(2)->hasOneUse()) {
return DAG.getNode(PreferredFusedOpcode, SL, VT,
N0.getOperand(0), N0.getOperand(1),
DAG.getNode(PreferredFusedOpcode, SL, VT,
N0.getOperand(2).getOperand(0),
N0.getOperand(2).getOperand(1),
DAG.getNode(ISD::FNEG, SL, VT,
N1)));
}
// fold (fsub x, (fma y, z, (fmul u, v)))
// -> (fma (fneg y), z, (fma (fneg u), v, x))
// FIXME: The UnsafeAlgebra flag should be propagated to FMA/FMAD, but FMF
// are currently only supported on binary nodes.
if (Options.UnsafeFPMath && N1.getOpcode() == PreferredFusedOpcode &&
isContractableFMUL(N1.getOperand(2))) {
SDValue N20 = N1.getOperand(2).getOperand(0);
SDValue N21 = N1.getOperand(2).getOperand(1);
return DAG.getNode(PreferredFusedOpcode, SL, VT,
DAG.getNode(ISD::FNEG, SL, VT,
N1.getOperand(0)),
N1.getOperand(1),
DAG.getNode(PreferredFusedOpcode, SL, VT,
DAG.getNode(ISD::FNEG, SL, VT, N20),
N21, N0));
}
if (LookThroughFPExt) {
// fold (fsub (fma x, y, (fpext (fmul u, v))), z)
// -> (fma x, y (fma (fpext u), (fpext v), (fneg z)))
if (N0.getOpcode() == PreferredFusedOpcode) {
SDValue N02 = N0.getOperand(2);
if (N02.getOpcode() == ISD::FP_EXTEND) {
SDValue N020 = N02.getOperand(0);
if (isContractableFMUL(N020))
return DAG.getNode(PreferredFusedOpcode, SL, VT,
N0.getOperand(0), N0.getOperand(1),
DAG.getNode(PreferredFusedOpcode, SL, VT,
DAG.getNode(ISD::FP_EXTEND, SL, VT,
N020.getOperand(0)),
DAG.getNode(ISD::FP_EXTEND, SL, VT,
N020.getOperand(1)),
DAG.getNode(ISD::FNEG, SL, VT,
N1)));
}
}
// fold (fsub (fpext (fma x, y, (fmul u, v))), z)
// -> (fma (fpext x), (fpext y),
// (fma (fpext u), (fpext v), (fneg z)))
// FIXME: This turns two single-precision and one double-precision
// operation into two double-precision operations, which might not be
// interesting for all targets, especially GPUs.
if (N0.getOpcode() == ISD::FP_EXTEND) {
SDValue N00 = N0.getOperand(0);
if (N00.getOpcode() == PreferredFusedOpcode) {
SDValue N002 = N00.getOperand(2);
if (isContractableFMUL(N002))
return DAG.getNode(PreferredFusedOpcode, SL, VT,
DAG.getNode(ISD::FP_EXTEND, SL, VT,
N00.getOperand(0)),
DAG.getNode(ISD::FP_EXTEND, SL, VT,
N00.getOperand(1)),
DAG.getNode(PreferredFusedOpcode, SL, VT,
DAG.getNode(ISD::FP_EXTEND, SL, VT,
N002.getOperand(0)),
DAG.getNode(ISD::FP_EXTEND, SL, VT,
N002.getOperand(1)),
DAG.getNode(ISD::FNEG, SL, VT,
N1)));
}
}
// fold (fsub x, (fma y, z, (fpext (fmul u, v))))
// -> (fma (fneg y), z, (fma (fneg (fpext u)), (fpext v), x))
if (N1.getOpcode() == PreferredFusedOpcode &&
N1.getOperand(2).getOpcode() == ISD::FP_EXTEND) {
SDValue N120 = N1.getOperand(2).getOperand(0);
if (isContractableFMUL(N120)) {
SDValue N1200 = N120.getOperand(0);
SDValue N1201 = N120.getOperand(1);
return DAG.getNode(PreferredFusedOpcode, SL, VT,
DAG.getNode(ISD::FNEG, SL, VT, N1.getOperand(0)),
N1.getOperand(1),
DAG.getNode(PreferredFusedOpcode, SL, VT,
DAG.getNode(ISD::FNEG, SL, VT,
DAG.getNode(ISD::FP_EXTEND, SL,
VT, N1200)),
DAG.getNode(ISD::FP_EXTEND, SL, VT,
N1201),
N0));
}
}
// fold (fsub x, (fpext (fma y, z, (fmul u, v))))
// -> (fma (fneg (fpext y)), (fpext z),
// (fma (fneg (fpext u)), (fpext v), x))
// FIXME: This turns two single-precision and one double-precision
// operation into two double-precision operations, which might not be
// interesting for all targets, especially GPUs.
if (N1.getOpcode() == ISD::FP_EXTEND &&
N1.getOperand(0).getOpcode() == PreferredFusedOpcode) {
SDValue N100 = N1.getOperand(0).getOperand(0);
SDValue N101 = N1.getOperand(0).getOperand(1);
SDValue N102 = N1.getOperand(0).getOperand(2);
if (isContractableFMUL(N102)) {
SDValue N1020 = N102.getOperand(0);
SDValue N1021 = N102.getOperand(1);
return DAG.getNode(PreferredFusedOpcode, SL, VT,
DAG.getNode(ISD::FNEG, SL, VT,
DAG.getNode(ISD::FP_EXTEND, SL, VT,
N100)),
DAG.getNode(ISD::FP_EXTEND, SL, VT, N101),
DAG.getNode(PreferredFusedOpcode, SL, VT,
DAG.getNode(ISD::FNEG, SL, VT,
DAG.getNode(ISD::FP_EXTEND, SL,
VT, N1020)),
DAG.getNode(ISD::FP_EXTEND, SL, VT,
N1021),
N0));
}
}
}
}
return SDValue();
}
/// Try to perform FMA combining on a given FMUL node based on the distributive
/// law x * (y + 1) = x * y + x and variants thereof (commuted versions,
/// subtraction instead of addition).
SDValue DAGCombiner::visitFMULForFMADistributiveCombine(SDNode *N) {
SDValue N0 = N->getOperand(0);
SDValue N1 = N->getOperand(1);
EVT VT = N->getValueType(0);
SDLoc SL(N);
assert(N->getOpcode() == ISD::FMUL && "Expected FMUL Operation");
const TargetOptions &Options = DAG.getTarget().Options;
// The transforms below are incorrect when x == 0 and y == inf, because the
// intermediate multiplication produces a nan.
if (!Options.NoInfsFPMath)
return SDValue();
// Floating-point multiply-add without intermediate rounding.
bool HasFMA =
(Options.AllowFPOpFusion == FPOpFusion::Fast || Options.UnsafeFPMath) &&
TLI.isFMAFasterThanFMulAndFAdd(VT) &&
(!LegalOperations || TLI.isOperationLegalOrCustom(ISD::FMA, VT));
// Floating-point multiply-add with intermediate rounding. This can result
// in a less precise result due to the changed rounding order.
bool HasFMAD = Options.UnsafeFPMath &&
(LegalOperations && TLI.isOperationLegal(ISD::FMAD, VT));
// No valid opcode, do not combine.
if (!HasFMAD && !HasFMA)
return SDValue();
// Always prefer FMAD to FMA for precision.
unsigned PreferredFusedOpcode = HasFMAD ? ISD::FMAD : ISD::FMA;
bool Aggressive = TLI.enableAggressiveFMAFusion(VT);
// fold (fmul (fadd x, +1.0), y) -> (fma x, y, y)
// fold (fmul (fadd x, -1.0), y) -> (fma x, y, (fneg y))
auto FuseFADD = [&](SDValue X, SDValue Y) {
if (X.getOpcode() == ISD::FADD && (Aggressive || X->hasOneUse())) {
auto XC1 = isConstOrConstSplatFP(X.getOperand(1));
if (XC1 && XC1->isExactlyValue(+1.0))
return DAG.getNode(PreferredFusedOpcode, SL, VT, X.getOperand(0), Y, Y);
if (XC1 && XC1->isExactlyValue(-1.0))
return DAG.getNode(PreferredFusedOpcode, SL, VT, X.getOperand(0), Y,
DAG.getNode(ISD::FNEG, SL, VT, Y));
}
return SDValue();
};
if (SDValue FMA = FuseFADD(N0, N1))
return FMA;
if (SDValue FMA = FuseFADD(N1, N0))
return FMA;
// fold (fmul (fsub +1.0, x), y) -> (fma (fneg x), y, y)
// fold (fmul (fsub -1.0, x), y) -> (fma (fneg x), y, (fneg y))
// fold (fmul (fsub x, +1.0), y) -> (fma x, y, (fneg y))
// fold (fmul (fsub x, -1.0), y) -> (fma x, y, y)
auto FuseFSUB = [&](SDValue X, SDValue Y) {
if (X.getOpcode() == ISD::FSUB && (Aggressive || X->hasOneUse())) {
auto XC0 = isConstOrConstSplatFP(X.getOperand(0));
if (XC0 && XC0->isExactlyValue(+1.0))
return DAG.getNode(PreferredFusedOpcode, SL, VT,
DAG.getNode(ISD::FNEG, SL, VT, X.getOperand(1)), Y,
Y);
if (XC0 && XC0->isExactlyValue(-1.0))
return DAG.getNode(PreferredFusedOpcode, SL, VT,
DAG.getNode(ISD::FNEG, SL, VT, X.getOperand(1)), Y,
DAG.getNode(ISD::FNEG, SL, VT, Y));
auto XC1 = isConstOrConstSplatFP(X.getOperand(1));
if (XC1 && XC1->isExactlyValue(+1.0))
return DAG.getNode(PreferredFusedOpcode, SL, VT, X.getOperand(0), Y,
DAG.getNode(ISD::FNEG, SL, VT, Y));
if (XC1 && XC1->isExactlyValue(-1.0))
return DAG.getNode(PreferredFusedOpcode, SL, VT, X.getOperand(0), Y, Y);
}
return SDValue();
};
if (SDValue FMA = FuseFSUB(N0, N1))
return FMA;
if (SDValue FMA = FuseFSUB(N1, N0))
return FMA;
return SDValue();
}
SDValue DAGCombiner::visitFADD(SDNode *N) {
SDValue N0 = N->getOperand(0);
SDValue N1 = N->getOperand(1);
bool N0CFP = isConstantFPBuildVectorOrConstantFP(N0);
bool N1CFP = isConstantFPBuildVectorOrConstantFP(N1);
EVT VT = N->getValueType(0);
SDLoc DL(N);
const TargetOptions &Options = DAG.getTarget().Options;
const SDNodeFlags *Flags = &cast<BinaryWithFlagsSDNode>(N)->Flags;
// fold vector ops
if (VT.isVector())
if (SDValue FoldedVOp = SimplifyVBinOp(N))
return FoldedVOp;
// fold (fadd c1, c2) -> c1 + c2
if (N0CFP && N1CFP)
return DAG.getNode(ISD::FADD, DL, VT, N0, N1, Flags);
// canonicalize constant to RHS
if (N0CFP && !N1CFP)
return DAG.getNode(ISD::FADD, DL, VT, N1, N0, Flags);
if (SDValue NewSel = foldBinOpIntoSelect(N))
return NewSel;
// fold (fadd A, (fneg B)) -> (fsub A, B)
if ((!LegalOperations || TLI.isOperationLegalOrCustom(ISD::FSUB, VT)) &&
isNegatibleForFree(N1, LegalOperations, TLI, &Options) == 2)
return DAG.getNode(ISD::FSUB, DL, VT, N0,
GetNegatedExpression(N1, DAG, LegalOperations), Flags);
// fold (fadd (fneg A), B) -> (fsub B, A)
if ((!LegalOperations || TLI.isOperationLegalOrCustom(ISD::FSUB, VT)) &&
isNegatibleForFree(N0, LegalOperations, TLI, &Options) == 2)
return DAG.getNode(ISD::FSUB, DL, VT, N1,
GetNegatedExpression(N0, DAG, LegalOperations), Flags);
// FIXME: Auto-upgrade the target/function-level option.
if (Options.NoSignedZerosFPMath || N->getFlags()->hasNoSignedZeros()) {
// fold (fadd A, 0) -> A
if (ConstantFPSDNode *N1C = isConstOrConstSplatFP(N1))
if (N1C->isZero())
return N0;
}
// If 'unsafe math' is enabled, fold lots of things.
if (Options.UnsafeFPMath) {
// No FP constant should be created after legalization as Instruction
// Selection pass has a hard time dealing with FP constants.
bool AllowNewConst = (Level < AfterLegalizeDAG);
// fold (fadd (fadd x, c1), c2) -> (fadd x, (fadd c1, c2))
if (N1CFP && N0.getOpcode() == ISD::FADD && N0.getNode()->hasOneUse() &&
isConstantFPBuildVectorOrConstantFP(N0.getOperand(1)))
return DAG.getNode(ISD::FADD, DL, VT, N0.getOperand(0),
DAG.getNode(ISD::FADD, DL, VT, N0.getOperand(1), N1,
Flags),
Flags);
// If allowed, fold (fadd (fneg x), x) -> 0.0
if (AllowNewConst && N0.getOpcode() == ISD::FNEG && N0.getOperand(0) == N1)
return DAG.getConstantFP(0.0, DL, VT);
// If allowed, fold (fadd x, (fneg x)) -> 0.0
if (AllowNewConst && N1.getOpcode() == ISD::FNEG && N1.getOperand(0) == N0)
return DAG.getConstantFP(0.0, DL, VT);
// We can fold chains of FADD's of the same value into multiplications.
// This transform is not safe in general because we are reducing the number
// of rounding steps.
if (TLI.isOperationLegalOrCustom(ISD::FMUL, VT) && !N0CFP && !N1CFP) {
if (N0.getOpcode() == ISD::FMUL) {
bool CFP00 = isConstantFPBuildVectorOrConstantFP(N0.getOperand(0));
bool CFP01 = isConstantFPBuildVectorOrConstantFP(N0.getOperand(1));
// (fadd (fmul x, c), x) -> (fmul x, c+1)
if (CFP01 && !CFP00 && N0.getOperand(0) == N1) {
SDValue NewCFP = DAG.getNode(ISD::FADD, DL, VT, N0.getOperand(1),
DAG.getConstantFP(1.0, DL, VT), Flags);
return DAG.getNode(ISD::FMUL, DL, VT, N1, NewCFP, Flags);
}
// (fadd (fmul x, c), (fadd x, x)) -> (fmul x, c+2)
if (CFP01 && !CFP00 && N1.getOpcode() == ISD::FADD &&
N1.getOperand(0) == N1.getOperand(1) &&
N0.getOperand(0) == N1.getOperand(0)) {
SDValue NewCFP = DAG.getNode(ISD::FADD, DL, VT, N0.getOperand(1),
DAG.getConstantFP(2.0, DL, VT), Flags);
return DAG.getNode(ISD::FMUL, DL, VT, N0.getOperand(0), NewCFP, Flags);
}
}
if (N1.getOpcode() == ISD::FMUL) {
bool CFP10 = isConstantFPBuildVectorOrConstantFP(N1.getOperand(0));
bool CFP11 = isConstantFPBuildVectorOrConstantFP(N1.getOperand(1));
// (fadd x, (fmul x, c)) -> (fmul x, c+1)
if (CFP11 && !CFP10 && N1.getOperand(0) == N0) {
SDValue NewCFP = DAG.getNode(ISD::FADD, DL, VT, N1.getOperand(1),
DAG.getConstantFP(1.0, DL, VT), Flags);
return DAG.getNode(ISD::FMUL, DL, VT, N0, NewCFP, Flags);
}
// (fadd (fadd x, x), (fmul x, c)) -> (fmul x, c+2)
if (CFP11 && !CFP10 && N0.getOpcode() == ISD::FADD &&
N0.getOperand(0) == N0.getOperand(1) &&
N1.getOperand(0) == N0.getOperand(0)) {
SDValue NewCFP = DAG.getNode(ISD::FADD, DL, VT, N1.getOperand(1),
DAG.getConstantFP(2.0, DL, VT), Flags);
return DAG.getNode(ISD::FMUL, DL, VT, N1.getOperand(0), NewCFP, Flags);
}
}
if (N0.getOpcode() == ISD::FADD && AllowNewConst) {
bool CFP00 = isConstantFPBuildVectorOrConstantFP(N0.getOperand(0));
// (fadd (fadd x, x), x) -> (fmul x, 3.0)
if (!CFP00 && N0.getOperand(0) == N0.getOperand(1) &&
(N0.getOperand(0) == N1)) {
return DAG.getNode(ISD::FMUL, DL, VT,
N1, DAG.getConstantFP(3.0, DL, VT), Flags);
}
}
if (N1.getOpcode() == ISD::FADD && AllowNewConst) {
bool CFP10 = isConstantFPBuildVectorOrConstantFP(N1.getOperand(0));
// (fadd x, (fadd x, x)) -> (fmul x, 3.0)
if (!CFP10 && N1.getOperand(0) == N1.getOperand(1) &&
N1.getOperand(0) == N0) {
return DAG.getNode(ISD::FMUL, DL, VT,
N0, DAG.getConstantFP(3.0, DL, VT), Flags);
}
}
// (fadd (fadd x, x), (fadd x, x)) -> (fmul x, 4.0)
if (AllowNewConst &&
N0.getOpcode() == ISD::FADD && N1.getOpcode() == ISD::FADD &&
N0.getOperand(0) == N0.getOperand(1) &&
N1.getOperand(0) == N1.getOperand(1) &&
N0.getOperand(0) == N1.getOperand(0)) {
return DAG.getNode(ISD::FMUL, DL, VT, N0.getOperand(0),
DAG.getConstantFP(4.0, DL, VT), Flags);
}
}
} // enable-unsafe-fp-math
// FADD -> FMA combines:
if (SDValue Fused = visitFADDForFMACombine(N)) {
AddToWorklist(Fused.getNode());
return Fused;
}
return SDValue();
}
SDValue DAGCombiner::visitFSUB(SDNode *N) {
SDValue N0 = N->getOperand(0);
SDValue N1 = N->getOperand(1);
ConstantFPSDNode *N0CFP = isConstOrConstSplatFP(N0);
ConstantFPSDNode *N1CFP = isConstOrConstSplatFP(N1);
EVT VT = N->getValueType(0);
SDLoc DL(N);
const TargetOptions &Options = DAG.getTarget().Options;
const SDNodeFlags *Flags = &cast<BinaryWithFlagsSDNode>(N)->Flags;
// fold vector ops
if (VT.isVector())
if (SDValue FoldedVOp = SimplifyVBinOp(N))
return FoldedVOp;
// fold (fsub c1, c2) -> c1-c2
if (N0CFP && N1CFP)
return DAG.getNode(ISD::FSUB, DL, VT, N0, N1, Flags);
if (SDValue NewSel = foldBinOpIntoSelect(N))
return NewSel;
// fold (fsub A, (fneg B)) -> (fadd A, B)
if (isNegatibleForFree(N1, LegalOperations, TLI, &Options))
return DAG.getNode(ISD::FADD, DL, VT, N0,
GetNegatedExpression(N1, DAG, LegalOperations), Flags);
// FIXME: Auto-upgrade the target/function-level option.
if (Options.NoSignedZerosFPMath || N->getFlags()->hasNoSignedZeros()) {
// (fsub 0, B) -> -B
if (N0CFP && N0CFP->isZero()) {
if (isNegatibleForFree(N1, LegalOperations, TLI, &Options))
return GetNegatedExpression(N1, DAG, LegalOperations);
if (!LegalOperations || TLI.isOperationLegal(ISD::FNEG, VT))
return DAG.getNode(ISD::FNEG, DL, VT, N1, Flags);
}
}
// If 'unsafe math' is enabled, fold lots of things.
if (Options.UnsafeFPMath) {
// (fsub A, 0) -> A
if (N1CFP && N1CFP->isZero())
return N0;
// (fsub x, x) -> 0.0
if (N0 == N1)
return DAG.getConstantFP(0.0f, DL, VT);
// (fsub x, (fadd x, y)) -> (fneg y)
// (fsub x, (fadd y, x)) -> (fneg y)
if (N1.getOpcode() == ISD::FADD) {
SDValue N10 = N1->getOperand(0);
SDValue N11 = N1->getOperand(1);
if (N10 == N0 && isNegatibleForFree(N11, LegalOperations, TLI, &Options))
return GetNegatedExpression(N11, DAG, LegalOperations);
if (N11 == N0 && isNegatibleForFree(N10, LegalOperations, TLI, &Options))
return GetNegatedExpression(N10, DAG, LegalOperations);
}
}
// FSUB -> FMA combines:
if (SDValue Fused = visitFSUBForFMACombine(N)) {
AddToWorklist(Fused.getNode());
return Fused;
}
return SDValue();
}
SDValue DAGCombiner::visitFMUL(SDNode *N) {
SDValue N0 = N->getOperand(0);
SDValue N1 = N->getOperand(1);
ConstantFPSDNode *N0CFP = isConstOrConstSplatFP(N0);
ConstantFPSDNode *N1CFP = isConstOrConstSplatFP(N1);
EVT VT = N->getValueType(0);
SDLoc DL(N);
const TargetOptions &Options = DAG.getTarget().Options;
const SDNodeFlags *Flags = &cast<BinaryWithFlagsSDNode>(N)->Flags;
// fold vector ops
if (VT.isVector()) {
// This just handles C1 * C2 for vectors. Other vector folds are below.
if (SDValue FoldedVOp = SimplifyVBinOp(N))
return FoldedVOp;
}
// fold (fmul c1, c2) -> c1*c2
if (N0CFP && N1CFP)
return DAG.getNode(ISD::FMUL, DL, VT, N0, N1, Flags);
// canonicalize constant to RHS
if (isConstantFPBuildVectorOrConstantFP(N0) &&
!isConstantFPBuildVectorOrConstantFP(N1))
return DAG.getNode(ISD::FMUL, DL, VT, N1, N0, Flags);
// fold (fmul A, 1.0) -> A
if (N1CFP && N1CFP->isExactlyValue(1.0))
return N0;
if (SDValue NewSel = foldBinOpIntoSelect(N))
return NewSel;
if (Options.UnsafeFPMath) {
// fold (fmul A, 0) -> 0
if (N1CFP && N1CFP->isZero())
return N1;
// fold (fmul (fmul x, c1), c2) -> (fmul x, (fmul c1, c2))
if (N0.getOpcode() == ISD::FMUL) {
// Fold scalars or any vector constants (not just splats).
// This fold is done in general by InstCombine, but extra fmul insts
// may have been generated during lowering.
SDValue N00 = N0.getOperand(0);
SDValue N01 = N0.getOperand(1);
auto *BV1 = dyn_cast<BuildVectorSDNode>(N1);
auto *BV00 = dyn_cast<BuildVectorSDNode>(N00);
auto *BV01 = dyn_cast<BuildVectorSDNode>(N01);
// Check 1: Make sure that the first operand of the inner multiply is NOT
// a constant. Otherwise, we may induce infinite looping.
if (!(isConstOrConstSplatFP(N00) || (BV00 && BV00->isConstant()))) {
// Check 2: Make sure that the second operand of the inner multiply and
// the second operand of the outer multiply are constants.
if ((N1CFP && isConstOrConstSplatFP(N01)) ||
(BV1 && BV01 && BV1->isConstant() && BV01->isConstant())) {
SDValue MulConsts = DAG.getNode(ISD::FMUL, DL, VT, N01, N1, Flags);
return DAG.getNode(ISD::FMUL, DL, VT, N00, MulConsts, Flags);
}
}
}
// fold (fmul (fadd x, x), c) -> (fmul x, (fmul 2.0, c))
// Undo the fmul 2.0, x -> fadd x, x transformation, since if it occurs
// during an early run of DAGCombiner can prevent folding with fmuls
// inserted during lowering.
if (N0.getOpcode() == ISD::FADD &&
(N0.getOperand(0) == N0.getOperand(1)) &&
N0.hasOneUse()) {
const SDValue Two = DAG.getConstantFP(2.0, DL, VT);
SDValue MulConsts = DAG.getNode(ISD::FMUL, DL, VT, Two, N1, Flags);
return DAG.getNode(ISD::FMUL, DL, VT, N0.getOperand(0), MulConsts, Flags);
}
}
// fold (fmul X, 2.0) -> (fadd X, X)
if (N1CFP && N1CFP->isExactlyValue(+2.0))
return DAG.getNode(ISD::FADD, DL, VT, N0, N0, Flags);
// fold (fmul X, -1.0) -> (fneg X)
if (N1CFP && N1CFP->isExactlyValue(-1.0))
if (!LegalOperations || TLI.isOperationLegal(ISD::FNEG, VT))
return DAG.getNode(ISD::FNEG, DL, VT, N0);
// fold (fmul (fneg X), (fneg Y)) -> (fmul X, Y)
if (char LHSNeg = isNegatibleForFree(N0, LegalOperations, TLI, &Options)) {
if (char RHSNeg = isNegatibleForFree(N1, LegalOperations, TLI, &Options)) {
// Both can be negated for free, check to see if at least one is cheaper
// negated.
if (LHSNeg == 2 || RHSNeg == 2)
return DAG.getNode(ISD::FMUL, DL, VT,
GetNegatedExpression(N0, DAG, LegalOperations),
GetNegatedExpression(N1, DAG, LegalOperations),
Flags);
}
}
// FMUL -> FMA combines:
if (SDValue Fused = visitFMULForFMADistributiveCombine(N)) {
AddToWorklist(Fused.getNode());
return Fused;
}
return SDValue();
}
SDValue DAGCombiner::visitFMA(SDNode *N) {
SDValue N0 = N->getOperand(0);
SDValue N1 = N->getOperand(1);
SDValue N2 = N->getOperand(2);
ConstantFPSDNode *N0CFP = dyn_cast<ConstantFPSDNode>(N0);
ConstantFPSDNode *N1CFP = dyn_cast<ConstantFPSDNode>(N1);
EVT VT = N->getValueType(0);
SDLoc DL(N);
const TargetOptions &Options = DAG.getTarget().Options;
// Constant fold FMA.
if (isa<ConstantFPSDNode>(N0) &&
isa<ConstantFPSDNode>(N1) &&
isa<ConstantFPSDNode>(N2)) {
return DAG.getNode(ISD::FMA, DL, VT, N0, N1, N2);
}
if (Options.UnsafeFPMath) {
if (N0CFP && N0CFP->isZero())
return N2;
if (N1CFP && N1CFP->isZero())
return N2;
}
// TODO: The FMA node should have flags that propagate to these nodes.
if (N0CFP && N0CFP->isExactlyValue(1.0))
return DAG.getNode(ISD::FADD, SDLoc(N), VT, N1, N2);
if (N1CFP && N1CFP->isExactlyValue(1.0))
return DAG.getNode(ISD::FADD, SDLoc(N), VT, N0, N2);
// Canonicalize (fma c, x, y) -> (fma x, c, y)
if (isConstantFPBuildVectorOrConstantFP(N0) &&
!isConstantFPBuildVectorOrConstantFP(N1))
return DAG.getNode(ISD::FMA, SDLoc(N), VT, N1, N0, N2);
// TODO: FMA nodes should have flags that propagate to the created nodes.
// For now, create a Flags object for use with all unsafe math transforms.
SDNodeFlags Flags;
Flags.setUnsafeAlgebra(true);
if (Options.UnsafeFPMath) {
// (fma x, c1, (fmul x, c2)) -> (fmul x, c1+c2)
if (N2.getOpcode() == ISD::FMUL && N0 == N2.getOperand(0) &&
isConstantFPBuildVectorOrConstantFP(N1) &&
isConstantFPBuildVectorOrConstantFP(N2.getOperand(1))) {
return DAG.getNode(ISD::FMUL, DL, VT, N0,
DAG.getNode(ISD::FADD, DL, VT, N1, N2.getOperand(1),
&Flags), &Flags);
}
// (fma (fmul x, c1), c2, y) -> (fma x, c1*c2, y)
if (N0.getOpcode() == ISD::FMUL &&
isConstantFPBuildVectorOrConstantFP(N1) &&
isConstantFPBuildVectorOrConstantFP(N0.getOperand(1))) {
return DAG.getNode(ISD::FMA, DL, VT,
N0.getOperand(0),
DAG.getNode(ISD::FMUL, DL, VT, N1, N0.getOperand(1),
&Flags),
N2);
}
}
// (fma x, 1, y) -> (fadd x, y)
// (fma x, -1, y) -> (fadd (fneg x), y)
if (N1CFP) {
if (N1CFP->isExactlyValue(1.0))
// TODO: The FMA node should have flags that propagate to this node.
return DAG.getNode(ISD::FADD, DL, VT, N0, N2);
if (N1CFP->isExactlyValue(-1.0) &&
(!LegalOperations || TLI.isOperationLegal(ISD::FNEG, VT))) {
SDValue RHSNeg = DAG.getNode(ISD::FNEG, DL, VT, N0);
AddToWorklist(RHSNeg.getNode());
// TODO: The FMA node should have flags that propagate to this node.
return DAG.getNode(ISD::FADD, DL, VT, N2, RHSNeg);
}
}
if (Options.UnsafeFPMath) {
// (fma x, c, x) -> (fmul x, (c+1))
if (N1CFP && N0 == N2) {
return DAG.getNode(ISD::FMUL, DL, VT, N0,
DAG.getNode(ISD::FADD, DL, VT, N1,
DAG.getConstantFP(1.0, DL, VT), &Flags),
&Flags);
}
// (fma x, c, (fneg x)) -> (fmul x, (c-1))
if (N1CFP && N2.getOpcode() == ISD::FNEG && N2.getOperand(0) == N0) {
return DAG.getNode(ISD::FMUL, DL, VT, N0,
DAG.getNode(ISD::FADD, DL, VT, N1,
DAG.getConstantFP(-1.0, DL, VT), &Flags),
&Flags);
}
}
return SDValue();
}
// Combine multiple FDIVs with the same divisor into multiple FMULs by the
// reciprocal.
// E.g., (a / D; b / D;) -> (recip = 1.0 / D; a * recip; b * recip)
// Notice that this is not always beneficial. One reason is different targets
// may have different costs for FDIV and FMUL, so sometimes the cost of two
// FDIVs may be lower than the cost of one FDIV and two FMULs. Another reason
// is the critical path is increased from "one FDIV" to "one FDIV + one FMUL".
SDValue DAGCombiner::combineRepeatedFPDivisors(SDNode *N) {
bool UnsafeMath = DAG.getTarget().Options.UnsafeFPMath;
const SDNodeFlags *Flags = N->getFlags();
if (!UnsafeMath && !Flags->hasAllowReciprocal())
return SDValue();
// Skip if current node is a reciprocal.
SDValue N0 = N->getOperand(0);
ConstantFPSDNode *N0CFP = dyn_cast<ConstantFPSDNode>(N0);
if (N0CFP && N0CFP->isExactlyValue(1.0))
return SDValue();
// Exit early if the target does not want this transform or if there can't
// possibly be enough uses of the divisor to make the transform worthwhile.
SDValue N1 = N->getOperand(1);
unsigned MinUses = TLI.combineRepeatedFPDivisors();
if (!MinUses || N1->use_size() < MinUses)
return SDValue();
// Find all FDIV users of the same divisor.
// Use a set because duplicates may be present in the user list.
SetVector<SDNode *> Users;
for (auto *U : N1->uses()) {
if (U->getOpcode() == ISD::FDIV && U->getOperand(1) == N1) {
// This division is eligible for optimization only if global unsafe math
// is enabled or if this division allows reciprocal formation.
if (UnsafeMath || U->getFlags()->hasAllowReciprocal())
Users.insert(U);
}
}
// Now that we have the actual number of divisor uses, make sure it meets
// the minimum threshold specified by the target.
if (Users.size() < MinUses)
return SDValue();
EVT VT = N->getValueType(0);
SDLoc DL(N);
SDValue FPOne = DAG.getConstantFP(1.0, DL, VT);
SDValue Reciprocal = DAG.getNode(ISD::FDIV, DL, VT, FPOne, N1, Flags);
// Dividend / Divisor -> Dividend * Reciprocal
for (auto *U : Users) {
SDValue Dividend = U->getOperand(0);
if (Dividend != FPOne) {
SDValue NewNode = DAG.getNode(ISD::FMUL, SDLoc(U), VT, Dividend,
Reciprocal, Flags);
CombineTo(U, NewNode);
} else if (U != Reciprocal.getNode()) {
// In the absence of fast-math-flags, this user node is always the
// same node as Reciprocal, but with FMF they may be different nodes.
CombineTo(U, Reciprocal);
}
}
return SDValue(N, 0); // N was replaced.
}
SDValue DAGCombiner::visitFDIV(SDNode *N) {
SDValue N0 = N->getOperand(0);
SDValue N1 = N->getOperand(1);
ConstantFPSDNode *N0CFP = dyn_cast<ConstantFPSDNode>(N0);
ConstantFPSDNode *N1CFP = dyn_cast<ConstantFPSDNode>(N1);
EVT VT = N->getValueType(0);
SDLoc DL(N);
const TargetOptions &Options = DAG.getTarget().Options;
SDNodeFlags *Flags = &cast<BinaryWithFlagsSDNode>(N)->Flags;
// fold vector ops
if (VT.isVector())
if (SDValue FoldedVOp = SimplifyVBinOp(N))
return FoldedVOp;
// fold (fdiv c1, c2) -> c1/c2
if (N0CFP && N1CFP)
return DAG.getNode(ISD::FDIV, SDLoc(N), VT, N0, N1, Flags);
if (SDValue NewSel = foldBinOpIntoSelect(N))
return NewSel;
if (Options.UnsafeFPMath) {
// fold (fdiv X, c2) -> fmul X, 1/c2 if losing precision is acceptable.
if (N1CFP) {
// Compute the reciprocal 1.0 / c2.
const APFloat &N1APF = N1CFP->getValueAPF();
APFloat Recip(N1APF.getSemantics(), 1); // 1.0
APFloat::opStatus st = Recip.divide(N1APF, APFloat::rmNearestTiesToEven);
// Only do the transform if the reciprocal is a legal fp immediate that
// isn't too nasty (eg NaN, denormal, ...).
if ((st == APFloat::opOK || st == APFloat::opInexact) && // Not too nasty
(!LegalOperations ||
// FIXME: custom lowering of ConstantFP might fail (see e.g. ARM
// backend)... we should handle this gracefully after Legalize.
// TLI.isOperationLegalOrCustom(llvm::ISD::ConstantFP, VT) ||
TLI.isOperationLegal(llvm::ISD::ConstantFP, VT) ||
TLI.isFPImmLegal(Recip, VT)))
return DAG.getNode(ISD::FMUL, DL, VT, N0,
DAG.getConstantFP(Recip, DL, VT), Flags);
}
// If this FDIV is part of a reciprocal square root, it may be folded
// into a target-specific square root estimate instruction.
if (N1.getOpcode() == ISD::FSQRT) {
if (SDValue RV = buildRsqrtEstimate(N1.getOperand(0), Flags)) {
return DAG.getNode(ISD::FMUL, DL, VT, N0, RV, Flags);
}
} else if (N1.getOpcode() == ISD::FP_EXTEND &&
N1.getOperand(0).getOpcode() == ISD::FSQRT) {
if (SDValue RV = buildRsqrtEstimate(N1.getOperand(0).getOperand(0),
Flags)) {
RV = DAG.getNode(ISD::FP_EXTEND, SDLoc(N1), VT, RV);
AddToWorklist(RV.getNode());
return DAG.getNode(ISD::FMUL, DL, VT, N0, RV, Flags);
}
} else if (N1.getOpcode() == ISD::FP_ROUND &&
N1.getOperand(0).getOpcode() == ISD::FSQRT) {
if (SDValue RV = buildRsqrtEstimate(N1.getOperand(0).getOperand(0),
Flags)) {
RV = DAG.getNode(ISD::FP_ROUND, SDLoc(N1), VT, RV, N1.getOperand(1));
AddToWorklist(RV.getNode());
return DAG.getNode(ISD::FMUL, DL, VT, N0, RV, Flags);
}
} else if (N1.getOpcode() == ISD::FMUL) {
// Look through an FMUL. Even though this won't remove the FDIV directly,
// it's still worthwhile to get rid of the FSQRT if possible.
SDValue SqrtOp;
SDValue OtherOp;
if (N1.getOperand(0).getOpcode() == ISD::FSQRT) {
SqrtOp = N1.getOperand(0);
OtherOp = N1.getOperand(1);
} else if (N1.getOperand(1).getOpcode() == ISD::FSQRT) {
SqrtOp = N1.getOperand(1);
OtherOp = N1.getOperand(0);
}
if (SqrtOp.getNode()) {
// We found a FSQRT, so try to make this fold:
// x / (y * sqrt(z)) -> x * (rsqrt(z) / y)
if (SDValue RV = buildRsqrtEstimate(SqrtOp.getOperand(0), Flags)) {
RV = DAG.getNode(ISD::FDIV, SDLoc(N1), VT, RV, OtherOp, Flags);
AddToWorklist(RV.getNode());
return DAG.getNode(ISD::FMUL, DL, VT, N0, RV, Flags);
}
}
}
// Fold into a reciprocal estimate and multiply instead of a real divide.
if (SDValue RV = BuildReciprocalEstimate(N1, Flags)) {
AddToWorklist(RV.getNode());
return DAG.getNode(ISD::FMUL, DL, VT, N0, RV, Flags);
}
}
// (fdiv (fneg X), (fneg Y)) -> (fdiv X, Y)
if (char LHSNeg = isNegatibleForFree(N0, LegalOperations, TLI, &Options)) {
if (char RHSNeg = isNegatibleForFree(N1, LegalOperations, TLI, &Options)) {
// Both can be negated for free, check to see if at least one is cheaper
// negated.
if (LHSNeg == 2 || RHSNeg == 2)
return DAG.getNode(ISD::FDIV, SDLoc(N), VT,
GetNegatedExpression(N0, DAG, LegalOperations),
GetNegatedExpression(N1, DAG, LegalOperations),
Flags);
}
}
if (SDValue CombineRepeatedDivisors = combineRepeatedFPDivisors(N))
return CombineRepeatedDivisors;
return SDValue();
}
SDValue DAGCombiner::visitFREM(SDNode *N) {
SDValue N0 = N->getOperand(0);
SDValue N1 = N->getOperand(1);
ConstantFPSDNode *N0CFP = dyn_cast<ConstantFPSDNode>(N0);
ConstantFPSDNode *N1CFP = dyn_cast<ConstantFPSDNode>(N1);
EVT VT = N->getValueType(0);
// fold (frem c1, c2) -> fmod(c1,c2)
if (N0CFP && N1CFP)
return DAG.getNode(ISD::FREM, SDLoc(N), VT, N0, N1,
&cast<BinaryWithFlagsSDNode>(N)->Flags);
if (SDValue NewSel = foldBinOpIntoSelect(N))
return NewSel;
return SDValue();
}
SDValue DAGCombiner::visitFSQRT(SDNode *N) {
if (!DAG.getTarget().Options.UnsafeFPMath)
return SDValue();
SDValue N0 = N->getOperand(0);
if (TLI.isFsqrtCheap(N0, DAG))
return SDValue();
// TODO: FSQRT nodes should have flags that propagate to the created nodes.
// For now, create a Flags object for use with all unsafe math transforms.
SDNodeFlags Flags;
Flags.setUnsafeAlgebra(true);
return buildSqrtEstimate(N0, &Flags);
}
/// copysign(x, fp_extend(y)) -> copysign(x, y)
/// copysign(x, fp_round(y)) -> copysign(x, y)
static inline bool CanCombineFCOPYSIGN_EXTEND_ROUND(SDNode *N) {
SDValue N1 = N->getOperand(1);
if ((N1.getOpcode() == ISD::FP_EXTEND ||
N1.getOpcode() == ISD::FP_ROUND)) {
// Do not optimize out type conversion of f128 type yet.
// For some targets like x86_64, configuration is changed to keep one f128
// value in one SSE register, but instruction selection cannot handle
// FCOPYSIGN on SSE registers yet.
EVT N1VT = N1->getValueType(0);
EVT N1Op0VT = N1->getOperand(0)->getValueType(0);
return (N1VT == N1Op0VT || N1Op0VT != MVT::f128);
}
return false;
}
SDValue DAGCombiner::visitFCOPYSIGN(SDNode *N) {
SDValue N0 = N->getOperand(0);
SDValue N1 = N->getOperand(1);
ConstantFPSDNode *N0CFP = dyn_cast<ConstantFPSDNode>(N0);
ConstantFPSDNode *N1CFP = dyn_cast<ConstantFPSDNode>(N1);
EVT VT = N->getValueType(0);
if (N0CFP && N1CFP) // Constant fold
return DAG.getNode(ISD::FCOPYSIGN, SDLoc(N), VT, N0, N1);
if (N1CFP) {
const APFloat &V = N1CFP->getValueAPF();
// copysign(x, c1) -> fabs(x) iff ispos(c1)
// copysign(x, c1) -> fneg(fabs(x)) iff isneg(c1)
if (!V.isNegative()) {
if (!LegalOperations || TLI.isOperationLegal(ISD::FABS, VT))
return DAG.getNode(ISD::FABS, SDLoc(N), VT, N0);
} else {
if (!LegalOperations || TLI.isOperationLegal(ISD::FNEG, VT))
return DAG.getNode(ISD::FNEG, SDLoc(N), VT,
DAG.getNode(ISD::FABS, SDLoc(N0), VT, N0));
}
}
// copysign(fabs(x), y) -> copysign(x, y)
// copysign(fneg(x), y) -> copysign(x, y)
// copysign(copysign(x,z), y) -> copysign(x, y)
if (N0.getOpcode() == ISD::FABS || N0.getOpcode() == ISD::FNEG ||
N0.getOpcode() == ISD::FCOPYSIGN)
return DAG.getNode(ISD::FCOPYSIGN, SDLoc(N), VT, N0.getOperand(0), N1);
// copysign(x, abs(y)) -> abs(x)
if (N1.getOpcode() == ISD::FABS)
return DAG.getNode(ISD::FABS, SDLoc(N), VT, N0);
// copysign(x, copysign(y,z)) -> copysign(x, z)
if (N1.getOpcode() == ISD::FCOPYSIGN)
return DAG.getNode(ISD::FCOPYSIGN, SDLoc(N), VT, N0, N1.getOperand(1));
// copysign(x, fp_extend(y)) -> copysign(x, y)
// copysign(x, fp_round(y)) -> copysign(x, y)
if (CanCombineFCOPYSIGN_EXTEND_ROUND(N))
return DAG.getNode(ISD::FCOPYSIGN, SDLoc(N), VT, N0, N1.getOperand(0));
return SDValue();
}
SDValue DAGCombiner::visitSINT_TO_FP(SDNode *N) {
SDValue N0 = N->getOperand(0);
EVT VT = N->getValueType(0);
EVT OpVT = N0.getValueType();
// fold (sint_to_fp c1) -> c1fp
if (DAG.isConstantIntBuildVectorOrConstantInt(N0) &&
// ...but only if the target supports immediate floating-point values
(!LegalOperations ||
TLI.isOperationLegalOrCustom(llvm::ISD::ConstantFP, VT)))
return DAG.getNode(ISD::SINT_TO_FP, SDLoc(N), VT, N0);
// If the input is a legal type, and SINT_TO_FP is not legal on this target,
// but UINT_TO_FP is legal on this target, try to convert.
if (!TLI.isOperationLegalOrCustom(ISD::SINT_TO_FP, OpVT) &&
TLI.isOperationLegalOrCustom(ISD::UINT_TO_FP, OpVT)) {
// If the sign bit is known to be zero, we can change this to UINT_TO_FP.
if (DAG.SignBitIsZero(N0))
return DAG.getNode(ISD::UINT_TO_FP, SDLoc(N), VT, N0);
}
// The next optimizations are desirable only if SELECT_CC can be lowered.
if (TLI.isOperationLegalOrCustom(ISD::SELECT_CC, VT) || !LegalOperations) {
// fold (sint_to_fp (setcc x, y, cc)) -> (select_cc x, y, -1.0, 0.0,, cc)
if (N0.getOpcode() == ISD::SETCC && N0.getValueType() == MVT::i1 &&
!VT.isVector() &&
(!LegalOperations ||
TLI.isOperationLegalOrCustom(llvm::ISD::ConstantFP, VT))) {
SDLoc DL(N);
SDValue Ops[] =
{ N0.getOperand(0), N0.getOperand(1),
DAG.getConstantFP(-1.0, DL, VT), DAG.getConstantFP(0.0, DL, VT),
N0.getOperand(2) };
return DAG.getNode(ISD::SELECT_CC, DL, VT, Ops);
}
// fold (sint_to_fp (zext (setcc x, y, cc))) ->
// (select_cc x, y, 1.0, 0.0,, cc)
if (N0.getOpcode() == ISD::ZERO_EXTEND &&
N0.getOperand(0).getOpcode() == ISD::SETCC &&!VT.isVector() &&
(!LegalOperations ||
TLI.isOperationLegalOrCustom(llvm::ISD::ConstantFP, VT))) {
SDLoc DL(N);
SDValue Ops[] =
{ N0.getOperand(0).getOperand(0), N0.getOperand(0).getOperand(1),
DAG.getConstantFP(1.0, DL, VT), DAG.getConstantFP(0.0, DL, VT),
N0.getOperand(0).getOperand(2) };
return DAG.getNode(ISD::SELECT_CC, DL, VT, Ops);
}
}
return SDValue();
}
SDValue DAGCombiner::visitUINT_TO_FP(SDNode *N) {
SDValue N0 = N->getOperand(0);
EVT VT = N->getValueType(0);
EVT OpVT = N0.getValueType();
// fold (uint_to_fp c1) -> c1fp
if (DAG.isConstantIntBuildVectorOrConstantInt(N0) &&
// ...but only if the target supports immediate floating-point values
(!LegalOperations ||
TLI.isOperationLegalOrCustom(llvm::ISD::ConstantFP, VT)))
return DAG.getNode(ISD::UINT_TO_FP, SDLoc(N), VT, N0);
// If the input is a legal type, and UINT_TO_FP is not legal on this target,
// but SINT_TO_FP is legal on this target, try to convert.
if (!TLI.isOperationLegalOrCustom(ISD::UINT_TO_FP, OpVT) &&
TLI.isOperationLegalOrCustom(ISD::SINT_TO_FP, OpVT)) {
// If the sign bit is known to be zero, we can change this to SINT_TO_FP.
if (DAG.SignBitIsZero(N0))
return DAG.getNode(ISD::SINT_TO_FP, SDLoc(N), VT, N0);
}
// The next optimizations are desirable only if SELECT_CC can be lowered.
if (TLI.isOperationLegalOrCustom(ISD::SELECT_CC, VT) || !LegalOperations) {
// fold (uint_to_fp (setcc x, y, cc)) -> (select_cc x, y, -1.0, 0.0,, cc)
if (N0.getOpcode() == ISD::SETCC && !VT.isVector() &&
(!LegalOperations ||
TLI.isOperationLegalOrCustom(llvm::ISD::ConstantFP, VT))) {
SDLoc DL(N);
SDValue Ops[] =
{ N0.getOperand(0), N0.getOperand(1),
DAG.getConstantFP(1.0, DL, VT), DAG.getConstantFP(0.0, DL, VT),
N0.getOperand(2) };
return DAG.getNode(ISD::SELECT_CC, DL, VT, Ops);
}
}
return SDValue();
}
// Fold (fp_to_{s/u}int ({s/u}int_to_fpx)) -> zext x, sext x, trunc x, or x
static SDValue FoldIntToFPToInt(SDNode *N, SelectionDAG &DAG) {
SDValue N0 = N->getOperand(0);
EVT VT = N->getValueType(0);
if (N0.getOpcode() != ISD::UINT_TO_FP && N0.getOpcode() != ISD::SINT_TO_FP)
return SDValue();
SDValue Src = N0.getOperand(0);
EVT SrcVT = Src.getValueType();
bool IsInputSigned = N0.getOpcode() == ISD::SINT_TO_FP;
bool IsOutputSigned = N->getOpcode() == ISD::FP_TO_SINT;
// We can safely assume the conversion won't overflow the output range,
// because (for example) (uint8_t)18293.f is undefined behavior.
// Since we can assume the conversion won't overflow, our decision as to
// whether the input will fit in the float should depend on the minimum
// of the input range and output range.
// This means this is also safe for a signed input and unsigned output, since
// a negative input would lead to undefined behavior.
unsigned InputSize = (int)SrcVT.getScalarSizeInBits() - IsInputSigned;
unsigned OutputSize = (int)VT.getScalarSizeInBits() - IsOutputSigned;
unsigned ActualSize = std::min(InputSize, OutputSize);
const fltSemantics &sem = DAG.EVTToAPFloatSemantics(N0.getValueType());
// We can only fold away the float conversion if the input range can be
// represented exactly in the float range.
if (APFloat::semanticsPrecision(sem) >= ActualSize) {
if (VT.getScalarSizeInBits() > SrcVT.getScalarSizeInBits()) {
unsigned ExtOp = IsInputSigned && IsOutputSigned ? ISD::SIGN_EXTEND
: ISD::ZERO_EXTEND;
return DAG.getNode(ExtOp, SDLoc(N), VT, Src);
}
if (VT.getScalarSizeInBits() < SrcVT.getScalarSizeInBits())
return DAG.getNode(ISD::TRUNCATE, SDLoc(N), VT, Src);
return DAG.getBitcast(VT, Src);
}
return SDValue();
}
SDValue DAGCombiner::visitFP_TO_SINT(SDNode *N) {
SDValue N0 = N->getOperand(0);
EVT VT = N->getValueType(0);
// fold (fp_to_sint c1fp) -> c1
if (isConstantFPBuildVectorOrConstantFP(N0))
return DAG.getNode(ISD::FP_TO_SINT, SDLoc(N), VT, N0);
return FoldIntToFPToInt(N, DAG);
}
SDValue DAGCombiner::visitFP_TO_UINT(SDNode *N) {
SDValue N0 = N->getOperand(0);
EVT VT = N->getValueType(0);
// fold (fp_to_uint c1fp) -> c1
if (isConstantFPBuildVectorOrConstantFP(N0))
return DAG.getNode(ISD::FP_TO_UINT, SDLoc(N), VT, N0);
return FoldIntToFPToInt(N, DAG);
}
SDValue DAGCombiner::visitFP_ROUND(SDNode *N) {
SDValue N0 = N->getOperand(0);
SDValue N1 = N->getOperand(1);
ConstantFPSDNode *N0CFP = dyn_cast<ConstantFPSDNode>(N0);
EVT VT = N->getValueType(0);
// fold (fp_round c1fp) -> c1fp
if (N0CFP)
return DAG.getNode(ISD::FP_ROUND, SDLoc(N), VT, N0, N1);
// fold (fp_round (fp_extend x)) -> x
if (N0.getOpcode() == ISD::FP_EXTEND && VT == N0.getOperand(0).getValueType())
return N0.getOperand(0);
// fold (fp_round (fp_round x)) -> (fp_round x)
if (N0.getOpcode() == ISD::FP_ROUND) {
const bool NIsTrunc = N->getConstantOperandVal(1) == 1;
const bool N0IsTrunc = N0.getConstantOperandVal(1) == 1;
// Skip this folding if it results in an fp_round from f80 to f16.
//
// f80 to f16 always generates an expensive (and as yet, unimplemented)
// libcall to __truncxfhf2 instead of selecting native f16 conversion
// instructions from f32 or f64. Moreover, the first (value-preserving)
// fp_round from f80 to either f32 or f64 may become a NOP in platforms like
// x86.
if (N0.getOperand(0).getValueType() == MVT::f80 && VT == MVT::f16)
return SDValue();
// If the first fp_round isn't a value preserving truncation, it might
// introduce a tie in the second fp_round, that wouldn't occur in the
// single-step fp_round we want to fold to.
// In other words, double rounding isn't the same as rounding.
// Also, this is a value preserving truncation iff both fp_round's are.
if (DAG.getTarget().Options.UnsafeFPMath || N0IsTrunc) {
SDLoc DL(N);
return DAG.getNode(ISD::FP_ROUND, DL, VT, N0.getOperand(0),
DAG.getIntPtrConstant(NIsTrunc && N0IsTrunc, DL));
}
}
// fold (fp_round (copysign X, Y)) -> (copysign (fp_round X), Y)
if (N0.getOpcode() == ISD::FCOPYSIGN && N0.getNode()->hasOneUse()) {
SDValue Tmp = DAG.getNode(ISD::FP_ROUND, SDLoc(N0), VT,
N0.getOperand(0), N1);
AddToWorklist(Tmp.getNode());
return DAG.getNode(ISD::FCOPYSIGN, SDLoc(N), VT,
Tmp, N0.getOperand(1));
}
return SDValue();
}
SDValue DAGCombiner::visitFP_ROUND_INREG(SDNode *N) {
SDValue N0 = N->getOperand(0);
EVT VT = N->getValueType(0);
EVT EVT = cast<VTSDNode>(N->getOperand(1))->getVT();
ConstantFPSDNode *N0CFP = dyn_cast<ConstantFPSDNode>(N0);
// fold (fp_round_inreg c1fp) -> c1fp
if (N0CFP && isTypeLegal(EVT)) {
SDLoc DL(N);
SDValue Round = DAG.getConstantFP(*N0CFP->getConstantFPValue(), DL, EVT);
return DAG.getNode(ISD::FP_EXTEND, DL, VT, Round);
}
return SDValue();
}
SDValue DAGCombiner::visitFP_EXTEND(SDNode *N) {
SDValue N0 = N->getOperand(0);
EVT VT = N->getValueType(0);
// If this is fp_round(fpextend), don't fold it, allow ourselves to be folded.
if (N->hasOneUse() &&
N->use_begin()->getOpcode() == ISD::FP_ROUND)
return SDValue();
// fold (fp_extend c1fp) -> c1fp
if (isConstantFPBuildVectorOrConstantFP(N0))
return DAG.getNode(ISD::FP_EXTEND, SDLoc(N), VT, N0);
// fold (fp_extend (fp16_to_fp op)) -> (fp16_to_fp op)
if (N0.getOpcode() == ISD::FP16_TO_FP &&
TLI.getOperationAction(ISD::FP16_TO_FP, VT) == TargetLowering::Legal)
return DAG.getNode(ISD::FP16_TO_FP, SDLoc(N), VT, N0.getOperand(0));
// Turn fp_extend(fp_round(X, 1)) -> x since the fp_round doesn't affect the
// value of X.
if (N0.getOpcode() == ISD::FP_ROUND
&& N0.getConstantOperandVal(1) == 1) {
SDValue In = N0.getOperand(0);
if (In.getValueType() == VT) return In;
if (VT.bitsLT(In.getValueType()))
return DAG.getNode(ISD::FP_ROUND, SDLoc(N), VT,
In, N0.getOperand(1));
return DAG.getNode(ISD::FP_EXTEND, SDLoc(N), VT, In);
}
// fold (fpext (load x)) -> (fpext (fptrunc (extload x)))
if (ISD::isNormalLoad(N0.getNode()) && N0.hasOneUse() &&
TLI.isLoadExtLegal(ISD::EXTLOAD, VT, N0.getValueType())) {
LoadSDNode *LN0 = cast<LoadSDNode>(N0);
SDValue ExtLoad = DAG.getExtLoad(ISD::EXTLOAD, SDLoc(N), VT,
LN0->getChain(),
LN0->getBasePtr(), N0.getValueType(),
LN0->getMemOperand());
CombineTo(N, ExtLoad);
CombineTo(N0.getNode(),
DAG.getNode(ISD::FP_ROUND, SDLoc(N0),
N0.getValueType(), ExtLoad,
DAG.getIntPtrConstant(1, SDLoc(N0))),
ExtLoad.getValue(1));
return SDValue(N, 0); // Return N so it doesn't get rechecked!
}
return SDValue();
}
SDValue DAGCombiner::visitFCEIL(SDNode *N) {
SDValue N0 = N->getOperand(0);
EVT VT = N->getValueType(0);
// fold (fceil c1) -> fceil(c1)
if (isConstantFPBuildVectorOrConstantFP(N0))
return DAG.getNode(ISD::FCEIL, SDLoc(N), VT, N0);
return SDValue();
}
SDValue DAGCombiner::visitFTRUNC(SDNode *N) {
SDValue N0 = N->getOperand(0);
EVT VT = N->getValueType(0);
// fold (ftrunc c1) -> ftrunc(c1)
if (isConstantFPBuildVectorOrConstantFP(N0))
return DAG.getNode(ISD::FTRUNC, SDLoc(N), VT, N0);
return SDValue();
}
SDValue DAGCombiner::visitFFLOOR(SDNode *N) {
SDValue N0 = N->getOperand(0);
EVT VT = N->getValueType(0);
// fold (ffloor c1) -> ffloor(c1)
if (isConstantFPBuildVectorOrConstantFP(N0))
return DAG.getNode(ISD::FFLOOR, SDLoc(N), VT, N0);
return SDValue();
}
// FIXME: FNEG and FABS have a lot in common; refactor.
SDValue DAGCombiner::visitFNEG(SDNode *N) {
SDValue N0 = N->getOperand(0);
EVT VT = N->getValueType(0);
// Constant fold FNEG.
if (isConstantFPBuildVectorOrConstantFP(N0))
return DAG.getNode(ISD::FNEG, SDLoc(N), VT, N0);
if (isNegatibleForFree(N0, LegalOperations, DAG.getTargetLoweringInfo(),
&DAG.getTarget().Options))
return GetNegatedExpression(N0, DAG, LegalOperations);
// Transform fneg(bitconvert(x)) -> bitconvert(x ^ sign) to avoid loading
// constant pool values.
if (!TLI.isFNegFree(VT) &&
N0.getOpcode() == ISD::BITCAST &&
N0.getNode()->hasOneUse()) {
SDValue Int = N0.getOperand(0);
EVT IntVT = Int.getValueType();
if (IntVT.isInteger() && !IntVT.isVector()) {
APInt SignMask;
if (N0.getValueType().isVector()) {
// For a vector, get a mask such as 0x80... per scalar element
// and splat it.
SignMask = APInt::getSignBit(N0.getScalarValueSizeInBits());
SignMask = APInt::getSplat(IntVT.getSizeInBits(), SignMask);
} else {
// For a scalar, just generate 0x80...
SignMask = APInt::getSignBit(IntVT.getSizeInBits());
}
SDLoc DL0(N0);
Int = DAG.getNode(ISD::XOR, DL0, IntVT, Int,
DAG.getConstant(SignMask, DL0, IntVT));
AddToWorklist(Int.getNode());
return DAG.getBitcast(VT, Int);
}
}
// (fneg (fmul c, x)) -> (fmul -c, x)
if (N0.getOpcode() == ISD::FMUL &&
(N0.getNode()->hasOneUse() || !TLI.isFNegFree(VT))) {
ConstantFPSDNode *CFP1 = dyn_cast<ConstantFPSDNode>(N0.getOperand(1));
if (CFP1) {
APFloat CVal = CFP1->getValueAPF();
CVal.changeSign();
if (Level >= AfterLegalizeDAG &&
(TLI.isFPImmLegal(CVal, VT) ||
TLI.isOperationLegal(ISD::ConstantFP, VT)))
return DAG.getNode(ISD::FMUL, SDLoc(N), VT, N0.getOperand(0),
DAG.getNode(ISD::FNEG, SDLoc(N), VT,
N0.getOperand(1)),
&cast<BinaryWithFlagsSDNode>(N0)->Flags);
}
}
return SDValue();
}
SDValue DAGCombiner::visitFMINNUM(SDNode *N) {
SDValue N0 = N->getOperand(0);
SDValue N1 = N->getOperand(1);
EVT VT = N->getValueType(0);
const ConstantFPSDNode *N0CFP = isConstOrConstSplatFP(N0);
const ConstantFPSDNode *N1CFP = isConstOrConstSplatFP(N1);
if (N0CFP && N1CFP) {
const APFloat &C0 = N0CFP->getValueAPF();
const APFloat &C1 = N1CFP->getValueAPF();
return DAG.getConstantFP(minnum(C0, C1), SDLoc(N), VT);
}
// Canonicalize to constant on RHS.
if (isConstantFPBuildVectorOrConstantFP(N0) &&
!isConstantFPBuildVectorOrConstantFP(N1))
return DAG.getNode(ISD::FMINNUM, SDLoc(N), VT, N1, N0);
return SDValue();
}
SDValue DAGCombiner::visitFMAXNUM(SDNode *N) {
SDValue N0 = N->getOperand(0);
SDValue N1 = N->getOperand(1);
EVT VT = N->getValueType(0);
const ConstantFPSDNode *N0CFP = isConstOrConstSplatFP(N0);
const ConstantFPSDNode *N1CFP = isConstOrConstSplatFP(N1);
if (N0CFP && N1CFP) {
const APFloat &C0 = N0CFP->getValueAPF();
const APFloat &C1 = N1CFP->getValueAPF();
return DAG.getConstantFP(maxnum(C0, C1), SDLoc(N), VT);
}
// Canonicalize to constant on RHS.
if (isConstantFPBuildVectorOrConstantFP(N0) &&
!isConstantFPBuildVectorOrConstantFP(N1))
return DAG.getNode(ISD::FMAXNUM, SDLoc(N), VT, N1, N0);
return SDValue();
}
SDValue DAGCombiner::visitFABS(SDNode *N) {
SDValue N0 = N->getOperand(0);
EVT VT = N->getValueType(0);
// fold (fabs c1) -> fabs(c1)
if (isConstantFPBuildVectorOrConstantFP(N0))
return DAG.getNode(ISD::FABS, SDLoc(N), VT, N0);
// fold (fabs (fabs x)) -> (fabs x)
if (N0.getOpcode() == ISD::FABS)
return N->getOperand(0);
// fold (fabs (fneg x)) -> (fabs x)
// fold (fabs (fcopysign x, y)) -> (fabs x)
if (N0.getOpcode() == ISD::FNEG || N0.getOpcode() == ISD::FCOPYSIGN)
return DAG.getNode(ISD::FABS, SDLoc(N), VT, N0.getOperand(0));
// Transform fabs(bitconvert(x)) -> bitconvert(x & ~sign) to avoid loading
// constant pool values.
if (!TLI.isFAbsFree(VT) &&
N0.getOpcode() == ISD::BITCAST &&
N0.getNode()->hasOneUse()) {
SDValue Int = N0.getOperand(0);
EVT IntVT = Int.getValueType();
if (IntVT.isInteger() && !IntVT.isVector()) {
APInt SignMask;
if (N0.getValueType().isVector()) {
// For a vector, get a mask such as 0x7f... per scalar element
// and splat it.
SignMask = ~APInt::getSignBit(N0.getScalarValueSizeInBits());
SignMask = APInt::getSplat(IntVT.getSizeInBits(), SignMask);
} else {
// For a scalar, just generate 0x7f...
SignMask = ~APInt::getSignBit(IntVT.getSizeInBits());
}
SDLoc DL(N0);
Int = DAG.getNode(ISD::AND, DL, IntVT, Int,
DAG.getConstant(SignMask, DL, IntVT));
AddToWorklist(Int.getNode());
return DAG.getBitcast(N->getValueType(0), Int);
}
}
return SDValue();
}
SDValue DAGCombiner::visitBRCOND(SDNode *N) {
SDValue Chain = N->getOperand(0);
SDValue N1 = N->getOperand(1);
SDValue N2 = N->getOperand(2);
// If N is a constant we could fold this into a fallthrough or unconditional
// branch. However that doesn't happen very often in normal code, because
// Instcombine/SimplifyCFG should have handled the available opportunities.
// If we did this folding here, it would be necessary to update the
// MachineBasicBlock CFG, which is awkward.
// fold a brcond with a setcc condition into a BR_CC node if BR_CC is legal
// on the target.
if (N1.getOpcode() == ISD::SETCC &&
TLI.isOperationLegalOrCustom(ISD::BR_CC,
N1.getOperand(0).getValueType())) {
return DAG.getNode(ISD::BR_CC, SDLoc(N), MVT::Other,
Chain, N1.getOperand(2),
N1.getOperand(0), N1.getOperand(1), N2);
}
if ((N1.hasOneUse() && N1.getOpcode() == ISD::SRL) ||
((N1.getOpcode() == ISD::TRUNCATE && N1.hasOneUse()) &&
(N1.getOperand(0).hasOneUse() &&
N1.getOperand(0).getOpcode() == ISD::SRL))) {
SDNode *Trunc = nullptr;
if (N1.getOpcode() == ISD::TRUNCATE) {
// Look pass the truncate.
Trunc = N1.getNode();
N1 = N1.getOperand(0);
}
// Match this pattern so that we can generate simpler code:
//
// %a = ...
// %b = and i32 %a, 2
// %c = srl i32 %b, 1
// brcond i32 %c ...
//
// into
//
// %a = ...
// %b = and i32 %a, 2
// %c = setcc eq %b, 0
// brcond %c ...
//
// This applies only when the AND constant value has one bit set and the
// SRL constant is equal to the log2 of the AND constant. The back-end is
// smart enough to convert the result into a TEST/JMP sequence.
SDValue Op0 = N1.getOperand(0);
SDValue Op1 = N1.getOperand(1);
if (Op0.getOpcode() == ISD::AND &&
Op1.getOpcode() == ISD::Constant) {
SDValue AndOp1 = Op0.getOperand(1);
if (AndOp1.getOpcode() == ISD::Constant) {
const APInt &AndConst = cast<ConstantSDNode>(AndOp1)->getAPIntValue();
if (AndConst.isPowerOf2() &&
cast<ConstantSDNode>(Op1)->getAPIntValue()==AndConst.logBase2()) {
SDLoc DL(N);
SDValue SetCC =
DAG.getSetCC(DL,
getSetCCResultType(Op0.getValueType()),
Op0, DAG.getConstant(0, DL, Op0.getValueType()),
ISD::SETNE);
SDValue NewBRCond = DAG.getNode(ISD::BRCOND, DL,
MVT::Other, Chain, SetCC, N2);
// Don't add the new BRCond into the worklist or else SimplifySelectCC
// will convert it back to (X & C1) >> C2.
CombineTo(N, NewBRCond, false);
// Truncate is dead.
if (Trunc)
deleteAndRecombine(Trunc);
// Replace the uses of SRL with SETCC
WorklistRemover DeadNodes(*this);
DAG.ReplaceAllUsesOfValueWith(N1, SetCC);
deleteAndRecombine(N1.getNode());
return SDValue(N, 0); // Return N so it doesn't get rechecked!
}
}
}
if (Trunc)
// Restore N1 if the above transformation doesn't match.
N1 = N->getOperand(1);
}
// Transform br(xor(x, y)) -> br(x != y)
// Transform br(xor(xor(x,y), 1)) -> br (x == y)
if (N1.hasOneUse() && N1.getOpcode() == ISD::XOR) {
SDNode *TheXor = N1.getNode();
SDValue Op0 = TheXor->getOperand(0);
SDValue Op1 = TheXor->getOperand(1);
if (Op0.getOpcode() == Op1.getOpcode()) {
// Avoid missing important xor optimizations.
if (SDValue Tmp = visitXOR(TheXor)) {
if (Tmp.getNode() != TheXor) {
DEBUG(dbgs() << "\nReplacing.8 ";
TheXor->dump(&DAG);
dbgs() << "\nWith: ";
Tmp.getNode()->dump(&DAG);
dbgs() << '\n');
WorklistRemover DeadNodes(*this);
DAG.ReplaceAllUsesOfValueWith(N1, Tmp);
deleteAndRecombine(TheXor);
return DAG.getNode(ISD::BRCOND, SDLoc(N),
MVT::Other, Chain, Tmp, N2);
}
// visitXOR has changed XOR's operands or replaced the XOR completely,
// bail out.
return SDValue(N, 0);
}
}
if (Op0.getOpcode() != ISD::SETCC && Op1.getOpcode() != ISD::SETCC) {
bool Equal = false;
if (isOneConstant(Op0) && Op0.hasOneUse() &&
Op0.getOpcode() == ISD::XOR) {
TheXor = Op0.getNode();
Equal = true;
}
EVT SetCCVT = N1.getValueType();
if (LegalTypes)
SetCCVT = getSetCCResultType(SetCCVT);
SDValue SetCC = DAG.getSetCC(SDLoc(TheXor),
SetCCVT,
Op0, Op1,
Equal ? ISD::SETEQ : ISD::SETNE);
// Replace the uses of XOR with SETCC
WorklistRemover DeadNodes(*this);
DAG.ReplaceAllUsesOfValueWith(N1, SetCC);
deleteAndRecombine(N1.getNode());
return DAG.getNode(ISD::BRCOND, SDLoc(N),
MVT::Other, Chain, SetCC, N2);
}
}
return SDValue();
}
// Operand List for BR_CC: Chain, CondCC, CondLHS, CondRHS, DestBB.
//
SDValue DAGCombiner::visitBR_CC(SDNode *N) {
CondCodeSDNode *CC = cast<CondCodeSDNode>(N->getOperand(1));
SDValue CondLHS = N->getOperand(2), CondRHS = N->getOperand(3);
// If N is a constant we could fold this into a fallthrough or unconditional
// branch. However that doesn't happen very often in normal code, because
// Instcombine/SimplifyCFG should have handled the available opportunities.
// If we did this folding here, it would be necessary to update the
// MachineBasicBlock CFG, which is awkward.
// Use SimplifySetCC to simplify SETCC's.
SDValue Simp = SimplifySetCC(getSetCCResultType(CondLHS.getValueType()),
CondLHS, CondRHS, CC->get(), SDLoc(N),
false);
if (Simp.getNode()) AddToWorklist(Simp.getNode());
// fold to a simpler setcc
if (Simp.getNode() && Simp.getOpcode() == ISD::SETCC)
return DAG.getNode(ISD::BR_CC, SDLoc(N), MVT::Other,
N->getOperand(0), Simp.getOperand(2),
Simp.getOperand(0), Simp.getOperand(1),
N->getOperand(4));
return SDValue();
}
/// Return true if 'Use' is a load or a store that uses N as its base pointer
/// and that N may be folded in the load / store addressing mode.
static bool canFoldInAddressingMode(SDNode *N, SDNode *Use,
SelectionDAG &DAG,
const TargetLowering &TLI) {
EVT VT;
unsigned AS;
if (LoadSDNode *LD = dyn_cast<LoadSDNode>(Use)) {
if (LD->isIndexed() || LD->getBasePtr().getNode() != N)
return false;
VT = LD->getMemoryVT();
AS = LD->getAddressSpace();
} else if (StoreSDNode *ST = dyn_cast<StoreSDNode>(Use)) {
if (ST->isIndexed() || ST->getBasePtr().getNode() != N)
return false;
VT = ST->getMemoryVT();
AS = ST->getAddressSpace();
} else
return false;
TargetLowering::AddrMode AM;
if (N->getOpcode() == ISD::ADD) {
ConstantSDNode *Offset = dyn_cast<ConstantSDNode>(N->getOperand(1));
if (Offset)
// [reg +/- imm]
AM.BaseOffs = Offset->getSExtValue();
else
// [reg +/- reg]
AM.Scale = 1;
} else if (N->getOpcode() == ISD::SUB) {
ConstantSDNode *Offset = dyn_cast<ConstantSDNode>(N->getOperand(1));
if (Offset)
// [reg +/- imm]
AM.BaseOffs = -Offset->getSExtValue();
else
// [reg +/- reg]
AM.Scale = 1;
} else
return false;
return TLI.isLegalAddressingMode(DAG.getDataLayout(), AM,
VT.getTypeForEVT(*DAG.getContext()), AS);
}
/// Try turning a load/store into a pre-indexed load/store when the base
/// pointer is an add or subtract and it has other uses besides the load/store.
/// After the transformation, the new indexed load/store has effectively folded
/// the add/subtract in and all of its other uses are redirected to the
/// new load/store.
bool DAGCombiner::CombineToPreIndexedLoadStore(SDNode *N) {
if (Level < AfterLegalizeDAG)
return false;
bool isLoad = true;
SDValue Ptr;
EVT VT;
if (LoadSDNode *LD = dyn_cast<LoadSDNode>(N)) {
if (LD->isIndexed())
return false;
VT = LD->getMemoryVT();
if (!TLI.isIndexedLoadLegal(ISD::PRE_INC, VT) &&
!TLI.isIndexedLoadLegal(ISD::PRE_DEC, VT))
return false;
Ptr = LD->getBasePtr();
} else if (StoreSDNode *ST = dyn_cast<StoreSDNode>(N)) {
if (ST->isIndexed())
return false;
VT = ST->getMemoryVT();
if (!TLI.isIndexedStoreLegal(ISD::PRE_INC, VT) &&
!TLI.isIndexedStoreLegal(ISD::PRE_DEC, VT))
return false;
Ptr = ST->getBasePtr();
isLoad = false;
} else {
return false;
}
// If the pointer is not an add/sub, or if it doesn't have multiple uses, bail
// out. There is no reason to make this a preinc/predec.
if ((Ptr.getOpcode() != ISD::ADD && Ptr.getOpcode() != ISD::SUB) ||
Ptr.getNode()->hasOneUse())
return false;
// Ask the target to do addressing mode selection.
SDValue BasePtr;
SDValue Offset;
ISD::MemIndexedMode AM = ISD::UNINDEXED;
if (!TLI.getPreIndexedAddressParts(N, BasePtr, Offset, AM, DAG))
return false;
// Backends without true r+i pre-indexed forms may need to pass a
// constant base with a variable offset so that constant coercion
// will work with the patterns in canonical form.
bool Swapped = false;
if (isa<ConstantSDNode>(BasePtr)) {
std::swap(BasePtr, Offset);
Swapped = true;
}
// Don't create a indexed load / store with zero offset.
if (isNullConstant(Offset))
return false;
// Try turning it into a pre-indexed load / store except when:
// 1) The new base ptr is a frame index.
// 2) If N is a store and the new base ptr is either the same as or is a
// predecessor of the value being stored.
// 3) Another use of old base ptr is a predecessor of N. If ptr is folded
// that would create a cycle.
// 4) All uses are load / store ops that use it as old base ptr.
// Check #1. Preinc'ing a frame index would require copying the stack pointer
// (plus the implicit offset) to a register to preinc anyway.
if (isa<FrameIndexSDNode>(BasePtr) || isa<RegisterSDNode>(BasePtr))
return false;
// Check #2.
if (!isLoad) {
SDValue Val = cast<StoreSDNode>(N)->getValue();
if (Val == BasePtr || BasePtr.getNode()->isPredecessorOf(Val.getNode()))
return false;
}
// Caches for hasPredecessorHelper.
SmallPtrSet<const SDNode *, 32> Visited;
SmallVector<const SDNode *, 16> Worklist;
Worklist.push_back(N);
// If the offset is a constant, there may be other adds of constants that
// can be folded with this one. We should do this to avoid having to keep
// a copy of the original base pointer.
SmallVector<SDNode *, 16> OtherUses;
if (isa<ConstantSDNode>(Offset))
for (SDNode::use_iterator UI = BasePtr.getNode()->use_begin(),
UE = BasePtr.getNode()->use_end();
UI != UE; ++UI) {
SDUse &Use = UI.getUse();
// Skip the use that is Ptr and uses of other results from BasePtr's
// node (important for nodes that return multiple results).
if (Use.getUser() == Ptr.getNode() || Use != BasePtr)
continue;
if (SDNode::hasPredecessorHelper(Use.getUser(), Visited, Worklist))
continue;
if (Use.getUser()->getOpcode() != ISD::ADD &&
Use.getUser()->getOpcode() != ISD::SUB) {
OtherUses.clear();
break;
}
SDValue Op1 = Use.getUser()->getOperand((UI.getOperandNo() + 1) & 1);
if (!isa<ConstantSDNode>(Op1)) {
OtherUses.clear();
break;
}
// FIXME: In some cases, we can be smarter about this.
if (Op1.getValueType() != Offset.getValueType()) {
OtherUses.clear();
break;
}
OtherUses.push_back(Use.getUser());
}
if (Swapped)
std::swap(BasePtr, Offset);
// Now check for #3 and #4.
bool RealUse = false;
for (SDNode *Use : Ptr.getNode()->uses()) {
if (Use == N)
continue;
if (SDNode::hasPredecessorHelper(Use, Visited, Worklist))
return false;
// If Ptr may be folded in addressing mode of other use, then it's
// not profitable to do this transformation.
if (!canFoldInAddressingMode(Ptr.getNode(), Use, DAG, TLI))
RealUse = true;
}
if (!RealUse)
return false;
SDValue Result;
if (isLoad)
Result = DAG.getIndexedLoad(SDValue(N,0), SDLoc(N),
BasePtr, Offset, AM);
else
Result = DAG.getIndexedStore(SDValue(N,0), SDLoc(N),
BasePtr, Offset, AM);
++PreIndexedNodes;
++NodesCombined;
DEBUG(dbgs() << "\nReplacing.4 ";
N->dump(&DAG);
dbgs() << "\nWith: ";
Result.getNode()->dump(&DAG);
dbgs() << '\n');
WorklistRemover DeadNodes(*this);
if (isLoad) {
DAG.ReplaceAllUsesOfValueWith(SDValue(N, 0), Result.getValue(0));
DAG.ReplaceAllUsesOfValueWith(SDValue(N, 1), Result.getValue(2));
} else {
DAG.ReplaceAllUsesOfValueWith(SDValue(N, 0), Result.getValue(1));
}
// Finally, since the node is now dead, remove it from the graph.
deleteAndRecombine(N);
if (Swapped)
std::swap(BasePtr, Offset);
// Replace other uses of BasePtr that can be updated to use Ptr
for (unsigned i = 0, e = OtherUses.size(); i != e; ++i) {
unsigned OffsetIdx = 1;
if (OtherUses[i]->getOperand(OffsetIdx).getNode() == BasePtr.getNode())
OffsetIdx = 0;
assert(OtherUses[i]->getOperand(!OffsetIdx).getNode() ==
BasePtr.getNode() && "Expected BasePtr operand");
// We need to replace ptr0 in the following expression:
// x0 * offset0 + y0 * ptr0 = t0
// knowing that
// x1 * offset1 + y1 * ptr0 = t1 (the indexed load/store)
//
// where x0, x1, y0 and y1 in {-1, 1} are given by the types of the
// indexed load/store and the expresion that needs to be re-written.
//
// Therefore, we have:
// t0 = (x0 * offset0 - x1 * y0 * y1 *offset1) + (y0 * y1) * t1
ConstantSDNode *CN =
cast<ConstantSDNode>(OtherUses[i]->getOperand(OffsetIdx));
int X0, X1, Y0, Y1;
const APInt &Offset0 = CN->getAPIntValue();
APInt Offset1 = cast<ConstantSDNode>(Offset)->getAPIntValue();
X0 = (OtherUses[i]->getOpcode() == ISD::SUB && OffsetIdx == 1) ? -1 : 1;
Y0 = (OtherUses[i]->getOpcode() == ISD::SUB && OffsetIdx == 0) ? -1 : 1;
X1 = (AM == ISD::PRE_DEC && !Swapped) ? -1 : 1;
Y1 = (AM == ISD::PRE_DEC && Swapped) ? -1 : 1;
unsigned Opcode = (Y0 * Y1 < 0) ? ISD::SUB : ISD::ADD;
APInt CNV = Offset0;
if (X0 < 0) CNV = -CNV;
if (X1 * Y0 * Y1 < 0) CNV = CNV + Offset1;
else CNV = CNV - Offset1;
SDLoc DL(OtherUses[i]);
// We can now generate the new expression.
SDValue NewOp1 = DAG.getConstant(CNV, DL, CN->getValueType(0));
SDValue NewOp2 = Result.getValue(isLoad ? 1 : 0);
SDValue NewUse = DAG.getNode(Opcode,
DL,
OtherUses[i]->getValueType(0), NewOp1, NewOp2);
DAG.ReplaceAllUsesOfValueWith(SDValue(OtherUses[i], 0), NewUse);
deleteAndRecombine(OtherUses[i]);
}
// Replace the uses of Ptr with uses of the updated base value.
DAG.ReplaceAllUsesOfValueWith(Ptr, Result.getValue(isLoad ? 1 : 0));
deleteAndRecombine(Ptr.getNode());
return true;
}
/// Try to combine a load/store with a add/sub of the base pointer node into a
/// post-indexed load/store. The transformation folded the add/subtract into the
/// new indexed load/store effectively and all of its uses are redirected to the
/// new load/store.
bool DAGCombiner::CombineToPostIndexedLoadStore(SDNode *N) {
if (Level < AfterLegalizeDAG)
return false;
bool isLoad = true;
SDValue Ptr;
EVT VT;
if (LoadSDNode *LD = dyn_cast<LoadSDNode>(N)) {
if (LD->isIndexed())
return false;
VT = LD->getMemoryVT();
if (!TLI.isIndexedLoadLegal(ISD::POST_INC, VT) &&
!TLI.isIndexedLoadLegal(ISD::POST_DEC, VT))
return false;
Ptr = LD->getBasePtr();
} else if (StoreSDNode *ST = dyn_cast<StoreSDNode>(N)) {
if (ST->isIndexed())
return false;
VT = ST->getMemoryVT();
if (!TLI.isIndexedStoreLegal(ISD::POST_INC, VT) &&
!TLI.isIndexedStoreLegal(ISD::POST_DEC, VT))
return false;
Ptr = ST->getBasePtr();
isLoad = false;
} else {
return false;
}
if (Ptr.getNode()->hasOneUse())
return false;
for (SDNode *Op : Ptr.getNode()->uses()) {
if (Op == N ||
(Op->getOpcode() != ISD::ADD && Op->getOpcode() != ISD::SUB))
continue;
SDValue BasePtr;
SDValue Offset;
ISD::MemIndexedMode AM = ISD::UNINDEXED;
if (TLI.getPostIndexedAddressParts(N, Op, BasePtr, Offset, AM, DAG)) {
// Don't create a indexed load / store with zero offset.
if (isNullConstant(Offset))
continue;
// Try turning it into a post-indexed load / store except when
// 1) All uses are load / store ops that use it as base ptr (and
// it may be folded as addressing mmode).
// 2) Op must be independent of N, i.e. Op is neither a predecessor
// nor a successor of N. Otherwise, if Op is folded that would
// create a cycle.
if (isa<FrameIndexSDNode>(BasePtr) || isa<RegisterSDNode>(BasePtr))
continue;
// Check for #1.
bool TryNext = false;
for (SDNode *Use : BasePtr.getNode()->uses()) {
if (Use == Ptr.getNode())
continue;
// If all the uses are load / store addresses, then don't do the
// transformation.
if (Use->getOpcode() == ISD::ADD || Use->getOpcode() == ISD::SUB){
bool RealUse = false;
for (SDNode *UseUse : Use->uses()) {
if (!canFoldInAddressingMode(Use, UseUse, DAG, TLI))
RealUse = true;
}
if (!RealUse) {
TryNext = true;
break;
}
}
}
if (TryNext)
continue;
// Check for #2
if (!Op->isPredecessorOf(N) && !N->isPredecessorOf(Op)) {
SDValue Result = isLoad
? DAG.getIndexedLoad(SDValue(N,0), SDLoc(N),
BasePtr, Offset, AM)
: DAG.getIndexedStore(SDValue(N,0), SDLoc(N),
BasePtr, Offset, AM);
++PostIndexedNodes;
++NodesCombined;
DEBUG(dbgs() << "\nReplacing.5 ";
N->dump(&DAG);
dbgs() << "\nWith: ";
Result.getNode()->dump(&DAG);
dbgs() << '\n');
WorklistRemover DeadNodes(*this);
if (isLoad) {
DAG.ReplaceAllUsesOfValueWith(SDValue(N, 0), Result.getValue(0));
DAG.ReplaceAllUsesOfValueWith(SDValue(N, 1), Result.getValue(2));
} else {
DAG.ReplaceAllUsesOfValueWith(SDValue(N, 0), Result.getValue(1));
}
// Finally, since the node is now dead, remove it from the graph.
deleteAndRecombine(N);
// Replace the uses of Use with uses of the updated base value.
DAG.ReplaceAllUsesOfValueWith(SDValue(Op, 0),
Result.getValue(isLoad ? 1 : 0));
deleteAndRecombine(Op);
return true;
}
}
}
return false;
}
/// \brief Return the base-pointer arithmetic from an indexed \p LD.
SDValue DAGCombiner::SplitIndexingFromLoad(LoadSDNode *LD) {
ISD::MemIndexedMode AM = LD->getAddressingMode();
assert(AM != ISD::UNINDEXED);
SDValue BP = LD->getOperand(1);
SDValue Inc = LD->getOperand(2);
// Some backends use TargetConstants for load offsets, but don't expect
// TargetConstants in general ADD nodes. We can convert these constants into
// regular Constants (if the constant is not opaque).
assert((Inc.getOpcode() != ISD::TargetConstant ||
!cast<ConstantSDNode>(Inc)->isOpaque()) &&
"Cannot split out indexing using opaque target constants");
if (Inc.getOpcode() == ISD::TargetConstant) {
ConstantSDNode *ConstInc = cast<ConstantSDNode>(Inc);
Inc = DAG.getConstant(*ConstInc->getConstantIntValue(), SDLoc(Inc),
ConstInc->getValueType(0));
}
unsigned Opc =
(AM == ISD::PRE_INC || AM == ISD::POST_INC ? ISD::ADD : ISD::SUB);
return DAG.getNode(Opc, SDLoc(LD), BP.getSimpleValueType(), BP, Inc);
}
SDValue DAGCombiner::visitLOAD(SDNode *N) {
LoadSDNode *LD = cast<LoadSDNode>(N);
SDValue Chain = LD->getChain();
SDValue Ptr = LD->getBasePtr();
// If load is not volatile and there are no uses of the loaded value (and
// the updated indexed value in case of indexed loads), change uses of the
// chain value into uses of the chain input (i.e. delete the dead load).
if (!LD->isVolatile()) {
if (N->getValueType(1) == MVT::Other) {
// Unindexed loads.
if (!N->hasAnyUseOfValue(0)) {
// It's not safe to use the two value CombineTo variant here. e.g.
// v1, chain2 = load chain1, loc
// v2, chain3 = load chain2, loc
// v3 = add v2, c
// Now we replace use of chain2 with chain1. This makes the second load
// isomorphic to the one we are deleting, and thus makes this load live.
DEBUG(dbgs() << "\nReplacing.6 ";
N->dump(&DAG);
dbgs() << "\nWith chain: ";
Chain.getNode()->dump(&DAG);
dbgs() << "\n");
WorklistRemover DeadNodes(*this);
DAG.ReplaceAllUsesOfValueWith(SDValue(N, 1), Chain);
AddUsersToWorklist(Chain.getNode());
if (N->use_empty())
deleteAndRecombine(N);
return SDValue(N, 0); // Return N so it doesn't get rechecked!
}
} else {
// Indexed loads.
assert(N->getValueType(2) == MVT::Other && "Malformed indexed loads?");
// If this load has an opaque TargetConstant offset, then we cannot split
// the indexing into an add/sub directly (that TargetConstant may not be
// valid for a different type of node, and we cannot convert an opaque
// target constant into a regular constant).
bool HasOTCInc = LD->getOperand(2).getOpcode() == ISD::TargetConstant &&
cast<ConstantSDNode>(LD->getOperand(2))->isOpaque();
if (!N->hasAnyUseOfValue(0) &&
((MaySplitLoadIndex && !HasOTCInc) || !N->hasAnyUseOfValue(1))) {
SDValue Undef = DAG.getUNDEF(N->getValueType(0));
SDValue Index;
if (N->hasAnyUseOfValue(1) && MaySplitLoadIndex && !HasOTCInc) {
Index = SplitIndexingFromLoad(LD);
// Try to fold the base pointer arithmetic into subsequent loads and
// stores.
AddUsersToWorklist(N);
} else
Index = DAG.getUNDEF(N->getValueType(1));
DEBUG(dbgs() << "\nReplacing.7 ";
N->dump(&DAG);
dbgs() << "\nWith: ";
Undef.getNode()->dump(&DAG);
dbgs() << " and 2 other values\n");
WorklistRemover DeadNodes(*this);
DAG.ReplaceAllUsesOfValueWith(SDValue(N, 0), Undef);
DAG.ReplaceAllUsesOfValueWith(SDValue(N, 1), Index);
DAG.ReplaceAllUsesOfValueWith(SDValue(N, 2), Chain);
deleteAndRecombine(N);
return SDValue(N, 0); // Return N so it doesn't get rechecked!
}
}
}
// If this load is directly stored, replace the load value with the stored
// value.
// TODO: Handle store large -> read small portion.
// TODO: Handle TRUNCSTORE/LOADEXT
if (OptLevel != CodeGenOpt::None &&
ISD::isNormalLoad(N) && !LD->isVolatile()) {
if (ISD::isNON_TRUNCStore(Chain.getNode())) {
StoreSDNode *PrevST = cast<StoreSDNode>(Chain);
if (PrevST->getBasePtr() == Ptr &&
PrevST->getValue().getValueType() == N->getValueType(0))
return CombineTo(N, PrevST->getOperand(1), Chain);
}
}
// Try to infer better alignment information than the load already has.
if (OptLevel != CodeGenOpt::None && LD->isUnindexed()) {
if (unsigned Align = DAG.InferPtrAlignment(Ptr)) {
if (Align > LD->getMemOperand()->getBaseAlignment()) {
SDValue NewLoad = DAG.getExtLoad(
LD->getExtensionType(), SDLoc(N), LD->getValueType(0), Chain, Ptr,
LD->getPointerInfo(), LD->getMemoryVT(), Align,
LD->getMemOperand()->getFlags(), LD->getAAInfo());
if (NewLoad.getNode() != N)
return CombineTo(N, NewLoad, SDValue(NewLoad.getNode(), 1), true);
}
}
}
if (LD->isUnindexed()) {
// Walk up chain skipping non-aliasing memory nodes.
SDValue BetterChain = FindBetterChain(N, Chain);
// If there is a better chain.
if (Chain != BetterChain) {
SDValue ReplLoad;
// Replace the chain to void dependency.
if (LD->getExtensionType() == ISD::NON_EXTLOAD) {
ReplLoad = DAG.getLoad(N->getValueType(0), SDLoc(LD),
BetterChain, Ptr, LD->getMemOperand());
} else {
ReplLoad = DAG.getExtLoad(LD->getExtensionType(), SDLoc(LD),
LD->getValueType(0),
BetterChain, Ptr, LD->getMemoryVT(),
LD->getMemOperand());
}
// Create token factor to keep old chain connected.
SDValue Token = DAG.getNode(ISD::TokenFactor, SDLoc(N),
MVT::Other, Chain, ReplLoad.getValue(1));
// Make sure the new and old chains are cleaned up.
AddToWorklist(Token.getNode());
// Replace uses with load result and token factor. Don't add users
// to work list.
return CombineTo(N, ReplLoad.getValue(0), Token, false);
}
}
// Try transforming N to an indexed load.
if (CombineToPreIndexedLoadStore(N) || CombineToPostIndexedLoadStore(N))
return SDValue(N, 0);
// Try to slice up N to more direct loads if the slices are mapped to
// different register banks or pairing can take place.
if (SliceUpLoad(N))
return SDValue(N, 0);
return SDValue();
}
namespace {
/// \brief Helper structure used to slice a load in smaller loads.
/// Basically a slice is obtained from the following sequence:
/// Origin = load Ty1, Base
/// Shift = srl Ty1 Origin, CstTy Amount
/// Inst = trunc Shift to Ty2
///
/// Then, it will be rewriten into:
/// Slice = load SliceTy, Base + SliceOffset
/// [Inst = zext Slice to Ty2], only if SliceTy <> Ty2
///
/// SliceTy is deduced from the number of bits that are actually used to
/// build Inst.
struct LoadedSlice {
/// \brief Helper structure used to compute the cost of a slice.
struct Cost {
/// Are we optimizing for code size.
bool ForCodeSize;
/// Various cost.
unsigned Loads;
unsigned Truncates;
unsigned CrossRegisterBanksCopies;
unsigned ZExts;
unsigned Shift;
Cost(bool ForCodeSize = false)
: ForCodeSize(ForCodeSize), Loads(0), Truncates(0),
CrossRegisterBanksCopies(0), ZExts(0), Shift(0) {}
/// \brief Get the cost of one isolated slice.
Cost(const LoadedSlice &LS, bool ForCodeSize = false)
: ForCodeSize(ForCodeSize), Loads(1), Truncates(0),
CrossRegisterBanksCopies(0), ZExts(0), Shift(0) {
EVT TruncType = LS.Inst->getValueType(0);
EVT LoadedType = LS.getLoadedType();
if (TruncType != LoadedType &&
!LS.DAG->getTargetLoweringInfo().isZExtFree(LoadedType, TruncType))
ZExts = 1;
}
/// \brief Account for slicing gain in the current cost.
/// Slicing provide a few gains like removing a shift or a
/// truncate. This method allows to grow the cost of the original
/// load with the gain from this slice.
void addSliceGain(const LoadedSlice &LS) {
// Each slice saves a truncate.
const TargetLowering &TLI = LS.DAG->getTargetLoweringInfo();
if (!TLI.isTruncateFree(LS.Inst->getOperand(0).getValueType(),
LS.Inst->getValueType(0)))
++Truncates;
// If there is a shift amount, this slice gets rid of it.
if (LS.Shift)
++Shift;
// If this slice can merge a cross register bank copy, account for it.
if (LS.canMergeExpensiveCrossRegisterBankCopy())
++CrossRegisterBanksCopies;
}
Cost &operator+=(const Cost &RHS) {
Loads += RHS.Loads;
Truncates += RHS.Truncates;
CrossRegisterBanksCopies += RHS.CrossRegisterBanksCopies;
ZExts += RHS.ZExts;
Shift += RHS.Shift;
return *this;
}
bool operator==(const Cost &RHS) const {
return Loads == RHS.Loads && Truncates == RHS.Truncates &&
CrossRegisterBanksCopies == RHS.CrossRegisterBanksCopies &&
ZExts == RHS.ZExts && Shift == RHS.Shift;
}
bool operator!=(const Cost &RHS) const { return !(*this == RHS); }
bool operator<(const Cost &RHS) const {
// Assume cross register banks copies are as expensive as loads.
// FIXME: Do we want some more target hooks?
unsigned ExpensiveOpsLHS = Loads + CrossRegisterBanksCopies;
unsigned ExpensiveOpsRHS = RHS.Loads + RHS.CrossRegisterBanksCopies;
// Unless we are optimizing for code size, consider the
// expensive operation first.
if (!ForCodeSize && ExpensiveOpsLHS != ExpensiveOpsRHS)
return ExpensiveOpsLHS < ExpensiveOpsRHS;
return (Truncates + ZExts + Shift + ExpensiveOpsLHS) <
(RHS.Truncates + RHS.ZExts + RHS.Shift + ExpensiveOpsRHS);
}
bool operator>(const Cost &RHS) const { return RHS < *this; }
bool operator<=(const Cost &RHS) const { return !(RHS < *this); }
bool operator>=(const Cost &RHS) const { return !(*this < RHS); }
};
// The last instruction that represent the slice. This should be a
// truncate instruction.
SDNode *Inst;
// The original load instruction.
LoadSDNode *Origin;
// The right shift amount in bits from the original load.
unsigned Shift;
// The DAG from which Origin came from.
// This is used to get some contextual information about legal types, etc.
SelectionDAG *DAG;
LoadedSlice(SDNode *Inst = nullptr, LoadSDNode *Origin = nullptr,
unsigned Shift = 0, SelectionDAG *DAG = nullptr)
: Inst(Inst), Origin(Origin), Shift(Shift), DAG(DAG) {}
/// \brief Get the bits used in a chunk of bits \p BitWidth large.
/// \return Result is \p BitWidth and has used bits set to 1 and
/// not used bits set to 0.
APInt getUsedBits() const {
// Reproduce the trunc(lshr) sequence:
// - Start from the truncated value.
// - Zero extend to the desired bit width.
// - Shift left.
assert(Origin && "No original load to compare against.");
unsigned BitWidth = Origin->getValueSizeInBits(0);
assert(Inst && "This slice is not bound to an instruction");
assert(Inst->getValueSizeInBits(0) <= BitWidth &&
"Extracted slice is bigger than the whole type!");
APInt UsedBits(Inst->getValueSizeInBits(0), 0);
UsedBits.setAllBits();
UsedBits = UsedBits.zext(BitWidth);
UsedBits <<= Shift;
return UsedBits;
}
/// \brief Get the size of the slice to be loaded in bytes.
unsigned getLoadedSize() const {
unsigned SliceSize = getUsedBits().countPopulation();
assert(!(SliceSize & 0x7) && "Size is not a multiple of a byte.");
return SliceSize / 8;
}
/// \brief Get the type that will be loaded for this slice.
/// Note: This may not be the final type for the slice.
EVT getLoadedType() const {
assert(DAG && "Missing context");
LLVMContext &Ctxt = *DAG->getContext();
return EVT::getIntegerVT(Ctxt, getLoadedSize() * 8);
}
/// \brief Get the alignment of the load used for this slice.
unsigned getAlignment() const {
unsigned Alignment = Origin->getAlignment();
unsigned Offset = getOffsetFromBase();
if (Offset != 0)
Alignment = MinAlign(Alignment, Alignment + Offset);
return Alignment;
}
/// \brief Check if this slice can be rewritten with legal operations.
bool isLegal() const {
// An invalid slice is not legal.
if (!Origin || !Inst || !DAG)
return false;
// Offsets are for indexed load only, we do not handle that.
if (!Origin->getOffset().isUndef())
return false;
const TargetLowering &TLI = DAG->getTargetLoweringInfo();
// Check that the type is legal.
EVT SliceType = getLoadedType();
if (!TLI.isTypeLegal(SliceType))
return false;
// Check that the load is legal for this type.
if (!TLI.isOperationLegal(ISD::LOAD, SliceType))
return false;
// Check that the offset can be computed.
// 1. Check its type.
EVT PtrType = Origin->getBasePtr().getValueType();
if (PtrType == MVT::Untyped || PtrType.isExtended())
return false;
// 2. Check that it fits in the immediate.
if (!TLI.isLegalAddImmediate(getOffsetFromBase()))
return false;
// 3. Check that the computation is legal.
if (!TLI.isOperationLegal(ISD::ADD, PtrType))
return false;
// Check that the zext is legal if it needs one.
EVT TruncateType = Inst->getValueType(0);
if (TruncateType != SliceType &&
!TLI.isOperationLegal(ISD::ZERO_EXTEND, TruncateType))
return false;
return true;
}
/// \brief Get the offset in bytes of this slice in the original chunk of
/// bits.
/// \pre DAG != nullptr.
uint64_t getOffsetFromBase() const {
assert(DAG && "Missing context.");
bool IsBigEndian = DAG->getDataLayout().isBigEndian();
assert(!(Shift & 0x7) && "Shifts not aligned on Bytes are not supported.");
uint64_t Offset = Shift / 8;
unsigned TySizeInBytes = Origin->getValueSizeInBits(0) / 8;
assert(!(Origin->getValueSizeInBits(0) & 0x7) &&
"The size of the original loaded type is not a multiple of a"
" byte.");
// If Offset is bigger than TySizeInBytes, it means we are loading all
// zeros. This should have been optimized before in the process.
assert(TySizeInBytes > Offset &&
"Invalid shift amount for given loaded size");
if (IsBigEndian)
Offset = TySizeInBytes - Offset - getLoadedSize();
return Offset;
}
/// \brief Generate the sequence of instructions to load the slice
/// represented by this object and redirect the uses of this slice to
/// this new sequence of instructions.
/// \pre this->Inst && this->Origin are valid Instructions and this
/// object passed the legal check: LoadedSlice::isLegal returned true.
/// \return The last instruction of the sequence used to load the slice.
SDValue loadSlice() const {
assert(Inst && Origin && "Unable to replace a non-existing slice.");
const SDValue &OldBaseAddr = Origin->getBasePtr();
SDValue BaseAddr = OldBaseAddr;
// Get the offset in that chunk of bytes w.r.t. the endianness.
int64_t Offset = static_cast<int64_t>(getOffsetFromBase());
assert(Offset >= 0 && "Offset too big to fit in int64_t!");
if (Offset) {
// BaseAddr = BaseAddr + Offset.
EVT ArithType = BaseAddr.getValueType();
SDLoc DL(Origin);
BaseAddr = DAG->getNode(ISD::ADD, DL, ArithType, BaseAddr,
DAG->getConstant(Offset, DL, ArithType));
}
// Create the type of the loaded slice according to its size.
EVT SliceType = getLoadedType();
// Create the load for the slice.
SDValue LastInst =
DAG->getLoad(SliceType, SDLoc(Origin), Origin->getChain(), BaseAddr,
Origin->getPointerInfo().getWithOffset(Offset),
getAlignment(), Origin->getMemOperand()->getFlags());
// If the final type is not the same as the loaded type, this means that
// we have to pad with zero. Create a zero extend for that.
EVT FinalType = Inst->getValueType(0);
if (SliceType != FinalType)
LastInst =
DAG->getNode(ISD::ZERO_EXTEND, SDLoc(LastInst), FinalType, LastInst);
return LastInst;
}
/// \brief Check if this slice can be merged with an expensive cross register
/// bank copy. E.g.,
/// i = load i32
/// f = bitcast i32 i to float
bool canMergeExpensiveCrossRegisterBankCopy() const {
if (!Inst || !Inst->hasOneUse())
return false;
SDNode *Use = *Inst->use_begin();
if (Use->getOpcode() != ISD::BITCAST)
return false;
assert(DAG && "Missing context");
const TargetLowering &TLI = DAG->getTargetLoweringInfo();
EVT ResVT = Use->getValueType(0);
const TargetRegisterClass *ResRC = TLI.getRegClassFor(ResVT.getSimpleVT());
const TargetRegisterClass *ArgRC =
TLI.getRegClassFor(Use->getOperand(0).getValueType().getSimpleVT());
if (ArgRC == ResRC || !TLI.isOperationLegal(ISD::LOAD, ResVT))
return false;
// At this point, we know that we perform a cross-register-bank copy.
// Check if it is expensive.
const TargetRegisterInfo *TRI = DAG->getSubtarget().getRegisterInfo();
// Assume bitcasts are cheap, unless both register classes do not
// explicitly share a common sub class.
if (!TRI || TRI->getCommonSubClass(ArgRC, ResRC))
return false;
// Check if it will be merged with the load.
// 1. Check the alignment constraint.
unsigned RequiredAlignment = DAG->getDataLayout().getABITypeAlignment(
ResVT.getTypeForEVT(*DAG->getContext()));
if (RequiredAlignment > getAlignment())
return false;
// 2. Check that the load is a legal operation for that type.
if (!TLI.isOperationLegal(ISD::LOAD, ResVT))
return false;
// 3. Check that we do not have a zext in the way.
if (Inst->getValueType(0) != getLoadedType())
return false;
return true;
}
};
}
/// \brief Check that all bits set in \p UsedBits form a dense region, i.e.,
/// \p UsedBits looks like 0..0 1..1 0..0.
static bool areUsedBitsDense(const APInt &UsedBits) {
// If all the bits are one, this is dense!
if (UsedBits.isAllOnesValue())
return true;
// Get rid of the unused bits on the right.
APInt NarrowedUsedBits = UsedBits.lshr(UsedBits.countTrailingZeros());
// Get rid of the unused bits on the left.
if (NarrowedUsedBits.countLeadingZeros())
NarrowedUsedBits = NarrowedUsedBits.trunc(NarrowedUsedBits.getActiveBits());
// Check that the chunk of bits is completely used.
return NarrowedUsedBits.isAllOnesValue();
}
/// \brief Check whether or not \p First and \p Second are next to each other
/// in memory. This means that there is no hole between the bits loaded
/// by \p First and the bits loaded by \p Second.
static bool areSlicesNextToEachOther(const LoadedSlice &First,
const LoadedSlice &Second) {
assert(First.Origin == Second.Origin && First.Origin &&
"Unable to match different memory origins.");
APInt UsedBits = First.getUsedBits();
assert((UsedBits & Second.getUsedBits()) == 0 &&
"Slices are not supposed to overlap.");
UsedBits |= Second.getUsedBits();
return areUsedBitsDense(UsedBits);
}
/// \brief Adjust the \p GlobalLSCost according to the target
/// paring capabilities and the layout of the slices.
/// \pre \p GlobalLSCost should account for at least as many loads as
/// there is in the slices in \p LoadedSlices.
static void adjustCostForPairing(SmallVectorImpl<LoadedSlice> &LoadedSlices,
LoadedSlice::Cost &GlobalLSCost) {
unsigned NumberOfSlices = LoadedSlices.size();
// If there is less than 2 elements, no pairing is possible.
if (NumberOfSlices < 2)
return;
// Sort the slices so that elements that are likely to be next to each
// other in memory are next to each other in the list.
std::sort(LoadedSlices.begin(), LoadedSlices.end(),
[](const LoadedSlice &LHS, const LoadedSlice &RHS) {
assert(LHS.Origin == RHS.Origin && "Different bases not implemented.");
return LHS.getOffsetFromBase() < RHS.getOffsetFromBase();
});
const TargetLowering &TLI = LoadedSlices[0].DAG->getTargetLoweringInfo();
// First (resp. Second) is the first (resp. Second) potentially candidate
// to be placed in a paired load.
const LoadedSlice *First = nullptr;
const LoadedSlice *Second = nullptr;
for (unsigned CurrSlice = 0; CurrSlice < NumberOfSlices; ++CurrSlice,
// Set the beginning of the pair.
First = Second) {
Second = &LoadedSlices[CurrSlice];
// If First is NULL, it means we start a new pair.
// Get to the next slice.
if (!First)
continue;
EVT LoadedType = First->getLoadedType();
// If the types of the slices are different, we cannot pair them.
if (LoadedType != Second->getLoadedType())
continue;
// Check if the target supplies paired loads for this type.
unsigned RequiredAlignment = 0;
if (!TLI.hasPairedLoad(LoadedType, RequiredAlignment)) {
// move to the next pair, this type is hopeless.
Second = nullptr;
continue;
}
// Check if we meet the alignment requirement.
if (RequiredAlignment > First->getAlignment())
continue;
// Check that both loads are next to each other in memory.
if (!areSlicesNextToEachOther(*First, *Second))
continue;
assert(GlobalLSCost.Loads > 0 && "We save more loads than we created!");
--GlobalLSCost.Loads;
// Move to the next pair.
Second = nullptr;
}
}
/// \brief Check the profitability of all involved LoadedSlice.
/// Currently, it is considered profitable if there is exactly two
/// involved slices (1) which are (2) next to each other in memory, and
/// whose cost (\see LoadedSlice::Cost) is smaller than the original load (3).
///
/// Note: The order of the elements in \p LoadedSlices may be modified, but not
/// the elements themselves.
///
/// FIXME: When the cost model will be mature enough, we can relax
/// constraints (1) and (2).
static bool isSlicingProfitable(SmallVectorImpl<LoadedSlice> &LoadedSlices,
const APInt &UsedBits, bool ForCodeSize) {
unsigned NumberOfSlices = LoadedSlices.size();
if (StressLoadSlicing)
return NumberOfSlices > 1;
// Check (1).
if (NumberOfSlices != 2)
return false;
// Check (2).
if (!areUsedBitsDense(UsedBits))
return false;
// Check (3).
LoadedSlice::Cost OrigCost(ForCodeSize), GlobalSlicingCost(ForCodeSize);
// The original code has one big load.
OrigCost.Loads = 1;
for (unsigned CurrSlice = 0; CurrSlice < NumberOfSlices; ++CurrSlice) {
const LoadedSlice &LS = LoadedSlices[CurrSlice];
// Accumulate the cost of all the slices.
LoadedSlice::Cost SliceCost(LS, ForCodeSize);
GlobalSlicingCost += SliceCost;
// Account as cost in the original configuration the gain obtained
// with the current slices.
OrigCost.addSliceGain(LS);
}
// If the target supports paired load, adjust the cost accordingly.
adjustCostForPairing(LoadedSlices, GlobalSlicingCost);
return OrigCost > GlobalSlicingCost;
}
/// \brief If the given load, \p LI, is used only by trunc or trunc(lshr)
/// operations, split it in the various pieces being extracted.
///
/// This sort of thing is introduced by SROA.
/// This slicing takes care not to insert overlapping loads.
/// \pre LI is a simple load (i.e., not an atomic or volatile load).
bool DAGCombiner::SliceUpLoad(SDNode *N) {
if (Level < AfterLegalizeDAG)
return false;
LoadSDNode *LD = cast<LoadSDNode>(N);
if (LD->isVolatile() || !ISD::isNormalLoad(LD) ||
!LD->getValueType(0).isInteger())
return false;
// Keep track of already used bits to detect overlapping values.
// In that case, we will just abort the transformation.
APInt UsedBits(LD->getValueSizeInBits(0), 0);
SmallVector<LoadedSlice, 4> LoadedSlices;
// Check if this load is used as several smaller chunks of bits.
// Basically, look for uses in trunc or trunc(lshr) and record a new chain
// of computation for each trunc.
for (SDNode::use_iterator UI = LD->use_begin(), UIEnd = LD->use_end();
UI != UIEnd; ++UI) {
// Skip the uses of the chain.
if (UI.getUse().getResNo() != 0)
continue;
SDNode *User = *UI;
unsigned Shift = 0;
// Check if this is a trunc(lshr).
if (User->getOpcode() == ISD::SRL && User->hasOneUse() &&
isa<ConstantSDNode>(User->getOperand(1))) {
Shift = cast<ConstantSDNode>(User->getOperand(1))->getZExtValue();
User = *User->use_begin();
}
// At this point, User is a Truncate, iff we encountered, trunc or
// trunc(lshr).
if (User->getOpcode() != ISD::TRUNCATE)
return false;
// The width of the type must be a power of 2 and greater than 8-bits.
// Otherwise the load cannot be represented in LLVM IR.
// Moreover, if we shifted with a non-8-bits multiple, the slice
// will be across several bytes. We do not support that.
unsigned Width = User->getValueSizeInBits(0);
if (Width < 8 || !isPowerOf2_32(Width) || (Shift & 0x7))
return 0;
// Build the slice for this chain of computations.
LoadedSlice LS(User, LD, Shift, &DAG);
APInt CurrentUsedBits = LS.getUsedBits();
// Check if this slice overlaps with another.
if ((CurrentUsedBits & UsedBits) != 0)
return false;
// Update the bits used globally.
UsedBits |= CurrentUsedBits;
// Check if the new slice would be legal.
if (!LS.isLegal())
return false;
// Record the slice.
LoadedSlices.push_back(LS);
}
// Abort slicing if it does not seem to be profitable.
if (!isSlicingProfitable(LoadedSlices, UsedBits, ForCodeSize))
return false;
++SlicedLoads;
// Rewrite each chain to use an independent load.
// By construction, each chain can be represented by a unique load.
// Prepare the argument for the new token factor for all the slices.
SmallVector<SDValue, 8> ArgChains;
for (SmallVectorImpl<LoadedSlice>::const_iterator
LSIt = LoadedSlices.begin(),
LSItEnd = LoadedSlices.end();
LSIt != LSItEnd; ++LSIt) {
SDValue SliceInst = LSIt->loadSlice();
CombineTo(LSIt->Inst, SliceInst, true);
if (SliceInst.getOpcode() != ISD::LOAD)
SliceInst = SliceInst.getOperand(0);
assert(SliceInst->getOpcode() == ISD::LOAD &&
"It takes more than a zext to get to the loaded slice!!");
ArgChains.push_back(SliceInst.getValue(1));
}
SDValue Chain = DAG.getNode(ISD::TokenFactor, SDLoc(LD), MVT::Other,
ArgChains);
DAG.ReplaceAllUsesOfValueWith(SDValue(N, 1), Chain);
AddToWorklist(Chain.getNode());
return true;
}
/// Check to see if V is (and load (ptr), imm), where the load is having
/// specific bytes cleared out. If so, return the byte size being masked out
/// and the shift amount.
static std::pair<unsigned, unsigned>
CheckForMaskedLoad(SDValue V, SDValue Ptr, SDValue Chain) {
std::pair<unsigned, unsigned> Result(0, 0);
// Check for the structure we're looking for.
if (V->getOpcode() != ISD::AND ||
!isa<ConstantSDNode>(V->getOperand(1)) ||
!ISD::isNormalLoad(V->getOperand(0).getNode()))
return Result;
// Check the chain and pointer.
LoadSDNode *LD = cast<LoadSDNode>(V->getOperand(0));
if (LD->getBasePtr() != Ptr) return Result; // Not from same pointer.
// The store should be chained directly to the load or be an operand of a
// tokenfactor.
if (LD == Chain.getNode())
; // ok.
else if (Chain->getOpcode() != ISD::TokenFactor)
return Result; // Fail.
else {
bool isOk = false;
for (const SDValue &ChainOp : Chain->op_values())
if (ChainOp.getNode() == LD) {
isOk = true;
break;
}
if (!isOk) return Result;
}
// This only handles simple types.
if (V.getValueType() != MVT::i16 &&
V.getValueType() != MVT::i32 &&
V.getValueType() != MVT::i64)
return Result;
// Check the constant mask. Invert it so that the bits being masked out are
// 0 and the bits being kept are 1. Use getSExtValue so that leading bits
// follow the sign bit for uniformity.
uint64_t NotMask = ~cast<ConstantSDNode>(V->getOperand(1))->getSExtValue();
unsigned NotMaskLZ = countLeadingZeros(NotMask);
if (NotMaskLZ & 7) return Result; // Must be multiple of a byte.
unsigned NotMaskTZ = countTrailingZeros(NotMask);
if (NotMaskTZ & 7) return Result; // Must be multiple of a byte.
if (NotMaskLZ == 64) return Result; // All zero mask.
// See if we have a continuous run of bits. If so, we have 0*1+0*
if (countTrailingOnes(NotMask >> NotMaskTZ) + NotMaskTZ + NotMaskLZ != 64)
return Result;
// Adjust NotMaskLZ down to be from the actual size of the int instead of i64.
if (V.getValueType() != MVT::i64 && NotMaskLZ)
NotMaskLZ -= 64-V.getValueSizeInBits();
unsigned MaskedBytes = (V.getValueSizeInBits()-NotMaskLZ-NotMaskTZ)/8;
switch (MaskedBytes) {
case 1:
case 2:
case 4: break;
default: return Result; // All one mask, or 5-byte mask.
}
// Verify that the first bit starts at a multiple of mask so that the access
// is aligned the same as the access width.
if (NotMaskTZ && NotMaskTZ/8 % MaskedBytes) return Result;
Result.first = MaskedBytes;
Result.second = NotMaskTZ/8;
return Result;
}
/// Check to see if IVal is something that provides a value as specified by
/// MaskInfo. If so, replace the specified store with a narrower store of
/// truncated IVal.
static SDNode *
ShrinkLoadReplaceStoreWithStore(const std::pair<unsigned, unsigned> &MaskInfo,
SDValue IVal, StoreSDNode *St,
DAGCombiner *DC) {
unsigned NumBytes = MaskInfo.first;
unsigned ByteShift = MaskInfo.second;
SelectionDAG &DAG = DC->getDAG();
// Check to see if IVal is all zeros in the part being masked in by the 'or'
// that uses this. If not, this is not a replacement.
APInt Mask = ~APInt::getBitsSet(IVal.getValueSizeInBits(),
ByteShift*8, (ByteShift+NumBytes)*8);
if (!DAG.MaskedValueIsZero(IVal, Mask)) return nullptr;
// Check that it is legal on the target to do this. It is legal if the new
// VT we're shrinking to (i8/i16/i32) is legal or we're still before type
// legalization.
MVT VT = MVT::getIntegerVT(NumBytes*8);
if (!DC->isTypeLegal(VT))
return nullptr;
// Okay, we can do this! Replace the 'St' store with a store of IVal that is
// shifted by ByteShift and truncated down to NumBytes.
if (ByteShift) {
SDLoc DL(IVal);
IVal = DAG.getNode(ISD::SRL, DL, IVal.getValueType(), IVal,
DAG.getConstant(ByteShift*8, DL,
DC->getShiftAmountTy(IVal.getValueType())));
}
// Figure out the offset for the store and the alignment of the access.
unsigned StOffset;
unsigned NewAlign = St->getAlignment();
if (DAG.getDataLayout().isLittleEndian())
StOffset = ByteShift;
else
StOffset = IVal.getValueType().getStoreSize() - ByteShift - NumBytes;
SDValue Ptr = St->getBasePtr();
if (StOffset) {
SDLoc DL(IVal);
Ptr = DAG.getNode(ISD::ADD, DL, Ptr.getValueType(),
Ptr, DAG.getConstant(StOffset, DL, Ptr.getValueType()));
NewAlign = MinAlign(NewAlign, StOffset);
}
// Truncate down to the new size.
IVal = DAG.getNode(ISD::TRUNCATE, SDLoc(IVal), VT, IVal);
++OpsNarrowed;
return DAG
.getStore(St->getChain(), SDLoc(St), IVal, Ptr,
St->getPointerInfo().getWithOffset(StOffset), NewAlign)
.getNode();
}
/// Look for sequence of load / op / store where op is one of 'or', 'xor', and
/// 'and' of immediates. If 'op' is only touching some of the loaded bits, try
/// narrowing the load and store if it would end up being a win for performance
/// or code size.
SDValue DAGCombiner::ReduceLoadOpStoreWidth(SDNode *N) {
StoreSDNode *ST = cast<StoreSDNode>(N);
if (ST->isVolatile())
return SDValue();
SDValue Chain = ST->getChain();
SDValue Value = ST->getValue();
SDValue Ptr = ST->getBasePtr();
EVT VT = Value.getValueType();
if (ST->isTruncatingStore() || VT.isVector() || !Value.hasOneUse())
return SDValue();
unsigned Opc = Value.getOpcode();
// If this is "store (or X, Y), P" and X is "(and (load P), cst)", where cst
// is a byte mask indicating a consecutive number of bytes, check to see if
// Y is known to provide just those bytes. If so, we try to replace the
// load + replace + store sequence with a single (narrower) store, which makes
// the load dead.
if (Opc == ISD::OR) {
std::pair<unsigned, unsigned> MaskedLoad;
MaskedLoad = CheckForMaskedLoad(Value.getOperand(0), Ptr, Chain);
if (MaskedLoad.first)
if (SDNode *NewST = ShrinkLoadReplaceStoreWithStore(MaskedLoad,
Value.getOperand(1), ST,this))
return SDValue(NewST, 0);
// Or is commutative, so try swapping X and Y.
MaskedLoad = CheckForMaskedLoad(Value.getOperand(1), Ptr, Chain);
if (MaskedLoad.first)
if (SDNode *NewST = ShrinkLoadReplaceStoreWithStore(MaskedLoad,
Value.getOperand(0), ST,this))
return SDValue(NewST, 0);
}
if ((Opc != ISD::OR && Opc != ISD::XOR && Opc != ISD::AND) ||
Value.getOperand(1).getOpcode() != ISD::Constant)
return SDValue();
SDValue N0 = Value.getOperand(0);
if (ISD::isNormalLoad(N0.getNode()) && N0.hasOneUse() &&
Chain == SDValue(N0.getNode(), 1)) {
LoadSDNode *LD = cast<LoadSDNode>(N0);
if (LD->getBasePtr() != Ptr ||
LD->getPointerInfo().getAddrSpace() !=
ST->getPointerInfo().getAddrSpace())
return SDValue();
// Find the type to narrow it the load / op / store to.
SDValue N1 = Value.getOperand(1);
unsigned BitWidth = N1.getValueSizeInBits();
APInt Imm = cast<ConstantSDNode>(N1)->getAPIntValue();
if (Opc == ISD::AND)
Imm ^= APInt::getAllOnesValue(BitWidth);
if (Imm == 0 || Imm.isAllOnesValue())
return SDValue();
unsigned ShAmt = Imm.countTrailingZeros();
unsigned MSB = BitWidth - Imm.countLeadingZeros() - 1;
unsigned NewBW = NextPowerOf2(MSB - ShAmt);
EVT NewVT = EVT::getIntegerVT(*DAG.getContext(), NewBW);
// The narrowing should be profitable, the load/store operation should be
// legal (or custom) and the store size should be equal to the NewVT width.
while (NewBW < BitWidth &&
(NewVT.getStoreSizeInBits() != NewBW ||
!TLI.isOperationLegalOrCustom(Opc, NewVT) ||
!TLI.isNarrowingProfitable(VT, NewVT))) {
NewBW = NextPowerOf2(NewBW);
NewVT = EVT::getIntegerVT(*DAG.getContext(), NewBW);
}
if (NewBW >= BitWidth)
return SDValue();
// If the lsb changed does not start at the type bitwidth boundary,
// start at the previous one.
if (ShAmt % NewBW)
ShAmt = (((ShAmt + NewBW - 1) / NewBW) * NewBW) - NewBW;
APInt Mask = APInt::getBitsSet(BitWidth, ShAmt,
std::min(BitWidth, ShAmt + NewBW));
if ((Imm & Mask) == Imm) {
APInt NewImm = (Imm & Mask).lshr(ShAmt).trunc(NewBW);
if (Opc == ISD::AND)
NewImm ^= APInt::getAllOnesValue(NewBW);
uint64_t PtrOff = ShAmt / 8;
// For big endian targets, we need to adjust the offset to the pointer to
// load the correct bytes.
if (DAG.getDataLayout().isBigEndian())
PtrOff = (BitWidth + 7 - NewBW) / 8 - PtrOff;
unsigned NewAlign = MinAlign(LD->getAlignment(), PtrOff);
Type *NewVTTy = NewVT.getTypeForEVT(*DAG.getContext());
if (NewAlign < DAG.getDataLayout().getABITypeAlignment(NewVTTy))
return SDValue();
SDValue NewPtr = DAG.getNode(ISD::ADD, SDLoc(LD),
Ptr.getValueType(), Ptr,
DAG.getConstant(PtrOff, SDLoc(LD),
Ptr.getValueType()));
SDValue NewLD =
DAG.getLoad(NewVT, SDLoc(N0), LD->getChain(), NewPtr,
LD->getPointerInfo().getWithOffset(PtrOff), NewAlign,
LD->getMemOperand()->getFlags(), LD->getAAInfo());
SDValue NewVal = DAG.getNode(Opc, SDLoc(Value), NewVT, NewLD,
DAG.getConstant(NewImm, SDLoc(Value),
NewVT));
SDValue NewST =
DAG.getStore(Chain, SDLoc(N), NewVal, NewPtr,
ST->getPointerInfo().getWithOffset(PtrOff), NewAlign);
AddToWorklist(NewPtr.getNode());
AddToWorklist(NewLD.getNode());
AddToWorklist(NewVal.getNode());
WorklistRemover DeadNodes(*this);
DAG.ReplaceAllUsesOfValueWith(N0.getValue(1), NewLD.getValue(1));
++OpsNarrowed;
return NewST;
}
}
return SDValue();
}
/// For a given floating point load / store pair, if the load value isn't used
/// by any other operations, then consider transforming the pair to integer
/// load / store operations if the target deems the transformation profitable.
SDValue DAGCombiner::TransformFPLoadStorePair(SDNode *N) {
StoreSDNode *ST = cast<StoreSDNode>(N);
SDValue Chain = ST->getChain();
SDValue Value = ST->getValue();
if (ISD::isNormalStore(ST) && ISD::isNormalLoad(Value.getNode()) &&
Value.hasOneUse() &&
Chain == SDValue(Value.getNode(), 1)) {
LoadSDNode *LD = cast<LoadSDNode>(Value);
EVT VT = LD->getMemoryVT();
if (!VT.isFloatingPoint() ||
VT != ST->getMemoryVT() ||
LD->isNonTemporal() ||
ST->isNonTemporal() ||
LD->getPointerInfo().getAddrSpace() != 0 ||
ST->getPointerInfo().getAddrSpace() != 0)
return SDValue();
EVT IntVT = EVT::getIntegerVT(*DAG.getContext(), VT.getSizeInBits());
if (!TLI.isOperationLegal(ISD::LOAD, IntVT) ||
!TLI.isOperationLegal(ISD::STORE, IntVT) ||
!TLI.isDesirableToTransformToIntegerOp(ISD::LOAD, VT) ||
!TLI.isDesirableToTransformToIntegerOp(ISD::STORE, VT))
return SDValue();
unsigned LDAlign = LD->getAlignment();
unsigned STAlign = ST->getAlignment();
Type *IntVTTy = IntVT.getTypeForEVT(*DAG.getContext());
unsigned ABIAlign = DAG.getDataLayout().getABITypeAlignment(IntVTTy);
if (LDAlign < ABIAlign || STAlign < ABIAlign)
return SDValue();
SDValue NewLD =
DAG.getLoad(IntVT, SDLoc(Value), LD->getChain(), LD->getBasePtr(),
LD->getPointerInfo(), LDAlign);
SDValue NewST =
DAG.getStore(NewLD.getValue(1), SDLoc(N), NewLD, ST->getBasePtr(),
ST->getPointerInfo(), STAlign);
AddToWorklist(NewLD.getNode());
AddToWorklist(NewST.getNode());
WorklistRemover DeadNodes(*this);
DAG.ReplaceAllUsesOfValueWith(Value.getValue(1), NewLD.getValue(1));
++LdStFP2Int;
return NewST;
}
return SDValue();
}
// This is a helper function for visitMUL to check the profitability
// of folding (mul (add x, c1), c2) -> (add (mul x, c2), c1*c2).
// MulNode is the original multiply, AddNode is (add x, c1),
// and ConstNode is c2.
//
// If the (add x, c1) has multiple uses, we could increase
// the number of adds if we make this transformation.
// It would only be worth doing this if we can remove a
// multiply in the process. Check for that here.
// To illustrate:
// (A + c1) * c3
// (A + c2) * c3
// We're checking for cases where we have common "c3 * A" expressions.
bool DAGCombiner::isMulAddWithConstProfitable(SDNode *MulNode,
SDValue &AddNode,
SDValue &ConstNode) {
APInt Val;
// If the add only has one use, this would be OK to do.
if (AddNode.getNode()->hasOneUse())
return true;
// Walk all the users of the constant with which we're multiplying.
for (SDNode *Use : ConstNode->uses()) {
if (Use == MulNode) // This use is the one we're on right now. Skip it.
continue;
if (Use->getOpcode() == ISD::MUL) { // We have another multiply use.
SDNode *OtherOp;
SDNode *MulVar = AddNode.getOperand(0).getNode();
// OtherOp is what we're multiplying against the constant.
if (Use->getOperand(0) == ConstNode)
OtherOp = Use->getOperand(1).getNode();
else
OtherOp = Use->getOperand(0).getNode();
// Check to see if multiply is with the same operand of our "add".
//
// ConstNode = CONST
// Use = ConstNode * A <-- visiting Use. OtherOp is A.
// ...
// AddNode = (A + c1) <-- MulVar is A.
// = AddNode * ConstNode <-- current visiting instruction.
//
// If we make this transformation, we will have a common
// multiply (ConstNode * A) that we can save.
if (OtherOp == MulVar)
return true;
// Now check to see if a future expansion will give us a common
// multiply.
//
// ConstNode = CONST
// AddNode = (A + c1)
// ... = AddNode * ConstNode <-- current visiting instruction.
// ...
// OtherOp = (A + c2)
// Use = OtherOp * ConstNode <-- visiting Use.
//
// If we make this transformation, we will have a common
// multiply (CONST * A) after we also do the same transformation
// to the "t2" instruction.
if (OtherOp->getOpcode() == ISD::ADD &&
DAG.isConstantIntBuildVectorOrConstantInt(OtherOp->getOperand(1)) &&
OtherOp->getOperand(0).getNode() == MulVar)
return true;
}
}
// Didn't find a case where this would be profitable.
return false;
}
bool DAGCombiner::MergeStoresOfConstantsOrVecElts(
SmallVectorImpl<MemOpLink> &StoreNodes, EVT MemVT,
unsigned NumStores, bool IsConstantSrc, bool UseVector) {
// Make sure we have something to merge.
if (NumStores < 2)
return false;
int64_t ElementSizeBytes = MemVT.getSizeInBits() / 8;
// The latest Node in the DAG.
SDLoc DL(StoreNodes[0].MemNode);
SDValue StoredVal;
if (UseVector) {
bool IsVec = MemVT.isVector();
unsigned Elts = NumStores;
if (IsVec) {
// When merging vector stores, get the total number of elements.
Elts *= MemVT.getVectorNumElements();
}
// Get the type for the merged vector store.
EVT Ty = EVT::getVectorVT(*DAG.getContext(), MemVT.getScalarType(), Elts);
assert(TLI.isTypeLegal(Ty) && "Illegal vector store");
if (IsConstantSrc) {
SmallVector<SDValue, 8> BuildVector;
for (unsigned I = 0, E = Ty.getVectorNumElements(); I != E; ++I) {
StoreSDNode *St = cast<StoreSDNode>(StoreNodes[I].MemNode);
SDValue Val = St->getValue();
if (MemVT.getScalarType().isInteger())
if (auto *CFP = dyn_cast<ConstantFPSDNode>(St->getValue()))
Val = DAG.getConstant(
(uint32_t)CFP->getValueAPF().bitcastToAPInt().getZExtValue(),
SDLoc(CFP), MemVT);
BuildVector.push_back(Val);
}
StoredVal = DAG.getBuildVector(Ty, DL, BuildVector);
} else {
SmallVector<SDValue, 8> Ops;
for (unsigned i = 0; i < NumStores; ++i) {
StoreSDNode *St = cast<StoreSDNode>(StoreNodes[i].MemNode);
SDValue Val = St->getValue();
// All operands of BUILD_VECTOR / CONCAT_VECTOR must have the same type.
if (Val.getValueType() != MemVT)
return false;
Ops.push_back(Val);
}
// Build the extracted vector elements back into a vector.
StoredVal = DAG.getNode(IsVec ? ISD::CONCAT_VECTORS : ISD::BUILD_VECTOR,
DL, Ty, Ops); }
} else {
// We should always use a vector store when merging extracted vector
// elements, so this path implies a store of constants.
assert(IsConstantSrc && "Merged vector elements should use vector store");
unsigned SizeInBits = NumStores * ElementSizeBytes * 8;
APInt StoreInt(SizeInBits, 0);
// Construct a single integer constant which is made of the smaller
// constant inputs.
bool IsLE = DAG.getDataLayout().isLittleEndian();
for (unsigned i = 0; i < NumStores; ++i) {
unsigned Idx = IsLE ? (NumStores - 1 - i) : i;
StoreSDNode *St = cast<StoreSDNode>(StoreNodes[Idx].MemNode);
SDValue Val = St->getValue();
StoreInt <<= ElementSizeBytes * 8;
if (ConstantSDNode *C = dyn_cast<ConstantSDNode>(Val)) {
StoreInt |= C->getAPIntValue().zext(SizeInBits);
} else if (ConstantFPSDNode *C = dyn_cast<ConstantFPSDNode>(Val)) {
StoreInt |= C->getValueAPF().bitcastToAPInt().zext(SizeInBits);
} else {
llvm_unreachable("Invalid constant element type");
}
}
// Create the new Load and Store operations.
EVT StoreTy = EVT::getIntegerVT(*DAG.getContext(), SizeInBits);
StoredVal = DAG.getConstant(StoreInt, DL, StoreTy);
}
SmallVector<SDValue, 8> Chains;
// Gather all Chains we're inheriting. As generally all chains are
// equal, do minor check to remove obvious redundancies.
Chains.push_back(StoreNodes[0].MemNode->getChain());
for (unsigned i = 1; i < NumStores; ++i)
if (StoreNodes[0].MemNode->getChain() != StoreNodes[i].MemNode->getChain())
Chains.push_back(StoreNodes[i].MemNode->getChain());
LSBaseSDNode *FirstInChain = StoreNodes[0].MemNode;
SDValue NewChain = DAG.getNode(ISD::TokenFactor, DL, MVT::Other, Chains);
SDValue NewStore = DAG.getStore(NewChain, DL, StoredVal,
FirstInChain->getBasePtr(),
FirstInChain->getPointerInfo(),
FirstInChain->getAlignment());
// Replace all merged stores with the new store.
for (unsigned i = 0; i < NumStores; ++i)
CombineTo(StoreNodes[i].MemNode, NewStore);
AddToWorklist(NewChain.getNode());
return true;
}
void DAGCombiner::getStoreMergeCandidates(
StoreSDNode *St, SmallVectorImpl<MemOpLink> &StoreNodes) {
// This holds the base pointer, index, and the offset in bytes from the base
// pointer.
BaseIndexOffset BasePtr = BaseIndexOffset::match(St->getBasePtr(), DAG);
EVT MemVT = St->getMemoryVT();
// We must have a base and an offset.
if (!BasePtr.Base.getNode())
return;
// Do not handle stores to undef base pointers.
if (BasePtr.Base.isUndef())
return;
// We looking for a root node which is an ancestor to all mergable
// stores. We search up through a load, to our root and then down
// through all children. For instance we will find Store{1,2,3} if
// St is Store1, Store2. or Store3 where the root is not a load
// which always true for nonvolatile ops. TODO: Expand
// the search to find all valid candidates through multiple layers of loads.
//
// Root
// |-------|-------|
// Load Load Store3
// | |
// Store1 Store2
//
// FIXME: We should be able to climb and
// descend TokenFactors to find candidates as well.
SDNode *RootNode = (St->getChain()).getNode();
// Set of Parents of Candidates
std::set<SDNode *> CandidateParents;
if (LoadSDNode *Ldn = dyn_cast<LoadSDNode>(RootNode)) {
RootNode = Ldn->getChain().getNode();
for (auto I = RootNode->use_begin(), E = RootNode->use_end(); I != E; ++I)
if (I.getOperandNo() == 0 && isa<LoadSDNode>(*I)) // walk down chain
CandidateParents.insert(*I);
} else
CandidateParents.insert(RootNode);
bool IsLoadSrc = isa<LoadSDNode>(St->getValue());
bool IsConstantSrc = isa<ConstantSDNode>(St->getValue()) ||
isa<ConstantFPSDNode>(St->getValue());
bool IsExtractVecSrc =
(St->getValue().getOpcode() == ISD::EXTRACT_VECTOR_ELT ||
St->getValue().getOpcode() == ISD::EXTRACT_SUBVECTOR);
auto CorrectValueKind = [&](StoreSDNode *Other) -> bool {
if (IsLoadSrc)
return isa<LoadSDNode>(Other->getValue());
if (IsConstantSrc)
return (isa<ConstantSDNode>(Other->getValue()) ||
isa<ConstantFPSDNode>(Other->getValue()));
if (IsExtractVecSrc)
return (Other->getValue().getOpcode() == ISD::EXTRACT_VECTOR_ELT ||
Other->getValue().getOpcode() == ISD::EXTRACT_SUBVECTOR);
return false;
};
// check all parents of mergable children
for (auto P = CandidateParents.begin(); P != CandidateParents.end(); ++P)
for (auto I = (*P)->use_begin(), E = (*P)->use_end(); I != E; ++I)
if (I.getOperandNo() == 0)
if (StoreSDNode *OtherST = dyn_cast<StoreSDNode>(*I)) {
if (OtherST->isVolatile() || OtherST->isIndexed())
continue;
// We can merge constant floats to equivalent integers
if (OtherST->getMemoryVT() != MemVT)
if (!(MemVT.isInteger() && MemVT.bitsEq(OtherST->getMemoryVT()) &&
isa<ConstantFPSDNode>(OtherST->getValue())))
continue;
BaseIndexOffset Ptr =
BaseIndexOffset::match(OtherST->getBasePtr(), DAG);
if (Ptr.equalBaseIndex(BasePtr) && CorrectValueKind(OtherST))
StoreNodes.push_back(MemOpLink(OtherST, Ptr.Offset));
}
}
// We need to check that merging these stores does not cause a loop
// in the DAG. Any store candidate may depend on another candidate
// indirectly through its operand (we already consider dependencies
// through the chain). Check in parallel by searching up from
// non-chain operands of candidates.
bool DAGCombiner::checkMergeStoreCandidatesForDependencies(
SmallVectorImpl<MemOpLink> &StoreNodes) {
SmallPtrSet<const SDNode *, 16> Visited;
SmallVector<const SDNode *, 8> Worklist;
// search ops of store candidates
for (unsigned i = 0; i < StoreNodes.size(); ++i) {
SDNode *n = StoreNodes[i].MemNode;
// Potential loops may happen only through non-chain operands
for (unsigned j = 1; j < n->getNumOperands(); ++j)
Worklist.push_back(n->getOperand(j).getNode());
}
// search through DAG. We can stop early if we find a storenode
for (unsigned i = 0; i < StoreNodes.size(); ++i) {
if (SDNode::hasPredecessorHelper(StoreNodes[i].MemNode, Visited, Worklist))
return false;
}
return true;
}
bool DAGCombiner::MergeConsecutiveStores(StoreSDNode *St) {
if (OptLevel == CodeGenOpt::None)
return false;
EVT MemVT = St->getMemoryVT();
int64_t ElementSizeBytes = MemVT.getSizeInBits() / 8;
if (MemVT.getSizeInBits() * 2 > MaximumLegalStoreInBits)
return false;
bool NoVectors = DAG.getMachineFunction().getFunction()->hasFnAttribute(
Attribute::NoImplicitFloat);
// This function cannot currently deal with non-byte-sized memory sizes.
if (ElementSizeBytes * 8 != MemVT.getSizeInBits())
return false;
if (!MemVT.isSimple())
return false;
// Perform an early exit check. Do not bother looking at stored values that
// are not constants, loads, or extracted vector elements.
SDValue StoredVal = St->getValue();
bool IsLoadSrc = isa<LoadSDNode>(StoredVal);
bool IsConstantSrc = isa<ConstantSDNode>(StoredVal) ||
isa<ConstantFPSDNode>(StoredVal);
bool IsExtractVecSrc = (StoredVal.getOpcode() == ISD::EXTRACT_VECTOR_ELT ||
StoredVal.getOpcode() == ISD::EXTRACT_SUBVECTOR);
if (!IsConstantSrc && !IsLoadSrc && !IsExtractVecSrc)
return false;
// Don't merge vectors into wider vectors if the source data comes from loads.
// TODO: This restriction can be lifted by using logic similar to the
// ExtractVecSrc case.
if (MemVT.isVector() && IsLoadSrc)
return false;
SmallVector<MemOpLink, 8> StoreNodes;
// Find potential store merge candidates by searching through chain sub-DAG
getStoreMergeCandidates(St, StoreNodes);
// Check if there is anything to merge.
if (StoreNodes.size() < 2)
return false;
// Check that we can merge these candidates without causing a cycle
if (!checkMergeStoreCandidatesForDependencies(StoreNodes))
return false;
// Sort the memory operands according to their distance from the
// base pointer.
std::sort(StoreNodes.begin(), StoreNodes.end(),
[](MemOpLink LHS, MemOpLink RHS) {
return LHS.OffsetFromBase < RHS.OffsetFromBase;
});
// Scan the memory operations on the chain and find the first non-consecutive
// store memory address.
unsigned NumConsecutiveStores = 0;
int64_t StartAddress = StoreNodes[0].OffsetFromBase;
// Check that the addresses are consecutive starting from the second
// element in the list of stores.
for (unsigned i = 1, e = StoreNodes.size(); i < e; ++i) {
int64_t CurrAddress = StoreNodes[i].OffsetFromBase;
if (CurrAddress - StartAddress != (ElementSizeBytes * i))
break;
NumConsecutiveStores = i + 1;
}
if (NumConsecutiveStores < 2)
return false;
// The node with the lowest store address.
LLVMContext &Context = *DAG.getContext();
const DataLayout &DL = DAG.getDataLayout();
// Store the constants into memory as one consecutive store.
if (IsConstantSrc) {
bool RV = false;
while (NumConsecutiveStores > 1) {
LSBaseSDNode *FirstInChain = StoreNodes[0].MemNode;
unsigned FirstStoreAS = FirstInChain->getAddressSpace();
unsigned FirstStoreAlign = FirstInChain->getAlignment();
unsigned LastLegalType = 0;
unsigned LastLegalVectorType = 0;
bool NonZero = false;
for (unsigned i = 0; i < NumConsecutiveStores; ++i) {
StoreSDNode *ST = cast<StoreSDNode>(StoreNodes[i].MemNode);
SDValue StoredVal = ST->getValue();
if (ConstantSDNode *C = dyn_cast<ConstantSDNode>(StoredVal)) {
NonZero |= !C->isNullValue();
} else if (ConstantFPSDNode *C =
dyn_cast<ConstantFPSDNode>(StoredVal)) {
NonZero |= !C->getConstantFPValue()->isNullValue();
} else {
// Non-constant.
break;
}
// Find a legal type for the constant store.
unsigned SizeInBits = (i + 1) * ElementSizeBytes * 8;
EVT StoreTy = EVT::getIntegerVT(Context, SizeInBits);
bool IsFast = false;
if (TLI.isTypeLegal(StoreTy) &&
TLI.allowsMemoryAccess(Context, DL, StoreTy, FirstStoreAS,
FirstStoreAlign, &IsFast) &&
IsFast) {
LastLegalType = i + 1;
// Or check whether a truncstore is legal.
} else if (TLI.getTypeAction(Context, StoreTy) ==
TargetLowering::TypePromoteInteger) {
EVT LegalizedStoredValueTy =
TLI.getTypeToTransformTo(Context, StoredVal.getValueType());
if (TLI.isTruncStoreLegal(LegalizedStoredValueTy, StoreTy) &&
TLI.allowsMemoryAccess(Context, DL, LegalizedStoredValueTy,
FirstStoreAS, FirstStoreAlign, &IsFast) &&
IsFast) {
LastLegalType = i + 1;
}
}
// We only use vectors if the constant is known to be zero or the target
// allows it and the function is not marked with the noimplicitfloat
// attribute.
if ((!NonZero ||
TLI.storeOfVectorConstantIsCheap(MemVT, i + 1, FirstStoreAS)) &&
!NoVectors) {
// Find a legal type for the vector store.
EVT Ty = EVT::getVectorVT(Context, MemVT, i + 1);
if (TLI.isTypeLegal(Ty) && TLI.canMergeStoresTo(Ty) &&
TLI.allowsMemoryAccess(Context, DL, Ty, FirstStoreAS,
FirstStoreAlign, &IsFast) &&
IsFast)
LastLegalVectorType = i + 1;
}
}
// Check if we found a legal integer type that creates a meaningful merge.
if (LastLegalType < 2 && LastLegalVectorType < 2)
break;
bool UseVector = (LastLegalVectorType > LastLegalType) && !NoVectors;
unsigned NumElem = (UseVector) ? LastLegalVectorType : LastLegalType;
bool Merged = MergeStoresOfConstantsOrVecElts(StoreNodes, MemVT, NumElem,
true, UseVector);
if (!Merged)
break;
// Remove merged stores for next iteration.
StoreNodes.erase(StoreNodes.begin(), StoreNodes.begin() + NumElem);
RV = true;
NumConsecutiveStores -= NumElem;
}
return RV;
}
// When extracting multiple vector elements, try to store them
// in one vector store rather than a sequence of scalar stores.
if (IsExtractVecSrc) {
LSBaseSDNode *FirstInChain = StoreNodes[0].MemNode;
unsigned FirstStoreAS = FirstInChain->getAddressSpace();
unsigned FirstStoreAlign = FirstInChain->getAlignment();
unsigned NumStoresToMerge = 0;
bool IsVec = MemVT.isVector();
for (unsigned i = 0; i < NumConsecutiveStores; ++i) {
StoreSDNode *St = cast<StoreSDNode>(StoreNodes[i].MemNode);
unsigned StoreValOpcode = St->getValue().getOpcode();
// This restriction could be loosened.
// Bail out if any stored values are not elements extracted from a vector.
// It should be possible to handle mixed sources, but load sources need
// more careful handling (see the block of code below that handles
// consecutive loads).
if (StoreValOpcode != ISD::EXTRACT_VECTOR_ELT &&
StoreValOpcode != ISD::EXTRACT_SUBVECTOR)
return false;
// Find a legal type for the vector store.
unsigned Elts = i + 1;
if (IsVec) {
// When merging vector stores, get the total number of elements.
Elts *= MemVT.getVectorNumElements();
}
EVT Ty = EVT::getVectorVT(*DAG.getContext(), MemVT.getScalarType(), Elts);
bool IsFast;
if (TLI.isTypeLegal(Ty) &&
TLI.allowsMemoryAccess(Context, DL, Ty, FirstStoreAS,
FirstStoreAlign, &IsFast) && IsFast)
NumStoresToMerge = i + 1;
}
return MergeStoresOfConstantsOrVecElts(StoreNodes, MemVT, NumStoresToMerge,
false, true);
}
// Below we handle the case of multiple consecutive stores that
// come from multiple consecutive loads. We merge them into a single
// wide load and a single wide store.
// Look for load nodes which are used by the stored values.
SmallVector<MemOpLink, 8> LoadNodes;
// Find acceptable loads. Loads need to have the same chain (token factor),
// must not be zext, volatile, indexed, and they must be consecutive.
BaseIndexOffset LdBasePtr;
for (unsigned i = 0; i < NumConsecutiveStores; ++i) {
StoreSDNode *St = cast<StoreSDNode>(StoreNodes[i].MemNode);
LoadSDNode *Ld = dyn_cast<LoadSDNode>(St->getValue());
if (!Ld) break;
// Loads must only have one use.
if (!Ld->hasNUsesOfValue(1, 0))
break;
// The memory operands must not be volatile.
if (Ld->isVolatile() || Ld->isIndexed())
break;
// We do not accept ext loads.
if (Ld->getExtensionType() != ISD::NON_EXTLOAD)
break;
// The stored memory type must be the same.
if (Ld->getMemoryVT() != MemVT)
break;
BaseIndexOffset LdPtr = BaseIndexOffset::match(Ld->getBasePtr(), DAG);
// If this is not the first ptr that we check.
if (LdBasePtr.Base.getNode()) {
// The base ptr must be the same.
if (!LdPtr.equalBaseIndex(LdBasePtr))
break;
} else {
// Check that all other base pointers are the same as this one.
LdBasePtr = LdPtr;
}
// We found a potential memory operand to merge.
LoadNodes.push_back(MemOpLink(Ld, LdPtr.Offset));
}
if (LoadNodes.size() < 2)
return false;
// If we have load/store pair instructions and we only have two values,
// don't bother.
unsigned RequiredAlignment;
if (LoadNodes.size() == 2 && TLI.hasPairedLoad(MemVT, RequiredAlignment) &&
St->getAlignment() >= RequiredAlignment)
return false;
LSBaseSDNode *FirstInChain = StoreNodes[0].MemNode;
unsigned FirstStoreAS = FirstInChain->getAddressSpace();
unsigned FirstStoreAlign = FirstInChain->getAlignment();
LoadSDNode *FirstLoad = cast<LoadSDNode>(LoadNodes[0].MemNode);
unsigned FirstLoadAS = FirstLoad->getAddressSpace();
unsigned FirstLoadAlign = FirstLoad->getAlignment();
// Scan the memory operations on the chain and find the first non-consecutive
// load memory address. These variables hold the index in the store node
// array.
unsigned LastConsecutiveLoad = 0;
// This variable refers to the size and not index in the array.
unsigned LastLegalVectorType = 0;
unsigned LastLegalIntegerType = 0;
StartAddress = LoadNodes[0].OffsetFromBase;
SDValue FirstChain = FirstLoad->getChain();
for (unsigned i = 1; i < LoadNodes.size(); ++i) {
// All loads must share the same chain.
if (LoadNodes[i].MemNode->getChain() != FirstChain)
break;
int64_t CurrAddress = LoadNodes[i].OffsetFromBase;
if (CurrAddress - StartAddress != (ElementSizeBytes * i))
break;
LastConsecutiveLoad = i;
// Find a legal type for the vector store.
EVT StoreTy = EVT::getVectorVT(Context, MemVT, i+1);
bool IsFastSt, IsFastLd;
if (TLI.isTypeLegal(StoreTy) &&
TLI.allowsMemoryAccess(Context, DL, StoreTy, FirstStoreAS,
FirstStoreAlign, &IsFastSt) && IsFastSt &&
TLI.allowsMemoryAccess(Context, DL, StoreTy, FirstLoadAS,
FirstLoadAlign, &IsFastLd) && IsFastLd) {
LastLegalVectorType = i + 1;
}
// Find a legal type for the integer store.
unsigned SizeInBits = (i+1) * ElementSizeBytes * 8;
StoreTy = EVT::getIntegerVT(Context, SizeInBits);
if (TLI.isTypeLegal(StoreTy) &&
TLI.allowsMemoryAccess(Context, DL, StoreTy, FirstStoreAS,
FirstStoreAlign, &IsFastSt) && IsFastSt &&
TLI.allowsMemoryAccess(Context, DL, StoreTy, FirstLoadAS,
FirstLoadAlign, &IsFastLd) && IsFastLd)
LastLegalIntegerType = i + 1;
// Or check whether a truncstore and extload is legal.
else if (TLI.getTypeAction(Context, StoreTy) ==
TargetLowering::TypePromoteInteger) {
EVT LegalizedStoredValueTy =
TLI.getTypeToTransformTo(Context, StoreTy);
if (TLI.isTruncStoreLegal(LegalizedStoredValueTy, StoreTy) &&
TLI.isLoadExtLegal(ISD::ZEXTLOAD, LegalizedStoredValueTy, StoreTy) &&
TLI.isLoadExtLegal(ISD::SEXTLOAD, LegalizedStoredValueTy, StoreTy) &&
TLI.isLoadExtLegal(ISD::EXTLOAD, LegalizedStoredValueTy, StoreTy) &&
TLI.allowsMemoryAccess(Context, DL, LegalizedStoredValueTy,
FirstStoreAS, FirstStoreAlign, &IsFastSt) &&
IsFastSt &&
TLI.allowsMemoryAccess(Context, DL, LegalizedStoredValueTy,
FirstLoadAS, FirstLoadAlign, &IsFastLd) &&
IsFastLd)
LastLegalIntegerType = i+1;
}
}
// Only use vector types if the vector type is larger than the integer type.
// If they are the same, use integers.
bool UseVectorTy = LastLegalVectorType > LastLegalIntegerType && !NoVectors;
unsigned LastLegalType = std::max(LastLegalVectorType, LastLegalIntegerType);
// We add +1 here because the LastXXX variables refer to location while
// the NumElem refers to array/index size.
unsigned NumElem = std::min(NumConsecutiveStores, LastConsecutiveLoad + 1);
NumElem = std::min(LastLegalType, NumElem);
if (NumElem < 2)
return false;
// Collect the chains from all merged stores. Because the common case
// all chains are the same, check if we match the first Chain.
SmallVector<SDValue, 8> MergeStoreChains;
MergeStoreChains.push_back(StoreNodes[0].MemNode->getChain());
for (unsigned i = 1; i < NumElem; ++i)
if (StoreNodes[0].MemNode->getChain() != StoreNodes[i].MemNode->getChain())
MergeStoreChains.push_back(StoreNodes[i].MemNode->getChain());
// Find if it is better to use vectors or integers to load and store
// to memory.
EVT JointMemOpVT;
if (UseVectorTy) {
JointMemOpVT = EVT::getVectorVT(Context, MemVT, NumElem);
} else {
unsigned SizeInBits = NumElem * ElementSizeBytes * 8;
JointMemOpVT = EVT::getIntegerVT(Context, SizeInBits);
}
SDLoc LoadDL(LoadNodes[0].MemNode);
SDLoc StoreDL(StoreNodes[0].MemNode);
// The merged loads are required to have the same incoming chain, so
// using the first's chain is acceptable.
SDValue NewLoad = DAG.getLoad(JointMemOpVT, LoadDL, FirstLoad->getChain(),
FirstLoad->getBasePtr(),
FirstLoad->getPointerInfo(), FirstLoadAlign);
SDValue NewStoreChain =
DAG.getNode(ISD::TokenFactor, StoreDL, MVT::Other, MergeStoreChains);
AddToWorklist(NewStoreChain.getNode());
SDValue NewStore =
DAG.getStore(NewStoreChain, StoreDL, NewLoad, FirstInChain->getBasePtr(),
FirstInChain->getPointerInfo(), FirstStoreAlign);
// Transfer chain users from old loads to the new load.
for (unsigned i = 0; i < NumElem; ++i) {
LoadSDNode *Ld = cast<LoadSDNode>(LoadNodes[i].MemNode);
DAG.ReplaceAllUsesOfValueWith(SDValue(Ld, 1),
SDValue(NewLoad.getNode(), 1));
}
// Replace the all stores with the new store.
for (unsigned i = 0; i < NumElem; ++i)
CombineTo(StoreNodes[i].MemNode, NewStore);
return true;
}
SDValue DAGCombiner::replaceStoreChain(StoreSDNode *ST, SDValue BetterChain) {
SDLoc SL(ST);
SDValue ReplStore;
// Replace the chain to avoid dependency.
if (ST->isTruncatingStore()) {
ReplStore = DAG.getTruncStore(BetterChain, SL, ST->getValue(),
ST->getBasePtr(), ST->getMemoryVT(),
ST->getMemOperand());
} else {
ReplStore = DAG.getStore(BetterChain, SL, ST->getValue(), ST->getBasePtr(),
ST->getMemOperand());
}
// Create token to keep both nodes around.
SDValue Token = DAG.getNode(ISD::TokenFactor, SL,
MVT::Other, ST->getChain(), ReplStore);
// Make sure the new and old chains are cleaned up.
AddToWorklist(Token.getNode());
// Don't add users to work list.
return CombineTo(ST, Token, false);
}
SDValue DAGCombiner::replaceStoreOfFPConstant(StoreSDNode *ST) {
SDValue Value = ST->getValue();
if (Value.getOpcode() == ISD::TargetConstantFP)
return SDValue();
SDLoc DL(ST);
SDValue Chain = ST->getChain();
SDValue Ptr = ST->getBasePtr();
const ConstantFPSDNode *CFP = cast<ConstantFPSDNode>(Value);
// NOTE: If the original store is volatile, this transform must not increase
// the number of stores. For example, on x86-32 an f64 can be stored in one
// processor operation but an i64 (which is not legal) requires two. So the
// transform should not be done in this case.
SDValue Tmp;
switch (CFP->getSimpleValueType(0).SimpleTy) {
default:
llvm_unreachable("Unknown FP type");
case MVT::f16: // We don't do this for these yet.
case MVT::f80:
case MVT::f128:
case MVT::ppcf128:
return SDValue();
case MVT::f32:
if ((isTypeLegal(MVT::i32) && !LegalOperations && !ST->isVolatile()) ||
TLI.isOperationLegalOrCustom(ISD::STORE, MVT::i32)) {
;
Tmp = DAG.getConstant((uint32_t)CFP->getValueAPF().
bitcastToAPInt().getZExtValue(), SDLoc(CFP),
MVT::i32);
return DAG.getStore(Chain, DL, Tmp, Ptr, ST->getMemOperand());
}
return SDValue();
case MVT::f64:
if ((TLI.isTypeLegal(MVT::i64) && !LegalOperations &&
!ST->isVolatile()) ||
TLI.isOperationLegalOrCustom(ISD::STORE, MVT::i64)) {
;
Tmp = DAG.getConstant(CFP->getValueAPF().bitcastToAPInt().
getZExtValue(), SDLoc(CFP), MVT::i64);
return DAG.getStore(Chain, DL, Tmp,
Ptr, ST->getMemOperand());
}
if (!ST->isVolatile() &&
TLI.isOperationLegalOrCustom(ISD::STORE, MVT::i32)) {
// Many FP stores are not made apparent until after legalize, e.g. for
// argument passing. Since this is so common, custom legalize the
// 64-bit integer store into two 32-bit stores.
uint64_t Val = CFP->getValueAPF().bitcastToAPInt().getZExtValue();
SDValue Lo = DAG.getConstant(Val & 0xFFFFFFFF, SDLoc(CFP), MVT::i32);
SDValue Hi = DAG.getConstant(Val >> 32, SDLoc(CFP), MVT::i32);
if (DAG.getDataLayout().isBigEndian())
std::swap(Lo, Hi);
unsigned Alignment = ST->getAlignment();
MachineMemOperand::Flags MMOFlags = ST->getMemOperand()->getFlags();
AAMDNodes AAInfo = ST->getAAInfo();
SDValue St0 = DAG.getStore(Chain, DL, Lo, Ptr, ST->getPointerInfo(),
ST->getAlignment(), MMOFlags, AAInfo);
Ptr = DAG.getNode(ISD::ADD, DL, Ptr.getValueType(), Ptr,
DAG.getConstant(4, DL, Ptr.getValueType()));
Alignment = MinAlign(Alignment, 4U);
SDValue St1 = DAG.getStore(Chain, DL, Hi, Ptr,
ST->getPointerInfo().getWithOffset(4),
Alignment, MMOFlags, AAInfo);
return DAG.getNode(ISD::TokenFactor, DL, MVT::Other,
St0, St1);
}
return SDValue();
}
}
SDValue DAGCombiner::visitSTORE(SDNode *N) {
StoreSDNode *ST = cast<StoreSDNode>(N);
SDValue Chain = ST->getChain();
SDValue Value = ST->getValue();
SDValue Ptr = ST->getBasePtr();
// If this is a store of a bit convert, store the input value if the
// resultant store does not need a higher alignment than the original.
if (Value.getOpcode() == ISD::BITCAST && !ST->isTruncatingStore() &&
ST->isUnindexed()) {
EVT SVT = Value.getOperand(0).getValueType();
if (((!LegalOperations && !ST->isVolatile()) ||
TLI.isOperationLegalOrCustom(ISD::STORE, SVT)) &&
TLI.isStoreBitCastBeneficial(Value.getValueType(), SVT)) {
unsigned OrigAlign = ST->getAlignment();
bool Fast = false;
if (TLI.allowsMemoryAccess(*DAG.getContext(), DAG.getDataLayout(), SVT,
ST->getAddressSpace(), OrigAlign, &Fast) &&
Fast) {
return DAG.getStore(Chain, SDLoc(N), Value.getOperand(0), Ptr,
ST->getPointerInfo(), OrigAlign,
ST->getMemOperand()->getFlags(), ST->getAAInfo());
}
}
}
// Turn 'store undef, Ptr' -> nothing.
if (Value.isUndef() && ST->isUnindexed())
return Chain;
// Try to infer better alignment information than the store already has.
if (OptLevel != CodeGenOpt::None && ST->isUnindexed()) {
if (unsigned Align = DAG.InferPtrAlignment(Ptr)) {
if (Align > ST->getAlignment()) {
SDValue NewStore =
DAG.getTruncStore(Chain, SDLoc(N), Value, Ptr, ST->getPointerInfo(),
ST->getMemoryVT(), Align,
ST->getMemOperand()->getFlags(), ST->getAAInfo());
if (NewStore.getNode() != N)
return CombineTo(ST, NewStore, true);
}
}
}
// Try transforming a pair floating point load / store ops to integer
// load / store ops.
if (SDValue NewST = TransformFPLoadStorePair(N))
return NewST;
if (ST->isUnindexed()) {
// Walk up chain skipping non-aliasing memory nodes, on this store and any
// adjacent stores.
if (findBetterNeighborChains(ST)) {
// replaceStoreChain uses CombineTo, which handled all of the worklist
// manipulation. Return the original node to not do anything else.
return SDValue(ST, 0);
}
Chain = ST->getChain();
}
// Try transforming N to an indexed store.
if (CombineToPreIndexedLoadStore(N) || CombineToPostIndexedLoadStore(N))
return SDValue(N, 0);
// FIXME: is there such a thing as a truncating indexed store?
if (ST->isTruncatingStore() && ST->isUnindexed() &&
Value.getValueType().isInteger()) {
// See if we can simplify the input to this truncstore with knowledge that
// only the low bits are being used. For example:
// "truncstore (or (shl x, 8), y), i8" -> "truncstore y, i8"
SDValue Shorter = GetDemandedBits(
Value, APInt::getLowBitsSet(Value.getScalarValueSizeInBits(),
ST->getMemoryVT().getScalarSizeInBits()));
AddToWorklist(Value.getNode());
if (Shorter.getNode())
return DAG.getTruncStore(Chain, SDLoc(N), Shorter,
Ptr, ST->getMemoryVT(), ST->getMemOperand());
// Otherwise, see if we can simplify the operation with
// SimplifyDemandedBits, which only works if the value has a single use.
if (SimplifyDemandedBits(
Value,
APInt::getLowBitsSet(Value.getScalarValueSizeInBits(),
ST->getMemoryVT().getScalarSizeInBits()))) {
// Re-visit the store if anything changed and the store hasn't been merged
// with another node (N is deleted) SimplifyDemandedBits will add Value's
// node back to the worklist if necessary, but we also need to re-visit
// the Store node itself.
if (N->getOpcode() != ISD::DELETED_NODE)
AddToWorklist(N);
return SDValue(N, 0);
}
}
// If this is a load followed by a store to the same location, then the store
// is dead/noop.
if (LoadSDNode *Ld = dyn_cast<LoadSDNode>(Value)) {
if (Ld->getBasePtr() == Ptr && ST->getMemoryVT() == Ld->getMemoryVT() &&
ST->isUnindexed() && !ST->isVolatile() &&
// There can't be any side effects between the load and store, such as
// a call or store.
Chain.reachesChainWithoutSideEffects(SDValue(Ld, 1))) {
// The store is dead, remove it.
return Chain;
}
}
// If this is a store followed by a store with the same value to the same
// location, then the store is dead/noop.
if (StoreSDNode *ST1 = dyn_cast<StoreSDNode>(Chain)) {
if (ST1->getBasePtr() == Ptr && ST->getMemoryVT() == ST1->getMemoryVT() &&
ST1->getValue() == Value && ST->isUnindexed() && !ST->isVolatile() &&
ST1->isUnindexed() && !ST1->isVolatile()) {
// The store is dead, remove it.
return Chain;
}
}
// If this is an FP_ROUND or TRUNC followed by a store, fold this into a
// truncating store. We can do this even if this is already a truncstore.
if ((Value.getOpcode() == ISD::FP_ROUND || Value.getOpcode() == ISD::TRUNCATE)
&& Value.getNode()->hasOneUse() && ST->isUnindexed() &&
TLI.isTruncStoreLegal(Value.getOperand(0).getValueType(),
ST->getMemoryVT())) {
return DAG.getTruncStore(Chain, SDLoc(N), Value.getOperand(0),
Ptr, ST->getMemoryVT(), ST->getMemOperand());
}
// Only perform this optimization before the types are legal, because we
// don't want to perform this optimization on every DAGCombine invocation.
if (!LegalTypes) {
for (;;) {
// There can be multiple store sequences on the same chain.
// Keep trying to merge store sequences until we are unable to do so
// or until we merge the last store on the chain.
bool Changed = MergeConsecutiveStores(ST);
if (!Changed) break;
// Return N as merge only uses CombineTo and no worklist clean
// up is necessary.
if (N->getOpcode() == ISD::DELETED_NODE || !isa<StoreSDNode>(N))
return SDValue(N, 0);
}
}
// Turn 'store float 1.0, Ptr' -> 'store int 0x12345678, Ptr'
//
// Make sure to do this only after attempting to merge stores in order to
// avoid changing the types of some subset of stores due to visit order,
// preventing their merging.
if (isa<ConstantFPSDNode>(ST->getValue())) {
if (SDValue NewSt = replaceStoreOfFPConstant(ST))
return NewSt;
}
if (SDValue NewSt = splitMergedValStore(ST))
return NewSt;
return ReduceLoadOpStoreWidth(N);
}
/// For the instruction sequence of store below, F and I values
/// are bundled together as an i64 value before being stored into memory.
/// Sometimes it is more efficent to generate separate stores for F and I,
/// which can remove the bitwise instructions or sink them to colder places.
///
/// (store (or (zext (bitcast F to i32) to i64),
/// (shl (zext I to i64), 32)), addr) -->
/// (store F, addr) and (store I, addr+4)
///
/// Similarly, splitting for other merged store can also be beneficial, like:
/// For pair of {i32, i32}, i64 store --> two i32 stores.
/// For pair of {i32, i16}, i64 store --> two i32 stores.
/// For pair of {i16, i16}, i32 store --> two i16 stores.
/// For pair of {i16, i8}, i32 store --> two i16 stores.
/// For pair of {i8, i8}, i16 store --> two i8 stores.
///
/// We allow each target to determine specifically which kind of splitting is
/// supported.
///
/// The store patterns are commonly seen from the simple code snippet below
/// if only std::make_pair(...) is sroa transformed before inlined into hoo.
/// void goo(const std::pair<int, float> &);
/// hoo() {
/// ...
/// goo(std::make_pair(tmp, ftmp));
/// ...
/// }
///
SDValue DAGCombiner::splitMergedValStore(StoreSDNode *ST) {
if (OptLevel == CodeGenOpt::None)
return SDValue();
SDValue Val = ST->getValue();
SDLoc DL(ST);
// Match OR operand.
if (!Val.getValueType().isScalarInteger() || Val.getOpcode() != ISD::OR)
return SDValue();
// Match SHL operand and get Lower and Higher parts of Val.
SDValue Op1 = Val.getOperand(0);
SDValue Op2 = Val.getOperand(1);
SDValue Lo, Hi;
if (Op1.getOpcode() != ISD::SHL) {
std::swap(Op1, Op2);
if (Op1.getOpcode() != ISD::SHL)
return SDValue();
}
Lo = Op2;
Hi = Op1.getOperand(0);
if (!Op1.hasOneUse())
return SDValue();
// Match shift amount to HalfValBitSize.
unsigned HalfValBitSize = Val.getValueSizeInBits() / 2;
ConstantSDNode *ShAmt = dyn_cast<ConstantSDNode>(Op1.getOperand(1));
if (!ShAmt || ShAmt->getAPIntValue() != HalfValBitSize)
return SDValue();
// Lo and Hi are zero-extended from int with size less equal than 32
// to i64.
if (Lo.getOpcode() != ISD::ZERO_EXTEND || !Lo.hasOneUse() ||
!Lo.getOperand(0).getValueType().isScalarInteger() ||
Lo.getOperand(0).getValueSizeInBits() > HalfValBitSize ||
Hi.getOpcode() != ISD::ZERO_EXTEND || !Hi.hasOneUse() ||
!Hi.getOperand(0).getValueType().isScalarInteger() ||
Hi.getOperand(0).getValueSizeInBits() > HalfValBitSize)
return SDValue();
// Use the EVT of low and high parts before bitcast as the input
// of target query.
EVT LowTy = (Lo.getOperand(0).getOpcode() == ISD::BITCAST)
? Lo.getOperand(0).getValueType()
: Lo.getValueType();
EVT HighTy = (Hi.getOperand(0).getOpcode() == ISD::BITCAST)
? Hi.getOperand(0).getValueType()
: Hi.getValueType();
if (!TLI.isMultiStoresCheaperThanBitsMerge(LowTy, HighTy))
return SDValue();
// Start to split store.
unsigned Alignment = ST->getAlignment();
MachineMemOperand::Flags MMOFlags = ST->getMemOperand()->getFlags();
AAMDNodes AAInfo = ST->getAAInfo();
// Change the sizes of Lo and Hi's value types to HalfValBitSize.
EVT VT = EVT::getIntegerVT(*DAG.getContext(), HalfValBitSize);
Lo = DAG.getNode(ISD::ZERO_EXTEND, DL, VT, Lo.getOperand(0));
Hi = DAG.getNode(ISD::ZERO_EXTEND, DL, VT, Hi.getOperand(0));
SDValue Chain = ST->getChain();
SDValue Ptr = ST->getBasePtr();
// Lower value store.
SDValue St0 = DAG.getStore(Chain, DL, Lo, Ptr, ST->getPointerInfo(),
ST->getAlignment(), MMOFlags, AAInfo);
Ptr =
DAG.getNode(ISD::ADD, DL, Ptr.getValueType(), Ptr,
DAG.getConstant(HalfValBitSize / 8, DL, Ptr.getValueType()));
// Higher value store.
SDValue St1 =
DAG.getStore(St0, DL, Hi, Ptr,
ST->getPointerInfo().getWithOffset(HalfValBitSize / 8),
Alignment / 2, MMOFlags, AAInfo);
return St1;
}
SDValue DAGCombiner::visitINSERT_VECTOR_ELT(SDNode *N) {
SDValue InVec = N->getOperand(0);
SDValue InVal = N->getOperand(1);
SDValue EltNo = N->getOperand(2);
SDLoc DL(N);
// If the inserted element is an UNDEF, just use the input vector.
if (InVal.isUndef())
return InVec;
EVT VT = InVec.getValueType();
// Check that we know which element is being inserted
if (!isa<ConstantSDNode>(EltNo))
return SDValue();
unsigned Elt = cast<ConstantSDNode>(EltNo)->getZExtValue();
// Canonicalize insert_vector_elt dag nodes.
// Example:
// (insert_vector_elt (insert_vector_elt A, Idx0), Idx1)
// -> (insert_vector_elt (insert_vector_elt A, Idx1), Idx0)
//
// Do this only if the child insert_vector node has one use; also
// do this only if indices are both constants and Idx1 < Idx0.
if (InVec.getOpcode() == ISD::INSERT_VECTOR_ELT && InVec.hasOneUse()
&& isa<ConstantSDNode>(InVec.getOperand(2))) {
unsigned OtherElt =
cast<ConstantSDNode>(InVec.getOperand(2))->getZExtValue();
if (Elt < OtherElt) {
// Swap nodes.
SDValue NewOp = DAG.getNode(ISD::INSERT_VECTOR_ELT, DL, VT,
InVec.getOperand(0), InVal, EltNo);
AddToWorklist(NewOp.getNode());
return DAG.getNode(ISD::INSERT_VECTOR_ELT, SDLoc(InVec.getNode()),
VT, NewOp, InVec.getOperand(1), InVec.getOperand(2));
}
}
// If we can't generate a legal BUILD_VECTOR, exit
if (LegalOperations && !TLI.isOperationLegal(ISD::BUILD_VECTOR, VT))
return SDValue();
// Check that the operand is a BUILD_VECTOR (or UNDEF, which can essentially
// be converted to a BUILD_VECTOR). Fill in the Ops vector with the
// vector elements.
SmallVector<SDValue, 8> Ops;
// Do not combine these two vectors if the output vector will not replace
// the input vector.
if (InVec.getOpcode() == ISD::BUILD_VECTOR && InVec.hasOneUse()) {
Ops.append(InVec.getNode()->op_begin(),
InVec.getNode()->op_end());
} else if (InVec.isUndef()) {
unsigned NElts = VT.getVectorNumElements();
Ops.append(NElts, DAG.getUNDEF(InVal.getValueType()));
} else {
return SDValue();
}
// Insert the element
if (Elt < Ops.size()) {
// All the operands of BUILD_VECTOR must have the same type;
// we enforce that here.
EVT OpVT = Ops[0].getValueType();
Ops[Elt] = OpVT.isInteger() ? DAG.getAnyExtOrTrunc(InVal, DL, OpVT) : InVal;
}
// Return the new vector
return DAG.getBuildVector(VT, DL, Ops);
}
SDValue DAGCombiner::ReplaceExtractVectorEltOfLoadWithNarrowedLoad(
SDNode *EVE, EVT InVecVT, SDValue EltNo, LoadSDNode *OriginalLoad) {
assert(!OriginalLoad->isVolatile());
EVT ResultVT = EVE->getValueType(0);
EVT VecEltVT = InVecVT.getVectorElementType();
unsigned Align = OriginalLoad->getAlignment();
unsigned NewAlign = DAG.getDataLayout().getABITypeAlignment(
VecEltVT.getTypeForEVT(*DAG.getContext()));
if (NewAlign > Align || !TLI.isOperationLegalOrCustom(ISD::LOAD, VecEltVT))
return SDValue();
ISD::LoadExtType ExtTy = ResultVT.bitsGT(VecEltVT) ?
ISD::NON_EXTLOAD : ISD::EXTLOAD;
if (!TLI.shouldReduceLoadWidth(OriginalLoad, ExtTy, VecEltVT))
return SDValue();
Align = NewAlign;
SDValue NewPtr = OriginalLoad->getBasePtr();
SDValue Offset;
EVT PtrType = NewPtr.getValueType();
MachinePointerInfo MPI;
SDLoc DL(EVE);
if (auto *ConstEltNo = dyn_cast<ConstantSDNode>(EltNo)) {
int Elt = ConstEltNo->getZExtValue();
unsigned PtrOff = VecEltVT.getSizeInBits() * Elt / 8;
Offset = DAG.getConstant(PtrOff, DL, PtrType);
MPI = OriginalLoad->getPointerInfo().getWithOffset(PtrOff);
} else {
Offset = DAG.getZExtOrTrunc(EltNo, DL, PtrType);
Offset = DAG.getNode(
ISD::MUL, DL, PtrType, Offset,
DAG.getConstant(VecEltVT.getStoreSize(), DL, PtrType));
MPI = OriginalLoad->getPointerInfo();
}
NewPtr = DAG.getNode(ISD::ADD, DL, PtrType, NewPtr, Offset);
// The replacement we need to do here is a little tricky: we need to
// replace an extractelement of a load with a load.
// Use ReplaceAllUsesOfValuesWith to do the replacement.
// Note that this replacement assumes that the extractvalue is the only
// use of the load; that's okay because we don't want to perform this
// transformation in other cases anyway.
SDValue Load;
SDValue Chain;
if (ResultVT.bitsGT(VecEltVT)) {
// If the result type of vextract is wider than the load, then issue an
// extending load instead.
ISD::LoadExtType ExtType = TLI.isLoadExtLegal(ISD::ZEXTLOAD, ResultVT,
VecEltVT)
? ISD::ZEXTLOAD
: ISD::EXTLOAD;
Load = DAG.getExtLoad(ExtType, SDLoc(EVE), ResultVT,
OriginalLoad->getChain(), NewPtr, MPI, VecEltVT,
Align, OriginalLoad->getMemOperand()->getFlags(),
OriginalLoad->getAAInfo());
Chain = Load.getValue(1);
} else {
Load = DAG.getLoad(VecEltVT, SDLoc(EVE), OriginalLoad->getChain(), NewPtr,
MPI, Align, OriginalLoad->getMemOperand()->getFlags(),
OriginalLoad->getAAInfo());
Chain = Load.getValue(1);
if (ResultVT.bitsLT(VecEltVT))
Load = DAG.getNode(ISD::TRUNCATE, SDLoc(EVE), ResultVT, Load);
else
Load = DAG.getBitcast(ResultVT, Load);
}
WorklistRemover DeadNodes(*this);
SDValue From[] = { SDValue(EVE, 0), SDValue(OriginalLoad, 1) };
SDValue To[] = { Load, Chain };
DAG.ReplaceAllUsesOfValuesWith(From, To, 2);
// Since we're explicitly calling ReplaceAllUses, add the new node to the
// worklist explicitly as well.
AddToWorklist(Load.getNode());
AddUsersToWorklist(Load.getNode()); // Add users too
// Make sure to revisit this node to clean it up; it will usually be dead.
AddToWorklist(EVE);
++OpsNarrowed;
return SDValue(EVE, 0);
}
SDValue DAGCombiner::visitEXTRACT_VECTOR_ELT(SDNode *N) {
// (vextract (scalar_to_vector val, 0) -> val
SDValue InVec = N->getOperand(0);
EVT VT = InVec.getValueType();
EVT NVT = N->getValueType(0);
if (InVec.isUndef())
return DAG.getUNDEF(NVT);
if (InVec.getOpcode() == ISD::SCALAR_TO_VECTOR) {
// Check if the result type doesn't match the inserted element type. A
// SCALAR_TO_VECTOR may truncate the inserted element and the
// EXTRACT_VECTOR_ELT may widen the extracted vector.
SDValue InOp = InVec.getOperand(0);
if (InOp.getValueType() != NVT) {
assert(InOp.getValueType().isInteger() && NVT.isInteger());
return DAG.getSExtOrTrunc(InOp, SDLoc(InVec), NVT);
}
return InOp;
}
SDValue EltNo = N->getOperand(1);
ConstantSDNode *ConstEltNo = dyn_cast<ConstantSDNode>(EltNo);
// extract_vector_elt (build_vector x, y), 1 -> y
if (ConstEltNo &&
InVec.getOpcode() == ISD::BUILD_VECTOR &&
TLI.isTypeLegal(VT) &&
(InVec.hasOneUse() ||
TLI.aggressivelyPreferBuildVectorSources(VT))) {
SDValue Elt = InVec.getOperand(ConstEltNo->getZExtValue());
EVT InEltVT = Elt.getValueType();
// Sometimes build_vector's scalar input types do not match result type.
if (NVT == InEltVT)
return Elt;
// TODO: It may be useful to truncate if free if the build_vector implicitly
// converts.
}
// extract_vector_elt (v2i32 (bitcast i64:x)), 0 -> i32 (trunc i64:x)
if (ConstEltNo && InVec.getOpcode() == ISD::BITCAST && InVec.hasOneUse() &&
ConstEltNo->isNullValue() && VT.isInteger()) {
SDValue BCSrc = InVec.getOperand(0);
if (BCSrc.getValueType().isScalarInteger())
return DAG.getNode(ISD::TRUNCATE, SDLoc(N), NVT, BCSrc);
}
// extract_vector_elt (insert_vector_elt vec, val, idx), idx) -> val
//
// This only really matters if the index is non-constant since other combines
// on the constant elements already work.
if (InVec.getOpcode() == ISD::INSERT_VECTOR_ELT &&
EltNo == InVec.getOperand(2)) {
SDValue Elt = InVec.getOperand(1);
return VT.isInteger() ? DAG.getAnyExtOrTrunc(Elt, SDLoc(N), NVT) : Elt;
}
// Transform: (EXTRACT_VECTOR_ELT( VECTOR_SHUFFLE )) -> EXTRACT_VECTOR_ELT.
// We only perform this optimization before the op legalization phase because
// we may introduce new vector instructions which are not backed by TD
// patterns. For example on AVX, extracting elements from a wide vector
// without using extract_subvector. However, if we can find an underlying
// scalar value, then we can always use that.
if (ConstEltNo && InVec.getOpcode() == ISD::VECTOR_SHUFFLE) {
int NumElem = VT.getVectorNumElements();
ShuffleVectorSDNode *SVOp = cast<ShuffleVectorSDNode>(InVec);
// Find the new index to extract from.
int OrigElt = SVOp->getMaskElt(ConstEltNo->getZExtValue());
// Extracting an undef index is undef.
if (OrigElt == -1)
return DAG.getUNDEF(NVT);
// Select the right vector half to extract from.
SDValue SVInVec;
if (OrigElt < NumElem) {
SVInVec = InVec->getOperand(0);
} else {
SVInVec = InVec->getOperand(1);
OrigElt -= NumElem;
}
if (SVInVec.getOpcode() == ISD::BUILD_VECTOR) {
SDValue InOp = SVInVec.getOperand(OrigElt);
if (InOp.getValueType() != NVT) {
assert(InOp.getValueType().isInteger() && NVT.isInteger());
InOp = DAG.getSExtOrTrunc(InOp, SDLoc(SVInVec), NVT);
}
return InOp;
}
// FIXME: We should handle recursing on other vector shuffles and
// scalar_to_vector here as well.
if (!LegalOperations) {
EVT IndexTy = TLI.getVectorIdxTy(DAG.getDataLayout());
return DAG.getNode(ISD::EXTRACT_VECTOR_ELT, SDLoc(N), NVT, SVInVec,
DAG.getConstant(OrigElt, SDLoc(SVOp), IndexTy));
}
}
bool BCNumEltsChanged = false;
EVT ExtVT = VT.getVectorElementType();
EVT LVT = ExtVT;
// If the result of load has to be truncated, then it's not necessarily
// profitable.
if (NVT.bitsLT(LVT) && !TLI.isTruncateFree(LVT, NVT))
return SDValue();
if (InVec.getOpcode() == ISD::BITCAST) {
// Don't duplicate a load with other uses.
if (!InVec.hasOneUse())
return SDValue();
EVT BCVT = InVec.getOperand(0).getValueType();
if (!BCVT.isVector() || ExtVT.bitsGT(BCVT.getVectorElementType()))
return SDValue();
if (VT.getVectorNumElements() != BCVT.getVectorNumElements())
BCNumEltsChanged = true;
InVec = InVec.getOperand(0);
ExtVT = BCVT.getVectorElementType();
}
// (vextract (vN[if]M load $addr), i) -> ([if]M load $addr + i * size)
if (!LegalOperations && !ConstEltNo && InVec.hasOneUse() &&
ISD::isNormalLoad(InVec.getNode()) &&
!N->getOperand(1)->hasPredecessor(InVec.getNode())) {
SDValue Index = N->getOperand(1);
if (LoadSDNode *OrigLoad = dyn_cast<LoadSDNode>(InVec)) {
if (!OrigLoad->isVolatile()) {
return ReplaceExtractVectorEltOfLoadWithNarrowedLoad(N, VT, Index,
OrigLoad);
}
}
}
// Perform only after legalization to ensure build_vector / vector_shuffle
// optimizations have already been done.
if (!LegalOperations) return SDValue();
// (vextract (v4f32 load $addr), c) -> (f32 load $addr+c*size)
// (vextract (v4f32 s2v (f32 load $addr)), c) -> (f32 load $addr+c*size)
// (vextract (v4f32 shuffle (load $addr), <1,u,u,u>), 0) -> (f32 load $addr)
if (ConstEltNo) {
int Elt = cast<ConstantSDNode>(EltNo)->getZExtValue();
LoadSDNode *LN0 = nullptr;
const ShuffleVectorSDNode *SVN = nullptr;
if (ISD::isNormalLoad(InVec.getNode())) {
LN0 = cast<LoadSDNode>(InVec);
} else if (InVec.getOpcode() == ISD::SCALAR_TO_VECTOR &&
InVec.getOperand(0).getValueType() == ExtVT &&
ISD::isNormalLoad(InVec.getOperand(0).getNode())) {
// Don't duplicate a load with other uses.
if (!InVec.hasOneUse())
return SDValue();
LN0 = cast<LoadSDNode>(InVec.getOperand(0));
} else if ((SVN = dyn_cast<ShuffleVectorSDNode>(InVec))) {
// (vextract (vector_shuffle (load $addr), v2, <1, u, u, u>), 1)
// =>
// (load $addr+1*size)
// Don't duplicate a load with other uses.
if (!InVec.hasOneUse())
return SDValue();
// If the bit convert changed the number of elements, it is unsafe
// to examine the mask.
if (BCNumEltsChanged)
return SDValue();
// Select the input vector, guarding against out of range extract vector.
unsigned NumElems = VT.getVectorNumElements();
int Idx = (Elt > (int)NumElems) ? -1 : SVN->getMaskElt(Elt);
InVec = (Idx < (int)NumElems) ? InVec.getOperand(0) : InVec.getOperand(1);
if (InVec.getOpcode() == ISD::BITCAST) {
// Don't duplicate a load with other uses.
if (!InVec.hasOneUse())
return SDValue();
InVec = InVec.getOperand(0);
}
if (ISD::isNormalLoad(InVec.getNode())) {
LN0 = cast<LoadSDNode>(InVec);
Elt = (Idx < (int)NumElems) ? Idx : Idx - (int)NumElems;
EltNo = DAG.getConstant(Elt, SDLoc(EltNo), EltNo.getValueType());
}
}
// Make sure we found a non-volatile load and the extractelement is
// the only use.
if (!LN0 || !LN0->hasNUsesOfValue(1,0) || LN0->isVolatile())
return SDValue();
// If Idx was -1 above, Elt is going to be -1, so just return undef.
if (Elt == -1)
return DAG.getUNDEF(LVT);
return ReplaceExtractVectorEltOfLoadWithNarrowedLoad(N, VT, EltNo, LN0);
}
return SDValue();
}
// Simplify (build_vec (ext )) to (bitcast (build_vec ))
SDValue DAGCombiner::reduceBuildVecExtToExtBuildVec(SDNode *N) {
// We perform this optimization post type-legalization because
// the type-legalizer often scalarizes integer-promoted vectors.
// Performing this optimization before may create bit-casts which
// will be type-legalized to complex code sequences.
// We perform this optimization only before the operation legalizer because we
// may introduce illegal operations.
if (Level != AfterLegalizeVectorOps && Level != AfterLegalizeTypes)
return SDValue();
unsigned NumInScalars = N->getNumOperands();
SDLoc DL(N);
EVT VT = N->getValueType(0);
// Check to see if this is a BUILD_VECTOR of a bunch of values
// which come from any_extend or zero_extend nodes. If so, we can create
// a new BUILD_VECTOR using bit-casts which may enable other BUILD_VECTOR
// optimizations. We do not handle sign-extend because we can't fill the sign
// using shuffles.
EVT SourceType = MVT::Other;
bool AllAnyExt = true;
for (unsigned i = 0; i != NumInScalars; ++i) {
SDValue In = N->getOperand(i);
// Ignore undef inputs.
if (In.isUndef()) continue;
bool AnyExt = In.getOpcode() == ISD::ANY_EXTEND;
bool ZeroExt = In.getOpcode() == ISD::ZERO_EXTEND;
// Abort if the element is not an extension.
if (!ZeroExt && !AnyExt) {
SourceType = MVT::Other;
break;
}
// The input is a ZeroExt or AnyExt. Check the original type.
EVT InTy = In.getOperand(0).getValueType();
// Check that all of the widened source types are the same.
if (SourceType == MVT::Other)
// First time.
SourceType = InTy;
else if (InTy != SourceType) {
// Multiple income types. Abort.
SourceType = MVT::Other;
break;
}
// Check if all of the extends are ANY_EXTENDs.
AllAnyExt &= AnyExt;
}
// In order to have valid types, all of the inputs must be extended from the
// same source type and all of the inputs must be any or zero extend.
// Scalar sizes must be a power of two.
EVT OutScalarTy = VT.getScalarType();
bool ValidTypes = SourceType != MVT::Other &&
isPowerOf2_32(OutScalarTy.getSizeInBits()) &&
isPowerOf2_32(SourceType.getSizeInBits());
// Create a new simpler BUILD_VECTOR sequence which other optimizations can
// turn into a single shuffle instruction.
if (!ValidTypes)
return SDValue();
bool isLE = DAG.getDataLayout().isLittleEndian();
unsigned ElemRatio = OutScalarTy.getSizeInBits()/SourceType.getSizeInBits();
assert(ElemRatio > 1 && "Invalid element size ratio");
SDValue Filler = AllAnyExt ? DAG.getUNDEF(SourceType):
DAG.getConstant(0, DL, SourceType);
unsigned NewBVElems = ElemRatio * VT.getVectorNumElements();
SmallVector<SDValue, 8> Ops(NewBVElems, Filler);
// Populate the new build_vector
for (unsigned i = 0, e = N->getNumOperands(); i != e; ++i) {
SDValue Cast = N->getOperand(i);
assert((Cast.getOpcode() == ISD::ANY_EXTEND ||
Cast.getOpcode() == ISD::ZERO_EXTEND ||
Cast.isUndef()) && "Invalid cast opcode");
SDValue In;
if (Cast.isUndef())
In = DAG.getUNDEF(SourceType);
else
In = Cast->getOperand(0);
unsigned Index = isLE ? (i * ElemRatio) :
(i * ElemRatio + (ElemRatio - 1));
assert(Index < Ops.size() && "Invalid index");
Ops[Index] = In;
}
// The type of the new BUILD_VECTOR node.
EVT VecVT = EVT::getVectorVT(*DAG.getContext(), SourceType, NewBVElems);
assert(VecVT.getSizeInBits() == VT.getSizeInBits() &&
"Invalid vector size");
// Check if the new vector type is legal.
if (!isTypeLegal(VecVT)) return SDValue();
// Make the new BUILD_VECTOR.
SDValue BV = DAG.getBuildVector(VecVT, DL, Ops);
// The new BUILD_VECTOR node has the potential to be further optimized.
AddToWorklist(BV.getNode());
// Bitcast to the desired type.
return DAG.getBitcast(VT, BV);
}
SDValue DAGCombiner::reduceBuildVecConvertToConvertBuildVec(SDNode *N) {
EVT VT = N->getValueType(0);
unsigned NumInScalars = N->getNumOperands();
SDLoc DL(N);
EVT SrcVT = MVT::Other;
unsigned Opcode = ISD::DELETED_NODE;
unsigned NumDefs = 0;
for (unsigned i = 0; i != NumInScalars; ++i) {
SDValue In = N->getOperand(i);
unsigned Opc = In.getOpcode();
if (Opc == ISD::UNDEF)
continue;
// If all scalar values are floats and converted from integers.
if (Opcode == ISD::DELETED_NODE &&
(Opc == ISD::UINT_TO_FP || Opc == ISD::SINT_TO_FP)) {
Opcode = Opc;
}
if (Opc != Opcode)
return SDValue();
EVT InVT = In.getOperand(0).getValueType();
// If all scalar values are typed differently, bail out. It's chosen to
// simplify BUILD_VECTOR of integer types.
if (SrcVT == MVT::Other)
SrcVT = InVT;
if (SrcVT != InVT)
return SDValue();
NumDefs++;
}
// If the vector has just one element defined, it's not worth to fold it into
// a vectorized one.
if (NumDefs < 2)
return SDValue();
assert((Opcode == ISD::UINT_TO_FP || Opcode == ISD::SINT_TO_FP)
&& "Should only handle conversion from integer to float.");
assert(SrcVT != MVT::Other && "Cannot determine source type!");
EVT NVT = EVT::getVectorVT(*DAG.getContext(), SrcVT, NumInScalars);
if (!TLI.isOperationLegalOrCustom(Opcode, NVT))
return SDValue();
// Just because the floating-point vector type is legal does not necessarily
// mean that the corresponding integer vector type is.
if (!isTypeLegal(NVT))
return SDValue();
SmallVector<SDValue, 8> Opnds;
for (unsigned i = 0; i != NumInScalars; ++i) {
SDValue In = N->getOperand(i);
if (In.isUndef())
Opnds.push_back(DAG.getUNDEF(SrcVT));
else
Opnds.push_back(In.getOperand(0));
}
SDValue BV = DAG.getBuildVector(NVT, DL, Opnds);
AddToWorklist(BV.getNode());
return DAG.getNode(Opcode, DL, VT, BV);
}
SDValue DAGCombiner::createBuildVecShuffle(const SDLoc &DL, SDNode *N,
ArrayRef<int> VectorMask,
SDValue VecIn1, SDValue VecIn2,
unsigned LeftIdx) {
MVT IdxTy = TLI.getVectorIdxTy(DAG.getDataLayout());
SDValue ZeroIdx = DAG.getConstant(0, DL, IdxTy);
EVT VT = N->getValueType(0);
EVT InVT1 = VecIn1.getValueType();
EVT InVT2 = VecIn2.getNode() ? VecIn2.getValueType() : InVT1;
unsigned Vec2Offset = InVT1.getVectorNumElements();
unsigned NumElems = VT.getVectorNumElements();
unsigned ShuffleNumElems = NumElems;
// We can't generate a shuffle node with mismatched input and output types.
// Try to make the types match the type of the output.
if (InVT1 != VT || InVT2 != VT) {
if ((VT.getSizeInBits() % InVT1.getSizeInBits() == 0) && InVT1 == InVT2) {
// If the output vector length is a multiple of both input lengths,
// we can concatenate them and pad the rest with undefs.
unsigned NumConcats = VT.getSizeInBits() / InVT1.getSizeInBits();
assert(NumConcats >= 2 && "Concat needs at least two inputs!");
SmallVector<SDValue, 2> ConcatOps(NumConcats, DAG.getUNDEF(InVT1));
ConcatOps[0] = VecIn1;
ConcatOps[1] = VecIn2 ? VecIn2 : DAG.getUNDEF(InVT1);
VecIn1 = DAG.getNode(ISD::CONCAT_VECTORS, DL, VT, ConcatOps);
VecIn2 = SDValue();
} else if (InVT1.getSizeInBits() == VT.getSizeInBits() * 2) {
if (!TLI.isExtractSubvectorCheap(VT, NumElems))
return SDValue();
if (!VecIn2.getNode()) {
// If we only have one input vector, and it's twice the size of the
// output, split it in two.
VecIn2 = DAG.getNode(ISD::EXTRACT_SUBVECTOR, DL, VT, VecIn1,
DAG.getConstant(NumElems, DL, IdxTy));
VecIn1 = DAG.getNode(ISD::EXTRACT_SUBVECTOR, DL, VT, VecIn1, ZeroIdx);
// Since we now have shorter input vectors, adjust the offset of the
// second vector's start.
Vec2Offset = NumElems;
} else if (InVT2.getSizeInBits() <= InVT1.getSizeInBits()) {
// VecIn1 is wider than the output, and we have another, possibly
// smaller input. Pad the smaller input with undefs, shuffle at the
// input vector width, and extract the output.
// The shuffle type is different than VT, so check legality again.
if (LegalOperations &&
!TLI.isOperationLegal(ISD::VECTOR_SHUFFLE, InVT1))
return SDValue();
// Legalizing INSERT_SUBVECTOR is tricky - you basically have to
// lower it back into a BUILD_VECTOR. So if the inserted type is
// illegal, don't even try.
if (InVT1 != InVT2) {
if (!TLI.isTypeLegal(InVT2))
return SDValue();
VecIn2 = DAG.getNode(ISD::INSERT_SUBVECTOR, DL, InVT1,
DAG.getUNDEF(InVT1), VecIn2, ZeroIdx);
}
ShuffleNumElems = NumElems * 2;
} else {
// Both VecIn1 and VecIn2 are wider than the output, and VecIn2 is wider
// than VecIn1. We can't handle this for now - this case will disappear
// when we start sorting the vectors by type.
return SDValue();
}
} else {
// TODO: Support cases where the length mismatch isn't exactly by a
// factor of 2.
// TODO: Move this check upwards, so that if we have bad type
// mismatches, we don't create any DAG nodes.
return SDValue();
}
}
// Initialize mask to undef.
SmallVector<int, 8> Mask(ShuffleNumElems, -1);
// Only need to run up to the number of elements actually used, not the
// total number of elements in the shuffle - if we are shuffling a wider
// vector, the high lanes should be set to undef.
for (unsigned i = 0; i != NumElems; ++i) {
if (VectorMask[i] <= 0)
continue;
unsigned ExtIndex = N->getOperand(i).getConstantOperandVal(1);
if (VectorMask[i] == (int)LeftIdx) {
Mask[i] = ExtIndex;
} else if (VectorMask[i] == (int)LeftIdx + 1) {
Mask[i] = Vec2Offset + ExtIndex;
}
}
// The type the input vectors may have changed above.
InVT1 = VecIn1.getValueType();
// If we already have a VecIn2, it should have the same type as VecIn1.
// If we don't, get an undef/zero vector of the appropriate type.
VecIn2 = VecIn2.getNode() ? VecIn2 : DAG.getUNDEF(InVT1);
assert(InVT1 == VecIn2.getValueType() && "Unexpected second input type.");
SDValue Shuffle = DAG.getVectorShuffle(InVT1, DL, VecIn1, VecIn2, Mask);
if (ShuffleNumElems > NumElems)
Shuffle = DAG.getNode(ISD::EXTRACT_SUBVECTOR, DL, VT, Shuffle, ZeroIdx);
return Shuffle;
}
// Check to see if this is a BUILD_VECTOR of a bunch of EXTRACT_VECTOR_ELT
// operations. If the types of the vectors we're extracting from allow it,
// turn this into a vector_shuffle node.
SDValue DAGCombiner::reduceBuildVecToShuffle(SDNode *N) {
SDLoc DL(N);
EVT VT = N->getValueType(0);
// Only type-legal BUILD_VECTOR nodes are converted to shuffle nodes.
if (!isTypeLegal(VT))
return SDValue();
// May only combine to shuffle after legalize if shuffle is legal.
if (LegalOperations && !TLI.isOperationLegal(ISD::VECTOR_SHUFFLE, VT))
return SDValue();
bool UsesZeroVector = false;
unsigned NumElems = N->getNumOperands();
// Record, for each element of the newly built vector, which input vector
// that element comes from. -1 stands for undef, 0 for the zero vector,
// and positive values for the input vectors.
// VectorMask maps each element to its vector number, and VecIn maps vector
// numbers to their initial SDValues.
SmallVector<int, 8> VectorMask(NumElems, -1);
SmallVector<SDValue, 8> VecIn;
VecIn.push_back(SDValue());
for (unsigned i = 0; i != NumElems; ++i) {
SDValue Op = N->getOperand(i);
if (Op.isUndef())
continue;
// See if we can use a blend with a zero vector.
// TODO: Should we generalize this to a blend with an arbitrary constant
// vector?
if (isNullConstant(Op) || isNullFPConstant(Op)) {
UsesZeroVector = true;
VectorMask[i] = 0;
continue;
}
// Not an undef or zero. If the input is something other than an
// EXTRACT_VECTOR_ELT with a constant index, bail out.
if (Op.getOpcode() != ISD::EXTRACT_VECTOR_ELT ||
!isa<ConstantSDNode>(Op.getOperand(1)))
return SDValue();
SDValue ExtractedFromVec = Op.getOperand(0);
// All inputs must have the same element type as the output.
if (VT.getVectorElementType() !=
ExtractedFromVec.getValueType().getVectorElementType())
return SDValue();
// Have we seen this input vector before?
// The vectors are expected to be tiny (usually 1 or 2 elements), so using
// a map back from SDValues to numbers isn't worth it.
unsigned Idx = std::distance(
VecIn.begin(), std::find(VecIn.begin(), VecIn.end(), ExtractedFromVec));
if (Idx == VecIn.size())
VecIn.push_back(ExtractedFromVec);
VectorMask[i] = Idx;
}
// If we didn't find at least one input vector, bail out.
if (VecIn.size() < 2)
return SDValue();
// TODO: We want to sort the vectors by descending length, so that adjacent
// pairs have similar length, and the longer vector is always first in the
// pair.
// TODO: Should this fire if some of the input vectors has illegal type (like
// it does now), or should we let legalization run its course first?
// Shuffle phase:
// Take pairs of vectors, and shuffle them so that the result has elements
// from these vectors in the correct places.
// For example, given:
// t10: i32 = extract_vector_elt t1, Constant:i64<0>
// t11: i32 = extract_vector_elt t2, Constant:i64<0>
// t12: i32 = extract_vector_elt t3, Constant:i64<0>
// t13: i32 = extract_vector_elt t1, Constant:i64<1>
// t14: v4i32 = BUILD_VECTOR t10, t11, t12, t13
// We will generate:
// t20: v4i32 = vector_shuffle<0,4,u,1> t1, t2
// t21: v4i32 = vector_shuffle<u,u,0,u> t3, undef
SmallVector<SDValue, 4> Shuffles;
for (unsigned In = 0, Len = (VecIn.size() / 2); In < Len; ++In) {
unsigned LeftIdx = 2 * In + 1;
SDValue VecLeft = VecIn[LeftIdx];
SDValue VecRight =
(LeftIdx + 1) < VecIn.size() ? VecIn[LeftIdx + 1] : SDValue();
if (SDValue Shuffle = createBuildVecShuffle(DL, N, VectorMask, VecLeft,
VecRight, LeftIdx))
Shuffles.push_back(Shuffle);
else
return SDValue();
}
// If we need the zero vector as an "ingredient" in the blend tree, add it
// to the list of shuffles.
if (UsesZeroVector)
Shuffles.push_back(VT.isInteger() ? DAG.getConstant(0, DL, VT)
: DAG.getConstantFP(0.0, DL, VT));
// If we only have one shuffle, we're done.
if (Shuffles.size() == 1)
return Shuffles[0];
// Update the vector mask to point to the post-shuffle vectors.
for (int &Vec : VectorMask)
if (Vec == 0)
Vec = Shuffles.size() - 1;
else
Vec = (Vec - 1) / 2;
// More than one shuffle. Generate a binary tree of blends, e.g. if from
// the previous step we got the set of shuffles t10, t11, t12, t13, we will
// generate:
// t10: v8i32 = vector_shuffle<0,8,u,u,u,u,u,u> t1, t2
// t11: v8i32 = vector_shuffle<u,u,0,8,u,u,u,u> t3, t4
// t12: v8i32 = vector_shuffle<u,u,u,u,0,8,u,u> t5, t6
// t13: v8i32 = vector_shuffle<u,u,u,u,u,u,0,8> t7, t8
// t20: v8i32 = vector_shuffle<0,1,10,11,u,u,u,u> t10, t11
// t21: v8i32 = vector_shuffle<u,u,u,u,4,5,14,15> t12, t13
// t30: v8i32 = vector_shuffle<0,1,2,3,12,13,14,15> t20, t21
// Make sure the initial size of the shuffle list is even.
if (Shuffles.size() % 2)
Shuffles.push_back(DAG.getUNDEF(VT));
for (unsigned CurSize = Shuffles.size(); CurSize > 1; CurSize /= 2) {
if (CurSize % 2) {
Shuffles[CurSize] = DAG.getUNDEF(VT);
CurSize++;
}
for (unsigned In = 0, Len = CurSize / 2; In < Len; ++In) {
int Left = 2 * In;
int Right = 2 * In + 1;
SmallVector<int, 8> Mask(NumElems, -1);
for (unsigned i = 0; i != NumElems; ++i) {
if (VectorMask[i] == Left) {
Mask[i] = i;
VectorMask[i] = In;
} else if (VectorMask[i] == Right) {
Mask[i] = i + NumElems;
VectorMask[i] = In;
}
}
Shuffles[In] =
DAG.getVectorShuffle(VT, DL, Shuffles[Left], Shuffles[Right], Mask);
}
}
return Shuffles[0];
}
SDValue DAGCombiner::visitBUILD_VECTOR(SDNode *N) {
EVT VT = N->getValueType(0);
// A vector built entirely of undefs is undef.
if (ISD::allOperandsUndef(N))
return DAG.getUNDEF(VT);
// Check if we can express BUILD VECTOR via subvector extract.
if (!LegalTypes && (N->getNumOperands() > 1)) {
SDValue Op0 = N->getOperand(0);
auto checkElem = [&](SDValue Op) -> uint64_t {
if ((Op.getOpcode() == ISD::EXTRACT_VECTOR_ELT) &&
(Op0.getOperand(0) == Op.getOperand(0)))
if (auto CNode = dyn_cast<ConstantSDNode>(Op.getOperand(1)))
return CNode->getZExtValue();
return -1;
};
int Offset = checkElem(Op0);
for (unsigned i = 0; i < N->getNumOperands(); ++i) {
if (Offset + i != checkElem(N->getOperand(i))) {
Offset = -1;
break;
}
}
if ((Offset == 0) &&
(Op0.getOperand(0).getValueType() == N->getValueType(0)))
return Op0.getOperand(0);
if ((Offset != -1) &&
((Offset % N->getValueType(0).getVectorNumElements()) ==
0)) // IDX must be multiple of output size.
return DAG.getNode(ISD::EXTRACT_SUBVECTOR, SDLoc(N), N->getValueType(0),
Op0.getOperand(0), Op0.getOperand(1));
}
if (SDValue V = reduceBuildVecExtToExtBuildVec(N))
return V;
if (SDValue V = reduceBuildVecConvertToConvertBuildVec(N))
return V;
if (SDValue V = reduceBuildVecToShuffle(N))
return V;
return SDValue();
}
static SDValue combineConcatVectorOfScalars(SDNode *N, SelectionDAG &DAG) {
const TargetLowering &TLI = DAG.getTargetLoweringInfo();
EVT OpVT = N->getOperand(0).getValueType();
// If the operands are legal vectors, leave them alone.
if (TLI.isTypeLegal(OpVT))
return SDValue();
SDLoc DL(N);
EVT VT = N->getValueType(0);
SmallVector<SDValue, 8> Ops;
EVT SVT = EVT::getIntegerVT(*DAG.getContext(), OpVT.getSizeInBits());
SDValue ScalarUndef = DAG.getNode(ISD::UNDEF, DL, SVT);
// Keep track of what we encounter.
bool AnyInteger = false;
bool AnyFP = false;
for (const SDValue &Op : N->ops()) {
if (ISD::BITCAST == Op.getOpcode() &&
!Op.getOperand(0).getValueType().isVector())
Ops.push_back(Op.getOperand(0));
else if (ISD::UNDEF == Op.getOpcode())
Ops.push_back(ScalarUndef);
else
return SDValue();
// Note whether we encounter an integer or floating point scalar.
// If it's neither, bail out, it could be something weird like x86mmx.
EVT LastOpVT = Ops.back().getValueType();
if (LastOpVT.isFloatingPoint())
AnyFP = true;
else if (LastOpVT.isInteger())
AnyInteger = true;
else
return SDValue();
}
// If any of the operands is a floating point scalar bitcast to a vector,
// use floating point types throughout, and bitcast everything.
// Replace UNDEFs by another scalar UNDEF node, of the final desired type.
if (AnyFP) {
SVT = EVT::getFloatingPointVT(OpVT.getSizeInBits());
ScalarUndef = DAG.getNode(ISD::UNDEF, DL, SVT);
if (AnyInteger) {
for (SDValue &Op : Ops) {
if (Op.getValueType() == SVT)
continue;
if (Op.isUndef())
Op = ScalarUndef;
else
Op = DAG.getBitcast(SVT, Op);
}
}
}
EVT VecVT = EVT::getVectorVT(*DAG.getContext(), SVT,
VT.getSizeInBits() / SVT.getSizeInBits());
return DAG.getBitcast(VT, DAG.getBuildVector(VecVT, DL, Ops));
}
// Check to see if this is a CONCAT_VECTORS of a bunch of EXTRACT_SUBVECTOR
// operations. If so, and if the EXTRACT_SUBVECTOR vector inputs come from at
// most two distinct vectors the same size as the result, attempt to turn this
// into a legal shuffle.
static SDValue combineConcatVectorOfExtracts(SDNode *N, SelectionDAG &DAG) {
EVT VT = N->getValueType(0);
EVT OpVT = N->getOperand(0).getValueType();
int NumElts = VT.getVectorNumElements();
int NumOpElts = OpVT.getVectorNumElements();
SDValue SV0 = DAG.getUNDEF(VT), SV1 = DAG.getUNDEF(VT);
SmallVector<int, 8> Mask;
for (SDValue Op : N->ops()) {
// Peek through any bitcast.
while (Op.getOpcode() == ISD::BITCAST)
Op = Op.getOperand(0);
// UNDEF nodes convert to UNDEF shuffle mask values.
if (Op.isUndef()) {
Mask.append((unsigned)NumOpElts, -1);
continue;
}
if (Op.getOpcode() != ISD::EXTRACT_SUBVECTOR)
return SDValue();
// What vector are we extracting the subvector from and at what index?
SDValue ExtVec = Op.getOperand(0);
// We want the EVT of the original extraction to correctly scale the
// extraction index.
EVT ExtVT = ExtVec.getValueType();
// Peek through any bitcast.
while (ExtVec.getOpcode() == ISD::BITCAST)
ExtVec = ExtVec.getOperand(0);
// UNDEF nodes convert to UNDEF shuffle mask values.
if (ExtVec.isUndef()) {
Mask.append((unsigned)NumOpElts, -1);
continue;
}
if (!isa<ConstantSDNode>(Op.getOperand(1)))
return SDValue();
int ExtIdx = cast<ConstantSDNode>(Op.getOperand(1))->getZExtValue();
// Ensure that we are extracting a subvector from a vector the same
// size as the result.
if (ExtVT.getSizeInBits() != VT.getSizeInBits())
return SDValue();
// Scale the subvector index to account for any bitcast.
int NumExtElts = ExtVT.getVectorNumElements();
if (0 == (NumExtElts % NumElts))
ExtIdx /= (NumExtElts / NumElts);
else if (0 == (NumElts % NumExtElts))
ExtIdx *= (NumElts / NumExtElts);
else
return SDValue();
// At most we can reference 2 inputs in the final shuffle.
if (SV0.isUndef() || SV0 == ExtVec) {
SV0 = ExtVec;
for (int i = 0; i != NumOpElts; ++i)
Mask.push_back(i + ExtIdx);
} else if (SV1.isUndef() || SV1 == ExtVec) {
SV1 = ExtVec;
for (int i = 0; i != NumOpElts; ++i)
Mask.push_back(i + ExtIdx + NumElts);
} else {
return SDValue();
}
}
if (!DAG.getTargetLoweringInfo().isShuffleMaskLegal(Mask, VT))
return SDValue();
return DAG.getVectorShuffle(VT, SDLoc(N), DAG.getBitcast(VT, SV0),
DAG.getBitcast(VT, SV1), Mask);
}
SDValue DAGCombiner::visitCONCAT_VECTORS(SDNode *N) {
// If we only have one input vector, we don't need to do any concatenation.
if (N->getNumOperands() == 1)
return N->getOperand(0);
// Check if all of the operands are undefs.
EVT VT = N->getValueType(0);
if (ISD::allOperandsUndef(N))
return DAG.getUNDEF(VT);
// Optimize concat_vectors where all but the first of the vectors are undef.
if (std::all_of(std::next(N->op_begin()), N->op_end(), [](const SDValue &Op) {
return Op.isUndef();
})) {
SDValue In = N->getOperand(0);
assert(In.getValueType().isVector() && "Must concat vectors");
// Transform: concat_vectors(scalar, undef) -> scalar_to_vector(sclr).
if (In->getOpcode() == ISD::BITCAST &&
!In->getOperand(0)->getValueType(0).isVector()) {
SDValue Scalar = In->getOperand(0);
// If the bitcast type isn't legal, it might be a trunc of a legal type;
// look through the trunc so we can still do the transform:
// concat_vectors(trunc(scalar), undef) -> scalar_to_vector(scalar)
if (Scalar->getOpcode() == ISD::TRUNCATE &&
!TLI.isTypeLegal(Scalar.getValueType()) &&
TLI.isTypeLegal(Scalar->getOperand(0).getValueType()))
Scalar = Scalar->getOperand(0);
EVT SclTy = Scalar->getValueType(0);
if (!SclTy.isFloatingPoint() && !SclTy.isInteger())
return SDValue();
unsigned VNTNumElms = VT.getSizeInBits() / SclTy.getSizeInBits();
if (VNTNumElms < 2)
return SDValue();
EVT NVT = EVT::getVectorVT(*DAG.getContext(), SclTy, VNTNumElms);
if (!TLI.isTypeLegal(NVT) || !TLI.isTypeLegal(Scalar.getValueType()))
return SDValue();
SDValue Res = DAG.getNode(ISD::SCALAR_TO_VECTOR, SDLoc(N), NVT, Scalar);
return DAG.getBitcast(VT, Res);
}
}
// Fold any combination of BUILD_VECTOR or UNDEF nodes into one BUILD_VECTOR.
// We have already tested above for an UNDEF only concatenation.
// fold (concat_vectors (BUILD_VECTOR A, B, ...), (BUILD_VECTOR C, D, ...))
// -> (BUILD_VECTOR A, B, ..., C, D, ...)
auto IsBuildVectorOrUndef = [](const SDValue &Op) {
return ISD::UNDEF == Op.getOpcode() || ISD::BUILD_VECTOR == Op.getOpcode();
};
if (llvm::all_of(N->ops(), IsBuildVectorOrUndef)) {
SmallVector<SDValue, 8> Opnds;
EVT SVT = VT.getScalarType();
EVT MinVT = SVT;
if (!SVT.isFloatingPoint()) {
// If BUILD_VECTOR are from built from integer, they may have different
// operand types. Get the smallest type and truncate all operands to it.
bool FoundMinVT = false;
for (const SDValue &Op : N->ops())
if (ISD::BUILD_VECTOR == Op.getOpcode()) {
EVT OpSVT = Op.getOperand(0)->getValueType(0);
MinVT = (!FoundMinVT || OpSVT.bitsLE(MinVT)) ? OpSVT : MinVT;
FoundMinVT = true;
}
assert(FoundMinVT && "Concat vector type mismatch");
}
for (const SDValue &Op : N->ops()) {
EVT OpVT = Op.getValueType();
unsigned NumElts = OpVT.getVectorNumElements();
if (ISD::UNDEF == Op.getOpcode())
Opnds.append(NumElts, DAG.getUNDEF(MinVT));
if (ISD::BUILD_VECTOR == Op.getOpcode()) {
if (SVT.isFloatingPoint()) {
assert(SVT == OpVT.getScalarType() && "Concat vector type mismatch");
Opnds.append(Op->op_begin(), Op->op_begin() + NumElts);
} else {
for (unsigned i = 0; i != NumElts; ++i)
Opnds.push_back(
DAG.getNode(ISD::TRUNCATE, SDLoc(N), MinVT, Op.getOperand(i)));
}
}
}
assert(VT.getVectorNumElements() == Opnds.size() &&
"Concat vector type mismatch");
return DAG.getBuildVector(VT, SDLoc(N), Opnds);
}
// Fold CONCAT_VECTORS of only bitcast scalars (or undef) to BUILD_VECTOR.
if (SDValue V = combineConcatVectorOfScalars(N, DAG))
return V;
// Fold CONCAT_VECTORS of EXTRACT_SUBVECTOR (or undef) to VECTOR_SHUFFLE.
if (Level < AfterLegalizeVectorOps && TLI.isTypeLegal(VT))
if (SDValue V = combineConcatVectorOfExtracts(N, DAG))
return V;
// Type legalization of vectors and DAG canonicalization of SHUFFLE_VECTOR
// nodes often generate nop CONCAT_VECTOR nodes.
// Scan the CONCAT_VECTOR operands and look for a CONCAT operations that
// place the incoming vectors at the exact same location.
SDValue SingleSource = SDValue();
unsigned PartNumElem = N->getOperand(0).getValueType().getVectorNumElements();
for (unsigned i = 0, e = N->getNumOperands(); i != e; ++i) {
SDValue Op = N->getOperand(i);
if (Op.isUndef())
continue;
// Check if this is the identity extract:
if (Op.getOpcode() != ISD::EXTRACT_SUBVECTOR)
return SDValue();
// Find the single incoming vector for the extract_subvector.
if (SingleSource.getNode()) {
if (Op.getOperand(0) != SingleSource)
return SDValue();
} else {
SingleSource = Op.getOperand(0);
// Check the source type is the same as the type of the result.
// If not, this concat may extend the vector, so we can not
// optimize it away.
if (SingleSource.getValueType() != N->getValueType(0))
return SDValue();
}
unsigned IdentityIndex = i * PartNumElem;
ConstantSDNode *CS = dyn_cast<ConstantSDNode>(Op.getOperand(1));
// The extract index must be constant.
if (!CS)
return SDValue();
// Check that we are reading from the identity index.
if (CS->getZExtValue() != IdentityIndex)
return SDValue();
}
if (SingleSource.getNode())
return SingleSource;
return SDValue();
}
SDValue DAGCombiner::visitEXTRACT_SUBVECTOR(SDNode* N) {
EVT NVT = N->getValueType(0);
SDValue V = N->getOperand(0);
// Extract from UNDEF is UNDEF.
if (V.isUndef())
return DAG.getUNDEF(NVT);
// Combine:
// (extract_subvec (concat V1, V2, ...), i)
// Into:
// Vi if possible
// Only operand 0 is checked as 'concat' assumes all inputs of the same
// type.
if (V->getOpcode() == ISD::CONCAT_VECTORS &&
isa<ConstantSDNode>(N->getOperand(1)) &&
V->getOperand(0).getValueType() == NVT) {
unsigned Idx = N->getConstantOperandVal(1);
unsigned NumElems = NVT.getVectorNumElements();
assert((Idx % NumElems) == 0 &&
"IDX in concat is not a multiple of the result vector length.");
return V->getOperand(Idx / NumElems);
}
// Skip bitcasting
if (V->getOpcode() == ISD::BITCAST)
V = V.getOperand(0);
if (V->getOpcode() == ISD::INSERT_SUBVECTOR) {
// Handle only simple case where vector being inserted and vector
// being extracted are of same size.
EVT SmallVT = V->getOperand(1).getValueType();
if (!NVT.bitsEq(SmallVT))
return SDValue();
// Only handle cases where both indexes are constants.
ConstantSDNode *ExtIdx = dyn_cast<ConstantSDNode>(N->getOperand(1));
ConstantSDNode *InsIdx = dyn_cast<ConstantSDNode>(V->getOperand(2));
if (InsIdx && ExtIdx) {
// Combine:
// (extract_subvec (insert_subvec V1, V2, InsIdx), ExtIdx)
// Into:
// indices are equal or bit offsets are equal => V1
// otherwise => (extract_subvec V1, ExtIdx)
if (InsIdx->getZExtValue() * SmallVT.getScalarSizeInBits() ==
ExtIdx->getZExtValue() * NVT.getScalarSizeInBits())
return DAG.getBitcast(NVT, V->getOperand(1));
return DAG.getNode(
ISD::EXTRACT_SUBVECTOR, SDLoc(N), NVT,
DAG.getBitcast(N->getOperand(0).getValueType(), V->getOperand(0)),
N->getOperand(1));
}
}
return SDValue();
}
static SDValue simplifyShuffleOperandRecursively(SmallBitVector &UsedElements,
SDValue V, SelectionDAG &DAG) {
SDLoc DL(V);
EVT VT = V.getValueType();
switch (V.getOpcode()) {
default:
return V;
case ISD::CONCAT_VECTORS: {
EVT OpVT = V->getOperand(0).getValueType();
int OpSize = OpVT.getVectorNumElements();
SmallBitVector OpUsedElements(OpSize, false);
bool FoundSimplification = false;
SmallVector<SDValue, 4> NewOps;
NewOps.reserve(V->getNumOperands());
for (int i = 0, NumOps = V->getNumOperands(); i < NumOps; ++i) {
SDValue Op = V->getOperand(i);
bool OpUsed = false;
for (int j = 0; j < OpSize; ++j)
if (UsedElements[i * OpSize + j]) {
OpUsedElements[j] = true;
OpUsed = true;
}
NewOps.push_back(
OpUsed ? simplifyShuffleOperandRecursively(OpUsedElements, Op, DAG)
: DAG.getUNDEF(OpVT));
FoundSimplification |= Op == NewOps.back();
OpUsedElements.reset();
}
if (FoundSimplification)
V = DAG.getNode(ISD::CONCAT_VECTORS, DL, VT, NewOps);
return V;
}
case ISD::INSERT_SUBVECTOR: {
SDValue BaseV = V->getOperand(0);
SDValue SubV = V->getOperand(1);
auto *IdxN = dyn_cast<ConstantSDNode>(V->getOperand(2));
if (!IdxN)
return V;
int SubSize = SubV.getValueType().getVectorNumElements();
int Idx = IdxN->getZExtValue();
bool SubVectorUsed = false;
SmallBitVector SubUsedElements(SubSize, false);
for (int i = 0; i < SubSize; ++i)
if (UsedElements[i + Idx]) {
SubVectorUsed = true;
SubUsedElements[i] = true;
UsedElements[i + Idx] = false;
}
// Now recurse on both the base and sub vectors.
SDValue SimplifiedSubV =
SubVectorUsed
? simplifyShuffleOperandRecursively(SubUsedElements, SubV, DAG)
: DAG.getUNDEF(SubV.getValueType());
SDValue SimplifiedBaseV = simplifyShuffleOperandRecursively(UsedElements, BaseV, DAG);
if (SimplifiedSubV != SubV || SimplifiedBaseV != BaseV)
V = DAG.getNode(ISD::INSERT_SUBVECTOR, DL, VT,
SimplifiedBaseV, SimplifiedSubV, V->getOperand(2));
return V;
}
}
}
static SDValue simplifyShuffleOperands(ShuffleVectorSDNode *SVN, SDValue N0,
SDValue N1, SelectionDAG &DAG) {
EVT VT = SVN->getValueType(0);
int NumElts = VT.getVectorNumElements();
SmallBitVector N0UsedElements(NumElts, false), N1UsedElements(NumElts, false);
for (int M : SVN->getMask())
if (M >= 0 && M < NumElts)
N0UsedElements[M] = true;
else if (M >= NumElts)
N1UsedElements[M - NumElts] = true;
SDValue S0 = simplifyShuffleOperandRecursively(N0UsedElements, N0, DAG);
SDValue S1 = simplifyShuffleOperandRecursively(N1UsedElements, N1, DAG);
if (S0 == N0 && S1 == N1)
return SDValue();
return DAG.getVectorShuffle(VT, SDLoc(SVN), S0, S1, SVN->getMask());
}
// Tries to turn a shuffle of two CONCAT_VECTORS into a single concat,
// or turn a shuffle of a single concat into simpler shuffle then concat.
static SDValue partitionShuffleOfConcats(SDNode *N, SelectionDAG &DAG) {
EVT VT = N->getValueType(0);
unsigned NumElts = VT.getVectorNumElements();
SDValue N0 = N->getOperand(0);
SDValue N1 = N->getOperand(1);
ShuffleVectorSDNode *SVN = cast<ShuffleVectorSDNode>(N);
SmallVector<SDValue, 4> Ops;
EVT ConcatVT = N0.getOperand(0).getValueType();
unsigned NumElemsPerConcat = ConcatVT.getVectorNumElements();
unsigned NumConcats = NumElts / NumElemsPerConcat;
// Special case: shuffle(concat(A,B)) can be more efficiently represented
// as concat(shuffle(A,B),UNDEF) if the shuffle doesn't set any of the high
// half vector elements.
if (NumElemsPerConcat * 2 == NumElts && N1.isUndef() &&
std::all_of(SVN->getMask().begin() + NumElemsPerConcat,
SVN->getMask().end(), [](int i) { return i == -1; })) {
N0 = DAG.getVectorShuffle(ConcatVT, SDLoc(N), N0.getOperand(0), N0.getOperand(1),
makeArrayRef(SVN->getMask().begin(), NumElemsPerConcat));
N1 = DAG.getUNDEF(ConcatVT);
return DAG.getNode(ISD::CONCAT_VECTORS, SDLoc(N), VT, N0, N1);
}
// Look at every vector that's inserted. We're looking for exact
// subvector-sized copies from a concatenated vector
for (unsigned I = 0; I != NumConcats; ++I) {
// Make sure we're dealing with a copy.
unsigned Begin = I * NumElemsPerConcat;
bool AllUndef = true, NoUndef = true;
for (unsigned J = Begin; J != Begin + NumElemsPerConcat; ++J) {
if (SVN->getMaskElt(J) >= 0)
AllUndef = false;
else
NoUndef = false;
}
if (NoUndef) {
if (SVN->getMaskElt(Begin) % NumElemsPerConcat != 0)
return SDValue();
for (unsigned J = 1; J != NumElemsPerConcat; ++J)
if (SVN->getMaskElt(Begin + J - 1) + 1 != SVN->getMaskElt(Begin + J))
return SDValue();
unsigned FirstElt = SVN->getMaskElt(Begin) / NumElemsPerConcat;
if (FirstElt < N0.getNumOperands())
Ops.push_back(N0.getOperand(FirstElt));
else
Ops.push_back(N1.getOperand(FirstElt - N0.getNumOperands()));
} else if (AllUndef) {
Ops.push_back(DAG.getUNDEF(N0.getOperand(0).getValueType()));
} else { // Mixed with general masks and undefs, can't do optimization.
return SDValue();
}
}
return DAG.getNode(ISD::CONCAT_VECTORS, SDLoc(N), VT, Ops);
}
// Attempt to combine a shuffle of 2 inputs of 'scalar sources' -
// BUILD_VECTOR or SCALAR_TO_VECTOR into a single BUILD_VECTOR.
//
// SHUFFLE(BUILD_VECTOR(), BUILD_VECTOR()) -> BUILD_VECTOR() is always
// a simplification in some sense, but it isn't appropriate in general: some
// BUILD_VECTORs are substantially cheaper than others. The general case
// of a BUILD_VECTOR requires inserting each element individually (or
// performing the equivalent in a temporary stack variable). A BUILD_VECTOR of
// all constants is a single constant pool load. A BUILD_VECTOR where each
// element is identical is a splat. A BUILD_VECTOR where most of the operands
// are undef lowers to a small number of element insertions.
//
// To deal with this, we currently use a bunch of mostly arbitrary heuristics.
// We don't fold shuffles where one side is a non-zero constant, and we don't
// fold shuffles if the resulting BUILD_VECTOR would have duplicate
// non-constant operands. This seems to work out reasonably well in practice.
static SDValue combineShuffleOfScalars(ShuffleVectorSDNode *SVN,
SelectionDAG &DAG,
const TargetLowering &TLI) {
EVT VT = SVN->getValueType(0);
unsigned NumElts = VT.getVectorNumElements();
SDValue N0 = SVN->getOperand(0);
SDValue N1 = SVN->getOperand(1);
if (!N0->hasOneUse() || !N1->hasOneUse())
return SDValue();
// If only one of N1,N2 is constant, bail out if it is not ALL_ZEROS as
// discussed above.
if (!N1.isUndef()) {
bool N0AnyConst = isAnyConstantBuildVector(N0.getNode());
bool N1AnyConst = isAnyConstantBuildVector(N1.getNode());
if (N0AnyConst && !N1AnyConst && !ISD::isBuildVectorAllZeros(N0.getNode()))
return SDValue();
if (!N0AnyConst && N1AnyConst && !ISD::isBuildVectorAllZeros(N1.getNode()))
return SDValue();
}
SmallVector<SDValue, 8> Ops;
SmallSet<SDValue, 16> DuplicateOps;
for (int M : SVN->getMask()) {
SDValue Op = DAG.getUNDEF(VT.getScalarType());
if (M >= 0) {
int Idx = M < (int)NumElts ? M : M - NumElts;
SDValue &S = (M < (int)NumElts ? N0 : N1);
if (S.getOpcode() == ISD::BUILD_VECTOR) {
Op = S.getOperand(Idx);
} else if (S.getOpcode() == ISD::SCALAR_TO_VECTOR) {
if (Idx == 0)
Op = S.getOperand(0);
} else {
// Operand can't be combined - bail out.
return SDValue();
}
}
// Don't duplicate a non-constant BUILD_VECTOR operand; semantically, this is
// fine, but it's likely to generate low-quality code if the target can't
// reconstruct an appropriate shuffle.
if (!Op.isUndef() && !isa<ConstantSDNode>(Op) && !isa<ConstantFPSDNode>(Op))
if (!DuplicateOps.insert(Op).second)
return SDValue();
Ops.push_back(Op);
}
// BUILD_VECTOR requires all inputs to be of the same type, find the
// maximum type and extend them all.
EVT SVT = VT.getScalarType();
if (SVT.isInteger())
for (SDValue &Op : Ops)
SVT = (SVT.bitsLT(Op.getValueType()) ? Op.getValueType() : SVT);
if (SVT != VT.getScalarType())
for (SDValue &Op : Ops)
Op = TLI.isZExtFree(Op.getValueType(), SVT)
? DAG.getZExtOrTrunc(Op, SDLoc(SVN), SVT)
: DAG.getSExtOrTrunc(Op, SDLoc(SVN), SVT);
return DAG.getBuildVector(VT, SDLoc(SVN), Ops);
}
// Match shuffles that can be converted to any_vector_extend_in_reg.
// This is often generated during legalization.
// e.g. v4i32 <0,u,1,u> -> (v2i64 any_vector_extend_in_reg(v4i32 src))
// TODO Add support for ZERO_EXTEND_VECTOR_INREG when we have a test case.
SDValue combineShuffleToVectorExtend(ShuffleVectorSDNode *SVN,
SelectionDAG &DAG,
const TargetLowering &TLI,
bool LegalOperations) {
EVT VT = SVN->getValueType(0);
bool IsBigEndian = DAG.getDataLayout().isBigEndian();
// TODO Add support for big-endian when we have a test case.
if (!VT.isInteger() || IsBigEndian)
return SDValue();
unsigned NumElts = VT.getVectorNumElements();
unsigned EltSizeInBits = VT.getScalarSizeInBits();
ArrayRef<int> Mask = SVN->getMask();
SDValue N0 = SVN->getOperand(0);
// shuffle<0,-1,1,-1> == (v2i64 anyextend_vector_inreg(v4i32))
auto isAnyExtend = [&Mask, &NumElts](unsigned Scale) {
for (unsigned i = 0; i != NumElts; ++i) {
if (Mask[i] < 0)
continue;
if ((i % Scale) == 0 && Mask[i] == (int)(i / Scale))
continue;
return false;
}
return true;
};
// Attempt to match a '*_extend_vector_inreg' shuffle, we just search for
// power-of-2 extensions as they are the most likely.
for (unsigned Scale = 2; Scale < NumElts; Scale *= 2) {
if (!isAnyExtend(Scale))
continue;
EVT OutSVT = EVT::getIntegerVT(*DAG.getContext(), EltSizeInBits * Scale);
EVT OutVT = EVT::getVectorVT(*DAG.getContext(), OutSVT, NumElts / Scale);
if (!LegalOperations ||
TLI.isOperationLegalOrCustom(ISD::ANY_EXTEND_VECTOR_INREG, OutVT))
return DAG.getBitcast(VT,
DAG.getAnyExtendVectorInReg(N0, SDLoc(SVN), OutVT));
}
return SDValue();
}
// Detect 'truncate_vector_inreg' style shuffles that pack the lower parts of
// each source element of a large type into the lowest elements of a smaller
// destination type. This is often generated during legalization.
// If the source node itself was a '*_extend_vector_inreg' node then we should
// then be able to remove it.
SDValue combineTruncationShuffle(ShuffleVectorSDNode *SVN, SelectionDAG &DAG) {
EVT VT = SVN->getValueType(0);
bool IsBigEndian = DAG.getDataLayout().isBigEndian();
// TODO Add support for big-endian when we have a test case.
if (!VT.isInteger() || IsBigEndian)
return SDValue();
SDValue N0 = SVN->getOperand(0);
while (N0.getOpcode() == ISD::BITCAST)
N0 = N0.getOperand(0);
unsigned Opcode = N0.getOpcode();
if (Opcode != ISD::ANY_EXTEND_VECTOR_INREG &&
Opcode != ISD::SIGN_EXTEND_VECTOR_INREG &&
Opcode != ISD::ZERO_EXTEND_VECTOR_INREG)
return SDValue();
SDValue N00 = N0.getOperand(0);
ArrayRef<int> Mask = SVN->getMask();
unsigned NumElts = VT.getVectorNumElements();
unsigned EltSizeInBits = VT.getScalarSizeInBits();
unsigned ExtSrcSizeInBits = N00.getScalarValueSizeInBits();
// (v4i32 truncate_vector_inreg(v2i64)) == shuffle<0,2-1,-1>
// (v8i16 truncate_vector_inreg(v4i32)) == shuffle<0,2,4,6,-1,-1,-1,-1>
// (v8i16 truncate_vector_inreg(v2i64)) == shuffle<0,4,-1,-1,-1,-1,-1,-1>
auto isTruncate = [&Mask, &NumElts](unsigned Scale) {
for (unsigned i = 0; i != NumElts; ++i) {
if (Mask[i] < 0)
continue;
if ((i * Scale) < NumElts && Mask[i] == (int)(i * Scale))
continue;
return false;
}
return true;
};
// At the moment we just handle the case where we've truncated back to the
// same size as before the extension.
// TODO: handle more extension/truncation cases as cases arise.
if (EltSizeInBits != ExtSrcSizeInBits)
return SDValue();
// Attempt to match a 'truncate_vector_inreg' shuffle, we just search for
// power-of-2 truncations as they are the most likely.
for (unsigned Scale = 2; Scale < NumElts; Scale *= 2)
if (isTruncate(Scale))
return DAG.getBitcast(VT, N00);
return SDValue();
}
SDValue DAGCombiner::visitVECTOR_SHUFFLE(SDNode *N) {
EVT VT = N->getValueType(0);
unsigned NumElts = VT.getVectorNumElements();
SDValue N0 = N->getOperand(0);
SDValue N1 = N->getOperand(1);
assert(N0.getValueType() == VT && "Vector shuffle must be normalized in DAG");
// Canonicalize shuffle undef, undef -> undef
if (N0.isUndef() && N1.isUndef())
return DAG.getUNDEF(VT);
ShuffleVectorSDNode *SVN = cast<ShuffleVectorSDNode>(N);
// Canonicalize shuffle v, v -> v, undef
if (N0 == N1) {
SmallVector<int, 8> NewMask;
for (unsigned i = 0; i != NumElts; ++i) {
int Idx = SVN->getMaskElt(i);
if (Idx >= (int)NumElts) Idx -= NumElts;
NewMask.push_back(Idx);
}
return DAG.getVectorShuffle(VT, SDLoc(N), N0, DAG.getUNDEF(VT), NewMask);
}
// Canonicalize shuffle undef, v -> v, undef. Commute the shuffle mask.
if (N0.isUndef())
return DAG.getCommutedVectorShuffle(*SVN);
// Remove references to rhs if it is undef
if (N1.isUndef()) {
bool Changed = false;
SmallVector<int, 8> NewMask;
for (unsigned i = 0; i != NumElts; ++i) {
int Idx = SVN->getMaskElt(i);
if (Idx >= (int)NumElts) {
Idx = -1;
Changed = true;
}
NewMask.push_back(Idx);
}
if (Changed)
return DAG.getVectorShuffle(VT, SDLoc(N), N0, N1, NewMask);
}
// If it is a splat, check if the argument vector is another splat or a
// build_vector.
if (SVN->isSplat() && SVN->getSplatIndex() < (int)NumElts) {
SDNode *V = N0.getNode();
// If this is a bit convert that changes the element type of the vector but
// not the number of vector elements, look through it. Be careful not to
// look though conversions that change things like v4f32 to v2f64.
if (V->getOpcode() == ISD::BITCAST) {
SDValue ConvInput = V->getOperand(0);
if (ConvInput.getValueType().isVector() &&
ConvInput.getValueType().getVectorNumElements() == NumElts)
V = ConvInput.getNode();
}
if (V->getOpcode() == ISD::BUILD_VECTOR) {
assert(V->getNumOperands() == NumElts &&
"BUILD_VECTOR has wrong number of operands");
SDValue Base;
bool AllSame = true;
for (unsigned i = 0; i != NumElts; ++i) {
if (!V->getOperand(i).isUndef()) {
Base = V->getOperand(i);
break;
}
}
// Splat of <u, u, u, u>, return <u, u, u, u>
if (!Base.getNode())
return N0;
for (unsigned i = 0; i != NumElts; ++i) {
if (V->getOperand(i) != Base) {
AllSame = false;
break;
}
}
// Splat of <x, x, x, x>, return <x, x, x, x>
if (AllSame)
return N0;
// Canonicalize any other splat as a build_vector.
const SDValue &Splatted = V->getOperand(SVN->getSplatIndex());
SmallVector<SDValue, 8> Ops(NumElts, Splatted);
SDValue NewBV = DAG.getBuildVector(V->getValueType(0), SDLoc(N), Ops);
// We may have jumped through bitcasts, so the type of the
// BUILD_VECTOR may not match the type of the shuffle.
if (V->getValueType(0) != VT)
NewBV = DAG.getBitcast(VT, NewBV);
return NewBV;
}
}
// There are various patterns used to build up a vector from smaller vectors,
// subvectors, or elements. Scan chains of these and replace unused insertions
// or components with undef.
if (SDValue S = simplifyShuffleOperands(SVN, N0, N1, DAG))
return S;
// Match shuffles that can be converted to any_vector_extend_in_reg.
if (SDValue V = combineShuffleToVectorExtend(SVN, DAG, TLI, LegalOperations))
return V;
// Combine "truncate_vector_in_reg" style shuffles.
if (SDValue V = combineTruncationShuffle(SVN, DAG))
return V;
if (N0.getOpcode() == ISD::CONCAT_VECTORS &&
Level < AfterLegalizeVectorOps &&
(N1.isUndef() ||
(N1.getOpcode() == ISD::CONCAT_VECTORS &&
N0.getOperand(0).getValueType() == N1.getOperand(0).getValueType()))) {
if (SDValue V = partitionShuffleOfConcats(N, DAG))
return V;
}
// Attempt to combine a shuffle of 2 inputs of 'scalar sources' -
// BUILD_VECTOR or SCALAR_TO_VECTOR into a single BUILD_VECTOR.
if (Level < AfterLegalizeVectorOps && TLI.isTypeLegal(VT))
if (SDValue Res = combineShuffleOfScalars(SVN, DAG, TLI))
return Res;
// If this shuffle only has a single input that is a bitcasted shuffle,
// attempt to merge the 2 shuffles and suitably bitcast the inputs/output
// back to their original types.
if (N0.getOpcode() == ISD::BITCAST && N0.hasOneUse() &&
N1.isUndef() && Level < AfterLegalizeVectorOps &&
TLI.isTypeLegal(VT)) {
// Peek through the bitcast only if there is one user.
SDValue BC0 = N0;
while (BC0.getOpcode() == ISD::BITCAST) {
if (!BC0.hasOneUse())
break;
BC0 = BC0.getOperand(0);
}
auto ScaleShuffleMask = [](ArrayRef<int> Mask, int Scale) {
if (Scale == 1)
return SmallVector<int, 8>(Mask.begin(), Mask.end());
SmallVector<int, 8> NewMask;
for (int M : Mask)
for (int s = 0; s != Scale; ++s)
NewMask.push_back(M < 0 ? -1 : Scale * M + s);
return NewMask;
};
if (BC0.getOpcode() == ISD::VECTOR_SHUFFLE && BC0.hasOneUse()) {
EVT SVT = VT.getScalarType();
EVT InnerVT = BC0->getValueType(0);
EVT InnerSVT = InnerVT.getScalarType();
// Determine which shuffle works with the smaller scalar type.
EVT ScaleVT = SVT.bitsLT(InnerSVT) ? VT : InnerVT;
EVT ScaleSVT = ScaleVT.getScalarType();
if (TLI.isTypeLegal(ScaleVT) &&
0 == (InnerSVT.getSizeInBits() % ScaleSVT.getSizeInBits()) &&
0 == (SVT.getSizeInBits() % ScaleSVT.getSizeInBits())) {
int InnerScale = InnerSVT.getSizeInBits() / ScaleSVT.getSizeInBits();
int OuterScale = SVT.getSizeInBits() / ScaleSVT.getSizeInBits();
// Scale the shuffle masks to the smaller scalar type.
ShuffleVectorSDNode *InnerSVN = cast<ShuffleVectorSDNode>(BC0);
SmallVector<int, 8> InnerMask =
ScaleShuffleMask(InnerSVN->getMask(), InnerScale);
SmallVector<int, 8> OuterMask =
ScaleShuffleMask(SVN->getMask(), OuterScale);
// Merge the shuffle masks.
SmallVector<int, 8> NewMask;
for (int M : OuterMask)
NewMask.push_back(M < 0 ? -1 : InnerMask[M]);
// Test for shuffle mask legality over both commutations.
SDValue SV0 = BC0->getOperand(0);
SDValue SV1 = BC0->getOperand(1);
bool LegalMask = TLI.isShuffleMaskLegal(NewMask, ScaleVT);
if (!LegalMask) {
std::swap(SV0, SV1);
ShuffleVectorSDNode::commuteMask(NewMask);
LegalMask = TLI.isShuffleMaskLegal(NewMask, ScaleVT);
}
if (LegalMask) {
SV0 = DAG.getBitcast(ScaleVT, SV0);
SV1 = DAG.getBitcast(ScaleVT, SV1);
return DAG.getBitcast(
VT, DAG.getVectorShuffle(ScaleVT, SDLoc(N), SV0, SV1, NewMask));
}
}
}
}
// Canonicalize shuffles according to rules:
// shuffle(A, shuffle(A, B)) -> shuffle(shuffle(A,B), A)
// shuffle(B, shuffle(A, B)) -> shuffle(shuffle(A,B), B)
// shuffle(B, shuffle(A, Undef)) -> shuffle(shuffle(A, Undef), B)
if (N1.getOpcode() == ISD::VECTOR_SHUFFLE &&
N0.getOpcode() != ISD::VECTOR_SHUFFLE && Level < AfterLegalizeDAG &&
TLI.isTypeLegal(VT)) {
// The incoming shuffle must be of the same type as the result of the
// current shuffle.
assert(N1->getOperand(0).getValueType() == VT &&
"Shuffle types don't match");
SDValue SV0 = N1->getOperand(0);
SDValue SV1 = N1->getOperand(1);
bool HasSameOp0 = N0 == SV0;
bool IsSV1Undef = SV1.isUndef();
if (HasSameOp0 || IsSV1Undef || N0 == SV1)
// Commute the operands of this shuffle so that next rule
// will trigger.
return DAG.getCommutedVectorShuffle(*SVN);
}
// Try to fold according to rules:
// shuffle(shuffle(A, B, M0), C, M1) -> shuffle(A, B, M2)
// shuffle(shuffle(A, B, M0), C, M1) -> shuffle(A, C, M2)
// shuffle(shuffle(A, B, M0), C, M1) -> shuffle(B, C, M2)
// Don't try to fold shuffles with illegal type.
// Only fold if this shuffle is the only user of the other shuffle.
if (N0.getOpcode() == ISD::VECTOR_SHUFFLE && N->isOnlyUserOf(N0.getNode()) &&
Level < AfterLegalizeDAG && TLI.isTypeLegal(VT)) {
ShuffleVectorSDNode *OtherSV = cast<ShuffleVectorSDNode>(N0);
// Don't try to fold splats; they're likely to simplify somehow, or they
// might be free.
if (OtherSV->isSplat())
return SDValue();
// The incoming shuffle must be of the same type as the result of the
// current shuffle.
assert(OtherSV->getOperand(0).getValueType() == VT &&
"Shuffle types don't match");
SDValue SV0, SV1;
SmallVector<int, 4> Mask;
// Compute the combined shuffle mask for a shuffle with SV0 as the first
// operand, and SV1 as the second operand.
for (unsigned i = 0; i != NumElts; ++i) {
int Idx = SVN->getMaskElt(i);
if (Idx < 0) {
// Propagate Undef.
Mask.push_back(Idx);
continue;
}
SDValue CurrentVec;
if (Idx < (int)NumElts) {
// This shuffle index refers to the inner shuffle N0. Lookup the inner
// shuffle mask to identify which vector is actually referenced.
Idx = OtherSV->getMaskElt(Idx);
if (Idx < 0) {
// Propagate Undef.
Mask.push_back(Idx);
continue;
}
CurrentVec = (Idx < (int) NumElts) ? OtherSV->getOperand(0)
: OtherSV->getOperand(1);
} else {
// This shuffle index references an element within N1.
CurrentVec = N1;
}
// Simple case where 'CurrentVec' is UNDEF.
if (CurrentVec.isUndef()) {
Mask.push_back(-1);
continue;
}
// Canonicalize the shuffle index. We don't know yet if CurrentVec
// will be the first or second operand of the combined shuffle.
Idx = Idx % NumElts;
if (!SV0.getNode() || SV0 == CurrentVec) {
// Ok. CurrentVec is the left hand side.
// Update the mask accordingly.
SV0 = CurrentVec;
Mask.push_back(Idx);
continue;
}
// Bail out if we cannot convert the shuffle pair into a single shuffle.
if (SV1.getNode() && SV1 != CurrentVec)
return SDValue();
// Ok. CurrentVec is the right hand side.
// Update the mask accordingly.
SV1 = CurrentVec;
Mask.push_back(Idx + NumElts);
}
// Check if all indices in Mask are Undef. In case, propagate Undef.
bool isUndefMask = true;
for (unsigned i = 0; i != NumElts && isUndefMask; ++i)
isUndefMask &= Mask[i] < 0;
if (isUndefMask)
return DAG.getUNDEF(VT);
if (!SV0.getNode())
SV0 = DAG.getUNDEF(VT);
if (!SV1.getNode())
SV1 = DAG.getUNDEF(VT);
// Avoid introducing shuffles with illegal mask.
if (!TLI.isShuffleMaskLegal(Mask, VT)) {
ShuffleVectorSDNode::commuteMask(Mask);
if (!TLI.isShuffleMaskLegal(Mask, VT))
return SDValue();
// shuffle(shuffle(A, B, M0), C, M1) -> shuffle(B, A, M2)
// shuffle(shuffle(A, B, M0), C, M1) -> shuffle(C, A, M2)
// shuffle(shuffle(A, B, M0), C, M1) -> shuffle(C, B, M2)
std::swap(SV0, SV1);
}
// shuffle(shuffle(A, B, M0), C, M1) -> shuffle(A, B, M2)
// shuffle(shuffle(A, B, M0), C, M1) -> shuffle(A, C, M2)
// shuffle(shuffle(A, B, M0), C, M1) -> shuffle(B, C, M2)
return DAG.getVectorShuffle(VT, SDLoc(N), SV0, SV1, Mask);
}
return SDValue();
}
SDValue DAGCombiner::visitSCALAR_TO_VECTOR(SDNode *N) {
SDValue InVal = N->getOperand(0);
EVT VT = N->getValueType(0);
// Replace a SCALAR_TO_VECTOR(EXTRACT_VECTOR_ELT(V,C0)) pattern
// with a VECTOR_SHUFFLE.
if (InVal.getOpcode() == ISD::EXTRACT_VECTOR_ELT) {
SDValue InVec = InVal->getOperand(0);
SDValue EltNo = InVal->getOperand(1);
// FIXME: We could support implicit truncation if the shuffle can be
// scaled to a smaller vector scalar type.
ConstantSDNode *C0 = dyn_cast<ConstantSDNode>(EltNo);
if (C0 && VT == InVec.getValueType() &&
VT.getScalarType() == InVal.getValueType()) {
SmallVector<int, 8> NewMask(VT.getVectorNumElements(), -1);
int Elt = C0->getZExtValue();
NewMask[0] = Elt;
if (TLI.isShuffleMaskLegal(NewMask, VT))
return DAG.getVectorShuffle(VT, SDLoc(N), InVec, DAG.getUNDEF(VT),
NewMask);
}
}
return SDValue();
}
SDValue DAGCombiner::visitINSERT_SUBVECTOR(SDNode *N) {
EVT VT = N->getValueType(0);
SDValue N0 = N->getOperand(0);
SDValue N1 = N->getOperand(1);
SDValue N2 = N->getOperand(2);
// If inserting an UNDEF, just return the original vector.
if (N1.isUndef())
return N0;
// If this is an insert of an extracted vector into an undef vector, we can
// just use the input to the extract.
if (N0.isUndef() && N1.getOpcode() == ISD::EXTRACT_SUBVECTOR &&
N1.getOperand(1) == N2 && N1.getOperand(0).getValueType() == VT)
return N1.getOperand(0);
// Combine INSERT_SUBVECTORs where we are inserting to the same index.
// INSERT_SUBVECTOR( INSERT_SUBVECTOR( Vec, SubOld, Idx ), SubNew, Idx )
// --> INSERT_SUBVECTOR( Vec, SubNew, Idx )
if (N0.getOpcode() == ISD::INSERT_SUBVECTOR &&
N0.getOperand(1).getValueType() == N1.getValueType() &&
N0.getOperand(2) == N2)
return DAG.getNode(ISD::INSERT_SUBVECTOR, SDLoc(N), VT, N0.getOperand(0),
N1, N2);
if (!isa<ConstantSDNode>(N2))
return SDValue();
unsigned InsIdx = cast<ConstantSDNode>(N2)->getZExtValue();
// Canonicalize insert_subvector dag nodes.
// Example:
// (insert_subvector (insert_subvector A, Idx0), Idx1)
// -> (insert_subvector (insert_subvector A, Idx1), Idx0)
if (N0.getOpcode() == ISD::INSERT_SUBVECTOR && N0.hasOneUse() &&
N1.getValueType() == N0.getOperand(1).getValueType() &&
isa<ConstantSDNode>(N0.getOperand(2))) {
unsigned OtherIdx = cast<ConstantSDNode>(N0.getOperand(2))->getZExtValue();
if (InsIdx < OtherIdx) {
// Swap nodes.
SDValue NewOp = DAG.getNode(ISD::INSERT_SUBVECTOR, SDLoc(N), VT,
N0.getOperand(0), N1, N2);
AddToWorklist(NewOp.getNode());
return DAG.getNode(ISD::INSERT_SUBVECTOR, SDLoc(N0.getNode()),
VT, NewOp, N0.getOperand(1), N0.getOperand(2));
}
}
// If the input vector is a concatenation, and the insert replaces
// one of the pieces, we can optimize into a single concat_vectors.
if (N0.getOpcode() == ISD::CONCAT_VECTORS && N0.hasOneUse() &&
N0.getOperand(0).getValueType() == N1.getValueType()) {
unsigned Factor = N1.getValueType().getVectorNumElements();
SmallVector<SDValue, 8> Ops(N0->op_begin(), N0->op_end());
Ops[cast<ConstantSDNode>(N2)->getZExtValue() / Factor] = N1;
return DAG.getNode(ISD::CONCAT_VECTORS, SDLoc(N), VT, Ops);
}
return SDValue();
}
SDValue DAGCombiner::visitFP_TO_FP16(SDNode *N) {
SDValue N0 = N->getOperand(0);
// fold (fp_to_fp16 (fp16_to_fp op)) -> op
if (N0->getOpcode() == ISD::FP16_TO_FP)
return N0->getOperand(0);
return SDValue();
}
SDValue DAGCombiner::visitFP16_TO_FP(SDNode *N) {
SDValue N0 = N->getOperand(0);
// fold fp16_to_fp(op & 0xffff) -> fp16_to_fp(op)
if (N0->getOpcode() == ISD::AND) {
ConstantSDNode *AndConst = getAsNonOpaqueConstant(N0.getOperand(1));
if (AndConst && AndConst->getAPIntValue() == 0xffff) {
return DAG.getNode(ISD::FP16_TO_FP, SDLoc(N), N->getValueType(0),
N0.getOperand(0));
}
}
return SDValue();
}
/// Returns a vector_shuffle if it able to transform an AND to a vector_shuffle
/// with the destination vector and a zero vector.
/// e.g. AND V, <0xffffffff, 0, 0xffffffff, 0>. ==>
/// vector_shuffle V, Zero, <0, 4, 2, 4>
SDValue DAGCombiner::XformToShuffleWithZero(SDNode *N) {
EVT VT = N->getValueType(0);
SDValue LHS = N->getOperand(0);
SDValue RHS = N->getOperand(1);
SDLoc DL(N);
// Make sure we're not running after operation legalization where it
// may have custom lowered the vector shuffles.
if (LegalOperations)
return SDValue();
if (N->getOpcode() != ISD::AND)
return SDValue();
if (RHS.getOpcode() == ISD::BITCAST)
RHS = RHS.getOperand(0);
if (RHS.getOpcode() != ISD::BUILD_VECTOR)
return SDValue();
EVT RVT = RHS.getValueType();
unsigned NumElts = RHS.getNumOperands();
// Attempt to create a valid clear mask, splitting the mask into
// sub elements and checking to see if each is
// all zeros or all ones - suitable for shuffle masking.
auto BuildClearMask = [&](int Split) {
int NumSubElts = NumElts * Split;
int NumSubBits = RVT.getScalarSizeInBits() / Split;
SmallVector<int, 8> Indices;
for (int i = 0; i != NumSubElts; ++i) {
int EltIdx = i / Split;
int SubIdx = i % Split;
SDValue Elt = RHS.getOperand(EltIdx);
if (Elt.isUndef()) {
Indices.push_back(-1);
continue;
}
APInt Bits;
if (isa<ConstantSDNode>(Elt))
Bits = cast<ConstantSDNode>(Elt)->getAPIntValue();
else if (isa<ConstantFPSDNode>(Elt))
Bits = cast<ConstantFPSDNode>(Elt)->getValueAPF().bitcastToAPInt();
else
return SDValue();
// Extract the sub element from the constant bit mask.
if (DAG.getDataLayout().isBigEndian()) {
Bits = Bits.lshr((Split - SubIdx - 1) * NumSubBits);
} else {
Bits = Bits.lshr(SubIdx * NumSubBits);
}
if (Split > 1)
Bits = Bits.trunc(NumSubBits);
if (Bits.isAllOnesValue())
Indices.push_back(i);
else if (Bits == 0)
Indices.push_back(i + NumSubElts);
else
return SDValue();
}
// Let's see if the target supports this vector_shuffle.
EVT ClearSVT = EVT::getIntegerVT(*DAG.getContext(), NumSubBits);
EVT ClearVT = EVT::getVectorVT(*DAG.getContext(), ClearSVT, NumSubElts);
if (!TLI.isVectorClearMaskLegal(Indices, ClearVT))
return SDValue();
SDValue Zero = DAG.getConstant(0, DL, ClearVT);
return DAG.getBitcast(VT, DAG.getVectorShuffle(ClearVT, DL,
DAG.getBitcast(ClearVT, LHS),
Zero, Indices));
};
// Determine maximum split level (byte level masking).
int MaxSplit = 1;
if (RVT.getScalarSizeInBits() % 8 == 0)
MaxSplit = RVT.getScalarSizeInBits() / 8;
for (int Split = 1; Split <= MaxSplit; ++Split)
if (RVT.getScalarSizeInBits() % Split == 0)
if (SDValue S = BuildClearMask(Split))
return S;
return SDValue();
}
/// Visit a binary vector operation, like ADD.
SDValue DAGCombiner::SimplifyVBinOp(SDNode *N) {
assert(N->getValueType(0).isVector() &&
"SimplifyVBinOp only works on vectors!");
SDValue LHS = N->getOperand(0);
SDValue RHS = N->getOperand(1);
SDValue Ops[] = {LHS, RHS};
// See if we can constant fold the vector operation.
if (SDValue Fold = DAG.FoldConstantVectorArithmetic(
N->getOpcode(), SDLoc(LHS), LHS.getValueType(), Ops, N->getFlags()))
return Fold;
// Try to convert a constant mask AND into a shuffle clear mask.
if (SDValue Shuffle = XformToShuffleWithZero(N))
return Shuffle;
// Type legalization might introduce new shuffles in the DAG.
// Fold (VBinOp (shuffle (A, Undef, Mask)), (shuffle (B, Undef, Mask)))
// -> (shuffle (VBinOp (A, B)), Undef, Mask).
if (LegalTypes && isa<ShuffleVectorSDNode>(LHS) &&
isa<ShuffleVectorSDNode>(RHS) && LHS.hasOneUse() && RHS.hasOneUse() &&
LHS.getOperand(1).isUndef() &&
RHS.getOperand(1).isUndef()) {
ShuffleVectorSDNode *SVN0 = cast<ShuffleVectorSDNode>(LHS);
ShuffleVectorSDNode *SVN1 = cast<ShuffleVectorSDNode>(RHS);
if (SVN0->getMask().equals(SVN1->getMask())) {
EVT VT = N->getValueType(0);
SDValue UndefVector = LHS.getOperand(1);
SDValue NewBinOp = DAG.getNode(N->getOpcode(), SDLoc(N), VT,
LHS.getOperand(0), RHS.getOperand(0),
N->getFlags());
AddUsersToWorklist(N);
return DAG.getVectorShuffle(VT, SDLoc(N), NewBinOp, UndefVector,
SVN0->getMask());
}
}
return SDValue();
}
SDValue DAGCombiner::SimplifySelect(const SDLoc &DL, SDValue N0, SDValue N1,
SDValue N2) {
assert(N0.getOpcode() ==ISD::SETCC && "First argument must be a SetCC node!");
SDValue SCC = SimplifySelectCC(DL, N0.getOperand(0), N0.getOperand(1), N1, N2,
cast<CondCodeSDNode>(N0.getOperand(2))->get());
// If we got a simplified select_cc node back from SimplifySelectCC, then
// break it down into a new SETCC node, and a new SELECT node, and then return
// the SELECT node, since we were called with a SELECT node.
if (SCC.getNode()) {
// Check to see if we got a select_cc back (to turn into setcc/select).
// Otherwise, just return whatever node we got back, like fabs.
if (SCC.getOpcode() == ISD::SELECT_CC) {
SDValue SETCC = DAG.getNode(ISD::SETCC, SDLoc(N0),
N0.getValueType(),
SCC.getOperand(0), SCC.getOperand(1),
SCC.getOperand(4));
AddToWorklist(SETCC.getNode());
return DAG.getSelect(SDLoc(SCC), SCC.getValueType(), SETCC,
SCC.getOperand(2), SCC.getOperand(3));
}
return SCC;
}
return SDValue();
}
/// Given a SELECT or a SELECT_CC node, where LHS and RHS are the two values
/// being selected between, see if we can simplify the select. Callers of this
/// should assume that TheSelect is deleted if this returns true. As such, they
/// should return the appropriate thing (e.g. the node) back to the top-level of
/// the DAG combiner loop to avoid it being looked at.
bool DAGCombiner::SimplifySelectOps(SDNode *TheSelect, SDValue LHS,
SDValue RHS) {
// fold (select (setcc x, [+-]0.0, *lt), NaN, (fsqrt x))
// The select + setcc is redundant, because fsqrt returns NaN for X < 0.
if (const ConstantFPSDNode *NaN = isConstOrConstSplatFP(LHS)) {
if (NaN->isNaN() && RHS.getOpcode() == ISD::FSQRT) {
// We have: (select (setcc ?, ?, ?), NaN, (fsqrt ?))
SDValue Sqrt = RHS;
ISD::CondCode CC;
SDValue CmpLHS;
const ConstantFPSDNode *Zero = nullptr;
if (TheSelect->getOpcode() == ISD::SELECT_CC) {
CC = dyn_cast<CondCodeSDNode>(TheSelect->getOperand(4))->get();
CmpLHS = TheSelect->getOperand(0);
Zero = isConstOrConstSplatFP(TheSelect->getOperand(1));
} else {
// SELECT or VSELECT
SDValue Cmp = TheSelect->getOperand(0);
if (Cmp.getOpcode() == ISD::SETCC) {
CC = dyn_cast<CondCodeSDNode>(Cmp.getOperand(2))->get();
CmpLHS = Cmp.getOperand(0);
Zero = isConstOrConstSplatFP(Cmp.getOperand(1));
}
}
if (Zero && Zero->isZero() &&
Sqrt.getOperand(0) == CmpLHS && (CC == ISD::SETOLT ||
CC == ISD::SETULT || CC == ISD::SETLT)) {
// We have: (select (setcc x, [+-]0.0, *lt), NaN, (fsqrt x))
CombineTo(TheSelect, Sqrt);
return true;
}
}
}
// Cannot simplify select with vector condition
if (TheSelect->getOperand(0).getValueType().isVector()) return false;
// If this is a select from two identical things, try to pull the operation
// through the select.
if (LHS.getOpcode() != RHS.getOpcode() ||
!LHS.hasOneUse() || !RHS.hasOneUse())
return false;
// If this is a load and the token chain is identical, replace the select
// of two loads with a load through a select of the address to load from.
// This triggers in things like "select bool X, 10.0, 123.0" after the FP
// constants have been dropped into the constant pool.
if (LHS.getOpcode() == ISD::LOAD) {
LoadSDNode *LLD = cast<LoadSDNode>(LHS);
LoadSDNode *RLD = cast<LoadSDNode>(RHS);
// Token chains must be identical.
if (LHS.getOperand(0) != RHS.getOperand(0) ||
// Do not let this transformation reduce the number of volatile loads.
LLD->isVolatile() || RLD->isVolatile() ||
// FIXME: If either is a pre/post inc/dec load,
// we'd need to split out the address adjustment.
LLD->isIndexed() || RLD->isIndexed() ||
// If this is an EXTLOAD, the VT's must match.
LLD->getMemoryVT() != RLD->getMemoryVT() ||
// If this is an EXTLOAD, the kind of extension must match.
(LLD->getExtensionType() != RLD->getExtensionType() &&
// The only exception is if one of the extensions is anyext.
LLD->getExtensionType() != ISD::EXTLOAD &&
RLD->getExtensionType() != ISD::EXTLOAD) ||
// FIXME: this discards src value information. This is
// over-conservative. It would be beneficial to be able to remember
// both potential memory locations. Since we are discarding
// src value info, don't do the transformation if the memory
// locations are not in the default address space.
LLD->getPointerInfo().getAddrSpace() != 0 ||
RLD->getPointerInfo().getAddrSpace() != 0 ||
!TLI.isOperationLegalOrCustom(TheSelect->getOpcode(),
LLD->getBasePtr().getValueType()))
return false;
// Check that the select condition doesn't reach either load. If so,
// folding this will induce a cycle into the DAG. If not, this is safe to
// xform, so create a select of the addresses.
SDValue Addr;
if (TheSelect->getOpcode() == ISD::SELECT) {
SDNode *CondNode = TheSelect->getOperand(0).getNode();
if ((LLD->hasAnyUseOfValue(1) && LLD->isPredecessorOf(CondNode)) ||
(RLD->hasAnyUseOfValue(1) && RLD->isPredecessorOf(CondNode)))
return false;
// The loads must not depend on one another.
if (LLD->isPredecessorOf(RLD) ||
RLD->isPredecessorOf(LLD))
return false;
Addr = DAG.getSelect(SDLoc(TheSelect),
LLD->getBasePtr().getValueType(),
TheSelect->getOperand(0), LLD->getBasePtr(),
RLD->getBasePtr());
} else { // Otherwise SELECT_CC
SDNode *CondLHS = TheSelect->getOperand(0).getNode();
SDNode *CondRHS = TheSelect->getOperand(1).getNode();
if ((LLD->hasAnyUseOfValue(1) &&
(LLD->isPredecessorOf(CondLHS) || LLD->isPredecessorOf(CondRHS))) ||
(RLD->hasAnyUseOfValue(1) &&
(RLD->isPredecessorOf(CondLHS) || RLD->isPredecessorOf(CondRHS))))
return false;
Addr = DAG.getNode(ISD::SELECT_CC, SDLoc(TheSelect),
LLD->getBasePtr().getValueType(),
TheSelect->getOperand(0),
TheSelect->getOperand(1),
LLD->getBasePtr(), RLD->getBasePtr(),
TheSelect->getOperand(4));
}
SDValue Load;
// It is safe to replace the two loads if they have different alignments,
// but the new load must be the minimum (most restrictive) alignment of the
// inputs.
unsigned Alignment = std::min(LLD->getAlignment(), RLD->getAlignment());
MachineMemOperand::Flags MMOFlags = LLD->getMemOperand()->getFlags();
if (!RLD->isInvariant())
MMOFlags &= ~MachineMemOperand::MOInvariant;
if (!RLD->isDereferenceable())
MMOFlags &= ~MachineMemOperand::MODereferenceable;
if (LLD->getExtensionType() == ISD::NON_EXTLOAD) {
// FIXME: Discards pointer and AA info.
Load = DAG.getLoad(TheSelect->getValueType(0), SDLoc(TheSelect),
LLD->getChain(), Addr, MachinePointerInfo(), Alignment,
MMOFlags);
} else {
// FIXME: Discards pointer and AA info.
Load = DAG.getExtLoad(
LLD->getExtensionType() == ISD::EXTLOAD ? RLD->getExtensionType()
: LLD->getExtensionType(),
SDLoc(TheSelect), TheSelect->getValueType(0), LLD->getChain(), Addr,
MachinePointerInfo(), LLD->getMemoryVT(), Alignment, MMOFlags);
}
// Users of the select now use the result of the load.
CombineTo(TheSelect, Load);
// Users of the old loads now use the new load's chain. We know the
// old-load value is dead now.
CombineTo(LHS.getNode(), Load.getValue(0), Load.getValue(1));
CombineTo(RHS.getNode(), Load.getValue(0), Load.getValue(1));
return true;
}
return false;
}
/// Try to fold an expression of the form (N0 cond N1) ? N2 : N3 to a shift and
/// bitwise 'and'.
SDValue DAGCombiner::foldSelectCCToShiftAnd(const SDLoc &DL, SDValue N0,
SDValue N1, SDValue N2, SDValue N3,
ISD::CondCode CC) {
// If this is a select where the false operand is zero and the compare is a
// check of the sign bit, see if we can perform the "gzip trick":
// select_cc setlt X, 0, A, 0 -> and (sra X, size(X)-1), A
// select_cc setgt X, 0, A, 0 -> and (not (sra X, size(X)-1)), A
EVT XType = N0.getValueType();
EVT AType = N2.getValueType();
if (!isNullConstant(N3) || !XType.bitsGE(AType))
return SDValue();
// If the comparison is testing for a positive value, we have to invert
// the sign bit mask, so only do that transform if the target has a bitwise
// 'and not' instruction (the invert is free).
if (CC == ISD::SETGT && TLI.hasAndNot(N2)) {
// (X > -1) ? A : 0
// (X > 0) ? X : 0 <-- This is canonical signed max.
if (!(isAllOnesConstant(N1) || (isNullConstant(N1) && N0 == N2)))
return SDValue();
} else if (CC == ISD::SETLT) {
// (X < 0) ? A : 0
// (X < 1) ? X : 0 <-- This is un-canonicalized signed min.
if (!(isNullConstant(N1) || (isOneConstant(N1) && N0 == N2)))
return SDValue();
} else {
return SDValue();
}
// and (sra X, size(X)-1), A -> "and (srl X, C2), A" iff A is a single-bit
// constant.
EVT ShiftAmtTy = getShiftAmountTy(N0.getValueType());
auto *N2C = dyn_cast<ConstantSDNode>(N2.getNode());
if (N2C && ((N2C->getAPIntValue() & (N2C->getAPIntValue() - 1)) == 0)) {
unsigned ShCt = XType.getSizeInBits() - N2C->getAPIntValue().logBase2() - 1;
SDValue ShiftAmt = DAG.getConstant(ShCt, DL, ShiftAmtTy);
SDValue Shift = DAG.getNode(ISD::SRL, DL, XType, N0, ShiftAmt);
AddToWorklist(Shift.getNode());
if (XType.bitsGT(AType)) {
Shift = DAG.getNode(ISD::TRUNCATE, DL, AType, Shift);
AddToWorklist(Shift.getNode());
}
if (CC == ISD::SETGT)
Shift = DAG.getNOT(DL, Shift, AType);
return DAG.getNode(ISD::AND, DL, AType, Shift, N2);
}
SDValue ShiftAmt = DAG.getConstant(XType.getSizeInBits() - 1, DL, ShiftAmtTy);
SDValue Shift = DAG.getNode(ISD::SRA, DL, XType, N0, ShiftAmt);
AddToWorklist(Shift.getNode());
if (XType.bitsGT(AType)) {
Shift = DAG.getNode(ISD::TRUNCATE, DL, AType, Shift);
AddToWorklist(Shift.getNode());
}
if (CC == ISD::SETGT)
Shift = DAG.getNOT(DL, Shift, AType);
return DAG.getNode(ISD::AND, DL, AType, Shift, N2);
}
/// Simplify an expression of the form (N0 cond N1) ? N2 : N3
/// where 'cond' is the comparison specified by CC.
SDValue DAGCombiner::SimplifySelectCC(const SDLoc &DL, SDValue N0, SDValue N1,
SDValue N2, SDValue N3, ISD::CondCode CC,
bool NotExtCompare) {
// (x ? y : y) -> y.
if (N2 == N3) return N2;
EVT VT = N2.getValueType();
ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1.getNode());
ConstantSDNode *N2C = dyn_cast<ConstantSDNode>(N2.getNode());
// Determine if the condition we're dealing with is constant
SDValue SCC = SimplifySetCC(getSetCCResultType(N0.getValueType()),
N0, N1, CC, DL, false);
if (SCC.getNode()) AddToWorklist(SCC.getNode());
if (ConstantSDNode *SCCC = dyn_cast_or_null<ConstantSDNode>(SCC.getNode())) {
// fold select_cc true, x, y -> x
// fold select_cc false, x, y -> y
return !SCCC->isNullValue() ? N2 : N3;
}
// Check to see if we can simplify the select into an fabs node
if (ConstantFPSDNode *CFP = dyn_cast<ConstantFPSDNode>(N1)) {
// Allow either -0.0 or 0.0
if (CFP->isZero()) {
// select (setg[te] X, +/-0.0), X, fneg(X) -> fabs
if ((CC == ISD::SETGE || CC == ISD::SETGT) &&
N0 == N2 && N3.getOpcode() == ISD::FNEG &&
N2 == N3.getOperand(0))
return DAG.getNode(ISD::FABS, DL, VT, N0);
// select (setl[te] X, +/-0.0), fneg(X), X -> fabs
if ((CC == ISD::SETLT || CC == ISD::SETLE) &&
N0 == N3 && N2.getOpcode() == ISD::FNEG &&
N2.getOperand(0) == N3)
return DAG.getNode(ISD::FABS, DL, VT, N3);
}
}
// Turn "(a cond b) ? 1.0f : 2.0f" into "load (tmp + ((a cond b) ? 0 : 4)"
// where "tmp" is a constant pool entry containing an array with 1.0 and 2.0
// in it. This is a win when the constant is not otherwise available because
// it replaces two constant pool loads with one. We only do this if the FP
// type is known to be legal, because if it isn't, then we are before legalize
// types an we want the other legalization to happen first (e.g. to avoid
// messing with soft float) and if the ConstantFP is not legal, because if
// it is legal, we may not need to store the FP constant in a constant pool.
if (ConstantFPSDNode *TV = dyn_cast<ConstantFPSDNode>(N2))
if (ConstantFPSDNode *FV = dyn_cast<ConstantFPSDNode>(N3)) {
if (TLI.isTypeLegal(N2.getValueType()) &&
(TLI.getOperationAction(ISD::ConstantFP, N2.getValueType()) !=
TargetLowering::Legal &&
!TLI.isFPImmLegal(TV->getValueAPF(), TV->getValueType(0)) &&
!TLI.isFPImmLegal(FV->getValueAPF(), FV->getValueType(0))) &&
// If both constants have multiple uses, then we won't need to do an
// extra load, they are likely around in registers for other users.
(TV->hasOneUse() || FV->hasOneUse())) {
Constant *Elts[] = {
const_cast<ConstantFP*>(FV->getConstantFPValue()),
const_cast<ConstantFP*>(TV->getConstantFPValue())
};
Type *FPTy = Elts[0]->getType();
const DataLayout &TD = DAG.getDataLayout();
// Create a ConstantArray of the two constants.
Constant *CA = ConstantArray::get(ArrayType::get(FPTy, 2), Elts);
SDValue CPIdx =
DAG.getConstantPool(CA, TLI.getPointerTy(DAG.getDataLayout()),
TD.getPrefTypeAlignment(FPTy));
unsigned Alignment = cast<ConstantPoolSDNode>(CPIdx)->getAlignment();
// Get the offsets to the 0 and 1 element of the array so that we can
// select between them.
SDValue Zero = DAG.getIntPtrConstant(0, DL);
unsigned EltSize = (unsigned)TD.getTypeAllocSize(Elts[0]->getType());
SDValue One = DAG.getIntPtrConstant(EltSize, SDLoc(FV));
SDValue Cond = DAG.getSetCC(DL,
getSetCCResultType(N0.getValueType()),
N0, N1, CC);
AddToWorklist(Cond.getNode());
SDValue CstOffset = DAG.getSelect(DL, Zero.getValueType(),
Cond, One, Zero);
AddToWorklist(CstOffset.getNode());
CPIdx = DAG.getNode(ISD::ADD, DL, CPIdx.getValueType(), CPIdx,
CstOffset);
AddToWorklist(CPIdx.getNode());
return DAG.getLoad(
TV->getValueType(0), DL, DAG.getEntryNode(), CPIdx,
MachinePointerInfo::getConstantPool(DAG.getMachineFunction()),
Alignment);
}
}
if (SDValue V = foldSelectCCToShiftAnd(DL, N0, N1, N2, N3, CC))
return V;
// fold (select_cc seteq (and x, y), 0, 0, A) -> (and (shr (shl x)) A)
// where y is has a single bit set.
// A plaintext description would be, we can turn the SELECT_CC into an AND
// when the condition can be materialized as an all-ones register. Any
// single bit-test can be materialized as an all-ones register with
// shift-left and shift-right-arith.
if (CC == ISD::SETEQ && N0->getOpcode() == ISD::AND &&
N0->getValueType(0) == VT && isNullConstant(N1) && isNullConstant(N2)) {
SDValue AndLHS = N0->getOperand(0);
ConstantSDNode *ConstAndRHS = dyn_cast<ConstantSDNode>(N0->getOperand(1));
if (ConstAndRHS && ConstAndRHS->getAPIntValue().countPopulation() == 1) {
// Shift the tested bit over the sign bit.
const APInt &AndMask = ConstAndRHS->getAPIntValue();
SDValue ShlAmt =
DAG.getConstant(AndMask.countLeadingZeros(), SDLoc(AndLHS),
getShiftAmountTy(AndLHS.getValueType()));
SDValue Shl = DAG.getNode(ISD::SHL, SDLoc(N0), VT, AndLHS, ShlAmt);
// Now arithmetic right shift it all the way over, so the result is either
// all-ones, or zero.
SDValue ShrAmt =
DAG.getConstant(AndMask.getBitWidth() - 1, SDLoc(Shl),
getShiftAmountTy(Shl.getValueType()));
SDValue Shr = DAG.getNode(ISD::SRA, SDLoc(N0), VT, Shl, ShrAmt);
return DAG.getNode(ISD::AND, DL, VT, Shr, N3);
}
}
// fold select C, 16, 0 -> shl C, 4
if (N2C && isNullConstant(N3) && N2C->getAPIntValue().isPowerOf2() &&
TLI.getBooleanContents(N0.getValueType()) ==
TargetLowering::ZeroOrOneBooleanContent) {
// If the caller doesn't want us to simplify this into a zext of a compare,
// don't do it.
if (NotExtCompare && N2C->isOne())
return SDValue();
// Get a SetCC of the condition
// NOTE: Don't create a SETCC if it's not legal on this target.
if (!LegalOperations ||
TLI.isOperationLegal(ISD::SETCC, N0.getValueType())) {
SDValue Temp, SCC;
// cast from setcc result type to select result type
if (LegalTypes) {
SCC = DAG.getSetCC(DL, getSetCCResultType(N0.getValueType()),
N0, N1, CC);
if (N2.getValueType().bitsLT(SCC.getValueType()))
Temp = DAG.getZeroExtendInReg(SCC, SDLoc(N2),
N2.getValueType());
else
Temp = DAG.getNode(ISD::ZERO_EXTEND, SDLoc(N2),
N2.getValueType(), SCC);
} else {
SCC = DAG.getSetCC(SDLoc(N0), MVT::i1, N0, N1, CC);
Temp = DAG.getNode(ISD::ZERO_EXTEND, SDLoc(N2),
N2.getValueType(), SCC);
}
AddToWorklist(SCC.getNode());
AddToWorklist(Temp.getNode());
if (N2C->isOne())
return Temp;
// shl setcc result by log2 n2c
return DAG.getNode(
ISD::SHL, DL, N2.getValueType(), Temp,
DAG.getConstant(N2C->getAPIntValue().logBase2(), SDLoc(Temp),
getShiftAmountTy(Temp.getValueType())));
}
}
// Check to see if this is an integer abs.
// select_cc setg[te] X, 0, X, -X ->
// select_cc setgt X, -1, X, -X ->
// select_cc setl[te] X, 0, -X, X ->
// select_cc setlt X, 1, -X, X ->
// Y = sra (X, size(X)-1); xor (add (X, Y), Y)
if (N1C) {
ConstantSDNode *SubC = nullptr;
if (((N1C->isNullValue() && (CC == ISD::SETGT || CC == ISD::SETGE)) ||
(N1C->isAllOnesValue() && CC == ISD::SETGT)) &&
N0 == N2 && N3.getOpcode() == ISD::SUB && N0 == N3.getOperand(1))
SubC = dyn_cast<ConstantSDNode>(N3.getOperand(0));
else if (((N1C->isNullValue() && (CC == ISD::SETLT || CC == ISD::SETLE)) ||
(N1C->isOne() && CC == ISD::SETLT)) &&
N0 == N3 && N2.getOpcode() == ISD::SUB && N0 == N2.getOperand(1))
SubC = dyn_cast<ConstantSDNode>(N2.getOperand(0));
EVT XType = N0.getValueType();
if (SubC && SubC->isNullValue() && XType.isInteger()) {
SDLoc DL(N0);
SDValue Shift = DAG.getNode(ISD::SRA, DL, XType,
N0,
DAG.getConstant(XType.getSizeInBits() - 1, DL,
getShiftAmountTy(N0.getValueType())));
SDValue Add = DAG.getNode(ISD::ADD, DL,
XType, N0, Shift);
AddToWorklist(Shift.getNode());
AddToWorklist(Add.getNode());
return DAG.getNode(ISD::XOR, DL, XType, Add, Shift);
}
}
// select_cc seteq X, 0, sizeof(X), ctlz(X) -> ctlz(X)
// select_cc seteq X, 0, sizeof(X), ctlz_zero_undef(X) -> ctlz(X)
// select_cc seteq X, 0, sizeof(X), cttz(X) -> cttz(X)
// select_cc seteq X, 0, sizeof(X), cttz_zero_undef(X) -> cttz(X)
// select_cc setne X, 0, ctlz(X), sizeof(X) -> ctlz(X)
// select_cc setne X, 0, ctlz_zero_undef(X), sizeof(X) -> ctlz(X)
// select_cc setne X, 0, cttz(X), sizeof(X) -> cttz(X)
// select_cc setne X, 0, cttz_zero_undef(X), sizeof(X) -> cttz(X)
if (N1C && N1C->isNullValue() && (CC == ISD::SETEQ || CC == ISD::SETNE)) {
SDValue ValueOnZero = N2;
SDValue Count = N3;
// If the condition is NE instead of E, swap the operands.
if (CC == ISD::SETNE)
std::swap(ValueOnZero, Count);
// Check if the value on zero is a constant equal to the bits in the type.
if (auto *ValueOnZeroC = dyn_cast<ConstantSDNode>(ValueOnZero)) {
if (ValueOnZeroC->getAPIntValue() == VT.getSizeInBits()) {
// If the other operand is cttz/cttz_zero_undef of N0, and cttz is
// legal, combine to just cttz.
if ((Count.getOpcode() == ISD::CTTZ ||
Count.getOpcode() == ISD::CTTZ_ZERO_UNDEF) &&
N0 == Count.getOperand(0) &&
(!LegalOperations || TLI.isOperationLegal(ISD::CTTZ, VT)))
return DAG.getNode(ISD::CTTZ, DL, VT, N0);
// If the other operand is ctlz/ctlz_zero_undef of N0, and ctlz is
// legal, combine to just ctlz.
if ((Count.getOpcode() == ISD::CTLZ ||
Count.getOpcode() == ISD::CTLZ_ZERO_UNDEF) &&
N0 == Count.getOperand(0) &&
(!LegalOperations || TLI.isOperationLegal(ISD::CTLZ, VT)))
return DAG.getNode(ISD::CTLZ, DL, VT, N0);
}
}
}
return SDValue();
}
/// This is a stub for TargetLowering::SimplifySetCC.
SDValue DAGCombiner::SimplifySetCC(EVT VT, SDValue N0, SDValue N1,
ISD::CondCode Cond, const SDLoc &DL,
bool foldBooleans) {
TargetLowering::DAGCombinerInfo
DagCombineInfo(DAG, Level, false, this);
return TLI.SimplifySetCC(VT, N0, N1, Cond, foldBooleans, DagCombineInfo, DL);
}
/// Given an ISD::SDIV node expressing a divide by constant, return
/// a DAG expression to select that will generate the same value by multiplying
/// by a magic number.
/// Ref: "Hacker's Delight" or "The PowerPC Compiler Writer's Guide".
SDValue DAGCombiner::BuildSDIV(SDNode *N) {
// when optimising for minimum size, we don't want to expand a div to a mul
// and a shift.
if (DAG.getMachineFunction().getFunction()->optForMinSize())
return SDValue();
ConstantSDNode *C = isConstOrConstSplat(N->getOperand(1));
if (!C)
return SDValue();
// Avoid division by zero.
if (C->isNullValue())
return SDValue();
std::vector<SDNode*> Built;
SDValue S =
TLI.BuildSDIV(N, C->getAPIntValue(), DAG, LegalOperations, &Built);
for (SDNode *N : Built)
AddToWorklist(N);
return S;
}
/// Given an ISD::SDIV node expressing a divide by constant power of 2, return a
/// DAG expression that will generate the same value by right shifting.
SDValue DAGCombiner::BuildSDIVPow2(SDNode *N) {
ConstantSDNode *C = isConstOrConstSplat(N->getOperand(1));
if (!C)
return SDValue();
// Avoid division by zero.
if (C->isNullValue())
return SDValue();
std::vector<SDNode *> Built;
SDValue S = TLI.BuildSDIVPow2(N, C->getAPIntValue(), DAG, &Built);
for (SDNode *N : Built)
AddToWorklist(N);
return S;
}
/// Given an ISD::UDIV node expressing a divide by constant, return a DAG
/// expression that will generate the same value by multiplying by a magic
/// number.
/// Ref: "Hacker's Delight" or "The PowerPC Compiler Writer's Guide".
SDValue DAGCombiner::BuildUDIV(SDNode *N) {
// when optimising for minimum size, we don't want to expand a div to a mul
// and a shift.
if (DAG.getMachineFunction().getFunction()->optForMinSize())
return SDValue();
ConstantSDNode *C = isConstOrConstSplat(N->getOperand(1));
if (!C)
return SDValue();
// Avoid division by zero.
if (C->isNullValue())
return SDValue();
std::vector<SDNode*> Built;
SDValue S =
TLI.BuildUDIV(N, C->getAPIntValue(), DAG, LegalOperations, &Built);
for (SDNode *N : Built)
AddToWorklist(N);
return S;
}
/// Determines the LogBase2 value for a non-null input value using the
/// transform: LogBase2(V) = (EltBits - 1) - ctlz(V).
SDValue DAGCombiner::BuildLogBase2(SDValue V, const SDLoc &DL) {
EVT VT = V.getValueType();
unsigned EltBits = VT.getScalarSizeInBits();
SDValue Ctlz = DAG.getNode(ISD::CTLZ, DL, VT, V);
SDValue Base = DAG.getConstant(EltBits - 1, DL, VT);
SDValue LogBase2 = DAG.getNode(ISD::SUB, DL, VT, Base, Ctlz);
return LogBase2;
}
/// Newton iteration for a function: F(X) is X_{i+1} = X_i - F(X_i)/F'(X_i)
/// For the reciprocal, we need to find the zero of the function:
/// F(X) = A X - 1 [which has a zero at X = 1/A]
/// =>
/// X_{i+1} = X_i (2 - A X_i) = X_i + X_i (1 - A X_i) [this second form
/// does not require additional intermediate precision]
SDValue DAGCombiner::BuildReciprocalEstimate(SDValue Op, SDNodeFlags *Flags) {
if (Level >= AfterLegalizeDAG)
return SDValue();
// TODO: Handle half and/or extended types?
EVT VT = Op.getValueType();
if (VT.getScalarType() != MVT::f32 && VT.getScalarType() != MVT::f64)
return SDValue();
// If estimates are explicitly disabled for this function, we're done.
MachineFunction &MF = DAG.getMachineFunction();
int Enabled = TLI.getRecipEstimateDivEnabled(VT, MF);
if (Enabled == TLI.ReciprocalEstimate::Disabled)
return SDValue();
// Estimates may be explicitly enabled for this type with a custom number of
// refinement steps.
int Iterations = TLI.getDivRefinementSteps(VT, MF);
if (SDValue Est = TLI.getRecipEstimate(Op, DAG, Enabled, Iterations)) {
AddToWorklist(Est.getNode());
if (Iterations) {
EVT VT = Op.getValueType();
SDLoc DL(Op);
SDValue FPOne = DAG.getConstantFP(1.0, DL, VT);
// Newton iterations: Est = Est + Est (1 - Arg * Est)
for (int i = 0; i < Iterations; ++i) {
SDValue NewEst = DAG.getNode(ISD::FMUL, DL, VT, Op, Est, Flags);
AddToWorklist(NewEst.getNode());
NewEst = DAG.getNode(ISD::FSUB, DL, VT, FPOne, NewEst, Flags);
AddToWorklist(NewEst.getNode());
NewEst = DAG.getNode(ISD::FMUL, DL, VT, Est, NewEst, Flags);
AddToWorklist(NewEst.getNode());
Est = DAG.getNode(ISD::FADD, DL, VT, Est, NewEst, Flags);
AddToWorklist(Est.getNode());
}
}
return Est;
}
return SDValue();
}
/// Newton iteration for a function: F(X) is X_{i+1} = X_i - F(X_i)/F'(X_i)
/// For the reciprocal sqrt, we need to find the zero of the function:
/// F(X) = 1/X^2 - A [which has a zero at X = 1/sqrt(A)]
/// =>
/// X_{i+1} = X_i (1.5 - A X_i^2 / 2)
/// As a result, we precompute A/2 prior to the iteration loop.
SDValue DAGCombiner::buildSqrtNROneConst(SDValue Arg, SDValue Est,
unsigned Iterations,
SDNodeFlags *Flags, bool Reciprocal) {
EVT VT = Arg.getValueType();
SDLoc DL(Arg);
SDValue ThreeHalves = DAG.getConstantFP(1.5, DL, VT);
// We now need 0.5 * Arg which we can write as (1.5 * Arg - Arg) so that
// this entire sequence requires only one FP constant.
SDValue HalfArg = DAG.getNode(ISD::FMUL, DL, VT, ThreeHalves, Arg, Flags);
AddToWorklist(HalfArg.getNode());
HalfArg = DAG.getNode(ISD::FSUB, DL, VT, HalfArg, Arg, Flags);
AddToWorklist(HalfArg.getNode());
// Newton iterations: Est = Est * (1.5 - HalfArg * Est * Est)
for (unsigned i = 0; i < Iterations; ++i) {
SDValue NewEst = DAG.getNode(ISD::FMUL, DL, VT, Est, Est, Flags);
AddToWorklist(NewEst.getNode());
NewEst = DAG.getNode(ISD::FMUL, DL, VT, HalfArg, NewEst, Flags);
AddToWorklist(NewEst.getNode());
NewEst = DAG.getNode(ISD::FSUB, DL, VT, ThreeHalves, NewEst, Flags);
AddToWorklist(NewEst.getNode());
Est = DAG.getNode(ISD::FMUL, DL, VT, Est, NewEst, Flags);
AddToWorklist(Est.getNode());
}
// If non-reciprocal square root is requested, multiply the result by Arg.
if (!Reciprocal) {
Est = DAG.getNode(ISD::FMUL, DL, VT, Est, Arg, Flags);
AddToWorklist(Est.getNode());
}
return Est;
}
/// Newton iteration for a function: F(X) is X_{i+1} = X_i - F(X_i)/F'(X_i)
/// For the reciprocal sqrt, we need to find the zero of the function:
/// F(X) = 1/X^2 - A [which has a zero at X = 1/sqrt(A)]
/// =>
/// X_{i+1} = (-0.5 * X_i) * (A * X_i * X_i + (-3.0))
SDValue DAGCombiner::buildSqrtNRTwoConst(SDValue Arg, SDValue Est,
unsigned Iterations,
SDNodeFlags *Flags, bool Reciprocal) {
EVT VT = Arg.getValueType();
SDLoc DL(Arg);
SDValue MinusThree = DAG.getConstantFP(-3.0, DL, VT);
SDValue MinusHalf = DAG.getConstantFP(-0.5, DL, VT);
// This routine must enter the loop below to work correctly
// when (Reciprocal == false).
assert(Iterations > 0);
// Newton iterations for reciprocal square root:
// E = (E * -0.5) * ((A * E) * E + -3.0)
for (unsigned i = 0; i < Iterations; ++i) {
SDValue AE = DAG.getNode(ISD::FMUL, DL, VT, Arg, Est, Flags);
AddToWorklist(AE.getNode());
SDValue AEE = DAG.getNode(ISD::FMUL, DL, VT, AE, Est, Flags);
AddToWorklist(AEE.getNode());
SDValue RHS = DAG.getNode(ISD::FADD, DL, VT, AEE, MinusThree, Flags);
AddToWorklist(RHS.getNode());
// When calculating a square root at the last iteration build:
// S = ((A * E) * -0.5) * ((A * E) * E + -3.0)
// (notice a common subexpression)
SDValue LHS;
if (Reciprocal || (i + 1) < Iterations) {
// RSQRT: LHS = (E * -0.5)
LHS = DAG.getNode(ISD::FMUL, DL, VT, Est, MinusHalf, Flags);
} else {
// SQRT: LHS = (A * E) * -0.5
LHS = DAG.getNode(ISD::FMUL, DL, VT, AE, MinusHalf, Flags);
}
AddToWorklist(LHS.getNode());
Est = DAG.getNode(ISD::FMUL, DL, VT, LHS, RHS, Flags);
AddToWorklist(Est.getNode());
}
return Est;
}
/// Build code to calculate either rsqrt(Op) or sqrt(Op). In the latter case
/// Op*rsqrt(Op) is actually computed, so additional postprocessing is needed if
/// Op can be zero.
SDValue DAGCombiner::buildSqrtEstimateImpl(SDValue Op, SDNodeFlags *Flags,
bool Reciprocal) {
if (Level >= AfterLegalizeDAG)
return SDValue();
// TODO: Handle half and/or extended types?
EVT VT = Op.getValueType();
if (VT.getScalarType() != MVT::f32 && VT.getScalarType() != MVT::f64)
return SDValue();
// If estimates are explicitly disabled for this function, we're done.
MachineFunction &MF = DAG.getMachineFunction();
int Enabled = TLI.getRecipEstimateSqrtEnabled(VT, MF);
if (Enabled == TLI.ReciprocalEstimate::Disabled)
return SDValue();
// Estimates may be explicitly enabled for this type with a custom number of
// refinement steps.
int Iterations = TLI.getSqrtRefinementSteps(VT, MF);
bool UseOneConstNR = false;
if (SDValue Est =
TLI.getSqrtEstimate(Op, DAG, Enabled, Iterations, UseOneConstNR,
Reciprocal)) {
AddToWorklist(Est.getNode());
if (Iterations) {
Est = UseOneConstNR
? buildSqrtNROneConst(Op, Est, Iterations, Flags, Reciprocal)
: buildSqrtNRTwoConst(Op, Est, Iterations, Flags, Reciprocal);
if (!Reciprocal) {
// Unfortunately, Est is now NaN if the input was exactly 0.0.
// Select out this case and force the answer to 0.0.
EVT VT = Op.getValueType();
SDLoc DL(Op);
SDValue FPZero = DAG.getConstantFP(0.0, DL, VT);
EVT CCVT = getSetCCResultType(VT);
SDValue ZeroCmp = DAG.getSetCC(DL, CCVT, Op, FPZero, ISD::SETEQ);
AddToWorklist(ZeroCmp.getNode());
Est = DAG.getNode(VT.isVector() ? ISD::VSELECT : ISD::SELECT, DL, VT,
ZeroCmp, FPZero, Est);
AddToWorklist(Est.getNode());
}
}
return Est;
}
return SDValue();
}
SDValue DAGCombiner::buildRsqrtEstimate(SDValue Op, SDNodeFlags *Flags) {
return buildSqrtEstimateImpl(Op, Flags, true);
}
SDValue DAGCombiner::buildSqrtEstimate(SDValue Op, SDNodeFlags *Flags) {
return buildSqrtEstimateImpl(Op, Flags, false);
}
/// Return true if base is a frame index, which is known not to alias with
/// anything but itself. Provides base object and offset as results.
static bool FindBaseOffset(SDValue Ptr, SDValue &Base, int64_t &Offset,
const GlobalValue *&GV, const void *&CV) {
// Assume it is a primitive operation.
Base = Ptr; Offset = 0; GV = nullptr; CV = nullptr;
// If it's an adding a simple constant then integrate the offset.
if (Base.getOpcode() == ISD::ADD) {
if (ConstantSDNode *C = dyn_cast<ConstantSDNode>(Base.getOperand(1))) {
Base = Base.getOperand(0);
Offset += C->getSExtValue();
}
}
// Return the underlying GlobalValue, and update the Offset. Return false
// for GlobalAddressSDNode since the same GlobalAddress may be represented
// by multiple nodes with different offsets.
if (GlobalAddressSDNode *G = dyn_cast<GlobalAddressSDNode>(Base)) {
GV = G->getGlobal();
Offset += G->getOffset();
return false;
}
// Return the underlying Constant value, and update the Offset. Return false
// for ConstantSDNodes since the same constant pool entry may be represented
// by multiple nodes with different offsets.
if (ConstantPoolSDNode *C = dyn_cast<ConstantPoolSDNode>(Base)) {
CV = C->isMachineConstantPoolEntry() ? (const void *)C->getMachineCPVal()
: (const void *)C->getConstVal();
Offset += C->getOffset();
return false;
}
// If it's any of the following then it can't alias with anything but itself.
return isa<FrameIndexSDNode>(Base);
}
/// Return true if there is any possibility that the two addresses overlap.
bool DAGCombiner::isAlias(LSBaseSDNode *Op0, LSBaseSDNode *Op1) const {
// If they are the same then they must be aliases.
if (Op0->getBasePtr() == Op1->getBasePtr()) return true;
// If they are both volatile then they cannot be reordered.
if (Op0->isVolatile() && Op1->isVolatile()) return true;
// If one operation reads from invariant memory, and the other may store, they
// cannot alias. These should really be checking the equivalent of mayWrite,
// but it only matters for memory nodes other than load /store.
if (Op0->isInvariant() && Op1->writeMem())
return false;
if (Op1->isInvariant() && Op0->writeMem())
return false;
// Gather base node and offset information.
SDValue Base1, Base2;
int64_t Offset1, Offset2;
const GlobalValue *GV1, *GV2;
const void *CV1, *CV2;
bool isFrameIndex1 = FindBaseOffset(Op0->getBasePtr(),
Base1, Offset1, GV1, CV1);
bool isFrameIndex2 = FindBaseOffset(Op1->getBasePtr(),
Base2, Offset2, GV2, CV2);
// If they have a same base address then check to see if they overlap.
if (Base1 == Base2 || (GV1 && (GV1 == GV2)) || (CV1 && (CV1 == CV2)))
return !((Offset1 + (Op0->getMemoryVT().getSizeInBits() >> 3)) <= Offset2 ||
(Offset2 + (Op1->getMemoryVT().getSizeInBits() >> 3)) <= Offset1);
// It is possible for different frame indices to alias each other, mostly
// when tail call optimization reuses return address slots for arguments.
// To catch this case, look up the actual index of frame indices to compute
// the real alias relationship.
if (isFrameIndex1 && isFrameIndex2) {
MachineFrameInfo &MFI = DAG.getMachineFunction().getFrameInfo();
Offset1 += MFI.getObjectOffset(cast<FrameIndexSDNode>(Base1)->getIndex());
Offset2 += MFI.getObjectOffset(cast<FrameIndexSDNode>(Base2)->getIndex());
return !((Offset1 + (Op0->getMemoryVT().getSizeInBits() >> 3)) <= Offset2 ||
(Offset2 + (Op1->getMemoryVT().getSizeInBits() >> 3)) <= Offset1);
}
// Otherwise, if we know what the bases are, and they aren't identical, then
// we know they cannot alias.
if ((isFrameIndex1 || CV1 || GV1) && (isFrameIndex2 || CV2 || GV2))
return false;
// If we know required SrcValue1 and SrcValue2 have relatively large alignment
// compared to the size and offset of the access, we may be able to prove they
// do not alias. This check is conservative for now to catch cases created by
// splitting vector types.
if ((Op0->getOriginalAlignment() == Op1->getOriginalAlignment()) &&
(Op0->getSrcValueOffset() != Op1->getSrcValueOffset()) &&
(Op0->getMemoryVT().getSizeInBits() >> 3 ==
Op1->getMemoryVT().getSizeInBits() >> 3) &&
(Op0->getOriginalAlignment() > (Op0->getMemoryVT().getSizeInBits() >> 3))) {
int64_t OffAlign1 = Op0->getSrcValueOffset() % Op0->getOriginalAlignment();
int64_t OffAlign2 = Op1->getSrcValueOffset() % Op1->getOriginalAlignment();
// There is no overlap between these relatively aligned accesses of similar
// size, return no alias.
if ((OffAlign1 + (Op0->getMemoryVT().getSizeInBits() >> 3)) <= OffAlign2 ||
(OffAlign2 + (Op1->getMemoryVT().getSizeInBits() >> 3)) <= OffAlign1)
return false;
}
bool UseAA = CombinerGlobalAA.getNumOccurrences() > 0
? CombinerGlobalAA
: DAG.getSubtarget().useAA();
#ifndef NDEBUG
if (CombinerAAOnlyFunc.getNumOccurrences() &&
CombinerAAOnlyFunc != DAG.getMachineFunction().getName())
UseAA = false;
#endif
if (UseAA &&
Op0->getMemOperand()->getValue() && Op1->getMemOperand()->getValue()) {
// Use alias analysis information.
int64_t MinOffset = std::min(Op0->getSrcValueOffset(),
Op1->getSrcValueOffset());
int64_t Overlap1 = (Op0->getMemoryVT().getSizeInBits() >> 3) +
Op0->getSrcValueOffset() - MinOffset;
int64_t Overlap2 = (Op1->getMemoryVT().getSizeInBits() >> 3) +
Op1->getSrcValueOffset() - MinOffset;
AliasResult AAResult =
AA.alias(MemoryLocation(Op0->getMemOperand()->getValue(), Overlap1,
UseTBAA ? Op0->getAAInfo() : AAMDNodes()),
MemoryLocation(Op1->getMemOperand()->getValue(), Overlap2,
UseTBAA ? Op1->getAAInfo() : AAMDNodes()));
if (AAResult == NoAlias)
return false;
}
// Otherwise we have to assume they alias.
return true;
}
/// Walk up chain skipping non-aliasing memory nodes,
/// looking for aliasing nodes and adding them to the Aliases vector.
void DAGCombiner::GatherAllAliases(SDNode *N, SDValue OriginalChain,
SmallVectorImpl<SDValue> &Aliases) {
SmallVector<SDValue, 8> Chains; // List of chains to visit.
SmallPtrSet<SDNode *, 16> Visited; // Visited node set.
// Get alias information for node.
bool IsLoad = isa<LoadSDNode>(N) && !cast<LSBaseSDNode>(N)->isVolatile();
// Starting off.
Chains.push_back(OriginalChain);
unsigned Depth = 0;
// Look at each chain and determine if it is an alias. If so, add it to the
// aliases list. If not, then continue up the chain looking for the next
// candidate.
while (!Chains.empty()) {
SDValue Chain = Chains.pop_back_val();
// For TokenFactor nodes, look at each operand and only continue up the
// chain until we reach the depth limit.
//
// FIXME: The depth check could be made to return the last non-aliasing
// chain we found before we hit a tokenfactor rather than the original
// chain.
if (Depth > TLI.getGatherAllAliasesMaxDepth()) {
Aliases.clear();
Aliases.push_back(OriginalChain);
return;
}
// Don't bother if we've been before.
if (!Visited.insert(Chain.getNode()).second)
continue;
switch (Chain.getOpcode()) {
case ISD::EntryToken:
// Entry token is ideal chain operand, but handled in FindBetterChain.
break;
case ISD::LOAD:
case ISD::STORE: {
// Get alias information for Chain.
bool IsOpLoad = isa<LoadSDNode>(Chain.getNode()) &&
!cast<LSBaseSDNode>(Chain.getNode())->isVolatile();
// If chain is alias then stop here.
if (!(IsLoad && IsOpLoad) &&
isAlias(cast<LSBaseSDNode>(N), cast<LSBaseSDNode>(Chain.getNode()))) {
Aliases.push_back(Chain);
} else {
// Look further up the chain.
Chains.push_back(Chain.getOperand(0));
++Depth;
}
break;
}
case ISD::TokenFactor:
// We have to check each of the operands of the token factor for "small"
// token factors, so we queue them up. Adding the operands to the queue
// (stack) in reverse order maintains the original order and increases the
// likelihood that getNode will find a matching token factor (CSE.)
if (Chain.getNumOperands() > 16) {
Aliases.push_back(Chain);
break;
}
for (unsigned n = Chain.getNumOperands(); n;)
Chains.push_back(Chain.getOperand(--n));
++Depth;
break;
case ISD::CopyFromReg:
// Forward past CopyFromReg.
Chains.push_back(Chain.getOperand(0));
++Depth;
break;
default:
// For all other instructions we will just have to take what we can get.
Aliases.push_back(Chain);
break;
}
}
}
/// Walk up chain skipping non-aliasing memory nodes, looking for a better chain
/// (aliasing node.)
SDValue DAGCombiner::FindBetterChain(SDNode *N, SDValue OldChain) {
SmallVector<SDValue, 8> Aliases; // Ops for replacing token factor.
// Accumulate all the aliases to this node.
GatherAllAliases(N, OldChain, Aliases);
// If no operands then chain to entry token.
if (Aliases.size() == 0)
return DAG.getEntryNode();
// If a single operand then chain to it. We don't need to revisit it.
if (Aliases.size() == 1)
return Aliases[0];
// Construct a custom tailored token factor.
return DAG.getNode(ISD::TokenFactor, SDLoc(N), MVT::Other, Aliases);
}
// This function tries to collect a bunch of potentially interesting
// nodes to improve the chains of, all at once. This might seem
// redundant, as this function gets called when visiting every store
// node, so why not let the work be done on each store as it's visited?
//
// I believe this is mainly important because MergeConsecutiveStores
// is unable to deal with merging stores of different sizes, so unless
// we improve the chains of all the potential candidates up-front
// before running MergeConsecutiveStores, it might only see some of
// the nodes that will eventually be candidates, and then not be able
// to go from a partially-merged state to the desired final
// fully-merged state.
bool DAGCombiner::findBetterNeighborChains(StoreSDNode *St) {
// This holds the base pointer, index, and the offset in bytes from the base
// pointer.
BaseIndexOffset BasePtr = BaseIndexOffset::match(St->getBasePtr(), DAG);
// We must have a base and an offset.
if (!BasePtr.Base.getNode())
return false;
// Do not handle stores to undef base pointers.
if (BasePtr.Base.isUndef())
return false;
SmallVector<StoreSDNode *, 8> ChainedStores;
ChainedStores.push_back(St);
// Walk up the chain and look for nodes with offsets from the same
// base pointer. Stop when reaching an instruction with a different kind
// or instruction which has a different base pointer.
StoreSDNode *Index = St;
while (Index) {
// If the chain has more than one use, then we can't reorder the mem ops.
if (Index != St && !SDValue(Index, 0)->hasOneUse())
break;
if (Index->isVolatile() || Index->isIndexed())
break;
// Find the base pointer and offset for this memory node.
BaseIndexOffset Ptr = BaseIndexOffset::match(Index->getBasePtr(), DAG);
// Check that the base pointer is the same as the original one.
if (!Ptr.equalBaseIndex(BasePtr))
break;
// Walk up the chain to find the next store node, ignoring any
// intermediate loads. Any other kind of node will halt the loop.
SDNode *NextInChain = Index->getChain().getNode();
while (true) {
if (StoreSDNode *STn = dyn_cast<StoreSDNode>(NextInChain)) {
// We found a store node. Use it for the next iteration.
if (STn->isVolatile() || STn->isIndexed()) {
Index = nullptr;
break;
}
ChainedStores.push_back(STn);
Index = STn;
break;
} else if (LoadSDNode *Ldn = dyn_cast<LoadSDNode>(NextInChain)) {
NextInChain = Ldn->getChain().getNode();
continue;
} else {
Index = nullptr;
break;
}
} // end while
}
// At this point, ChainedStores lists all of the Store nodes
// reachable by iterating up through chain nodes matching the above
// conditions. For each such store identified, try to find an
// earlier chain to attach the store to which won't violate the
// required ordering.
bool MadeChangeToSt = false;
SmallVector<std::pair<StoreSDNode *, SDValue>, 8> BetterChains;
for (StoreSDNode *ChainedStore : ChainedStores) {
SDValue Chain = ChainedStore->getChain();
SDValue BetterChain = FindBetterChain(ChainedStore, Chain);
if (Chain != BetterChain) {
if (ChainedStore == St)
MadeChangeToSt = true;
BetterChains.push_back(std::make_pair(ChainedStore, BetterChain));
}
}
// Do all replacements after finding the replacements to make to avoid making
// the chains more complicated by introducing new TokenFactors.
for (auto Replacement : BetterChains)
replaceStoreChain(Replacement.first, Replacement.second);
return MadeChangeToSt;
}
/// This is the entry point for the file.
void SelectionDAG::Combine(CombineLevel Level, AliasAnalysis &AA,
CodeGenOpt::Level OptLevel) {
/// This is the main entry point to this class.
DAGCombiner(*this, AA, OptLevel).Run(Level);
}
| [
"frankyroeder@web.de"
] | frankyroeder@web.de |
c772f9050abb1517fbf04b037f440bda8996799b | 43b3dfe24ccd0f33878cb2bf630a9c8e4aecea66 | /level1/p07_encrypt_decrypt/encrypt_decrypt/main.cpp | 8690973b5519e2079f7a7bc3c0e72f4b763dd4fa | [
"MIT"
] | permissive | yanrui20/c2020-1 | 3c7f5286b5e42dc4a47245577f1d21d3778eb3e8 | 6f108b1b6a981ac9b12a9422f611f20fd45f7901 | refs/heads/master | 2021-01-16T05:10:41.193697 | 2020-03-18T15:34:10 | 2020-03-18T15:34:10 | 242,986,667 | 1 | 0 | MIT | 2020-02-25T11:46:28 | 2020-02-25T11:46:27 | null | GB18030 | C++ | false | false | 838 | cpp | #include <stdio.h>
#include "encrypt_decrypt.h"
int main(int argc, char* argv[])
{
int choice = -1;
// 循环 + 菜单
while (choice)
{
printf("程序菜单:\n");
printf("1)加密\n");
printf("2)解密\n");
printf("※其他输入将退出程序\n");
printf("请输入您的选择:");
if (scanf_s("%d", &choice) == 1)
{
//解决多余输入
while (getchar() != '\n')
continue;
switch (choice)
{
case 1: // 加密
encrypt();
break;
case 2: // 解密
decrypt();
break;
default: // 退出程序
choice = 0;
break;
}
}
else
choice = 0; // 用于退出程序
}
printf("感谢您的使用,再见!\n");
printf("※输入回车退出窗口\n");
while (getchar() != '\n')
continue;
return 0;
} | [
"1657066071@qq.com"
] | 1657066071@qq.com |
a01111c3c75894761dceb209aff765f568dc0eb1 | 12f72860c03aae2895ad9cadfc760a71843afea6 | /2013/software/src/sensors/camera3D/StereoSource.hpp | 760867be4d2b47ad50dabdb8d935b236fdb276a2 | [] | no_license | bennuttle/igvc-software | 01af6034ab8cac8108edda0ce7b2b314d87aa39f | f8e42d020e92d23d12bccd9ed40537d220e2108f | refs/heads/master | 2021-01-17T13:59:38.769914 | 2014-02-26T18:01:15 | 2014-02-26T18:01:15 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 856 | hpp | #ifndef STEREOSOURCE_H
#define STEREOSOURCE_H
#include "sensors/camera3D/StereoPair.hpp"
#include "sensors/DataStructures/StereoImageData.hpp"
#include "events/Event.hpp"
#include <boost/thread/thread.hpp>
class StereoSource
{
public:
StereoSource() : _running(true) {}
inline bool Running() {return _running;}
inline void Running(bool newState) {_running = newState;}
inline void LockImages() {_imagesLock.lock();}
inline void UnlockImages() {_imagesLock.unlock();}
inline void LockRunning() {_runningLock.lock();}
inline void UnlockRunning() {_runningLock.unlock();}
Event<StereoImageData> onNewData;
virtual ~StereoSource() {}
private:
bool _running;
boost::mutex _runningLock;
boost::mutex _imagesLock;
};
#endif // STEREOSOURCE_H
| [
"alexander.trimm@gmail.com"
] | alexander.trimm@gmail.com |
39caad74672d16f08df0c68d95c48bcbd89885df | 55a565712300b73fa4cce94bdf4d275cbf7802af | /SEI/recapitulare/lab4/timers/timers/timersDlg.h | 53359218bc692f64850331295a110e667f38e127 | [] | no_license | scorpionipx/ETTIM1 | 18effb605c1f957ed43012db051a4e3d8c633aec | ff1348a0581b49e48ca034849f5cc738f5aa2839 | refs/heads/master | 2020-03-30T12:57:16.890238 | 2019-07-15T11:21:00 | 2019-07-15T11:21:00 | 151,249,532 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 766 | h | // timersDlg.h : header file
//
#pragma once
#include "afxwin.h"
// CtimersDlg dialog
class CtimersDlg : public CDialog
{
// Construction
public:
CtimersDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
enum { IDD = IDD_TIMERS_DIALOG };
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
// Implementation
protected:
HICON m_hIcon;
// Generated message map functions
virtual BOOL OnInitDialog();
#if defined(_DEVICE_RESOLUTION_AWARE) && !defined(WIN32_PLATFORM_WFSP)
afx_msg void OnSize(UINT /*nType*/, int /*cx*/, int /*cy*/);
#endif
DECLARE_MESSAGE_MAP()
public:
CEdit tb1;
CEdit tb2;
afx_msg void OnBnClickedButton1();
afx_msg void OnBnClickedButton2();
afx_msg void OnTimer(UINT_PTR nIDEvent);
};
| [
"scorpionipx@gmail.com"
] | scorpionipx@gmail.com |
33f50f9c543a87bb1e97de48f6d63988be04f4d5 | df1e5024eb33f5526e4495022539b7d87a2a234a | /jian/test.hpp | 2694f0975265e3f14893e0e746f7921a86afd247 | [] | no_license | hust220/jian | 696e19411eca694892326be8e741caf4b8aedbf8 | 0e6f484d44b4c31ab98317b69883510296c20edb | refs/heads/master | 2021-01-11T20:26:49.089144 | 2017-04-17T06:45:04 | 2017-04-17T06:45:04 | 79,116,594 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 44 | hpp | #pragma once
#include "test/UnitTest.hpp"
| [
"wj_hust08@hust.edu.cn"
] | wj_hust08@hust.edu.cn |
e15b6ff53ea4cb0c5617820374ad166457c67d5a | 877e454863f0b8ec8b25f472856e06b28d9683e0 | /c2c/Builder/C2ModuleLoader.h | 8298cd42aff3ad645eb9d01810208749b643fdd9 | [] | no_license | jtp6052/c2compiler | d1fc502132e89536a12e02bdf2cafe8336d964e8 | 7c012b84a849900a62a72f5b8c5443e130c888c3 | refs/heads/master | 2021-01-18T10:30:08.739835 | 2015-05-03T08:49:46 | 2015-05-03T08:49:46 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 816 | h | /* Copyright 2013,2014,2015 Bas van den Berg
*
* 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.
*/
#ifndef BUILDER_C2MODULE_LOADER_H
#define BUILDER_C2MODULE_LOADER_H
#include <string>
namespace C2 {
class Module;
class C2ModuleLoader {
public:
Module* load(const std::string& name);
};
}
#endif
| [
"b.van.den.berg.nl@gmail.com"
] | b.van.den.berg.nl@gmail.com |
ce2c9346a2dae1fdd4af1705e41ac8e940087d83 | a5659d7e45eb0ca27b29f120d31a48d9c0d06613 | /starlab/core/plugins/gui_decorate/gui_decorate.h | 26f69f73af94574c3924c0ae8830893587ba7dc4 | [] | no_license | debayan/FAT | 9eaa64c8fcb6feb40b3fc0f2bcfa6dfbe6b0b567 | f986b9fd5d2becd635f2e137a016f68fab5968f2 | refs/heads/master | 2021-01-18T15:30:59.269163 | 2017-08-15T13:43:23 | 2017-08-15T13:43:23 | 100,380,880 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 660 | h | #pragma once
#include <QToolBar>
#include "StarlabMainWindow.h"
#include "interfaces/GuiPlugin.h"
#include "interfaces/RenderPlugin.h"
#include "interfaces/DecoratePlugin.h"
class gui_decorate : public GuiPlugin{
Q_OBJECT
Q_INTERFACES(GuiPlugin)
/// @{ Load/Update
public:
void load();
void update();
private:
QActionGroup* decoratorGroup;
/// @}
/// @{ Decorate Logic
private:
QToolBar* toolbar(){ return mainWindow()->decorateToolbar; }
QMenu* menu(){ return mainWindow()->decorateMenu; }
public slots:
void toggleDecorator(QAction* );
/// @}
};
| [
"debayanin@gmail.com"
] | debayanin@gmail.com |
b1479c7d603d3575f0ce0e82de431cf475fcc7f2 | e0bfa24bacce73eeb68673f26bd152b7963ef855 | /workspace1/ABC過去問/ABC169/A.cpp | 5160224546791fe1cc2026ebe5ac257574127d2a | [] | no_license | kenji132/Competitive-Programming | 52b1147d5e846000355cd7ee4805fad639e186d5 | 89c0336139dae002a3187fa372fda7652fd466cb | refs/heads/master | 2023-04-25T08:29:04.657607 | 2021-05-12T09:35:20 | 2021-05-12T09:35:20 | 314,996,525 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 149 | cpp | #include <bits/stdc++.h>
using namespace std;
int main(){
int a,b,ans;
cin >> a >> b;
ans = a*b;
cout << ans << endl;
return 0;
} | [
"ue52483@gmail.com"
] | ue52483@gmail.com |
60d7d3eb27c6fbbd4e60834340ee957609e0ba9a | 04b9831df2d2d0e6d34556cc4e3426d1c1e25346 | /razerz_v0.00.1/source/modualz/milieu/partical_env.cpp | a1850741e6a6a54a0d902bbef4cc9310e6454959 | [] | no_license | zeplaz/razerz_backup | 50f167a169a49701372676ed5a0aa78d933de427 | f30567f2d5fbb83dac5a4da297c5e0cc23d5623f | refs/heads/master | 2022-04-13T09:44:58.998155 | 2020-04-01T06:48:02 | 2020-04-01T06:48:02 | 231,964,105 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 5,533 | cpp | #include "partical_env.hpp"
long comput_partic_sim::frame_count =0;
void compute_partic_attracto::init()
{
glGenVertexArrays(1, &render_vao);
glBindVertexArray(render_vao);
set_uniform_loc();
//
//glGenBuffers(1, &orgin_ID);
//glBindBuffer(GL_UNIFORM_BUFFER, orgin_ID);
//glBufferData(GL_UNIFORM_BUFFER,sizeof(glm::vec4), glm::value_ptr(orgin), GL_STATIC_COPY);
//glBindBufferBase(GL_UNIFORM_BUFFER, PARTCL_UNI_BIDN_INDX, orgin_ID);
glGenBuffers(2,p_buffz);
glBindBuffer(GL_ARRAY_BUFFER,position_buffer);
glBufferData(GL_ARRAY_BUFFER, PARTICLE_COUNT * sizeof(glm::vec4), NULL, GL_DYNAMIC_COPY);
glm::vec4* positions = (glm::vec4*)glMapBufferRange(GL_ARRAY_BUFFER,
0,
PARTICLE_COUNT * sizeof(glm::vec4),
GL_MAP_WRITE_BIT | GL_MAP_INVALIDATE_BUFFER_BIT);
for(int i = 0; i<PARTICLE_COUNT; i++)
{
positions[i] = orgin+ glm::vec4(random_vector(-10.0f, 10.0f), random_float());
}
glUnmapBuffer(GL_ARRAY_BUFFER);
glVertexAttribPointer(VERTEX_BINDER, 4, GL_FLOAT, GL_FALSE, 0, NULL);
glEnableVertexAttribArray(VERTEX_BINDER);
glBindBuffer(GL_ARRAY_BUFFER, velocity_buffer);
glBufferData(GL_ARRAY_BUFFER, PARTICLE_COUNT * sizeof(glm::vec4), NULL, GL_DYNAMIC_COPY);
glm::vec4 * velocities = (glm::vec4 *)glMapBufferRange(GL_ARRAY_BUFFER,
0,
PARTICLE_COUNT * sizeof(glm::vec4),
GL_MAP_WRITE_BIT | GL_MAP_INVALIDATE_BUFFER_BIT);
for (int i = 0; i < PARTICLE_COUNT; i++)
{
velocities[i] = glm::vec4(random_vector(-0.1f, 0.1f), 0.0f);
}
glUnmapBuffer(GL_ARRAY_BUFFER);
glGenTextures(2, tbos);
for (int i = 0; i < 2; i++)
{
glBindTexture(GL_TEXTURE_BUFFER, tbos[i]);
glTexBuffer(GL_TEXTURE_BUFFER, GL_RGBA32F, p_buffz[i]);
}
glGenBuffers(1, &attractor_buffer);
glBindBuffer(GL_UNIFORM_BUFFER, attractor_buffer);
glBufferData(GL_UNIFORM_BUFFER, MAX_ATTRACTORS * sizeof(glm::vec4), NULL, GL_DYNAMIC_COPY);
for (int i = 0; i < MAX_ATTRACTORS; i++)
{
attractor_masses[i] = 0.5f + random_float() * 1.5f;
}
glBindBufferBase(GL_UNIFORM_BUFFER, PARTCL_UNI_BIDN_INDX, attractor_buffer);
}
void compute_partic_attracto::partical_dispaly()
{
start_ticks = static_cast<GLuint>(tick_current_return())-100000;
current_time = static_cast<GLuint>(tick_current_return());
time = ((start_ticks - current_time) & 0xFFFFF) / float(0xFFFFF);
delta_time = (float)(current_time - last_ticks) * 0.075;
std::cout<<"\n TIMEDISPLAYZVALZ" << "start:" <<start_ticks << " current:" <<current_time << " last:" <<last_ticks <<'\n'
<< "time::"<<time << " delta_time::" << delta_time << '\n';
if (delta_time < 0.01f)
{
return;
}
//glBindBuffer(GL_UNIFORM_BUFFER, attractor_buffer);
glm::vec4 * attractors = (glm::vec4 *)glMapBufferRange(GL_UNIFORM_BUFFER,
0,
MAX_ATTRACTORS * sizeof(glm::vec4),
GL_MAP_WRITE_BIT | GL_MAP_INVALIDATE_BUFFER_BIT);
for(int i = 0; i<MAX_ATTRACTORS;i++)
{
attractors[i] = glm::vec4(sinf(time * (float)(i + 4) * 7.5f * 20.0f) * 50.0f,
cosf(time * (float)(i + 7) * 3.9f * 20.0f) * 50.0f,
sinf(time * (float)(i + 3) * 5.3f * 20.0f) * cosf(time * (float)(i + 5) * 9.1f) * 100.0f,
attractor_masses[i]);
/*std::cout << "\n attractornum:" << i << "\n mass:"<< attractor_masses[i] << '\n'
<< attractors[i].x << '\n'
<< attractors[i].y << '\n'
<< attractors[i].z << '\n'
<< attractors[i].w << '\n' ;*/
/*attractors[i] = glm::vec4(sinf(time * (float)(i + 2) * 4.5f * 10.0f) * 30.0f,
cosf(time * (float)(i + 2) * 3.9f * 10.0f) * 30.0f,
sinf(time * (float)(i + 3) * 4.3f * 10.0f) * cosf(time * (float)(i + 4) * 6.1f) * 70.0f,
attractor_masses[i]);*/
}
glUnmapBuffer(GL_UNIFORM_BUFFER);
if (delta_time >= 2.0f)
{
delta_time = 2.0f;
}
std::cout << "deltatime:" << delta_time <<'\n';
glUseProgram(comput_prog_ID);
glBindImageTexture(PARTCL_U_VELOC_INDEX, velocity_tbo, 0, GL_FALSE, 0, GL_READ_WRITE, GL_RGBA32F);
glBindImageTexture(PARTCL_U_POS_INDEX, position_tbo, 0, GL_FALSE, 0, GL_READ_WRITE, GL_RGBA32F);
// Set delta time
glUniform1f(dt_location, delta_time);
glUniform4fv(orgin_loc, 1,glm::value_ptr(orgin));
// Dispatch
glDispatchCompute(PARTICLE_GROUP_COUNT, 1, 1);
glMemoryBarrier(GL_SHADER_IMAGE_ACCESS_BARRIER_BIT);
glm::mat4 mvp = glm::perspective(45.0f, active_lenz->aspect_ratio_cal(), 0.1f, 1000.0f) *
glm::translate(glm::mat4(1.f), glm::vec3(0.0f, 0.0f, -160.0f)) *
glm::rotate(glm::mat4(1.f),time * 1000.0f, glm::vec3(0.0f, 1.0f, 0.0f));
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glDisable(GL_DEPTH_TEST);
glUseProgram(render_prog_ID);
glUniformMatrix4fv(0, 1, GL_FALSE, glm::value_ptr(mvp));
glBindVertexArray(render_vao);
glEnable(GL_BLEND);
glBlendFunc(GL_ONE, GL_ONE);
glDrawArrays(GL_POINTS, 0, PARTICLE_COUNT);
last_ticks = current_time;
}
| [
"life.in.the.vivid.dream@gmail.com"
] | life.in.the.vivid.dream@gmail.com |
f51e1c30bf25999263f8ebdde857c058d67bb69f | 0eff74b05b60098333ad66cf801bdd93becc9ea4 | /second/download/curl/gumtree/curl_repos_function_768_curl-7.41.0.cpp | dea17d6877dc420d4c5c9022265db5e6417b20dc | [] | no_license | niuxu18/logTracker-old | 97543445ea7e414ed40bdc681239365d33418975 | f2b060f13a0295387fe02187543db124916eb446 | refs/heads/master | 2021-09-13T21:39:37.686481 | 2017-12-11T03:36:34 | 2017-12-11T03:36:34 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 290 | cpp | ParameterError str2double(double *val, const char *str)
{
if(str) {
char *endptr;
double num = strtod(str, &endptr);
if((endptr != str) && (endptr == str + strlen(str))) {
*val = num;
return PARAM_OK; /* Ok */
}
}
return PARAM_BAD_NUMERIC; /* badness */
} | [
"993273596@qq.com"
] | 993273596@qq.com |
60e948562e9dfa8b11052231db2ee52982da881a | 303b48eb9354338542e0a4ca68df1978dd8d038b | /include/fox/FXDVec.h | d5f5ca3c3cd9c41a471e629458a0f9c1aada6401 | [
"BSD-3-Clause"
] | permissive | ldematte/beppe | fa98a212bbe4a27c5d63defaf386898a48d72deb | 53369e0635d37d2dc58aa0b6317e664b3cf67547 | refs/heads/master | 2020-06-04T00:05:39.688233 | 2013-01-06T16:37:03 | 2013-01-06T16:37:03 | 7,469,184 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 5,389 | h | /********************************************************************************
* *
* D o u b l e - V e c t o r O p e r a t i o n s *
* *
*********************************************************************************
* Copyright (C) 1994,2002 by Jeroen van der Zijp. All Rights Reserved. *
*********************************************************************************
* This library 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 2.1 of the License, or (at your option) any later version. *
* *
* This library 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 *
* Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public *
* License along with this library; if not, write to the Free Software *
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
*********************************************************************************
* $Id: FXDVec.h,v 1.7 2002/01/18 22:42:52 jeroen Exp $ *
********************************************************************************/
#ifndef FXDVEC_H
#define FXDVEC_H
/// Double-precision vector class
class FXAPI FXDVec {
protected:
FXdouble v[3];
public:
/// Default constructor
FXDVec(){}
/// Copy constructor
FXDVec(const FXDVec& w){v[0]=w.v[0];v[1]=w.v[1];v[2]=w.v[2];}
/// Initialize with components
FXDVec(FXdouble x,FXdouble y,FXdouble z){v[0]=x;v[1]=y;v[2]=z;}
/// Initialize with color
FXDVec(FXColor color);
/// Return a non-const reference to the ith element
FXdouble& operator[](FXint i){return v[i];}
/// Return a const reference to the ith element
const FXdouble& operator[](FXint i) const {return v[i];}
/// Assign color
FXDVec& operator=(FXColor color);
/// Assignment
FXDVec& operator=(const FXDVec& w){v[0]=w.v[0];v[1]=w.v[1];v[2]=w.v[2];return *this;}
/// Assigning operators
FXDVec& operator+=(const FXDVec& a){v[0]+=a.v[0];v[1]+=a.v[1];v[2]+=a.v[2];return *this;}
FXDVec& operator-=(const FXDVec& a){v[0]-=a.v[0];v[1]-=a.v[1];v[2]-=a.v[2];return *this;}
FXDVec& operator*=(FXdouble n){v[0]*=n;v[1]*=n;v[2]*=n;return *this;}
FXDVec& operator/=(FXdouble n){v[0]/=n;v[1]/=n;v[2]/=n;return *this;}
/// Conversions
operator FXdouble*(){return v;}
operator const FXdouble*() const {return v;}
/// Convert to color
operator FXColor() const;
/// Other operators
friend FXDVec operator-(const FXDVec& a){return FXDVec(-a.v[0],-a.v[1],-a.v[2]);}
friend FXDVec operator!(const FXDVec& a){return a.v[0]==0.0 && a.v[1]==0.0 && a.v[2]==0.0;}
friend FXDVec operator+(const FXDVec& a,const FXDVec& b){return FXDVec(a.v[0]+b.v[0],a.v[1]+b.v[1],a.v[2]+b.v[2]);}
friend FXDVec operator-(const FXDVec& a,const FXDVec& b){return FXDVec(a.v[0]-b.v[0],a.v[1]-b.v[1],a.v[2]-b.v[2]);}
friend FXDVec operator*(const FXDVec& a,FXdouble n){return FXDVec(a.v[0]*n,a.v[1]*n,a.v[2]*n);}
friend FXDVec operator*(FXdouble n,const FXDVec& a){return FXDVec(n*a.v[0],n*a.v[1],n*a.v[2]);}
friend FXDVec operator/(const FXDVec& a,FXdouble n){return FXDVec(a.v[0]/n,a.v[1]/n,a.v[2]/n);}
friend FXDVec operator/(FXdouble n,const FXDVec& a){return FXDVec(n/a.v[0],n/a.v[1],n/a.v[2]);}
/// Dot and cross products
friend FXdouble operator*(const FXDVec& a,const FXDVec& b){return a.v[0]*b.v[0]+a.v[1]*b.v[1]+a.v[2]*b.v[2];}
friend FXDVec operator^(const FXDVec& a,const FXDVec& b){return FXDVec(a.v[1]*b.v[2]-a.v[2]*b.v[1], a.v[2]*b.v[0]-a.v[0]*b.v[2], a.v[0]*b.v[1]-a.v[1]*b.v[0]);}
/// Equality tests
friend int operator==(const FXDVec& a,const FXDVec& b){return a.v[0]==b.v[0] && a.v[1]==b.v[1] && a.v[2]==b.v[2];}
friend int operator==(const FXDVec& a,FXdouble n){return a.v[0]==n && a.v[1]==n && a.v[2]==n;}
friend int operator==(FXdouble n,const FXDVec& a){return n==a.v[0] && n==a.v[1] && n==a.v[2];}
friend int operator!=(const FXDVec& a,const FXDVec& b){return a.v[0]!=b.v[0] || a.v[1]!=b.v[1] || a.v[2]!=b.v[2];}
friend int operator!=(const FXDVec& a,FXdouble n){return a.v[0]!=n || a.v[1]!=n || a.v[2]!=n;}
friend int operator!=(FXdouble n,const FXDVec& a){return n!=a.v[0] || n!=a.v[1] || n!=a.v[2];}
/// Other functions
friend FXAPI FXdouble len(const FXDVec& a);
friend FXAPI FXDVec normalize(const FXDVec& a);
friend FXAPI FXDVec lo(const FXDVec& a,const FXDVec& b);
friend FXAPI FXDVec hi(const FXDVec& a,const FXDVec& b);
/// Save to a stream
friend FXAPI FXStream& operator<<(FXStream& store,const FXDVec& v);
/// Load from a stream
friend FXAPI FXStream& operator>>(FXStream& store,FXDVec& v);
};
#endif
| [
"lorenzo.dematte@gmail.com"
] | lorenzo.dematte@gmail.com |
5b6ca9d55259526271d3717381d147f60d9dc239 | 80a53fe88d258b48fcf94f4f1b16edcbdb091e1f | /TP2018/TP2018/T3/Z5/main.cpp | 8b9dcf168ee80b6f397532a1444179bf17bf1e4c | [] | no_license | MedinaKapo/Programming-tecniques | 1170d524bc96600c8bd2ab366bd7778ff3b79396 | 719f56eeeaf8d47b63f52d5e76297c895d7efe78 | refs/heads/main | 2023-05-06T14:55:40.015843 | 2021-06-01T08:58:03 | 2021-06-01T08:58:03 | 372,763,866 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,234 | cpp | //TP 2017/2018: Tutorijal 3, Zadatak 5
#include <iostream>
#include<deque>
using namespace std;
int Suma(int n)
{
int sum=0;
while(n!=0) {
sum+=n%10;
n/=10;
}
return sum;
}
deque<int>IzdvojiElemente(deque<int>d,bool vrijednost)
{
deque<int> vracam;
if(vrijednost==true) {
for(int i=d.size()-1; i>=0; i--) {
if(Suma(d.at(i))%2==0)vracam.push_front(d.at(i));
}
} else {
for(int i=d.size()-1; i>=0; i--) {
if(Suma(d.at(i))%2!=0)vracam.push_front(d.at(i));
}
}
return vracam;
}
int main ()
{
int br,n;
cout<<"Koliko zelite unijeti elemenata: ";
cin>>n;
if(n<=0) {
cout<<"Broj elemenata mora biti veci od 0!"<<endl;
return 0;
}
cout<<"Unesite elemente: ";
deque<int>a;
for(int i=0; i<n; i++) {
cin>>br;
a.push_back(br);
}
deque<int>b;
deque<int>c;
b=IzdvojiElemente(a,true);
c=IzdvojiElemente(a,false);
for(int i=0; i<b.size(); i++) {
if(i>0 && i<b.size())cout<<",";
cout<<b.at(i);
}
cout<<endl;
for(int i=0; i<c.size(); i++) {
if(i>0 && i<c.size())cout<<",";
cout<<c.at(i);
}
return 0;
}
| [
"mkapo2@etf.unsa.ba"
] | mkapo2@etf.unsa.ba |
1ab8431b665fb21edb4324a9093c69c7049ece3d | 8edde9d2e5cea812b4b3db859d2202d0a65cb800 | /Engine/Graphics/GrUTCompress.cpp | 1ead775b05360f91d775fa9a83c1a9a0ed14a5bc | [
"MIT"
] | permissive | shawwn/bootstrap | 751cb00175933f91a2e5695d99373fca46a0778e | 39742d2a4b7d1ab0444d9129152252dfcfb4d41b | refs/heads/master | 2023-04-09T20:41:05.034596 | 2023-03-28T17:43:50 | 2023-03-28T17:43:50 | 130,915,922 | 0 | 0 | null | null | null | null | WINDOWS-1252 | C++ | false | false | 55,040 | cpp | //----------------------------------------------------------
// File: GrUTCompress.cpp
// Author: Kevin Bray
// Created: 11-17-08
//
// Purpose: To provide compression services for the ubertexture
// worker thread.
//
// Copyright © 2004 Bootstrap Studios. All rights reserved.
//----------------------------------------------------------
#include "graphics_afx.h"
// class header.
#include "GrUTCompress.h"
// project includes.
#include "UHuffman.h"
#ifdef _DEBUG
bool gLibInit = false;
#define UT_CMP_INIT() gLibInit = true;
#define UT_CMP_CHECK_INIT() B_ASSERT( gLibInit );
#else
#define UT_CMP_INIT()
#define UT_CMP_CHECK_INIT()
#endif
// forward declarations.
void ExtractBlockBGRA( unsigned char* bgra, const unsigned char* bgraSource, unsigned int srcWidth,
unsigned int srcX, unsigned int srcY );
void ExtractBlockA( short* v, const unsigned char* vSource, unsigned int bytesPerPel,
unsigned int srcWidth, unsigned int srcX, unsigned int srcY );
void InsertBlockBGRA( unsigned char* bgraDest, unsigned int dstWidth, unsigned int dstX,
unsigned int dstY, unsigned char* bgra );
void InsertBlockA( unsigned char* vDest, unsigned int bytesPerPel, unsigned int dstWidth,
unsigned int dstX, unsigned int dstY, short* v );
void EncodeBlock( UHuffman* encoder, const short* src, const unsigned short* quant,
unsigned char chop );
void DecodeBlock( short* dest, UHuffman* decoder, const unsigned short* quant );
void UnpackYCoCg( unsigned char* bgra, const short* Y, const short* Co, const short* Cg );
void PackYCoCg( short* Y, short* Co, short* Cg, const unsigned char* bgra );
void ForwardDCT( short* dest, const short* coeff, const unsigned short* quant );
void InverseDCT( short* dest, const short* coeff, const unsigned short* quant );
void BuildDXTTables();
void CompressImageDXT1( const unsigned char* argb, unsigned char* dxt1, int width, int height );
void CompressImageDXT5(const unsigned char* argb, BYTE* dxt5, int width, int height);
//==========================================================
// DCT compression tables.
//==========================================================
//----------------------------------------------------------
// quantization table for Y.
static DECLARE_ALIGNED_16( unsigned short, kQuantY[ 64 ] ) =
{
// 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
// 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
5, 11, 10, 16, 28, 68, 80, 80,
12, 12, 14, 18, 32, 73, 90, 110,
14, 13, 16, 30, 51, 87, 138, 112,
14, 17, 28, 36, 80, 174, 160, 124,
18, 28, 47, 88, 136, 255, 206, 154,
30, 42, 86, 128, 162, 208, 226, 184,
60, 128, 156, 174, 206, 241, 240, 202,
144, 184, 190, 196, 224, 200, 206, 198,
};
//----------------------------------------------------------
// quantization table for Co.
static DECLARE_ALIGNED_16( unsigned short, kQuantCo[ 64 ] ) =
{
// 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
// 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
18, 20, 24, 32, 34, 38, 41, 50,
20, 30, 32, 40, 42, 50, 52, 58,
24, 32, 40, 45, 48, 52, 56, 60,
32, 40, 45, 56, 64, 70, 88, 102,
34, 42, 48, 64, 78, 92, 110, 120,
38, 50, 52, 70, 92, 120, 128, 160,
41, 52, 56, 88, 110, 128, 220, 190,
50, 58, 60, 102, 120, 160, 190, 190,
};
//----------------------------------------------------------
// quantization table for Cg.
static DECLARE_ALIGNED_16( unsigned short, kQuantCg[ 64 ] ) =
{
// 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
// 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
18, 20, 24, 32, 34, 38, 41, 50,
20, 30, 32, 40, 42, 50, 52, 58,
24, 32, 40, 45, 48, 52, 56, 60,
32, 40, 45, 56, 64, 70, 88, 102,
34, 42, 48, 64, 78, 92, 110, 120,
38, 50, 52, 70, 92, 120, 128, 160,
41, 52, 56, 88, 110, 128, 220, 190,
50, 58, 60, 102, 120, 160, 190, 190,
};
//----------------------------------------------------------
// quantization table for XY tangent space normal maps.
static DECLARE_ALIGNED_16( unsigned short, kQuantXY[ 64 ] ) =
{
8, 9, 11, 13, 16, 21, 24, 27,
9, 9, 12, 15, 18, 22, 24, 29,
11, 12, 15, 19, 22, 25, 28, 32,
13, 15, 19, 24, 27, 30, 34, 37,
16, 18, 22, 27, 34, 39, 41, 46,
21, 22, 25, 30, 39, 48, 59, 74,
24, 24, 28, 34, 41, 59, 81, 109,
27, 29, 32, 37, 46, 74, 109, 160,
};
//----------------------------------------------------------
// matrix block swizzle pattern 0.
static DECLARE_ALIGNED_16( const unsigned int, kDCTBlockSwizzle0[ 64 ] ) =
{
0,
1, 8,
16, 9, 2,
3, 10, 17, 24,
32, 25, 18, 11, 4,
5, 12, 19, 26, 33, 40,
48, 41, 34, 27, 20, 13, 6,
7, 14, 21, 28, 35, 42, 49, 56,
57, 50, 43, 36, 29, 22, 15,
23, 30, 37, 44, 51, 58,
59, 52, 45, 38, 31,
39, 46, 53, 60,
61, 54, 47,
55, 62,
63,
};
#define ONE_OVER_SQRT2 ( 0.5f / Sqrt( 2.0f ) )
#define DCT_COS( i ) ( 0.5f * Cos( i * PI / 16.0f ) )
//----------------------------------------------------------
// the DCT matrix.
static DECLARE_ALIGNED_16( const float, kDCTMatrix[ 64 ] ) =
{
ONE_OVER_SQRT2, ONE_OVER_SQRT2, ONE_OVER_SQRT2, ONE_OVER_SQRT2, ONE_OVER_SQRT2, ONE_OVER_SQRT2, ONE_OVER_SQRT2, ONE_OVER_SQRT2,
DCT_COS( 1 ), DCT_COS( 3 ), DCT_COS( 5 ), DCT_COS( 7 ), DCT_COS( 9 ), DCT_COS( 11 ), DCT_COS( 13 ), DCT_COS( 15 ),
DCT_COS( 2 ), DCT_COS( 6 ), DCT_COS( 10 ), DCT_COS( 14 ), DCT_COS( 18 ), DCT_COS( 22 ), DCT_COS( 26 ), DCT_COS( 30 ),
DCT_COS( 3 ), DCT_COS( 9 ), DCT_COS( 15 ), DCT_COS( 21 ), DCT_COS( 27 ), DCT_COS( 33 ), DCT_COS( 39 ), DCT_COS( 45 ),
DCT_COS( 4 ), DCT_COS( 12 ), DCT_COS( 20 ), DCT_COS( 28 ), DCT_COS( 36 ), DCT_COS( 44 ), DCT_COS( 52 ), DCT_COS( 60 ),
DCT_COS( 5 ), DCT_COS( 15 ), DCT_COS( 25 ), DCT_COS( 35 ), DCT_COS( 45 ), DCT_COS( 55 ), DCT_COS( 65 ), DCT_COS( 75 ),
DCT_COS( 6 ), DCT_COS( 18 ), DCT_COS( 30 ), DCT_COS( 42 ), DCT_COS( 54 ), DCT_COS( 66 ), DCT_COS( 78 ), DCT_COS( 90 ),
DCT_COS( 7 ), DCT_COS( 21 ), DCT_COS( 35 ), DCT_COS( 49 ), DCT_COS( 63 ), DCT_COS( 77 ), DCT_COS( 91 ), DCT_COS( 105 ),
};
//----------------------------------------------------------
// the transposed DCT matrix.
static DECLARE_ALIGNED_16( const float, kDCTMatrixT[ 64 ] ) =
{
ONE_OVER_SQRT2, DCT_COS( 1 ), DCT_COS( 2 ), DCT_COS( 3 ), DCT_COS( 4 ), DCT_COS( 5 ), DCT_COS( 6 ), DCT_COS( 7 ),
ONE_OVER_SQRT2, DCT_COS( 3 ), DCT_COS( 6 ), DCT_COS( 9 ), DCT_COS( 12 ), DCT_COS( 15 ), DCT_COS( 18 ), DCT_COS( 21 ),
ONE_OVER_SQRT2, DCT_COS( 5 ), DCT_COS( 10 ), DCT_COS( 15 ), DCT_COS( 20 ), DCT_COS( 25 ), DCT_COS( 30 ), DCT_COS( 35 ),
ONE_OVER_SQRT2, DCT_COS( 7 ), DCT_COS( 14 ), DCT_COS( 21 ), DCT_COS( 28 ), DCT_COS( 35 ), DCT_COS( 42 ), DCT_COS( 49 ),
ONE_OVER_SQRT2, DCT_COS( 9 ), DCT_COS( 18 ), DCT_COS( 27 ), DCT_COS( 36 ), DCT_COS( 45 ), DCT_COS( 54 ), DCT_COS( 63 ),
ONE_OVER_SQRT2, DCT_COS( 11 ), DCT_COS( 22 ), DCT_COS( 33 ), DCT_COS( 44 ), DCT_COS( 55 ), DCT_COS( 66 ), DCT_COS( 77 ),
ONE_OVER_SQRT2, DCT_COS( 13 ), DCT_COS( 26 ), DCT_COS( 39 ), DCT_COS( 52 ), DCT_COS( 65 ), DCT_COS( 78 ), DCT_COS( 91 ),
ONE_OVER_SQRT2, DCT_COS( 15 ), DCT_COS( 30 ), DCT_COS( 45 ), DCT_COS( 60 ), DCT_COS( 75 ), DCT_COS( 90 ), DCT_COS( 105 ),
};
// entropy encoding score macro.
#define SV( x ) ( ( ( 256 - ( ( x ) & 0x7F ) ) * ( 256 - ( ( x ) & 0x7F ) ) ) >> 6 )
//----------------------------------------------------------
// global tables.
static DECLARE_ALIGNED_16( short, gDCTCoeff[ 64 ] );
static DECLARE_ALIGNED_16( short, gEncodeCo[ 64 ] );
static DECLARE_ALIGNED_16( short, gEncodeCg[ 64 ] );
static DECLARE_ALIGNED_16( short, gEncodeY0[ 64 ] );
static DECLARE_ALIGNED_16( short, gEncodeY1[ 64 ] );
static DECLARE_ALIGNED_16( short, gEncodeY2[ 64 ] );
static DECLARE_ALIGNED_16( short, gEncodeY3[ 64 ] );
static DECLARE_ALIGNED_16( unsigned char, gEncodeBGRA[ 256 ] );
static DECLARE_ALIGNED_16( short, gDecodeCo[ 64 ] );
static DECLARE_ALIGNED_16( short, gDecodeCg[ 64 ] );
static DECLARE_ALIGNED_16( short, gDecodeY0[ 64 ] );
static DECLARE_ALIGNED_16( short, gDecodeY1[ 64 ] );
static DECLARE_ALIGNED_16( short, gDecodeY2[ 64 ] );
static DECLARE_ALIGNED_16( short, gDecodeY3[ 64 ] );
static DECLARE_ALIGNED_16( unsigned char, gDecodeBGRA[ 256 ] );
//**********************************************************
// Global functions
//**********************************************************
//----------------------------------------------------------
void GrUTInitCompressor()
{
BuildDXTTables();
UT_CMP_INIT();
}
//----------------------------------------------------------
void GrUTCompressBGRX( UHuffman* encoder, const unsigned char* bgrx, unsigned char chop )
{
UT_CMP_CHECK_INIT();
// iterate over each 8x8 block of pixels.
for ( unsigned int y = 0; y < 8; y += 2 )
{
for ( unsigned int x = 0; x < 8; x += 2 )
{
// extract 4 8x8 blocks.
ExtractBlockBGRA( gEncodeBGRA, bgrx, 64, x + 0, y + 0 );
PackYCoCg( gEncodeY0, gEncodeCo + 0, gEncodeCg + 0, gEncodeBGRA );
ExtractBlockBGRA( gEncodeBGRA, bgrx, 64, x + 1, y + 0 );
PackYCoCg( gEncodeY1, gEncodeCo + 4, gEncodeCg + 4, gEncodeBGRA );
ExtractBlockBGRA( gEncodeBGRA, bgrx, 64, x + 0, y + 1 );
PackYCoCg( gEncodeY2, gEncodeCo + 32, gEncodeCg + 32, gEncodeBGRA );
ExtractBlockBGRA( gEncodeBGRA, bgrx, 64, x + 1, y + 1 );
PackYCoCg( gEncodeY3, gEncodeCo + 36, gEncodeCg + 36, gEncodeBGRA );
// store the subsampled Co and Cg values.
EncodeBlock( encoder, gEncodeCo, kQuantCo, chop );
EncodeBlock( encoder, gEncodeCg, kQuantCg, chop );
// store Y values.
EncodeBlock( encoder, gEncodeY0, kQuantY, chop );
EncodeBlock( encoder, gEncodeY1, kQuantY, chop );
EncodeBlock( encoder, gEncodeY2, kQuantY, chop );
EncodeBlock( encoder, gEncodeY3, kQuantY, chop );
}
}
}
//----------------------------------------------------------
void GrUTCompressA( UHuffman* encoder, const unsigned char* a, unsigned int bytesPerPel, unsigned char chop )
{
UT_CMP_CHECK_INIT();
// iterate over each 8x8 block of pixels.
for ( unsigned int y = 0; y < 8; ++y )
{
for ( unsigned int x = 0; x < 8; ++x )
{
// extract the block and adjust so that we have -128..127 values.
ExtractBlockA( gEncodeY0, a, bytesPerPel, 64, x, y );
// encode the X and Y values.
EncodeBlock( encoder, gEncodeY0, kQuantY, chop );
}
}
}
//----------------------------------------------------------
void GrUTDecompressBGRX( unsigned char* bgrx, UHuffman* decoder )
{
UT_CMP_CHECK_INIT();
// iterate over 8x8 blocks of pixels.
for ( unsigned int y = 0; y < 8; y += 2 )
{
for ( unsigned int x = 0; x < 8; x += 2 )
{
// decode subsampled Co and Cg values.
DecodeBlock( gDecodeCo, decoder, kQuantCo );
DecodeBlock( gDecodeCg, decoder, kQuantCg );
// decode Y values.
DecodeBlock( gDecodeY0, decoder, kQuantY );
DecodeBlock( gDecodeY1, decoder, kQuantY );
DecodeBlock( gDecodeY2, decoder, kQuantY );
DecodeBlock( gDecodeY3, decoder, kQuantY );
// unpack colors and insert into the destination block.
UnpackYCoCg( gDecodeBGRA, gDecodeY0, gDecodeCo + 0, gDecodeCg + 0 );
InsertBlockBGRA( bgrx, 64, x + 0, y + 0, gDecodeBGRA );
UnpackYCoCg( gDecodeBGRA, gDecodeY1, gDecodeCo + 4, gDecodeCg + 4 );
InsertBlockBGRA( bgrx, 64, x + 1, y + 0, gDecodeBGRA );
UnpackYCoCg( gDecodeBGRA, gDecodeY2, gDecodeCo + 32, gDecodeCg + 32 );
InsertBlockBGRA( bgrx, 64, x + 0, y + 1, gDecodeBGRA );
UnpackYCoCg( gDecodeBGRA, gDecodeY3, gDecodeCo + 36, gDecodeCg + 36 );
InsertBlockBGRA( bgrx, 64, x + 1, y + 1, gDecodeBGRA );
}
}
}
//----------------------------------------------------------
void GrUTDecompressA( unsigned char* a, unsigned int bytesPerPel, UHuffman* decoder )
{
UT_CMP_CHECK_INIT();
// iterate over 8x8 blocks of pixels.
for ( unsigned int y = 0; y < 8; ++y )
{
for ( unsigned int x = 0; x < 8; ++x )
{
// decode X and Y values.
DecodeBlock( gDecodeY0, decoder, kQuantY );
// insert the block into the outgoing stream.
InsertBlockA( a, bytesPerPel, 64, x, y, gDecodeY0 );
}
}
}
//----------------------------------------------------------
void GrUTCompressDXT5( unsigned char* destSurface, unsigned int destStride, unsigned char* bgra )
{
UT_CMP_CHECK_INIT();
B_ASSERT( false );
}
//----------------------------------------------------------
void GrUTCompressDXT5XY( unsigned char* destSurface, unsigned int destStride, unsigned char* xy )
{
UT_CMP_CHECK_INIT();
B_ASSERT( false );
}
//**********************************************************
// File local functions
//**********************************************************
//----------------------------------------------------------
void ExtractBlockBGRA( unsigned char* bgra, const unsigned char* bgraSource, unsigned int srcWidth,
unsigned int srcX, unsigned int srcY )
{
unsigned int stride = 4 * srcWidth;
const unsigned char* scan = bgraSource + srcY * stride + srcX * 4;
for ( unsigned int y = 0; y < 8; ++y, scan += stride )
{
const unsigned char* pel = scan;
for ( unsigned int x = 0; x < 8; ++x, pel += 4, bgra += 4 )
{
bgra[ 0 ] = pel[ 0 ];
bgra[ 1 ] = pel[ 1 ];
bgra[ 2 ] = pel[ 2 ];
bgra[ 3 ] = pel[ 3 ];
}
}
}
//----------------------------------------------------------
void ExtractBlockA( short* dstA, const unsigned char* aSource, unsigned int bytesPerPel,
unsigned int srcWidth, unsigned int srcX, unsigned int srcY )
{
unsigned int stride = srcWidth * bytesPerPel;
const unsigned char* scan = aSource + srcY * stride + srcX * bytesPerPel;
for ( unsigned int y = 0; y < 8; ++y, scan += stride )
{
const unsigned char* pel = scan;
for ( unsigned int x = 0; x < 8; ++x, pel += bytesPerPel, ++dstA )
*dstA = *pel - 128;
}
}
//----------------------------------------------------------
void InsertBlockBGRA( unsigned char* bgraDest, unsigned int dstWidth, unsigned int dstX,
unsigned int dstY, unsigned char* bgra )
{
unsigned int stride = dstWidth * 4;
unsigned char* scan = bgraDest + dstY * stride + dstX * 4;
for ( unsigned int y = 0; y < 8; ++y, scan += stride )
{
unsigned char* pel = scan;
for ( unsigned int x = 0; x < 8; ++x, pel += 4, bgra += 4 )
{
pel[ 0 ] = bgra[ 0 ];
pel[ 1 ] = bgra[ 1 ];
pel[ 2 ] = bgra[ 2 ];
pel[ 3 ] = bgra[ 3 ];
}
}
}
//----------------------------------------------------------
void InsertBlockA( unsigned char* aDest, unsigned int bytesPerPel, unsigned int dstWidth,
unsigned int dstX, unsigned int dstY, short* srcA )
{
// note: The YCoCg decoding stage writes values as XMMWORDs.
// This means that the right way to do this is to read the values
// in as XMMWORDs, replace the alpha components, and then write
// them back out. If we don't do this, then we hit a store
// forwarding problem.
unsigned int stride = dstWidth * 2;
unsigned char* scan = aDest + dstY * stride + dstX * 2;
for ( unsigned int y = 0; y < 8; ++y, scan += stride )
{
unsigned char* pel = scan;
for ( unsigned int x = 0; x < 8; ++x, pel += bytesPerPel, ++srcA )
*pel = Clamp( *srcA + 128, 0, 255 );
}
}
//----------------------------------------------------------
void EncodeBlock( UHuffman* encoder, const short* src, const unsigned short* quant, unsigned char chop )
{
// perform the DCT and quantize.
ForwardDCT( gDCTCoeff, src, quant );
// store the DC term.
encoder->WriteValue( ( unsigned char )( gDCTCoeff[ 0 ] & 0xFF ) );
encoder->WriteValue( ( unsigned char )( gDCTCoeff[ 0 ] >> 8 ) );
// now encode the data as a run of bytes.
for ( unsigned int i = 1; i < 64; ++i )
{
// simply write out non-zero coefficients.
unsigned char curCoeff = ( unsigned char )( gDCTCoeff[ kDCTBlockSwizzle0[ i ] ] );
if ( abs( curCoeff ) > chop )
{
// note that we reserve these two values for the encoding
// process. Therefor, if any values match it, we must
// clamp it to 0x82 (-126).
if ( curCoeff == 0x80 || curCoeff == 0x81 )
curCoeff = 0x82;
encoder->WriteValue( curCoeff );
}
else
{
// write out a run of zeros.
unsigned int runLength = 0;
for ( unsigned int j = i + 1; j < 64; ++j )
{
if ( abs( gDCTCoeff[ kDCTBlockSwizzle0[ j ] ] ) <= chop )
++runLength;
else
break;
}
// if we have a run length greater than one, then we
// should encode it. Otherwise, simply write the 0.
if ( runLength > 0 )
{
// make sure we advance i.
i += runLength;
// write out the zero-length run if necessary.
if ( i < 63 )
{
encoder->WriteValue( 0x80 );
encoder->WriteValue( runLength );
}
else
{
// end the block.
encoder->WriteValue( 0x81 );
}
}
else
{
encoder->WriteValue( 0 );
}
}
}
}
//----------------------------------------------------------
void DecodeBlock( short* dest, UHuffman* decoder, const unsigned short* quant )
{
// buffer to hold decoded (but still quantized) coefficients.
short cur = 0;
// clear the coefficient matrix to zero.
MemSet( gDCTCoeff, 0, sizeof( gDCTCoeff ) );
// read the AC term.
gDCTCoeff[ 0 ] = decoder->ReadValue();
gDCTCoeff[ 0 ] |= decoder->ReadValue() << 8;
// huffman and RLE decode the data into the buffer.
for ( unsigned int i = 1; i < 64; ++i )
{
// determine if we have a run of deltas or a run of zeros.
unsigned char value = decoder->ReadValue();
if ( value == 0x80 )
{
// we have a run of zeros.
i += decoder->ReadValue();
}
else if ( value == 0x81 )
{
break;
}
else
{
// write out the new value.
gDCTCoeff[ kDCTBlockSwizzle0[ i ] ] = ( short )( char )value;
}
}
// perform the iDCT.
InverseDCT( dest, gDCTCoeff, quant );
}
//----------------------------------------------------------
void UnpackYCoCg( unsigned char* bgra, const short* Y, const short* Co, const short* Cg )
{
// This function takes in one block of Co Cg values that each
// have a stride of 8 values. However, only 4 values from each
// row are actually used because they are subsampled.
#if 1
// convert two rows at a time to RGB.
for ( unsigned int i = 0; i < 4; ++i, bgra += 64 )
{
__asm
{
mov eax, Co
mov ebx, Cg
mov esi, Y
mov edi, bgra
#if 0
short curY = Y[ x ];
short curCo = Co[ ( y >> 1 ) * 8 + ( x >> 1 ) ];
short curCg = Cg[ ( y >> 1 ) * 8 + ( x >> 1 ) ];
short t = curY - ( curCg >> 1 );
unsigned char g = Max( curCg + t, 0 );
unsigned char b = Max( t - ( curCo >> 1 ), 0 );
unsigned char r = Max( b + curCo, 0 );
#endif
; load the first line of Co and Cg.
movq mm0, [ eax ]
movq mm1, [ ebx ]
; promote Co and Cg to 8 words and replicate them across
; adjacent channels.
movq2dq xmm0, mm0
pshufd xmm0, xmm0, 01000100b ; x32103210
pshuflw xmm0, xmm0, 01010000b ; x32101100
pshufhw xmm0, xmm0, 11111010b ; x33221100
movq2dq xmm2, mm1
pshufd xmm2, xmm2, 01000100b ; x32103210
pshuflw xmm2, xmm2, 01010000b ; x32101100
pshufhw xmm2, xmm2, 11111010b ; x33221100
; calculate Co >> 1 and Cg >> 1
movdqa xmm1, xmm0
movdqa xmm3, xmm2
psraw xmm1, 1
psraw xmm3, 1
; load in two rows of Y and calculate G.
movdqa xmm4, [ esi + 0 ]
movdqa xmm5, [ esi + 16 ]
psubsw xmm4, xmm3 ; xmm4 = t = curY - ( curCg >> 1 )
psubsw xmm5, xmm3 ; xmm5 = t = curY - ( curCg >> 1 )
; xmm2, xmm3 // green.
; xmm4, xmm5 // blue.
; xmm6, xmm7 // red.
; calculate two rows of green.
movdqa xmm7, xmm5
paddsw xmm7, xmm2
paddsw xmm2, xmm4
movdqa xmm3, xmm7
; calculate blue as t - ( curCo >> 1 )
psubsw xmm4, xmm1
psubsw xmm5, xmm1
; calculate red as b + curCo
movdqa xmm6, xmm4
movdqa xmm7, xmm5
paddsw xmm6, xmm0
paddsw xmm7, xmm0
; pack the first set of blue and green into xmm0
packuswb xmm1, xmm2
packuswb xmm0, xmm4
punpckhbw xmm0, xmm1 ; xmm0 = bgbgbgbgbgbgbgbg
; pack the first set of red and 0 into xmm1
packuswb xmm1, xmm6
pxor xmm4, xmm4
punpckhbw xmm1, xmm4 ; xmm1 = r0r0r0r0r0r0r0r0
; pack the second set of blue and green into xmm2
packuswb xmm3, xmm3
packuswb xmm2, xmm5
punpckhbw xmm2, xmm3 ; xmm2 = bgbgbgbgbgbgbgbg
; pack the second set of red and 0 into xmm3
packuswb xmm3, xmm7
punpckhbw xmm3, xmm4 ; xmm3 = r0r0r0r0r0r0r0r0
; split the values across four registers.
movdqa xmm4, xmm0
punpcklwd xmm4, xmm1 ; xmm4 = bgr0bgr0bgr0bgr0
movdqa xmm5, xmm0
punpckhwd xmm5, xmm1 ; xmm5 = bgr0bgr0bgr0bgr0
movdqa xmm6, xmm2
punpcklwd xmm6, xmm3 ; xmm6 = bgr0bgr0bgr0bgr0
movdqa xmm7, xmm2
punpckhwd xmm7, xmm3 ; xmm7 = bgr0bgr0bgr0bgr0
; store the output.
movdqa [edi+ 0], xmm4
movdqa [edi+16], xmm5
movdqa [edi+32], xmm6
movdqa [edi+48], xmm7
};
Y += 16;
Co += 8;
Cg += 8;
}
// clear MMX state.
__asm emms;
#else
for ( unsigned int y = 0; y < 8; ++y, Y += 8 )
{
for ( unsigned int x = 0; x < 8; ++x, ++red, ++green, ++blue )
{
short curY = Y[ x ];
short curCo = Co[ ( y >> 1 ) * 8 + ( x >> 1 ) ];
short curCg = Cg[ ( y >> 1 ) * 8 + ( x >> 1 ) ];
short t = curY - ( curCg >> 1 );
unsigned char g = Max( curCg + t, 0 );
unsigned char b = Max( t - ( curCo >> 1 ), 0 );
unsigned char r = Max( b + curCo, 0 );
// unsigned char r = curY + curCo - curCg;
// unsigned char g = curY + curCg;
// unsigned char b = curY - curCo - curCg;
*red = r;
*green = g;
*blue = b;
}
}
#endif
}
//----------------------------------------------------------
void PackYCoCg( short* Y, short* Co, short* Cg, const unsigned char* bgra )
{
// This function takes in one block of Co Cg values that each
// have a stride of 8 values. However, only 4 values from each
// row are actually written to because they are subsampled.
// convert two rows at a time to RGB.
short CoFull[ 64 ];
short CgFull[ 64 ];
for ( unsigned int i = 0; i < 64; ++i, bgra += 4 )
{
// get RGB components and expand them to 16-bits.
short r = bgra[ 2 ];
short g = bgra[ 1 ];
short b = bgra[ 0 ];
CoFull[ i ] = ( r - b );
short t = b + ( CoFull[ i ] >> 1 );
CgFull[ i ] = ( g - t );
Y[ i ] = ( t + ( CgFull[ i ] >> 1 ) );
}
// subsample CoCg.
short* CoSrc = CoFull;
short* CgSrc = CgFull;
for ( unsigned int y = 0; y < 4; ++y, Co += 8, Cg += 8, CoSrc += 16, CgSrc += 16 )
{
for ( unsigned int x = 0; x < 4; ++x )
{
#if 1
short CoSum = CoSrc[ x + x + 0 ] + CoSrc[ x + x + 1 ] +
CoSrc[ x + x + 8 ] + CoSrc[ x + x + 9 ];
short CgSum = CgSrc[ x + x + 0 ] + CgSrc[ x + x + 1 ] +
CgSrc[ x + x + 8 ] + CgSrc[ x + x + 9 ];
Co[ x ] = ( CoSum + 2 ) >> 2;
Cg[ x ] = ( CgSum + 2 ) >> 2;
#else
Co[ x ] = CoSrc[ x + x ];
Cg[ x ] = CgSrc[ x + x ];
#endif
}
}
}
//----------------------------------------------------------
void ForwardDCT( short* dest, const short* coeff, const unsigned short* quant )
{
short temp1[ 64 ];
float temp2[ 64 ];
for ( unsigned int i = 0; i < 64; ++i )
temp1[ i ] = coeff[ i ];
// perform an 8x8 matrix multiply.
for ( unsigned int i = 0; i < 8; ++i )
{
for ( unsigned int j = 0; j < 8; ++j )
{
// convert the current coefficient to floating point.
float curCoeff = 0;
for ( unsigned int k = 0; k < 8; ++k )
curCoeff += kDCTMatrix[ 8 * i + k ] * temp1[ 8 * k + j ];
// store the current coefficient.
temp2[ 8 * i + j ] = ( curCoeff );
}
}
// perform an 8x8 matrix multiply.
for ( unsigned int i = 0; i < 8; ++i )
{
for ( unsigned int j = 0; j < 8; ++j )
{
// convert the current coefficient to floating point.
float curCoeff = 0;
for ( unsigned int k = 0; k < 8; ++k )
curCoeff += temp2[ 8 * i + k ] * kDCTMatrixT[ 8 * k + j ];
// quantize and store the current coefficient.
dest[ 8 * i + j ] = ( short )( ( curCoeff / quant[ 8 * i + j ] ) + 0.5f );
}
}
}
//----------------------------------------------------------
#define BITS_INV_ACC 5 // 4 or 5 for IEEE
#define SHIFT_INV_ROW 16 - BITS_INV_ACC
#define SHIFT_INV_COL 1 + BITS_INV_ACC
#define RND_INV_ROW 1024 * (6 - BITS_INV_ACC) // 1 << (SHIFT_INV_ROW-1)
#define RND_INV_COL 16 * (BITS_INV_ACC - 3) // 1 << (SHIFT_INV_COL-1)
#define DUP4( X ) (X),(X),(X),(X)
#define DUP8( X ) (X),(X),(X),(X),(X),(X),(X),(X)
#define BIAS_SCALE( X ) ( X / ( BITS_INV_ACC - 3 ) )
static DECLARE_ALIGNED_16( short, M128_tg_1_16[8] ) = { DUP8( 13036 ) }; // tg * (1<<16) + 0.5
static DECLARE_ALIGNED_16( short, M128_tg_2_16[8] ) = { DUP8( 27146 ) }; // tg * (1<<16) + 0.5
static DECLARE_ALIGNED_16( short, M128_tg_3_16[8] ) = { DUP8( -21746 ) }; // tg * (1<<16) + 0.5
static DECLARE_ALIGNED_16( short, M128_cos_4_16[8] ) = { DUP8( -19195 ) }; // cos * (1<<16) + 0.5
// Table for rows 0,4 - constants are multiplied by cos_4_16
static DECLARE_ALIGNED_16( short, M128_tab_i_04[] ) =
{
16384, 21407, 16384, 8867, // w05 w04 w01 w00
16384, -8867, 16384, -21407, // w13 w12 w09 w08
16384, 8867, -16384, -21407, // w07 w06 w03 w02
-16384, 21407, 16384, -8867, // w15 w14 w11 w10
22725, 19266, 19266, -4520, // w21 w20 w17 w16
12873, -22725, 4520, -12873, // w29 w28 w25 w24
12873, 4520, -22725, -12873, // w23 w22 w19 w18
4520, 19266, 19266, -22725 // w31 w30 w27 w26
};
// Table for rows 1,7 - constants are multiplied by cos_1_16
static DECLARE_ALIGNED_16( short, M128_tab_i_17[] ) =
{
22725, 29692, 22725, 12299, // w05 w04 w01 w00
22725, -12299, 22725, -29692, // w13 w12 w09 w08
22725, 12299, -22725, -29692, // w07 w06 w03 w02
-22725, 29692, 22725, -12299, // w15 w14 w11 w10
31521, 26722, 26722, -6270, // w21 w20 w17 w16
17855, -31521, 6270, -17855, // w29 w28 w25 w24
17855, 6270, -31521, -17855, // w23 w22 w19 w18
6270, 26722, 26722, -31521 // w31 w30 w27 w26
};
// Table for rows 2,6 - constants are multiplied by cos_2_16
static DECLARE_ALIGNED_16( short, M128_tab_i_26[] ) =
{
21407, 27969, 21407, 11585, // w05 w04 w01 w00
21407, -11585, 21407, -27969, // w13 w12 w09 w08
21407, 11585, -21407, -27969, // w07 w06 w03 w02
-21407, 27969, 21407, -11585, // w15 w14 w11 w10
29692, 25172, 25172, -5906, // w21 w20 w17 w16
16819, -29692, 5906, -16819, // w29 w28 w25 w24
16819, 5906, -29692, -16819, // w23 w22 w19 w18
5906, 25172, 25172, -29692 // w31 w30 w27 w26
};
// Table for rows 3,5 - constants are multiplied by cos_3_16
static DECLARE_ALIGNED_16( short, M128_tab_i_35[] ) = {
19266, 25172, 19266, 10426, // w05 w04 w01 w00
19266, -10426, 19266, -25172, // w13 w12 w09 w08
19266, 10426, -19266, -25172, // w07 w06 w03 w02
-19266, 25172, 19266, -10426, // w15 w14 w11 w10
26722, 22654, 22654, -5315, // w21 w20 w17 w16
15137, -26722, 5315, -15137, // w29 w28 w25 w24
15137, 5315, -26722, -15137, // w23 w22 w19 w18
5315, 22654, 22654, -26722 // w31 w30 w27 w26
};
static DECLARE_ALIGNED_16( const unsigned int, rounder_0[4] ) = { DUP4( RND_INV_ROW - BIAS_SCALE( 2048 ) + 65536 ) };
static DECLARE_ALIGNED_16( const unsigned int, rounder_1[4] ) = { DUP4( RND_INV_ROW + BIAS_SCALE( 3755 ) ) };
static DECLARE_ALIGNED_16( const unsigned int, rounder_2[4] ) = { DUP4( RND_INV_ROW + BIAS_SCALE( 2472 ) ) };
static DECLARE_ALIGNED_16( const unsigned int, rounder_3[4] ) = { DUP4( RND_INV_ROW + BIAS_SCALE( 1361 ) ) };
static DECLARE_ALIGNED_16( const unsigned int, rounder_4[4] ) = { DUP4( RND_INV_ROW + BIAS_SCALE( 0 ) ) };
static DECLARE_ALIGNED_16( const unsigned int, rounder_5[4] ) = { DUP4( RND_INV_ROW - BIAS_SCALE( 1139 ) ) };
static DECLARE_ALIGNED_16( const unsigned int, rounder_6[4] ) = { DUP4( RND_INV_ROW - BIAS_SCALE( 1024 ) ) };
static DECLARE_ALIGNED_16( const unsigned int, rounder_7[4] ) = { DUP4( RND_INV_ROW - BIAS_SCALE( 1301 ) ) };
#define DCT_8_INV_ROW( table1, table2, rounder1, rounder2 ) \
__asm pshuflw xmm0, xmm0, 0xD8 \
__asm pshufhw xmm0, xmm0, 0xD8 \
__asm pshufd xmm3, xmm0, 0x55 \
__asm pshufd xmm1, xmm0, 0 \
__asm pshufd xmm2, xmm0, 0xAA \
__asm pshufd xmm0, xmm0, 0xFF \
__asm pmaddwd xmm1, [table1+ 0] \
__asm pmaddwd xmm2, [table1+16] \
__asm pmaddwd xmm3, [table1+32] \
__asm pmaddwd xmm0, [table1+48] \
__asm paddd xmm0, xmm3 \
__asm pshuflw xmm4, xmm4, 0xD8 \
__asm pshufhw xmm4, xmm4, 0xD8 \
__asm paddd xmm1, rounder1 \
__asm pshufd xmm6, xmm4, 0xAA \
__asm pshufd xmm5, xmm4, 0 \
__asm pmaddwd xmm5, [table2+ 0] \
__asm paddd xmm5, rounder2 \
__asm pmaddwd xmm6, [table2+16] \
__asm pshufd xmm7, xmm4, 0x55 \
__asm pmaddwd xmm7, [table2+32] \
__asm pshufd xmm4, xmm4, 0xFF \
__asm pmaddwd xmm4, [table2+48] \
__asm paddd xmm1, xmm2 \
__asm movdqa xmm2, xmm1 \
__asm psubd xmm2, xmm0 \
__asm psrad xmm2, SHIFT_INV_ROW \
__asm pshufd xmm2, xmm2, 0x1B \
__asm paddd xmm0, xmm1 \
__asm psrad xmm0, SHIFT_INV_ROW \
__asm paddd xmm5, xmm6 \
__asm packssdw xmm0, xmm2 \
__asm paddd xmm4, xmm7 \
__asm movdqa xmm6, xmm5 \
__asm psubd xmm6, xmm4 \
__asm psrad xmm6, SHIFT_INV_ROW \
__asm paddd xmm4, xmm5 \
__asm psrad xmm4, SHIFT_INV_ROW \
__asm pshufd xmm6, xmm6, 0x1B \
__asm packssdw xmm4, xmm6
#define DCT_8_INV_COL_8 \
__asm movdqa xmm6, xmm4 \
__asm movdqa xmm2, xmm0 \
__asm movdqa xmm3, XMMWORD PTR [edx+3*16] \
__asm movdqa xmm1, XMMWORD PTR M128_tg_3_16 \
__asm pmulhw xmm0, xmm1 \
__asm movdqa xmm5, XMMWORD PTR M128_tg_1_16 \
__asm pmulhw xmm1, xmm3 \
__asm paddsw xmm1, xmm3 \
__asm pmulhw xmm4, xmm5 \
__asm movdqa xmm7, XMMWORD PTR [edx+6*16] \
__asm pmulhw xmm5, [edx+1*16] \
__asm psubsw xmm5, xmm6 \
__asm movdqa xmm6, xmm5 \
__asm paddsw xmm4, [edx+1*16] \
__asm paddsw xmm0, xmm2 \
__asm paddsw xmm0, xmm3 \
__asm psubsw xmm2, xmm1 \
__asm movdqa xmm1, xmm0 \
__asm movdqa xmm3, XMMWORD PTR M128_tg_2_16 \
__asm pmulhw xmm7, xmm3 \
__asm pmulhw xmm3, [edx+2*16] \
__asm paddsw xmm0, xmm4 \
__asm psubsw xmm4, xmm1 \
__asm movdqa [edx+7*16], xmm0 \
__asm psubsw xmm5, xmm2 \
__asm paddsw xmm6, xmm2 \
__asm movdqa [edx+3*16], xmm6 \
__asm movdqa xmm1, xmm4 \
__asm movdqa xmm0, XMMWORD PTR M128_cos_4_16 \
__asm movdqa xmm2, xmm0 \
__asm paddsw xmm4, xmm5 \
__asm psubsw xmm1, xmm5 \
__asm paddsw xmm7, [edx+2*16] \
__asm psubsw xmm3, [edx+6*16] \
__asm movdqa xmm6, [edx] \
__asm pmulhw xmm0, xmm1 \
__asm movdqa xmm5, [edx+4*16] \
__asm paddsw xmm5, xmm6 \
__asm psubsw xmm6, [edx+4*16] \
__asm pmulhw xmm2, xmm4 \
__asm paddsw xmm4, xmm2 \
__asm movdqa xmm2, xmm5 \
__asm psubsw xmm2, xmm7 \
__asm paddsw xmm0, xmm1 \
__asm paddsw xmm5, xmm7 \
__asm movdqa xmm1, xmm6 \
__asm movdqa xmm7, [edx+7*16] \
__asm paddsw xmm7, xmm5 \
__asm psraw xmm7, SHIFT_INV_COL \
__asm movdqa [edx], xmm7 \
__asm paddsw xmm6, xmm3 \
__asm psubsw xmm1, xmm3 \
__asm movdqa xmm7, xmm1 \
__asm movdqa xmm3, xmm6 \
__asm paddsw xmm6, xmm4 \
__asm psraw xmm6, SHIFT_INV_COL \
__asm movdqa [edx+1*16], xmm6 \
__asm paddsw xmm1, xmm0 \
__asm psraw xmm1, SHIFT_INV_COL \
__asm movdqa [edx+2*16], xmm1 \
__asm movdqa xmm1, [edx+3*16] \
__asm movdqa xmm6, xmm1 \
__asm psubsw xmm7, xmm0 \
__asm psraw xmm7, SHIFT_INV_COL \
__asm movdqa [edx+5*16], xmm7 \
__asm psubsw xmm5, [edx+7*16] \
__asm psraw xmm5, SHIFT_INV_COL \
__asm movdqa [edx+7*16], xmm5 \
__asm psubsw xmm3, xmm4 \
__asm paddsw xmm6, xmm2 \
__asm psubsw xmm2, xmm1 \
__asm psraw xmm6, SHIFT_INV_COL \
__asm movdqa [edx+3*16], xmm6 \
__asm psraw xmm2, SHIFT_INV_COL \
__asm movdqa [edx+4*16], xmm2 \
__asm psraw xmm3, SHIFT_INV_COL \
__asm movdqa [edx+6*16], xmm3
#define DEQUANTIZE( reg, mem ) __asm pmullw reg, mem
void InverseDCT( short *dest, const short *coeff, const unsigned short *quant )
{
__asm mov eax, coeff
__asm mov edx, dest
__asm mov esi, quant
__asm movdqa xmm0, XMMWORD PTR[eax+16*0] // row 0
__asm movdqa xmm4, XMMWORD PTR[eax+16*2] // row 2
DEQUANTIZE( xmm0, XMMWORD PTR[esi+16*0] )
DEQUANTIZE( xmm4, XMMWORD PTR[esi+16*2] )
DCT_8_INV_ROW( M128_tab_i_04, M128_tab_i_26, rounder_0, rounder_2 );
__asm movdqa XMMWORD PTR[edx+16*0], xmm0
__asm movdqa XMMWORD PTR[edx+16*2], xmm4
__asm movdqa xmm0, XMMWORD PTR[eax+16*4] // row 4
__asm movdqa xmm4, XMMWORD PTR[eax+16*6] // row 6
DEQUANTIZE( xmm0, XMMWORD PTR[esi+16*4] )
DEQUANTIZE( xmm4, XMMWORD PTR[esi+16*6] )
DCT_8_INV_ROW( M128_tab_i_04, M128_tab_i_26, rounder_4, rounder_6 );
__asm movdqa XMMWORD PTR[edx+16*4], xmm0
__asm movdqa XMMWORD PTR[edx+16*6], xmm4
__asm movdqa xmm0, XMMWORD PTR[eax+16*3] // row 3
__asm movdqa xmm4, XMMWORD PTR[eax+16*1] // row 1
DEQUANTIZE( xmm0, XMMWORD PTR[esi+16*3] )
DEQUANTIZE( xmm4, XMMWORD PTR[esi+16*1] )
DCT_8_INV_ROW( M128_tab_i_35, M128_tab_i_17, rounder_3, rounder_1 );
__asm movdqa XMMWORD PTR[edx+16*3], xmm0
__asm movdqa XMMWORD PTR[edx+16*1], xmm4
__asm movdqa xmm0, XMMWORD PTR[eax+16*5] // row 5
__asm movdqa xmm4, XMMWORD PTR[eax+16*7] // row 7
DEQUANTIZE( xmm0, XMMWORD PTR[esi+16*5] )
DEQUANTIZE( xmm4, XMMWORD PTR[esi+16*7] )
DCT_8_INV_ROW( M128_tab_i_35, M128_tab_i_17, rounder_5, rounder_7 );
DCT_8_INV_COL_8
}
//**********************************************************
// Implementation of the extreme DXT algorithm in SSE2.
//**********************************************************
unsigned int kColorDividerTable[768];
unsigned int kAlphaDividerTable[256];
unsigned int kColorIndicesTable[256];
unsigned int kAlphaIndicesTable[640];
DECLARE_ALIGNED_16( const unsigned char, kSSEByte0[16] ) = { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 };
DECLARE_ALIGNED_16( const unsigned char, kSSEWord1[16] ) = { 0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00 };
DECLARE_ALIGNED_16( const unsigned char, kSSEWord8[16] ) = { 0x08,0x00,0x08,0x00,0x08,0x00,0x08,0x00,0x08,0x00,0x08,0x00,0x08,0x00,0x08,0x00 };
DECLARE_ALIGNED_16( const unsigned char, kSSEBoundsMask[16] ) = { 0x00,0x1F,0x00,0x1F,0xE0,0x07,0xE0,0x07,0x00,0xF8,0x00,0xF8,0x00,0xFF,0xFF,0x00 };
DECLARE_ALIGNED_16( const unsigned char, kSSEBoundScale[16] ) = { 0x20,0x00,0x20,0x00,0x08,0x00,0x08,0x00,0x00,0x01,0x00,0x01,0x00,0x01,0x01,0x00 };
DECLARE_ALIGNED_16( const unsigned char, kSSEIndicesMask0[16] ) = { 0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00 };
DECLARE_ALIGNED_16( const unsigned char, kSSEIndicesMask1[16] ) = { 0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x00 };
DECLARE_ALIGNED_16( const unsigned char, kSSEIndicesMask2[16] ) = { 0x08,0x08,0x08,0x00,0x08,0x08,0x08,0x00,0x08,0x08,0x08,0x00,0x08,0x08,0x08,0x00 };
DECLARE_ALIGNED_16( const unsigned char, kSSEIndicesScale0[16] ) = { 0x01,0x00,0x04,0x00,0x10,0x00,0x40,0x00,0x01,0x00,0x04,0x00,0x10,0x00,0x40,0x00 };
DECLARE_ALIGNED_16( const unsigned char, kSSEIndicesScale1[16] ) = { 0x01,0x00,0x04,0x00,0x01,0x00,0x08,0x00,0x10,0x00,0x40,0x00,0x00,0x01,0x00,0x08 };
DECLARE_ALIGNED_16( const unsigned char, kSSEIndicesScale2[16] ) = { 0x01,0x04,0x10,0x40,0x01,0x04,0x10,0x40,0x01,0x04,0x10,0x40,0x01,0x04,0x10,0x40 };
DECLARE_ALIGNED_16( const unsigned char, kSSEIndicesScale3[16] ) = { 0x01,0x04,0x01,0x04,0x01,0x08,0x01,0x08,0x01,0x04,0x01,0x04,0x01,0x08,0x01,0x08 };
DECLARE_ALIGNED_16( const unsigned char, kSSEIndicesScale4[16] ) = { 0x01,0x00,0x10,0x00,0x01,0x00,0x00,0x01,0x01,0x00,0x10,0x00,0x01,0x00,0x00,0x01 };
DECLARE_ALIGNED_16( const unsigned char, kSSEIndicesScale[16] ) = { 0x00,0x02,0x04,0x06,0x01,0x03,0x05,0x07,0x08,0x0A,0x0C,0x0E,0x09,0x0B,0x0D,0x0F };
// temporary stores. This avoids stack frame generation for aligned
// local variables (ebx).
DECLARE_ALIGNED_16( unsigned char, gDXTMin[32] );
DECLARE_ALIGNED_16( unsigned char, gDXTRange[32] );
DECLARE_ALIGNED_16( unsigned char, gDXTBounds[32] );
DECLARE_ALIGNED_16( unsigned char, gDXTIndices[64] );
//----------------------------------------------------------
void BuildDXTTables()
{
// build the color divider table.
for ( int i = 0; i < 768; ++i )
kColorDividerTable[i] = ( ( ( 1 << 15 ) / ( i + 1 ) ) << 16 ) | ( ( 1 << 15 ) / ( i + 1 ) );
// build the alpha divider table.
for ( int i = 0; i < 256; ++i )
kAlphaDividerTable[i] = ( ( ( 1 << 16 ) / ( i + 1 ) ) << 16 );
// build the color indices table.
const unsigned char kColorIndexLUT[] =
{
1, 3, 2, 0,
};
for ( int i = 0; i < 256; ++i )
{
unsigned char ci3 = kColorIndexLUT[ ( i & 0xC0 ) >> 6 ] << 6;
unsigned char ci2 = kColorIndexLUT[ ( i & 0x30 ) >> 4 ] << 4;
unsigned char ci1 = kColorIndexLUT[ ( i & 0x0C ) >> 2 ] << 2;
unsigned char ci0 = kColorIndexLUT[ ( i & 0x03 ) >> 0 ] << 0;
kColorIndicesTable[ i ] = ci3 | ci2 | ci1 | ci0;
}
// build the alpha indices table.
const int kShiftLeft[] = { 0, 1, 2, 0, 1, 2, 3, 0, 1, 2 };
const int kShiftRight[] = { 0, 0, 0, 2, 2, 2, 2, 1, 1, 1 };
const unsigned short kAlphaIndex[] = { 1, 7, 6, 5, 4, 3, 2, 0 };
for ( int j = 0; j < 10; ++j )
{
int sl = kShiftLeft[ j ] * 6;
int sr = kShiftRight[ j ] * 2;
for ( int i = 0; i < 64; ++i )
{
unsigned short ai1 = kAlphaIndex[ ( i & 0x38 ) >> 3 ] << 3;
unsigned short ai0 = kAlphaIndex[ ( i & 0x07 ) >> 0 ] << 0;
kAlphaIndicesTable[ ( j * 64 ) + i ] = ( ( ai1 | ai0 ) << sl ) >> sr;
}
}
}
//----------------------------------------------------------
void CompressImageDXT1( const unsigned char* argb, unsigned char* dxt1, int width, int height )
{
int x_count;
int y_count;
__asm
{
mov esi, DWORD PTR argb // src
mov edi, DWORD PTR dxt1 // dst
mov eax, DWORD PTR height
mov DWORD PTR y_count, eax
y_loop:
mov eax, DWORD PTR width
mov DWORD PTR x_count, eax
x_loop:
mov eax, DWORD PTR width // width * 1
lea ebx, DWORD PTR [eax + eax*2] // width * 3
movdqa xmm0, XMMWORD PTR [esi + 0] // src + width * 0 + 0
movdqa xmm3, XMMWORD PTR [esi + eax*4 + 0] // src + width * 4 + 0
movdqa xmm1, xmm0
pmaxub xmm0, xmm3
pmaxub xmm0, XMMWORD PTR [esi + eax*8 + 0] // src + width * 8 + 0
pmaxub xmm0, XMMWORD PTR [esi + ebx*4 + 0] // src + width * 12 + 0
pminub xmm1, xmm3
pminub xmm1, XMMWORD PTR [esi + eax*8 + 0] // src + width * 8 + 0
pminub xmm1, XMMWORD PTR [esi + ebx*4 + 0] // src + width * 12 + 0
pshufd xmm2, xmm0, 0x4E
pshufd xmm3, xmm1, 0x4E
pmaxub xmm0, xmm2
pminub xmm1, xmm3
pshufd xmm2, xmm0, 0xB1
pshufd xmm3, xmm1, 0xB1
pmaxub xmm0, xmm2
pminub xmm1, xmm3
movdqa xmm4, XMMWORD PTR [esi + 16] // src + width * 0 + 16
movdqa xmm7, XMMWORD PTR [esi + eax*4 + 16] // src + width * 4 + 16
movdqa xmm5, xmm4
pmaxub xmm4, xmm7
pmaxub xmm4, XMMWORD PTR [esi + eax*8 + 16] // src + width * 8 + 16
pmaxub xmm4, XMMWORD PTR [esi + ebx*4 + 16] // src + width * 12 + 16
pminub xmm5, xmm7
pminub xmm5, XMMWORD PTR [esi + eax*8 + 16] // src + width * 8 + 16
pminub xmm5, XMMWORD PTR [esi + ebx*4 + 16] // src + width * 12 + 16
pshufd xmm6, xmm4, 0x4E
pshufd xmm7, xmm5, 0x4E
pmaxub xmm4, xmm6
pminub xmm5, xmm7
pshufd xmm6, xmm4, 0xB1
pshufd xmm7, xmm5, 0xB1
pmaxub xmm4, xmm6
pminub xmm5, xmm7
movdqa XMMWORD PTR gDXTMin[ 0], xmm1
movdqa XMMWORD PTR gDXTMin[16], xmm5
movdqa xmm7, XMMWORD PTR kSSEByte0
punpcklbw xmm0, xmm7
punpcklbw xmm4, xmm7
punpcklbw xmm1, xmm7
punpcklbw xmm5, xmm7
movdqa xmm2, xmm0
movdqa xmm6, xmm4
psubw xmm2, xmm1
psubw xmm6, xmm5
movq MMWORD PTR gDXTRange[ 0], xmm2
movq MMWORD PTR gDXTRange[16], xmm6
psrlw xmm2, 4
psrlw xmm6, 4
psubw xmm0, xmm2
psubw xmm4, xmm6
paddw xmm1, xmm2
paddw xmm5, xmm6
punpcklwd xmm0, xmm1
pmullw xmm0, XMMWORD PTR kSSEBoundScale
pand xmm0, XMMWORD PTR kSSEBoundsMask
movdqa XMMWORD PTR gDXTBounds[ 0], xmm0
punpcklwd xmm4, xmm5
pmullw xmm4, XMMWORD PTR kSSEBoundScale
pand xmm4, XMMWORD PTR kSSEBoundsMask
movdqa XMMWORD PTR gDXTBounds[16], xmm4
movzx ecx, WORD PTR gDXTRange [ 0]
movzx edx, WORD PTR gDXTRange [16]
mov eax, DWORD PTR gDXTBounds[ 0]
mov ebx, DWORD PTR gDXTBounds[16]
shr eax, 8
shr ebx, 8
or eax, DWORD PTR gDXTBounds[ 4]
or ebx, DWORD PTR gDXTBounds[20]
or eax, DWORD PTR gDXTBounds[ 8]
or ebx, DWORD PTR gDXTBounds[24]
mov DWORD PTR [edi + 0], eax
mov DWORD PTR [edi + 8], ebx
add cx, WORD PTR gDXTRange [ 2]
add dx, WORD PTR gDXTRange [18]
add cx, WORD PTR gDXTRange [ 4]
add dx, WORD PTR gDXTRange [20]
mov ecx, DWORD PTR kColorDividerTable[ecx*4]
mov edx, DWORD PTR kColorDividerTable[edx*4]
movzx eax, WORD PTR [edi + 0]
xor ax, WORD PTR [edi + 2]
cmovz ecx, eax
movzx ebx, WORD PTR [edi + 8]
xor bx, WORD PTR [edi + 10]
cmovz edx, ebx
mov eax, DWORD PTR width // width * 1
lea ebx, DWORD PTR [eax + eax*2] // width * 3
movdqa xmm0, XMMWORD PTR [esi + 0] // src + width * 0 + 0
movdqa xmm1, XMMWORD PTR [esi + eax*4 + 0] // src + width * 4 + 0
movdqa xmm7, XMMWORD PTR gDXTMin[ 0]
psubb xmm0, xmm7
psubb xmm1, xmm7
movdqa xmm2, XMMWORD PTR [esi + eax*8 + 0] // src + width * 8 + 0
movdqa xmm3, XMMWORD PTR [esi + ebx*4 + 0] // src + width * 12 + 0
psubb xmm2, xmm7
psubb xmm3, xmm7
movdqa xmm4, xmm0
movdqa xmm5, xmm1
movdqa xmm6, XMMWORD PTR kSSEIndicesMask0
movdqa xmm7, XMMWORD PTR kSSEIndicesMask1
pand xmm0, xmm6
pand xmm1, xmm6
pmaddwd xmm0, XMMWORD PTR kSSEWord8
pmaddwd xmm1, XMMWORD PTR kSSEWord8
pand xmm4, xmm7
pand xmm5, xmm7
psrlw xmm4, 5
psrlw xmm5, 5
paddw xmm0, xmm4
paddw xmm1, xmm5
movdqa xmm4, xmm2
movdqa xmm5, xmm3
pand xmm2, xmm6
pand xmm3, xmm6
pmaddwd xmm2, XMMWORD PTR kSSEWord8
pmaddwd xmm3, XMMWORD PTR kSSEWord8
pand xmm4, xmm7
pand xmm5, xmm7
psrlw xmm4, 5
psrlw xmm5, 5
paddw xmm2, xmm4
paddw xmm3, xmm5
movd xmm7, ecx
pshufd xmm7, xmm7, 0x00
packssdw xmm0, xmm1
pmulhw xmm0, xmm7
pmaddwd xmm0, XMMWORD PTR kSSEIndicesScale0
packssdw xmm2, xmm3
pmulhw xmm2, xmm7
pmaddwd xmm2, XMMWORD PTR kSSEIndicesScale0
packssdw xmm0, xmm2
pmaddwd xmm0, XMMWORD PTR kSSEWord1
movdqa XMMWORD PTR gDXTIndices[ 0], xmm0
movdqa xmm0, XMMWORD PTR [esi + 16] // src + width * 0 + 16
movdqa xmm1, XMMWORD PTR [esi + eax*4 + 16] // src + width * 4 + 16
movdqa xmm7, XMMWORD PTR gDXTMin[16]
psubb xmm0, xmm7
psubb xmm1, xmm7
movdqa xmm2, XMMWORD PTR [esi + eax*8 + 16] // src + width * 8 + 16
movdqa xmm3, XMMWORD PTR [esi + ebx*4 + 16] // src + width * 12 + 16
psubb xmm2, xmm7
psubb xmm3, xmm7
movdqa xmm4, xmm0
movdqa xmm5, xmm1
movdqa xmm6, XMMWORD PTR kSSEIndicesMask0
movdqa xmm7, XMMWORD PTR kSSEIndicesMask1
pand xmm4, xmm7
pand xmm5, xmm7
psrlw xmm4, 5
psrlw xmm5, 5
pand xmm0, xmm6
pand xmm1, xmm6
pmaddwd xmm0, XMMWORD PTR kSSEWord8
pmaddwd xmm1, XMMWORD PTR kSSEWord8
paddw xmm0, xmm4
paddw xmm1, xmm5
movdqa xmm4, xmm2
movdqa xmm5, xmm3
pand xmm4, xmm7
pand xmm5, xmm7
psrlw xmm4, 5
psrlw xmm5, 5
pand xmm2, xmm6
pand xmm3, xmm6
pmaddwd xmm2, XMMWORD PTR kSSEWord8
pmaddwd xmm3, XMMWORD PTR kSSEWord8
paddw xmm2, xmm4
paddw xmm3, xmm5
movd xmm7, edx
pshufd xmm7, xmm7, 0x00
packssdw xmm0, xmm1
pmulhw xmm0, xmm7
pmaddwd xmm0, XMMWORD PTR kSSEIndicesScale0
packssdw xmm2, xmm3
pmulhw xmm2, xmm7
pmaddwd xmm2, XMMWORD PTR kSSEIndicesScale0
packssdw xmm0, xmm2
pmaddwd xmm0, XMMWORD PTR kSSEWord1
movdqa XMMWORD PTR gDXTIndices[32], xmm0
movzx eax, BYTE PTR gDXTIndices[ 0]
movzx ebx, BYTE PTR gDXTIndices[ 4]
mov cl, BYTE PTR kColorIndicesTable[eax*1 + 0]
mov ch, BYTE PTR kColorIndicesTable[ebx*1 + 0]
mov BYTE PTR [edi + 4], cl
mov BYTE PTR [edi + 5], ch
movzx eax, BYTE PTR gDXTIndices[ 8]
movzx ebx, BYTE PTR gDXTIndices[12]
mov dl, BYTE PTR kColorIndicesTable[eax*1 + 0]
mov dh, BYTE PTR kColorIndicesTable[ebx*1 + 0]
mov BYTE PTR [edi + 6], dl
mov BYTE PTR [edi + 7], dh
movzx eax, BYTE PTR gDXTIndices[32]
movzx ebx, BYTE PTR gDXTIndices[36]
mov cl, BYTE PTR kColorIndicesTable[eax*1 + 0]
mov ch, BYTE PTR kColorIndicesTable[ebx*1 + 0]
mov BYTE PTR [edi + 12], cl
mov BYTE PTR [edi + 13], ch
movzx eax, BYTE PTR gDXTIndices[40]
movzx ebx, BYTE PTR gDXTIndices[44]
mov dl, BYTE PTR kColorIndicesTable[eax*1 + 0]
mov dh, BYTE PTR kColorIndicesTable[ebx*1 + 0]
mov BYTE PTR [edi + 14], dl
mov BYTE PTR [edi + 15], dh
add esi, 32 // src += 32
add edi, 16 // dst += 16
sub DWORD PTR x_count, 8
jnz x_loop
mov eax, DWORD PTR width // width * 1
lea ebx, DWORD PTR [eax + eax*2] // width * 3
lea esi, DWORD PTR [esi + ebx*4] // src += width * 12
sub DWORD PTR y_count, 4
jnz y_loop
}
}
//----------------------------------------------------------
void CompressImageDXT5( const unsigned char* argb, BYTE* dxt5, int width, int height )
{
int x_count;
int y_count;
__asm
{
mov esi, DWORD PTR argb // src
mov edi, DWORD PTR dxt5 // dst
mov eax, DWORD PTR height
mov DWORD PTR y_count, eax
y_loop:
mov eax, DWORD PTR width
mov DWORD PTR x_count, eax
x_loop:
mov eax, DWORD PTR width // width * 1
lea ebx, DWORD PTR [eax + eax*2] // width * 3
movdqa xmm0, XMMWORD PTR [esi + 0] // src + width * 0 + 0
movdqa xmm3, XMMWORD PTR [esi + eax*4 + 0] // src + width * 4 + 0
movdqa xmm1, xmm0
pmaxub xmm0, xmm3
pminub xmm1, xmm3
pmaxub xmm0, XMMWORD PTR [esi + eax*8 + 0] // src + width * 8 + 0
pminub xmm1, XMMWORD PTR [esi + eax*8 + 0] // src + width * 8 + 0
pmaxub xmm0, XMMWORD PTR [esi + ebx*4 + 0] // src + width * 12 + 0
pminub xmm1, XMMWORD PTR [esi + ebx*4 + 0] // src + width * 12 + 0
pshufd xmm2, xmm0, 0x4E
pmaxub xmm0, xmm2
pshufd xmm3, xmm1, 0x4E
pminub xmm1, xmm3
pshufd xmm2, xmm0, 0xB1
pmaxub xmm0, xmm2
pshufd xmm3, xmm1, 0xB1
pminub xmm1, xmm3
movdqa xmm4, XMMWORD PTR [esi + 16] // src + width * 0 + 16
movdqa xmm7, XMMWORD PTR [esi + eax*4 + 16] // src + width * 4 + 16
movdqa xmm5, xmm4
pmaxub xmm4, xmm7
pminub xmm5, xmm7
pmaxub xmm4, XMMWORD PTR [esi + eax*8 + 16] // src + width * 8 + 16
pminub xmm5, XMMWORD PTR [esi + eax*8 + 16] // src + width * 8 + 16
pmaxub xmm4, XMMWORD PTR [esi + ebx*4 + 16] // src + width * 12 + 16
pminub xmm5, XMMWORD PTR [esi + ebx*4 + 16] // src + width * 12 + 16
pshufd xmm6, xmm4, 0x4E
pmaxub xmm4, xmm6
pshufd xmm7, xmm5, 0x4E
pminub xmm5, xmm7
pshufd xmm6, xmm4, 0xB1
pmaxub xmm4, xmm6
pshufd xmm7, xmm5, 0xB1
pminub xmm5, xmm7
movdqa XMMWORD PTR gDXTMin[ 0], xmm1
movdqa XMMWORD PTR gDXTMin[16], xmm5
movdqa xmm7, XMMWORD PTR kSSEByte0
punpcklbw xmm0, xmm7
punpcklbw xmm4, xmm7
punpcklbw xmm1, xmm7
punpcklbw xmm5, xmm7
movdqa xmm2, xmm0
movdqa xmm6, xmm4
psubw xmm2, xmm1
psubw xmm6, xmm5
movq MMWORD PTR gDXTRange[ 0], xmm2
movq MMWORD PTR gDXTRange[16], xmm6
psrlw xmm2, 4
psrlw xmm6, 4
psubw xmm0, xmm2
psubw xmm4, xmm6
paddw xmm1, xmm2
paddw xmm5, xmm6
punpcklwd xmm0, xmm1
pmullw xmm0, XMMWORD PTR kSSEBoundScale
pand xmm0, XMMWORD PTR kSSEBoundsMask
movdqa XMMWORD PTR gDXTBounds[ 0], xmm0
punpcklwd xmm4, xmm5
pmullw xmm4, XMMWORD PTR kSSEBoundScale
pand xmm4, XMMWORD PTR kSSEBoundsMask
movdqa XMMWORD PTR gDXTBounds[16], xmm4
mov eax, DWORD PTR gDXTBounds[ 0]
mov ebx, DWORD PTR gDXTBounds[16]
shr eax, 8
shr ebx, 8
movzx ecx, WORD PTR gDXTBounds[13]
movzx edx, WORD PTR gDXTBounds[29]
mov DWORD PTR [edi + 0], ecx
mov DWORD PTR [edi + 16], edx
or eax, DWORD PTR gDXTBounds[ 4]
or ebx, DWORD PTR gDXTBounds[20]
or eax, DWORD PTR gDXTBounds[ 8]
or ebx, DWORD PTR gDXTBounds[24]
mov DWORD PTR [edi + 8], eax
mov DWORD PTR [edi + 24], ebx
movzx eax, WORD PTR gDXTRange [ 6]
movzx ebx, WORD PTR gDXTRange [22]
mov eax, DWORD PTR kAlphaDividerTable[eax*4]
mov ebx, DWORD PTR kAlphaDividerTable[ebx*4]
movzx ecx, WORD PTR gDXTRange [ 0]
movzx edx, WORD PTR gDXTRange [16]
add cx, WORD PTR gDXTRange [ 2]
add dx, WORD PTR gDXTRange [18]
add cx, WORD PTR gDXTRange [ 4]
add dx, WORD PTR gDXTRange [20]
movzx ecx, WORD PTR kColorDividerTable[ecx*4]
movzx edx, WORD PTR kColorDividerTable[edx*4]
or ecx, eax
or edx, ebx
mov eax, DWORD PTR width ; width * 1
lea ebx, DWORD PTR [eax + eax*2] ; width * 3
movdqa xmm0, XMMWORD PTR [esi + 0] ; src + width * 0 + 0
movdqa xmm1, XMMWORD PTR [esi + eax*4 + 0] ; src + width * 4 + 0
movdqa xmm7, XMMWORD PTR gDXTMin[ 0]
psubb xmm0, xmm7
psubb xmm1, xmm7
movdqa xmm2, XMMWORD PTR [esi + eax*8 + 0] ; src + 8 * width + 0
psubb xmm2, xmm7
movdqa xmm3, XMMWORD PTR [esi + ebx*4 + 0] ; src + 12 * width + 0
psubb xmm3, xmm7
movdqa xmm6, XMMWORD PTR kSSEIndicesMask0
movdqa xmm7, XMMWORD PTR kSSEWord8
movdqa xmm4, xmm0
movdqa xmm5, xmm1
pand xmm0, xmm6
pand xmm1, xmm6
psrlw xmm4, 8
psrlw xmm5, 8
pmaddwd xmm0, xmm7
pmaddwd xmm1, xmm7
psllw xmm4, 3
psllw xmm5, 3
paddw xmm0, xmm4
paddw xmm1, xmm5
movdqa xmm4, xmm2
movdqa xmm5, xmm3
pand xmm2, xmm6
pand xmm3, xmm6
psrlw xmm4, 8
psrlw xmm5, 8
pmaddwd xmm2, xmm7
pmaddwd xmm3, xmm7
psllw xmm4, 3
psllw xmm5, 3
paddw xmm2, xmm4
paddw xmm3, xmm5
movd xmm7, ecx
pshufd xmm7, xmm7, 0x00
pmulhw xmm0, xmm7
pmulhw xmm1, xmm7
pshuflw xmm0, xmm0, 0xD8
pshufhw xmm0, xmm0, 0xD8
pshuflw xmm1, xmm1, 0xD8
pshufhw xmm1, xmm1, 0xD8
movdqa xmm6, XMMWORD PTR kSSEIndicesScale1
pmaddwd xmm0, xmm6
pmaddwd xmm1, xmm6
packssdw xmm0, xmm1
pshuflw xmm0, xmm0, 0xD8
pshufhw xmm0, xmm0, 0xD8
pmaddwd xmm0, XMMWORD PTR kSSEWord1
movdqa XMMWORD PTR gDXTIndices[ 0 ], xmm0
pmulhw xmm2, xmm7
pmulhw xmm3, xmm7
pshuflw xmm2, xmm2, 0xD8
pshufhw xmm2, xmm2, 0xD8
pshuflw xmm3, xmm3, 0xD8
pshufhw xmm3, xmm3, 0xD8
pmaddwd xmm2, xmm6
pmaddwd xmm3, xmm6
packssdw xmm2, xmm3
pshuflw xmm2, xmm2, 0xD8
pshufhw xmm2, xmm2, 0xD8
pmaddwd xmm2, XMMWORD PTR kSSEWord1
movdqa XMMWORD PTR gDXTIndices[16], xmm2
movdqa xmm0, XMMWORD PTR [esi + 16] // src + width * 0 + 16
movdqa xmm1, XMMWORD PTR [esi + eax*4 + 16] // src + width * 4 + 16
movdqa xmm7, XMMWORD PTR gDXTMin[16]
psubb xmm0, xmm7
psubb xmm1, xmm7
movdqa xmm2, XMMWORD PTR [esi + eax*8 + 16] // src + width * 8 + 16
psubb xmm2, xmm7
movdqa xmm3, XMMWORD PTR [esi + ebx*4 + 16] // src + width * 12 + 16
psubb xmm3, xmm7
movdqa xmm6, XMMWORD PTR kSSEIndicesMask0
movdqa xmm7, XMMWORD PTR kSSEWord8
movdqa xmm4, xmm0
movdqa xmm5, xmm1
pand xmm0, xmm6
pand xmm1, xmm6
pmaddwd xmm0, xmm7
pmaddwd xmm1, xmm7
psrlw xmm4, 8
psrlw xmm5, 8
psllw xmm4, 3
psllw xmm5, 3
paddw xmm0, xmm4
paddw xmm1, xmm5
movdqa xmm4, xmm2
movdqa xmm5, xmm3
pand xmm2, xmm6
pand xmm3, xmm6
pmaddwd xmm2, xmm7
pmaddwd xmm3, xmm7
psrlw xmm4, 8
psrlw xmm5, 8
psllw xmm4, 3
psllw xmm5, 3
paddw xmm2, xmm4
paddw xmm3, xmm5
movd xmm7, edx
pshufd xmm7, xmm7, 0x00
pmulhw xmm0, xmm7
pmulhw xmm1, xmm7
pshuflw xmm0, xmm0, 0xD8
pshufhw xmm0, xmm0, 0xD8
pshuflw xmm1, xmm1, 0xD8
pshufhw xmm1, xmm1, 0xD8
movdqa xmm6, XMMWORD PTR kSSEIndicesScale1
pmaddwd xmm0, xmm6
pmaddwd xmm1, xmm6
packssdw xmm0, xmm1
pshuflw xmm0, xmm0, 0xD8
pshufhw xmm0, xmm0, 0xD8
pmaddwd xmm0, XMMWORD PTR kSSEWord1
movdqa XMMWORD PTR gDXTIndices[32], xmm0
pmulhw xmm2, xmm7
pmulhw xmm3, xmm7
pshuflw xmm2, xmm2, 0xD8
pshufhw xmm2, xmm2, 0xD8
pshuflw xmm3, xmm3, 0xD8
pshufhw xmm3, xmm3, 0xD8
pmaddwd xmm2, xmm6
pmaddwd xmm3, xmm6
packssdw xmm2, xmm3
pshuflw xmm2, xmm2, 0xD8
pshufhw xmm2, xmm2, 0xD8
pmaddwd xmm2, XMMWORD PTR kSSEWord1
movdqa XMMWORD PTR gDXTIndices[48], xmm2
movzx eax, BYTE PTR gDXTIndices[ 0]
movzx ebx, BYTE PTR gDXTIndices[ 8]
mov cl, BYTE PTR kColorIndicesTable[eax*1 + 0]
mov ch, BYTE PTR kColorIndicesTable[ebx*1 + 0]
mov BYTE PTR [edi + 12], cl
mov BYTE PTR [edi + 13], ch
movzx eax, BYTE PTR gDXTIndices[16]
movzx ebx, BYTE PTR gDXTIndices[24]
mov dl, BYTE PTR kColorIndicesTable[eax*1 + 0]
mov dh, BYTE PTR kColorIndicesTable[ebx*1 + 0]
mov BYTE PTR [edi + 14], dl
mov BYTE PTR [edi + 15], dh
movzx eax, BYTE PTR gDXTIndices[32]
movzx ebx, BYTE PTR gDXTIndices[40]
mov cl, BYTE PTR kColorIndicesTable[eax*1 + 0]
mov ch, BYTE PTR kColorIndicesTable[ebx*1 + 0]
mov BYTE PTR [edi + 28], cl
mov BYTE PTR [edi + 29], ch
movzx eax, BYTE PTR gDXTIndices[48]
movzx ebx, BYTE PTR gDXTIndices[56]
mov dl, BYTE PTR kColorIndicesTable[eax*1 + 0]
mov dh, BYTE PTR kColorIndicesTable[ebx*1 + 0]
mov BYTE PTR [edi + 30], dl
mov BYTE PTR [edi + 31], dh
movzx eax, BYTE PTR gDXTIndices[ 4]
movzx ebx, BYTE PTR gDXTIndices[36]
mov cx, WORD PTR kAlphaIndicesTable[eax*2 + 0]
mov dx, WORD PTR kAlphaIndicesTable[ebx*2 + 0]
movzx eax, BYTE PTR gDXTIndices[ 5]
movzx ebx, BYTE PTR gDXTIndices[37]
or cx, WORD PTR kAlphaIndicesTable[eax*2 + 128]
or dx, WORD PTR kAlphaIndicesTable[ebx*2 + 128]
movzx eax, BYTE PTR gDXTIndices[12]
movzx ebx, BYTE PTR gDXTIndices[44]
or cx, WORD PTR kAlphaIndicesTable[eax*2 + 256]
or dx, WORD PTR kAlphaIndicesTable[ebx*2 + 256]
mov WORD PTR [edi + 2], cx
mov WORD PTR [edi + 18], dx
mov cx, WORD PTR kAlphaIndicesTable[eax*2 + 384]
mov dx, WORD PTR kAlphaIndicesTable[ebx*2 + 384]
movzx eax, BYTE PTR gDXTIndices[13]
movzx ebx, BYTE PTR gDXTIndices[45]
or cx, WORD PTR kAlphaIndicesTable[eax*2 + 512]
or dx, WORD PTR kAlphaIndicesTable[ebx*2 + 512]
movzx eax, BYTE PTR gDXTIndices[20]
movzx ebx, BYTE PTR gDXTIndices[52]
or cx, WORD PTR kAlphaIndicesTable[eax*2 + 640]
or dx, WORD PTR kAlphaIndicesTable[ebx*2 + 640]
movzx eax, BYTE PTR gDXTIndices[21]
movzx ebx, BYTE PTR gDXTIndices[53]
or cx, WORD PTR kAlphaIndicesTable[eax*2 + 768]
or dx, WORD PTR kAlphaIndicesTable[ebx*2 + 768]
mov WORD PTR [edi + 4], cx
mov WORD PTR [edi + 20], dx
mov cx, WORD PTR kAlphaIndicesTable[eax*2 + 896]
mov dx, WORD PTR kAlphaIndicesTable[ebx*2 + 896]
movzx eax, BYTE PTR gDXTIndices[28]
movzx ebx, BYTE PTR gDXTIndices[60]
or cx, WORD PTR kAlphaIndicesTable[eax*2 + 1024]
or dx, WORD PTR kAlphaIndicesTable[ebx*2 + 1024]
movzx eax, BYTE PTR gDXTIndices[29]
movzx ebx, BYTE PTR gDXTIndices[61]
or cx, WORD PTR kAlphaIndicesTable[eax*2 + 1152]
or dx, WORD PTR kAlphaIndicesTable[ebx*2 + 1152]
mov WORD PTR [edi + 6], cx
mov WORD PTR [edi + 22], dx
add esi, 32 // src += 32
add edi, 32 // dst += 32
sub DWORD PTR x_count, 8
jnz x_loop
mov eax, DWORD PTR width // width * 1
lea ebx, DWORD PTR [eax + eax*2] // width * 3
lea esi, DWORD PTR [esi + ebx*4] // src += width * 12
sub DWORD PTR y_count, 4
jnz y_loop
}
}
| [
"shawnpresser@gmail.com"
] | shawnpresser@gmail.com |
44feb85996c247847678a8efb5ab3afa0979363f | 9eea40ddd084afd5da7b057c21b7f1032b40375d | /v8-link/jsc-v8-isolate.cc.inl | f66797eccf75c2918e38e8e279e87b285ed4e426 | [
"BSD-3-Clause"
] | permissive | zhj149/ngui | 7ef982f5fb018532fed1c27a1285c87a9c73d449 | f5c9a82b2ce64eb914727a23299dbb86286f26dc | refs/heads/master | 2021-05-10T21:07:24.764653 | 2018-01-16T02:17:39 | 2018-01-16T02:17:39 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 23,069 | inl | /* ***** BEGIN LICENSE BLOCK *****
* Distributed under the BSD license:
*
* Copyright (c) 2015, xuewen.chu
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of xuewen.chu nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL xuewen.chu BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* ***** END LICENSE BLOCK ***** */
v8_ns(internal)
static pthread_key_t specific_key;
static pthread_once_t specific_init_done = PTHREAD_ONCE_INIT;
static std::string unknown("[Unknown]");
static std::mutex* global_isolate_mutex = nullptr;
static int global_isolate_count = 0;
static Isolate* global_isolate = nullptr;
static int id = 0;
static const char* v8_version_string = V8_VERSION_STRING;
struct ThreadSpecific {
Isolate* isolate;
static void init() {
int err = pthread_key_create(&specific_key, destructor);
global_isolate_mutex = new std::mutex;
}
static void destructor(void * ptr) {
delete reinterpret_cast<ThreadSpecific*>(ptr);
}
static ThreadSpecific* get_data() {
auto ptr = reinterpret_cast<ThreadSpecific*>(pthread_getspecific(specific_key));
if ( !ptr ) {
ptr = new ThreadSpecific();
memset(ptr, 0, sizeof(ThreadSpecific));
pthread_setspecific(specific_key, ptr);
}
return ptr;
}
};
// -------------------------------------------------------------
static const int64_t DECIMAL_MULTIPLE[] = {
1,
10,
100,
1000,
10000,
100000,
1000000,
10000000,
100000000,
1000000000,
};
struct JSCStringTraits: public DefaultTraits {
inline static bool Retain(JSStringRef str) {
if ( str ) return JSStringRetain(str); else return false;
}
inline static void Release(JSStringRef str) {
if ( str ) JSStringRelease(str);
}
};
struct JSCPropertyNameArrayTraits: public DefaultTraits {
inline static bool Retain(JSPropertyNameArrayRef arr) {
if ( arr ) return JSPropertyNameArrayRetain(arr); else return false;
}
inline static void Release(JSPropertyNameArrayRef arr) {
if ( arr ) JSPropertyNameArrayRelease(arr);
}
};
typedef UniquePtr<OpaqueJSString, JSCStringTraits> JSCStringPtr;
typedef UniquePtr<OpaqueJSPropertyNameArray, JSCPropertyNameArrayTraits> JSCPropertyNameArrayPtr;
template<class T = Value>
inline Local<T> Cast(JSValueRef o) {
return *reinterpret_cast<Local<T>*>(&o);
}
template<class T = Value>
inline Local<T> Cast(const Object* o) {
return *reinterpret_cast<Local<T>*>(const_cast<Object**>(&o));
}
template<class T = JSValueRef, class S>
inline T Back(Local<S> o) {
return reinterpret_cast<T>(*o);
}
template<class T = JSValueRef>
inline T Back(const Value* v) {
return reinterpret_cast<T>(const_cast<Value*>(v));
}
template<class T>
static T* Retain(T* t) {
if (t) {
t->retain(); return t;
}
return nullptr;
}
static JSValueRef Retain(JSContextRef ctx, JSValueRef t) {
if (t) {
JSValueProtect(ctx, t);
return t;
}
return nullptr;
}
inline JSValueRef ScopeRetain(Isolate* isolate, JSValueRef value);
template<class T>
static T* Release(T* t) {
if (t) {
t->release(); return t;
}
return nullptr;
}
static JSValueRef Release(JSContextRef ctx, JSValueRef t) {
if (t) {
JSValueUnprotect(ctx, t);
return t;
}
return nullptr;
}
class Microtask {
public:
enum CallbackStyle {
Callback,
JSFunction,
};
Microtask(const Microtask& micro) = delete;
inline Microtask(Microtask&& micro)
: m_style(micro.m_style)
, m_microtask(micro.m_microtask)
, m_data(micro.m_data) {
micro.m_microtask = nullptr;
micro.m_data = nullptr;
}
inline Microtask(MicrotaskCallback microtask, void* data = nullptr)
: m_style(Callback)
, m_microtask((void*)microtask), m_data(data) {
}
inline Microtask(Isolate* isolate, Local<Function> microtask);
inline ~Microtask() { Reset(); }
inline void Reset();
inline bool Run(Isolate* isolate);
private:
CallbackStyle m_style = Callback;
void* m_microtask = nullptr;
void* m_data = nullptr;
};
class IsolateData {
public:
void Initialize(JSGlobalContextRef ctx) {
#define __ok() &ex); do { CHECK(ex==nullptr); }while(0
#define SET_ARRTIBUTES(name) m_##name = (JSObjectRef) \
JSObjectGetProperty(ctx, exports, i::name##_s, __ok()); \
JSValueProtect(ctx, m_##name);
m_ctx = ctx;
JSValueRef ex = nullptr;
auto exports = run_native_script(ctx, (const char*)
native_js::JSC_native_js_code_jsc_v8_isolate_,
"[jsc-v8-isolate.js]");
JS_ISOLATE_DATA(SET_ARRTIBUTES)
}
void Destroy() {
#define DEL_ARRTIBUTES(name) JSValueUnprotect(m_ctx, m_##name);
JS_ISOLATE_DATA(DEL_ARRTIBUTES)
}
static JSObjectRef run_native_script(JSGlobalContextRef ctx,
const char* script, const char* name) {
JSValueRef ex = nullptr;
JSObjectRef global = (JSObjectRef)JSContextGetGlobalObject(ctx);
JSCStringPtr jsc_v8_js = JSStringCreateWithUTF8CString(name);
JSCStringPtr script2 = JSStringCreateWithUTF8CString(script);
auto fn = (JSObjectRef)JSEvaluateScript(ctx, *script2, 0, *jsc_v8_js, 1, __ok());
auto exports = JSObjectMake(ctx, 0, 0);
JSValueRef argv[2] = { exports, global };
JSObjectCallAsFunction(ctx, fn, 0, 2, argv, __ok());
return exports;
}
private:
JSGlobalContextRef m_ctx;
#define DEF_ARRTIBUTES(name) \
public: JSObjectRef name() { return m_##name; } \
private: JSObjectRef m_##name;
JS_ISOLATE_DATA(DEF_ARRTIBUTES)
};
class ContextData {
public:
void Initialize(JSGlobalContextRef ctx) {
m_ctx = ctx;
JSValueRef ex = nullptr;
auto exports = IsolateData::run_native_script(ctx, (const char*)
native_js::JSC_native_js_code_jsc_v8_context_,
"[jsc-v8-context.js]");
JS_CONTEXT_DATA(SET_ARRTIBUTES)
}
void Destroy() {
JS_CONTEXT_DATA(DEL_ARRTIBUTES)
}
void Reset() {
#define RESET_ARRTIBUTES(name) JSValueUnprotect(m_ctx, m_##name);
JS_CONTEXT_DATA(RESET_ARRTIBUTES)
}
private:
JSGlobalContextRef m_ctx;
JS_CONTEXT_DATA(DEF_ARRTIBUTES)
#undef SET_ARRTIBUTES
#undef DEF_ARRTIBUTES
#undef DEL_ARRTIBUTES
#undef RESET_ARRTIBUTES
};
/**
* @class i::Isloate
*/
class Isolate {
private:
void add_global_isolate() {
ThreadSpecific::get_data()->isolate = this;
if (global_isolate_count) {
global_isolate = nullptr;
} else {
global_isolate = this;
}
global_isolate_count++;
}
void clear_global_isolate() {
ThreadSpecific::get_data()->isolate = nullptr;
if (global_isolate == this) {
global_isolate = nullptr;
}
global_isolate_count--;
}
Isolate() {
pthread_once(&specific_init_done, ThreadSpecific::init);
std::lock_guard<std::mutex> scope(*global_isolate_mutex);
CHECK(ThreadSpecific::get_data()->isolate == nullptr);
add_global_isolate();
m_group = JSContextGroupCreate();
m_default_jsc_ctx = JSGlobalContextCreateInGroup(m_group, nullptr);
ScopeClear clear([this]() {
JSGlobalContextRelease(m_default_jsc_ctx);
JSContextGroupRelease(m_group);
clear_global_isolate();
});
Initialize();
clear.cancel();
}
void Initialize() {
#define ok() &ex); do { CHECK(ex==nullptr); }while(0
m_thread_id = std::this_thread::get_id();
m_microtask_policy = MicrotasksPolicy::kAuto;
auto ctx = m_default_jsc_ctx;
JSObjectRef global = (JSObjectRef)JSContextGetGlobalObject(ctx);
JSValueRef ex = nullptr;
Isolate* isolate = this;
v8::HandleScope scope(reinterpret_cast<v8::Isolate*>(this));
m_undefined = JSValueMakeUndefined(ctx); JSValueProtect(ctx, m_undefined);
m_null = JSValueMakeNull(ctx); JSValueProtect(ctx, m_null);
m_true = JSValueMakeBoolean(ctx, true); JSValueProtect(ctx, m_true);
m_false = JSValueMakeBoolean(ctx, false); JSValueProtect(ctx, m_false);
m_empty_s = JSValueMakeString(ctx, empty_s); JSValueProtect(ctx, m_empty_s);
m_isolate_data.Initialize(ctx);
m_default_context_data.Initialize(ctx);
InitializeTemplate();
// LOG("%d", v8::HandleScope::NumberOfHandles(reinterpret_cast<v8::Isolate*>(this)));
#undef ok
}
~Isolate() {
std::lock_guard<std::mutex> scope(*global_isolate_mutex);
CHECK(!m_cur_ctx);
m_has_terminated = true;
m_exception = nullptr;
auto ctx = m_default_jsc_ctx;
JSValueUnprotect(ctx, m_undefined);
JSValueUnprotect(ctx, m_null);
JSValueUnprotect(ctx, m_true);
JSValueUnprotect(ctx, m_false);
JSValueUnprotect(ctx, m_empty_s);
if (m_message_listener_data) {
JSValueUnprotect(ctx, m_message_listener_data);
}
DisposeTemplate();
m_isolate_data.Destroy();
m_default_context_data.Destroy();
m_has_destroy = true;
JSGlobalContextRelease(m_default_jsc_ctx);
JSContextGroupRelease(m_group);
clear_global_isolate();
}
void InitializeTemplate();
void DisposeTemplate();
public:
inline static v8::Isolate* New(const v8::Isolate::CreateParams& params) {
auto isolate = (i::Isolate*)malloc(sizeof(i::Isolate));
memset(isolate, 0, sizeof(i::Isolate));
new(isolate) Isolate();
return reinterpret_cast<v8::Isolate*>(isolate);
}
inline JSGlobalContextRef jscc() const;
Local<String> New(const char* str, bool ascii = false) {
if (ascii) {
return String::NewFromOneByte(reinterpret_cast<v8::Isolate*>(this), (const uint8_t*)str);
} else {
return String::NewFromUtf8(reinterpret_cast<v8::Isolate*>(this), str);
}
}
inline JSObjectRef NewError(const char* message) {
auto str = JSValueMakeString(jscc(), JSStringCreateWithUTF8CString(message));
auto error = JSObjectCallAsConstructor(jscc(), Error(), 1, &str, 0);
DCHECK(error);
return error;
}
void ThrowException(JSValueRef exception, i::Message* message) {
CHECK(m_exception == nullptr ||
exception == m_exception, "Throw too many exceptions");
if (!JSValueIsObject(jscc(), exception)) {
exception = JSObjectCallAsConstructor(jscc(), Error(), 1, &exception, 0);
DCHECK(exception);
}
m_exception = exception;
if (m_try_catch || m_call_stack == 0) {
i::Message* m = message;
if (!m) {
auto msg = Exception::CreateMessage(reinterpret_cast<v8::Isolate*>(this),
i::Cast(exception));
m = reinterpret_cast<i::Message*>(*msg);
}
if (m_try_catch) {
m_try_catch->message_obj_ = m;
} else { // top stack throw
auto data = m_message_listener_data ? m_message_listener_data : exception;
if (m_message_listener) {
m_message_listener(Cast<v8::Message>(reinterpret_cast<class Object*>(m)),
Cast(data));
} else {
PrintMessage(m);
}
}
}
}
void ThrowException(JSValueRef exception) {
ThrowException(exception, nullptr);
}
static inline void PrintMessage(i::Message* message);
bool AddMessageListener(MessageCallback that, Local<Value> data) {
m_message_listener = that;
if (m_message_listener_data) {
JSValueUnprotect(jscc(), m_message_listener_data);
m_message_listener_data = nullptr;
}
if (!data.IsEmpty()) {
m_message_listener_data = Back(data);
JSValueProtect(jscc(), m_message_listener_data);
}
return true;
}
static JSValueRef ScopeRetain(HandleScope* scope, JSValueRef value) {
struct HS {
Isolate* isolate;
HandleScope* prev;
std::vector<JSValueRef>* values;
};
auto hs = reinterpret_cast<HS*>(scope);
if (!hs->isolate->HasDestroy()) {
JSValueProtect(hs->isolate->jscc(), value);
hs->values->push_back(value);
}
return value;
}
inline JSValueRef ScopeRetain(JSValueRef value) {
return ScopeRetain(m_handle_scope, value);
}
inline static Isolate* Current() {
if (global_isolate)
return global_isolate;
auto isolate = ThreadSpecific::get_data()->isolate;
DCHECK(isolate);
return isolate;
}
inline static Isolate* Current(const v8::Isolate* isolate) {
DCHECK(isolate);
return reinterpret_cast<Isolate*>(const_cast<v8::Isolate*>(isolate));
}
inline static Isolate* Current(Isolate* isolate) {
DCHECK(isolate);
return isolate;
}
inline static JSStringRef ToJSString(Isolate* isolate, Local<Value> value) {
return ToJSString(isolate, i::Back(value));
}
inline static JSStringRef ToJSString(Isolate* isolate, JSValueRef value) {
JSStringRef r = JSValueToStringCopy(JSC_CTX(isolate), value, 0);
CHECK(r); return r;
}
inline static std::string ToSTDString(Isolate* isolate, Local<Value> value) {
v8::String::Utf8Value utf8(value);
return *utf8;
}
inline static std::string ToSTDString(Isolate* isolate, JSValueRef value) {
return ToSTDString(isolate, Cast(value));
}
static std::string ToSTDString(Isolate* isolate, JSStringRef value) {
size_t bufferSize = JSStringGetMaximumUTF8CStringSize(value);
char* str = (char*)malloc(bufferSize);
JSStringGetUTF8CString(value, str, bufferSize);
std::string r = str;
free(str);
return r;
}
inline static JSStringRef IndexedToPropertyName(Isolate* isolate, uint32_t index) {
char s[11];
sprintf(s, "%u", index);
JSStringRef r = JSStringCreateWithUTF8CString(s);
CHECK(r); return r;
}
static bool PropertyNameToIndexed(JSStringRef propertyName, uint32_t& out) {
out = 0;
uint len = (uint)JSStringGetLength(propertyName);
if ( len > 10 ) { // 32无符号最长表示为`4294967295`
return false;
}
const JSChar* chars = JSStringGetCharactersPtr(propertyName);
for ( int i = 0; i < len; i++ ) {
JSChar num = chars[i] - '0';
if ( 0 <= num && num <= 9 ) {
out += (num * DECIMAL_MULTIPLE[len - 1 - i]);
} else {
return false; // not int number
}
}
return true;
}
inline void Dispose() {
delete this;
}
inline void SetEmbedderData(uint32_t slot, void* data) {
CHECK(slot < Internals::kNumIsolateDataSlots);
m_data[slot] = data;
}
inline void* GetEmbedderData(uint32_t slot) const {
CHECK(slot < Internals::kNumIsolateDataSlots);
return m_data[slot];
}
inline Local<v8::Context> GetCurrentContext() {
return *reinterpret_cast<Local<v8::Context>*>(&m_cur_ctx);
}
inline Context* GetContext() { return m_cur_ctx; }
void RunMicrotasks(bool Explicit);
inline JSValueRef Undefined() { return m_undefined; }
inline JSValueRef TheHoleValue() { return m_the_hole_value; }
inline JSValueRef Null() { return m_null; }
inline JSValueRef True() { return m_true; }
inline JSValueRef False() { return m_true; }
inline JSValueRef Empty() { return m_empty_s; }
inline JSObjectRef External() { return m_External; }
inline ObjectTemplate* ExternalTemplate() { return m_external_template; }
inline ObjectTemplate* DefaultPlaceholderTemplate() { return m_default_placeholder_template; }
inline ObjectTemplate* CInfoPlaceholderTemplate() { return m_cinfo_placeholder_template; }
inline FatalErrorCallback ExceptionBehavior() const { return m_exception_behavior; }
inline bool HasTerminated() const { return m_has_terminated; }
inline bool HasDestroy() const { return m_has_destroy; }
inline std::thread::id ThreadID() const { return m_thread_id; }
inline int CallStackCount() const { return m_call_stack; }
void Terminated() {}
void CancelTerminated() {}
#define DEF_ARRTIBUTES(NAME) \
public: JSObjectRef NAME() { return m_isolate_data.NAME(); }
JS_ISOLATE_DATA(DEF_ARRTIBUTES)
#undef DEF_ARRTIBUTES
#define DEF_ARRTIBUTES(NAME) \
public: JSObjectRef NAME();
JS_CONTEXT_DATA(DEF_ARRTIBUTES)
#undef DEF_ARRTIBUTES
private:
JSContextGroupRef m_group;
JSGlobalContextRef m_default_jsc_ctx;
JSValueRef m_exception;
Context* m_cur_ctx;
JSValueRef m_undefined; // kUndefinedValueRootIndex = 4;
JSValueRef m_the_hole_value;// kTheHoleValueRootIndex = 5;
JSValueRef m_null; // kNullValueRootIndex = 6;
JSValueRef m_true; // kTrueValueRootIndex = 7;
JSValueRef m_false; // kFalseValueRootIndex = 8;
JSValueRef m_empty_s; // kEmptyStringRootIndex = 9;
JSObjectRef m_External;
ObjectTemplate* m_external_template;
ObjectTemplate* m_default_placeholder_template;
ObjectTemplate* m_cinfo_placeholder_template;
TryCatch* m_try_catch;
HandleScope* m_handle_scope;
MessageCallback m_message_listener;
JSValueRef m_message_listener_data;
FatalErrorCallback m_exception_behavior;
v8::Isolate::AbortOnUncaughtExceptionCallback m_abort_on_uncaught_exception_callback;
std::map<size_t, MicrotasksCompletedCallback> m_microtasks_completed_callback;
std::vector<PrivateData*> m_garbage_handle;
std::mutex m_garbage_handle_mutex;
std::thread::id m_thread_id;
std::vector<Microtask> m_microtask;
MicrotasksPolicy m_microtask_policy;
IsolateData m_isolate_data;
ContextData m_default_context_data;
bool m_has_terminated;
bool m_has_destroy;
int m_call_stack;
void* m_data[Internals::kNumIsolateDataSlots];
friend class Context;
friend class v8::Isolate;
friend class v8::Context;
friend class v8::TryCatch;
friend struct CallbackInfo;
friend class v8::Utils;
friend class v8::Private;
friend class v8::Symbol;
friend class PrivateData;
friend class v8::HandleScope;
friend class v8::EscapableHandleScope;
};
JSValueRef ScopeRetain(Isolate* isolate, JSValueRef value) {
return isolate->ScopeRetain(value);
}
Microtask::Microtask(Isolate* isolate, Local<Function> microtask)
: m_style(JSFunction)
, m_microtask(*microtask)
, m_data(isolate) {
DCHECK(m_microtask);
JSValueProtect(JSC_CTX(isolate), reinterpret_cast<JSValueRef>(m_microtask));
}
void Microtask::Reset() {
if (m_microtask) {
if (m_style == JSFunction) {
DCHECK(m_data);
auto isolate = reinterpret_cast<Isolate*>(m_data);
JSValueUnprotect(JSC_CTX(isolate), reinterpret_cast<JSValueRef>(m_microtask));
}
m_microtask = nullptr;
}
}
bool Microtask::Run(Isolate* iso) {
if (m_style == Callback) {
reinterpret_cast<MicrotaskCallback>(m_microtask)(m_data);
} else {
ENV(iso);
auto f = reinterpret_cast<JSObjectRef>(m_microtask);
JSObjectCallAsFunction(ctx, f, 0, 0, 0, OK(false));
}
return true;
}
void Isolate::RunMicrotasks(bool Explicit) {
if (m_microtask.size()) {
std::vector<Microtask> microtask = std::move(m_microtask);
for (auto& i: microtask) {
if (!i.Run(this)) return;
}
if (Explicit) {
for (auto& i: m_microtasks_completed_callback) {
i.second(reinterpret_cast<v8::Isolate*>(this));
}
}
}
}
v8_ns_end
// --- I s o l a t e ---
V8_EXPORT JSGlobalContextRef javascriptcore_context(v8::Isolate* isolate) {
return ISOLATE(isolate)->jscc();
}
HeapProfiler* Isolate::GetHeapProfiler() {
static uint64_t ptr = 0;
return reinterpret_cast<HeapProfiler*>(&ptr);
}
CpuProfiler* Isolate::GetCpuProfiler() {
static uint64_t ptr = 0;
return reinterpret_cast<CpuProfiler*>(&ptr);
}
bool Isolate::InContext() {
return reinterpret_cast<v8::Isolate*>(ISOLATE()) == this;
}
v8::Local<v8::Context> Isolate::GetCurrentContext() {
return ISOLATE(this)->GetCurrentContext();
}
v8::Local<Value> Isolate::ThrowException(v8::Local<v8::Value> value) {
ENV(this);
isolate->ThrowException(i::Back(value));
return i::Cast(isolate->Undefined());
}
Isolate* Isolate::GetCurrent() {
return reinterpret_cast<v8::Isolate*>(ISOLATE());
}
Isolate* Isolate::New(const Isolate::CreateParams& params) {
return i::Isolate::New(params);
}
void Isolate::Dispose() {
ISOLATE(this)->Dispose();
}
void Isolate::TerminateExecution() {
return ISOLATE(this)->Terminated();
}
bool Isolate::IsExecutionTerminating() {
return ISOLATE(this)->HasTerminated();
}
void Isolate::CancelTerminateExecution() {
ISOLATE(this)->CancelTerminated();
}
void Isolate::LowMemoryNotification() {
JSGarbageCollect(JSC_CTX(this));
}
bool Isolate::AddMessageListener(MessageCallback that, Local<Value> data) {
return ISOLATE(this)->AddMessageListener(that, data);
}
void Isolate::SetFatalErrorHandler(FatalErrorCallback that) {
ISOLATE(this)->m_exception_behavior = that;
}
void Isolate::SetAbortOnUncaughtExceptionCallback(AbortOnUncaughtExceptionCallback callback) {
ISOLATE(this)->m_abort_on_uncaught_exception_callback = callback;
}
// --- Isolate Microtasks ---
void Isolate::AddMicrotasksCompletedCallback(MicrotasksCompletedCallback callback) {
ISOLATE(this)->m_microtasks_completed_callback[size_t(callback)] = callback;
}
void Isolate::RemoveMicrotasksCompletedCallback(MicrotasksCompletedCallback callback) {
ISOLATE(this)->m_microtasks_completed_callback.erase(size_t(callback));
}
void Isolate::RunMicrotasks() {
ISOLATE(this)->RunMicrotasks(true);
}
void Isolate::EnqueueMicrotask(Local<Function> microtask) {
ISOLATE(this)->m_microtask.push_back(i::Microtask(ISOLATE(this), microtask));
}
void Isolate::EnqueueMicrotask(MicrotaskCallback microtask, void* data) {
ISOLATE(this)->m_microtask.push_back(i::Microtask(microtask, data));
}
void Isolate::SetAutorunMicrotasks(bool autorun) {
ISOLATE(this)->m_microtask_policy =
autorun ? MicrotasksPolicy::kAuto : MicrotasksPolicy::kExplicit;
}
bool Isolate::WillAutorunMicrotasks() const {
return false;
}
void Isolate::SetMicrotasksPolicy(MicrotasksPolicy policy) {
ISOLATE(this)->m_microtask_policy = policy;
}
MicrotasksPolicy Isolate::GetMicrotasksPolicy() const {
return ISOLATE(this)->m_microtask_policy;
}
| [
"louistru@hotmail.com"
] | louistru@hotmail.com |
c6a30f65d2aa75eaf23c503ca5c134e2e51370c1 | f5e74e06f86e3bc7f82fd02bbcdd2cbe465c75e2 | /GameFramework/PP01.HelloSDL/InputHandler.cpp | fca198cc0bd728b0a3546a1465a3a0a9dc7d5ed4 | [] | no_license | vRien/20171118 | 9bc719c71cd685dbe4571a19eb1701ae7b59a75f | 12198866bb99caa305aa0ac98fb84e7091f7719b | refs/heads/master | 2020-04-05T07:16:30.271418 | 2018-11-15T17:59:04 | 2018-11-15T17:59:04 | 156,669,485 | 0 | 0 | null | null | null | null | WINDOWS-1252 | C++ | false | false | 2,012 | cpp | #include "InputHandler.h"
#include "Game.h"
InputHandler* InputHandler::s_pInstance = 0;
InputHandler::InputHandler()
{
m_mousePosition = new Vector2D(0, 0);
for (int i = 0; i < 3; i++)
{
m_mouseButtonStates.push_back(false);
}
}
void InputHandler::clean()
{
// ÇâÈÄ Ãß°¡
}
void InputHandler::update()
{
SDL_PollEvent(&event);
switch (event.type)
{
case SDL_QUIT:
TheGame::Instance()->quit();
break;
case SDL_MOUSEMOTION:
onMouseMove(event);
break;
case SDL_MOUSEBUTTONDOWN:
onMouseButtonDown(event);
break;
case SDL_MOUSEBUTTONUP:
onMouseButtonUp(event);
break;
case SDL_KEYDOWN:
onKeyDown();
break;
case SDL_KEYUP:
onKeyUp();
break;
default:
break;
}
if (event.type == SDL_KEYUP)
{
m_keystates = SDL_GetKeyboardState(0);
}
if (event.type == SDL_KEYDOWN)
{
m_keystates = SDL_GetKeyboardState(0);
}
if (event.type == SDL_MOUSEMOTION)
{
m_mousePosition->setX(event.motion.x);
m_mousePosition->setY(event.motion.y);
}
else if (event.type == SDL_MOUSEBUTTONDOWN)
{
if (event.button.button == SDL_BUTTON_LEFT)
{
m_mouseButtonStates[LEFT] = true;
}
if (event.button.button == SDL_BUTTON_MIDDLE)
{
m_mouseButtonStates[MIDDLE] = true;
}
if (event.button.button == SDL_BUTTON_RIGHT)
{
m_mouseButtonStates[RIGHT] = true;
}
}
else if (event.type == SDL_MOUSEBUTTONUP)
{
if (event.button.button == SDL_BUTTON_LEFT)
{
m_mouseButtonStates[LEFT] = false;
}
if (event.button.button == SDL_BUTTON_MIDDLE)
{
m_mouseButtonStates[MIDDLE] = false;
}
if (event.button.button == SDL_BUTTON_RIGHT)
{
m_mouseButtonStates[RIGHT] = false;
}
}
}
bool InputHandler::isKeyDown(SDL_Scancode key)
{
if (m_keystates != 0) {
if (m_keystates[key] == 1)
{
return true;
}
else {
return false;
}
}
return false;
}
bool InputHandler::getMouseButtonState(int buttonNumber)
{
return m_mouseButtonStates[buttonNumber];
}
Vector2D* InputHandler::getMousePosition()
{
return m_mousePosition;
} | [
"kuna3844@naver.com"
] | kuna3844@naver.com |
09744c7580262cd7c57ca7a1947365315e5215b0 | ab5bd6ed10341b5c4d63fd04c4f6f809562c3485 | /tensorflow/lite/delegates/gpu/cl/kernels/conv_buffer_1x1.h | 89f0cae4ea44c9d9cc441799637fc84d3a313216 | [
"Apache-2.0"
] | permissive | Arashtbr/tensorflow | 925aef7fa7ffe99d0321fc8af13804b6dfe41b7a | 4f301f599748928f6a3471d466731cfe5b536670 | refs/heads/master | 2023-01-14T01:40:57.436443 | 2020-11-21T00:05:08 | 2020-11-21T00:12:08 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 8,406 | h | /* Copyright 2019 The TensorFlow Authors. All Rights Reserved.
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.
==============================================================================*/
#ifndef TENSORFLOW_LITE_DELEGATES_GPU_CL_KERNELS_CONV_BUFFER_1X1_H_
#define TENSORFLOW_LITE_DELEGATES_GPU_CL_KERNELS_CONV_BUFFER_1X1_H_
#include "tensorflow/lite/delegates/gpu/cl/buffer.h"
#include "tensorflow/lite/delegates/gpu/cl/cl_kernel.h"
#include "tensorflow/lite/delegates/gpu/cl/kernels/gpu_operation.h"
#include "tensorflow/lite/delegates/gpu/cl/kernels/util.h"
#include "tensorflow/lite/delegates/gpu/cl/linear_storage.h"
#include "tensorflow/lite/delegates/gpu/cl/tensor.h"
#include "tensorflow/lite/delegates/gpu/cl/util.h"
#include "tensorflow/lite/delegates/gpu/common/data_type.h"
#include "tensorflow/lite/delegates/gpu/common/operations.h"
#include "tensorflow/lite/delegates/gpu/common/shape.h"
#include "tensorflow/lite/delegates/gpu/common/status.h"
#include "tensorflow/lite/delegates/gpu/common/task/weights_layout.h"
#include "tensorflow/lite/delegates/gpu/common/tensor.h"
#include "tensorflow/lite/delegates/gpu/common/types.h"
#include "tensorflow/lite/delegates/gpu/common/winograd_util.h"
namespace tflite {
namespace gpu {
namespace cl {
class ConvBuffer1x1 : public GPUOperation {
public:
ConvBuffer1x1() = default;
// Move only
ConvBuffer1x1(ConvBuffer1x1&& operation);
ConvBuffer1x1& operator=(ConvBuffer1x1&& operation);
ConvBuffer1x1(const ConvBuffer1x1&) = delete;
ConvBuffer1x1& operator=(const ConvBuffer1x1&) = delete;
void GetPossibleKernelWorkGroups(
TuningType tuning_type, const GpuInfo& gpu_info,
const KernelInfo& kernel_info,
std::vector<int3>* work_groups) const override;
int3 GetGridSize() const override;
WeightsDescription GetWeightsDescription() const {
WeightsDescription desc;
desc.layout = WeightsLayout::kOHWIOGroupI4O4;
desc.output_group_size = conv_params_.block_size.z;
return desc;
}
struct ConvParams {
int3 block_size = int3(1, 1, 1);
int element_size = 4; // can be 4, 8 or 16
// By default in 2d convolution we have the same weights for WH dims, but in
// some cases we need separate weights for H dimension and convolution
// kernel requires very small modifications to support it.
bool different_weights_for_height = false;
};
private:
ConvBuffer1x1(const OperationDef& definition, const ConvParams& conv_params);
friend ConvBuffer1x1 CreateConvBuffer1x1(const GpuInfo& gpu_info,
const OperationDef& definition,
const Convolution2DAttributes& attr,
const BHWC* shape);
friend ConvBuffer1x1 CreateConvBuffer1x1(const GpuInfo& gpu_info,
const OperationDef& definition,
const FullyConnectedAttributes& attr,
const BHWC* shape);
friend ConvBuffer1x1 CreateConvBuffer1x1Wino4x4To6x6(
const GpuInfo& gpu_info, const OperationDef& definition,
const Convolution2DAttributes& attr, const BHWC* shape);
friend ConvBuffer1x1 CreateConvBuffer1x1DynamicWeights(
const GpuInfo& gpu_info, const OperationDef& definition,
const Convolution2DAttributes& attr, const BHWC& weights_shape,
const BHWC* dst_shape);
template <DataType T>
void UploadData(const tflite::gpu::Tensor<OHWI, T>& weights,
const tflite::gpu::Tensor<Linear, T>& biases);
template <DataType T>
void UploadDataForWinograd4x4To6x6(
const tflite::gpu::Tensor<OHWI, T>& weights);
template <DataType T>
void UploadWeights(const tflite::gpu::Tensor<OHWI, T>& weights);
template <DataType T>
void UploadBiases(const tflite::gpu::Tensor<Linear, T>& biases);
std::string GenerateConvBuffer1x1(
const OperationDef& op_def, const ConvBuffer1x1::ConvParams& conv_params,
Arguments* args);
ConvParams conv_params_;
};
template <DataType T>
void ConvBuffer1x1::UploadData(const tflite::gpu::Tensor<OHWI, T>& weights,
const tflite::gpu::Tensor<Linear, T>& biases) {
UploadWeights(weights);
UploadBiases(biases);
}
template <DataType T>
void ConvBuffer1x1::UploadDataForWinograd4x4To6x6(
const tflite::gpu::Tensor<OHWI, T>& weights) {
tflite::gpu::Tensor<OHWI, T> wino_weights;
RearrangeWeightsToWinograd4x4To6x6Weights(weights, &wino_weights);
UploadWeights(wino_weights);
tflite::gpu::Tensor<Linear, DataType::FLOAT32> bias;
bias.shape = Linear(weights.shape.o);
bias.data.resize(weights.shape.o, 0.0f);
UploadBiases(bias);
}
template <DataType T>
void ConvBuffer1x1::UploadWeights(const tflite::gpu::Tensor<OHWI, T>& weights) {
const int dst_depth = DivideRoundUp(weights.shape.o, 4);
const int src_depth = DivideRoundUp(weights.shape.i, 4);
const bool f32_weights = definition_.precision == CalculationsPrecision::F32;
const int float4_size = f32_weights ? sizeof(float4) : sizeof(half4);
const int dst_depth_aligned = AlignByN(dst_depth, conv_params_.block_size.z);
const int elements_count =
weights.shape.h * weights.shape.w * src_depth * dst_depth_aligned * 4;
BufferDescriptor desc;
desc.element_type = f32_weights ? DataType::FLOAT32 : DataType::FLOAT16;
desc.element_size = 16;
desc.memory_type = MemoryType::GLOBAL;
desc.size = float4_size * elements_count;
desc.data.resize(desc.size);
if (f32_weights) {
float4* ptr = reinterpret_cast<float4*>(desc.data.data());
RearrangeWeightsToOHWIOGroupI4O4(weights, conv_params_.block_size.z,
absl::MakeSpan(ptr, elements_count));
} else {
half4* ptr = reinterpret_cast<half4*>(desc.data.data());
RearrangeWeightsToOHWIOGroupI4O4(weights, conv_params_.block_size.z,
absl::MakeSpan(ptr, elements_count));
}
args_.AddObject("weights",
absl::make_unique<BufferDescriptor>(std::move(desc)));
}
template <DataType T>
void ConvBuffer1x1::UploadBiases(const tflite::gpu::Tensor<Linear, T>& biases) {
TensorLinearDescriptor desc;
desc.storage_type = LinearStorageType::BUFFER;
desc.element_type = definition_.GetDataType();
int depth = AlignByN(biases.shape.v, 4 * conv_params_.block_size.z) / 4;
desc.UploadLinearData(biases, depth);
args_.AddObject("biases",
absl::make_unique<TensorLinearDescriptor>(std::move(desc)));
}
bool IsConvBuffer1x1Supported(const OperationDef& definition,
const Convolution2DAttributes& attr);
bool IsConvBuffer1x1Supported(const OperationDef& definition,
const BHWC& weights_shape,
const Convolution2DAttributes& attr);
ConvBuffer1x1 CreateConvBuffer1x1(const GpuInfo& gpu_info,
const OperationDef& definition,
const Convolution2DAttributes& attr,
const BHWC* shape = nullptr);
ConvBuffer1x1 CreateConvBuffer1x1(const GpuInfo& gpu_info,
const OperationDef& definition,
const FullyConnectedAttributes& attr,
const BHWC* shape = nullptr);
ConvBuffer1x1 CreateConvBuffer1x1DynamicWeights(
const GpuInfo& gpu_info, const OperationDef& definition,
const Convolution2DAttributes& attr, const BHWC& weights_shape,
const BHWC* dst_shape = nullptr);
ConvBuffer1x1 CreateConvBuffer1x1Wino4x4To6x6(
const GpuInfo& gpu_info, const OperationDef& definition,
const Convolution2DAttributes& attr, const BHWC* shape = nullptr);
} // namespace cl
} // namespace gpu
} // namespace tflite
#endif // TENSORFLOW_LITE_DELEGATES_GPU_CL_KERNELS_CONV_BUFFER_1X1_H_
| [
"gardener@tensorflow.org"
] | gardener@tensorflow.org |
90a7f97bf306efc26d68be3cb808f4adea4e30e6 | d044d94f3af1f057c118a583ce3c05c597a6253d | /src/luabind/test/test_user_defined_converter.cpp | 552680d6c5bc23f4b46e086ad1b9583cddd0f748 | [
"MIT"
] | permissive | lonski/amarlon_dependencies | 3e4c08f40cea0cf8263f7d5ead593f981591cf17 | 1e07f90ffa3bf1aeba92ad9a9203aae4df6103e3 | refs/heads/master | 2021-01-10T08:17:16.101370 | 2016-03-28T21:29:39 | 2016-03-28T21:29:39 | 43,238,474 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,327 | cpp | // Copyright Daniel Wallin 2008. 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)
#include "test.hpp"
#include <luabind/luabind.hpp>
namespace {
struct X
{
X(lua_Integer value_)
: value(value_)
{}
lua_Integer value;
};
lua_Integer take(X x)
{
return x.value;
}
X get(lua_Integer value)
{
return X(value);
}
} // namespace unnamed
namespace luabind {
template <>
struct default_converter<X>
: native_converter_base<X>
{
int compute_score(lua_State* L, int index)
{
return cv.compute_score(L, index);
}
X from(lua_State* L, int index)
{
return X(lua_tointeger(L, index));
}
void to(lua_State* L, X const& x)
{
lua_pushinteger(L, x.value);
}
default_converter<int> cv;
};
} // namespace luabind
void test_main(lua_State* L)
{
using namespace luabind;
module(L) [
def("take", &take),
def("get", &get)
];
DOSTRING(L,
"assert(take(1) == 1)\n"
"assert(take(2) == 2)\n"
);
DOSTRING(L,
"assert(get(1) == 1)\n"
"assert(get(2) == 2)\n"
);
}
| [
"michal@lonski.pl"
] | michal@lonski.pl |
cd60407d8656305839b66062abeb0c9407381f9f | 4351d2d9b23429ce0ea215e435cff91a9c7a37c3 | /code_base/src/dynamic_modules/NonHoloEMA3D.cpp | a45b85af7fde0fe329b3b6064b5ce9e8074d221d | [] | no_license | islers/molar | bd0c802d936438a883dc19ca74e7508b79f2577d | e98de87b48862ec897256a1e172880d9d4de9521 | refs/heads/master | 2021-01-13T04:44:26.660386 | 2015-03-05T22:41:46 | 2015-03-05T22:41:46 | 28,885,944 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 11,368 | cpp | /* Copyright (c) 2014, Stefan Isler, islerstefan@bluewin.ch
*
This file is part of MOLAR (Multiple Object Localization And Recognition),
which was originally developed as part of a Bachelor thesis at the
Institute of Robotics and Intelligent Systems (IRIS) of ETH Zurich.
MOLAR 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.
MOLAR 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 Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with MOLAR. If not, see <http://www.gnu.org/licenses/>.
*/
#include "NonHoloEMA3D.h"
NonHoloEMA3d::NonHoloEMA3d( Ptr<GenericObject> _objectPointer ):NonHoloEMA(_objectPointer)
{
pPosAlpha = 0.4;
pAngAlpha = 0.8;
pSwitchAlpha = 0.05;
pDirectionSwitch = 0.5; // chosen measure for certainty about current direction (0...1) switch performed if it falls under 0.5
pHasPredicted = false;
pReflectionOccured = 0;
pLengthMax=0;
}
NonHoloEMA3d::~NonHoloEMA3d(void)
{
}
Ptr<SceneObject::State> NonHoloEMA3d::rawState( double _rawX, double _rawY, double _time, double _rawAngle, double _rawTheta, double /*_rawArea*/ ) const
{
Ptr<NonHoloEMA3d::State> rawState = new State();
rawState->raw_x = _rawX;
rawState->raw_y = _rawY;
rawState->raw_angle = _rawAngle;
rawState->type = classId;
rawState->time = _time;
rawState->thetaEstimated_raw = _rawTheta;
return rawState;
}
Ptr<GenericObject::Dynamics> NonHoloEMA3d::sfmCreator( Ptr<GenericObject> _objectPointer )
{
return new NonHoloEMA3d(_objectPointer);
}
void NonHoloEMA3d::setOptions( GenericMultiLevelMap<string>& _dynamicsOptions )
{
if( _dynamicsOptions.hasKey("position_alpha") ) pPosAlpha = _dynamicsOptions["position_alpha"].as<double>();
if( _dynamicsOptions.hasKey("angle_alpha") ) pAngAlpha = _dynamicsOptions["angle_alpha"].as<double>();
if( _dynamicsOptions.hasKey("switch_alpha") ) this->pSwitchAlpha = _dynamicsOptions["switch_alpha"].as<double>();
return;
}
void NonHoloEMA3d::getOptions( GenericMultiLevelMap<string>& _optionLink )
{
_optionLink["position_alpha"].as<double>() = pPosAlpha;
_optionLink["angle_alpha"].as<double>() = pAngAlpha;
_optionLink["switch_alpha"].as<double>() = pSwitchAlpha;
return;
}
void NonHoloEMA3d::setStandardOptions( GenericMultiLevelMap<string>& _optLink )
{
_optLink["position_alpha"].as<double>() = 0.4;
_optLink["angle_alpha"].as<double>() = 0.8;
_optLink["switch_alpha"].as<double>() = 0.05;
return;
}
Ptr<SceneObject::State> NonHoloEMA3d::newState( Mat& _state, RectangleRegion& _region, vector<Point>& /*_contour*/, Mat& _invImg, double _time )
{
double angle;
if( pHistory().size()!=0 )
{
Angle conv(_state.at<float>(2));
conv.toClosestHalfEquivalent( pHistory().back()->angle );
conv.toZero2Pi();
angle = conv.rad();
}
else angle = _state.at<float>(2);
bool imageBorderTouched = pObjectPointer->touchesImageBorder();
double thetaEstimation = 0;
// update rod geometry estimates - freeze properties if state infered from group image or from object at image border
if( !_invImg.empty() && !imageBorderTouched ) // the inverse image is empty if the state was infered from a group
{
double length = _region.width();
double diameter = _region.height();
if( length>pLengthMax ) pLengthMax = length;
pWidth = diameter;
// estimate theta
if( pLengthMax!=0 && pWidth!=0 )
{
thetaEstimation = asin( length/sqrt(pLengthMax*pLengthMax+pWidth*pWidth) ) - atan(pLengthMax/pWidth); // from trigonometric formulas
if( pHistory().size()!=0 )
{
if( pHistory().back()->type == classId ) // adjust theta
{
Angle thetaConv(thetaEstimation);
Ptr<State> lastState = pHistory().back();
thetaConv.toClosestHalfEquivalent( lastState->thetaEstimated );
thetaConv.toZero2Pi();
thetaEstimation = thetaConv.rad();
}
}
}
// else (shouldn't happen, but if) assume robot in plane (theta=0)
}
else // freeze geometric properties
{
if( pHistory().size()!=0 ) // if previous states exist
{
if( pHistory().back()->type==classId )
{
Ptr<State> lastState = pHistory().back();
thetaEstimation = lastState->thetaEstimated;
}
}
// else theta is unknown, assume robot in image plane (theta=0)
}
Ptr<SceneObject::State> newState = rawState( _state.at<float>(0), _state.at<float>(1), _time, angle, thetaEstimation, 0.0 );
return newState;
}
bool NonHoloEMA3d::addState( Ptr<SceneObject::State> _newState, RectangleRegion& _regionOfInterest, vector<Point>& _contour )
{
if( _newState->type!=classId ) return false;
Ptr<NonHoloEMA3d::State> newState = _newState;
// find closest angle equivalent of measured angle to predicted angle in order to get the correct prediction error of the Kalman filter ->already done when creating the state in newState(...)
if( pHistory().size()==0 )
{
newState->x = newState->raw_x;
newState->y = newState->raw_y;
newState->angle = newState->raw_angle;
newState->thetaEstimated = newState->thetaEstimated_raw;
}
else
{
// run prediction if not yet done (necessary to predict rotations through image plane normal)
predict();
Ptr<SceneObject::State> lastState = pHistory().back();
// update positions, EMA-smoothed
newState->x = pPosAlpha*newState->raw_x + (1-pPosAlpha)*lastState->x;
newState->y = pPosAlpha*newState->raw_y + (1-pPosAlpha)*lastState->y;
// check if still happy with chosen direction (using smoothed positions)
vector<double> currentDirection = direction( newState->raw_angle );
double scalProd = currentDirection[0]*( newState->x - lastState->x ) + currentDirection[1]*( newState->y - lastState->y );
int correctDirection = (scalProd>=0)?1:0;
// update certainty measure
pDirectionSwitch = pSwitchAlpha*correctDirection + (1-pSwitchAlpha)*pDirectionSwitch;
// EMA of angle - the old angle is moved to the closest value to raw_angle with 2*pi additions/subtractions to prevent slips over the border range between 2*pi and zero
double smoothedAngle = pAngAlpha*newState->raw_angle + (1-pAngAlpha)*Angle(lastState->angle).closestEquivalent(newState->raw_angle).rad();
double smoothedTheta = newState->thetaEstimated_raw;
if( lastState->type==classId ) // EMA of theta
{
Ptr<State> convLS = lastState;
smoothedTheta = pAngAlpha*newState->thetaEstimated_raw + (1-pAngAlpha)*Angle(convLS->thetaEstimated).closestEquivalent(newState->thetaEstimated_raw).rad();
}
Angle smooth(smoothedAngle);
// switch direction if either average velocity vector indicates it's necessary or a rotation through the image normal was predicted
if( pDirectionSwitch<0.5 || pReflectionOccured==1 )
{
Angle rawToSwitch( newState->raw_angle );
smooth++; //increments the angle with pi
rawToSwitch++;
rawToSwitch.toZero2Pi(); //ensures it is still inside range
newState->raw_angle = rawToSwitch.rad();
pDirectionSwitch = 0.5;
}
smooth.toZero2Pi();
newState->angle = smooth.rad();
newState->thetaEstimated = smoothedTheta;
}
pHistory().push_back( newState );
pHasPredicted = false;
if( !trace_states() )
{
while( pHistory().size()>3 ) pHistory().pop_front();
}
_regionOfInterest.points( pROI() );
pLastContour() = _contour;
if( pTimeSincePredictionReset()>=-1 ) pTimeSincePredictionReset()++;
if( pTimeSincePredictionReset() > 1 ) pTimeSincePredictionReset()=-1; // prediction reset has no effect anymore
return true;
}
void NonHoloEMA3d::resetPrediction()
{
pDirectionSwitch = 0.5;
pHasPredicted = false;
return;
}
void NonHoloEMA3d::predict()
{
if( pHasPredicted ) return;
pHasPredicted = true;
if( pHistory().size()==0 )
{
pXPre = 0;
pYPre = 0;
pAngPre = 0;
return;
}
else if( pHistory().size()==1 )
{
pXPre = pHistory().back()->x;
pYPre = pHistory().back()->y;
pAngPre = pHistory().back()->angle;
return;
}
else
{
double xVel = pHistory().back()->x - pHistory()[pHistory().size()-2]->x;
double yVel = pHistory().back()->y - pHistory()[pHistory().size()-2]->y;
double angVel = SceneObject::calcAngleVelocity( pHistory()[pHistory().size()-2]->angle, pHistory().back()->angle );
double lastTheta=0;
double thetaVel=0;
if( pHistory().back()->type==classId )
{
Ptr<State> last = pHistory().back();
lastTheta = last->thetaEstimated;
if( pHistory()[ pHistory().size()-2 ]->type==classId )
{
Ptr<State> beforeLast = pHistory()[ pHistory().size()-2 ];
// velocity depends on whether it was previously predicted that theta passes through the normal axis or image plane (which are not traceable directly, since theta is bound to [0...pi/2])
if( pReflectionOccured==0 ) thetaVel = last->thetaEstimated - beforeLast->thetaEstimated; // nothing happened
else if( pReflectionOccured==1 ) thetaVel = last->thetaEstimated + beforeLast->thetaEstimated - Angle::pi; // passed through normal axis
else if( pReflectionOccured==2 ) thetaVel = last->thetaEstimated + beforeLast->thetaEstimated; // passed through image plane
if( thetaVel>Angle::pi_half ) thetaVel = Angle::pi_half; // any higher velocity is untraceable and results in problems for the following calculations
}
}
double absVel = sqrt( xVel*xVel + yVel*yVel );
// predict values
pXPre = pHistory().back()->x + absVel*cos( pHistory().back()->angle )*cos(lastTheta);
pYPre = pHistory().back()->y + absVel*sin( pHistory().back()->angle )*cos(lastTheta);
double predTheta = lastTheta+thetaVel;
// theta is bounded in [0...pi/2]
if( predTheta>Angle::pi_half )
{
//predTheta = Angle::pi-predTheta;
pReflectionOccured = 1;
}
else if( predTheta<0 )
{
//predTheta = -predTheta;
pReflectionOccured = 2;
}
else
{
//predTheta = predTheta;
pReflectionOccured = 0;
}
Angle pred( pHistory().back()->angle + angVel );
// orientation changes if reflection through pi/2 occured
if( pReflectionOccured==1 ) pred++;
pred.toZero2Pi();
pAngPre = pred.rad();
return;
}
}
int NonHoloEMA3d::registerFactoryFunction()
{
string info = "Nonholonomic movement where the direction of movement is aligned with the axis. Smoothed positions with an exponential average filter. Prediction based on constant velocity assumption. It is targeted at rod-like objects, their three-dimensional posture is estimated from 2d imagery.";
GenericMultiLevelMap<string> options;
setStandardOptions(options);
int _classId = Dynamics::registerDynamics( DynamicsFacEntry( "NonHoloEMA3d", &sfmCreator, info, options ) );
return _classId;
}
int NonHoloEMA3d::classId = registerFactoryFunction();
NonHoloEMA3d::State::State()
{
type = classId;
}
NonHoloEMA3d::State::~State()
{
}
NonHoloEMA3d::State::State( double _x, double _y, double time, double _angle, double _area ):FilteredDynamics::State( _x, _y, time, _angle, _area )
{
type=classId;
thetaEstimated = 0;
}
NonHoloEMA3d::State::State( Point _pos, double time, double _angle, double _area ):FilteredDynamics::State( _pos, time, _angle, _area )
{
type=classId;
thetaEstimated = 0;
}
| [
"islerstefan@bluewin.ch"
] | islerstefan@bluewin.ch |
57e4809d112a30b48080cf1543f4b6b93faaf56b | f8cdee63b259f1a2b9dfd40060bcd6436052314d | /aika.h | c927dc13d5ea7a3641064242168e9ab59cfeab09 | [] | no_license | Jani-siv/Mystery-Cube-Quest | 01baa7157925baaa8ebd18b75d0d93ce82f21400 | 4aca0135812dfd9bbfb2facd8826b855e8c64b5e | refs/heads/main | 2023-02-03T18:46:44.700479 | 2020-12-12T11:22:58 | 2020-12-12T11:22:58 | 311,934,519 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,616 | h | #ifndef AIKA_H
#define AIKA_H
#include "lcd.h"
#include "debug.h"
class aika
{
public:
bool yleinenAika = false; //aika keskeytyksen alustus
unsigned long int keskeytysMillis = 0;
void alustaAika(int maara);
int vahennaAika(int maara);
void paivitaAika(int maara);
//void yleinenAika(); //vähentää pääkellosta 1 sekunnin
int tarkistaAika();
void yleinenAikaFunktio(LCD* objekti);
debug var;
debug *variable = &var;//aika keskeytys
int kymmin = 10; //pääkellon minuutit ja sekunnit
int minuutit = 0;
int kymsek = 0;
int sekunnit = 0;
int aikaMin = 10; //keskeytyksen aika minuuttia
int aikaSec = 5; //keskeytyksen aika sekunttia
unsigned long int millisFunktiossa = 0;
};
#endif
| [
"info@kengityspaja.fi"
] | info@kengityspaja.fi |
06a06baea8b762cf0a3f1c7b70cbbd386277fa01 | 42d4dd15792f5e86d8b2a629b82e11cc94bb45e2 | /windows/RCTPdf/ReactPackageProvider.cpp | af554dd03afeaa06599e8e9e3ebaa33973ddede7 | [
"MIT"
] | permissive | wonday/react-native-pdf | 0286ab24119d36a27bb63389edde7d0ead5bf57f | ff4fa464fcad9adb388b977d0a8c70febad2ec8d | refs/heads/master | 2023-07-22T16:48:40.187069 | 2023-06-25T16:49:30 | 2023-06-25T16:49:30 | 89,375,180 | 1,483 | 538 | MIT | 2023-08-30T08:45:33 | 2017-04-25T15:12:58 | C++ | UTF-8 | C++ | false | false | 481 | cpp | #include "pch.h"
#include "ReactPackageProvider.h"
#if __has_include("ReactPackageProvider.g.cpp")
# include "ReactPackageProvider.g.cpp"
#endif
#include "RCTPdfViewManager.h"
using namespace winrt::Microsoft::ReactNative;
namespace winrt::RCTPdf::implementation {
void ReactPackageProvider::CreatePackage(IReactPackageBuilder const &packageBuilder) noexcept {
packageBuilder.AddViewManager(L"RCTPdfViewManager", []() { return winrt::make<RCTPdfViewManager>(); });
}
}
| [
"bartosz@janeasystems.com"
] | bartosz@janeasystems.com |
d2916283572c49c84e591846790dfd0b53deb643 | e1c68264ea40e3318f22bbd3610b8eddb9191884 | /snake_clion/view.cpp | 267508215a20eefe54c2f47a83aa0c6748b8c8aa | [] | no_license | Arv1k/4_sem | 6a5aef79ab33711066305c8aaf8bc771d10f7186 | 39347a655311a9ef7382a8f61703e4f66ddb5243 | refs/heads/master | 2021-01-02T16:57:48.102794 | 2020-07-17T20:23:42 | 2020-07-17T20:23:42 | 239,628,640 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 396 | cpp | #include "view.h"
#include "tui.h"
View* View::inst_ = nullptr;
View::~View() {
inst_ = nullptr;
}
View* View::get() {
if (inst_ != nullptr) {
return inst_;
}
inst_ = new Tui;
return inst_;
}
void View::setOnTimer(int time, Timeoutable timer) {
std::pair<long, Timeoutable> res;
res.first = time;
res.second = timer;
timer_.emplace_back(res);
} | [
"you@example.com"
] | you@example.com |
9260af6b2cb6800046b50d9bc3f194ab7e9ab64d | c7acadf346ad19d10d103cc6f4b29eb1d39c93a7 | /Touch/Touch.ino | b83d241c05b24d44e64a5eed37d8b149ba7cca2f | [] | no_license | saparhadi/ESP32 | 312e0bfd0670eac4ecd4571a682346c156269eed | 8d067afc9631c50ced076906e157b7c9d6396f5a | refs/heads/master | 2020-08-21T13:37:24.896974 | 2019-11-04T09:18:33 | 2019-11-04T09:18:33 | 216,162,914 | 0 | 0 | null | 2019-10-19T07:23:20 | 2019-10-19T06:54:07 | C++ | UTF-8 | C++ | false | false | 269 | ino | int TOUCH = T3;
//Harus ditambahin "T" soalnya pake sensor Touch, pake nama pin juga bisa
int LED = 23;
int TRESHOLD = 50;
void setup() {
Serial.begin(9600);
Serial.println("Eh kesentuh :P");
}
void loop() {
Serial.println(touchRead(touch);
delay(500);
}
| [
"saparhadi@gmail.com"
] | saparhadi@gmail.com |
446ad44a598270ba5a31427a25bec4f974bf8205 | 9184c4403f1ff36ba7318fa5c08302db0dd37504 | /include/apollo/gc.hpp | c8ff09fce3ca2694e4ad7b75d0c108e62a2a5701 | [
"LicenseRef-scancode-unknown-license-reference",
"BSD-2-Clause"
] | permissive | Oberon00/apollo | 5c0c13799153deddf68aafccb2767788a4082d4f | 5940d07f277951a7faad5c53eb9e5f44f12c7de7 | refs/heads/master | 2021-01-15T18:14:25.353251 | 2015-09-17T14:31:13 | 2015-09-17T14:31:13 | 25,267,679 | 34 | 7 | null | null | null | null | UTF-8 | C++ | false | false | 2,089 | hpp | // Part of the apollo library -- Copyright (c) Christian Neumüller 2015
// This file is subject to the terms of the BSD 2-Clause License.
// See LICENSE.txt or http://opensource.org/licenses/BSD-2-Clause
#ifndef APOLLO_GC_HPP_INCLUDED
#define APOLLO_GC_HPP_INCLUDED APOLLO_GC_HPP_INCLUDED
#include <apollo/detail/meta_util.hpp>
#include <boost/assert.hpp>
#include <boost/config.hpp>
#include <apollo/lua_include.hpp>
#include <type_traits>
namespace apollo {
template <typename T>
int gc_object(lua_State* L) BOOST_NOEXCEPT
{
BOOST_ASSERT(lua_type(L, 1) == LUA_TUSERDATA);
static_cast<T*>(lua_touserdata(L, 1))->~T();
return 0;
}
template <typename T, typename... Args>
inline typename detail::remove_qualifiers<T>::type*
emplace_bare_udata(lua_State* L, Args&&... ctor_args)
{
using obj_t = typename detail::remove_qualifiers<T>::type;
void* uf = lua_newuserdata(L, sizeof(obj_t));
try {
return new(uf) obj_t(std::forward<Args>(ctor_args)...);
} catch (...) {
lua_pop(L, 1);
throw;
}
}
template <typename T>
inline typename detail::remove_qualifiers<T>::type*
push_bare_udata(lua_State* L, T&& o)
{
return emplace_bare_udata<T>(L, std::forward<T>(o));
}
// Note: __gc will not unset metatable.
// Use for objects that cannot be retrieved from untrusted Lua code only.
template <typename T>
typename detail::remove_qualifiers<T>::type*
push_gc_object(lua_State* L, T&& o)
{
using obj_t = typename detail::remove_qualifiers<T>::type;
void* uf = push_bare_udata(L, std::forward<T>(o));
#ifdef BOOST_MSVC
# pragma warning(push)
# pragma warning(disable:4127) // Conditional expression is constant.
#endif
if (!std::is_trivially_destructible<obj_t>::value) {
#ifdef BOOST_MSVC
# pragma warning(pop)
#endif
lua_createtable(L, 0, 1); // 0 sequence entries, 1 dictionary entry
lua_pushcfunction(L, &gc_object<obj_t>);
lua_setfield(L, -2, "__gc");
lua_setmetatable(L, -2);
}
return static_cast<obj_t*>(uf);
}
} // namespace apollo
#endif // APOLLO_GC_HPP_INCLUDED
| [
"cn00@gmx.at"
] | cn00@gmx.at |
d5d779f52a1f9951ebbf66aadf5204ebd47a740c | f9d043f436bd7127d02ba6fa79729c97800b65b9 | /자료구조/lab 4 reform palindrome/lab 4 reform palindrome/소스.cpp | 59c821c0492fadb8df54149bc5cf0d43af051b2f | [] | no_license | kjuk02/repository | 90200ceb3be5f2df4231aac5843ca2dd26cb087c | 294366b424512bd295e9d8a71f88195bbb25fc28 | refs/heads/master | 2022-01-06T12:31:13.538544 | 2019-05-04T05:16:47 | 2019-05-04T05:16:47 | 103,889,131 | 0 | 0 | null | null | null | null | UHC | C++ | false | false | 2,409 | cpp | #include <iostream>
#include <cstdlib>
#include<fstream>
#include<string>
#include<vector>
const char stackSize = 100;
char stack[stackSize];
int top;
using namespace std;
void create_stack();
void push(char num);
void displayStack();
int pop();
int isFull();
int isEmpty();
int main()
{
string num;
ifstream instream;
instream.open("input.txt");
int numcase = 0;
instream >> numcase;
for(int i=0;i<numcase;++i)
{ create_stack();
int count = 0;
instream >> num;
for (int i = 0; i < num.size(); i++)
{
if (num[i] == '(' || num[i] == '{' || num[i] == '[')
push(num[i]);
else if (num[i] == ')' || num[i] == '}' || num[i] == ']')
{
if (num[i] == ')'&&stack[top] == '(')
{
pop();
}
else if (num[i] == ']'&&stack[top] == '[')
{
pop();
}
else if (num[i] == '}'&&stack[top] == '{')
{
pop();
}
else
{
count = 1;
cout << 0 << endl;
break;
}
}
}
if ((top != -1) && count == 0)
{
cout << 0 << endl;
}
else
{
if (count == 0)
cout << 1 << endl;
}
//char input[5];
//while (1)
//{
// cout << "1.Push 2.Pop 3.Displaystack 7.exit \n";
// cin >> input;
// if (strcmp(input, "1") == 0) //푸쉬
// {
// if (!isFull())
// {
// cout << "Enter an char to push => ";
// cin >> num;
// push(num);
// }
// else
// cout << "Stack is full!\n";
// }
// else if (strcmp(input, "2") == 0) //팝
// {
// if (!isEmpty())
// {
// num = pop();
// cout << num << endl;
// }
// else
// cout << "Stack Empty!\n";
// }
// else if (strcmp(input, "5") == 0) //디스플레이스택
// displayStack();
// else if (strcmp(input, "7") == 0) //나가기
// exit(0);
// else
// cout << "Bad Command!\n";
//}
}
instream.close();
return 0;
}
//스택 정의
//함수 정의
void create_stack() //스텍 생성
{
top = -1;
}
void push(char num) //값 입력
{
++top;
stack[top] = num;
}
int pop() //출력
{
return stack[top--];
}
int isFull()
{
if (top == stackSize - 1)
return 1;
else
return 0;
}
int isEmpty()
{
if (top == -1)
return 1;
else
return 0;
}
void displayStack() //스택 나열
{
if (isEmpty())
cout << "Stack is empty!" << endl;
else
{
for (int sp = 0; sp <= top; sp++)
{
cout << stack[sp] << " ";
}
cout << endl;
}
} | [
"kjuk02@naver.com"
] | kjuk02@naver.com |
40fe37f02eea19b0c99e8167dbb300a21a39aa7b | 71599d9781f65a725e450208944c069a5b062358 | /Codeforces/cf-215/A.cpp | 4daa9a2f827283252d21152ec6eb9426482588c0 | [] | no_license | shuangde/ACM-ICPC-Record | 74babe24f5fe13ea5b9d33b29de5af138eef54cc | 1f450d543e7c434af84c0dcaf9de752956aef94f | refs/heads/master | 2021-01-17T12:07:19.159554 | 2014-08-16T08:04:02 | 2014-08-16T08:04:02 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,423 | cpp |
//shuangde
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <queue>
#include <cmath>
#include <cstring>
#include <string>
#include <map>
#include <set>
#define MP make_pair
#define SQ ((x)*(x))
#define CLR(a,b) memset(a, (b), sizeof(a))
#define cmax(a,b) a=max(a, (b))
#define cmin(a,b) a=max(a, (b))
#define rep(i, n) for(int i=0;i<n;++i)
#define ff(i, n) for(int i=1;i<=n;++i)
using namespace std;
typedef pair<int, int >PII;
typedef long long int64;
const double PI = acos(-1.0);
const int INF = 0x3f3f3f3f;
const double eps = 1e-8;
int n, m;
char str[100010];
int cnt[100010][3];
int main() {
gets(str+1);
int len = strlen(str+1);
CLR(cnt[0], 0);
for (int i = 1; i <= len; ++i) {
rep(j, 3) cnt[i][j] = cnt[i-1][j];
cnt[i][str[i]-'x']++;
}
scanf("%d", &m);
while (m--) {
int l, r;
scanf("%d%d", &l, &r);
int c[3];
rep(i, 3) c[i] = cnt[r][i]-cnt[l-1][i];
int len = r - l + 1;
if (len < 3) {
puts("YES"); continue;
}
if (len % 3 == 0) {
if (c[0]==c[1]&&c[1]==c[2]) puts("YES");
else puts("NO");
} else if (len%3==1) {
if (c[0]==c[1] && c[1]==c[2]-1 ||
c[0]==c[2] && c[2]==c[1]-1 ||
c[1]==c[2] && c[2]==c[0]-1) puts("YES");
else puts("NO");
} else if (len%3==2) {
if (c[0]+1==c[1] && c[1]==c[2] ||
c[1]+1==c[2] && c[2]==c[0] ||
c[2]+1==c[0] && c[0]==c[1]) puts("YES");
else puts("NO");
}
}
return 0;
}
| [
"zengshuangde@gmail.com"
] | zengshuangde@gmail.com |
d98efbec5296d10dab3bd9501b7c859fd5c9949a | 89d1563ba49502f20d1b0a2e531b9b93ba672b3d | /Network/X/Src/InputSystem.cpp | 3f8ff3be7592b14a40a7928deeedad374f3c8852 | [] | no_license | TyLauriente/Networking | 55f3f3392360882f40f06fbc60e325b3299b6bd1 | 83d88a29dd9f9cfe14ce7c9d377e84cbb5f6e16f | refs/heads/master | 2020-07-30T02:01:26.869261 | 2018-12-15T22:14:07 | 2018-12-15T22:14:07 | 210,048,076 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 15,295 | cpp | //====================================================================================================
// Filename: InputSystem.cpp
// Created by: Peter Chan
//====================================================================================================
#include "Precompiled.h"
#include "InputSystem.h"
using namespace X;
namespace
{
InputSystem* sInputSystem = nullptr;
WindowMessageHandler sPreviousWndProc = 0;
void ClipToWindow(HWND window)
{
RECT rect;
GetClientRect(window, &rect);
POINT ul;
ul.x = rect.left;
ul.y = rect.top;
POINT lr;
lr.x = rect.right;
lr.y = rect.bottom;
MapWindowPoints(window, nullptr, &ul, 1);
MapWindowPoints(window, nullptr, &lr, 1);
rect.left = ul.x;
rect.top = ul.y;
rect.right = lr.x;
rect.bottom = lr.y;
ClipCursor(&rect);
}
}
BOOL CALLBACK X::EnumGamePadCallback(const DIDEVICEINSTANCE* pDIDeviceInstance, VOID* pContext)
{
// Obtain an interface to the enumerated joystick
InputSystem* inputSystem = static_cast<InputSystem*>(pContext);
IDirectInput8* pDI = inputSystem->mDirectInput;
IDirectInputDevice8** gamePad = &(inputSystem->mGamePadDevice);
if (FAILED(pDI->CreateDevice(pDIDeviceInstance->guidInstance, gamePad, nullptr)))
{
XLOG("[InputSystem] Failed to create game pad device.");
}
return DIENUM_STOP;
}
LRESULT CALLBACK X::InputSystemMessageHandler(HWND window, UINT message, WPARAM wParam, LPARAM lParam)
{
if (sInputSystem == nullptr)
{
return sPreviousWndProc(window, message, wParam, lParam);
}
switch (message)
{
case WM_ACTIVATEAPP:
{
if (wParam == TRUE)
{
SetCapture(window);
}
else
{
sInputSystem->mMouseLeftEdge = false;
sInputSystem->mMouseRightEdge = false;
sInputSystem->mMouseTopEdge = false;
sInputSystem->mMouseBottomEdge = false;
ReleaseCapture();
}
break;
}
case WM_LBUTTONDOWN:
{
sInputSystem->mCurrMouseButtons[0] = true;
break;
}
case WM_LBUTTONUP:
{
sInputSystem->mCurrMouseButtons[0] = false;
break;
}
case WM_RBUTTONDOWN:
{
sInputSystem->mCurrMouseButtons[1] = true;
break;
}
case WM_RBUTTONUP:
{
sInputSystem->mCurrMouseButtons[1] = false;
break;
}
case WM_MBUTTONDOWN:
{
sInputSystem->mCurrMouseButtons[2] = true;
break;
}
case WM_MBUTTONUP:
{
sInputSystem->mCurrMouseButtons[2] = false;
break;
}
case WM_MOUSEWHEEL:
{
sInputSystem->mMouseWheel += GET_WHEEL_DELTA_WPARAM(wParam);
break;
}
case WM_MOUSEMOVE:
{
int mouseX = (signed short)(lParam);
int mouseY = (signed short)(lParam >> 16);
sInputSystem->mCurrMouseX = mouseX;
sInputSystem->mCurrMouseY = mouseY;
if (sInputSystem->mPrevMouseX == -1)
{
sInputSystem->mPrevMouseX = mouseX;
sInputSystem->mPrevMouseY = mouseY;
}
RECT rect;
GetClientRect(window, &rect);
sInputSystem->mMouseLeftEdge = mouseX <= rect.left;
sInputSystem->mMouseRightEdge = mouseX + 1 >= rect.right;
sInputSystem->mMouseTopEdge = mouseY <= rect.top;
sInputSystem->mMouseBottomEdge = mouseY + 1 >= rect.bottom;
break;
}
case WM_KEYDOWN:
{
if (wParam < 256)
{
sInputSystem->mCurrKeys[wParam] = true;
}
break;
}
case WM_KEYUP:
{
if (wParam < 256)
{
sInputSystem->mCurrKeys[wParam] = false;
}
break;
}
}
return sPreviousWndProc(window, message, wParam, lParam);
}
void InputSystem::StaticInitialize(HWND window)
{
XASSERT(sInputSystem == nullptr, "[InputSystem] System already initialized!");
sInputSystem = new InputSystem();
sInputSystem->Initialize(window);
}
void InputSystem::StaticTerminate()
{
if (sInputSystem != nullptr)
{
sInputSystem->Terminate();
SafeDelete(sInputSystem);
}
}
InputSystem* InputSystem::Get()
{
XASSERT(sInputSystem != nullptr, "[InputSystem] No system registered.");
return sInputSystem;
}
InputSystem::InputSystem()
: mWindow(0)
, mDirectInput(nullptr)
, mGamePadDevice(nullptr)
, mClipMouseToWindow(false)
, mCurrMouseX(-1)
, mCurrMouseY(-1)
, mPrevMouseX(-1)
, mPrevMouseY(-1)
, mMouseMoveX(0)
, mMouseMoveY(0)
, mMouseLeftEdge(false)
, mMouseRightEdge(false)
, mMouseTopEdge(false)
, mMouseBottomEdge(false)
, mInitialized(false)
{
ZeroMemory(&mCurrKeys, sizeof(mCurrKeys));
ZeroMemory(&mPrevKeys, sizeof(mPrevKeys));
ZeroMemory(&mPressedKeys, sizeof(mPressedKeys));
ZeroMemory(&mCurrMouseButtons, sizeof(mCurrMouseButtons));
ZeroMemory(&mPrevMouseButtons, sizeof(mPrevMouseButtons));
ZeroMemory(&mPressedMouseButtons, sizeof(mPressedMouseButtons));
ZeroMemory(&mCurrGamePadState, sizeof(DIJOYSTATE));
ZeroMemory(&mPrevGamePadState, sizeof(DIJOYSTATE));
}
//----------------------------------------------------------------------------------------------------
InputSystem::~InputSystem()
{
XASSERT(!mInitialized, "[InputSystem] Terminate() must be called to clean up!");
}
//----------------------------------------------------------------------------------------------------
void InputSystem::Initialize(HWND window)
{
// Check if we have already initialized the system
if (mInitialized)
{
XLOG("[InputSystem] System already initialized.");
return;
}
XLOG("[InputSystem] Initializing...");
// Hook application to window's procedure
mWindow = window;
sPreviousWndProc = (WindowMessageHandler)GetWindowLongPtrA(window, GWLP_WNDPROC);
SetWindowLongPtrA(window, GWLP_WNDPROC, (LONG_PTR)InputSystemMessageHandler);
// Obtain an interface to DirectInput
HRESULT hr = DirectInput8Create(GetModuleHandle(nullptr), DIRECTINPUT_VERSION, IID_IDirectInput8, (void**)&mDirectInput, nullptr);
XASSERT(SUCCEEDED(hr), "[InputSystem] Failed to create DirectInput object.");
//----------------------------------------------------------------------------------------------------
// Enumerate for game pad device
if (FAILED(mDirectInput->EnumDevices(DI8DEVCLASS_GAMECTRL, EnumGamePadCallback, this, DIEDFL_ATTACHEDONLY)))
{
XLOG("[InputSystem] Failed to enumerate for game pad devices.");
}
// Check if we have a game pad detected
if (mGamePadDevice != nullptr)
{
// Set the game pad data format
hr = mGamePadDevice->SetDataFormat(&c_dfDIJoystick);
XASSERT(SUCCEEDED(hr), "[InputSystem] Failed to set game pad data format.");
// Set the game pad cooperative level
hr = mGamePadDevice->SetCooperativeLevel(window, DISCL_FOREGROUND | DISCL_EXCLUSIVE);
XASSERT(SUCCEEDED(hr), "[InputSystem] Failed to set game pad cooperative level.");
// Acquire the game pad device
hr = mGamePadDevice->Acquire();
XASSERT(SUCCEEDED(hr), "[InputSystem] Failed to acquire game pad device.");
}
else
{
XLOG("[InputSystem] No game pad attached.");
}
// Set flag
mInitialized = true;
XLOG("[InputSystem] System initialized.");
}
//----------------------------------------------------------------------------------------------------
void InputSystem::Terminate()
{
// Check if we have already terminated the system
if (!mInitialized)
{
XLOG("[InputSystem] System already terminated.");
return;
}
XLOG("[InputSystem] Terminating...");
// Release devices
if (mGamePadDevice != nullptr)
{
mGamePadDevice->Unacquire();
mGamePadDevice->Release();
mGamePadDevice = nullptr;
}
SafeRelease(mDirectInput);
// Restore original window's procedure
SetWindowLongPtrA(mWindow, GWLP_WNDPROC, (LONG_PTR)sPreviousWndProc);
mWindow = nullptr;
// Set flag
mInitialized = false;
XLOG("[InputSystem] System terminated.");
}
//----------------------------------------------------------------------------------------------------
void InputSystem::Update()
{
XASSERT(mInitialized, "[InputSystem] System not initialized.");
// Store the previous keyboard state
for (int i = 0; i < 512; ++i)
{
mPressedKeys[i] = !mPrevKeys[i] && mCurrKeys[i];
}
memcpy(mPrevKeys, mCurrKeys, sizeof(mCurrKeys));
// Update mouse movement
mMouseMoveX = mCurrMouseX - mPrevMouseX;
mMouseMoveY = mCurrMouseY - mPrevMouseY;
mPrevMouseX = mCurrMouseX;
mPrevMouseY = mCurrMouseY;
// Store the previous mouse state
for (int i = 0; i < 3; ++i)
{
mPressedMouseButtons[i] = !mPrevMouseButtons[i] && mCurrMouseButtons[i];
}
memcpy(mPrevMouseButtons, mCurrMouseButtons, sizeof(mCurrMouseButtons));
// Update game pad
if (mGamePadDevice != nullptr)
{
UpdateGamePad();
}
}
//----------------------------------------------------------------------------------------------------
bool InputSystem::IsKeyDown(uint32_t key) const
{
return mCurrKeys[key];
}
//----------------------------------------------------------------------------------------------------
bool InputSystem::IsKeyPressed(uint32_t key) const
{
return mPressedKeys[key];
}
//----------------------------------------------------------------------------------------------------
bool InputSystem::IsMouseDown(uint32_t button) const
{
return mCurrMouseButtons[button];
}
//----------------------------------------------------------------------------------------------------
bool InputSystem::IsMousePressed(uint32_t button) const
{
return mPressedMouseButtons[button];
}
//----------------------------------------------------------------------------------------------------
int InputSystem::GetMouseMoveX() const
{
return mMouseMoveX;
}
//----------------------------------------------------------------------------------------------------
int InputSystem::GetMouseMoveY() const
{
return mMouseMoveY;
}
//----------------------------------------------------------------------------------------------------
int InputSystem::GetMouseMoveZ() const
{
return mMouseWheel;
}
//----------------------------------------------------------------------------------------------------
int InputSystem::GetMouseScreenX() const
{
return mCurrMouseX;
}
//----------------------------------------------------------------------------------------------------
int InputSystem::GetMouseScreenY() const
{
return mCurrMouseY;
}
//----------------------------------------------------------------------------------------------------
bool InputSystem::IsMouseLeftEdge() const
{
return mMouseLeftEdge;
}
//----------------------------------------------------------------------------------------------------
bool InputSystem::IsMouseRightEdge() const
{
return mMouseRightEdge;
}
//----------------------------------------------------------------------------------------------------
bool InputSystem::IsMouseTopEdge() const
{
return mMouseTopEdge;
}
//----------------------------------------------------------------------------------------------------
bool InputSystem::IsMouseBottomEdge() const
{
return mMouseBottomEdge;
}
//----------------------------------------------------------------------------------------------------
void InputSystem::ShowSystemCursor(bool show)
{
ShowCursor(show);
}
//----------------------------------------------------------------------------------------------------
void InputSystem::SetMouseClipToWindow(bool clip)
{
mClipMouseToWindow = clip;
}
//----------------------------------------------------------------------------------------------------
bool InputSystem::IsMouseClipToWindow() const
{
return mClipMouseToWindow;
}
//----------------------------------------------------------------------------------------------------
bool InputSystem::IsGamePadButtonDown(uint32_t button) const
{
return (mCurrGamePadState.rgbButtons[button] & 0x80) != 0;
}
//----------------------------------------------------------------------------------------------------
bool InputSystem::IsGamePadButtonPressed(uint32_t button) const
{
const bool currState = (mCurrGamePadState.rgbButtons[button] & 0x80) != 0;
const bool prevState = (mPrevGamePadState.rgbButtons[button] & 0x80) != 0;
return !prevState && currState;
}
//----------------------------------------------------------------------------------------------------
bool InputSystem::IsDPadUp() const
{
const bool hasGamePad = (mGamePadDevice != nullptr);
return hasGamePad && (mCurrGamePadState.rgdwPOV[0] == 0);
}
//----------------------------------------------------------------------------------------------------
bool InputSystem::IsDPadDown() const
{
return (mCurrGamePadState.rgdwPOV[0] == 18000);
}
//----------------------------------------------------------------------------------------------------
bool InputSystem::IsDPadLeft() const
{
return (mCurrGamePadState.rgdwPOV[0] == 27000);
}
//----------------------------------------------------------------------------------------------------
bool InputSystem::IsDPadRight() const
{
return (mCurrGamePadState.rgdwPOV[0] == 9000);
}
//----------------------------------------------------------------------------------------------------
float InputSystem::GetLeftAnalogX() const
{
return (mCurrGamePadState.lX / 32767.5f) - 1.0f;
}
//----------------------------------------------------------------------------------------------------
float InputSystem::GetLeftAnalogY() const
{
return -(mCurrGamePadState.lY / 32767.5f) + 1.0f;
}
//----------------------------------------------------------------------------------------------------
float InputSystem::GetRightAnalogX() const
{
return (mCurrGamePadState.lZ / 32767.5f) - 1.0f;
}
//----------------------------------------------------------------------------------------------------
float InputSystem::GetRightAnalogY() const
{
return -(mCurrGamePadState.lRz / 32767.5f) + 1.0f;
}
//----------------------------------------------------------------------------------------------------
void InputSystem::UpdateGamePad()
{
// Store the previous game pad state
memcpy(&mPrevGamePadState, &mCurrGamePadState, sizeof(DIJOYSTATE));
// Poll the game pad device
static bool sWriteToLog = true;
HRESULT hr = mGamePadDevice->Poll();
if (FAILED(hr))
{
// Check if the device is lost
if (DIERR_INPUTLOST == hr || DIERR_NOTACQUIRED == hr)
{
if (sWriteToLog)
{
XLOG("[InputSystem] Game pad device is lost.");
sWriteToLog = false;
}
// Try to acquire game pad device again
mGamePadDevice->Acquire();
}
else
{
XLOG("[InputSystem] Failed to get game pad state.");
return;
}
}
else
{
// Reset flag
sWriteToLog = true;
}
// Get game pad state
hr = mGamePadDevice->GetDeviceState(sizeof(DIJOYSTATE), (void*)&mCurrGamePadState);
if (FAILED(hr))
{
// Check if the device is lost
if (DIERR_INPUTLOST == hr || DIERR_NOTACQUIRED == hr)
{
if (sWriteToLog)
{
XLOG("[InputSystem] Game pad device is lost.");
sWriteToLog = false;
}
// Try to acquire game pad device again
mGamePadDevice->Acquire();
}
else
{
XLOG("[InputSystem] Failed to get game pad state.");
return;
}
}
else
{
// Reset flag
sWriteToLog = true;
}
} | [
"tlauriente@gmail.com"
] | tlauriente@gmail.com |
f9d84f692bfa046346544c26d7d05b93a209568e | c57819bebe1a3e1d305ae0cb869cdcc48c7181d1 | /src/qt/src/3rdparty/webkit/Source/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp | 66019e81b62fa6d29be395d7b699910543a313b6 | [
"BSD-2-Clause",
"LGPL-2.1-only",
"LGPL-2.0-only",
"Qt-LGPL-exception-1.1",
"LicenseRef-scancode-generic-exception",
"GPL-3.0-only",
"GPL-1.0-or-later",
"GFDL-1.3-only",
"BSD-3-Clause"
] | permissive | blowery/phantomjs | 255829570e90a28d1cd597192e20314578ef0276 | f929d2b04a29ff6c3c5b47cd08a8f741b1335c72 | refs/heads/master | 2023-04-08T01:22:35.426692 | 2012-10-11T17:43:24 | 2012-10-11T17:43:24 | 6,177,895 | 1 | 0 | BSD-3-Clause | 2023-04-03T23:09:40 | 2012-10-11T17:39:25 | C++ | UTF-8 | C++ | false | false | 43,845 | cpp | /*
* Copyright (C) 2007, 2008, 2009, 2010, 2011 Apple, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "config.h"
#if ENABLE(VIDEO)
#include "MediaPlayerPrivateQuickTimeVisualContext.h"
#include "ApplicationCacheHost.h"
#include "ApplicationCacheResource.h"
#include "Cookie.h"
#include "CookieJar.h"
#include "DocumentLoader.h"
#include "Frame.h"
#include "FrameView.h"
#include "GraphicsContext.h"
#include "KURL.h"
#include "MediaPlayerPrivateTaskTimer.h"
#include "QTCFDictionary.h"
#include "QTDecompressionSession.h"
#include "QTMovie.h"
#include "QTMovieTask.h"
#include "QTMovieVisualContext.h"
#include "ScrollView.h"
#include "Settings.h"
#include "SoftLinking.h"
#include "TimeRanges.h"
#include "Timer.h"
#include <AssertMacros.h>
#include <CoreGraphics/CGAffineTransform.h>
#include <CoreGraphics/CGContext.h>
#include <QuartzCore/CATransform3D.h>
#include <Wininet.h>
#include <wtf/CurrentTime.h>
#include <wtf/HashSet.h>
#include <wtf/MainThread.h>
#include <wtf/MathExtras.h>
#include <wtf/StdLibExtras.h>
#include <wtf/text/StringBuilder.h>
#include <wtf/text/StringHash.h>
#if USE(ACCELERATED_COMPOSITING)
#include "PlatformCALayer.h"
#include "WKCAImageQueue.h"
#endif
using namespace std;
namespace WebCore {
static CGImageRef CreateCGImageFromPixelBuffer(QTPixelBuffer buffer);
static bool requiredDllsAvailable();
SOFT_LINK_LIBRARY(Wininet)
SOFT_LINK(Wininet, InternetSetCookieExW, DWORD, WINAPI, (LPCWSTR lpszUrl, LPCWSTR lpszCookieName, LPCWSTR lpszCookieData, DWORD dwFlags, DWORD_PTR dwReserved), (lpszUrl, lpszCookieName, lpszCookieData, dwFlags, dwReserved))
// Interface declaration for MediaPlayerPrivateQuickTimeVisualContext's QTMovieClient aggregate
class MediaPlayerPrivateQuickTimeVisualContext::MovieClient : public QTMovieClient {
public:
MovieClient(MediaPlayerPrivateQuickTimeVisualContext* parent) : m_parent(parent) {}
virtual ~MovieClient() { m_parent = 0; }
virtual void movieEnded(QTMovie*);
virtual void movieLoadStateChanged(QTMovie*);
virtual void movieTimeChanged(QTMovie*);
private:
MediaPlayerPrivateQuickTimeVisualContext* m_parent;
};
#if USE(ACCELERATED_COMPOSITING)
class MediaPlayerPrivateQuickTimeVisualContext::LayerClient : public PlatformCALayerClient {
public:
LayerClient(MediaPlayerPrivateQuickTimeVisualContext* parent) : m_parent(parent) {}
virtual ~LayerClient() { m_parent = 0; }
private:
virtual void platformCALayerLayoutSublayersOfLayer(PlatformCALayer*);
virtual bool platformCALayerRespondsToLayoutChanges() const { return true; }
virtual void platformCALayerAnimationStarted(CFTimeInterval beginTime) { }
virtual GraphicsLayer::CompositingCoordinatesOrientation platformCALayerContentsOrientation() const { return GraphicsLayer::CompositingCoordinatesBottomUp; }
virtual void platformCALayerPaintContents(GraphicsContext&, const IntRect& inClip) { }
virtual bool platformCALayerShowDebugBorders() const { return false; }
virtual bool platformCALayerShowRepaintCounter() const { return false; }
virtual int platformCALayerIncrementRepaintCount() { return 0; }
virtual bool platformCALayerContentsOpaque() const { return false; }
virtual bool platformCALayerDrawsContent() const { return false; }
virtual void platformCALayerLayerDidDisplay(PlatformLayer*) { }
MediaPlayerPrivateQuickTimeVisualContext* m_parent;
};
void MediaPlayerPrivateQuickTimeVisualContext::LayerClient::platformCALayerLayoutSublayersOfLayer(PlatformCALayer* layer)
{
ASSERT(m_parent);
ASSERT(m_parent->m_transformLayer == layer);
FloatSize parentSize = layer->bounds().size();
FloatSize naturalSize = m_parent->naturalSize();
// Calculate the ratio of these two sizes and use that ratio to scale the qtVideoLayer:
FloatSize ratio(parentSize.width() / naturalSize.width(), parentSize.height() / naturalSize.height());
int videoWidth = 0;
int videoHeight = 0;
m_parent->m_movie->getNaturalSize(videoWidth, videoHeight);
FloatRect videoBounds(0, 0, videoWidth * ratio.width(), videoHeight * ratio.height());
FloatPoint3D videoAnchor = m_parent->m_qtVideoLayer->anchorPoint();
// Calculate the new position based on the parent's size:
FloatPoint position(parentSize.width() * 0.5 - videoBounds.width() * (0.5 - videoAnchor.x()),
parentSize.height() * 0.5 - videoBounds.height() * (0.5 - videoAnchor.y()));
m_parent->m_qtVideoLayer->setBounds(videoBounds);
m_parent->m_qtVideoLayer->setPosition(position);
}
#endif
class MediaPlayerPrivateQuickTimeVisualContext::VisualContextClient : public QTMovieVisualContextClient {
public:
VisualContextClient(MediaPlayerPrivateQuickTimeVisualContext* parent) : m_parent(parent) {}
virtual ~VisualContextClient() { m_parent = 0; }
void imageAvailableForTime(const QTCVTimeStamp*);
static void retrieveCurrentImageProc(void*);
private:
MediaPlayerPrivateQuickTimeVisualContext* m_parent;
};
PassOwnPtr<MediaPlayerPrivateInterface> MediaPlayerPrivateQuickTimeVisualContext::create(MediaPlayer* player)
{
return adoptPtr(new MediaPlayerPrivateQuickTimeVisualContext(player));
}
void MediaPlayerPrivateQuickTimeVisualContext::registerMediaEngine(MediaEngineRegistrar registrar)
{
if (isAvailable())
registrar(create, getSupportedTypes, supportsType, 0, 0, 0);
}
MediaPlayerPrivateQuickTimeVisualContext::MediaPlayerPrivateQuickTimeVisualContext(MediaPlayer* player)
: m_player(player)
, m_seekTo(-1)
, m_seekTimer(this, &MediaPlayerPrivateQuickTimeVisualContext::seekTimerFired)
, m_visualContextTimer(this, &MediaPlayerPrivateQuickTimeVisualContext::visualContextTimerFired)
, m_networkState(MediaPlayer::Empty)
, m_readyState(MediaPlayer::HaveNothing)
, m_enabledTrackCount(0)
, m_totalTrackCount(0)
, m_hasUnsupportedTracks(false)
, m_startedPlaying(false)
, m_isStreaming(false)
, m_visible(false)
, m_newFrameAvailable(false)
, m_movieClient(adoptPtr(new MediaPlayerPrivateQuickTimeVisualContext::MovieClient(this)))
#if USE(ACCELERATED_COMPOSITING)
, m_layerClient(adoptPtr(new MediaPlayerPrivateQuickTimeVisualContext::LayerClient(this)))
, m_movieTransform(CGAffineTransformIdentity)
#endif
, m_visualContextClient(adoptPtr(new MediaPlayerPrivateQuickTimeVisualContext::VisualContextClient(this)))
, m_delayingLoad(false)
, m_privateBrowsing(false)
, m_preload(MediaPlayer::Auto)
{
}
MediaPlayerPrivateQuickTimeVisualContext::~MediaPlayerPrivateQuickTimeVisualContext()
{
tearDownVideoRendering();
cancelCallOnMainThread(&VisualContextClient::retrieveCurrentImageProc, this);
}
bool MediaPlayerPrivateQuickTimeVisualContext::supportsFullscreen() const
{
#if USE(ACCELERATED_COMPOSITING)
Document* document = m_player->mediaPlayerClient()->mediaPlayerOwningDocument();
if (document && document->settings())
return document->settings()->acceleratedCompositingEnabled();
#endif
return false;
}
PlatformMedia MediaPlayerPrivateQuickTimeVisualContext::platformMedia() const
{
PlatformMedia p;
p.type = PlatformMedia::QTMovieVisualContextType;
p.media.qtMovieVisualContext = m_visualContext.get();
return p;
}
#if USE(ACCELERATED_COMPOSITING)
PlatformLayer* MediaPlayerPrivateQuickTimeVisualContext::platformLayer() const
{
return m_transformLayer ? m_transformLayer->platformLayer() : 0;
}
#endif
String MediaPlayerPrivateQuickTimeVisualContext::rfc2616DateStringFromTime(CFAbsoluteTime time)
{
static const char* const dayStrings[] = { "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun" };
static const char* const monthStrings[] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" };
static const CFStringRef dateFormatString = CFSTR("%s, %02d %s %04d %02d:%02d:%02d GMT");
static CFTimeZoneRef gmtTimeZone;
if (!gmtTimeZone)
gmtTimeZone = CFTimeZoneCopyDefault();
CFGregorianDate dateValue = CFAbsoluteTimeGetGregorianDate(time, gmtTimeZone);
if (!CFGregorianDateIsValid(dateValue, kCFGregorianAllUnits))
return String();
time = CFGregorianDateGetAbsoluteTime(dateValue, gmtTimeZone);
SInt32 day = CFAbsoluteTimeGetDayOfWeek(time, 0);
RetainPtr<CFStringRef> dateCFString(AdoptCF, CFStringCreateWithFormat(0, 0, dateFormatString, dayStrings[day - 1], dateValue.day,
monthStrings[dateValue.month - 1], dateValue.year, dateValue.hour, dateValue.minute, (int)dateValue.second));
return dateCFString.get();
}
static void addCookieParam(StringBuilder& cookieBuilder, const String& name, const String& value)
{
if (name.isEmpty())
return;
// If this isn't the first parameter added, terminate the previous one.
if (cookieBuilder.length())
cookieBuilder.append("; ");
// Add parameter name, and value if there is one.
cookieBuilder.append(name);
if (!value.isEmpty()) {
cookieBuilder.append('=');
cookieBuilder.append(value);
}
}
void MediaPlayerPrivateQuickTimeVisualContext::setUpCookiesForQuickTime(const String& url)
{
// WebCore loaded the page with the movie URL with CFNetwork but QuickTime will
// use WinINet to download the movie, so we need to copy any cookies needed to
// download the movie into WinInet before asking QuickTime to open it.
Document* document = m_player->mediaPlayerClient()->mediaPlayerOwningDocument();
Frame* frame = document ? document->frame() : 0;
if (!frame || !frame->page() || !frame->page()->cookieEnabled())
return;
KURL movieURL = KURL(KURL(), url);
Vector<Cookie> documentCookies;
if (!getRawCookies(frame->document(), movieURL, documentCookies))
return;
for (size_t ndx = 0; ndx < documentCookies.size(); ndx++) {
const Cookie& cookie = documentCookies[ndx];
if (cookie.name.isEmpty())
continue;
// Build up the cookie string with as much information as we can get so WinINet
// knows what to do with it.
StringBuilder cookieBuilder;
addCookieParam(cookieBuilder, cookie.name, cookie.value);
addCookieParam(cookieBuilder, "path", cookie.path);
if (cookie.expires)
addCookieParam(cookieBuilder, "expires", rfc2616DateStringFromTime(cookie.expires));
if (cookie.httpOnly)
addCookieParam(cookieBuilder, "httpOnly", String());
cookieBuilder.append(';');
String cookieURL;
if (!cookie.domain.isEmpty()) {
StringBuilder urlBuilder;
urlBuilder.append(movieURL.protocol());
urlBuilder.append("://");
if (cookie.domain[0] == '.')
urlBuilder.append(cookie.domain.substring(1));
else
urlBuilder.append(cookie.domain);
if (cookie.path.length() > 1)
urlBuilder.append(cookie.path);
cookieURL = urlBuilder.toString();
} else
cookieURL = movieURL;
InternetSetCookieExW(cookieURL.charactersWithNullTermination(), 0, cookieBuilder.toString().charactersWithNullTermination(), 0, 0);
}
}
static void disableComponentsOnce()
{
static bool sComponentsDisabled = false;
if (sComponentsDisabled)
return;
sComponentsDisabled = true;
uint32_t componentsToDisable[][5] = {
{'eat ', 'TEXT', 'text', 0, 0},
{'eat ', 'TXT ', 'text', 0, 0},
{'eat ', 'utxt', 'text', 0, 0},
{'eat ', 'TEXT', 'tx3g', 0, 0},
};
for (size_t i = 0; i < WTF_ARRAY_LENGTH(componentsToDisable); ++i)
QTMovie::disableComponent(componentsToDisable[i]);
}
void MediaPlayerPrivateQuickTimeVisualContext::resumeLoad()
{
m_delayingLoad = false;
if (!m_movieURL.isEmpty())
loadInternal(m_movieURL);
}
void MediaPlayerPrivateQuickTimeVisualContext::load(const String& url)
{
m_movieURL = url;
if (m_preload == MediaPlayer::None) {
m_delayingLoad = true;
return;
}
loadInternal(url);
}
void MediaPlayerPrivateQuickTimeVisualContext::loadInternal(const String& url)
{
if (!QTMovie::initializeQuickTime()) {
// FIXME: is this the right error to return?
m_networkState = MediaPlayer::DecodeError;
m_player->networkStateChanged();
return;
}
disableComponentsOnce();
// Initialize the task timer.
MediaPlayerPrivateTaskTimer::initialize();
if (m_networkState != MediaPlayer::Loading) {
m_networkState = MediaPlayer::Loading;
m_player->networkStateChanged();
}
if (m_readyState != MediaPlayer::HaveNothing) {
m_readyState = MediaPlayer::HaveNothing;
m_player->readyStateChanged();
}
cancelSeek();
setUpCookiesForQuickTime(url);
m_movie = adoptRef(new QTMovie(m_movieClient.get()));
#if ENABLE(OFFLINE_WEB_APPLICATIONS)
Frame* frame = m_player->frameView() ? m_player->frameView()->frame() : 0;
ApplicationCacheHost* cacheHost = frame ? frame->loader()->documentLoader()->applicationCacheHost() : 0;
ApplicationCacheResource* resource = 0;
if (cacheHost && cacheHost->shouldLoadResourceFromApplicationCache(ResourceRequest(url), resource) && resource && !resource->path().isEmpty())
m_movie->load(resource->path().characters(), resource->path().length(), m_player->preservesPitch());
else
#endif
m_movie->load(url.characters(), url.length(), m_player->preservesPitch());
m_movie->setVolume(m_player->volume());
}
void MediaPlayerPrivateQuickTimeVisualContext::prepareToPlay()
{
if (!m_movie || m_delayingLoad)
resumeLoad();
}
void MediaPlayerPrivateQuickTimeVisualContext::play()
{
if (!m_movie)
return;
m_startedPlaying = true;
m_movie->play();
m_visualContextTimer.startRepeating(1.0 / 30);
}
void MediaPlayerPrivateQuickTimeVisualContext::pause()
{
if (!m_movie)
return;
m_startedPlaying = false;
m_movie->pause();
m_visualContextTimer.stop();
}
float MediaPlayerPrivateQuickTimeVisualContext::duration() const
{
if (!m_movie)
return 0;
return m_movie->duration();
}
float MediaPlayerPrivateQuickTimeVisualContext::currentTime() const
{
if (!m_movie)
return 0;
return m_movie->currentTime();
}
void MediaPlayerPrivateQuickTimeVisualContext::seek(float time)
{
cancelSeek();
if (!m_movie)
return;
if (time > duration())
time = duration();
m_seekTo = time;
if (maxTimeLoaded() >= m_seekTo)
doSeek();
else
m_seekTimer.start(0, 0.5f);
}
void MediaPlayerPrivateQuickTimeVisualContext::doSeek()
{
float oldRate = m_movie->rate();
if (oldRate)
m_movie->setRate(0);
m_movie->setCurrentTime(m_seekTo);
float timeAfterSeek = currentTime();
// restore playback only if not at end, othewise QTMovie will loop
if (oldRate && timeAfterSeek < duration())
m_movie->setRate(oldRate);
cancelSeek();
}
void MediaPlayerPrivateQuickTimeVisualContext::cancelSeek()
{
m_seekTo = -1;
m_seekTimer.stop();
}
void MediaPlayerPrivateQuickTimeVisualContext::seekTimerFired(Timer<MediaPlayerPrivateQuickTimeVisualContext>*)
{
if (!m_movie || !seeking() || currentTime() == m_seekTo) {
cancelSeek();
updateStates();
m_player->timeChanged();
return;
}
if (maxTimeLoaded() >= m_seekTo)
doSeek();
else {
MediaPlayer::NetworkState state = networkState();
if (state == MediaPlayer::Empty || state == MediaPlayer::Loaded) {
cancelSeek();
updateStates();
m_player->timeChanged();
}
}
}
bool MediaPlayerPrivateQuickTimeVisualContext::paused() const
{
if (!m_movie)
return true;
return (!m_movie->rate());
}
bool MediaPlayerPrivateQuickTimeVisualContext::seeking() const
{
if (!m_movie)
return false;
return m_seekTo >= 0;
}
IntSize MediaPlayerPrivateQuickTimeVisualContext::naturalSize() const
{
if (!m_movie)
return IntSize();
int width;
int height;
m_movie->getNaturalSize(width, height);
#if USE(ACCELERATED_COMPOSITING)
CGSize originalSize = {width, height};
CGSize transformedSize = CGSizeApplyAffineTransform(originalSize, m_movieTransform);
return IntSize(abs(transformedSize.width), abs(transformedSize.height));
#else
return IntSize(width, height);
#endif
}
bool MediaPlayerPrivateQuickTimeVisualContext::hasVideo() const
{
if (!m_movie)
return false;
return m_movie->hasVideo();
}
bool MediaPlayerPrivateQuickTimeVisualContext::hasAudio() const
{
if (!m_movie)
return false;
return m_movie->hasAudio();
}
void MediaPlayerPrivateQuickTimeVisualContext::setVolume(float volume)
{
if (!m_movie)
return;
m_movie->setVolume(volume);
}
void MediaPlayerPrivateQuickTimeVisualContext::setRate(float rate)
{
if (!m_movie)
return;
// Do not call setRate(...) unless we have started playing; otherwise
// QuickTime's VisualContext can get wedged waiting for a rate change
// call which will never come.
if (m_startedPlaying)
m_movie->setRate(rate);
}
void MediaPlayerPrivateQuickTimeVisualContext::setPreservesPitch(bool preservesPitch)
{
if (!m_movie)
return;
m_movie->setPreservesPitch(preservesPitch);
}
bool MediaPlayerPrivateQuickTimeVisualContext::hasClosedCaptions() const
{
if (!m_movie)
return false;
return m_movie->hasClosedCaptions();
}
void MediaPlayerPrivateQuickTimeVisualContext::setClosedCaptionsVisible(bool visible)
{
if (!m_movie)
return;
m_movie->setClosedCaptionsVisible(visible);
}
PassRefPtr<TimeRanges> MediaPlayerPrivateQuickTimeVisualContext::buffered() const
{
RefPtr<TimeRanges> timeRanges = TimeRanges::create();
float loaded = maxTimeLoaded();
// rtsp streams are not buffered
if (!m_isStreaming && loaded > 0)
timeRanges->add(0, loaded);
return timeRanges.release();
}
float MediaPlayerPrivateQuickTimeVisualContext::maxTimeSeekable() const
{
// infinite duration means live stream
return !isfinite(duration()) ? 0 : maxTimeLoaded();
}
float MediaPlayerPrivateQuickTimeVisualContext::maxTimeLoaded() const
{
if (!m_movie)
return 0;
return m_movie->maxTimeLoaded();
}
unsigned MediaPlayerPrivateQuickTimeVisualContext::bytesLoaded() const
{
if (!m_movie)
return 0;
float dur = duration();
float maxTime = maxTimeLoaded();
if (!dur)
return 0;
return totalBytes() * maxTime / dur;
}
unsigned MediaPlayerPrivateQuickTimeVisualContext::totalBytes() const
{
if (!m_movie)
return 0;
return m_movie->dataSize();
}
void MediaPlayerPrivateQuickTimeVisualContext::cancelLoad()
{
if (m_networkState < MediaPlayer::Loading || m_networkState == MediaPlayer::Loaded)
return;
tearDownVideoRendering();
// Cancel the load by destroying the movie.
m_movie.clear();
updateStates();
}
void MediaPlayerPrivateQuickTimeVisualContext::updateStates()
{
MediaPlayer::NetworkState oldNetworkState = m_networkState;
MediaPlayer::ReadyState oldReadyState = m_readyState;
long loadState = m_movie ? m_movie->loadState() : QTMovieLoadStateError;
if (loadState >= QTMovieLoadStateLoaded && m_readyState < MediaPlayer::HaveMetadata) {
m_movie->disableUnsupportedTracks(m_enabledTrackCount, m_totalTrackCount);
if (m_player->inMediaDocument()) {
if (!m_enabledTrackCount || m_enabledTrackCount != m_totalTrackCount) {
// This is a type of media that we do not handle directly with a <video>
// element, eg. QuickTime VR, a movie with a sprite track, etc. Tell the
// MediaPlayerClient that we won't support it.
sawUnsupportedTracks();
return;
}
} else if (!m_enabledTrackCount)
loadState = QTMovieLoadStateError;
}
// "Loaded" is reserved for fully buffered movies, never the case when streaming
if (loadState >= QTMovieLoadStateComplete && !m_isStreaming) {
m_networkState = MediaPlayer::Loaded;
m_readyState = MediaPlayer::HaveEnoughData;
} else if (loadState >= QTMovieLoadStatePlaythroughOK) {
m_readyState = MediaPlayer::HaveEnoughData;
} else if (loadState >= QTMovieLoadStatePlayable) {
// FIXME: This might not work correctly in streaming case, <rdar://problem/5693967>
m_readyState = currentTime() < maxTimeLoaded() ? MediaPlayer::HaveFutureData : MediaPlayer::HaveCurrentData;
} else if (loadState >= QTMovieLoadStateLoaded) {
m_readyState = MediaPlayer::HaveMetadata;
} else if (loadState > QTMovieLoadStateError) {
m_networkState = MediaPlayer::Loading;
m_readyState = MediaPlayer::HaveNothing;
} else {
if (m_player->inMediaDocument()) {
// Something went wrong in the loading of media within a standalone file.
// This can occur with chained ref movies that eventually resolve to a
// file we don't support.
sawUnsupportedTracks();
return;
}
float loaded = maxTimeLoaded();
if (!loaded)
m_readyState = MediaPlayer::HaveNothing;
if (!m_enabledTrackCount)
m_networkState = MediaPlayer::FormatError;
else {
// FIXME: We should differentiate between load/network errors and decode errors <rdar://problem/5605692>
if (loaded > 0)
m_networkState = MediaPlayer::DecodeError;
else
m_readyState = MediaPlayer::HaveNothing;
}
}
if (isReadyForRendering() && !hasSetUpVideoRendering())
setUpVideoRendering();
if (seeking())
m_readyState = MediaPlayer::HaveNothing;
if (m_networkState != oldNetworkState)
m_player->networkStateChanged();
if (m_readyState != oldReadyState)
m_player->readyStateChanged();
}
bool MediaPlayerPrivateQuickTimeVisualContext::isReadyForRendering() const
{
return m_readyState >= MediaPlayer::HaveMetadata && m_player->visible();
}
void MediaPlayerPrivateQuickTimeVisualContext::sawUnsupportedTracks()
{
m_movie->setDisabled(true);
m_hasUnsupportedTracks = true;
m_player->mediaPlayerClient()->mediaPlayerSawUnsupportedTracks(m_player);
}
void MediaPlayerPrivateQuickTimeVisualContext::didEnd()
{
if (m_hasUnsupportedTracks)
return;
m_startedPlaying = false;
updateStates();
m_player->timeChanged();
}
void MediaPlayerPrivateQuickTimeVisualContext::setSize(const IntSize& size)
{
if (m_hasUnsupportedTracks || !m_movie || m_size == size)
return;
m_size = size;
}
void MediaPlayerPrivateQuickTimeVisualContext::setVisible(bool visible)
{
if (m_hasUnsupportedTracks || !m_movie || m_visible == visible)
return;
m_visible = visible;
if (m_visible) {
if (isReadyForRendering())
setUpVideoRendering();
} else
tearDownVideoRendering();
}
void MediaPlayerPrivateQuickTimeVisualContext::paint(GraphicsContext* p, const IntRect& r)
{
MediaRenderingMode currentMode = currentRenderingMode();
if (currentMode == MediaRenderingNone)
return;
if (currentMode == MediaRenderingSoftwareRenderer && !m_visualContext)
return;
QTPixelBuffer buffer = m_visualContext->imageForTime(0);
if (buffer.pixelBufferRef()) {
#if USE(ACCELERATED_COMPOSITING)
if (m_qtVideoLayer) {
// We are probably being asked to render the video into a canvas, but
// there's a good chance the QTPixelBuffer is not ARGB and thus can't be
// drawn using CG. If so, fire up an ICMDecompressionSession and convert
// the current frame into something which can be rendered by CG.
if (!buffer.pixelFormatIs32ARGB() && !buffer.pixelFormatIs32BGRA()) {
// The decompression session will only decompress a specific pixelFormat
// at a specific width and height; if these differ, the session must be
// recreated with the new parameters.
if (!m_decompressionSession || !m_decompressionSession->canDecompress(buffer))
m_decompressionSession = QTDecompressionSession::create(buffer.pixelFormatType(), buffer.width(), buffer.height());
buffer = m_decompressionSession->decompress(buffer);
}
}
#endif
CGImageRef image = CreateCGImageFromPixelBuffer(buffer);
CGContextRef context = p->platformContext();
CGContextSaveGState(context);
CGContextTranslateCTM(context, r.x(), r.y());
CGContextTranslateCTM(context, 0, r.height());
CGContextScaleCTM(context, 1, -1);
CGContextDrawImage(context, CGRectMake(0, 0, r.width(), r.height()), image);
CGContextRestoreGState(context);
CGImageRelease(image);
}
paintCompleted(*p, r);
}
void MediaPlayerPrivateQuickTimeVisualContext::paintCompleted(GraphicsContext& context, const IntRect& rect)
{
m_newFrameAvailable = false;
}
void MediaPlayerPrivateQuickTimeVisualContext::VisualContextClient::retrieveCurrentImageProc(void* refcon)
{
static_cast<MediaPlayerPrivateQuickTimeVisualContext*>(refcon)->retrieveCurrentImage();
}
void MediaPlayerPrivateQuickTimeVisualContext::VisualContextClient::imageAvailableForTime(const QTCVTimeStamp* timeStamp)
{
// This call may come in on another thread, so marshall to the main thread first:
callOnMainThread(&retrieveCurrentImageProc, m_parent);
// callOnMainThread must be paired with cancelCallOnMainThread in the destructor,
// in case this object is deleted before the main thread request is handled.
}
void MediaPlayerPrivateQuickTimeVisualContext::visualContextTimerFired(Timer<MediaPlayerPrivateQuickTimeVisualContext>*)
{
if (m_visualContext && m_visualContext->isImageAvailableForTime(0))
retrieveCurrentImage();
}
static CFDictionaryRef QTCFDictionaryCreateWithDataCallback(CFAllocatorRef allocator, const UInt8* bytes, CFIndex length)
{
RetainPtr<CFDataRef> data(AdoptCF, CFDataCreateWithBytesNoCopy(allocator, bytes, length, kCFAllocatorNull));
if (!data)
return 0;
return reinterpret_cast<CFDictionaryRef>(CFPropertyListCreateFromXMLData(allocator, data.get(), kCFPropertyListImmutable, 0));
}
static CGImageRef CreateCGImageFromPixelBuffer(QTPixelBuffer buffer)
{
#if USE(ACCELERATED_COMPOSITING)
CGDataProviderRef provider = 0;
CGColorSpaceRef colorSpace = 0;
CGImageRef image = 0;
size_t bitsPerComponent = 0;
size_t bitsPerPixel = 0;
CGImageAlphaInfo alphaInfo = kCGImageAlphaNone;
if (buffer.pixelFormatIs32BGRA()) {
bitsPerComponent = 8;
bitsPerPixel = 32;
alphaInfo = (CGImageAlphaInfo)(kCGImageAlphaNoneSkipFirst | kCGBitmapByteOrder32Little);
} else if (buffer.pixelFormatIs32ARGB()) {
bitsPerComponent = 8;
bitsPerPixel = 32;
alphaInfo = (CGImageAlphaInfo)(kCGImageAlphaNoneSkipLast | kCGBitmapByteOrder32Big);
} else {
// All other pixel formats are currently unsupported:
ASSERT_NOT_REACHED();
}
CGDataProviderDirectAccessCallbacks callbacks = {
&QTPixelBuffer::dataProviderGetBytePointerCallback,
&QTPixelBuffer::dataProviderReleaseBytePointerCallback,
&QTPixelBuffer::dataProviderGetBytesAtPositionCallback,
&QTPixelBuffer::dataProviderReleaseInfoCallback,
};
// Colorspace should be device, so that Quartz does not have to do an extra render.
colorSpace = CGColorSpaceCreateDeviceRGB();
require(colorSpace, Bail);
provider = CGDataProviderCreateDirectAccess(buffer.pixelBufferRef(), buffer.dataSize(), &callbacks);
require(provider, Bail);
// CGDataProvider does not retain the buffer, but it will release it later, so do an extra retain here:
QTPixelBuffer::retainCallback(buffer.pixelBufferRef());
image = CGImageCreate(buffer.width(), buffer.height(), bitsPerComponent, bitsPerPixel, buffer.bytesPerRow(), colorSpace, alphaInfo, provider, 0, false, kCGRenderingIntentDefault);
Bail:
// Once the image is created we can release our reference to the provider and the colorspace, they are retained by the image
if (provider)
CGDataProviderRelease(provider);
if (colorSpace)
CGColorSpaceRelease(colorSpace);
return image;
#else
return 0;
#endif
}
void MediaPlayerPrivateQuickTimeVisualContext::retrieveCurrentImage()
{
if (!m_visualContext)
return;
#if USE(ACCELERATED_COMPOSITING)
if (m_qtVideoLayer) {
QTPixelBuffer buffer = m_visualContext->imageForTime(0);
if (!buffer.pixelBufferRef())
return;
PlatformCALayer* layer = m_qtVideoLayer.get();
if (!buffer.lockBaseAddress()) {
if (requiredDllsAvailable()) {
if (!m_imageQueue) {
m_imageQueue = adoptPtr(new WKCAImageQueue(buffer.width(), buffer.height(), 30));
m_imageQueue->setFlags(WKCAImageQueue::Fill, WKCAImageQueue::Fill);
layer->setContents(m_imageQueue->get());
}
// Debug QuickTime links against a non-Debug version of CoreFoundation, so the
// CFDictionary attached to the CVPixelBuffer cannot be directly passed on into the
// CAImageQueue without being converted to a non-Debug CFDictionary. Additionally,
// old versions of QuickTime used a non-AAS CoreFoundation, so the types are not
// interchangable even in the release case.
RetainPtr<CFDictionaryRef> attachments(AdoptCF, QTCFDictionaryCreateCopyWithDataCallback(kCFAllocatorDefault, buffer.attachments(), &QTCFDictionaryCreateWithDataCallback));
CFTimeInterval imageTime = QTMovieVisualContext::currentHostTime();
m_imageQueue->collect();
uint64_t imageId = m_imageQueue->registerPixelBuffer(buffer.baseAddress(), buffer.dataSize(), buffer.bytesPerRow(), buffer.width(), buffer.height(), buffer.pixelFormatType(), attachments.get(), 0);
if (m_imageQueue->insertImage(imageTime, WKCAImageQueue::Buffer, imageId, WKCAImageQueue::Opaque | WKCAImageQueue::Flush, &QTPixelBuffer::imageQueueReleaseCallback, buffer.pixelBufferRef())) {
// Retain the buffer one extra time so it doesn't dissappear before CAImageQueue decides to release it:
QTPixelBuffer::retainCallback(buffer.pixelBufferRef());
}
} else {
CGImageRef image = CreateCGImageFromPixelBuffer(buffer);
layer->setContents(image);
CGImageRelease(image);
}
buffer.unlockBaseAddress();
layer->setNeedsCommit();
}
} else
#endif
m_player->repaint();
m_visualContext->task();
}
static HashSet<String> mimeTypeCache()
{
DEFINE_STATIC_LOCAL(HashSet<String>, typeCache, ());
static bool typeListInitialized = false;
if (!typeListInitialized) {
unsigned count = QTMovie::countSupportedTypes();
for (unsigned n = 0; n < count; n++) {
const UChar* character;
unsigned len;
QTMovie::getSupportedType(n, character, len);
if (len)
typeCache.add(String(character, len));
}
typeListInitialized = true;
}
return typeCache;
}
static CFStringRef createVersionStringFromModuleName(LPCWSTR moduleName)
{
HMODULE module = GetModuleHandleW(moduleName);
if (!module)
return 0;
wchar_t filePath[MAX_PATH] = {0};
if (!GetModuleFileNameW(module, filePath, MAX_PATH))
return 0;
DWORD versionInfoSize = GetFileVersionInfoSizeW(filePath, 0);
if (!versionInfoSize)
return 0;
CFStringRef versionString = 0;
void* versionInfo = calloc(versionInfoSize, sizeof(char));
if (GetFileVersionInfo(filePath, 0, versionInfoSize, versionInfo)) {
VS_FIXEDFILEINFO* fileInfo = 0;
UINT fileInfoLength = 0;
if (VerQueryValueW(versionInfo, L"\\", reinterpret_cast<LPVOID*>(&fileInfo), &fileInfoLength)) {
versionString = CFStringCreateWithFormat(kCFAllocatorDefault, 0, CFSTR("%d.%d.%d.%d"),
HIWORD(fileInfo->dwFileVersionMS), LOWORD(fileInfo->dwFileVersionMS),
HIWORD(fileInfo->dwFileVersionLS), LOWORD(fileInfo->dwFileVersionLS));
}
}
free(versionInfo);
return versionString;
}
static bool requiredDllsAvailable()
{
static bool s_prerequisitesChecked = false;
static bool s_prerequisitesSatisfied;
static const CFStringRef kMinQuartzCoreVersion = CFSTR("1.0.42.0");
static const CFStringRef kMinCoreVideoVersion = CFSTR("1.0.1.0");
if (s_prerequisitesChecked)
return s_prerequisitesSatisfied;
s_prerequisitesChecked = true;
s_prerequisitesSatisfied = false;
CFStringRef quartzCoreString = createVersionStringFromModuleName(L"QuartzCore");
if (!quartzCoreString)
quartzCoreString = createVersionStringFromModuleName(L"QuartzCore_debug");
CFStringRef coreVideoString = createVersionStringFromModuleName(L"CoreVideo");
if (!coreVideoString)
coreVideoString = createVersionStringFromModuleName(L"CoreVideo_debug");
s_prerequisitesSatisfied = (quartzCoreString && coreVideoString
&& CFStringCompare(quartzCoreString, kMinQuartzCoreVersion, kCFCompareNumerically) != kCFCompareLessThan
&& CFStringCompare(coreVideoString, kMinCoreVideoVersion, kCFCompareNumerically) != kCFCompareLessThan);
if (quartzCoreString)
CFRelease(quartzCoreString);
if (coreVideoString)
CFRelease(coreVideoString);
return s_prerequisitesSatisfied;
}
void MediaPlayerPrivateQuickTimeVisualContext::getSupportedTypes(HashSet<String>& types)
{
types = mimeTypeCache();
}
bool MediaPlayerPrivateQuickTimeVisualContext::isAvailable()
{
return QTMovie::initializeQuickTime();
}
MediaPlayer::SupportsType MediaPlayerPrivateQuickTimeVisualContext::supportsType(const String& type, const String& codecs)
{
// only return "IsSupported" if there is no codecs parameter for now as there is no way to ask QT if it supports an
// extended MIME type
return mimeTypeCache().contains(type) ? (codecs.isEmpty() ? MediaPlayer::MayBeSupported : MediaPlayer::IsSupported) : MediaPlayer::IsNotSupported;
}
void MediaPlayerPrivateQuickTimeVisualContext::MovieClient::movieEnded(QTMovie* movie)
{
if (m_parent->m_hasUnsupportedTracks)
return;
m_parent->m_visualContextTimer.stop();
ASSERT(m_parent->m_movie.get() == movie);
m_parent->didEnd();
}
void MediaPlayerPrivateQuickTimeVisualContext::MovieClient::movieLoadStateChanged(QTMovie* movie)
{
if (m_parent->m_hasUnsupportedTracks)
return;
ASSERT(m_parent->m_movie.get() == movie);
m_parent->updateStates();
}
void MediaPlayerPrivateQuickTimeVisualContext::MovieClient::movieTimeChanged(QTMovie* movie)
{
if (m_parent->m_hasUnsupportedTracks)
return;
ASSERT(m_parent->m_movie.get() == movie);
m_parent->updateStates();
m_parent->m_player->timeChanged();
}
bool MediaPlayerPrivateQuickTimeVisualContext::hasSingleSecurityOrigin() const
{
// We tell quicktime to disallow resources that come from different origins
// so we all media is single origin.
return true;
}
void MediaPlayerPrivateQuickTimeVisualContext::setPreload(MediaPlayer::Preload preload)
{
m_preload = preload;
if (m_delayingLoad && m_preload != MediaPlayer::None)
resumeLoad();
}
float MediaPlayerPrivateQuickTimeVisualContext::mediaTimeForTimeValue(float timeValue) const
{
long timeScale;
if (m_readyState < MediaPlayer::HaveMetadata || !(timeScale = m_movie->timeScale()))
return timeValue;
long mediaTimeValue = lroundf(timeValue * timeScale);
return static_cast<float>(mediaTimeValue) / timeScale;
}
MediaPlayerPrivateQuickTimeVisualContext::MediaRenderingMode MediaPlayerPrivateQuickTimeVisualContext::currentRenderingMode() const
{
if (!m_movie)
return MediaRenderingNone;
#if USE(ACCELERATED_COMPOSITING)
if (m_qtVideoLayer)
return MediaRenderingMovieLayer;
#endif
return m_visualContext ? MediaRenderingSoftwareRenderer : MediaRenderingNone;
}
MediaPlayerPrivateQuickTimeVisualContext::MediaRenderingMode MediaPlayerPrivateQuickTimeVisualContext::preferredRenderingMode() const
{
if (!m_player->frameView() || !m_movie)
return MediaRenderingNone;
#if USE(ACCELERATED_COMPOSITING)
if (supportsAcceleratedRendering() && m_player->mediaPlayerClient()->mediaPlayerRenderingCanBeAccelerated(m_player))
return MediaRenderingMovieLayer;
#endif
return MediaRenderingSoftwareRenderer;
}
void MediaPlayerPrivateQuickTimeVisualContext::setUpVideoRendering()
{
MediaRenderingMode currentMode = currentRenderingMode();
MediaRenderingMode preferredMode = preferredRenderingMode();
#if !USE(ACCELERATED_COMPOSITING)
ASSERT(preferredMode != MediaRenderingMovieLayer);
#endif
if (currentMode == preferredMode && currentMode != MediaRenderingNone)
return;
if (currentMode != MediaRenderingNone)
tearDownVideoRendering();
if (preferredMode == MediaRenderingMovieLayer)
createLayerForMovie();
#if USE(ACCELERATED_COMPOSITING)
if (currentMode == MediaRenderingMovieLayer || preferredMode == MediaRenderingMovieLayer)
m_player->mediaPlayerClient()->mediaPlayerRenderingModeChanged(m_player);
#endif
QTPixelBuffer::Type contextType = requiredDllsAvailable() && preferredMode == MediaRenderingMovieLayer ? QTPixelBuffer::ConfigureForCAImageQueue : QTPixelBuffer::ConfigureForCGImage;
m_visualContext = QTMovieVisualContext::create(m_visualContextClient.get(), contextType);
m_visualContext->setMovie(m_movie.get());
}
void MediaPlayerPrivateQuickTimeVisualContext::tearDownVideoRendering()
{
#if USE(ACCELERATED_COMPOSITING)
if (m_qtVideoLayer)
destroyLayerForMovie();
#endif
m_visualContext = 0;
}
bool MediaPlayerPrivateQuickTimeVisualContext::hasSetUpVideoRendering() const
{
#if USE(ACCELERATED_COMPOSITING)
return m_qtVideoLayer || (currentRenderingMode() != MediaRenderingMovieLayer && m_visualContext);
#else
return true;
#endif
}
void MediaPlayerPrivateQuickTimeVisualContext::retrieveAndResetMovieTransform()
{
#if USE(ACCELERATED_COMPOSITING)
// First things first, reset the total movie transform so that
// we can bail out early:
m_movieTransform = CGAffineTransformIdentity;
if (!m_movie || !m_movie->hasVideo())
return;
// This trick will only work on movies with a single video track,
// so bail out early if the video contains more than one (or zero)
// video tracks.
QTTrackArray videoTracks = m_movie->videoTracks();
if (videoTracks.size() != 1)
return;
QTTrack* track = videoTracks[0].get();
ASSERT(track);
CGAffineTransform movieTransform = m_movie->getTransform();
if (!CGAffineTransformEqualToTransform(movieTransform, CGAffineTransformIdentity))
m_movie->resetTransform();
CGAffineTransform trackTransform = track->getTransform();
if (!CGAffineTransformEqualToTransform(trackTransform, CGAffineTransformIdentity))
track->resetTransform();
// Multiply the two transforms together, taking care to
// do so in the correct order, track * movie = final:
m_movieTransform = CGAffineTransformConcat(trackTransform, movieTransform);
#endif
}
void MediaPlayerPrivateQuickTimeVisualContext::createLayerForMovie()
{
#if USE(ACCELERATED_COMPOSITING)
ASSERT(supportsAcceleratedRendering());
if (!m_movie || m_qtVideoLayer)
return;
// Create a PlatformCALayer which will transform the contents of the video layer
// which is in m_qtVideoLayer.
m_transformLayer = PlatformCALayer::create(PlatformCALayer::LayerTypeLayer, m_layerClient.get());
if (!m_transformLayer)
return;
// Mark the layer as anchored in the top left.
m_transformLayer->setAnchorPoint(FloatPoint3D());
m_qtVideoLayer = PlatformCALayer::create(PlatformCALayer::LayerTypeLayer, 0);
if (!m_qtVideoLayer)
return;
if (CGAffineTransformEqualToTransform(m_movieTransform, CGAffineTransformIdentity))
retrieveAndResetMovieTransform();
CGAffineTransform t = m_movieTransform;
// Remove the translation portion of the transform, since we will always rotate about
// the layer's center point. In our limited use-case (a single video track), this is
// safe:
t.tx = t.ty = 0;
m_qtVideoLayer->setTransform(CATransform3DMakeAffineTransform(t));
#ifndef NDEBUG
m_qtVideoLayer->setName("Video layer");
#endif
m_transformLayer->appendSublayer(m_qtVideoLayer.get());
m_transformLayer->setNeedsLayout();
// The layer will get hooked up via RenderLayerBacking::updateGraphicsLayerConfiguration().
#endif
// Fill the newly created layer with image data, so we're not looking at
// an empty layer until the next time a new image is available, which could
// be a long time if we're paused.
if (m_visualContext)
retrieveCurrentImage();
}
void MediaPlayerPrivateQuickTimeVisualContext::destroyLayerForMovie()
{
#if USE(ACCELERATED_COMPOSITING)
if (m_qtVideoLayer) {
m_qtVideoLayer->removeFromSuperlayer();
m_qtVideoLayer = 0;
}
if (m_transformLayer)
m_transformLayer = 0;
if (m_imageQueue)
m_imageQueue = nullptr;
#endif
}
#if USE(ACCELERATED_COMPOSITING)
bool MediaPlayerPrivateQuickTimeVisualContext::supportsAcceleratedRendering() const
{
return isReadyForRendering();
}
void MediaPlayerPrivateQuickTimeVisualContext::acceleratedRenderingStateChanged()
{
// Set up or change the rendering path if necessary.
setUpVideoRendering();
}
void MediaPlayerPrivateQuickTimeVisualContext::setPrivateBrowsingMode(bool privateBrowsing)
{
m_privateBrowsing = privateBrowsing;
if (m_movie)
m_movie->setPrivateBrowsingMode(m_privateBrowsing);
}
#endif
}
#endif
| [
"ariya.hidayat@gmail.com"
] | ariya.hidayat@gmail.com |
cd76d22b15d24212e2d711c8b01bf8eda6e139ed | 5456502f97627278cbd6e16d002d50f1de3da7bb | /ash/shared/immersive_fullscreen_controller_delegate.h | 0af55cb7ffc2660c76cee4b206b5f3234095e4d4 | [
"BSD-3-Clause"
] | permissive | TrellixVulnTeam/Chromium_7C66 | 72d108a413909eb3bd36c73a6c2f98de1573b6e5 | c8649ab2a0f5a747369ed50351209a42f59672ee | refs/heads/master | 2023-03-16T12:51:40.231959 | 2017-12-20T10:38:26 | 2017-12-20T10:38:26 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,654 | h | // Copyright 2016 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.
#ifndef ASH_SHARED_IMMERSIVE_FULLSCREEN_CONTROLLER_DELEGATE_H_
#define ASH_SHARED_IMMERSIVE_FULLSCREEN_CONTROLLER_DELEGATE_H_
#include <vector>
#include "ash/ash_export.h"
namespace gfx {
class Rect;
}
namespace ash {
class ASH_EXPORT ImmersiveFullscreenControllerDelegate {
public:
// Called when a reveal of the top-of-window views starts.
virtual void OnImmersiveRevealStarted() = 0;
// Called when the top-of-window views have finished closing. This call
// implies a visible fraction of 0. SetVisibleFraction(0) may not be called
// prior to OnImmersiveRevealEnded().
virtual void OnImmersiveRevealEnded() = 0;
// Called as a result of disabling immersive fullscreen via SetEnabled().
virtual void OnImmersiveFullscreenExited() = 0;
// Called to update the fraction of the top-of-window views height which is
// visible.
virtual void SetVisibleFraction(double visible_fraction) = 0;
// Returns a list of rects whose union makes up the top-of-window views.
// The returned list is used for hittesting when the top-of-window views
// are revealed. GetVisibleBoundsInScreen() must return a valid value when
// not in immersive fullscreen for the sake of SetupForTest().
virtual std::vector<gfx::Rect> GetVisibleBoundsInScreen() const = 0;
protected:
virtual ~ImmersiveFullscreenControllerDelegate() {}
};
} // namespace ash
#endif // ASH_SHARED_IMMERSIVE_FULLSCREEN_CONTROLLER_DELEGATE_H_
| [
"lixiaodonglove7@aliyun.com"
] | lixiaodonglove7@aliyun.com |
0f15771cdccb87a720084fb47c733afe058c4015 | ed6d74cb173980331fd999c5aa426a5a7b220a00 | /Practice/P7113.cpp | 2c216f8806d934b443e3c86845c2d780b1602bc0 | [] | no_license | Molotov13/Code-Citadel | 8be6deb61ae7e0def027a5ea511caaf281e87dbd | b04e6b4eed2f0c904b5504f2125435eadde6c911 | refs/heads/main | 2023-02-24T07:24:19.156213 | 2021-01-27T10:23:39 | 2021-01-27T10:23:39 | 333,378,087 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,680 | cpp | #include<iostream>
#include<cstdlib>
#include<cstring>
#include<algorithm>
#include<cstdio>
#include<queue>
#include<cmath>
#include<map>
#include<vector>
using namespace std;
inline int Read(){
int s = 0 , w = 1;
char ch = getchar();
while(ch < '0' || ch > '9'){
if(ch == '-') w = -1;
ch = getchar();
}
while(ch >= '0' && ch <= '9'){
s = (s << 1) + (s << 3) + ch - '0';
ch = getchar();
}
return s * w;
}
const int MAXN = 1e5 + 50;
int head[MAXN],to[MAXN << 1],nxt[MAXN << 1],tot;
void add(int x,int y){
to[++tot] = y;
nxt[tot] = head[x];
head[x] = tot;
}
int n,m;
struct node{
int tot;
vector<long double>num;
}s[MAXN];
long double getgcd(long double x,long double y){
return (y == 0?x:getgcd(y,x%y));
}
int ind[MAXN],otd[MAXN];
queue<int>Q;
int main(){
n = Read() , m = Read();
for(int i = 1 ; i <= n ; i ++){
otd[i] = Read();
for(int j = 1 ; j <= otd[i] ; j ++){
int y = Read();
add(i,y);
ind[y] ++;
}
if(i <= m){
Q.push(i);
s[i].num.push_back(1);
}
}
while(!Q.empty()){
int u = Q.front();Q.pop();
for(int i = head[u] ; i ; i = nxt[i]){
int v = to[i];
for(int j = 0 ; j < s[u].num.size() ; j ++){
long double cur = s[u].num[j];
s[v].num.push_back(cur * otd[u]);
}
ind[v] --;
if(ind[v] == 0) Q.push(v);
}
}
for(int i = 1 ; i <= n ; i ++){
if(otd[i] == 0){
long double p = 0 , q = 1;
for(int j = 0 ; j < s[i].num.size() ; j ++){
p = p * s[i].num[j] + q;
q *= s[i].num[j];
long double gcd = getgcd(p,q);
p /= gcd;
q /= gcd;
}
printf("%.0lf %.0lf\n",p,q);
}
}
return 0;
}
| [
"noreply@github.com"
] | Molotov13.noreply@github.com |
f6951a9e6ca158a4fa5572d21ddeb4c6d7a38237 | 15a35df4de841aa5c504dc4f8778581c00397c87 | /Server1/Engine/Ext/netdsdk/src/Pipe.cpp | 31d81f921e780b5f06b1829a7f38593b40fc99c8 | [] | no_license | binbin88115/server | b6197fef8f35276ff7bdf471a025091d65f96fa9 | e3c178db3b6c6552c60b007cac8ffaa6d3c43c10 | refs/heads/master | 2021-01-15T13:49:38.647852 | 2014-05-05T12:47:20 | 2014-05-05T12:47:20 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,388 | cpp | #include "Pipe.h"
#include "Debug.h"
#include "SockAcceptor.h"
#include "SockConnector.h"
#include <unistd.h>
#include <stropts.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/tcp.h>
Pipe::Pipe ()
{
handles_[0] = NDK_INVALID_HANDLE;
handles_[1] = NDK_INVALID_HANDLE;
}
Pipe::~Pipe ()
{
this->close ();
}
int Pipe::open ()
{
#if 0
InetAddr local_any = InetAddr::addr_any;
InetAddr local_addr;
SockAcceptor acceptor;
SockConnector connector;
SockStream writer;
SockStream reader;
int result = 0;
// Bind listener to any port and then find out what the port was.
if (acceptor.open (local_any) < 0
|| acceptor.get_local_addr (local_addr) != 0)
{
result = -1;
}else
{
InetAddr svr_addr(local_addr.get_port_number (), "127.0.0.1");
// Establish a connection within the same process.
if (connector.connect (writer, svr_addr) != 0)
result = -1;
else if (acceptor.accept (reader) != 0)
{
writer.close ();
result = -1;
}
}
// Close down the acceptor endpoint since we don't need it anymore.
acceptor.close ();
if (result == -1)
return -1;
this->handles_[0] = reader.handle ();
this->handles_[1] = writer.handle ();
int on = 1;
if (::setsockopt (this->handles_[1], IPPROTO_TCP, TCP_NODELAY,
&on,
sizeof(on)) == -1)
{
this->close();
return -1;
}
return 0;
#endif
#if 0
if (::socketpair (AF_UNIX, SOCK_STREAM, 0, this->handles_) == -1)
{
NDK_DBG ("socketpair");
return -1;
}
return 0;
#endif
if (::pipe (this->handles_) == -1)
{
NDK_DBG ("pipe");
return -1;
}
// Enable "msg no discard" mode, which ensures that record
// boundaries are maintained when messages are sent and received.
#if 0
int arg = RMSGN;
if (::ioctl (this->handles_[0],
I_SRDOPT,
(void*)arg) == -1
||
::ioctl (this->handles_[1],
I_SRDOPT,
(void*)arg) == -1
)
{
NDK_DBG ("ioctl pipe handles");
this->close ();
return -1;
}
#endif
return 0;
}
int Pipe::close ()
{
int result = 0;
if (this->handles_[0] != NDK_INVALID_HANDLE)
result = ::close (this->handles_[0]);
handles_[0] = NDK_INVALID_HANDLE;
if (this->handles_[1] != NDK_INVALID_HANDLE)
result |= ::close (this->handles_[1]);
handles_[1] = NDK_INVALID_HANDLE;
return result;
}
| [
"jjl_2009_hi@163.com"
] | jjl_2009_hi@163.com |
8830c64d213dd33a05b07c291928658dc3a5cf1e | 379d37c01fc6e8ae01be14dae5bb17a2f6d0b8a7 | /ZRXSDK2018/utils/amodeler/inc/morphmap.h | 4050f60c6cfa5aa4b8bb0083e665891211ebd845 | [] | no_license | xiongzhihui/QuickDim | 80c54b5031b7676c8ac6ff2b326cf171fa6736dc | 1429b06b4456372c2976ec53c2f91fd8c4e0bae1 | refs/heads/master | 2020-03-28T12:08:21.284473 | 2018-09-11T06:39:20 | 2018-09-11T06:39:20 | 148,272,259 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 1,692 | h | #ifndef AECMODELER_INC_MORPHMAP_H
#define AECMODELER_INC_MORPHMAP_H
#include "global.h"
#include <vector>
AECMODELER_NAMESPACE_BEGIN
class DllImpExp MorphingMap
{
public:
MorphingMap() {}
MorphingMap(const MorphingMap&);
~MorphingMap();
MorphingMap& operator =(const MorphingMap&);
void add (int from, int to, int vis = 0);
void addAt(int index, int from, int to, int vis = 0);
void del (int index);
void get (int index, int& fromIndex, int& toIndex, int& visibility) const;
int length() const { return 0; }
bool isNull() const { return true; }
bool isIdentity() const;
void setToExplicitIdentityMap(int numEdges); // Mapping 0-->0, 1-->1, 2-->2, 3-->3, etc.
//void createFromTwoPointLoops(const std::vector<Point2d>&, const std::vector<Point2d>&);
void init(); // Empties the map
void print() const;
// Converts mapping m --> n (m > n) to:
// a --> 1
// n --> n
// b --> 1
//
// and mapping m --> n (m < n) to:
// 1 --> a
// m --> m
// 1 --> b
//
// where a = abs(m-n+1)/2 and b = abs(m-n) - a
//
void normalize(int numEdges0, int numEdges1);
void remapIndices(const std::vector<int>& fromIndexMap, const std::vector<int>& toIndexMap);
static const MorphingMap kNull;
enum { kCrossEdgeIsApprox = 1, kBaseEdgeIsApprox = 2 };
private:
class MorphingMapElem
{
public:
MorphingMapElem(int i, int j, int vis = 0) : fromIndex(i), toIndex(j), visibility(vis) {}
int fromIndex;
int toIndex;
int visibility;
};
//std::vector<MorphingMapElem*> mArray;
};
AECMODELER_NAMESPACE_END
#endif
| [
"38715689+xiongzhihui@users.noreply.github.com"
] | 38715689+xiongzhihui@users.noreply.github.com |
4ca035595152118991fb1d0867348c2c43067ea8 | 5509788aa5c5bacc053ea21796d3ef5ba878d744 | /Practice/Other/Luogu 1049 装箱问题.cpp | 3775e06c7d21bd96d120dbfe848ad43d8ea8720a | [
"MIT"
] | permissive | SYCstudio/OI | 3c5a6a9c5c9cd93ef653ad77477ad1cd849b8930 | 6e9bfc17dbd4b43467af9b19aa2aed41e28972fa | refs/heads/master | 2021-06-25T22:29:50.276429 | 2020-10-26T11:57:06 | 2020-10-26T11:57:06 | 108,716,217 | 3 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 461 | cpp | #include<iostream>
#include<cstdio>
#include<cstdlib>
#include<cstring>
using namespace std;
const int maxV=20001;
const int maxN=40;
const int inf=2147483647;
int V,N;
int weight[maxN];
int F[maxV];
int main()
{
cin>>V>>N;
for (int i=1; i<=N; i++)
cin>>weight[i];
memset(F,0,sizeof(F));
for (int i=1; i<=N; i++)
for (int j=V; j>=weight[i]; j--)
F[j]=max(F[j],F[j-weight[i]]+weight[i]);
cout<<V-F[V]<<endl;
return 0;
}
| [
"1726016246@qq.com"
] | 1726016246@qq.com |
f41fc318e95bf71ec4bf647746e1b9cbc709454c | be0d7f710f38f068faa0aa3227ac24a2a5450024 | /Programación dinámica/35.cpp | d665f277b9a4ddf8c55d13a6842129bac687d7de | [] | no_license | WyrnCael/TAIS | 297b4f1678772c282434ea54f146500bc081898a | a002cde88ffc80d8c73e6f5a48e379b7f202f7e2 | refs/heads/master | 2021-01-21T10:41:31.050264 | 2017-02-28T19:36:00 | 2017-02-28T19:36:08 | 83,471,170 | 0 | 2 | null | null | null | null | UTF-8 | C++ | false | false | 2,511 | cpp | //TAIS04 Fernando Miñambres y Juan José Prieto
//
// El problema se resuelve utilizando una matriz para caluclar recursivamente
// el numero letras que pueden formar un palíndromo desde i hasta j. Siendo:
//
// Para todo j >= i
// Matriz[i][j] = 1; Si i = j;
// Matriz[i][j] = Matriz[i + 1][j - 1] + 2; Si la letra i es igual
// a la letra j.
// Matriz[i][j] = max(Matriz[i + 1][j], Matriz[i][j - 1]); En otro caso
//
// Despues se recorre la solucion cogiendo Matriz[i][j] si la letra i es igual a
// la letra j o recorriendo la matriz por el mayor numero entre Matriz[i][j - 1]
// y [i + 1][j].
//
//El coste de la función es de O(n*n) en tiempo y O(n*n) en espacio adicional, siendo
// n el numero de letras que forman la palabra inicial.
//
#include <fstream>
#include <iostream>
#include <vector>
#include <functional>
#include <algorithm>
#include <limits>
#include <climits>
#include <string>
#include <array>
#include "Matriz.h"
using namespace std;
string calculaPalindromoMayor(string palabra) {
int n = palabra.length();
Matriz<int> longuitudPalindromos(n, n, 0);
for (int i = 0; i < n; i++)
longuitudPalindromos[i][i] = 1;
for (size_t d = 1; d < n; ++d) { // recorre diagonales
for (size_t i = 0; i < n - d; ++i) { // recorre elementos de diagonal
size_t j = i + d;
if (palabra[i] == palabra[j]) {
longuitudPalindromos[i][j] = longuitudPalindromos[i + 1][j - 1] + 2;
}
else {
longuitudPalindromos[i][j] = max(longuitudPalindromos[i + 1][j], longuitudPalindromos[i][j - 1]);
}
}
}
int max = longuitudPalindromos[0][n - 1];
string resultado(max, '\0');
int j = n - 1, i = 0, pos = 0;
while (pos * 2 < max) {
if (max - (pos * 2) == 1) {
resultado[pos] = palabra[j];
pos++;
i++;
j--;
}
else {
if (palabra[i] == palabra[j]) {
resultado[pos] = palabra[j];
resultado[max - pos - 1] = palabra[j];
pos++;
i++;
j--;
}
else if (longuitudPalindromos[i][j - 1] <= longuitudPalindromos[i + 1][j]) {
i++;
}
else {
j--;
}
}
}
return resultado;
}
bool resuelveCaso() {
string palabra;
cin >> palabra;
if (!cin)
return false;
cout << calculaPalindromoMayor(palabra) << endl;
return true;
}
int main() {
#ifndef DOMJUDGE
std::ifstream in("casos.txt");
auto cinbuf = std::cin.rdbuf(in.rdbuf());
#endif
while (resuelveCaso()) {
}
#ifndef DOMJUDGE
std::cin.rdbuf(cinbuf);
system("pause");
#endif
return 0;
} | [
"juanjpri@ucm.es"
] | juanjpri@ucm.es |
a284ec2c62b6abeabb0b3e63b10ebfe1a5e0d8ac | 24c1eae6026f1378172ee3ef4fd47ab39f6d7290 | /adddialog.cpp | 9e52d36910f0e0bd7a96b4f3aefa4b42954e3df9 | [] | no_license | upcomingGit/PasswordManager | 5fac90e36b75ded7a913d6eb0a1defb0df3db168 | 9c779285aa78bf901478d90530a8d8201b95ff54 | refs/heads/master | 2021-01-10T02:06:22.490500 | 2016-03-08T04:05:37 | 2016-03-08T04:05:37 | 53,294,753 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,155 | cpp | #include "adddialog.h"
#include <QGridLayout>
AddDialog::AddDialog(QWidget *parent) : QDialog(parent)
{
nameLabel = new QLabel("Username");
passLabel = new QLabel("Password");
desLabel = new QLabel("Description");
add = new QPushButton("Add");
close = new QPushButton("Close");
username = new QLineEdit;
password = new QLineEdit;
description = new QLineEdit;
setWindowTitle("Add a password entry");
QGridLayout *gLayout = new QGridLayout;
gLayout->setColumnStretch(1, 2);
gLayout->addWidget(desLabel, 0, 0);
gLayout->addWidget(description, 0, 1);
gLayout->addWidget(nameLabel, 1, 0);
gLayout->addWidget(username, 1, 1);
gLayout->addWidget(passLabel, 2, 0);
gLayout->addWidget(password, 2, 1);
QHBoxLayout *boxLayout = new QHBoxLayout;
boxLayout->addWidget(add);
boxLayout->addWidget(close);
gLayout->addLayout(boxLayout, 3, 1);
QVBoxLayout *mainLayout = new QVBoxLayout;
mainLayout->addLayout(gLayout);
setLayout(mainLayout);
connect(add, SIGNAL(clicked()), this, SLOT(accept()));
connect(close, SIGNAL(clicked()), this, SLOT(reject()));
}
| [
"ankur1992@gmail.com"
] | ankur1992@gmail.com |
7c608cbddda993f15491fbac404d58d4489c7a49 | 3e6da13329b52b1eec7ebb872523ffcec6b9114c | /L08/E8.4/Program.cpp | 3eb2cc5f94d17718fa7f2bf0cc16a848edf49bb7 | [] | no_license | GreenStaradtil/AU-E19-E1OPRG | 45d0d90e184564313a973b71822b73774ce9b888 | 47eed6970c86e0c054655e11fc56c6e69ebb605d | refs/heads/master | 2022-03-11T03:36:30.180320 | 2019-11-20T01:02:03 | 2019-11-20T01:02:03 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 346 | cpp | #include <stdio.h>
#include "Weather.h"
int main(int argc, char const *argv[])
{
struct dataset entry1 = { 10, 20, 30, 40 };
struct dataset entry2 = { 1, 2, 3, 4 };
printf_s("Printing dataset with p-by-v\n");
printDataset(entry1);
printf_s("\nPrinting dataset with p-by-r\n");
printDatasetPtr(&entry2);
return 0;
}
| [
"kahr.rasmus@gmail.com"
] | kahr.rasmus@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.