Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php /* __________________________________________________ | Obfuscated by YAK P..

Decoded Output download

<?php 
/*   __________________________________________________ 
    |  Obfuscated by YAK Pro - Php Obfuscator  2.0.14  | 
    |              on 2024-06-06 09:24:04              | 
    |    GitHub: https://github.com/pk-fr/yakpro-po    | 
    |__________________________________________________| 
*/ 
 declare (strict_types=1); namespace Brick\Math\Internal; use Brick\Math\Exception\RoundingNecessaryException; use Brick\Math\RoundingMode; abstract class Calculator { public const MAX_POWER = 1000000; public const ALPHABET = "0123456789abcdefghijklmnopqrstuvwxyz"; private static $instance; public static final function set(?Calculator $calculator) : void { self::$instance = $calculator; } public static final function get() : Calculator { goto beg_Y; eON9J: return self::$instance; goto Npmo6; HGFs3: self::$instance = self::detect(); goto u02ds; beg_Y: if (!(self::$instance === null)) { goto davv1; } goto HGFs3; u02ds: davv1: goto eON9J; Npmo6: } private static function detect() : Calculator { goto lzpZm; Ap1xr: baBFP: goto nS7yf; MTZuv: return new Calculator\BcMathCalculator(); goto GjJsG; lzpZm: if (!\extension_loaded("gmp")) { goto baBFP; } goto TMyUO; nS7yf: if (!\extension_loaded("bcmath")) { goto wSX3u; } goto MTZuv; TMyUO: return new Calculator\GmpCalculator(); goto Ap1xr; kZcFk: return new Calculator\NativeCalculator(); goto G2agm; GjJsG: wSX3u: goto kZcFk; G2agm: } protected final function init(string $a, string $b) : array { return [$aNeg = $a[0] === "-", $bNeg = $b[0] === "-", $aNeg ? \substr($a, 1) : $a, $bNeg ? \substr($b, 1) : $b]; } public final function abs(string $n) : string { return $n[0] === "-" ? \substr($n, 1) : $n; } public final function neg(string $n) : string { goto Eggt7; pzC_X: hX1t6: goto Gg2Vv; Eggt7: if (!($n === "0")) { goto hX1t6; } goto oy_j7; Gg2Vv: if (!($n[0] === "-")) { goto iFN_9; } goto aqDKC; z5ELu: return "-" . $n; goto zA67Y; aqDKC: return \substr($n, 1); goto AcdhO; oy_j7: return "0"; goto pzC_X; AcdhO: iFN_9: goto z5ELu; zA67Y: } public final function cmp(string $a, string $b) : int { goto yBtB0; kzKs7: return -1; goto IydQN; x06o3: $aLen = \strlen($aDig); goto dFTjC; fuOYc: return 1; goto dGPp8; WuO8Z: if ($aLen > $bLen) { goto S7lMj; } goto hGyBU; h1s5A: return $aNeg ? -$result : $result; goto arD48; dGBL1: if ($aLen < $bLen) { goto Xsj8O; } goto WuO8Z; tKoZV: S7lMj: goto JzPgM; Klw7T: $result = -1; goto uCF_E; dFTjC: $bLen = \strlen($bDig); goto dGBL1; dGPp8: y4weC: goto x06o3; uCF_E: goto kqF7N; goto tKoZV; JzPgM: $result = 1; goto gNv8J; WwcZg: goto kqF7N; goto Ua7dT; yBtB0: [$aNeg, $bNeg, $aDig, $bDig] = $this->init($a, $b); goto j1PYu; tSTll: if (!($bNeg && !$aNeg)) { goto y4weC; } goto fuOYc; hGyBU: $result = $aDig <=> $bDig; goto WwcZg; IydQN: Nz70h: goto tSTll; j1PYu: if (!($aNeg && !$bNeg)) { goto Nz70h; } goto kzKs7; gNv8J: kqF7N: goto h1s5A; Ua7dT: Xsj8O: goto Klw7T; arD48: } public abstract function add(string $a, string $b) : string; public abstract function sub(string $a, string $b) : string; public abstract function mul(string $a, string $b) : string; public abstract function divQ(string $a, string $b) : string; public abstract function divR(string $a, string $b) : string; public abstract function divQR(string $a, string $b) : array; public abstract function pow(string $a, int $e) : string; public function mod(string $a, string $b) : string { return $this->divR($this->add($this->divR($a, $b), $b), $b); } public function modInverse(string $x, string $m) : ?string { goto gvBJ9; E8Sbg: return null; goto eAsEz; gvBJ9: if (!($m === "1")) { goto kBfXR; } goto CmVY0; fPXzV: AHOCo: goto Ej1p4; wVlHh: $modVal = $this->mod($x, $m); goto fPXzV; Ej1p4: $x = "0"; goto iW1G4; J_ajz: $modVal = $x; goto NnrB4; CmVY0: return "0"; goto WGOkB; NnrB4: if (!($x[0] === "-" || $this->cmp($this->abs($x), $m) >= 0)) { goto AHOCo; } goto wVlHh; iW1G4: $y = "0"; goto bZSEF; QTRoe: return $this->mod($this->add($this->mod($x, $m), $m), $m); goto R3ZeW; Nzw9M: if (!($g !== "1")) { goto QaTpS; } goto E8Sbg; WGOkB: kBfXR: goto J_ajz; bZSEF: $g = $this->gcdExtended($modVal, $m, $x, $y); goto Nzw9M; eAsEz: QaTpS: goto QTRoe; R3ZeW: } public abstract function modPow(string $base, string $exp, string $mod) : string; public function gcd(string $a, string $b) : string { goto aFyyZ; AevlY: return $this->abs($b); goto nFrRK; rHuM6: return $this->gcd($b, $this->divR($a, $b)); goto DEQWo; Vwhy1: bKX8R: goto rHuM6; nFrRK: z8D15: goto i0Wet; AWvNC: return $this->abs($a); goto Vwhy1; i0Wet: if (!($b === "0")) { goto bKX8R; } goto AWvNC; aFyyZ: if (!($a === "0")) { goto z8D15; } goto AevlY; DEQWo: } private function gcdExtended(string $a, string $b, string &$x, string &$y) : string { goto AY6Tr; sjBDD: lTNkF: goto gqYXJ; IPCa5: $gcd = $this->gcdExtended($this->mod($b, $a), $a, $x1, $y1); goto ugybg; I8p8z: $y1 = "0"; goto IPCa5; qvnZv: $y = $x1; goto NAJaS; NAJaS: return $gcd; goto ROc4S; wz3En: $x = "0"; goto wCABX; wCABX: $y = "1"; goto T75mk; ugybg: $x = $this->sub($y1, $this->mul($this->divQ($b, $a), $x1)); goto qvnZv; T75mk: return $b; goto sjBDD; AY6Tr: if (!($a === "0")) { goto lTNkF; } goto wz3En; gqYXJ: $x1 = "0"; goto I8p8z; ROc4S: } public abstract function sqrt(string $n) : string; public function fromBase(string $number, int $base) : string { return $this->fromArbitraryBase(\strtolower($number), self::ALPHABET, $base); } public function toBase(string $number, int $base) : string { goto xI79p; SAMzv: if (!$negative) { goto lfFx2; } goto Xt6_U; mRJcb: $number = \substr($number, 1); goto YMHdX; YMHdX: CNPa5: goto n_ZxY; mz99g: lfFx2: goto CRX0g; CRX0g: return $number; goto dPZOk; sW8uy: if (!$negative) { goto CNPa5; } goto mRJcb; Xt6_U: return "-" . $number; goto mz99g; n_ZxY: $number = $this->toArbitraryBase($number, self::ALPHABET, $base); goto SAMzv; xI79p: $negative = $number[0] === "-"; goto sW8uy; dPZOk: } public final function fromArbitraryBase(string $number, string $alphabet, int $base) : string { goto d5kDi; G1ZNg: $power = "1"; goto XMmdR; Kk1s7: $i--; goto ZgcgC; tCycQ: Wl_oM: goto VNwbU; MbR79: return $result; goto n6Ygq; eocdt: if (!($i >= 0)) { goto owHwe; } goto XmCUM; kgxBN: if (!($index !== 0)) { goto L1Icc; } goto g5YAz; VV2ZL: jB31H: goto i29By; rrhxO: PyrMx: goto eocdt; a8vaR: $power = $this->mul($power, $base); goto VV2ZL; pNany: if (!($i !== 0)) { goto jB31H; } goto a8vaR; XMmdR: $base = (string) $base; goto lpMS1; d5kDi: $number = \ltrim($number, $alphabet[0]); goto imW3d; QhcpY: sMi_q: goto U4GIC; U4GIC: $result = "0"; goto G1ZNg; lpMS1: $i = \strlen($number) - 1; goto rrhxO; VNwbU: if (!($number === $alphabet[1])) { goto sMi_q; } goto Vid9J; XmCUM: $index = \strpos($alphabet, $number[$i]); goto kgxBN; imW3d: if (!($number === '')) { goto Wl_oM; } goto WCRC0; WCRC0: return "0"; goto tCycQ; Vid9J: return "1"; goto QhcpY; ZgcgC: goto PyrMx; goto HdFYN; hfPf4: L1Icc: goto pNany; g5YAz: $result = $this->add($result, $index === 1 ? $power : $this->mul($power, (string) $index)); goto hfPf4; i29By: HO24J: goto Kk1s7; HdFYN: owHwe: goto MbR79; n6Ygq: } public final function toArbitraryBase(string $number, string $alphabet, int $base) : string { goto DHyIa; vVoN0: Gn4JL: goto ahgmW; vG80_: $base = (string) $base; goto Vg4WX; DHyIa: if (!($number === "0")) { goto npzWF; } goto Wed4I; FxJfv: return \strrev($result); goto GLTsW; ZPtNS: [$number, $remainder] = $this->divQR($number, $base); goto p1ssg; h7Rly: $result .= $alphabet[$remainder]; goto bNB0g; Wed4I: return $alphabet[0]; goto FEUVq; p1ssg: $remainder = (int) $remainder; goto h7Rly; Vg4WX: $result = ''; goto vVoN0; bNB0g: goto Gn4JL; goto F3VXP; FEUVq: npzWF: goto vG80_; F3VXP: MZ6Dm: goto FxJfv; ahgmW: if (!($number !== "0")) { goto MZ6Dm; } goto ZPtNS; GLTsW: } public final function divRound(string $a, string $b, int $roundingMode) : string { goto Qe2yE; C2Isl: if (!$increment) { goto KELTC; } goto ssvGU; ohSSs: yEzT3: goto C2Isl; rF9e1: $hasDiscardedFraction = $remainder !== "0"; goto ZijIY; TFmQG: switch ($roundingMode) { case RoundingMode::UNNECESSARY: goto cMBIU; mXIOB: Tf2Et: goto d13jm; d13jm: goto yEzT3; goto zk92o; L2mYW: throw RoundingNecessaryException::roundingNecessary(); goto mXIOB; cMBIU: if (!$hasDiscardedFraction) { goto Tf2Et; } goto L2mYW; zk92o: case RoundingMode::UP: $increment = $hasDiscardedFraction; goto yEzT3; case RoundingMode::DOWN: goto yEzT3; case RoundingMode::CEILING: $increment = $hasDiscardedFraction && $isPositiveOrZero; goto yEzT3; case RoundingMode::FLOOR: $increment = $hasDiscardedFraction && !$isPositiveOrZero; goto yEzT3; case RoundingMode::HALF_UP: $increment = $discardedFractionSign() >= 0; goto yEzT3; case RoundingMode::HALF_DOWN: $increment = $discardedFractionSign() > 0; goto yEzT3; case RoundingMode::HALF_CEILING: $increment = $isPositiveOrZero ? $discardedFractionSign() >= 0 : $discardedFractionSign() > 0; goto yEzT3; case RoundingMode::HALF_FLOOR: $increment = $isPositiveOrZero ? $discardedFractionSign() > 0 : $discardedFractionSign() >= 0; goto yEzT3; case RoundingMode::HALF_EVEN: goto gvGiv; P4mBm: $increment = $lastDigitIsEven ? $discardedFractionSign() > 0 : $discardedFractionSign() >= 0; goto R4d5u; gvGiv: $lastDigit = (int) $quotient[-1]; goto i8tp5; i8tp5: $lastDigitIsEven = $lastDigit % 2 === 0; goto P4mBm; R4d5u: goto yEzT3; goto BLgTI; BLgTI: default: throw new \InvalidArgumentException("Invalid rounding mode."); } goto wz2Sj; ZijIY: $isPositiveOrZero = ($a[0] === "-") === ($b[0] === "-"); goto cdIz5; Qe2yE: [$quotient, $remainder] = $this->divQR($a, $b); goto rF9e1; oJqMa: KELTC: goto US_SX; ssvGU: return $this->add($quotient, $isPositiveOrZero ? "1" : "-1"); goto oJqMa; wz2Sj: fa0HF: goto ohSSs; US_SX: return $quotient; goto RddBz; t4psi: $increment = false; goto TFmQG; cdIz5: $discardedFractionSign = function () use($remainder, $b) : int { goto EFvls; EFvls: $r = $this->abs($this->mul($remainder, "2")); goto TZKpo; TZKpo: $b = $this->abs($b); goto jY2JA; jY2JA: return $this->cmp($r, $b); goto nRFoC; nRFoC: }; goto t4psi; RddBz: } public function and(string $a, string $b) : string { return $this->bitwise("and", $a, $b); } public function or(string $a, string $b) : string { return $this->bitwise("or", $a, $b); } public function xor(string $a, string $b) : string { return $this->bitwise("xor", $a, $b); } private function bitwise(string $operator, string $a, string $b) : string { goto ktcPs; AOcZt: $aLen = \strlen($aBin); goto G_MWH; Z5p6r: if ($aLen > $bLen) { goto wcQd8; } goto Gqfyx; NVOlt: return $negative ? $this->neg($result) : $result; goto KXUUs; WBacZ: $bBin = $this->twosComplement($bBin); goto FIIs8; mWrrg: $result = $this->toDecimal($value); goto NVOlt; yjB6T: wcQd8: goto gQgpS; QvkMU: if (!$bNeg) { goto oumQD; } goto WBacZ; gUKke: goto sRKnw; goto yjB6T; SQcVe: Oy5DQ: goto mWrrg; v3gNk: $aBin = \str_repeat("\0", $bLen - $aLen) . $aBin; goto pXAJ3; ktcPs: [$aNeg, $bNeg, $aDig, $bDig] = $this->init($a, $b); goto spDJc; sIPgH: if (!$aNeg) { goto JQVMc; } goto EkkVz; TX1Ca: if (!$negative) { goto Oy5DQ; } goto uGGP3; FIIs8: oumQD: goto QWCbc; He_P0: Mwoit: goto OZDoZ; gQgpS: $bBin = \str_repeat("\x0", $aLen - $bLen) . $bBin; goto NRxY0; QWCbc: switch ($operator) { case "and": goto oP1U8; oP1U8: $value = $aBin & $bBin; goto oe_Q8; y8HZG: goto cSWrJ; goto G89YY; oe_Q8: $negative = ($aNeg and $bNeg); goto y8HZG; G89YY: case "or": goto TMJ2e; M0JB4: goto cSWrJ; goto o1sYX; iVK1T: $negative = ($aNeg or $bNeg); goto M0JB4; TMJ2e: $value = $aBin | $bBin; goto iVK1T; o1sYX: case "xor": goto PSWoO; qJbD0: $negative = ($aNeg xor $bNeg); goto t_ER5; PSWoO: $value = $aBin ^ $bBin; goto qJbD0; t_ER5: goto cSWrJ; goto Py2wk; Py2wk: default: throw new \InvalidArgumentException("Invalid bitwise operator."); } goto He_P0; k28Qm: $bBin = $this->toBinary($bDig); goto AOcZt; spDJc: $aBin = $this->toBinary($aDig); goto k28Qm; OZDoZ: cSWrJ: goto TX1Ca; cRVos: u2XrR: goto v3gNk; G_MWH: $bLen = \strlen($bBin); goto Z5p6r; EkkVz: $aBin = $this->twosComplement($aBin); goto KbQ5r; uGGP3: $value = $this->twosComplement($value); goto SQcVe; KbQ5r: JQVMc: goto QvkMU; NRxY0: goto sRKnw; goto cRVos; pXAJ3: sRKnw: goto sIPgH; Gqfyx: if ($bLen > $aLen) { goto u2XrR; } goto gUKke; KXUUs: } private function twosComplement(string $number) : string { goto jm5PV; PpIXB: goto hI6cu; goto k3bEG; aQYc9: return $number; goto QyZ6t; p6RN7: mTaWx: goto Q26Ni; io4JD: $number = "\1" . $number; goto qJKeA; qJKeA: snVue: goto RkVd0; Q26Ni: $number[$i] = "\x0"; goto ABcwY; AG8CZ: if (!($i >= 0)) { goto oERRi; } goto mG8Jt; rX3jB: if (!(++$byte !== 256)) { goto mTaWx; } goto dDtJ1; qP35X: goto oERRi; goto p6RN7; pTZvN: $i = \strlen($number) - 1; goto F0LOr; F0LOr: hI6cu: goto AG8CZ; jm5PV: $xor = \str_repeat("\377", \strlen($number)); goto Fjb2r; dDtJ1: $number[$i] = \chr($byte); goto qP35X; mG8Jt: $byte = \ord($number[$i]); goto rX3jB; RkVd0: ZDkAo: goto JSSi_; ABcwY: if (!($i === 0)) { goto snVue; } goto io4JD; k3bEG: oERRi: goto aQYc9; Fjb2r: $number ^= $xor; goto pTZvN; JSSi_: $i--; goto PpIXB; QyZ6t: } private function toBinary(string $number) : string { goto Rve4U; KvVE1: JAhj9: goto OzoVy; ZTvuM: goto RUUhI; goto KvVE1; OzoVy: return \strrev($result); goto gm0DK; MgF8K: RUUhI: goto DMFBo; Rve4U: $result = ''; goto MgF8K; LgAll: [$number, $remainder] = $this->divQR($number, "256"); goto Y_nMg; DMFBo: if (!($number !== "0")) { goto JAhj9; } goto LgAll; Y_nMg: $result .= \chr((int) $remainder); goto ZTvuM; gm0DK: } private function toDecimal(string $bytes) : string { goto bu13R; kj36k: $power = "1"; goto HogdN; x8X41: if (!($i !== 0)) { goto mijM9; } goto ramn1; WD4Mq: if (!($i >= 0)) { goto Qmo__; } goto rhGIG; bYkGQ: oX3UK: goto x8X41; bu13R: $result = "0"; goto kj36k; WIyNW: $i--; goto fFygo; NdQPA: if (!($index !== 0)) { goto oX3UK; } goto iKa3_; HogdN: $i = \strlen($bytes) - 1; goto QkMUj; Z1xEP: OYyax: goto WIyNW; fFygo: goto ktvSl; goto lsi1a; ZZkel: mijM9: goto Z1xEP; ramn1: $power = $this->mul($power, "256"); goto ZZkel; RchH0: return $result; goto Yoth_; lsi1a: Qmo__: goto RchH0; rhGIG: $index = \ord($bytes[$i]); goto NdQPA; iKa3_: $result = $this->add($result, $index === 1 ? $power : $this->mul($power, (string) $index)); goto bYkGQ; QkMUj: ktvSl: goto WD4Mq; Yoth_: } } 
 ?>

