// File: jc-kim[P]swaptions/HJM_Securities.cpp
// Function: getFactors()
FTYPE* getFactors() {
  // initialize input dataset
  FTYPE* factors = dmatrix(iFactors, iN - 1);
  //the three rows store vol data for the three factors
  factors[0]= .01;
  factors[1]= .01;
  factors[2]= .01;
  factors[3]= .01;
  factors[4]= .01;
  factors[5]= .01;
  factors[6]= .01;
  factors[7]= .01;
  factors[8]= .01;
  factors[9]= .01;

  factors[(iN - 1)]= .009048;
  factors[(iN - 1) + 1]= .008187;
  factors[(iN - 1) + 2]= .007408;
  factors[(iN - 1) + 3]= .006703;
  factors[(iN - 1) + 4]= .006065;
  factors[(iN - 1) + 5]= .005488;
  factors[(iN - 1) + 6]= .004966;
  factors[(iN - 1) + 7]= .004493;
  factors[(iN - 1) + 8]= .004066;
  factors[(iN - 1) + 9]= .003679;

  factors[(iN - 1) * 2]= .001000;
  factors[(iN - 1) * 2 + 1]= .000750;
  factors[(iN - 1) * 2 + 2]= .000500;
  factors[(iN - 1) * 2 + 3]= .000250;
  factors[(iN - 1) * 2 + 4]= .000000;
  factors[(iN - 1) * 2 + 5]= -.000250;
  factors[(iN - 1) * 2 + 6]= -.000500;
  factors[(iN - 1) * 2 + 7]= -.000750;
  factors[(iN - 1) * 2 + 8]= -.001000;
  factors[(iN - 1) * 2 + 9]= -.001250;

  return factors;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movslq 0x2fa9(%rip), %rdi      # 0x71f8
movl 0x2f97(%rip), %eax      # 0x71ec
subl $0x1, %eax
movslq %eax, %rsi
callq 0x2880
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movsd 0xf10(%rip), %xmm0      # 0x5180
movsd %xmm0, (%rax)
movq -0x8(%rbp), %rax
movsd 0xf00(%rip), %xmm0      # 0x5180
movsd %xmm0, 0x8(%rax)
movq -0x8(%rbp), %rax
movsd 0xeef(%rip), %xmm0      # 0x5180
movsd %xmm0, 0x10(%rax)
movq -0x8(%rbp), %rax
movsd 0xede(%rip), %xmm0      # 0x5180
movsd %xmm0, 0x18(%rax)
movq -0x8(%rbp), %rax
movsd 0xecd(%rip), %xmm0      # 0x5180
movsd %xmm0, 0x20(%rax)
movq -0x8(%rbp), %rax
movsd 0xebc(%rip), %xmm0      # 0x5180
movsd %xmm0, 0x28(%rax)
movq -0x8(%rbp), %rax
movsd 0xeab(%rip), %xmm0      # 0x5180
movsd %xmm0, 0x30(%rax)
movq -0x8(%rbp), %rax
movsd 0xe9a(%rip), %xmm0      # 0x5180
movsd %xmm0, 0x38(%rax)
movq -0x8(%rbp), %rax
movsd 0xe89(%rip), %xmm0      # 0x5180
movsd %xmm0, 0x40(%rax)
movq -0x8(%rbp), %rax
movsd 0xe78(%rip), %xmm0      # 0x5180
movsd %xmm0, 0x48(%rax)
movq -0x8(%rbp), %rax
movl 0x2ed5(%rip), %ecx      # 0x71ec
subl $0x1, %ecx
movslq %ecx, %rcx
movsd 0xe53(%rip), %xmm0      # 0x5178
movsd %xmm0, (%rax,%rcx,8)
movq -0x8(%rbp), %rax
movl 0x2eb8(%rip), %ecx      # 0x71ec
subl $0x1, %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movsd 0xe2b(%rip), %xmm0      # 0x5170
movsd %xmm0, (%rax,%rcx,8)
movq -0x8(%rbp), %rax
movl 0x2e98(%rip), %ecx      # 0x71ec
subl $0x1, %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movsd 0xe03(%rip), %xmm0      # 0x5168
movsd %xmm0, (%rax,%rcx,8)
movq -0x8(%rbp), %rax
movl 0x2e78(%rip), %ecx      # 0x71ec
subl $0x1, %ecx
addl $0x3, %ecx
movslq %ecx, %rcx
movsd 0xddb(%rip), %xmm0      # 0x5160
movsd %xmm0, (%rax,%rcx,8)
movq -0x8(%rbp), %rax
movl 0x2e58(%rip), %ecx      # 0x71ec
subl $0x1, %ecx
addl $0x4, %ecx
movslq %ecx, %rcx
movsd 0xdb3(%rip), %xmm0      # 0x5158
movsd %xmm0, (%rax,%rcx,8)
movq -0x8(%rbp), %rax
movl 0x2e38(%rip), %ecx      # 0x71ec
subl $0x1, %ecx
addl $0x5, %ecx
movslq %ecx, %rcx
movsd 0xd8b(%rip), %xmm0      # 0x5150
movsd %xmm0, (%rax,%rcx,8)
movq -0x8(%rbp), %rax
movl 0x2e18(%rip), %ecx      # 0x71ec
subl $0x1, %ecx
addl $0x6, %ecx
movslq %ecx, %rcx
movsd 0xd63(%rip), %xmm0      # 0x5148
movsd %xmm0, (%rax,%rcx,8)
movq -0x8(%rbp), %rax
movl 0x2df8(%rip), %ecx      # 0x71ec
subl $0x1, %ecx
addl $0x7, %ecx
movslq %ecx, %rcx
movsd 0xd3b(%rip), %xmm0      # 0x5140
movsd %xmm0, (%rax,%rcx,8)
movq -0x8(%rbp), %rax
movl 0x2dd8(%rip), %ecx      # 0x71ec
subl $0x1, %ecx
addl $0x8, %ecx
movslq %ecx, %rcx
movsd 0xd13(%rip), %xmm0      # 0x5138
movsd %xmm0, (%rax,%rcx,8)
movq -0x8(%rbp), %rax
movl 0x2db8(%rip), %ecx      # 0x71ec
subl $0x1, %ecx
addl $0x9, %ecx
movslq %ecx, %rcx
movsd 0xceb(%rip), %xmm0      # 0x5130
movsd %xmm0, (%rax,%rcx,8)
movq -0x8(%rbp), %rax
movl 0x2d98(%rip), %ecx      # 0x71ec
subl $0x1, %ecx
shll %ecx
movslq %ecx, %rcx
movsd 0xcc4(%rip), %xmm0      # 0x5128
movsd %xmm0, (%rax,%rcx,8)
movq -0x8(%rbp), %rax
movl 0x2d79(%rip), %ecx      # 0x71ec
subl $0x1, %ecx
shll %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movsd 0xc9a(%rip), %xmm0      # 0x5120
movsd %xmm0, (%rax,%rcx,8)
movq -0x8(%rbp), %rax
movl 0x2d57(%rip), %ecx      # 0x71ec
subl $0x1, %ecx
shll %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movsd 0xc70(%rip), %xmm0      # 0x5118
movsd %xmm0, (%rax,%rcx,8)
movq -0x8(%rbp), %rax
movl 0x2d35(%rip), %ecx      # 0x71ec
subl $0x1, %ecx
shll %ecx
addl $0x3, %ecx
movslq %ecx, %rcx
movsd 0xc46(%rip), %xmm0      # 0x5110
movsd %xmm0, (%rax,%rcx,8)
movq -0x8(%rbp), %rax
movl 0x2d13(%rip), %ecx      # 0x71ec
subl $0x1, %ecx
shll %ecx
addl $0x4, %ecx
movslq %ecx, %rcx
xorps %xmm0, %xmm0
movsd %xmm0, (%rax,%rcx,8)
movq -0x8(%rbp), %rax
movl 0x2cf6(%rip), %ecx      # 0x71ec
subl $0x1, %ecx
shll %ecx
addl $0x5, %ecx
movslq %ecx, %rcx
movsd 0xbff(%rip), %xmm0      # 0x5108
movsd %xmm0, (%rax,%rcx,8)
movq -0x8(%rbp), %rax
movl 0x2cd4(%rip), %ecx      # 0x71ec
subl $0x1, %ecx
shll %ecx
addl $0x6, %ecx
movslq %ecx, %rcx
movsd 0xbd5(%rip), %xmm0      # 0x5100
movsd %xmm0, (%rax,%rcx,8)
movq -0x8(%rbp), %rax
movl 0x2cb2(%rip), %ecx      # 0x71ec
subl $0x1, %ecx
shll %ecx
addl $0x7, %ecx
movslq %ecx, %rcx
movsd 0xbab(%rip), %xmm0      # 0x50f8
movsd %xmm0, (%rax,%rcx,8)
movq -0x8(%rbp), %rax
movl 0x2c90(%rip), %ecx      # 0x71ec
subl $0x1, %ecx
shll %ecx
addl $0x8, %ecx
movslq %ecx, %rcx
movsd 0xb81(%rip), %xmm0      # 0x50f0
movsd %xmm0, (%rax,%rcx,8)
movq -0x8(%rbp), %rax
movl 0x2c6e(%rip), %ecx      # 0x71ec
subl $0x1, %ecx
shll %ecx
addl $0x9, %ecx
movslq %ecx, %rcx
movsd 0xb57(%rip), %xmm0      # 0x50e8
movsd %xmm0, (%rax,%rcx,8)
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq