// Automatically generated by xmlvm2csharp (do not edit).

using org.xmlvm;
namespace java.math {
public class Multiplication: global::java.lang.Object {

static Multiplication() {
    @static();
}

public static int _fwhenUseKaratsuba = 63;

public static global::org.xmlvm._nArrayAdapter<int> _ftenPows;

public static global::org.xmlvm._nArrayAdapter<int> _ffivePows;

public static global::org.xmlvm._nArrayAdapter<global::System.Object> _fbigTenPows;

public static global::org.xmlvm._nArrayAdapter<global::System.Object> _fbigFivePows;

new public static void @static(){
//XMLVM_BEGIN_WRAPPER[java.math.Multiplication: void <clinit>()]
    global::org.xmlvm._nElement _r0;
    global::System.Object _r0_o = null;
    global::org.xmlvm._nElement _r1;
    global::System.Object _r1_o = null;
    global::org.xmlvm._nElement _r2;
    global::System.Object _r2_o = null;
    global::org.xmlvm._nElement _r3;
    global::System.Object _r3_o = null;
    global::org.xmlvm._nElement _r4;
    global::System.Object _r4_o = null;
    global::org.xmlvm._nElement _r6;
    _r1.i = 32;
    _r6.i = 1;
    _r0.i = 10;
    _r0_o = new global::org.xmlvm._nArrayAdapter<int>(new int[_r0.i]);
    _r0_o = new global::org.xmlvm._nArrayAdapter<int>(new int[]{1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000});
    global::java.math.Multiplication._ftenPows = (global::org.xmlvm._nArrayAdapter<int>) _r0_o;
    _r0.i = 14;
    _r0_o = new global::org.xmlvm._nArrayAdapter<int>(new int[_r0.i]);
    _r0_o = new global::org.xmlvm._nArrayAdapter<int>(new int[]{1, 5, 25, 125, 625, 3125, 15625, 78125, 390625, 1953125, 9765625, 48828125, 244140625, 1220703125});
    global::java.math.Multiplication._ffivePows = (global::org.xmlvm._nArrayAdapter<int>) _r0_o;
    _r0_o = new global::org.xmlvm._nArrayAdapter<global::System.Object>(new global::System.Object[_r1.i]);
    global::java.math.Multiplication._fbigTenPows = (global::org.xmlvm._nArrayAdapter<global::System.Object>) _r0_o;
    _r0_o = new global::org.xmlvm._nArrayAdapter<global::System.Object>(new global::System.Object[_r1.i]);
    global::java.math.Multiplication._fbigFivePows = (global::org.xmlvm._nArrayAdapter<global::System.Object>) _r0_o;
    _r0.l = 1L;
    _r2.i = 0;
    label32:;
    _r3.i = 18;
    if (_r2.i <= _r3.i) goto label43;
    _r0.i = _r2.i;
    label37:;
    _r1_o = global::java.math.Multiplication._fbigTenPows;
    _r1.i = ((global::org.xmlvm._nIArray) _r1_o).Length;
    if (_r0.i < _r1.i) goto label67;
    return;
    label43:;
    _r3_o = global::java.math.Multiplication._fbigFivePows;
    _r4_o = global::java.math.BigInteger.valueOf((long) _r0.l);
    ((global::org.xmlvm._nArrayAdapter<global::System.Object>) _r3_o)[_r2.i] = _r4_o;
    _r3_o = global::java.math.Multiplication._fbigTenPows;
    _r4.l = _r0.l << (0x3f & _r2.i);
    _r4_o = global::java.math.BigInteger.valueOf((long) _r4.l);
    ((global::org.xmlvm._nArrayAdapter<global::System.Object>) _r3_o)[_r2.i] = _r4_o;
    _r3.l = 5L;
    _r0.l = _r0.l * _r3.l;
    _r2.i = _r2.i + 1;
    goto label32;
    label67:;
    _r1_o = global::java.math.Multiplication._fbigFivePows;
    _r2_o = global::java.math.Multiplication._fbigFivePows;
    _r3.i = _r0.i - _r6.i;
    _r2_o = ((global::org.xmlvm._nArrayAdapter<global::System.Object>) _r2_o)[_r3.i];
    _r3_o = global::java.math.Multiplication._fbigFivePows;
    _r3_o = ((global::org.xmlvm._nArrayAdapter<global::System.Object>) _r3_o)[_r6.i];
    _r2_o = ((global::java.math.BigInteger) _r2_o).multiply((global::java.math.BigInteger) _r3_o);
    ((global::org.xmlvm._nArrayAdapter<global::System.Object>) _r1_o)[_r0.i] = _r2_o;
    _r1_o = global::java.math.Multiplication._fbigTenPows;
    _r2_o = global::java.math.Multiplication._fbigTenPows;
    _r3.i = _r0.i - _r6.i;
    _r2_o = ((global::org.xmlvm._nArrayAdapter<global::System.Object>) _r2_o)[_r3.i];
    _r3_o = global::java.math.BigInteger._fTEN;
    _r2_o = ((global::java.math.BigInteger) _r2_o).multiply((global::java.math.BigInteger) _r3_o);
    ((global::org.xmlvm._nArrayAdapter<global::System.Object>) _r1_o)[_r0.i] = _r2_o;
    _r0.i = _r0.i + 1;
    goto label37;
//XMLVM_END_WRAPPER[java.math.Multiplication: void <clinit>()]
}

new private void @this(){
//XMLVM_BEGIN_WRAPPER[java.math.Multiplication: void <init>()]
    global::System.Object _r0_o = null;
    _r0_o = this;
    ((global::java.lang.Object) _r0_o).@this();
    return;
//XMLVM_END_WRAPPER[java.math.Multiplication: void <init>()]
}

public static global::System.Object multiply(global::java.math.BigInteger n1, global::java.math.BigInteger n2){
//XMLVM_BEGIN_WRAPPER[java.math.Multiplication: java.math.BigInteger multiply(java.math.BigInteger, java.math.BigInteger)]
    global::System.Object _r0_o = null;
    global::System.Object _r1_o = null;
    global::System.Object _r2_o = null;
    _r1_o = n1;
    _r2_o = n2;
    _r0_o = global::java.math.Multiplication.karatsuba((global::java.math.BigInteger) _r1_o, (global::java.math.BigInteger) _r2_o);
    return (global::java.math.BigInteger) _r0_o;
//XMLVM_END_WRAPPER[java.math.Multiplication: java.math.BigInteger multiply(java.math.BigInteger, java.math.BigInteger)]
}

public static global::System.Object karatsuba(global::java.math.BigInteger n1, global::java.math.BigInteger n2){
//XMLVM_BEGIN_WRAPPER[java.math.Multiplication: java.math.BigInteger karatsuba(java.math.BigInteger, java.math.BigInteger)]
    global::org.xmlvm._nElement _r0;
    global::System.Object _r0_o = null;
    global::org.xmlvm._nElement _r1;
    global::System.Object _r1_o = null;
    global::org.xmlvm._nElement _r2;
    global::org.xmlvm._nElement _r3;
    global::System.Object _r3_o = null;
    global::System.Object _r4_o = null;
    global::System.Object _r5_o = null;
    global::System.Object _r6_o = null;
    global::System.Object _r7_o = null;
    global::System.Object _r8_o = null;
    _r7_o = n1;
    _r8_o = n2;
    _r0.i = ((global::java.math.BigInteger) _r8_o)._fnumberLength;
    _r1.i = ((global::java.math.BigInteger) _r7_o)._fnumberLength;
    if (_r0.i <= _r1.i) goto label96;
    _r0_o = _r7_o;
    _r1_o = _r8_o;
    label8:;
    _r2.i = ((global::java.math.BigInteger) _r0_o)._fnumberLength;
    _r3.i = 63;
    if (_r2.i >= _r3.i) goto label19;
    _r0_o = global::java.math.Multiplication.multiplyPAP((global::java.math.BigInteger) _r1_o, (global::java.math.BigInteger) _r0_o);
    label18:;
    return (global::java.math.BigInteger) _r0_o;
    label19:;
    _r2.i = ((global::java.math.BigInteger) _r1_o)._fnumberLength;
    _r2.i = _r2.i & -2;
    _r2.i = _r2.i << (0x1f & 4);
    _r3_o = ((global::java.math.BigInteger) _r1_o).shiftRight((int) _r2.i);
    _r4_o = ((global::java.math.BigInteger) _r0_o).shiftRight((int) _r2.i);
    _r5_o = ((global::java.math.BigInteger) _r3_o).shiftLeft((int) _r2.i);
    _r1_o = ((global::java.math.BigInteger) _r1_o).subtract((global::java.math.BigInteger) _r5_o);
    _r5_o = ((global::java.math.BigInteger) _r4_o).shiftLeft((int) _r2.i);
    _r0_o = ((global::java.math.BigInteger) _r0_o).subtract((global::java.math.BigInteger) _r5_o);
    _r5_o = global::java.math.Multiplication.karatsuba((global::java.math.BigInteger) _r3_o, (global::java.math.BigInteger) _r4_o);
    _r6_o = global::java.math.Multiplication.karatsuba((global::java.math.BigInteger) _r1_o, (global::java.math.BigInteger) _r0_o);
    _r1_o = ((global::java.math.BigInteger) _r3_o).subtract((global::java.math.BigInteger) _r1_o);
    _r0_o = ((global::java.math.BigInteger) _r0_o).subtract((global::java.math.BigInteger) _r4_o);
    _r0_o = global::java.math.Multiplication.karatsuba((global::java.math.BigInteger) _r1_o, (global::java.math.BigInteger) _r0_o);
    _r0_o = ((global::java.math.BigInteger) _r0_o).add((global::java.math.BigInteger) _r5_o);
    _r0_o = ((global::java.math.BigInteger) _r0_o).add((global::java.math.BigInteger) _r6_o);
    _r0_o = ((global::java.math.BigInteger) _r0_o).shiftLeft((int) _r2.i);
    _r1.i = _r2.i << (0x1f & 1);
    _r1_o = ((global::java.math.BigInteger) _r5_o).shiftLeft((int) _r1.i);
    _r0_o = ((global::java.math.BigInteger) _r1_o).add((global::java.math.BigInteger) _r0_o);
    _r0_o = ((global::java.math.BigInteger) _r0_o).add((global::java.math.BigInteger) _r6_o);
    goto label18;
    label96:;
    _r0_o = _r8_o;
    _r1_o = _r7_o;
    goto label8;
//XMLVM_END_WRAPPER[java.math.Multiplication: java.math.BigInteger karatsuba(java.math.BigInteger, java.math.BigInteger)]
}

public static global::System.Object multiplyPAP(global::java.math.BigInteger n1, global::java.math.BigInteger n2){
//XMLVM_BEGIN_WRAPPER[java.math.Multiplication: java.math.BigInteger multiplyPAP(java.math.BigInteger, java.math.BigInteger)]
    global::org.xmlvm._nElement _r0;
    global::System.Object _r0_o = null;
    global::org.xmlvm._nElement _r1;
    global::System.Object _r1_o = null;
    global::org.xmlvm._nElement _r2;
    global::org.xmlvm._nElement _r3;
    global::org.xmlvm._nElement _r4;
    global::System.Object _r4_o = null;
    global::org.xmlvm._nElement _r5;
    global::System.Object _r5_o = null;
    global::org.xmlvm._nElement _r6;
    global::System.Object _r6_o = null;
    global::org.xmlvm._nElement _r7;
    global::System.Object _r8_o = null;
    global::System.Object _r9_o = null;
    _r8_o = n1;
    _r9_o = n2;
    _r7.i = 1;
    _r6.i = 2;
    _r5.i = 0;
    _r0.i = ((global::java.math.BigInteger) _r8_o)._fnumberLength;
    _r1.i = ((global::java.math.BigInteger) _r9_o)._fnumberLength;
    _r2.i = _r0.i + _r1.i;
    _r3.i = ((global::java.math.BigInteger) _r8_o)._fsign;
    _r4.i = ((global::java.math.BigInteger) _r9_o)._fsign;
    if (_r3.i == _r4.i) goto label43;
    _r3.i = -1;
    label16:;
    if (_r2.i != _r6.i) goto label58;
    _r0_o = ((global::java.math.BigInteger) _r8_o)._fdigits;
    _r0.i = ((global::org.xmlvm._nArrayAdapter<int>) _r0_o)[_r5.i];
    _r1_o = ((global::java.math.BigInteger) _r9_o)._fdigits;
    _r1.i = ((global::org.xmlvm._nArrayAdapter<int>) _r1_o)[_r5.i];
    _r0.l = global::java.math.Multiplication.unsignedMultAddAdd((int) _r0.i, (int) _r1.i, (int) _r5.i, (int) _r5.i);
    _r2.i = (int) _r0.l;
    _r4.i = 32;
    _r0.l = (long) (((ulong) _r0.l) >> (0x3f & (_r4.i)));
    _r0.i = (int) _r0.l;
    if (_r0.i != 0) goto label45;
    _r0_o = new global::java.math.BigInteger();
    ((global::java.math.BigInteger) _r0_o).@this((int) _r3.i, (int) _r2.i);
    label42:;
    return (global::java.math.BigInteger) _r0_o;
    label43:;
    _r3.i = _r7.i;
    goto label16;
    label45:;
    _r1_o = new global::java.math.BigInteger();
    _r4_o = new global::org.xmlvm._nArrayAdapter<int>(new int[_r6.i]);
    ((global::org.xmlvm._nArrayAdapter<int>) _r4_o)[_r5.i] = _r2.i;
    ((global::org.xmlvm._nArrayAdapter<int>) _r4_o)[_r7.i] = _r0.i;
    ((global::java.math.BigInteger) _r1_o).@this((int) _r3.i, (int) _r6.i, (global::org.xmlvm._nArrayAdapter<int>) _r4_o);
    _r0_o = _r1_o;
    goto label42;
    label58:;
    _r4_o = ((global::java.math.BigInteger) _r8_o)._fdigits;
    _r5_o = ((global::java.math.BigInteger) _r9_o)._fdigits;
    _r6_o = new global::org.xmlvm._nArrayAdapter<int>(new int[_r2.i]);
    global::java.math.Multiplication.multArraysPAP((global::org.xmlvm._nArrayAdapter<int>) _r4_o, (int) _r0.i, (global::org.xmlvm._nArrayAdapter<int>) _r5_o, (int) _r1.i, (global::org.xmlvm._nArrayAdapter<int>) _r6_o);
    _r0_o = new global::java.math.BigInteger();
    ((global::java.math.BigInteger) _r0_o).@this((int) _r3.i, (int) _r2.i, (global::org.xmlvm._nArrayAdapter<int>) _r6_o);
    ((global::java.math.BigInteger) _r0_o).cutOffLeadingZeroes();
    goto label42;
//XMLVM_END_WRAPPER[java.math.Multiplication: java.math.BigInteger multiplyPAP(java.math.BigInteger, java.math.BigInteger)]
}

public static void multArraysPAP(global::org.xmlvm._nArrayAdapter<int> n1, int n2, global::org.xmlvm._nArrayAdapter<int> n3, int n4, global::org.xmlvm._nArrayAdapter<int> n5){
//XMLVM_BEGIN_WRAPPER[java.math.Multiplication: void multArraysPAP(int[], int, int[], int, int[])]
    global::org.xmlvm._nElement _r0;
    global::org.xmlvm._nElement _r1;
    global::System.Object _r2_o = null;
    global::org.xmlvm._nElement _r3;
    global::System.Object _r4_o = null;
    global::org.xmlvm._nElement _r5;
    global::System.Object _r6_o = null;
    _r2_o = n1;
    _r3.i = n2;
    _r4_o = n3;
    _r5.i = n4;
    _r6_o = n5;
    _r1.i = 1;
    _r0.i = 0;
    if (_r3.i == 0) goto label6;
    if (_r5.i != 0) goto label7;
    label6:;
    return;
    label7:;
    if (_r3.i != _r1.i) goto label18;
    _r0.i = ((global::org.xmlvm._nArrayAdapter<int>) _r2_o)[_r0.i];
    _r0.i = global::java.math.Multiplication.multiplyByInt((global::org.xmlvm._nArrayAdapter<int>) _r6_o, (global::org.xmlvm._nArrayAdapter<int>) _r4_o, (int) _r5.i, (int) _r0.i);
    ((global::org.xmlvm._nArrayAdapter<int>) _r6_o)[_r5.i] = _r0.i;
    goto label6;
    label18:;
    if (_r5.i != _r1.i) goto label29;
    _r0.i = ((global::org.xmlvm._nArrayAdapter<int>) _r4_o)[_r0.i];
    _r0.i = global::java.math.Multiplication.multiplyByInt((global::org.xmlvm._nArrayAdapter<int>) _r6_o, (global::org.xmlvm._nArrayAdapter<int>) _r2_o, (int) _r3.i, (int) _r0.i);
    ((global::org.xmlvm._nArrayAdapter<int>) _r6_o)[_r3.i] = _r0.i;
    goto label6;
    label29:;
    global::java.math.Multiplication.multPAP((global::org.xmlvm._nArrayAdapter<int>) _r2_o, (global::org.xmlvm._nArrayAdapter<int>) _r4_o, (global::org.xmlvm._nArrayAdapter<int>) _r6_o, (int) _r3.i, (int) _r5.i);
    goto label6;
//XMLVM_END_WRAPPER[java.math.Multiplication: void multArraysPAP(int[], int, int[], int, int[])]
}

public static void multPAP(global::org.xmlvm._nArrayAdapter<int> n1, global::org.xmlvm._nArrayAdapter<int> n2, global::org.xmlvm._nArrayAdapter<int> n3, int n4, int n5){
//XMLVM_BEGIN_WRAPPER[java.math.Multiplication: void multPAP(int[], int[], int[], int, int)]
    global::org.xmlvm._nElement _r0;
    global::org.xmlvm._nElement _r1;
    global::org.xmlvm._nElement _r2;
    global::org.xmlvm._nElement _r3;
    global::org.xmlvm._nElement _r4;
    global::org.xmlvm._nElement _r6;
    global::org.xmlvm._nElement _r7;
    global::System.Object _r8_o = null;
    global::System.Object _r9_o = null;
    global::System.Object _r10_o = null;
    global::org.xmlvm._nElement _r11;
    global::org.xmlvm._nElement _r12;
    _r8_o = n1;
    _r9_o = n2;
    _r10_o = n3;
    _r11.i = n4;
    _r12.i = n5;
    _r7.i = 0;
    if (_r8_o != _r9_o) goto label9;
    if (_r11.i != _r12.i) goto label9;
    global::java.math.Multiplication.square((global::org.xmlvm._nArrayAdapter<int>) _r8_o, (int) _r11.i, (global::org.xmlvm._nArrayAdapter<int>) _r10_o);
    label8:;
    return;
    label9:;
    _r0.i = _r7.i;
    label10:;
    if (_r0.i >= _r11.i) goto label8;
    _r1.l = 0L;
    _r3.i = ((global::org.xmlvm._nArrayAdapter<int>) _r8_o)[_r0.i];
    _r4.l = _r1.l;
    _r1.i = _r7.i;
    label18:;
    if (_r1.i < _r12.i) goto label28;
    _r1.i = _r0.i + _r12.i;
    _r2.i = (int) _r4.l;
    ((global::org.xmlvm._nArrayAdapter<int>) _r10_o)[_r1.i] = _r2.i;
    _r0.i = _r0.i + 1;
    goto label10;
    label28:;
    _r2.i = ((global::org.xmlvm._nArrayAdapter<int>) _r9_o)[_r1.i];
    _r6.i = _r0.i + _r1.i;
    _r6.i = ((global::org.xmlvm._nArrayAdapter<int>) _r10_o)[_r6.i];
    _r4.i = (int) _r4.l;
    _r4.l = global::java.math.Multiplication.unsignedMultAddAdd((int) _r3.i, (int) _r2.i, (int) _r6.i, (int) _r4.i);
    _r2.i = _r0.i + _r1.i;
    _r6.i = (int) _r4.l;
    ((global::org.xmlvm._nArrayAdapter<int>) _r10_o)[_r2.i] = _r6.i;
    _r2.i = 32;
    _r4.l = (long) (((ulong) _r4.l) >> (0x3f & (_r2.i)));
    _r1.i = _r1.i + 1;
    goto label18;
//XMLVM_END_WRAPPER[java.math.Multiplication: void multPAP(int[], int[], int[], int, int)]
}

private static int multiplyByInt(global::org.xmlvm._nArrayAdapter<int> n1, global::org.xmlvm._nArrayAdapter<int> n2, int n3, int n4){
//XMLVM_BEGIN_WRAPPER[java.math.Multiplication: int multiplyByInt(int[], int[], int, int)]
    global::org.xmlvm._nElement _r0;
    global::org.xmlvm._nElement _r1;
    global::org.xmlvm._nElement _r3;
    global::org.xmlvm._nElement _r4;
    global::org.xmlvm._nElement _r5;
    global::System.Object _r7_o = null;
    global::System.Object _r8_o = null;
    global::org.xmlvm._nElement _r9;
    global::org.xmlvm._nElement _r10;
    _r7_o = n1;
    _r8_o = n2;
    _r9.i = n3;
    _r10.i = n4;
    _r4.i = 0;
    _r0.l = 0L;
    _r5.l = _r0.l;
    _r1.l = _r5.l;
    _r0.i = _r4.i;
    label6:;
    if (_r0.i < _r9.i) goto label10;
    _r0.i = (int) _r1.l;
    return _r0.i;
    label10:;
    _r3.i = ((global::org.xmlvm._nArrayAdapter<int>) _r8_o)[_r0.i];
    _r1.i = (int) _r1.l;
    _r1.l = global::java.math.Multiplication.unsignedMultAddAdd((int) _r3.i, (int) _r10.i, (int) _r1.i, (int) _r4.i);
    _r3.i = (int) _r1.l;
    ((global::org.xmlvm._nArrayAdapter<int>) _r7_o)[_r0.i] = _r3.i;
    _r3.i = 32;
    _r1.l = (long) (((ulong) _r1.l) >> (0x3f & (_r3.i)));
    _r0.i = _r0.i + 1;
    goto label6;
//XMLVM_END_WRAPPER[java.math.Multiplication: int multiplyByInt(int[], int[], int, int)]
}

public static int multiplyByInt(global::org.xmlvm._nArrayAdapter<int> n1, int n2, int n3){
//XMLVM_BEGIN_WRAPPER[java.math.Multiplication: int multiplyByInt(int[], int, int)]
    global::org.xmlvm._nElement _r0;
    global::System.Object _r1_o = null;
    global::org.xmlvm._nElement _r2;
    global::org.xmlvm._nElement _r3;
    _r1_o = n1;
    _r2.i = n2;
    _r3.i = n3;
    _r0.i = global::java.math.Multiplication.multiplyByInt((global::org.xmlvm._nArrayAdapter<int>) _r1_o, (global::org.xmlvm._nArrayAdapter<int>) _r1_o, (int) _r2.i, (int) _r3.i);
    return _r0.i;
//XMLVM_END_WRAPPER[java.math.Multiplication: int multiplyByInt(int[], int, int)]
}

public static global::System.Object multiplyByPositiveInt(global::java.math.BigInteger n1, int n2){
//XMLVM_BEGIN_WRAPPER[java.math.Multiplication: java.math.BigInteger multiplyByPositiveInt(java.math.BigInteger, int)]
    global::org.xmlvm._nElement _r0;
    global::System.Object _r0_o = null;
    global::org.xmlvm._nElement _r1;
    global::System.Object _r1_o = null;
    global::org.xmlvm._nElement _r2;
    global::System.Object _r2_o = null;
    global::org.xmlvm._nElement _r3;
    global::org.xmlvm._nElement _r4;
    global::System.Object _r4_o = null;
    global::org.xmlvm._nElement _r5;
    global::org.xmlvm._nElement _r6;
    global::org.xmlvm._nElement _r7;
    global::System.Object _r8_o = null;
    global::org.xmlvm._nElement _r9;
    _r8_o = n1;
    _r9.i = n2;
    _r7.i = 2;
    _r6.i = 1;
    _r5.i = 0;
    _r0.i = ((global::java.math.BigInteger) _r8_o)._fsign;
    if (_r0.i != 0) goto label10;
    _r0_o = global::java.math.BigInteger._fZERO;
    label9:;
    return (global::java.math.BigInteger) _r0_o;
    label10:;
    _r1.i = ((global::java.math.BigInteger) _r8_o)._fnumberLength;
    _r2_o = ((global::java.math.BigInteger) _r8_o)._fdigits;
    if (_r1.i != _r6.i) goto label49;
    _r1.i = ((global::org.xmlvm._nArrayAdapter<int>) _r2_o)[_r5.i];
    _r1.l = global::java.math.Multiplication.unsignedMultAddAdd((int) _r1.i, (int) _r9.i, (int) _r5.i, (int) _r5.i);
    _r3.i = (int) _r1.l;
    _r4.i = 32;
    _r1.l = (long) (((ulong) _r1.l) >> (0x3f & (_r4.i)));
    _r1.i = (int) _r1.l;
    if (_r1.i != 0) goto label36;
    _r1_o = new global::java.math.BigInteger();
    ((global::java.math.BigInteger) _r1_o).@this((int) _r0.i, (int) _r3.i);
    _r0_o = _r1_o;
    goto label9;
    label36:;
    _r2_o = new global::java.math.BigInteger();
    _r4_o = new global::org.xmlvm._nArrayAdapter<int>(new int[_r7.i]);
    ((global::org.xmlvm._nArrayAdapter<int>) _r4_o)[_r5.i] = _r3.i;
    ((global::org.xmlvm._nArrayAdapter<int>) _r4_o)[_r6.i] = _r1.i;
    ((global::java.math.BigInteger) _r2_o).@this((int) _r0.i, (int) _r7.i, (global::org.xmlvm._nArrayAdapter<int>) _r4_o);
    _r0_o = _r2_o;
    goto label9;
    label49:;
    _r3.i = _r1.i + 1;
    _r4_o = new global::org.xmlvm._nArrayAdapter<int>(new int[_r3.i]);
    _r2.i = global::java.math.Multiplication.multiplyByInt((global::org.xmlvm._nArrayAdapter<int>) _r4_o, (global::org.xmlvm._nArrayAdapter<int>) _r2_o, (int) _r1.i, (int) _r9.i);
    ((global::org.xmlvm._nArrayAdapter<int>) _r4_o)[_r1.i] = _r2.i;
    _r1_o = new global::java.math.BigInteger();
    ((global::java.math.BigInteger) _r1_o).@this((int) _r0.i, (int) _r3.i, (global::org.xmlvm._nArrayAdapter<int>) _r4_o);
    ((global::java.math.BigInteger) _r1_o).cutOffLeadingZeroes();
    _r0_o = _r1_o;
    goto label9;
//XMLVM_END_WRAPPER[java.math.Multiplication: java.math.BigInteger multiplyByPositiveInt(java.math.BigInteger, int)]
}

public static global::System.Object pow(global::java.math.BigInteger n1, int n2){
//XMLVM_BEGIN_WRAPPER[java.math.Multiplication: java.math.BigInteger pow(java.math.BigInteger, int)]
    global::org.xmlvm._nElement _r0;
    global::System.Object _r0_o = null;
    global::System.Object _r1_o = null;
    global::org.xmlvm._nElement _r2;
    global::org.xmlvm._nElement _r3;
    global::System.Object _r3_o = null;
    global::System.Object _r4_o = null;
    global::org.xmlvm._nElement _r5;
    global::org.xmlvm._nElement _r6;
    global::System.Object _r7_o = null;
    global::org.xmlvm._nElement _r8;
    _r7_o = n1;
    _r8.i = n2;
    _r6.i = 1;
    _r0_o = global::java.math.BigInteger._fONE;
    _r1_o = _r0_o;
    _r2.i = _r8.i;
    _r0_o = _r7_o;
    label6:;
    if (_r2.i > _r6.i) goto label13;
    _r0_o = ((global::java.math.BigInteger) _r1_o).multiply((global::java.math.BigInteger) _r0_o);
    return (global::java.math.BigInteger) _r0_o;
    label13:;
    _r3.i = _r2.i & 1;
    if (_r3.i == 0) goto label21;
    _r1_o = ((global::java.math.BigInteger) _r1_o).multiply((global::java.math.BigInteger) _r0_o);
    label21:;
    _r3.i = ((global::java.math.BigInteger) _r0_o)._fnumberLength;
    if (_r3.i != _r6.i) goto label32;
    _r0_o = ((global::java.math.BigInteger) _r0_o).multiply((global::java.math.BigInteger) _r0_o);
    label29:;
    _r2.i = _r2.i >> (0x1f & 1);
    goto label6;
    label32:;
    _r3_o = new global::java.math.BigInteger();
    _r4_o = ((global::java.math.BigInteger) _r0_o)._fdigits;
    _r5.i = ((global::java.math.BigInteger) _r0_o)._fnumberLength;
    _r0.i = ((global::java.math.BigInteger) _r0_o)._fnumberLength;
    _r0.i = _r0.i << (0x1f & 1);
    _r0_o = new global::org.xmlvm._nArrayAdapter<int>(new int[_r0.i]);
    _r0_o = global::java.math.Multiplication.square((global::org.xmlvm._nArrayAdapter<int>) _r4_o, (int) _r5.i, (global::org.xmlvm._nArrayAdapter<int>) _r0_o);
    ((global::java.math.BigInteger) _r3_o).@this((int) _r6.i, (global::org.xmlvm._nArrayAdapter<int>) _r0_o);
    _r0_o = _r3_o;
    goto label29;
//XMLVM_END_WRAPPER[java.math.Multiplication: java.math.BigInteger pow(java.math.BigInteger, int)]
}

public static global::System.Object square(global::org.xmlvm._nArrayAdapter<int> n1, int n2, global::org.xmlvm._nArrayAdapter<int> n3){
//XMLVM_BEGIN_WRAPPER[java.math.Multiplication: int[] square(int[], int, int[])]
    global::org.xmlvm._nElement _r0;
    global::org.xmlvm._nElement _r1;
    global::org.xmlvm._nElement _r2;
    global::org.xmlvm._nElement _r4;
    global::org.xmlvm._nElement _r5;
    global::org.xmlvm._nElement _r6;
    global::org.xmlvm._nElement _r7;
    global::org.xmlvm._nElement _r8;
    global::org.xmlvm._nElement _r9;
    global::System.Object _r11_o = null;
    global::org.xmlvm._nElement _r12;
    global::System.Object _r13_o = null;
    _r11_o = n1;
    _r12.i = n2;
    _r13_o = n3;
    _r9.l = 0L;
    _r8.i = 32;
    _r7.i = 0;
    _r0.i = _r7.i;
    label6:;
    if (_r0.i < _r12.i) goto label19;
    _r0.i = _r12.i << (0x1f & 1);
    global::java.math.BitLevel.shiftLeftOneBit((global::org.xmlvm._nArrayAdapter<int>) _r13_o, (global::org.xmlvm._nArrayAdapter<int>) _r13_o, (int) _r0.i);
    _r0.i = _r7.i;
    _r1.i = _r7.i;
    _r2.l = _r9.l;
    label16:;
    if (_r1.i < _r12.i) goto label54;
    return (global::org.xmlvm._nArrayAdapter<int>) _r13_o;
    label19:;
    _r1.i = _r0.i + 1;
    _r2.l = _r9.l;
    label22:;
    if (_r1.i < _r12.i) goto label32;
    _r1.i = _r0.i + _r12.i;
    _r2.i = (int) _r2.l;
    ((global::org.xmlvm._nArrayAdapter<int>) _r13_o)[_r1.i] = _r2.i;
    _r0.i = _r0.i + 1;
    goto label6;
    label32:;
    _r4.i = ((global::org.xmlvm._nArrayAdapter<int>) _r11_o)[_r0.i];
    _r5.i = ((global::org.xmlvm._nArrayAdapter<int>) _r11_o)[_r1.i];
    _r6.i = _r0.i + _r1.i;
    _r6.i = ((global::org.xmlvm._nArrayAdapter<int>) _r13_o)[_r6.i];
    _r2.i = (int) _r2.l;
    _r2.l = global::java.math.Multiplication.unsignedMultAddAdd((int) _r4.i, (int) _r5.i, (int) _r6.i, (int) _r2.i);
    _r4.i = _r0.i + _r1.i;
    _r5.i = (int) _r2.l;
    ((global::org.xmlvm._nArrayAdapter<int>) _r13_o)[_r4.i] = _r5.i;
    _r2.l = (long) (((ulong) _r2.l) >> (0x3f & (_r8.i)));
    _r1.i = _r1.i + 1;
    goto label22;
    label54:;
    _r4.i = ((global::org.xmlvm._nArrayAdapter<int>) _r11_o)[_r1.i];
    _r5.i = ((global::org.xmlvm._nArrayAdapter<int>) _r11_o)[_r1.i];
    _r6.i = ((global::org.xmlvm._nArrayAdapter<int>) _r13_o)[_r0.i];
    _r2.i = (int) _r2.l;
    _r2.l = global::java.math.Multiplication.unsignedMultAddAdd((int) _r4.i, (int) _r5.i, (int) _r6.i, (int) _r2.i);
    _r4.i = (int) _r2.l;
    ((global::org.xmlvm._nArrayAdapter<int>) _r13_o)[_r0.i] = _r4.i;
    _r2.l = (long) (((ulong) _r2.l) >> (0x3f & (_r8.i)));
    _r0.i = _r0.i + 1;
    _r4.i = ((global::org.xmlvm._nArrayAdapter<int>) _r13_o)[_r0.i];
    _r4.l = (long) _r4.i;
    _r6.l = 4294967295L;
    _r4.l = _r4.l & _r6.l;
    _r2.l = _r2.l + _r4.l;
    _r4.i = (int) _r2.l;
    ((global::org.xmlvm._nArrayAdapter<int>) _r13_o)[_r0.i] = _r4.i;
    _r2.l = (long) (((ulong) _r2.l) >> (0x3f & (_r8.i)));
    _r1.i = _r1.i + 1;
    _r0.i = _r0.i + 1;
    goto label16;
//XMLVM_END_WRAPPER[java.math.Multiplication: int[] square(int[], int, int[])]
}

public static global::System.Object multiplyByTenPow(global::java.math.BigInteger n1, long n2){
//XMLVM_BEGIN_WRAPPER[java.math.Multiplication: java.math.BigInteger multiplyByTenPow(java.math.BigInteger, long)]
    global::org.xmlvm._nElement _r0;
    global::System.Object _r0_o = null;
    global::org.xmlvm._nElement _r1;
    global::System.Object _r2_o = null;
    global::org.xmlvm._nElement _r3;
    _r2_o = n1;
    _r3.l = n2;
    _r0_o = global::java.math.Multiplication._ftenPows;
    _r0.i = ((global::org.xmlvm._nIArray) _r0_o).Length;
    _r0.l = (long) _r0.i;
    _r0.i = _r3.l > _r0.l ? 1 : (_r3.l == _r0.l ? 0 : -1);
    if (_r0.i >= 0) goto label18;
    _r0_o = global::java.math.Multiplication._ftenPows;
    _r1.i = (int) _r3.l;
    _r0.i = ((global::org.xmlvm._nArrayAdapter<int>) _r0_o)[_r1.i];
    _r0_o = global::java.math.Multiplication.multiplyByPositiveInt((global::java.math.BigInteger) _r2_o, (int) _r0.i);
    label17:;
    return (global::java.math.BigInteger) _r0_o;
    label18:;
    _r0_o = global::java.math.Multiplication.powerOf10((long) _r3.l);
    _r0_o = ((global::java.math.BigInteger) _r2_o).multiply((global::java.math.BigInteger) _r0_o);
    goto label17;
//XMLVM_END_WRAPPER[java.math.Multiplication: java.math.BigInteger multiplyByTenPow(java.math.BigInteger, long)]
}

public static global::System.Object powerOf10(long n1){
//XMLVM_BEGIN_WRAPPER[java.math.Multiplication: java.math.BigInteger powerOf10(long)]
    global::org.xmlvm._nElement _r0;
    global::System.Object _r0_o = null;
    global::org.xmlvm._nElement _r1;
    global::System.Object _r1_o = null;
    global::System.Object _r2_o = null;
    global::org.xmlvm._nElement _r3;
    global::System.Object _r3_o = null;
    global::org.xmlvm._nElement _r4;
    global::System.Object _r4_o = null;
    global::org.xmlvm._nElement _r5;
    global::org.xmlvm._nElement _r7;
    global::org.xmlvm._nElement _r9;
    global::org.xmlvm._nElement _r10;
    global::org.xmlvm._nElement _r11;
    global::org.xmlvm._nElement _r13;
    _r13.l = n1;
    _r10.i = 2147483647;
    _r9.i = 1;
    _r7.l = 2147483647L;
    _r0.i = (int) _r13.l;
    _r1_o = global::java.math.Multiplication._fbigTenPows;
    _r1.i = ((global::org.xmlvm._nIArray) _r1_o).Length;
    _r1.l = (long) _r1.i;
    _r1.i = _r13.l > _r1.l ? 1 : (_r13.l == _r1.l ? 0 : -1);
    if (_r1.i >= 0) goto label21;
    _r1_o = global::java.math.Multiplication._fbigTenPows;
    _r0_o = ((global::org.xmlvm._nArrayAdapter<global::System.Object>) _r1_o)[_r0.i];
    label20:;
    return (global::java.math.BigInteger) _r0_o;
    label21:;
    _r1.l = 50L;
    _r1.i = _r13.l > _r1.l ? 1 : (_r13.l == _r1.l ? 0 : -1);
    if (_r1.i > 0) goto label34;
    _r1_o = global::java.math.BigInteger._fTEN;
    _r0_o = ((global::java.math.BigInteger) _r1_o).pow((int) _r0.i);
    goto label20;
    label34:;
    _r1.l = 1000L;
    _r1.i = _r13.l > _r1.l ? 1 : (_r13.l == _r1.l ? 0 : -1);
    if (_r1.i > 0) goto label53;
    _r1_o = global::java.math.Multiplication._fbigFivePows;
    _r1_o = ((global::org.xmlvm._nArrayAdapter<global::System.Object>) _r1_o)[_r9.i];
    _r1_o = ((global::java.math.BigInteger) _r1_o).pow((int) _r0.i);
    _r0_o = ((global::java.math.BigInteger) _r1_o).shiftLeft((int) _r0.i);
    goto label20;
    label53:;
    _r1.l = 1L;
    _r3.d = (double) _r13.l;
    _r5.d = 2.4082399653118496D;
    _r3.d = _r3.d / _r5.d;
    _r3.l = (long) _r3.d;
    _r1.l = _r1.l + _r3.l;
    _r3_o = global::java.lang.Runtime.getRuntime();
    _r3.l = ((global::java.lang.Runtime) _r3_o).freeMemory();
    _r1.i = _r1.l > _r3.l ? 1 : (_r1.l == _r3.l ? 0 : -1);
    if (_r1.i <= 0) goto label88;
    _r0_o = new global::java.lang.ArithmeticException();
    // Value=math.01
    _r1_o = new global::java.lang.String();
    ((global::java.lang.String)_r1_o).@this(new global::org.xmlvm._nArrayAdapter<char>(new char[] {unchecked((char) unchecked((uint)109)), unchecked((char) unchecked((uint) 97)), unchecked((char) unchecked((uint) 116)), unchecked((char) unchecked((uint) 104)), unchecked((char) unchecked((uint) 46)), unchecked((char) unchecked((uint) 48)), unchecked((char) unchecked((uint) 49))}));
    _r1_o = global::org.apache.harmony.math.@internal.nls.Messages.getString((global::java.lang.String) _r1_o);
    ((global::java.lang.ArithmeticException) _r0_o).@this((global::java.lang.String) _r1_o);
    throw new global::org.xmlvm._nExceptionAdapter((global::java.lang.ArithmeticException) _r0_o);
    label88:;
    _r1.i = _r13.l > _r7.l ? 1 : (_r13.l == _r7.l ? 0 : -1);
    if (_r1.i > 0) goto label105;
    _r1_o = global::java.math.Multiplication._fbigFivePows;
    _r1_o = ((global::org.xmlvm._nArrayAdapter<global::System.Object>) _r1_o)[_r9.i];
    _r1_o = ((global::java.math.BigInteger) _r1_o).pow((int) _r0.i);
    _r0_o = ((global::java.math.BigInteger) _r1_o).shiftLeft((int) _r0.i);
    goto label20;
    label105:;
    _r0_o = global::java.math.Multiplication._fbigFivePows;
    _r0_o = ((global::org.xmlvm._nArrayAdapter<global::System.Object>) _r0_o)[_r9.i];
    _r0_o = ((global::java.math.BigInteger) _r0_o).pow((int) _r10.i);
    _r1.l = _r13.l - _r7.l;
    _r3.l = _r13.l % _r7.l;
    _r3.i = (int) _r3.l;
    _r4_o = _r0_o;
    label119:;
    _r5.i = _r1.l > _r7.l ? 1 : (_r1.l == _r7.l ? 0 : -1);
    if (_r5.i > 0) goto label154;
    _r0_o = global::java.math.Multiplication._fbigFivePows;
    _r0_o = ((global::org.xmlvm._nArrayAdapter<global::System.Object>) _r0_o)[_r9.i];
    _r0_o = ((global::java.math.BigInteger) _r0_o).pow((int) _r3.i);
    _r0_o = ((global::java.math.BigInteger) _r4_o).multiply((global::java.math.BigInteger) _r0_o);
    _r0_o = ((global::java.math.BigInteger) _r0_o).shiftLeft((int) _r10.i);
    _r1.l = _r13.l - _r7.l;
    _r11.l = _r1.l;
    _r2_o = _r0_o;
    _r0.l = _r11.l;
    label144:;
    _r4.i = _r0.l > _r7.l ? 1 : (_r0.l == _r7.l ? 0 : -1);
    if (_r4.i > 0) goto label160;
    _r0_o = ((global::java.math.BigInteger) _r2_o).shiftLeft((int) _r3.i);
    goto label20;
    label154:;
    _r4_o = ((global::java.math.BigInteger) _r4_o).multiply((global::java.math.BigInteger) _r0_o);
    _r1.l = _r1.l - _r7.l;
    goto label119;
    label160:;
    _r2_o = ((global::java.math.BigInteger) _r2_o).shiftLeft((int) _r10.i);
    _r0.l = _r0.l - _r7.l;
    goto label144;
//XMLVM_END_WRAPPER[java.math.Multiplication: java.math.BigInteger powerOf10(long)]
}

public static global::System.Object multiplyByFivePow(global::java.math.BigInteger n1, int n2){
//XMLVM_BEGIN_WRAPPER[java.math.Multiplication: java.math.BigInteger multiplyByFivePow(java.math.BigInteger, int)]
    global::org.xmlvm._nElement _r0;
    global::System.Object _r0_o = null;
    global::org.xmlvm._nElement _r1;
    global::System.Object _r2_o = null;
    global::org.xmlvm._nElement _r3;
    _r2_o = n1;
    _r3.i = n2;
    _r0_o = global::java.math.Multiplication._ffivePows;
    _r0.i = ((global::org.xmlvm._nIArray) _r0_o).Length;
    if (_r3.i >= _r0.i) goto label14;
    _r0_o = global::java.math.Multiplication._ffivePows;
    _r0.i = ((global::org.xmlvm._nArrayAdapter<int>) _r0_o)[_r3.i];
    _r0_o = global::java.math.Multiplication.multiplyByPositiveInt((global::java.math.BigInteger) _r2_o, (int) _r0.i);
    label13:;
    return (global::java.math.BigInteger) _r0_o;
    label14:;
    _r0_o = global::java.math.Multiplication._fbigFivePows;
    _r0.i = ((global::org.xmlvm._nIArray) _r0_o).Length;
    if (_r3.i >= _r0.i) goto label28;
    _r0_o = global::java.math.Multiplication._fbigFivePows;
    _r0_o = ((global::org.xmlvm._nArrayAdapter<global::System.Object>) _r0_o)[_r3.i];
    _r0_o = ((global::java.math.BigInteger) _r2_o).multiply((global::java.math.BigInteger) _r0_o);
    goto label13;
    label28:;
    _r0_o = global::java.math.Multiplication._fbigFivePows;
    _r1.i = 1;
    _r0_o = ((global::org.xmlvm._nArrayAdapter<global::System.Object>) _r0_o)[_r1.i];
    _r0_o = ((global::java.math.BigInteger) _r0_o).pow((int) _r3.i);
    _r0_o = ((global::java.math.BigInteger) _r2_o).multiply((global::java.math.BigInteger) _r0_o);
    goto label13;
//XMLVM_END_WRAPPER[java.math.Multiplication: java.math.BigInteger multiplyByFivePow(java.math.BigInteger, int)]
}

public static long unsignedMultAddAdd(int n1, int n2, int n3, int n4){
//XMLVM_BEGIN_WRAPPER[java.math.Multiplication: long unsignedMultAddAdd(int, int, int, int)]
    global::org.xmlvm._nElement _r0;
    global::org.xmlvm._nElement _r2;
    global::org.xmlvm._nElement _r4;
    global::org.xmlvm._nElement _r6;
    global::org.xmlvm._nElement _r7;
    global::org.xmlvm._nElement _r8;
    global::org.xmlvm._nElement _r9;
    _r6.i = n1;
    _r7.i = n2;
    _r8.i = n3;
    _r9.i = n4;
    _r4.l = 4294967295L;
    _r0.l = (long) _r6.i;
    _r0.l = _r0.l & _r4.l;
    _r2.l = (long) _r7.i;
    _r2.l = _r2.l & _r4.l;
    _r0.l = _r0.l * _r2.l;
    _r2.l = (long) _r8.i;
    _r2.l = _r2.l & _r4.l;
    _r0.l = _r0.l + _r2.l;
    _r2.l = (long) _r9.i;
    _r2.l = _r2.l & _r4.l;
    _r0.l = _r0.l + _r2.l;
    return _r0.l;
//XMLVM_END_WRAPPER[java.math.Multiplication: long unsignedMultAddAdd(int, int, int, int)]
}

//XMLVM_BEGIN_WRAPPER[java.math.Multiplication]
//XMLVM_END_WRAPPER[java.math.Multiplication]

} // end of class: Multiplication

} // end of namespace: java.math
