address StubGenerator::generate_libmPow()

in src/hotspot/cpu/x86/stubGenerator_x86_64_pow.cpp [761:1863]


address StubGenerator::generate_libmPow() {
  StubId stub_id = StubId::stubgen_dpow_id;
  StubCodeMark mark(this, stub_id);
  address start = __ pc();

  Label L_2TAG_PACKET_0_0_2, L_2TAG_PACKET_1_0_2, L_2TAG_PACKET_2_0_2, L_2TAG_PACKET_3_0_2;
  Label L_2TAG_PACKET_4_0_2, L_2TAG_PACKET_5_0_2, L_2TAG_PACKET_6_0_2, L_2TAG_PACKET_7_0_2;
  Label L_2TAG_PACKET_8_0_2, L_2TAG_PACKET_9_0_2, L_2TAG_PACKET_10_0_2, L_2TAG_PACKET_11_0_2;
  Label L_2TAG_PACKET_12_0_2, L_2TAG_PACKET_13_0_2, L_2TAG_PACKET_14_0_2, L_2TAG_PACKET_15_0_2;
  Label L_2TAG_PACKET_16_0_2, L_2TAG_PACKET_17_0_2, L_2TAG_PACKET_18_0_2, L_2TAG_PACKET_19_0_2;
  Label L_2TAG_PACKET_20_0_2, L_2TAG_PACKET_21_0_2, L_2TAG_PACKET_22_0_2, L_2TAG_PACKET_23_0_2;
  Label L_2TAG_PACKET_24_0_2, L_2TAG_PACKET_25_0_2, L_2TAG_PACKET_26_0_2, L_2TAG_PACKET_27_0_2;
  Label L_2TAG_PACKET_28_0_2, L_2TAG_PACKET_29_0_2, L_2TAG_PACKET_30_0_2, L_2TAG_PACKET_31_0_2;
  Label L_2TAG_PACKET_32_0_2, L_2TAG_PACKET_33_0_2, L_2TAG_PACKET_34_0_2, L_2TAG_PACKET_35_0_2;
  Label L_2TAG_PACKET_36_0_2, L_2TAG_PACKET_37_0_2, L_2TAG_PACKET_38_0_2, L_2TAG_PACKET_39_0_2;
  Label L_2TAG_PACKET_40_0_2, L_2TAG_PACKET_41_0_2, L_2TAG_PACKET_42_0_2, L_2TAG_PACKET_43_0_2;
  Label L_2TAG_PACKET_44_0_2, L_2TAG_PACKET_45_0_2, L_2TAG_PACKET_46_0_2, L_2TAG_PACKET_47_0_2;
  Label L_2TAG_PACKET_48_0_2, L_2TAG_PACKET_49_0_2, L_2TAG_PACKET_50_0_2, L_2TAG_PACKET_51_0_2;
  Label L_2TAG_PACKET_52_0_2, L_2TAG_PACKET_53_0_2, L_2TAG_PACKET_54_0_2, L_2TAG_PACKET_55_0_2;
  Label L_2TAG_PACKET_56_0_2;
  Label B1_2, B1_3, B1_5;
  Label L_POW;

  address HIGHSIGMASK    = (address)_HIGHSIGMASK;
  address LOG2_E         = (address)_LOG2_E;
  address coeff          = (address)_coeff_pow;
  address L_tbl          = (address)_L_tbl_pow;
  address HIGHMASK_Y     = (address)_HIGHMASK_Y;
  address T_exp          = (address)_T_exp;
  address e_coeff        = (address)_e_coeff;
  address coeff_h        = (address)_coeff_h;
  address HIGHMASK_LOG_X = (address)_HIGHMASK_LOG_X;
  address HALFMASK       = (address)_HALFMASK;
  address log2           = (address)_log2_pow;
  address DOUBLE2        = (address)_DOUBLE2;
  address DOUBLE0        = (address)_DOUBLE0;
  address DOUBLE0DOT5    = (address)_DOUBLE0DOT5;

  __ enter(); // required for proper stackwalking of RuntimeStub frame

  __ subq(rsp, 40);
  __ movsd(Address(rsp, 8), xmm0);
  __ movsd(Address(rsp, 16), xmm1);

  // Special case: pow(x, 2.0) => x * x
  __ movdq(r8, xmm1);
  __ cmp64(r8, ExternalAddress(DOUBLE2), r9 /*rscratch*/);
  __ jccb(Assembler::notEqual, B1_2);
  __ mulsd(xmm0, xmm0);
  __ jmp(B1_5);

  // Special case: pow(x, 0.5) => sqrt(x)
  __ bind(B1_2);
  __ cmp64(r8, ExternalAddress(DOUBLE0DOT5), r9 /*rscratch*/);
  __ jccb(Assembler::notEqual, L_POW); // For pow(x, y), check whether y == 0.5
  __ movdq(r9, xmm0);
  __ cmp64(r9, ExternalAddress(DOUBLE0), r10 /*rscratch*/);
  __ jccb(Assembler::less, L_POW); // pow(x, 0.5) => sqrt(x) only for x >= 0.0 or x is +inf/NaN
  __ sqrtsd(xmm0, xmm0);
  __ jmp(B1_5);

  __ bind(L_POW);
  __ pextrw(rax, xmm0, 3);
  __ xorpd(xmm2, xmm2);
  __ mov64(r9, 0x3ff0000000000000);
  __ movdq(xmm2, r9);
  __ movl(r8, 1069088768);
  __ movdq(xmm7, r8);
  __ xorpd(xmm1, xmm1);
  __ mov64(r10, 0x77f0000000000000);
  __ movdq(xmm1, r10);
  __ movdqu(xmm3, xmm0);
  __ movl(rdx, 32752);
  __ andl(rdx, rax);
  __ subl(rdx, 16368);
  __ movl(rcx, rdx);
  __ sarl(rdx, 31);
  __ addl(rcx, rdx);
  __ xorl(rcx, rdx);
  __ por(xmm0, xmm2);
  __ movdqu(xmm6, ExternalAddress(HIGHSIGMASK), r9 /*rscratch*/);    //0x00000000UL, 0xfffff800UL, 0x00000000UL, 0xfffff800UL
  __ psrlq(xmm0, 27);
  __ movq(xmm2, ExternalAddress(LOG2_E), r9 /*rscratch*/);    //0x00000000UL, 0x3ff72000UL, 0x161bb241UL, 0xbf5dabe1UL
  __ psrld(xmm0, 2);
  __ addl(rcx, 16);
  __ bsrl(rcx, rcx);
  __ rcpps(xmm0, xmm0);
  __ psllq(xmm3, 12);
  __ movl(r11, 8192);
  __ movdq(xmm4, r11);
  __ psrlq(xmm3, 12);
  __ subl(rax, 16);
  __ cmpl(rax, 32736);
  __ jcc(Assembler::aboveEqual, L_2TAG_PACKET_0_0_2);
  __ movl(r8, 0);

  __ bind(L_2TAG_PACKET_1_0_2);
  __ mulss(xmm0, xmm7);
  __ movl(rdx, -1);
  __ subl(rcx, 4);
  __ shll(rdx);
  __ shlq(rdx, 32);
  __ movdq(xmm5, rdx);
  __ por(xmm3, xmm1);
  __ subl(rax, 16351);
  __ cmpl(rax, 1);
  __ jcc(Assembler::belowEqual, L_2TAG_PACKET_2_0_2);
  __ paddd(xmm0, xmm4);
  __ pand(xmm5, xmm3);
  __ movdl(rdx, xmm0);
  __ psllq(xmm0, 29);

  __ bind(L_2TAG_PACKET_3_0_2);
  __ subsd(xmm3, xmm5);
  __ pand(xmm0, xmm6);
  __ subl(rax, 1);
  __ sarl(rax, 4);
  __ cvtsi2sdl(xmm7, rax);
  __ mulpd(xmm5, xmm0);

  __ bind(L_2TAG_PACKET_4_0_2);
  __ mulsd(xmm3, xmm0);
  __ movdqu(xmm1, ExternalAddress(coeff), r9 /*rscratch*/);    //0x6dc96112UL, 0xbf836578UL, 0xee241472UL, 0xbf9b0301UL
  __ lea(r11, ExternalAddress(L_tbl));
  __ subsd(xmm5, xmm2);
  __ movdqu(xmm4, ExternalAddress(coeff + 16), r9 /*rscratch*/);    //0x9f95985aUL, 0xbfb528dbUL, 0xb3841d2aUL, 0xbfd619b6UL
  __ movl(rcx, rax);
  __ sarl(rax, 31);
  __ addl(rcx, rax);
  __ xorl(rax, rcx);
  __ addl(rax, 1);
  __ bsrl(rax, rax);
  __ unpcklpd(xmm5, xmm3);
  __ movdqu(xmm6, ExternalAddress(coeff + 32), r9 /*rscratch*/);    //0x518775e3UL, 0x3f9004f2UL, 0xac8349bbUL, 0x3fa76c9bUL
  __ addsd(xmm3, xmm5);
  __ andl(rdx, 16760832);
  __ shrl(rdx, 10);
  __ addpd(xmm5, Address(r11, rdx, Address::times_1, -3648));
  __ movdqu(xmm0, ExternalAddress(coeff + 48), r9 /*rscratch*/);    //0x486ececcUL, 0x3fc4635eUL, 0x161bb241UL, 0xbf5dabe1UL
  __ pshufd(xmm2, xmm3, 68);
  __ mulsd(xmm3, xmm3);
  __ mulpd(xmm1, xmm2);
  __ mulpd(xmm4, xmm2);
  __ addsd(xmm5, xmm7);
  __ mulsd(xmm2, xmm3);
  __ addpd(xmm6, xmm1);
  __ mulsd(xmm3, xmm3);
  __ addpd(xmm0, xmm4);
  __ movq(xmm1, Address(rsp, 16));
  __ movw(rcx, Address(rsp, 22));
  __ pshufd(xmm7, xmm5, 238);
  __ movq(xmm4, ExternalAddress(HIGHMASK_Y), r9 /*rscratch*/);    //0x00000000UL, 0xfffffff8UL, 0x00000000UL, 0xffffffffUL
  __ mulpd(xmm6, xmm2);
  __ pshufd(xmm3, xmm3, 68);
  __ mulpd(xmm0, xmm2);
  __ shll(rax, 4);
  __ subl(rax, 15872);
  __ andl(rcx, 32752);
  __ addl(rax, rcx);
  __ mulpd(xmm3, xmm6);
  __ cmpl(rax, 624);
  __ jcc(Assembler::aboveEqual, L_2TAG_PACKET_5_0_2);
  __ xorpd(xmm6, xmm6);
  __ movl(rdx, 17080);
  __ pinsrw(xmm6, rdx, 3);
  __ movdqu(xmm2, xmm1);
  __ pand(xmm4, xmm1);
  __ subsd(xmm1, xmm4);
  __ mulsd(xmm4, xmm5);
  __ addsd(xmm0, xmm7);
  __ mulsd(xmm1, xmm5);
  __ movdqu(xmm7, xmm6);
  __ addsd(xmm6, xmm4);
  __ lea(r11, ExternalAddress(T_exp));
  __ addpd(xmm3, xmm0);
  __ movdl(rdx, xmm6);
  __ subsd(xmm6, xmm7);
  __ pshufd(xmm0, xmm3, 238);
  __ subsd(xmm4, xmm6);
  __ addsd(xmm0, xmm3);
  __ movl(rcx, rdx);
  __ andl(rdx, 255);
  __ addl(rdx, rdx);
  __ movdqu(xmm5, Address(r11, rdx, Address::times_8, 0));
  __ addsd(xmm4, xmm1);
  __ mulsd(xmm2, xmm0);
  __ movdqu(xmm7, ExternalAddress(e_coeff),      r9 /*rscratch*/);    //0xe78a6731UL, 0x3f55d87fUL, 0xd704a0c0UL, 0x3fac6b08UL
  __ movdqu(xmm3, ExternalAddress(e_coeff + 16), r9 /*rscratch*/);    //0x6fba4e77UL, 0x3f83b2abUL, 0xff82c58fUL, 0x3fcebfbdUL
  __ shll(rcx, 12);
  __ xorl(rcx, r8);
  __ andl(rcx, -1048576);
  __ movdq(xmm6, rcx);
  __ addsd(xmm2, xmm4);
  __ mov64(r9, 0x3fe62e42fefa39ef);
  __ movdq(xmm1, r9);
  __ pshufd(xmm0, xmm2, 68);
  __ pshufd(xmm4, xmm2, 68);
  __ mulsd(xmm1, xmm2);
  __ pshufd(xmm6, xmm6, 17);
  __ mulpd(xmm0, xmm0);
  __ mulpd(xmm7, xmm4);
  __ paddd(xmm5, xmm6);
  __ mulsd(xmm1, xmm5);
  __ pshufd(xmm6, xmm5, 238);
  __ mulsd(xmm0, xmm0);
  __ addpd(xmm3, xmm7);
  __ addsd(xmm1, xmm6);
  __ mulpd(xmm0, xmm3);
  __ pshufd(xmm3, xmm0, 238);
  __ mulsd(xmm0, xmm5);
  __ mulsd(xmm3, xmm5);
  __ addsd(xmm0, xmm1);
  __ addsd(xmm0, xmm3);
  __ addsd(xmm0, xmm5);
  __ jmp(B1_5);

  __ bind(L_2TAG_PACKET_0_0_2);
  __ addl(rax, 16);
  __ movl(rdx, 32752);
  __ andl(rdx, rax);
  __ cmpl(rdx, 32752);
  __ jcc(Assembler::equal, L_2TAG_PACKET_6_0_2);
  __ testl(rax, 32768);
  __ jcc(Assembler::notEqual, L_2TAG_PACKET_7_0_2);

  __ bind(L_2TAG_PACKET_8_0_2);
  __ movq(xmm0, Address(rsp, 8));
  __ movq(xmm3, Address(rsp, 8));
  __ movdl(rdx, xmm3);
  __ psrlq(xmm3, 32);
  __ movdl(rcx, xmm3);
  __ orl(rdx, rcx);
  __ cmpl(rdx, 0);
  __ jcc(Assembler::equal, L_2TAG_PACKET_9_0_2);
  __ xorpd(xmm3, xmm3);
  __ movl(rax, 18416);
  __ pinsrw(xmm3, rax, 3);
  __ mulsd(xmm0, xmm3);
  __ xorpd(xmm2, xmm2);
  __ movl(rax, 16368);
  __ pinsrw(xmm2, rax, 3);
  __ movdqu(xmm3, xmm0);
  __ pextrw(rax, xmm0, 3);
  __ por(xmm0, xmm2);
  __ movl(rcx, 18416);
  __ psrlq(xmm0, 27);
  __ movq(xmm2, ExternalAddress(LOG2_E), r9 /*rscratch*/);    //0x00000000UL, 0x3ff72000UL, 0x161bb241UL, 0xbf5dabe1UL
  __ psrld(xmm0, 2);
  __ rcpps(xmm0, xmm0);
  __ psllq(xmm3, 12);
  __ movdqu(xmm6, ExternalAddress(HIGHSIGMASK), r9 /*rscratch*/);    //0x00000000UL, 0xfffff800UL, 0x00000000UL, 0xfffff800UL
  __ psrlq(xmm3, 12);
  __ mulss(xmm0, xmm7);
  __ movl(rdx, -1024);
  __ movdl(xmm5, rdx);
  __ por(xmm3, xmm1);
  __ paddd(xmm0, xmm4);
  __ psllq(xmm5, 32);
  __ movdl(rdx, xmm0);
  __ psllq(xmm0, 29);
  __ pand(xmm5, xmm3);
  __ movl(r8, 0);
  __ pand(xmm0, xmm6);
  __ subsd(xmm3, xmm5);
  __ andl(rax, 32752);
  __ subl(rax, 18416);
  __ sarl(rax, 4);
  __ cvtsi2sdl(xmm7, rax);
  __ mulpd(xmm5, xmm0);
  __ jmp(L_2TAG_PACKET_4_0_2);

  __ bind(L_2TAG_PACKET_10_0_2);
  __ movq(xmm0, Address(rsp, 8));
  __ movq(xmm3, Address(rsp, 8));
  __ movdl(rdx, xmm3);
  __ psrlq(xmm3, 32);
  __ movdl(rcx, xmm3);
  __ orl(rdx, rcx);
  __ cmpl(rdx, 0);
  __ jcc(Assembler::equal, L_2TAG_PACKET_9_0_2);
  __ xorpd(xmm3, xmm3);
  __ movl(rax, 18416);
  __ pinsrw(xmm3, rax, 3);
  __ mulsd(xmm0, xmm3);
  __ xorpd(xmm2, xmm2);
  __ movl(rax, 16368);
  __ pinsrw(xmm2, rax, 3);
  __ movdqu(xmm3, xmm0);
  __ pextrw(rax, xmm0, 3);
  __ por(xmm0, xmm2);
  __ movl(rcx, 18416);
  __ psrlq(xmm0, 27);
  __ movq(xmm2, ExternalAddress(LOG2_E), r9 /*rscratch*/);    //0x00000000UL, 0x3ff72000UL, 0x161bb241UL, 0xbf5dabe1UL
  __ psrld(xmm0, 2);
  __ rcpps(xmm0, xmm0);
  __ psllq(xmm3, 12);
  __ movdqu(xmm6, ExternalAddress(HIGHSIGMASK), r9 /*rscratch*/);    //0x00000000UL, 0xfffff800UL, 0x00000000UL, 0xfffff800UL
  __ psrlq(xmm3, 12);
  __ mulss(xmm0, xmm7);
  __ movl(rdx, -1024);
  __ movdl(xmm5, rdx);
  __ por(xmm3, xmm1);
  __ paddd(xmm0, xmm4);
  __ psllq(xmm5, 32);
  __ movdl(rdx, xmm0);
  __ psllq(xmm0, 29);
  __ pand(xmm5, xmm3);
  __ movl(r8, INT_MIN);
  __ pand(xmm0, xmm6);
  __ subsd(xmm3, xmm5);
  __ andl(rax, 32752);
  __ subl(rax, 18416);
  __ sarl(rax, 4);
  __ cvtsi2sdl(xmm7, rax);
  __ mulpd(xmm5, xmm0);
  __ jmp(L_2TAG_PACKET_4_0_2);

  __ bind(L_2TAG_PACKET_5_0_2);
  __ cmpl(rax, 0);
  __ jcc(Assembler::less, L_2TAG_PACKET_11_0_2);
  __ cmpl(rax, 752);
  __ jcc(Assembler::aboveEqual, L_2TAG_PACKET_12_0_2);
  __ addsd(xmm0, xmm7);
  __ movq(xmm2, ExternalAddress(HALFMASK), r9 /*rscratch*/);    //0xf8000000UL, 0xffffffffUL, 0xf8000000UL, 0xffffffffUL
  __ addpd(xmm3, xmm0);
  __ xorpd(xmm6, xmm6);
  __ movl(rax, 17080);
  __ pinsrw(xmm6, rax, 3);
  __ pshufd(xmm0, xmm3, 238);
  __ addsd(xmm0, xmm3);
  __ movdqu(xmm3, xmm5);
  __ addsd(xmm5, xmm0);
  __ movdqu(xmm4, xmm2);
  __ subsd(xmm3, xmm5);
  __ movdqu(xmm7, xmm5);
  __ pand(xmm5, xmm2);
  __ movdqu(xmm2, xmm1);
  __ pand(xmm4, xmm1);
  __ subsd(xmm7, xmm5);
  __ addsd(xmm0, xmm3);
  __ subsd(xmm1, xmm4);
  __ mulsd(xmm4, xmm5);
  __ addsd(xmm0, xmm7);
  __ mulsd(xmm2, xmm0);
  __ movdqu(xmm7, xmm6);
  __ mulsd(xmm1, xmm5);
  __ addsd(xmm6, xmm4);
  __ movdl(rax, xmm6);
  __ subsd(xmm6, xmm7);
  __ lea(r11, ExternalAddress(T_exp));
  __ addsd(xmm2, xmm1);
  __ movdqu(xmm7, ExternalAddress(e_coeff +  0), r9 /*rscratch*/);    //0xe78a6731UL, 0x3f55d87fUL, 0xd704a0c0UL, 0x3fac6b08UL
  __ movdqu(xmm3, ExternalAddress(e_coeff + 16), r9 /*rscratch*/);    //0x6fba4e77UL, 0x3f83b2abUL, 0xff82c58fUL, 0x3fcebfbdUL
  __ subsd(xmm4, xmm6);
  __ pextrw(rdx, xmm6, 3);
  __ movl(rcx, rax);
  __ andl(rax, 255);
  __ addl(rax, rax);
  __ movdqu(xmm5, Address(r11, rax, Address::times_8, 0));
  __ addsd(xmm2, xmm4);
  __ sarl(rcx, 8);
  __ movl(rax, rcx);
  __ sarl(rcx, 1);
  __ subl(rax, rcx);
  __ shll(rcx, 20);
  __ xorl(rcx, r8);
  __ movdl(xmm6, rcx);
  __ movq(xmm1, ExternalAddress(e_coeff + 32), r9 /*rscratch*/);    //0xfefa39efUL, 0x3fe62e42UL, 0x00000000UL, 0x00000000UL
  __ andl(rdx, 32767);
  __ cmpl(rdx, 16529);
  __ jcc(Assembler::above, L_2TAG_PACKET_12_0_2);
  __ pshufd(xmm0, xmm2, 68);
  __ pshufd(xmm4, xmm2, 68);
  __ mulpd(xmm0, xmm0);
  __ mulpd(xmm7, xmm4);
  __ pshufd(xmm6, xmm6, 17);
  __ mulsd(xmm1, xmm2);
  __ mulsd(xmm0, xmm0);
  __ paddd(xmm5, xmm6);
  __ addpd(xmm3, xmm7);
  __ mulsd(xmm1, xmm5);
  __ pshufd(xmm6, xmm5, 238);
  __ mulpd(xmm0, xmm3);
  __ addsd(xmm1, xmm6);
  __ pshufd(xmm3, xmm0, 238);
  __ mulsd(xmm0, xmm5);
  __ mulsd(xmm3, xmm5);
  __ shll(rax, 4);
  __ xorpd(xmm4, xmm4);
  __ addl(rax, 16368);
  __ pinsrw(xmm4, rax, 3);
  __ addsd(xmm0, xmm1);
  __ addsd(xmm0, xmm3);
  __ movdqu(xmm1, xmm0);
  __ addsd(xmm0, xmm5);
  __ mulsd(xmm0, xmm4);
  __ pextrw(rax, xmm0, 3);
  __ andl(rax, 32752);
  __ jcc(Assembler::equal, L_2TAG_PACKET_13_0_2);
  __ cmpl(rax, 32752);
  __ jcc(Assembler::equal, L_2TAG_PACKET_14_0_2);
  __ jmp(B1_5);

  __ bind(L_2TAG_PACKET_6_0_2);
  __ movq(xmm1, Address(rsp, 16));
  __ movq(xmm0, Address(rsp, 8));
  __ movdqu(xmm2, xmm0);
  __ movdl(rax, xmm2);
  __ psrlq(xmm2, 20);
  __ movdl(rdx, xmm2);
  __ orl(rax, rdx);
  __ jcc(Assembler::equal, L_2TAG_PACKET_15_0_2);
  __ movdl(rax, xmm1);
  __ psrlq(xmm1, 32);
  __ movdl(rdx, xmm1);
  __ movl(rcx, rdx);
  __ addl(rdx, rdx);
  __ orl(rax, rdx);
  __ jcc(Assembler::equal, L_2TAG_PACKET_16_0_2);
  __ addsd(xmm0, xmm0);
  __ jmp(B1_5);

  __ bind(L_2TAG_PACKET_16_0_2);
  __ xorpd(xmm0, xmm0);
  __ movl(rax, 16368);
  __ pinsrw(xmm0, rax, 3);
  __ movl(Address(rsp, 0), 29);
  __ jmp(L_2TAG_PACKET_17_0_2);

  __ bind(L_2TAG_PACKET_18_0_2);
  __ movq(xmm0, Address(rsp, 16));
  __ addpd(xmm0, xmm0);
  __ jmp(B1_5);

  __ bind(L_2TAG_PACKET_15_0_2);
  __ movdl(rax, xmm1);
  __ movdqu(xmm2, xmm1);
  __ psrlq(xmm1, 32);
  __ movdl(rdx, xmm1);
  __ movl(rcx, rdx);
  __ addl(rdx, rdx);
  __ orl(rax, rdx);
  __ jcc(Assembler::equal, L_2TAG_PACKET_19_0_2);
  __ pextrw(rax, xmm2, 3);
  __ andl(rax, 32752);
  __ cmpl(rax, 32752);
  __ jcc(Assembler::notEqual, L_2TAG_PACKET_20_0_2);
  __ movdl(rax, xmm2);
  __ psrlq(xmm2, 20);
  __ movdl(rdx, xmm2);
  __ orl(rax, rdx);
  __ jcc(Assembler::notEqual, L_2TAG_PACKET_18_0_2);

  __ bind(L_2TAG_PACKET_20_0_2);
  __ pextrw(rax, xmm0, 3);
  __ testl(rax, 32768);
  __ jcc(Assembler::notEqual, L_2TAG_PACKET_21_0_2);
  __ testl(rcx, INT_MIN);
  __ jcc(Assembler::notEqual, L_2TAG_PACKET_22_0_2);
  __ jmp(B1_5);

  __ bind(L_2TAG_PACKET_23_0_2);
  __ movq(xmm1, Address(rsp, 16));
  __ movdl(rax, xmm1);
  __ testl(rax, 1);
  __ jcc(Assembler::notEqual, L_2TAG_PACKET_24_0_2);
  __ testl(rax, 2);
  __ jcc(Assembler::notEqual, L_2TAG_PACKET_25_0_2);
  __ jmp(L_2TAG_PACKET_24_0_2);

  __ bind(L_2TAG_PACKET_21_0_2);
  __ shrl(rcx, 20);
  __ andl(rcx, 2047);
  __ cmpl(rcx, 1075);
  __ jcc(Assembler::above, L_2TAG_PACKET_24_0_2);
  __ jcc(Assembler::equal, L_2TAG_PACKET_26_0_2);
  __ cmpl(rcx, 1074);
  __ jcc(Assembler::above, L_2TAG_PACKET_23_0_2);
  __ cmpl(rcx, 1023);
  __ jcc(Assembler::below, L_2TAG_PACKET_24_0_2);
  __ movq(xmm1, Address(rsp, 16));
  __ movl(rax, 17208);
  __ xorpd(xmm3, xmm3);
  __ pinsrw(xmm3, rax, 3);
  __ movdqu(xmm4, xmm3);
  __ addsd(xmm3, xmm1);
  __ subsd(xmm4, xmm3);
  __ addsd(xmm1, xmm4);
  __ pextrw(rax, xmm1, 3);
  __ andl(rax, 32752);
  __ jcc(Assembler::notEqual, L_2TAG_PACKET_24_0_2);
  __ movdl(rax, xmm3);
  __ andl(rax, 1);
  __ jcc(Assembler::equal, L_2TAG_PACKET_24_0_2);

  __ bind(L_2TAG_PACKET_25_0_2);
  __ movq(xmm1, Address(rsp, 16));
  __ pextrw(rax, xmm1, 3);
  __ andl(rax, 32768);
  __ jcc(Assembler::notEqual, L_2TAG_PACKET_27_0_2);
  __ jmp(B1_5);

  __ bind(L_2TAG_PACKET_27_0_2);
  __ xorpd(xmm0, xmm0);
  __ movl(rax, 32768);
  __ pinsrw(xmm0, rax, 3);
  __ jmp(B1_5);

  __ bind(L_2TAG_PACKET_24_0_2);
  __ movq(xmm1, Address(rsp, 16));
  __ pextrw(rax, xmm1, 3);
  __ andl(rax, 32768);
  __ jcc(Assembler::notEqual, L_2TAG_PACKET_22_0_2);
  __ xorpd(xmm0, xmm0);
  __ movl(rax, 32752);
  __ pinsrw(xmm0, rax, 3);
  __ jmp(B1_5);

  __ bind(L_2TAG_PACKET_26_0_2);
  __ movq(xmm1, Address(rsp, 16));
  __ movdl(rax, xmm1);
  __ andl(rax, 1);
  __ jcc(Assembler::equal, L_2TAG_PACKET_24_0_2);
  __ jmp(L_2TAG_PACKET_25_0_2);

  __ bind(L_2TAG_PACKET_28_0_2);
  __ movdl(rax, xmm1);
  __ psrlq(xmm1, 20);
  __ movdl(rdx, xmm1);
  __ orl(rax, rdx);
  __ jcc(Assembler::equal, L_2TAG_PACKET_29_0_2);
  __ movq(xmm0, Address(rsp, 16));
  __ addsd(xmm0, xmm0);
  __ jmp(B1_5);

  __ bind(L_2TAG_PACKET_29_0_2);
  __ movq(xmm0, Address(rsp, 8));
  __ pextrw(rax, xmm0, 3);
  __ cmpl(rax, 49136);
  __ jcc(Assembler::notEqual, L_2TAG_PACKET_30_0_2);
  __ movdl(rcx, xmm0);
  __ psrlq(xmm0, 20);
  __ movdl(rdx, xmm0);
  __ orl(rcx, rdx);
  __ jcc(Assembler::notEqual, L_2TAG_PACKET_30_0_2);
  __ xorpd(xmm0, xmm0);
  __ movl(rax, 32760);
  __ pinsrw(xmm0, rax, 3);
  __ jmp(B1_5);

  __ bind(L_2TAG_PACKET_30_0_2);
  __ movq(xmm1, Address(rsp, 16));
  __ andl(rax, 32752);
  __ subl(rax, 16368);
  __ pextrw(rdx, xmm1, 3);
  __ xorpd(xmm0, xmm0);
  __ xorl(rax, rdx);
  __ andl(rax, 32768);
  __ jcc(Assembler::equal, L_2TAG_PACKET_31_0_2);
  __ jmp(B1_5);

  __ bind(L_2TAG_PACKET_31_0_2);
  __ movl(rcx, 32752);
  __ pinsrw(xmm0, rcx, 3);
  __ jmp(B1_5);

  __ bind(L_2TAG_PACKET_32_0_2);
  __ movdl(rax, xmm1);
  __ cmpl(rdx, 17184);
  __ jcc(Assembler::above, L_2TAG_PACKET_33_0_2);
  __ testl(rax, 1);
  __ jcc(Assembler::notEqual, L_2TAG_PACKET_34_0_2);
  __ testl(rax, 2);
  __ jcc(Assembler::equal, L_2TAG_PACKET_35_0_2);
  __ jmp(L_2TAG_PACKET_36_0_2);

  __ bind(L_2TAG_PACKET_33_0_2);
  __ testl(rax, 1);
  __ jcc(Assembler::equal, L_2TAG_PACKET_35_0_2);
  __ jmp(L_2TAG_PACKET_36_0_2);

  __ bind(L_2TAG_PACKET_7_0_2);
  __ movq(xmm2, Address(rsp, 8));
  __ movdl(rax, xmm2);
  __ psrlq(xmm2, 31);
  __ movdl(rcx, xmm2);
  __ orl(rax, rcx);
  __ jcc(Assembler::equal, L_2TAG_PACKET_9_0_2);
  __ movq(xmm1, Address(rsp, 16));
  __ pextrw(rdx, xmm1, 3);
  __ movdl(rax, xmm1);
  __ movdqu(xmm2, xmm1);
  __ psrlq(xmm2, 32);
  __ movdl(rcx, xmm2);
  __ addl(rcx, rcx);
  __ orl(rcx, rax);
  __ jcc(Assembler::equal, L_2TAG_PACKET_37_0_2);
  __ andl(rdx, 32752);
  __ cmpl(rdx, 32752);
  __ jcc(Assembler::equal, L_2TAG_PACKET_28_0_2);
  __ cmpl(rdx, 17200);
  __ jcc(Assembler::above, L_2TAG_PACKET_35_0_2);
  __ cmpl(rdx, 17184);
  __ jcc(Assembler::aboveEqual, L_2TAG_PACKET_32_0_2);
  __ cmpl(rdx, 16368);
  __ jcc(Assembler::below, L_2TAG_PACKET_34_0_2);
  __ movl(rax, 17208);
  __ xorpd(xmm2, xmm2);
  __ pinsrw(xmm2, rax, 3);
  __ movdqu(xmm4, xmm2);
  __ addsd(xmm2, xmm1);
  __ subsd(xmm4, xmm2);
  __ addsd(xmm1, xmm4);
  __ pextrw(rax, xmm1, 3);
  __ andl(rax, 32767);
  __ jcc(Assembler::notEqual, L_2TAG_PACKET_34_0_2);
  __ movdl(rax, xmm2);
  __ andl(rax, 1);
  __ jcc(Assembler::equal, L_2TAG_PACKET_35_0_2);

  __ bind(L_2TAG_PACKET_36_0_2);
  __ xorpd(xmm1, xmm1);
  __ movl(rdx, 30704);
  __ pinsrw(xmm1, rdx, 3);
  __ movq(xmm2, ExternalAddress(LOG2_E), r9 /*rscratch*/);    //0x00000000UL, 0x3ff72000UL, 0x161bb241UL, 0xbf5dabe1UL
  __ movq(xmm4, Address(rsp, 8));
  __ pextrw(rax, xmm4, 3);
  __ movl(rdx, 8192);
  __ movdl(xmm4, rdx);
  __ andl(rax, 32767);
  __ subl(rax, 16);
  __ jcc(Assembler::less, L_2TAG_PACKET_10_0_2);
  __ movl(rdx, rax);
  __ andl(rdx, 32752);
  __ subl(rdx, 16368);
  __ movl(rcx, rdx);
  __ sarl(rdx, 31);
  __ addl(rcx, rdx);
  __ xorl(rcx, rdx);
  __ addl(rcx, 16);
  __ bsrl(rcx, rcx);
  __ movl(r8, INT_MIN);
  __ jmp(L_2TAG_PACKET_1_0_2);

  __ bind(L_2TAG_PACKET_34_0_2);
  __ xorpd(xmm1, xmm1);
  __ movl(rax, 32752);
  __ pinsrw(xmm1, rax, 3);
  __ xorpd(xmm0, xmm0);
  __ mulsd(xmm0, xmm1);
  __ movl(Address(rsp, 0), 28);
  __ jmp(L_2TAG_PACKET_17_0_2);

  __ bind(L_2TAG_PACKET_35_0_2);
  __ xorpd(xmm1, xmm1);
  __ movl(rdx, 30704);
  __ pinsrw(xmm1, rdx, 3);
  __ movq(xmm2, ExternalAddress(LOG2_E), r9 /*rscratch*/);    //0x00000000UL, 0x3ff72000UL, 0x161bb241UL, 0xbf5dabe1UL
  __ movq(xmm4, Address(rsp, 8));
  __ pextrw(rax, xmm4, 3);
  __ movl(rdx, 8192);
  __ movdl(xmm4, rdx);
  __ andl(rax, 32767);
  __ subl(rax, 16);
  __ jcc(Assembler::less, L_2TAG_PACKET_8_0_2);
  __ movl(rdx, rax);
  __ andl(rdx, 32752);
  __ subl(rdx, 16368);
  __ movl(rcx, rdx);
  __ sarl(rdx, 31);
  __ addl(rcx, rdx);
  __ xorl(rcx, rdx);
  __ addl(rcx, 16);
  __ bsrl(rcx, rcx);
  __ movl(r8, 0);
  __ jmp(L_2TAG_PACKET_1_0_2);

  __ bind(L_2TAG_PACKET_19_0_2);
  __ xorpd(xmm0, xmm0);
  __ movl(rax, 16368);
  __ pinsrw(xmm0, rax, 3);
  __ jmp(B1_5);

  __ bind(L_2TAG_PACKET_22_0_2);
  __ xorpd(xmm0, xmm0);
  __ jmp(B1_5);

  __ bind(L_2TAG_PACKET_11_0_2);
  __ addl(rax, 384);
  __ cmpl(rax, 0);
  __ jcc(Assembler::less, L_2TAG_PACKET_38_0_2);
  __ mulsd(xmm5, xmm1);
  __ addsd(xmm0, xmm7);
  __ shrl(r8, 31);
  __ addpd(xmm3, xmm0);
  __ pshufd(xmm0, xmm3, 238);
  __ addsd(xmm3, xmm0);
  __ lea(r11, ExternalAddress(log2));    //0xfefa39efUL, 0x3fe62e42UL, 0xfefa39efUL, 0xbfe62e42UL
  __ movq(xmm4, Address(r11, r8, Address::times_8, 0));
  __ mulsd(xmm1, xmm3);
  __ xorpd(xmm0, xmm0);
  __ movl(rax, 16368);
  __ shll(r8, 15);
  __ orl(rax, r8);
  __ pinsrw(xmm0, rax, 3);
  __ addsd(xmm5, xmm1);
  __ mulsd(xmm5, xmm4);
  __ addsd(xmm0, xmm5);
  __ jmp(B1_5);

  __ bind(L_2TAG_PACKET_38_0_2);

  __ bind(L_2TAG_PACKET_37_0_2);
  __ xorpd(xmm0, xmm0);
  __ movl(rax, 16368);
  __ pinsrw(xmm0, rax, 3);
  __ jmp(B1_5);

  __ bind(L_2TAG_PACKET_39_0_2);
  __ xorpd(xmm0, xmm0);
  __ movl(rax, 16368);
  __ pinsrw(xmm0, rax, 3);
  __ movl(Address(rsp, 0), 26);
  __ jmp(L_2TAG_PACKET_17_0_2);

  __ bind(L_2TAG_PACKET_9_0_2);
  __ movq(xmm1, Address(rsp, 16));
  __ movdqu(xmm2, xmm1);
  __ pextrw(rax, xmm1, 3);
  __ andl(rax, 32752);
  __ cmpl(rax, 32752);
  __ jcc(Assembler::notEqual, L_2TAG_PACKET_40_0_2);
  __ movdl(rax, xmm2);
  __ psrlq(xmm2, 20);
  __ movdl(rdx, xmm2);
  __ orl(rax, rdx);
  __ jcc(Assembler::notEqual, L_2TAG_PACKET_18_0_2);

  __ bind(L_2TAG_PACKET_40_0_2);
  __ movdl(rax, xmm1);
  __ psrlq(xmm1, 32);
  __ movdl(rdx, xmm1);
  __ movl(rcx, rdx);
  __ addl(rdx, rdx);
  __ orl(rax, rdx);
  __ jcc(Assembler::equal, L_2TAG_PACKET_39_0_2);
  __ shrl(rdx, 21);
  __ cmpl(rdx, 1075);
  __ jcc(Assembler::above, L_2TAG_PACKET_41_0_2);
  __ jcc(Assembler::equal, L_2TAG_PACKET_42_0_2);
  __ cmpl(rdx, 1023);
  __ jcc(Assembler::below, L_2TAG_PACKET_41_0_2);
  __ movq(xmm1, Address(rsp, 16));
  __ movl(rax, 17208);
  __ xorpd(xmm3, xmm3);
  __ pinsrw(xmm3, rax, 3);
  __ movdqu(xmm4, xmm3);
  __ addsd(xmm3, xmm1);
  __ subsd(xmm4, xmm3);
  __ addsd(xmm1, xmm4);
  __ pextrw(rax, xmm1, 3);
  __ andl(rax, 32752);
  __ jcc(Assembler::notEqual, L_2TAG_PACKET_41_0_2);
  __ movdl(rax, xmm3);
  __ andl(rax, 1);
  __ jcc(Assembler::equal, L_2TAG_PACKET_41_0_2);

  __ bind(L_2TAG_PACKET_43_0_2);
  __ movq(xmm0, Address(rsp, 8));
  __ testl(rcx, INT_MIN);
  __ jcc(Assembler::notEqual, L_2TAG_PACKET_44_0_2);
  __ jmp(B1_5);

  __ bind(L_2TAG_PACKET_42_0_2);
  __ movq(xmm1, Address(rsp, 16));
  __ movdl(rax, xmm1);
  __ testl(rax, 1);
  __ jcc(Assembler::notEqual, L_2TAG_PACKET_43_0_2);

  __ bind(L_2TAG_PACKET_41_0_2);
  __ testl(rcx, INT_MIN);
  __ jcc(Assembler::equal, L_2TAG_PACKET_22_0_2);
  __ xorpd(xmm0, xmm0);

  __ bind(L_2TAG_PACKET_44_0_2);
  __ movl(rax, 16368);
  __ xorpd(xmm1, xmm1);
  __ pinsrw(xmm1, rax, 3);
  __ divsd(xmm1, xmm0);
  __ movdqu(xmm0, xmm1);
  __ movl(Address(rsp, 0), 27);
  __ jmp(L_2TAG_PACKET_17_0_2);

  __ bind(L_2TAG_PACKET_12_0_2);
  __ movq(xmm2, Address(rsp, 8));
  __ movq(xmm6, Address(rsp, 16));
  __ pextrw(rax, xmm2, 3);
  __ pextrw(rdx, xmm6, 3);
  __ movl(rcx, 32752);
  __ andl(rcx, rdx);
  __ cmpl(rcx, 32752);
  __ jcc(Assembler::equal, L_2TAG_PACKET_45_0_2);
  __ andl(rax, 32752);
  __ subl(rax, 16368);
  __ xorl(rdx, rax);
  __ testl(rdx, 32768);
  __ jcc(Assembler::notEqual, L_2TAG_PACKET_46_0_2);

  __ bind(L_2TAG_PACKET_47_0_2);
  __ movl(rax, 32736);
  __ pinsrw(xmm0, rax, 3);
  __ shrl(r8, 16);
  __ orl(rax, r8);
  __ pinsrw(xmm1, rax, 3);
  __ mulsd(xmm0, xmm1);

  __ bind(L_2TAG_PACKET_14_0_2);
  __ movl(Address(rsp, 0), 24);
  __ jmp(L_2TAG_PACKET_17_0_2);

  __ bind(L_2TAG_PACKET_46_0_2);
  __ movl(rax, 16);
  __ pinsrw(xmm0, rax, 3);
  __ mulsd(xmm0, xmm0);
  __ testl(r8, INT_MIN);
  __ jcc(Assembler::equal, L_2TAG_PACKET_48_0_2);
  __ mov64(r9, 0x8000000000000000);
  __ movdq(xmm2, r9);
  __ xorpd(xmm0, xmm2);

  __ bind(L_2TAG_PACKET_48_0_2);
  __ movl(Address(rsp, 0), 25);
  __ jmp(L_2TAG_PACKET_17_0_2);

  __ bind(L_2TAG_PACKET_13_0_2);
  __ pextrw(rcx, xmm5, 3);
  __ pextrw(rdx, xmm4, 3);
  __ movl(rax, -1);
  __ andl(rcx, 32752);
  __ subl(rcx, 16368);
  __ andl(rdx, 32752);
  __ addl(rdx, rcx);
  __ movl(rcx, -31);
  __ sarl(rdx, 4);
  __ subl(rcx, rdx);
  __ jcc(Assembler::lessEqual, L_2TAG_PACKET_49_0_2);
  __ cmpl(rcx, 20);
  __ jcc(Assembler::above, L_2TAG_PACKET_50_0_2);
  __ shll(rax);

  __ bind(L_2TAG_PACKET_49_0_2);
  __ movdl(xmm0, rax);
  __ psllq(xmm0, 32);
  __ pand(xmm0, xmm5);
  __ subsd(xmm5, xmm0);
  __ addsd(xmm5, xmm1);
  __ mulsd(xmm0, xmm4);
  __ mulsd(xmm5, xmm4);
  __ addsd(xmm0, xmm5);

  __ bind(L_2TAG_PACKET_50_0_2);
  __ jmp(L_2TAG_PACKET_48_0_2);

  __ bind(L_2TAG_PACKET_2_0_2);
  __ movw(rcx, Address(rsp, 22));
  __ movl(rdx, INT_MIN);
  __ movdl(xmm1, rdx);
  __ xorpd(xmm7, xmm7);
  __ paddd(xmm0, xmm4);
  __ movdl(rdx, xmm0);
  __ psllq(xmm0, 29);
  __ paddq(xmm1, xmm3);
  __ pand(xmm5, xmm1);
  __ andl(rcx, 32752);
  __ cmpl(rcx, 16560);
  __ jcc(Assembler::less, L_2TAG_PACKET_3_0_2);
  __ pand(xmm0, xmm6);
  __ subsd(xmm3, xmm5);
  __ addl(rax, 16351);
  __ shrl(rax, 4);
  __ subl(rax, 1022);
  __ cvtsi2sdl(xmm7, rax);
  __ mulpd(xmm5, xmm0);
  __ lea(r11, ExternalAddress(L_tbl));
  __ movq(xmm4, ExternalAddress(coeff_h), r9 /*rscratch*/);    //0x00000000UL, 0xbfd61a00UL, 0x00000000UL, 0xbf5dabe1UL
  __ mulsd(xmm3, xmm0);
  __ movq(xmm6, ExternalAddress(coeff_h), r9 /*rscratch*/);    //0x00000000UL, 0xbfd61a00UL, 0x00000000UL, 0xbf5dabe1UL
  __ subsd(xmm5, xmm2);
  __ movq(xmm1, ExternalAddress(coeff_h + 8), r9 /*rscratch*/);    //0x00000000UL, 0xbf5dabe1UL
  __ pshufd(xmm2, xmm3, 68);
  __ unpcklpd(xmm5, xmm3);
  __ addsd(xmm3, xmm5);
  __ movq(xmm0, ExternalAddress(coeff_h + 8), r9 /*rscratch*/);    //0x00000000UL, 0xbf5dabe1UL
  __ andl(rdx, 16760832);
  __ shrl(rdx, 10);
  __ addpd(xmm7, Address(r11, rdx, Address::times_1, -3648));
  __ mulsd(xmm4, xmm5);
  __ mulsd(xmm0, xmm5);
  __ mulsd(xmm6, xmm2);
  __ mulsd(xmm1, xmm2);
  __ movdqu(xmm2, xmm5);
  __ mulsd(xmm4, xmm5);
  __ addsd(xmm5, xmm0);
  __ movdqu(xmm0, xmm7);
  __ addsd(xmm2, xmm3);
  __ addsd(xmm7, xmm5);
  __ mulsd(xmm6, xmm2);
  __ subsd(xmm0, xmm7);
  __ movdqu(xmm2, xmm7);
  __ addsd(xmm7, xmm4);
  __ addsd(xmm0, xmm5);
  __ subsd(xmm2, xmm7);
  __ addsd(xmm4, xmm2);
  __ pshufd(xmm2, xmm5, 238);
  __ movdqu(xmm5, xmm7);
  __ addsd(xmm7, xmm2);
  __ addsd(xmm4, xmm0);
  __ movdqu(xmm0, ExternalAddress(coeff), r9 /*rscratch*/);    //0x6dc96112UL, 0xbf836578UL, 0xee241472UL, 0xbf9b0301UL
  __ subsd(xmm5, xmm7);
  __ addsd(xmm6, xmm4);
  __ movdqu(xmm4, xmm7);
  __ addsd(xmm5, xmm2);
  __ addsd(xmm7, xmm1);
  __ movdqu(xmm2, ExternalAddress(coeff + 64), r9 /*rscratch*/);    //0x486ececcUL, 0x3fc4635eUL, 0x161bb241UL, 0xbf5dabe1UL
  __ subsd(xmm4, xmm7);
  __ addsd(xmm6, xmm5);
  __ addsd(xmm4, xmm1);
  __ pshufd(xmm5, xmm7, 238);
  __ movapd(xmm1, xmm7);
  __ addsd(xmm7, xmm5);
  __ subsd(xmm1, xmm7);
  __ addsd(xmm1, xmm5);
  __ movdqu(xmm5, ExternalAddress(coeff + 80), r9 /*rscratch*/);    //0x9f95985aUL, 0xbfb528dbUL, 0xf8b5787dUL, 0x3ef2531eUL
  __ pshufd(xmm3, xmm3, 68);
  __ addsd(xmm6, xmm4);
  __ addsd(xmm6, xmm1);
  __ movdqu(xmm1, ExternalAddress(coeff + 32), r9 /*rscratch*/);    //0x9f95985aUL, 0xbfb528dbUL, 0xb3841d2aUL, 0xbfd619b6UL
  __ mulpd(xmm0, xmm3);
  __ mulpd(xmm2, xmm3);
  __ pshufd(xmm4, xmm3, 68);
  __ mulpd(xmm3, xmm3);
  __ addpd(xmm0, xmm1);
  __ addpd(xmm5, xmm2);
  __ mulsd(xmm4, xmm3);
  __ movq(xmm2, ExternalAddress(HIGHMASK_LOG_X), r9 /*rscratch*/);    //0xf8000000UL, 0xffffffffUL, 0x00000000UL, 0xfffff800UL
  __ mulpd(xmm3, xmm3);
  __ movq(xmm1, Address(rsp, 16));
  __ movw(rcx, Address(rsp, 22));
  __ mulpd(xmm0, xmm4);
  __ pextrw(rax, xmm7, 3);
  __ mulpd(xmm5, xmm4);
  __ mulpd(xmm0, xmm3);
  __ movq(xmm4, ExternalAddress(HIGHMASK_Y + 8), r9 /*rscratch*/);    //0x00000000UL, 0xffffffffUL
  __ pand(xmm2, xmm7);
  __ addsd(xmm5, xmm6);
  __ subsd(xmm7, xmm2);
  __ addpd(xmm5, xmm0);
  __ andl(rax, 32752);
  __ subl(rax, 16368);
  __ andl(rcx, 32752);
  __ cmpl(rcx, 32752);
  __ jcc(Assembler::equal, L_2TAG_PACKET_45_0_2);
  __ addl(rcx, rax);
  __ cmpl(rcx, 16576);
  __ jcc(Assembler::aboveEqual, L_2TAG_PACKET_51_0_2);
  __ pshufd(xmm0, xmm5, 238);
  __ pand(xmm4, xmm1);
  __ movdqu(xmm3, xmm1);
  __ addsd(xmm5, xmm0);
  __ subsd(xmm1, xmm4);
  __ xorpd(xmm6, xmm6);
  __ movl(rdx, 17080);
  __ pinsrw(xmm6, rdx, 3);
  __ addsd(xmm7, xmm5);
  __ mulsd(xmm4, xmm2);
  __ mulsd(xmm1, xmm2);
  __ movdqu(xmm5, xmm6);
  __ mulsd(xmm3, xmm7);
  __ addsd(xmm6, xmm4);
  __ addsd(xmm1, xmm3);
  __ movdqu(xmm7, ExternalAddress(e_coeff), r9 /*rscratch*/);    //0xe78a6731UL, 0x3f55d87fUL, 0xd704a0c0UL, 0x3fac6b08UL
  __ movdl(rdx, xmm6);
  __ subsd(xmm6, xmm5);
  __ lea(r11, ExternalAddress(T_exp));
  __ movdqu(xmm3, ExternalAddress(e_coeff + 16), r9 /*rscratch*/);    //0x6fba4e77UL, 0x3f83b2abUL, 0xff82c58fUL, 0x3fcebfbdUL
  __ movq(xmm2, ExternalAddress(e_coeff + 32), r9 /*rscratch*/);    //0xfefa39efUL, 0x3fe62e42UL, 0x00000000UL, 0x00000000UL
  __ subsd(xmm4, xmm6);
  __ movl(rcx, rdx);
  __ andl(rdx, 255);
  __ addl(rdx, rdx);
  __ movdqu(xmm5, Address(r11, rdx, Address::times_8, 0));
  __ addsd(xmm4, xmm1);
  __ pextrw(rdx, xmm6, 3);
  __ shrl(rcx, 8);
  __ movl(rax, rcx);
  __ shrl(rcx, 1);
  __ subl(rax, rcx);
  __ shll(rcx, 20);
  __ movdl(xmm6, rcx);
  __ pshufd(xmm0, xmm4, 68);
  __ pshufd(xmm1, xmm4, 68);
  __ mulpd(xmm0, xmm0);
  __ mulpd(xmm7, xmm1);
  __ pshufd(xmm6, xmm6, 17);
  __ mulsd(xmm2, xmm4);
  __ andl(rdx, 32767);
  __ cmpl(rdx, 16529);
  __ jcc(Assembler::above, L_2TAG_PACKET_12_0_2);
  __ mulsd(xmm0, xmm0);
  __ paddd(xmm5, xmm6);
  __ addpd(xmm3, xmm7);
  __ mulsd(xmm2, xmm5);
  __ pshufd(xmm6, xmm5, 238);
  __ mulpd(xmm0, xmm3);
  __ addsd(xmm2, xmm6);
  __ pshufd(xmm3, xmm0, 238);
  __ addl(rax, 1023);
  __ shll(rax, 20);
  __ orl(rax, r8);
  __ movdl(xmm4, rax);
  __ mulsd(xmm0, xmm5);
  __ mulsd(xmm3, xmm5);
  __ addsd(xmm0, xmm2);
  __ psllq(xmm4, 32);
  __ addsd(xmm0, xmm3);
  __ movdqu(xmm1, xmm0);
  __ addsd(xmm0, xmm5);
  __ mulsd(xmm0, xmm4);
  __ pextrw(rax, xmm0, 3);
  __ andl(rax, 32752);
  __ jcc(Assembler::equal, L_2TAG_PACKET_13_0_2);
  __ cmpl(rax, 32752);
  __ jcc(Assembler::equal, L_2TAG_PACKET_14_0_2);

  __ bind(L_2TAG_PACKET_52_0_2);
  __ jmp(B1_5);

  __ bind(L_2TAG_PACKET_45_0_2);
  __ movq(xmm0, Address(rsp, 8));
  __ xorpd(xmm2, xmm2);
  __ movl(rax, 49136);
  __ pinsrw(xmm2, rax, 3);
  __ addsd(xmm2, xmm0);
  __ pextrw(rax, xmm2, 3);
  __ cmpl(rax, 0);
  __ jcc(Assembler::notEqual, L_2TAG_PACKET_53_0_2);
  __ xorpd(xmm0, xmm0);
  __ movl(rax, 32760);
  __ pinsrw(xmm0, rax, 3);
  __ jmp(B1_5);

  __ bind(L_2TAG_PACKET_53_0_2);
  __ movq(xmm1, Address(rsp, 16));
  __ movdl(rdx, xmm1);
  __ movdqu(xmm3, xmm1);
  __ psrlq(xmm3, 20);
  __ movdl(rcx, xmm3);
  __ orl(rcx, rdx);
  __ jcc(Assembler::equal, L_2TAG_PACKET_54_0_2);
  __ addsd(xmm1, xmm1);
  __ movdqu(xmm0, xmm1);
  __ jmp(B1_5);

  __ bind(L_2TAG_PACKET_51_0_2);
  __ pextrw(rax, xmm1, 3);
  __ pextrw(rcx, xmm2, 3);
  __ xorl(rax, rcx);
  __ testl(rax, 32768);
  __ jcc(Assembler::equal, L_2TAG_PACKET_47_0_2);
  __ jmp(L_2TAG_PACKET_46_0_2);

  __ bind(L_2TAG_PACKET_54_0_2);
  __ pextrw(rax, xmm0, 3);
  __ andl(rax, 32752);
  __ pextrw(rdx, xmm1, 3);
  __ xorpd(xmm0, xmm0);
  __ subl(rax, 16368);
  __ xorl(rax, rdx);
  __ testl(rax, 32768);
  __ jcc(Assembler::equal, L_2TAG_PACKET_55_0_2);
  __ jmp(B1_5);

  __ bind(L_2TAG_PACKET_55_0_2);
  __ movl(rdx, 32752);
  __ pinsrw(xmm0, rdx, 3);
  __ jmp(B1_5);

  __ bind(L_2TAG_PACKET_17_0_2);
  __ movq(Address(rsp, 24), xmm0);

  __ bind(B1_3);
  __ movq(xmm0, Address(rsp, 24));

  __ bind(L_2TAG_PACKET_56_0_2);

  __ bind(B1_5);
  __ addq(rsp, 40);

  __ leave(); // required for proper stackwalking of RuntimeStub frame
  __ ret(0);

  return start;
}