// File: tetsuok[P]kernel-pa/learner.cc
// Function: kernel::Learner::Polynomial() const
float Learner::Polynomial() const {
  float r = 0.0f;

  if (d_ == 1) {
    for (size_t i = 0; i < margin_.size(); ++i) {
      r += margin_[i] * alpha_[i];
    }
  } else if (d_ == 2) {
    for (size_t i = 0; i < margin_.size(); ++i) {
      r += (margin_[i] * margin_[i]) * alpha_[i];
    }
  } else if (d_ == 3) {
    for (size_t i = 0; i < margin_.size(); ++i) {
      r += (margin_[i] * margin_[i] * margin_[i]) * alpha_[i];
    }
  } else if (d_ == 4) {
    for (size_t i = 0; i < margin_.size(); ++i) {
      r += (margin_[i] * margin_[i] * margin_[i] * margin_[i]) * alpha_[i];
    }
  }
  return r;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0xc(%rbp)
cmpl $0x1, 0xc(%rax)
jne 0x568b
movq $0x0, -0x18(%rbp)
movq -0x38(%rbp), %rdi
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
addq $0x40, %rdi
callq 0x3220
movq %rax, %rcx
movq -0x40(%rbp), %rax
cmpq %rcx, %rax
jae 0x5686
movq -0x38(%rbp), %rdi
addq $0x40, %rdi
movq -0x18(%rbp), %rsi
callq 0x6290
movq -0x38(%rbp), %rdi
movss (%rax), %xmm0
movss %xmm0, -0x44(%rbp)
addq $0x10, %rdi
movq -0x18(%rbp), %rsi
callq 0x6290
movss -0x44(%rbp), %xmm0
movss (%rax), %xmm2
movss -0xc(%rbp), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0xc(%rbp)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x5611
jmp 0x5915
movq -0x38(%rbp), %rax
cmpl $0x2, 0xc(%rax)
jne 0x573d
movq $0x0, -0x20(%rbp)
movq -0x38(%rbp), %rdi
movq -0x20(%rbp), %rax
movq %rax, -0x50(%rbp)
addq $0x40, %rdi
callq 0x3220
movq %rax, %rcx
movq -0x50(%rbp), %rax
cmpq %rcx, %rax
jae 0x5738
movq -0x38(%rbp), %rdi
addq $0x40, %rdi
movq -0x20(%rbp), %rsi
callq 0x6290
movq -0x38(%rbp), %rdi
movss (%rax), %xmm0
movss %xmm0, -0x58(%rbp)
addq $0x40, %rdi
movq -0x20(%rbp), %rsi
callq 0x6290
movss -0x58(%rbp), %xmm0
movq -0x38(%rbp), %rdi
mulss (%rax), %xmm0
movss %xmm0, -0x54(%rbp)
addq $0x10, %rdi
movq -0x20(%rbp), %rsi
callq 0x6290
movss -0x54(%rbp), %xmm0
movss (%rax), %xmm2
movss -0xc(%rbp), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0xc(%rbp)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x56a1
jmp 0x5913
movq -0x38(%rbp), %rax
cmpl $0x3, 0xc(%rax)
jne 0x5812
movq $0x0, -0x28(%rbp)
movq -0x38(%rbp), %rdi
movq -0x28(%rbp), %rax
movq %rax, -0x60(%rbp)
addq $0x40, %rdi
callq 0x3220
movq %rax, %rcx
movq -0x60(%rbp), %rax
cmpq %rcx, %rax
jae 0x580d
movq -0x38(%rbp), %rdi
addq $0x40, %rdi
movq -0x28(%rbp), %rsi
callq 0x6290
movq -0x38(%rbp), %rdi
movss (%rax), %xmm0
movss %xmm0, -0x6c(%rbp)
addq $0x40, %rdi
movq -0x28(%rbp), %rsi
callq 0x6290
movss -0x6c(%rbp), %xmm0
movq -0x38(%rbp), %rdi
mulss (%rax), %xmm0
movss %xmm0, -0x68(%rbp)
addq $0x40, %rdi
movq -0x28(%rbp), %rsi
callq 0x6290
movss -0x68(%rbp), %xmm0
movq -0x38(%rbp), %rdi
mulss (%rax), %xmm0
movss %xmm0, -0x64(%rbp)
addq $0x10, %rdi
movq -0x28(%rbp), %rsi
callq 0x6290
movss -0x64(%rbp), %xmm0
movss (%rax), %xmm2
movss -0xc(%rbp), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0xc(%rbp)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x5753
jmp 0x5911
movq -0x38(%rbp), %rax
cmpl $0x4, 0xc(%rax)
jne 0x590f
movq $0x0, -0x30(%rbp)
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rax
movq %rax, -0x78(%rbp)
addq $0x40, %rdi
callq 0x3220
movq %rax, %rcx
movq -0x78(%rbp), %rax
cmpq %rcx, %rax
jae 0x590d
movq -0x38(%rbp), %rdi
addq $0x40, %rdi
movq -0x30(%rbp), %rsi
callq 0x6290
movq -0x38(%rbp), %rdi
movss (%rax), %xmm0
movss %xmm0, -0x88(%rbp)
addq $0x40, %rdi
movq -0x30(%rbp), %rsi
callq 0x6290
movss -0x88(%rbp), %xmm0
movq -0x38(%rbp), %rdi
mulss (%rax), %xmm0
movss %xmm0, -0x84(%rbp)
addq $0x40, %rdi
movq -0x30(%rbp), %rsi
callq 0x6290
movss -0x84(%rbp), %xmm0
movq -0x38(%rbp), %rdi
mulss (%rax), %xmm0
movss %xmm0, -0x80(%rbp)
addq $0x40, %rdi
movq -0x30(%rbp), %rsi
callq 0x6290
movss -0x80(%rbp), %xmm0
movq -0x38(%rbp), %rdi
mulss (%rax), %xmm0
movss %xmm0, -0x7c(%rbp)
addq $0x10, %rdi
movq -0x30(%rbp), %rsi
callq 0x6290
movss -0x7c(%rbp), %xmm0
movss (%rax), %xmm2
movss -0xc(%rbp), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0xc(%rbp)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x5828
jmp 0x590f
jmp 0x5911
jmp 0x5913
jmp 0x5915
movss -0xc(%rbp), %xmm0
addq $0x90, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)