Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .method public hidebysig static
- float64 M () cil managed
- {
- .locals init (
- [0] int32 a,
- [1] int32 b,
- [2] float64 e,
- [3] float64 c,
- [4] float64 d,
- [5] bool,
- [6] float64
- )
- nop //Blank Instruction, no operation
- ldc.i4.s 34 //Push num 34 onto the stack as int32, short form.
- stloc.0 //Pop a value “34” from stack into local variable 0
- ldc.i4.6 //Push num 6 of type int32 onto the stack as int32.
- stloc.1 //Pop a value “6” from stack into local variable 1
- ldc.r8 2.5 //Push num 2.5 of type float64 onto the stack as F.
- stloc.2 //Pop a value “2.5” from stack into local variable 2
- ldloc.0 //Load local variable 0 onto stack. -> load num 34 onto stack
- conv.r8 //Convert to float64, pushing F on stack. -> convert num 34 into float64 type -> 34.0
- ldloc.1 //Load local variable 1 onto stack. -> load num 6 onto stack
- conv.r8 //Convert to float64, pushing F on stack. -> convert num 6 into float64 type -> 6.0
- div //Divide two values to return a quotient or floating-point result. -> 34.0 / 6.0 ??
- stloc.3 //Pop a value from div operation from stack into local variable 3
- ldloc.3 //Load local variable 3 onto stack. -> load 34.0/6.0 (float64) onto stack
- conv.i4 //Convert to int32, pushing int32 on stack. -> Convert 34.0/6.0 (float64) to int32
- ldloc.1 //Load local variable 1 onto stack. -> load 6 (int32) onto stack
- clt //Push 1 (of type int32) if value1 lower than value2, else push 0. ??
- ldc.i4.0 //Push 0 onto the stack as int32.
- ceq //Push 1 (of type int32) if value1 equals value2, else push 0. ??
- stloc.s 5 //Pop a value 5 from stack into local variable indx, short form.
- ldloc.s 5 //Load local variable 5 of index indx onto stack, short form.
- brfalse.s l1 //***Branch to target 11 if value is zero (false), short form. -> if value 0 jump to 11: (jz in asm) ?
- nop //Blank Instruction, no operation
- ldloc.1 //Load local variable 1 onto stack. -> load num 1 onto stack
- ldloc.3 //Load local variable 3 onto stack. -> load num 3 onto stack
- conv.i4 //Convert to int32, pushing int32 on stack. -> convert ldloc.1 & ldloc.3 to type int32 ?
- mul //Multiply values. -> 1*3 ?
- conv.r8 //Convert to float64, pushing F on stack. -> convert mul result into float64 type -> 3.0 ?
- stloc.s 4 //Pop a value 4 from stack into local variable indx, short form.
- nop //Blank Instruction, no operation
- br.s l2 //Branch to target, short form. -> jump to 12:
- l1: //***jump here (from line: "brfalse.s l1", if value 0)
- nop //Blank Instruction, no operation
- ldloc.0 //Load local variable 0 onto stack. -> load num 0 onto stack
- ldloc.1 //Load local variable 1 onto stack. -> load num 1 onto stack
- xor //Bitwise XOR of integer values, returns an integer. ->
- //XOR or eXclusive OR is a logical operation that compares the input values (bits) and generates the output value (bit). The exclusive OR logic is very simple. If the input values are the same, the output //is 0 (or false). If the input values are different, the result is 1 (or true).
- // result 1 ?
- conv.r8 //Convert to float64, pushing F on stack. -> convert num from xor operation into float64 type -> 1.0
- stloc.s 4 //Pop a value 4 from stack into local variable indx, short form.
- nop //Blank Instruction, no operation
- l2: //***jump here (from line: "br.s l2" ) ; jmp in asm
- ldloc.s 4 //Load local variable 4 onto stack. -> load num 4 onto stack
- stloc.s 6 //Pop a value 6 from stack into local variable indx, short form.
- br.s l3 //Branch to target, short form. -> jump to 13: ; next line
- l3: //***jump here (from line: "br.s l3" ) ; jmp in asm
- ldloc.s 6 //Load local variable 6 onto stack. -> load num 6 onto stack
- ret //Return from method, possibly with a value.
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement