// File: JRLamontagne[P]cdice_sa/CDICE.cpp
// Function: calcEcon(DICE*, int)
void calcEcon(DICE *dice, int t)
{

  Config *config = &dice->config;
  Econ *econ = &dice->econ;
  Carb *carb = &dice->carb;
  Clim *clim = &dice->clim;
  Dvars *dvars = &dice->dvars;
  Ctrl *ctrl = &dice->ctrl;
  Lims *lims = &dice->lims;
	
  // Variable to hold the appropriate temperature
  double temp = 0.0;
  
  // Where do we get the temperature from?
  if(ctrl->use_doeclim == 1) {
    int this_index = config->hind_ns+(t*config->tstep)-1;
    temp = clim->temp[this_index] - clim->temp[config->i1900];
    //temp = clim->temp[this_index];
  }
  else {
    temp = clim->tatm[t];
  }
  
  // Apply the limit test to this temperature (for numeric
  // stability in the damage calculation
  if(temp < lims->tatm_lo) {
    temp = lims->tatm_lo;
  }
  if(temp > lims->tatm_up) {
    temp = lims->tatm_up;
  }  

  // Marginal cost of abatement
  econ->mcabate[t] = econ->pbacktime[t]*pow(dvars->miu[t],(econ->expcost2-1));
  
  // Damages fraction
  econ->damfrac[t] = econ->a1*temp+econ->a2*pow(temp,econ->a3);
  
  // Capital stock
  econ->k[t] = pow((1-econ->dk),config->tstep)*econ->k[t-1]+config->tstep*econ->i[t-1];
  if(econ->k[t] < lims->k_lo) {
    econ->k[t] = lims->k_lo;
  }
  
  // Carbon price
  econ->cprice[t] = econ->pbacktime[t]*pow(dvars->miu[t],(econ->expcost2-1));
  
  // Gross world product (gross abatement and damages)
  econ->ygross[t] = econ->al[t]*pow((econ->l[t]/1000.0),(1.0-econ->gama))*pow(econ->k[t],econ->gama);
  if(econ->ygross[t] < lims->ygross_lo) {
    econ->ygross[t] = lims->ygross_lo;
  }
  
  // Net output damages
  econ->ynet[t] = econ->ygross[t]*(1.0-econ->damfrac[t]);
  
  // Abatement costs
  econ->abatecost[t] = econ->ygross[t]*econ->cost1[t]*pow(dvars->miu[t],econ->expcost2);
  
  // Damages
  econ->damages[t] = econ->ygross[t]*econ->damfrac[t];
  
  // Industrial emissions
  econ->eind[t] = econ->sigma[t]*econ->ygross[t]*(1.0-dvars->miu[t]);
  
  // Total emissions	
  econ->e[t] = econ->eind[t]+econ->etree[t];
  
  // Cumulative emissions
  econ->cca[t] = econ->cca[t-1]+econ->eind[t-1]*5.0/3.666;
  if(econ->cca[t] > lims->cca_up) {
    econ->cca[t] = lims->cca_up + 1.0;
    if(lims->cca_up_step == 0) {
    	lims->cca_up_step = t;
    }
  }
  
  // Cumulative total emissions
  econ->ccatot[t] = econ->cca[t] + econ->cumetree[t];

  // Gross world product (net of abatement and damages)
  econ->y[t] = econ->ynet[t]-econ->abatecost[t];
  if(econ->y[t] < lims->y_lo) {
    econ->y[t] = lims->y_lo;
  }
  
  // Investment
  econ->i[t] = dvars->s[t]*econ->y[t];
  if(econ->i[t] < lims->i_lo) {
    econ->i[t] = lims->i_lo;
  }

  // Consumption
  econ->c[t] = econ->y[t]-econ->i[t];
  if(econ->c[t] < lims->c_lo) {
    econ->c[t] = lims->c_lo;
  }
  // Per capita consumption
  econ->cpc[t] = 1000.0*econ->c[t]/econ->l[t];
  if(econ->cpc[t] < lims->cpc_lo) {
    econ->cpc[t] = lims->cpc_lo;
  }

  // Real interest rate
  econ->ri[t-1] = (1.0+econ->prstp)*pow((econ->cpc[t]/econ->cpc[t-1]),(econ->elasmu/config->tstep))-1.0;
  
  return;
}