Did this file decode correctly?

Original Code

<?php
/*   __________________________________________________
    |  Obfuscated by YAK Pro - Php Obfuscator  2.0.14  |
    |              on 2024-06-06 09:24:04              |
    |    GitHub: https://github.com/pk-fr/yakpro-po    |
    |__________________________________________________|
*/
 declare (strict_types=1); namespace Brick\Math\Internal; use Brick\Math\Exception\RoundingNecessaryException; use Brick\Math\RoundingMode; abstract class Calculator { public const MAX_POWER = 1000000; public const ALPHABET = "\60\x31\62\x33\64\65\x36\x37\70\x39\141\x62\x63\144\145\146\147\150\151\x6a\x6b\x6c\x6d\x6e\x6f\160\x71\162\x73\164\x75\x76\167\x78\171\172"; private static $instance; public static final function set(?Calculator $calculator) : void { self::$instance = $calculator; } public static final function get() : Calculator { goto beg_Y; eON9J: return self::$instance; goto Npmo6; HGFs3: self::$instance = self::detect(); goto u02ds; beg_Y: if (!(self::$instance === null)) { goto davv1; } goto HGFs3; u02ds: davv1: goto eON9J; Npmo6: } private static function detect() : Calculator { goto lzpZm; Ap1xr: baBFP: goto nS7yf; MTZuv: return new Calculator\BcMathCalculator(); goto GjJsG; lzpZm: if (!\extension_loaded("\147\x6d\x70")) { goto baBFP; } goto TMyUO; nS7yf: if (!\extension_loaded("\142\143\155\x61\x74\150")) { goto wSX3u; } goto MTZuv; TMyUO: return new Calculator\GmpCalculator(); goto Ap1xr; kZcFk: return new Calculator\NativeCalculator(); goto G2agm; GjJsG: wSX3u: goto kZcFk; G2agm: } protected final function init(string $a, string $b) : array { return [$aNeg = $a[0] === "\55", $bNeg = $b[0] === "\55", $aNeg ? \substr($a, 1) : $a, $bNeg ? \substr($b, 1) : $b]; } public final function abs(string $n) : string { return $n[0] === "\x2d" ? \substr($n, 1) : $n; } public final function neg(string $n) : string { goto Eggt7; pzC_X: hX1t6: goto Gg2Vv; Eggt7: if (!($n === "\x30")) { goto hX1t6; } goto oy_j7; Gg2Vv: if (!($n[0] === "\55")) { goto iFN_9; } goto aqDKC; z5ELu: return "\x2d" . $n; goto zA67Y; aqDKC: return \substr($n, 1); goto AcdhO; oy_j7: return "\60"; goto pzC_X; AcdhO: iFN_9: goto z5ELu; zA67Y: } public final function cmp(string $a, string $b) : int { goto yBtB0; kzKs7: return -1; goto IydQN; x06o3: $aLen = \strlen($aDig); goto dFTjC; fuOYc: return 1; goto dGPp8; WuO8Z: if ($aLen > $bLen) { goto S7lMj; } goto hGyBU; h1s5A: return $aNeg ? -$result : $result; goto arD48; dGBL1: if ($aLen < $bLen) { goto Xsj8O; } goto WuO8Z; tKoZV: S7lMj: goto JzPgM; Klw7T: $result = -1; goto uCF_E; dFTjC: $bLen = \strlen($bDig); goto dGBL1; dGPp8: y4weC: goto x06o3; uCF_E: goto kqF7N; goto tKoZV; JzPgM: $result = 1; goto gNv8J; WwcZg: goto kqF7N; goto Ua7dT; yBtB0: [$aNeg, $bNeg, $aDig, $bDig] = $this->init($a, $b); goto j1PYu; tSTll: if (!($bNeg && !$aNeg)) { goto y4weC; } goto fuOYc; hGyBU: $result = $aDig <=> $bDig; goto WwcZg; IydQN: Nz70h: goto tSTll; j1PYu: if (!($aNeg && !$bNeg)) { goto Nz70h; } goto kzKs7; gNv8J: kqF7N: goto h1s5A; Ua7dT: Xsj8O: goto Klw7T; arD48: } public abstract function add(string $a, string $b) : string; public abstract function sub(string $a, string $b) : string; public abstract function mul(string $a, string $b) : string; public abstract function divQ(string $a, string $b) : string; public abstract function divR(string $a, string $b) : string; public abstract function divQR(string $a, string $b) : array; public abstract function pow(string $a, int $e) : string; public function mod(string $a, string $b) : string { return $this->divR($this->add($this->divR($a, $b), $b), $b); } public function modInverse(string $x, string $m) : ?string { goto gvBJ9; E8Sbg: return null; goto eAsEz; gvBJ9: if (!($m === "\x31")) { goto kBfXR; } goto CmVY0; fPXzV: AHOCo: goto Ej1p4; wVlHh: $modVal = $this->mod($x, $m); goto fPXzV; Ej1p4: $x = "\x30"; goto iW1G4; J_ajz: $modVal = $x; goto NnrB4; CmVY0: return "\60"; goto WGOkB; NnrB4: if (!($x[0] === "\x2d" || $this->cmp($this->abs($x), $m) >= 0)) { goto AHOCo; } goto wVlHh; iW1G4: $y = "\60"; goto bZSEF; QTRoe: return $this->mod($this->add($this->mod($x, $m), $m), $m); goto R3ZeW; Nzw9M: if (!($g !== "\61")) { goto QaTpS; } goto E8Sbg; WGOkB: kBfXR: goto J_ajz; bZSEF: $g = $this->gcdExtended($modVal, $m, $x, $y); goto Nzw9M; eAsEz: QaTpS: goto QTRoe; R3ZeW: } public abstract function modPow(string $base, string $exp, string $mod) : string; public function gcd(string $a, string $b) : string { goto aFyyZ; AevlY: return $this->abs($b); goto nFrRK; rHuM6: return $this->gcd($b, $this->divR($a, $b)); goto DEQWo; Vwhy1: bKX8R: goto rHuM6; nFrRK: z8D15: goto i0Wet; AWvNC: return $this->abs($a); goto Vwhy1; i0Wet: if (!($b === "\x30")) { goto bKX8R; } goto AWvNC; aFyyZ: if (!($a === "\x30")) { goto z8D15; } goto AevlY; DEQWo: } private function gcdExtended(string $a, string $b, string &$x, string &$y) : string { goto AY6Tr; sjBDD: lTNkF: goto gqYXJ; IPCa5: $gcd = $this->gcdExtended($this->mod($b, $a), $a, $x1, $y1); goto ugybg; I8p8z: $y1 = "\60"; goto IPCa5; qvnZv: $y = $x1; goto NAJaS; NAJaS: return $gcd; goto ROc4S; wz3En: $x = "\x30"; goto wCABX; wCABX: $y = "\61"; goto T75mk; ugybg: $x = $this->sub($y1, $this->mul($this->divQ($b, $a), $x1)); goto qvnZv; T75mk: return $b; goto sjBDD; AY6Tr: if (!($a === "\x30")) { goto lTNkF; } goto wz3En; gqYXJ: $x1 = "\x30"; goto I8p8z; ROc4S: } public abstract function sqrt(string $n) : string; public function fromBase(string $number, int $base) : string { return $this->fromArbitraryBase(\strtolower($number), self::ALPHABET, $base); } public function toBase(string $number, int $base) : string { goto xI79p; SAMzv: if (!$negative) { goto lfFx2; } goto Xt6_U; mRJcb: $number = \substr($number, 1); goto YMHdX; YMHdX: CNPa5: goto n_ZxY; mz99g: lfFx2: goto CRX0g; CRX0g: return $number; goto dPZOk; sW8uy: if (!$negative) { goto CNPa5; } goto mRJcb; Xt6_U: return "\x2d" . $number; goto mz99g; n_ZxY: $number = $this->toArbitraryBase($number, self::ALPHABET, $base); goto SAMzv; xI79p: $negative = $number[0] === "\55"; goto sW8uy; dPZOk: } public final function fromArbitraryBase(string $number, string $alphabet, int $base) : string { goto d5kDi; G1ZNg: $power = "\61"; goto XMmdR; Kk1s7: $i--; goto ZgcgC; tCycQ: Wl_oM: goto VNwbU; MbR79: return $result; goto n6Ygq; eocdt: if (!($i >= 0)) { goto owHwe; } goto XmCUM; kgxBN: if (!($index !== 0)) { goto L1Icc; } goto g5YAz; VV2ZL: jB31H: goto i29By; rrhxO: PyrMx: goto eocdt; a8vaR: $power = $this->mul($power, $base); goto VV2ZL; pNany: if (!($i !== 0)) { goto jB31H; } goto a8vaR; XMmdR: $base = (string) $base; goto lpMS1; d5kDi: $number = \ltrim($number, $alphabet[0]); goto imW3d; QhcpY: sMi_q: goto U4GIC; U4GIC: $result = "\60"; goto G1ZNg; lpMS1: $i = \strlen($number) - 1; goto rrhxO; VNwbU: if (!($number === $alphabet[1])) { goto sMi_q; } goto Vid9J; XmCUM: $index = \strpos($alphabet, $number[$i]); goto kgxBN; imW3d: if (!($number === '')) { goto Wl_oM; } goto WCRC0; WCRC0: return "\60"; goto tCycQ; Vid9J: return "\61"; goto QhcpY; ZgcgC: goto PyrMx; goto HdFYN; hfPf4: L1Icc: goto pNany; g5YAz: $result = $this->add($result, $index === 1 ? $power : $this->mul($power, (string) $index)); goto hfPf4; i29By: HO24J: goto Kk1s7; HdFYN: owHwe: goto MbR79; n6Ygq: } public final function toArbitraryBase(string $number, string $alphabet, int $base) : string { goto DHyIa; vVoN0: Gn4JL: goto ahgmW; vG80_: $base = (string) $base; goto Vg4WX; DHyIa: if (!($number === "\60")) { goto npzWF; } goto Wed4I; FxJfv: return \strrev($result); goto GLTsW; ZPtNS: [$number, $remainder] = $this->divQR($number, $base); goto p1ssg; h7Rly: $result .= $alphabet[$remainder]; goto bNB0g; Wed4I: return $alphabet[0]; goto FEUVq; p1ssg: $remainder = (int) $remainder; goto h7Rly; Vg4WX: $result = ''; goto vVoN0; bNB0g: goto Gn4JL; goto F3VXP; FEUVq: npzWF: goto vG80_; F3VXP: MZ6Dm: goto FxJfv; ahgmW: if (!($number !== "\60")) { goto MZ6Dm; } goto ZPtNS; GLTsW: } public final function divRound(string $a, string $b, int $roundingMode) : string { goto Qe2yE; C2Isl: if (!$increment) { goto KELTC; } goto ssvGU; ohSSs: yEzT3: goto C2Isl; rF9e1: $hasDiscardedFraction = $remainder !== "\x30"; goto ZijIY; TFmQG: switch ($roundingMode) { case RoundingMode::UNNECESSARY: goto cMBIU; mXIOB: Tf2Et: goto d13jm; d13jm: goto yEzT3; goto zk92o; L2mYW: throw RoundingNecessaryException::roundingNecessary(); goto mXIOB; cMBIU: if (!$hasDiscardedFraction) { goto Tf2Et; } goto L2mYW; zk92o: case RoundingMode::UP: $increment = $hasDiscardedFraction; goto yEzT3; case RoundingMode::DOWN: goto yEzT3; case RoundingMode::CEILING: $increment = $hasDiscardedFraction && $isPositiveOrZero; goto yEzT3; case RoundingMode::FLOOR: $increment = $hasDiscardedFraction && !$isPositiveOrZero; goto yEzT3; case RoundingMode::HALF_UP: $increment = $discardedFractionSign() >= 0; goto yEzT3; case RoundingMode::HALF_DOWN: $increment = $discardedFractionSign() > 0; goto yEzT3; case RoundingMode::HALF_CEILING: $increment = $isPositiveOrZero ? $discardedFractionSign() >= 0 : $discardedFractionSign() > 0; goto yEzT3; case RoundingMode::HALF_FLOOR: $increment = $isPositiveOrZero ? $discardedFractionSign() > 0 : $discardedFractionSign() >= 0; goto yEzT3; case RoundingMode::HALF_EVEN: goto gvGiv; P4mBm: $increment = $lastDigitIsEven ? $discardedFractionSign() > 0 : $discardedFractionSign() >= 0; goto R4d5u; gvGiv: $lastDigit = (int) $quotient[-1]; goto i8tp5; i8tp5: $lastDigitIsEven = $lastDigit % 2 === 0; goto P4mBm; R4d5u: goto yEzT3; goto BLgTI; BLgTI: default: throw new \InvalidArgumentException("\x49\x6e\166\141\154\x69\x64\x20\162\x6f\x75\156\144\x69\156\147\x20\155\x6f\x64\145\x2e"); } goto wz2Sj; ZijIY: $isPositiveOrZero = ($a[0] === "\x2d") === ($b[0] === "\x2d"); goto cdIz5; Qe2yE: [$quotient, $remainder] = $this->divQR($a, $b); goto rF9e1; oJqMa: KELTC: goto US_SX; ssvGU: return $this->add($quotient, $isPositiveOrZero ? "\61" : "\55\61"); goto oJqMa; wz2Sj: fa0HF: goto ohSSs; US_SX: return $quotient; goto RddBz; t4psi: $increment = false; goto TFmQG; cdIz5: $discardedFractionSign = function () use($remainder, $b) : int { goto EFvls; EFvls: $r = $this->abs($this->mul($remainder, "\62")); goto TZKpo; TZKpo: $b = $this->abs($b); goto jY2JA; jY2JA: return $this->cmp($r, $b); goto nRFoC; nRFoC: }; goto t4psi; RddBz: } public function and(string $a, string $b) : string { return $this->bitwise("\x61\x6e\x64", $a, $b); } public function or(string $a, string $b) : string { return $this->bitwise("\157\162", $a, $b); } public function xor(string $a, string $b) : string { return $this->bitwise("\x78\x6f\162", $a, $b); } private function bitwise(string $operator, string $a, string $b) : string { goto ktcPs; AOcZt: $aLen = \strlen($aBin); goto G_MWH; Z5p6r: if ($aLen > $bLen) { goto wcQd8; } goto Gqfyx; NVOlt: return $negative ? $this->neg($result) : $result; goto KXUUs; WBacZ: $bBin = $this->twosComplement($bBin); goto FIIs8; mWrrg: $result = $this->toDecimal($value); goto NVOlt; yjB6T: wcQd8: goto gQgpS; QvkMU: if (!$bNeg) { goto oumQD; } goto WBacZ; gUKke: goto sRKnw; goto yjB6T; SQcVe: Oy5DQ: goto mWrrg; v3gNk: $aBin = \str_repeat("\0", $bLen - $aLen) . $aBin; goto pXAJ3; ktcPs: [$aNeg, $bNeg, $aDig, $bDig] = $this->init($a, $b); goto spDJc; sIPgH: if (!$aNeg) { goto JQVMc; } goto EkkVz; TX1Ca: if (!$negative) { goto Oy5DQ; } goto uGGP3; FIIs8: oumQD: goto QWCbc; He_P0: Mwoit: goto OZDoZ; gQgpS: $bBin = \str_repeat("\x0", $aLen - $bLen) . $bBin; goto NRxY0; QWCbc: switch ($operator) { case "\x61\156\x64": goto oP1U8; oP1U8: $value = $aBin & $bBin; goto oe_Q8; y8HZG: goto cSWrJ; goto G89YY; oe_Q8: $negative = ($aNeg and $bNeg); goto y8HZG; G89YY: case "\x6f\162": goto TMJ2e; M0JB4: goto cSWrJ; goto o1sYX; iVK1T: $negative = ($aNeg or $bNeg); goto M0JB4; TMJ2e: $value = $aBin | $bBin; goto iVK1T; o1sYX: case "\x78\x6f\162": goto PSWoO; qJbD0: $negative = ($aNeg xor $bNeg); goto t_ER5; PSWoO: $value = $aBin ^ $bBin; goto qJbD0; t_ER5: goto cSWrJ; goto Py2wk; Py2wk: default: throw new \InvalidArgumentException("\111\x6e\166\x61\x6c\x69\x64\40\x62\x69\x74\x77\x69\x73\145\x20\157\x70\x65\x72\141\164\x6f\x72\x2e"); } goto He_P0; k28Qm: $bBin = $this->toBinary($bDig); goto AOcZt; spDJc: $aBin = $this->toBinary($aDig); goto k28Qm; OZDoZ: cSWrJ: goto TX1Ca; cRVos: u2XrR: goto v3gNk; G_MWH: $bLen = \strlen($bBin); goto Z5p6r; EkkVz: $aBin = $this->twosComplement($aBin); goto KbQ5r; uGGP3: $value = $this->twosComplement($value); goto SQcVe; KbQ5r: JQVMc: goto QvkMU; NRxY0: goto sRKnw; goto cRVos; pXAJ3: sRKnw: goto sIPgH; Gqfyx: if ($bLen > $aLen) { goto u2XrR; } goto gUKke; KXUUs: } private function twosComplement(string $number) : string { goto jm5PV; PpIXB: goto hI6cu; goto k3bEG; aQYc9: return $number; goto QyZ6t; p6RN7: mTaWx: goto Q26Ni; io4JD: $number = "\1" . $number; goto qJKeA; qJKeA: snVue: goto RkVd0; Q26Ni: $number[$i] = "\x0"; goto ABcwY; AG8CZ: if (!($i >= 0)) { goto oERRi; } goto mG8Jt; rX3jB: if (!(++$byte !== 256)) { goto mTaWx; } goto dDtJ1; qP35X: goto oERRi; goto p6RN7; pTZvN: $i = \strlen($number) - 1; goto F0LOr; F0LOr: hI6cu: goto AG8CZ; jm5PV: $xor = \str_repeat("\377", \strlen($number)); goto Fjb2r; dDtJ1: $number[$i] = \chr($byte); goto qP35X; mG8Jt: $byte = \ord($number[$i]); goto rX3jB; RkVd0: ZDkAo: goto JSSi_; ABcwY: if (!($i === 0)) { goto snVue; } goto io4JD; k3bEG: oERRi: goto aQYc9; Fjb2r: $number ^= $xor; goto pTZvN; JSSi_: $i--; goto PpIXB; QyZ6t: } private function toBinary(string $number) : string { goto Rve4U; KvVE1: JAhj9: goto OzoVy; ZTvuM: goto RUUhI; goto KvVE1; OzoVy: return \strrev($result); goto gm0DK; MgF8K: RUUhI: goto DMFBo; Rve4U: $result = ''; goto MgF8K; LgAll: [$number, $remainder] = $this->divQR($number, "\62\65\x36"); goto Y_nMg; DMFBo: if (!($number !== "\60")) { goto JAhj9; } goto LgAll; Y_nMg: $result .= \chr((int) $remainder); goto ZTvuM; gm0DK: } private function toDecimal(string $bytes) : string { goto bu13R; kj36k: $power = "\x31"; goto HogdN; x8X41: if (!($i !== 0)) { goto mijM9; } goto ramn1; WD4Mq: if (!($i >= 0)) { goto Qmo__; } goto rhGIG; bYkGQ: oX3UK: goto x8X41; bu13R: $result = "\x30"; goto kj36k; WIyNW: $i--; goto fFygo; NdQPA: if (!($index !== 0)) { goto oX3UK; } goto iKa3_; HogdN: $i = \strlen($bytes) - 1; goto QkMUj; Z1xEP: OYyax: goto WIyNW; fFygo: goto ktvSl; goto lsi1a; ZZkel: mijM9: goto Z1xEP; ramn1: $power = $this->mul($power, "\x32\65\66"); goto ZZkel; RchH0: return $result; goto Yoth_; lsi1a: Qmo__: goto RchH0; rhGIG: $index = \ord($bytes[$i]); goto NdQPA; iKa3_: $result = $this->add($result, $index === 1 ? $power : $this->mul($power, (string) $index)); goto bYkGQ; QkMUj: ktvSl: goto WD4Mq; Yoth_: } }

Function Calls

None

Variables

None

Stats

MD5 03b955662a0945e851357b0739a30698
Eval Count 0
Decode Time 48 ms