// File: tanakh[P]icfpc2015/main.cpp
// Function: calc_score(std::vector<std::vector<int, std::allocator<int>>, std::allocator<std::vector<int, std::allocator<int>>>>&, std::complex<int> const&, unit const&, int, int, std::vector<int, std::allocator<int>> const&)
double calc_score(vector<vector<int>> &bd,
                  const pt &pos, const unit &u, int rot, int ls_old,
                  const vector<int> &cmds)
{
  int w = bd[0].size(), h = bd.size();

  static vector<pt> units;
  static vector<pt> pts;
  units.clear();
  pts.clear();

  double height = h;
  double feat[FN] = {};

  for (auto &c: u.members) {
    auto d = rot_pivot(c + pos, u.pivot + pos, rot);
    height = min(height, (double)d.imag());

    units.push_back(d);
    pts.push_back(d);
    for (int i = 0; i < 6; i++) {
      int cx = d.real() + adj6[i][0];
      int cy = d.imag() + adj6[i][1];

      if (!(cx >= 0 && cx < w && cy >= 0 && cy < h)) continue;
      pts.push_back(pt(cx, cy));
    }
  }

  for (auto &p: pts) {
    int cx = p.real();
    int cy = p.imag();
    if (bd[cy][cx] & (1 << 8)) continue;
    bd[cy][cx] |= (1 << 8);

    if ((bd[cy][cx] & ((1<<8)-1)) != 0) continue;

    int pat = 0;
    for (int i = 0; i < 6; i++) {
      int dx = cx + adj6[i][0];
      int dy = cy + adj6[i][1];

      if (!(dx >= 0 && dx < w && dy >= 0 && dy < h &&
            (bd[dy][dx] & ((1<<8)-1)) == 0))
        continue;

      pat |= (1 << i);
    }

    int f = 0;
    f = f * 3 + ((pat>>0)&1) + ((pat>>1)&1);
    f = f * 3 + ((pat>>2)&1) + ((pat>>3)&1);
    feat[f]++;
  }

  for (auto &p: pts)
    bd[p.imag()][p.real()] &= ~(1 << 8);

  for (auto &c: units)
    bd[c.imag()][c.real()] = 1;

  for (auto &p: pts) {
    int cx = p.real();
    int cy = p.imag();
    if (bd[cy][cx] & (1 << 8)) continue;
    bd[cy][cx] |= (1 << 8);

    if ((bd[cy][cx] & ((1<<8)-1)) != 0) continue;

    int pat = 0;
    for (int i = 0; i < 6; i++) {
      int dx = cx + adj6[i][0];
      int dy = cy + adj6[i][1];

      if (!(dx >= 0 && dx < w && dy >= 0 && dy < h &&
            (bd[dy][dx] & ((1<<8)-1)) == 0))
        continue;

      pat |= (1 << i);
    }

    int f = 0;
    f = f * 3 + ((pat>>0)&1) + ((pat>>1)&1);
    f = f * 3 + ((pat>>2)&1) + ((pat>>3)&1);
    feat[f]--;
  }

  for (auto &p: pts)
    bd[p.imag()][p.real()] &= ~(1 << 8);

  for (auto &c: units)
    bd[c.imag()][c.real()] = 0;

  double ret = 0;

  for (int i = 0; i < FN; i++)
    ret += eparam[i] * feat[i];

  ret += eparam[FN + 0] * height * w;

  return ret;

  // int w = bd[0].size(), h = bd.size();

  // double height = h;

  // for (int y = 0; y < h; y++) {
  //   for (int x = 0; x < w/2; x++) {
  //     int xx = x*2 + y%2;
  //     if (bd[y][xx] != 0) {
  //       height = min(height, (double)y);
  //     }

  //     if (bd[y][xx] != 0)
  //       continue;

  //     const int vect[][2] = {
  //       {-1, -1},
  //       {1, -1},
  //       {2, 0},
  //       {-2, 0},
  //       {1, 1},
  //       {-1, 1},
  //     };

  //     int pat = 0;
  //     for (int i = 0; i < 6; i++) {
  //       int cx = xx + vect[i][0];
  //       int cy = y + vect[i][1];

  //       if (!(cx >= 0 && cx < w && cy >= 0 && cy < h && bd[cy][cx] == 0)) continue;

  //       pat |= (1 << i);
  //     }

  //     int f = 0;
  //     f = f * 3 + ((pat>>0)&1) + ((pat>>1)&1);
  //     f = f * 3 + ((pat>>2)&1) + ((pat>>3)&1);
  //     // f = f * 3 + ((pat>>4)&1) + ((pat>>5)&1);
  //     // f = f * 2 + (bd[y][xx] != 0);

  //     feat[f]++;
  //   }
  // }

  // double ret = 0;

  // // vlog() << height << ", " << holes << ", " << roofs << ", " << sides << endl;
  // // height /= h;
  // // if (height >= 0.8) height = 1;

  // for (int i = 0; i < FN; i++)
  //   ret += eparam[i] * feat[i];

  // ret += eparam[FN + 0] * height * w;
  // ret += eparam[FN + 1] * (double)last.imag() * w;
  // ret += eparam[FN + 2] * (double)(lines+1)*lines/2 * w * h;
  // // ret += eparam[FN + 3] * (double)cmds.length();

  // return ret;
}

// Assembly:
subq $0x238, %rsp            # imm = 0x238
movq %rdi, 0x230(%rsp)
movq %rsi, 0x228(%rsp)
movq %rdx, 0x220(%rsp)
movl %ecx, 0x21c(%rsp)
movl %r8d, 0x218(%rsp)
movq %r9, 0x210(%rsp)
movq 0x230(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x12160
movq %rax, %rdi
callq 0x12180
movl %eax, 0x20c(%rsp)
movq 0x230(%rsp), %rdi
callq 0x12140
movl %eax, 0x208(%rsp)
cmpb $0x0, 0x43d6f(%rip)     # 0x4b970
jne 0x7c46
leaq 0x43d66(%rip), %rdi     # 0x4b970
callq 0x4670
cmpl $0x0, %eax
je 0x7c46
leaq 0x43d3d(%rip), %rdi     # 0x4b958
callq 0x12460
leaq 0xa849(%rip), %rdi      # 0x12470
leaq 0x43d2a(%rip), %rsi     # 0x4b958
leaq 0x42753(%rip), %rdx     # 0x4a388
callq 0x4350
leaq 0x43d2f(%rip), %rdi     # 0x4b970
callq 0x4230
cmpb $0x0, 0x43d43(%rip)     # 0x4b990
jne 0x7c92
leaq 0x43d3a(%rip), %rdi     # 0x4b990
callq 0x4670
cmpl $0x0, %eax
je 0x7c92
leaq 0x43d11(%rip), %rdi     # 0x4b978
callq 0x12460
leaq 0xa7fd(%rip), %rdi      # 0x12470
leaq 0x43cfe(%rip), %rsi     # 0x4b978
leaq 0x42707(%rip), %rdx     # 0x4a388
callq 0x4350
leaq 0x43d03(%rip), %rdi     # 0x4b990
callq 0x4230
leaq 0x43cbf(%rip), %rdi     # 0x4b958
callq 0x124d0
leaq 0x43cd3(%rip), %rdi     # 0x4b978
callq 0x124d0
cvtsi2sdl 0x208(%rsp), %xmm0
movsd %xmm0, 0x200(%rsp)
leaq 0x1b0(%rsp), %rdi
xorl %esi, %esi
movl $0x48, %edx
callq 0x41c0
movq 0x220(%rsp), %rax
movq %rax, 0x1a8(%rsp)
movq 0x1a8(%rsp), %rdi
callq 0x110b0
movq %rax, 0x1a0(%rsp)
movq 0x1a8(%rsp), %rdi
callq 0x110e0
movq %rax, 0x198(%rsp)
leaq 0x1a0(%rsp), %rdi
leaq 0x198(%rsp), %rsi
callq 0x11110
testb $0x1, %al
jne 0x7d28
jmp 0x7efa
leaq 0x1a0(%rsp), %rdi
callq 0x11150
movq %rax, 0x190(%rsp)
movq 0x190(%rsp), %rdi
movq 0x228(%rsp), %rsi
callq 0x12100
movq %rax, 0x180(%rsp)
movq 0x220(%rsp), %rdi
addq $0x18, %rdi
movq 0x228(%rsp), %rsi
callq 0x12100
movq %rax, 0x178(%rsp)
movl 0x21c(%rsp), %edx
leaq 0x180(%rsp), %rdi
leaq 0x178(%rsp), %rsi
callq 0x11830
movq %rax, 0x188(%rsp)
leaq 0x188(%rsp), %rdi
callq 0x11930
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x170(%rsp)
leaq 0x200(%rsp), %rdi
leaq 0x170(%rsp), %rsi
callq 0x124f0
movsd (%rax), %xmm0
movsd %xmm0, 0x200(%rsp)
leaq 0x43b76(%rip), %rdi     # 0x4b958
leaq 0x188(%rsp), %rsi
callq 0x12530
leaq 0x43b82(%rip), %rdi     # 0x4b978
leaq 0x188(%rsp), %rsi
callq 0x12530
movl $0x0, 0x16c(%rsp)
cmpl $0x6, 0x16c(%rsp)
jge 0x7ee6
leaq 0x188(%rsp), %rdi
callq 0x11920
movslq 0x16c(%rsp), %rdx
leaq 0x2e308(%rip), %rcx     # 0x36140
addl (%rcx,%rdx,8), %eax
movl %eax, 0x168(%rsp)
leaq 0x188(%rsp), %rdi
callq 0x11930
movslq 0x16c(%rsp), %rdx
leaq 0x2e2e2(%rip), %rcx     # 0x36140
addl 0x4(%rcx,%rdx,8), %eax
movl %eax, 0x164(%rsp)
cmpl $0x0, 0x168(%rsp)
jl 0x7e9d
movl 0x168(%rsp), %eax
cmpl 0x20c(%rsp), %eax
jge 0x7e9d
cmpl $0x0, 0x164(%rsp)
jl 0x7e9d
movl 0x164(%rsp), %eax
cmpl 0x208(%rsp), %eax
jl 0x7e9f
jmp 0x7ed0
leaq 0x15c(%rsp), %rdi
leaq 0x168(%rsp), %rsi
leaq 0x164(%rsp), %rdx
callq 0x11530
leaq 0x43ab5(%rip), %rdi     # 0x4b978
leaq 0x15c(%rsp), %rsi
callq 0x11710
movl 0x16c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x16c(%rsp)
jmp 0x7e0e
jmp 0x7ee8
leaq 0x1a0(%rsp), %rdi
callq 0x11160
jmp 0x7d0a
leaq 0x43a77(%rip), %rax     # 0x4b978
movq %rax, 0x150(%rsp)
leaq 0x43a68(%rip), %rdi     # 0x4b978
callq 0x11780
movq %rax, 0x148(%rsp)
leaq 0x43a54(%rip), %rdi     # 0x4b978
callq 0x117b0
movq %rax, 0x140(%rsp)
leaq 0x148(%rsp), %rdi
leaq 0x140(%rsp), %rsi
callq 0x117e0
testb $0x1, %al
jne 0x7f4f
jmp 0x81bd
leaq 0x148(%rsp), %rdi
callq 0x11820
movq %rax, 0x138(%rsp)
movq 0x138(%rsp), %rdi
callq 0x11920
movl %eax, 0x134(%rsp)
movq 0x138(%rsp), %rdi
callq 0x11930
movl %eax, 0x130(%rsp)
movq 0x230(%rsp), %rdi
movslq 0x130(%rsp), %rsi
callq 0x12160
movq %rax, %rdi
movslq 0x134(%rsp), %rsi
callq 0x121a0
movl (%rax), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
je 0x7fc2
jmp 0x81ab
movq 0x230(%rsp), %rdi
movslq 0x130(%rsp), %rsi
callq 0x12160
movq %rax, %rdi
movslq 0x134(%rsp), %rsi
callq 0x121a0
movl (%rax), %ecx
orl $0x100, %ecx            # imm = 0x100
movl %ecx, (%rax)
movq 0x230(%rsp), %rdi
movslq 0x130(%rsp), %rsi
callq 0x12160
movq %rax, %rdi
movslq 0x134(%rsp), %rsi
callq 0x121a0
movl (%rax), %eax
andl $0xff, %eax
cmpl $0x0, %eax
je 0x8027
jmp 0x81ab
movl $0x0, 0x12c(%rsp)
movl $0x0, 0x128(%rsp)
cmpl $0x6, 0x128(%rsp)
jge 0x8125
movl 0x134(%rsp), %eax
movslq 0x128(%rsp), %rdx
leaq 0x2e0df(%rip), %rcx     # 0x36140
addl (%rcx,%rdx,8), %eax
movl %eax, 0x124(%rsp)
movl 0x130(%rsp), %eax
movslq 0x128(%rsp), %rdx
leaq 0x2e0bf(%rip), %rcx     # 0x36140
addl 0x4(%rcx,%rdx,8), %eax
movl %eax, 0x120(%rsp)
cmpl $0x0, 0x124(%rsp)
jl 0x80f1
movl 0x124(%rsp), %eax
cmpl 0x20c(%rsp), %eax
jge 0x80f1
cmpl $0x0, 0x120(%rsp)
jl 0x80f1
movl 0x120(%rsp), %eax
cmpl 0x208(%rsp), %eax
jge 0x80f1
movq 0x230(%rsp), %rdi
movslq 0x120(%rsp), %rsi
callq 0x12160
movq %rax, %rdi
movslq 0x124(%rsp), %rsi
callq 0x121a0
movl (%rax), %eax
andl $0xff, %eax
cmpl $0x0, %eax
je 0x80f3
jmp 0x810f
movl 0x128(%rsp), %ecx
movl $0x1, %eax
shll %cl, %eax
orl 0x12c(%rsp), %eax
movl %eax, 0x12c(%rsp)
movl 0x128(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x128(%rsp)
jmp 0x803d
movl $0x0, 0x11c(%rsp)
imull $0x3, 0x11c(%rsp), %eax
movl 0x12c(%rsp), %ecx
sarl $0x0, %ecx
andl $0x1, %ecx
addl %ecx, %eax
movl 0x12c(%rsp), %ecx
sarl %ecx
andl $0x1, %ecx
addl %ecx, %eax
movl %eax, 0x11c(%rsp)
imull $0x3, 0x11c(%rsp), %eax
movl 0x12c(%rsp), %ecx
sarl $0x2, %ecx
andl $0x1, %ecx
addl %ecx, %eax
movl 0x12c(%rsp), %ecx
sarl $0x3, %ecx
andl $0x1, %ecx
addl %ecx, %eax
movl %eax, 0x11c(%rsp)
movslq 0x11c(%rsp), %rax
movsd 0x2de9f(%rip), %xmm0    # 0x36038
addsd 0x1b0(%rsp,%rax,8), %xmm0
movsd %xmm0, 0x1b0(%rsp,%rax,8)
leaq 0x148(%rsp), %rdi
callq 0x11940
jmp 0x7f31
leaq 0x437b4(%rip), %rax     # 0x4b978
movq %rax, 0x110(%rsp)
leaq 0x437a5(%rip), %rdi     # 0x4b978
callq 0x11780
movq %rax, 0x108(%rsp)
leaq 0x43791(%rip), %rdi     # 0x4b978
callq 0x117b0
movq %rax, 0x100(%rsp)
leaq 0x108(%rsp), %rdi
leaq 0x100(%rsp), %rsi
callq 0x117e0
testb $0x1, %al
jne 0x820f
jmp 0x8286
leaq 0x108(%rsp), %rdi
callq 0x11820
movq %rax, 0xf8(%rsp)
movq 0x230(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0xf8(%rsp), %rdi
callq 0x11930
movq 0x38(%rsp), %rdi
movslq %eax, %rsi
callq 0x12160
movq %rax, 0x40(%rsp)
movq 0xf8(%rsp), %rdi
callq 0x11920
movq 0x40(%rsp), %rdi
movslq %eax, %rsi
callq 0x121a0
movl (%rax), %ecx
andl $0xfffffeff, %ecx       # imm = 0xFFFFFEFF
movl %ecx, (%rax)
leaq 0x108(%rsp), %rdi
callq 0x11940
jmp 0x81f4
leaq 0x436cb(%rip), %rax     # 0x4b958
movq %rax, 0xf0(%rsp)
leaq 0x436bc(%rip), %rdi     # 0x4b958
callq 0x11780
movq %rax, 0xe8(%rsp)
leaq 0x436a8(%rip), %rdi     # 0x4b958
callq 0x117b0
movq %rax, 0xe0(%rsp)
leaq 0xe8(%rsp), %rdi
leaq 0xe0(%rsp), %rsi
callq 0x117e0
testb $0x1, %al
jne 0x82d8
jmp 0x834b
leaq 0xe8(%rsp), %rdi
callq 0x11820
movq %rax, 0xd8(%rsp)
movq 0x230(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0xd8(%rsp), %rdi
callq 0x11930
movq 0x28(%rsp), %rdi
movslq %eax, %rsi
callq 0x12160
movq %rax, 0x30(%rsp)
movq 0xd8(%rsp), %rdi
callq 0x11920
movq 0x30(%rsp), %rdi
movslq %eax, %rsi
callq 0x121a0
movl $0x1, (%rax)
leaq 0xe8(%rsp), %rdi
callq 0x11940
jmp 0x82bd
leaq 0x43626(%rip), %rax     # 0x4b978
movq %rax, 0xd0(%rsp)
leaq 0x43617(%rip), %rdi     # 0x4b978
callq 0x11780
movq %rax, 0xc8(%rsp)
leaq 0x43603(%rip), %rdi     # 0x4b978
callq 0x117b0
movq %rax, 0xc0(%rsp)
leaq 0xc8(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
callq 0x117e0
testb $0x1, %al
jne 0x83a0
jmp 0x860e
leaq 0xc8(%rsp), %rdi
callq 0x11820
movq %rax, 0xb8(%rsp)
movq 0xb8(%rsp), %rdi
callq 0x11920
movl %eax, 0xb4(%rsp)
movq 0xb8(%rsp), %rdi
callq 0x11930
movl %eax, 0xb0(%rsp)
movq 0x230(%rsp), %rdi
movslq 0xb0(%rsp), %rsi
callq 0x12160
movq %rax, %rdi
movslq 0xb4(%rsp), %rsi
callq 0x121a0
movl (%rax), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
je 0x8413
jmp 0x85fc
movq 0x230(%rsp), %rdi
movslq 0xb0(%rsp), %rsi
callq 0x12160
movq %rax, %rdi
movslq 0xb4(%rsp), %rsi
callq 0x121a0
movl (%rax), %ecx
orl $0x100, %ecx            # imm = 0x100
movl %ecx, (%rax)
movq 0x230(%rsp), %rdi
movslq 0xb0(%rsp), %rsi
callq 0x12160
movq %rax, %rdi
movslq 0xb4(%rsp), %rsi
callq 0x121a0
movl (%rax), %eax
andl $0xff, %eax
cmpl $0x0, %eax
je 0x8478
jmp 0x85fc
movl $0x0, 0xac(%rsp)
movl $0x0, 0xa8(%rsp)
cmpl $0x6, 0xa8(%rsp)
jge 0x8576
movl 0xb4(%rsp), %eax
movslq 0xa8(%rsp), %rdx
leaq 0x2dc8e(%rip), %rcx     # 0x36140
addl (%rcx,%rdx,8), %eax
movl %eax, 0xa4(%rsp)
movl 0xb0(%rsp), %eax
movslq 0xa8(%rsp), %rdx
leaq 0x2dc6e(%rip), %rcx     # 0x36140
addl 0x4(%rcx,%rdx,8), %eax
movl %eax, 0xa0(%rsp)
cmpl $0x0, 0xa4(%rsp)
jl 0x8542
movl 0xa4(%rsp), %eax
cmpl 0x20c(%rsp), %eax
jge 0x8542
cmpl $0x0, 0xa0(%rsp)
jl 0x8542
movl 0xa0(%rsp), %eax
cmpl 0x208(%rsp), %eax
jge 0x8542
movq 0x230(%rsp), %rdi
movslq 0xa0(%rsp), %rsi
callq 0x12160
movq %rax, %rdi
movslq 0xa4(%rsp), %rsi
callq 0x121a0
movl (%rax), %eax
andl $0xff, %eax
cmpl $0x0, %eax
je 0x8544
jmp 0x8560
movl 0xa8(%rsp), %ecx
movl $0x1, %eax
shll %cl, %eax
orl 0xac(%rsp), %eax
movl %eax, 0xac(%rsp)
movl 0xa8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xa8(%rsp)
jmp 0x848e
movl $0x0, 0x9c(%rsp)
imull $0x3, 0x9c(%rsp), %eax
movl 0xac(%rsp), %ecx
sarl $0x0, %ecx
andl $0x1, %ecx
addl %ecx, %eax
movl 0xac(%rsp), %ecx
sarl %ecx
andl $0x1, %ecx
addl %ecx, %eax
movl %eax, 0x9c(%rsp)
imull $0x3, 0x9c(%rsp), %eax
movl 0xac(%rsp), %ecx
sarl $0x2, %ecx
andl $0x1, %ecx
addl %ecx, %eax
movl 0xac(%rsp), %ecx
sarl $0x3, %ecx
andl $0x1, %ecx
addl %ecx, %eax
movl %eax, 0x9c(%rsp)
movslq 0x9c(%rsp), %rax
movsd 0x2da46(%rip), %xmm0    # 0x36030
addsd 0x1b0(%rsp,%rax,8), %xmm0
movsd %xmm0, 0x1b0(%rsp,%rax,8)
leaq 0xc8(%rsp), %rdi
callq 0x11940
jmp 0x8382
leaq 0x43363(%rip), %rax     # 0x4b978
movq %rax, 0x90(%rsp)
leaq 0x43354(%rip), %rdi     # 0x4b978
callq 0x11780
movq %rax, 0x88(%rsp)
leaq 0x43340(%rip), %rdi     # 0x4b978
callq 0x117b0
movq %rax, 0x80(%rsp)
leaq 0x88(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x117e0
testb $0x1, %al
jne 0x8660
jmp 0x86ce
leaq 0x88(%rsp), %rdi
callq 0x11820
movq %rax, 0x78(%rsp)
movq 0x230(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x78(%rsp), %rdi
callq 0x11930
movq 0x18(%rsp), %rdi
movslq %eax, %rsi
callq 0x12160
movq %rax, 0x20(%rsp)
movq 0x78(%rsp), %rdi
callq 0x11920
movq 0x20(%rsp), %rdi
movslq %eax, %rsi
callq 0x121a0
movl (%rax), %ecx
andl $0xfffffeff, %ecx       # imm = 0xFFFFFEFF
movl %ecx, (%rax)
leaq 0x88(%rsp), %rdi
callq 0x11940
jmp 0x8645
leaq 0x43283(%rip), %rax     # 0x4b958
movq %rax, 0x70(%rsp)
leaq 0x43277(%rip), %rdi     # 0x4b958
callq 0x11780
movq %rax, 0x68(%rsp)
leaq 0x43266(%rip), %rdi     # 0x4b958
callq 0x117b0
movq %rax, 0x60(%rsp)
leaq 0x68(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x117e0
testb $0x1, %al
jne 0x8711
jmp 0x8772
leaq 0x68(%rsp), %rdi
callq 0x11820
movq %rax, 0x58(%rsp)
movq 0x230(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x58(%rsp), %rdi
callq 0x11930
movq 0x8(%rsp), %rdi
movslq %eax, %rsi
callq 0x12160
movq %rax, 0x10(%rsp)
movq 0x58(%rsp), %rdi
callq 0x11920
movq 0x10(%rsp), %rdi
movslq %eax, %rsi
callq 0x121a0
movl $0x0, (%rax)
leaq 0x68(%rsp), %rdi
callq 0x11940
jmp 0x86fc
xorps %xmm0, %xmm0
movsd %xmm0, 0x50(%rsp)
movl $0x0, 0x4c(%rsp)
cmpl $0x9, 0x4c(%rsp)
jge 0x87ce
movslq 0x4c(%rsp), %rsi
leaq 0x431aa(%rip), %rdi     # 0x4b940
callq 0x125a0
movsd (%rax), %xmm0
movslq 0x4c(%rsp), %rax
movsd 0x1b0(%rsp,%rax,8), %xmm2
movsd 0x50(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x50(%rsp)
movl 0x4c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4c(%rsp)
jmp 0x8783
leaq 0x4316b(%rip), %rdi     # 0x4b940
movl $0x9, %esi
callq 0x125a0
movsd (%rax), %xmm0
mulsd 0x200(%rsp), %xmm0
cvtsi2sdl 0x20c(%rsp), %xmm2
movsd 0x50(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x50(%rsp)
movsd 0x50(%rsp), %xmm0
addq $0x238, %rsp            # imm = 0x238
retq
nopw (%rax,%rax)