terraria-cpp2il-methodrecon v1.4.4.9
Terraria mobile dump, with reconstructed method body. Dump with CallAnalysis: https://infinitynichto.github.io/terraria-cpp2il
Loading...
Searching...
No Matches
PrimalityTests.cs
Go to the documentation of this file.
1using System;
2
3namespace Mono.Math.Prime
4{
5 // Token: 0x02000055 RID: 85
6 internal sealed class PrimalityTests
7 {
8 // Token: 0x06000203 RID: 515 RVA: 0x00007E60 File Offset: 0x00006060
10 {
11 int num;
12 return num;
13 }
14
15 // Token: 0x06000204 RID: 516 RVA: 0x00007E94 File Offset: 0x00006094
17 {
18 bool flag;
19 return flag;
20 }
21
22 // Token: 0x06000205 RID: 517 RVA: 0x00007EA4 File Offset: 0x000060A4
24 {
25 /*
26An exception occurred when decompiling this method (06000205)
27
28ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean Mono.Math.Prime.PrimalityTests::RabinMillerTest(Mono.Math.BigInteger,Mono.Math.Prime.ConfidenceFactor)
29
30 ---> System.Exception: Basic block has to end with unconditional control flow.
31{
32 IL_002E:
33 stloc:BigInteger(var_10_34, call:BigInteger(BigInteger::GenerateRandom, ldloc:int32(var_0)))
34 stloc:BigInteger(var_11_3C, call:BigInteger(BigInteger::op_Implicit, ldc.i4:int32(2)))
35 stloc:Sign(var_12_47, call:Sign(Kernel::Compare, ldloc:BigInteger(var_10_34), ldloc:BigInteger(var_11_3C)))
36 stloc:Sign(var_13_52, call:Sign(Kernel::Compare, ldloc:BigInteger(var_10_34), ldloc:BigInteger(var_4_15)))
37 stloc:int32(var_15_55, ldc.i4:int32(1))
38 stloc:bool(var_16_60, call:bool(BigInteger::op_Equality, ldloc:BigInteger(var_14), ldloc:int32[exp:uint32](var_15_55)))
39 stloc:bool(var_17_6B, call:bool(BigInteger::op_Inequality, ldloc:BigInteger(var_14), ldloc:BigInteger(var_4_15)))
40 stloc:BigInteger(var_18_73, call:BigInteger(BigInteger::op_Implicit, ldc.i4:int32(2)))
41 stloc:int32(var_20_76, ldc.i4:int32(1))
42 stloc:bool(var_21_81, call:bool(BigInteger::op_Equality, ldloc:BigInteger(var_19), ldloc:int32[exp:uint32](var_20_76)))
43 stloc:bool(var_22_8C, call:bool(BigInteger::op_Inequality, ldloc:BigInteger(var_19), ldloc:BigInteger(var_4_15)))
44}
45
46 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
47 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
48 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
49 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
50 --- End of inner exception stack trace ---
51 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
52 at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1683
53*/;
54 }
55
56 // Token: 0x06000206 RID: 518 RVA: 0x00007F44 File Offset: 0x00006144
58 {
59 /*
60An exception occurred when decompiling this method (06000206)
61
62ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean Mono.Math.Prime.PrimalityTests::SmallPrimeSppTest(Mono.Math.BigInteger,Mono.Math.Prime.ConfidenceFactor)
63
64 ---> System.Exception: Basic block has to end with unconditional control flow.
65{
66 Block_0:
67 stloc:BigInteger(var_1_06, call:BigInteger(BigInteger::op_Implicit, ldc.i4:int32(1)))
68 stloc:BigInteger(var_2_0E, call:BigInteger(BigInteger::op_Subtraction, ldloc:BigInteger(var_1_06), ldloc:BigInteger(var_1_06)))
69 stloc:int32(var_3_15, call:int32(BigInteger::LowestSetBit, ldloc:BigInteger(var_2_0E)))
70 stloc:BigInteger(var_4_1D, call:BigInteger(Kernel::RightShift, ldloc:BigInteger(var_2_0E), ldloc:int32(var_3_15)))
71 stloc:int32(var_7_23, ldc.i4:int32(1))
72 stloc:bool(var_8_2E, call:bool(BigInteger::op_Equality, ldloc:BigInteger(var_6), ldloc:int32[exp:uint32](var_7_23)))
73 stloc:bool(var_9_38, call:bool(BigInteger::op_Equality, ldloc:BigInteger(var_6), ldloc:BigInteger(var_2_0E)))
74 stloc:class Mono.Math.BigInteger[](var_10_4A, call:class Mono.Math.BigInteger[](Kernel::multiByteDivide, call:BigInteger(BigInteger::op_Multiply, ldloc:BigInteger(var_6), ldloc:BigInteger(var_6)), ldloc:BigInteger(var_6)))
75}
76
77 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
78 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
79 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
80 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
81 --- End of inner exception stack trace ---
82 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
83 at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1683
84*/;
85 }
86 }
87}
class f__AnonymousType0<< Count > j__TPar
static bool RabinMillerTest(BigInteger n, ConfidenceFactor confidence)
static int GetSPPRounds(BigInteger bi, ConfidenceFactor confidence)
static bool Test(BigInteger n, ConfidenceFactor confidence)
static bool SmallPrimeSppTest(BigInteger bi, ConfidenceFactor confidence)