Skip to content

Instantly share code, notes, and snippets.

@carlopi
Created June 26, 2020 11:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save carlopi/886c0bf039d57542eabd44c716f811a5 to your computer and use it in GitHub Desktop.
Save carlopi/886c0bf039d57542eabd44c716f811a5 to your computer and use it in GitHub Desktop.
gcd.js
"use strict";
/*Compiled using Cheerp (R) by Leaning Technologies Ltd*/
var __imul=Math.imul;
var __fround=Math.fround;
var oSlot=0;var nullArray=[null];var nullObj={d:nullArray,o:0};
function __Z3gcdii(La,Lb){
var Lb$paddr$p02=0,La$paddr$p03=0,tmp2=0;
if((Lb|0)===0)return La|0;
Lb$paddr$p02=Lb;
La$paddr$p03=La;
while(1){
La$paddr$p03=(La$paddr$p03|0)%(Lb$paddr$p02|0)|0;
if((La$paddr$p03|0)!==0){
tmp2=La$paddr$p03;
La$paddr$p03=Lb$paddr$p02;
Lb$paddr$p02=tmp2;
continue;
}
break;
}
return Lb$paddr$p02|0;
}
var gcd=__Z3gcdii;
gcd.promise=
Promise.resolve();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment