// File: hantaoyin[P]ffxiv-crafting-mcts/ffxiv-crafting-mcts.C
// Function: mlp::AffineMap::backward_propagate(double)
void backward_propagate(double step_size) override final {
    for (size_t j = 0; j < x.size(); ++j) {
      x.D(j) = 0.0;
    }
    for (size_t i = 0; i < y.size(); ++i) {
      for (size_t j = 0; j < x.size(); ++j) {
        x.D(j) += y.D(i) * w[i * x.size() + j];
        w[i * x.size() + j] = w[i * x.size() + j] * (1. - 2. * weight_decay * step_size) - step_size * y.D(i) * x(j);
      }
      b[i] = b[i] * (1. - 2. * weight_decay * step_size) - step_size * y.D(i);
    }
  }

// Assembly:
subq $0xd8, %rsp
movq %rdi, 0xd0(%rsp)
movsd %xmm0, 0xc8(%rsp)
movq 0xd0(%rsp), %rax
movq %rax, 0xa8(%rsp)
movq $0x0, 0xc0(%rsp)
movq 0xa8(%rsp), %rax
movq 0xc0(%rsp), %rcx
movq %rcx, 0xa0(%rsp)
movq 0x8(%rax), %rdi
callq 0x8350
movq %rax, %rcx
movq 0xa0(%rsp), %rax
cmpq %rcx, %rax
jae 0x864b
movq 0xa8(%rsp), %rax
movq 0x8(%rax), %rdi
movq 0xc0(%rsp), %rsi
callq 0x8b30
xorps %xmm0, %xmm0
movsd %xmm0, (%rax)
movq 0xc0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xc0(%rsp)
jmp 0x85e4
movq $0x0, 0xb8(%rsp)
movq 0xa8(%rsp), %rax
movq 0xb8(%rsp), %rcx
movq %rcx, 0x98(%rsp)
movq 0x10(%rax), %rdi
callq 0x8350
movq %rax, %rcx
movq 0x98(%rsp), %rax
cmpq %rcx, %rax
jae 0x89e8
movq $0x0, 0xb0(%rsp)
movq 0xa8(%rsp), %rax
movq 0xb0(%rsp), %rcx
movq %rcx, 0x90(%rsp)
movq 0x8(%rax), %rdi
callq 0x8350
movq %rax, %rcx
movq 0x90(%rsp), %rax
cmpq %rcx, %rax
jae 0x88fc
movq 0xa8(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0xb8(%rsp), %rsi
callq 0x8b30
movq %rax, %rcx
movq 0xa8(%rsp), %rax
movsd (%rcx), %xmm0
movsd %xmm0, 0x38(%rsp)
movq %rax, %rcx
addq $0x18, %rcx
movq %rcx, 0x30(%rsp)
movq 0xb8(%rsp), %rcx
movq %rcx, 0x28(%rsp)
movq 0x8(%rax), %rdi
callq 0x8350
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdi
imulq %rax, %rsi
addq 0xb0(%rsp), %rsi
callq 0x8ae0
movq %rax, %rcx
movq 0xa8(%rsp), %rax
movsd (%rcx), %xmm0
movsd %xmm0, 0x40(%rsp)
movq 0x8(%rax), %rdi
movq 0xb0(%rsp), %rsi
callq 0x8b30
movsd 0x38(%rsp), %xmm0
movsd 0x40(%rsp), %xmm2
movq %rax, %rcx
movq 0xa8(%rsp), %rax
movsd (%rcx), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, (%rcx)
movq %rax, %rcx
addq $0x18, %rcx
movq %rcx, 0x50(%rsp)
movq 0xb8(%rsp), %rcx
movq %rcx, 0x48(%rsp)
movq 0x8(%rax), %rdi
callq 0x8350
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdi
imulq %rax, %rsi
addq 0xb0(%rsp), %rsi
callq 0x8ae0
movq %rax, %rcx
movq 0xa8(%rsp), %rax
movsd (%rcx), %xmm0
movsd %xmm0, 0x68(%rsp)
movsd 0xc8(%rsp), %xmm0
movsd 0xa868(%rip), %xmm1     # 0x13050
mulsd %xmm1, %xmm0
movsd 0xa834(%rip), %xmm1     # 0x13028
addsd %xmm1, %xmm0
movsd %xmm0, 0x70(%rsp)
movsd 0xc8(%rsp), %xmm0
movsd %xmm0, 0x58(%rsp)
movq 0x10(%rax), %rdi
movq 0xb8(%rsp), %rsi
callq 0x8b30
movsd 0x58(%rsp), %xmm0
movq %rax, %rcx
movq 0xa8(%rsp), %rax
mulsd (%rcx), %xmm0
movsd %xmm0, 0x60(%rsp)
movq 0x8(%rax), %rdi
movq 0xb0(%rsp), %rsi
callq 0x8b00
movsd 0x60(%rsp), %xmm1
movsd 0x68(%rsp), %xmm0
movsd 0x70(%rsp), %xmm2
movq %rax, %rcx
movq 0xa8(%rsp), %rax
mulsd (%rcx), %xmm1
movq %xmm1, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
xorq %rdx, %rcx
movq %rcx, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x88(%rsp)
movq %rax, %rcx
addq $0x18, %rcx
movq %rcx, 0x80(%rsp)
movq 0xb8(%rsp), %rcx
movq %rcx, 0x78(%rsp)
movq 0x8(%rax), %rdi
callq 0x8350
movq 0x78(%rsp), %rsi
movq 0x80(%rsp), %rdi
imulq %rax, %rsi
addq 0xb0(%rsp), %rsi
callq 0x8ae0
movsd 0x88(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0xb0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xb0(%rsp)
jmp 0x8698
movq 0xa8(%rsp), %rdi
addq $0x30, %rdi
movq 0xb8(%rsp), %rsi
callq 0x8ae0
movq %rax, %rcx
movq 0xa8(%rsp), %rax
movsd (%rcx), %xmm0
movsd %xmm0, 0x10(%rsp)
movsd 0xc8(%rsp), %xmm0
movsd 0xa715(%rip), %xmm1     # 0x13050
mulsd %xmm1, %xmm0
movsd 0xa6e1(%rip), %xmm1     # 0x13028
addsd %xmm1, %xmm0
movsd %xmm0, 0x18(%rsp)
movsd 0xc8(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0x10(%rax), %rdi
movq 0xb8(%rsp), %rsi
callq 0x8b30
movsd 0x8(%rsp), %xmm1
movsd 0x10(%rsp), %xmm0
movsd 0x18(%rsp), %xmm2
movq 0xa8(%rsp), %rdi
mulsd (%rax), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x20(%rsp)
addq $0x30, %rdi
movq 0xb8(%rsp), %rsi
callq 0x8ae0
movsd 0x20(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0xb8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xb8(%rsp)
jmp 0x8657
addq $0xd8, %rsp
retq