// Assembly:
subq $0xa8, %rsp
movq %rdi, 0xa0(%rsp)
movl %esi, 0x9c(%rsp)
movq 0xa0(%rsp), %rax
movq %rax, 0x90(%rsp)
movq 0xa0(%rsp), %rax
addq $0x190, %rax            # imm = 0x190
movq %rax, 0x88(%rsp)
movq 0xa0(%rsp), %rax
addq $0x3e0, %rax            # imm = 0x3E0
movq %rax, 0x80(%rsp)
movq 0xa0(%rsp), %rax
addq $0x60, %rax
movq %rax, 0x78(%rsp)
movq 0xa0(%rsp), %rax
addq $0x38, %rax
movq %rax, 0x70(%rsp)
movq 0xa0(%rsp), %rax
addq $0x58, %rax
movq %rax, 0x68(%rsp)
movq 0xa0(%rsp), %rax
addq $0x4a8, %rax            # imm = 0x4A8
movq %rax, 0x60(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x58(%rsp)
movq 0x68(%rsp), %rax
cmpl $0x1, (%rax)
jne 0x16f45
movq 0x90(%rsp), %rax
cvtsi2sdl 0x20(%rax), %xmm1
cvtsi2sdl 0x9c(%rsp), %xmm0
movq 0x90(%rsp), %rax
movsd 0x8(%rax), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd 0x510a(%rip), %xmm1     # 0x1c008
subsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, 0x54(%rsp)
movq 0x78(%rsp), %rax
movq 0xe0(%rax), %rax
movslq 0x54(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x78(%rsp), %rax
movq 0xe0(%rax), %rax
movq 0x90(%rsp), %rcx
movslq 0x2c(%rcx), %rcx
subsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x58(%rsp)
jmp 0x16f64
movq 0x78(%rsp), %rax
movq 0xc8(%rax), %rax
movslq 0x9c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x58(%rsp)
movsd 0x58(%rsp), %xmm1
movq 0x60(%rsp), %rax
movsd 0x40(%rax), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x16f8a
movq 0x60(%rsp), %rax
movsd 0x40(%rax), %xmm0
movsd %xmm0, 0x58(%rsp)
movsd 0x58(%rsp), %xmm0
movq 0x60(%rsp), %rax
ucomisd 0x48(%rax), %xmm0
jbe 0x16fac
movq 0x60(%rsp), %rax
movsd 0x48(%rax), %xmm0
movsd %xmm0, 0x58(%rsp)
movq 0x88(%rsp), %rax
movq 0x118(%rax), %rax
movslq 0x9c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x30(%rsp)
movq 0x70(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x9c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x88(%rsp), %rax
movsd 0x88(%rax), %xmm1
movsd 0x500c(%rip), %xmm2     # 0x1c008
subsd %xmm2, %xmm1
callq 0x9c60
movaps %xmm0, %xmm1
movsd 0x30(%rsp), %xmm0
mulsd %xmm1, %xmm0
movq 0x88(%rsp), %rax
movq 0x1d0(%rax), %rax
movslq 0x9c(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq 0x88(%rsp), %rax
movsd 0x70(%rax), %xmm0
movsd %xmm0, 0x48(%rsp)
movsd 0x58(%rsp), %xmm0
movsd %xmm0, 0x40(%rsp)
movq 0x88(%rsp), %rax
movsd 0x78(%rax), %xmm0
movsd %xmm0, 0x38(%rsp)
movsd 0x58(%rsp), %xmm0
movq 0x88(%rsp), %rax
movsd 0x80(%rax), %xmm1
callq 0x9c60
movsd 0x38(%rsp), %xmm1
movsd 0x40(%rsp), %xmm2
movaps %xmm0, %xmm3
movsd 0x48(%rsp), %xmm0
mulsd %xmm3, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq 0x88(%rsp), %rax
movq 0x1c0(%rax), %rax
movslq 0x9c(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq 0x88(%rsp), %rax
movsd 0x4f40(%rip), %xmm0     # 0x1c008
subsd 0x30(%rax), %xmm0
movq 0x90(%rsp), %rax
movsd 0x8(%rax), %xmm1
callq 0x9c60
movq 0x88(%rsp), %rax
movq 0x180(%rax), %rax
movl 0x9c(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm2
movq 0x90(%rsp), %rax
movsd 0x8(%rax), %xmm1
movq 0x88(%rsp), %rax
movq 0x190(%rax), %rax
movl 0x9c(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
mulsd (%rax,%rcx,8), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq 0x88(%rsp), %rax
movq 0x180(%rax), %rax
movslq 0x9c(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq 0x88(%rsp), %rax
movq 0x180(%rax), %rax
movslq 0x9c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm1
movq 0x60(%rsp), %rax
movsd 0x8(%rax), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x171a4
movq 0x60(%rsp), %rax
movsd 0x8(%rax), %xmm0
movq 0x88(%rsp), %rax
movq 0x180(%rax), %rax
movslq 0x9c(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq 0x88(%rsp), %rax
movq 0x118(%rax), %rax
movslq 0x9c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x18(%rsp)
movq 0x70(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x9c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x88(%rsp), %rax
movsd 0x88(%rax), %xmm1
movsd 0x4e14(%rip), %xmm2     # 0x1c008
subsd %xmm2, %xmm1
callq 0x9c60
movaps %xmm0, %xmm1
movsd 0x18(%rsp), %xmm0
mulsd %xmm1, %xmm0
movq 0x88(%rsp), %rax
movq 0x1e0(%rax), %rax
movslq 0x9c(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq 0x88(%rsp), %rax
movq 0x100(%rax), %rax
movslq 0x9c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x20(%rsp)
movq 0x88(%rsp), %rax
movq 0xf8(%rax), %rax
movslq 0x9c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd 0x4f24(%rip), %xmm1     # 0x1c190
divsd %xmm1, %xmm0
movq 0x88(%rsp), %rax
movsd 0x4d88(%rip), %xmm1     # 0x1c008
subsd 0x10(%rax), %xmm1
callq 0x9c60
movaps %xmm0, %xmm1
movsd 0x20(%rsp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, 0x28(%rsp)
movq 0x88(%rsp), %rax
movq 0x180(%rax), %rax
movslq 0x9c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x88(%rsp), %rax
movsd 0x10(%rax), %xmm1
callq 0x9c60
movaps %xmm0, %xmm1
movsd 0x28(%rsp), %xmm0
mulsd %xmm1, %xmm0
movq 0x88(%rsp), %rax
movq 0x1a8(%rax), %rax
movslq 0x9c(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq 0x88(%rsp), %rax
movq 0x1a8(%rax), %rax
movslq 0x9c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm1
movq 0x60(%rsp), %rax
movsd 0x60(%rax), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x17346
movq 0x60(%rsp), %rax
movsd 0x60(%rax), %xmm0
movq 0x88(%rsp), %rax
movq 0x1a8(%rax), %rax
movslq 0x9c(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq 0x88(%rsp), %rax
movq 0x1a8(%rax), %rax
movslq 0x9c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x88(%rsp), %rax
movq 0x1c0(%rax), %rax
movslq 0x9c(%rsp), %rcx
movsd 0x4c87(%rip), %xmm1     # 0x1c008
subsd (%rax,%rcx,8), %xmm1
mulsd %xmm1, %xmm0
movq 0x88(%rsp), %rax
movq 0x1b0(%rax), %rax
movslq 0x9c(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq 0x88(%rsp), %rax
movq 0x1a8(%rax), %rax
movslq 0x9c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x88(%rsp), %rax
movq 0x108(%rax), %rax
movslq 0x9c(%rsp), %rcx
mulsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x10(%rsp)
movq 0x70(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x9c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x88(%rsp), %rax
movsd 0x88(%rax), %xmm1
callq 0x9c60
movaps %xmm0, %xmm1
movsd 0x10(%rsp), %xmm0
mulsd %xmm1, %xmm0
movq 0x88(%rsp), %rax
movq 0x1c8(%rax), %rax
movslq 0x9c(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq 0x88(%rsp), %rax
movq 0x1a8(%rax), %rax
movslq 0x9c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x88(%rsp), %rax
movq 0x1c0(%rax), %rax
movslq 0x9c(%rsp), %rcx
mulsd (%rax,%rcx,8), %xmm0
movq 0x88(%rsp), %rax
movq 0x1b8(%rax), %rax
movslq 0x9c(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq 0x88(%rsp), %rax
movq 0x160(%rax), %rax
movslq 0x9c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x88(%rsp), %rax
movq 0x1a8(%rax), %rax
movslq 0x9c(%rsp), %rcx
mulsd (%rax,%rcx,8), %xmm0
movq 0x70(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x9c(%rsp), %rcx
movsd 0x4b2b(%rip), %xmm1     # 0x1c008
subsd (%rax,%rcx,8), %xmm1
mulsd %xmm1, %xmm0
movq 0x88(%rsp), %rax
movq 0x230(%rax), %rax
movslq 0x9c(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq 0x88(%rsp), %rax
movq 0x230(%rax), %rax
movslq 0x9c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x88(%rsp), %rax
movq 0x168(%rax), %rax
movslq 0x9c(%rsp), %rcx
addsd (%rax,%rcx,8), %xmm0
movq 0x88(%rsp), %rax
movq 0x228(%rax), %rax
movslq 0x9c(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq 0x88(%rsp), %rax
movq 0x238(%rax), %rax
movl 0x9c(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x88(%rsp), %rax
movq 0x230(%rax), %rax
movl 0x9c(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd 0x4bc5(%rip), %xmm1     # 0x1c160
mulsd (%rax,%rcx,8), %xmm1
movsd 0x4c38(%rip), %xmm2     # 0x1c1e0
divsd %xmm2, %xmm1
addsd %xmm1, %xmm0
movq 0x88(%rsp), %rax
movq 0x238(%rax), %rax
movslq 0x9c(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq 0x88(%rsp), %rax
movq 0x238(%rax), %rax
movslq 0x9c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x60(%rsp), %rax
ucomisd 0x70(%rax), %xmm0
jbe 0x1763e
movq 0x60(%rsp), %rax
movsd 0x4a07(%rip), %xmm0     # 0x1c008
addsd 0x70(%rax), %xmm0
movq 0x88(%rsp), %rax
movq 0x238(%rax), %rax
movslq 0x9c(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq 0x60(%rsp), %rax
cmpl $0x0, 0x78(%rax)
jne 0x1763c
movl 0x9c(%rsp), %ecx
movq 0x60(%rsp), %rax
movl %ecx, 0x78(%rax)
jmp 0x1763e
movq 0x88(%rsp), %rax
movq 0x238(%rax), %rax
movslq 0x9c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x88(%rsp), %rax
movq 0x170(%rax), %rax
movslq 0x9c(%rsp), %rcx
addsd (%rax,%rcx,8), %xmm0
movq 0x88(%rsp), %rax
movq 0x240(%rax), %rax
movslq 0x9c(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq 0x88(%rsp), %rax
movq 0x1b0(%rax), %rax
movslq 0x9c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x88(%rsp), %rax
movq 0x1c8(%rax), %rax
movslq 0x9c(%rsp), %rcx
subsd (%rax,%rcx,8), %xmm0
movq 0x88(%rsp), %rax
movq 0x1a0(%rax), %rax
movslq 0x9c(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq 0x88(%rsp), %rax
movq 0x1a0(%rax), %rax
movslq 0x9c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm1
movq 0x60(%rsp), %rax
movsd 0x58(%rax), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x17738
movq 0x60(%rsp), %rax
movsd 0x58(%rax), %xmm0
movq 0x88(%rsp), %rax
movq 0x1a0(%rax), %rax
movslq 0x9c(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq 0x70(%rsp), %rax
movq 0x18(%rax), %rax
movslq 0x9c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x88(%rsp), %rax
movq 0x1a0(%rax), %rax
movslq 0x9c(%rsp), %rcx
mulsd (%rax,%rcx,8), %xmm0
movq 0x88(%rsp), %rax
movq 0x190(%rax), %rax
movslq 0x9c(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq 0x88(%rsp), %rax
movq 0x190(%rax), %rax
movslq 0x9c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm1
movq 0x60(%rsp), %rax
movsd 0x68(%rax), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x177d8
movq 0x60(%rsp), %rax
movsd 0x68(%rax), %xmm0
movq 0x88(%rsp), %rax
movq 0x190(%rax), %rax
movslq 0x9c(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq 0x88(%rsp), %rax
movq 0x1a0(%rax), %rax
movslq 0x9c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x88(%rsp), %rax
movq 0x190(%rax), %rax
movslq 0x9c(%rsp), %rcx
subsd (%rax,%rcx,8), %xmm0
movq 0x88(%rsp), %rax
movq 0x178(%rax), %rax
movslq 0x9c(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq 0x88(%rsp), %rax
movq 0x178(%rax), %rax
movslq 0x9c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm1
movq 0x60(%rsp), %rax
movsd 0x28(%rax), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x1787e
movq 0x60(%rsp), %rax
movsd 0x28(%rax), %xmm0
movq 0x88(%rsp), %rax
movq 0x178(%rax), %rax
movslq 0x9c(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq 0x88(%rsp), %rax
movq 0x178(%rax), %rax
movslq 0x9c(%rsp), %rcx
movsd 0x48f3(%rip), %xmm0     # 0x1c190
mulsd (%rax,%rcx,8), %xmm0
movq 0x88(%rsp), %rax
movq 0xf8(%rax), %rax
movslq 0x9c(%rsp), %rcx
divsd (%rax,%rcx,8), %xmm0
movq 0x88(%rsp), %rax
movq 0x188(%rax), %rax
movslq 0x9c(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq 0x88(%rsp), %rax
movq 0x188(%rax), %rax
movslq 0x9c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm1
movq 0x60(%rsp), %rax
movsd 0x50(%rax), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x1792c
movq 0x60(%rsp), %rax
movsd 0x50(%rax), %xmm0
movq 0x88(%rsp), %rax
movq 0x188(%rax), %rax
movslq 0x9c(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq 0x88(%rsp), %rax
movsd 0x46cc(%rip), %xmm0     # 0x1c008
addsd 0x8(%rax), %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0x88(%rsp), %rax
movq 0x188(%rax), %rax
movslq 0x9c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x88(%rsp), %rax
movq 0x188(%rax), %rax
movl 0x9c(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
divsd (%rax,%rcx,8), %xmm0
movq 0x88(%rsp), %rax
movsd (%rax), %xmm1
movq 0x90(%rsp), %rax
divsd 0x8(%rax), %xmm1
callq 0x9c60
movaps %xmm0, %xmm1
movsd 0x8(%rsp), %xmm0
mulsd %xmm1, %xmm0
movsd 0x47c1(%rip), %xmm1     # 0x1c178
addsd %xmm1, %xmm0
movq 0x88(%rsp), %rax
movq 0x198(%rax), %rax
movl 0x9c(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
addq $0xa8, %rsp
retq
nopw %cs:(%rax,%rax)