Skip to content

Instantly share code, notes, and snippets.

@likr
Created May 13, 2015 11:42
Show Gist options
  • Save likr/9cfa594fc7b7702b496d to your computer and use it in GitHub Desktop.
Save likr/9cfa594fc7b7702b496d to your computer and use it in GitHub Desktop.
daxpy
function _f2c_daxpy($n,$da,$dx,$incx,$dy,$incy) {
$n = $n|0;
$da = $da|0;
$dx = $dx|0;
$incx = $incx|0;
$dy = $dy|0;
$incy = $incy|0;
var $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0.0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0.0, $112 = 0.0, $113 = 0, $114 = 0, $115 = 0;
var $116 = 0.0, $117 = 0.0, $118 = 0, $119 = 0.0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0.0, $125 = 0.0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0.0, $131 = 0.0, $132 = 0, $133 = 0.0;
var $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0.0, $139 = 0.0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0.0, $145 = 0.0, $146 = 0, $147 = 0.0, $148 = 0, $149 = 0, $15 = 0.0, $150 = 0, $151 = 0;
var $152 = 0.0, $153 = 0.0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0.0, $159 = 0.0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0;
var $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0;
var $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0.0, $52 = 0, $53 = 0, $54 = 0, $55 = 0.0, $56 = 0.0, $57 = 0, $58 = 0, $59 = 0, $6 = 0;
var $60 = 0.0, $61 = 0.0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0;
var $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0.0, $83 = 0, $84 = 0, $85 = 0, $86 = 0.0, $87 = 0.0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0.0, $92 = 0.0, $93 = 0, $94 = 0, $95 = 0, $96 = 0;
var $97 = 0, $98 = 0, $99 = 0, $i__ = 0, $i__1 = 0, $ix = 0, $iy = 0, $m = 0, $mp1 = 0, label = 0, sp = 0;
sp = STACKTOP;
STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort();
$1 = $n;
$2 = $da;
$3 = $dx;
$4 = $incx;
$5 = $dy;
$6 = $incy;
$7 = $5;
$8 = (($7) + -8|0);
$5 = $8;
$9 = $3;
$10 = (($9) + -8|0);
$3 = $10;
$11 = $1;
$12 = HEAP32[$11>>2]|0;
$13 = ($12|0)<=(0);
if ($13) {
$0 = 0;
$162 = $0;
STACKTOP = sp;return ($162|0);
}
$14 = $2;
$15 = +HEAPF64[$14>>3];
$16 = $15 == 0.0;
if ($16) {
$0 = 0;
$162 = $0;
STACKTOP = sp;return ($162|0);
}
$17 = $4;
$18 = HEAP32[$17>>2]|0;
$19 = ($18|0)==(1);
if ($19) {
$20 = $6;
$21 = HEAP32[$20>>2]|0;
$22 = ($21|0)==(1);
if ($22) {
$72 = $1;
$73 = HEAP32[$72>>2]|0;
$74 = (($73|0) % 4)&-1;
$m = $74;
$75 = $m;
$76 = ($75|0)==(0);
do {
if ($76) {
} else {
$77 = $m;
$i__1 = $77;
$i__ = 1;
while(1) {
$78 = $i__;
$79 = $i__1;
$80 = ($78|0)<=($79|0);
if (!($80)) {
break;
}
$81 = $2;
$82 = +HEAPF64[$81>>3];
$83 = $i__;
$84 = $3;
$85 = (($84) + ($83<<3)|0);
$86 = +HEAPF64[$85>>3];
$87 = $82 * $86;
$88 = $i__;
$89 = $5;
$90 = (($89) + ($88<<3)|0);
$91 = +HEAPF64[$90>>3];
$92 = $91 + $87;
HEAPF64[$90>>3] = $92;
$93 = $i__;
$94 = (($93) + 1)|0;
$i__ = $94;
}
$95 = $1;
$96 = HEAP32[$95>>2]|0;
$97 = ($96|0)<(4);
if (!($97)) {
break;
}
$0 = 0;
$162 = $0;
STACKTOP = sp;return ($162|0);
}
} while(0);
$98 = $m;
$99 = (($98) + 1)|0;
$mp1 = $99;
$100 = $1;
$101 = HEAP32[$100>>2]|0;
$i__1 = $101;
$102 = $mp1;
$i__ = $102;
while(1) {
$103 = $i__;
$104 = $i__1;
$105 = ($103|0)<=($104|0);
if (!($105)) {
break;
}
$106 = $2;
$107 = +HEAPF64[$106>>3];
$108 = $i__;
$109 = $3;
$110 = (($109) + ($108<<3)|0);
$111 = +HEAPF64[$110>>3];
$112 = $107 * $111;
$113 = $i__;
$114 = $5;
$115 = (($114) + ($113<<3)|0);
$116 = +HEAPF64[$115>>3];
$117 = $116 + $112;
HEAPF64[$115>>3] = $117;
$118 = $2;
$119 = +HEAPF64[$118>>3];
$120 = $i__;
$121 = (($120) + 1)|0;
$122 = $3;
$123 = (($122) + ($121<<3)|0);
$124 = +HEAPF64[$123>>3];
$125 = $119 * $124;
$126 = $i__;
$127 = (($126) + 1)|0;
$128 = $5;
$129 = (($128) + ($127<<3)|0);
$130 = +HEAPF64[$129>>3];
$131 = $130 + $125;
HEAPF64[$129>>3] = $131;
$132 = $2;
$133 = +HEAPF64[$132>>3];
$134 = $i__;
$135 = (($134) + 2)|0;
$136 = $3;
$137 = (($136) + ($135<<3)|0);
$138 = +HEAPF64[$137>>3];
$139 = $133 * $138;
$140 = $i__;
$141 = (($140) + 2)|0;
$142 = $5;
$143 = (($142) + ($141<<3)|0);
$144 = +HEAPF64[$143>>3];
$145 = $144 + $139;
HEAPF64[$143>>3] = $145;
$146 = $2;
$147 = +HEAPF64[$146>>3];
$148 = $i__;
$149 = (($148) + 3)|0;
$150 = $3;
$151 = (($150) + ($149<<3)|0);
$152 = +HEAPF64[$151>>3];
$153 = $147 * $152;
$154 = $i__;
$155 = (($154) + 3)|0;
$156 = $5;
$157 = (($156) + ($155<<3)|0);
$158 = +HEAPF64[$157>>3];
$159 = $158 + $153;
HEAPF64[$157>>3] = $159;
$160 = $i__;
$161 = (($160) + 4)|0;
$i__ = $161;
}
$0 = 0;
$162 = $0;
STACKTOP = sp;return ($162|0);
}
}
$ix = 1;
$iy = 1;
$23 = $4;
$24 = HEAP32[$23>>2]|0;
$25 = ($24|0)<(0);
if ($25) {
$26 = $1;
$27 = HEAP32[$26>>2]|0;
$28 = (0 - ($27))|0;
$29 = (($28) + 1)|0;
$30 = $4;
$31 = HEAP32[$30>>2]|0;
$32 = Math_imul($29, $31)|0;
$33 = (($32) + 1)|0;
$ix = $33;
}
$34 = $6;
$35 = HEAP32[$34>>2]|0;
$36 = ($35|0)<(0);
if ($36) {
$37 = $1;
$38 = HEAP32[$37>>2]|0;
$39 = (0 - ($38))|0;
$40 = (($39) + 1)|0;
$41 = $6;
$42 = HEAP32[$41>>2]|0;
$43 = Math_imul($40, $42)|0;
$44 = (($43) + 1)|0;
$iy = $44;
}
$45 = $1;
$46 = HEAP32[$45>>2]|0;
$i__1 = $46;
$i__ = 1;
while(1) {
$47 = $i__;
$48 = $i__1;
$49 = ($47|0)<=($48|0);
if (!($49)) {
break;
}
$50 = $2;
$51 = +HEAPF64[$50>>3];
$52 = $ix;
$53 = $3;
$54 = (($53) + ($52<<3)|0);
$55 = +HEAPF64[$54>>3];
$56 = $51 * $55;
$57 = $iy;
$58 = $5;
$59 = (($58) + ($57<<3)|0);
$60 = +HEAPF64[$59>>3];
$61 = $60 + $56;
HEAPF64[$59>>3] = $61;
$62 = $4;
$63 = HEAP32[$62>>2]|0;
$64 = $ix;
$65 = (($64) + ($63))|0;
$ix = $65;
$66 = $6;
$67 = HEAP32[$66>>2]|0;
$68 = $iy;
$69 = (($68) + ($67))|0;
$iy = $69;
$70 = $i__;
$71 = (($70) + 1)|0;
$i__ = $71;
}
$0 = 0;
$162 = $0;
STACKTOP = sp;return ($162|0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment