// File: /workspace/github_cpp_makefile_star2_O3/tetsuok[P]kernel-pa/kernel_pa.cc
// Function: main
int main(int argc, char** argv) {
  float C = kernel::kC;
  int kernel_degree = kernel::kKernelDegree;
  int iter = kernel::kNumIter;
  string model = kernel::kModel;

  int opt;
  while ((opt = getopt(argc, argv, ":C:d:t:o:")) != -1) {
    switch (opt) {
      case 'C':
        C = atof(optarg);
        break;
      case 'd':
        kernel_degree = atoi(optarg);
        break;
      case 't':
        iter = atoi(optarg);
        break;
      case 'o':
        model = string(optarg);
        break;
      default:
        kernel::Usage(argv[0]);
    }
  }

  if (optind + 1 != argc) {
    kernel::Usage(argv[0]);
  }

  kernel::Learner learner;
  learner.SetC(C);
  learner.SetKernelDegree(kernel_degree);

  if (!learner.Train(argv[optind], iter)) {
    LOG(ERROR) << "cannot train " << argv[optind];
    return -1;
  }
  if (!learner.Save(model.c_str())) {
    LOG(ERROR) << "cannot save trained model " << model;
  }
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x20(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x3aee(%rip), %rsi      # 0x6010
leaq 0x3aec(%rip), %rdx      # 0x6015
leaq 0x10(%rsp), %rdi
callq 0x2a24
movl $0x3, 0xc(%rsp)
movl $0x2, 0x8(%rsp)
movss 0x3ab9(%rip), %xmm0     # 0x6004
movss %xmm0, 0x4(%rsp)
leaq 0x3abe(%rip), %r13      # 0x6016
movq 0x6a51(%rip), %r12      # 0x8fb0
leaq 0x30(%rsp), %r14
movq %rsp, %r15
movl %ebp, %edi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x2070
cmpl $0x6f, %eax
jne 0x25b3
movq (%r12), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x298e
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0x21e0
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x2567
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x21a0
jmp 0x2567
cmpl $0x63, %eax
jg 0x25db
cmpl $-0x1, %eax
je 0x260d
cmpl $0x43, %eax
jne 0x288d
movq (%r12), %rdi
callq 0x21f0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x4(%rsp)
jmp 0x2567
cmpl $0x64, %eax
je 0x25fb
cmpl $0x74, %eax
jne 0x288d
movq (%r12), %rdi
callq 0x2260
movl %eax, 0xc(%rsp)
jmp 0x2567
movq (%r12), %rdi
callq 0x2260
movl %eax, 0x8(%rsp)
jmp 0x2567
movq 0x69bc(%rip), %r15      # 0x8fd0
movl (%r15), %eax
incl %eax
cmpl %ebp, %eax
jne 0x288d
leaq 0x30(%rsp), %rdi
callq 0x2abc
leaq 0x30(%rsp), %rdi
movss 0x4(%rsp), %xmm0
movss %xmm0, 0x8(%rdi)
movl 0x8(%rsp), %eax
movl %eax, 0xc(%rdi)
movslq (%r15), %rax
movq (%rbx,%rax,8), %rsi
movl 0xc(%rsp), %edx
callq 0x2f6e
testb %al, %al
je 0x274d
movq 0x10(%rsp), %rsi
leaq 0x30(%rsp), %rdi
callq 0x3518
xorl %ebx, %ebx
testb %al, %al
jne 0x2853
movl $0x2, (%rsp)
movq 0x696f(%rip), %rdi      # 0x8ff0
leaq 0x3998(%rip), %rsi      # 0x6020
movl $0x4, %edx
callq 0x21b0
movq 0x6957(%rip), %rdi      # 0x8ff0
leaq 0x3985(%rip), %rsi      # 0x6025
movl $0x5, %edx
callq 0x21b0
movq 0x693f(%rip), %rdi      # 0x8ff0
leaq 0x3973(%rip), %rsi      # 0x602b
movl $0x3, %edx
callq 0x21b0
movq 0x6927(%rip), %rdi      # 0x8ff0
leaq 0x395f(%rip), %rsi      # 0x602f
movl $0xc, %edx
callq 0x21b0
movq 0x690f(%rip), %rdi      # 0x8ff0
leaq 0x393b(%rip), %rsi      # 0x6023
movl $0x1, %edx
callq 0x21b0
movq 0x68f7(%rip), %rdi      # 0x8ff0
movl $0x49, %esi
callq 0x22a0
movq %rax, %r14
leaq 0x392f(%rip), %rsi      # 0x603c
movl $0x2, %edx
movq %rax, %rdi
callq 0x21b0
leaq 0x392c(%rip), %rsi      # 0x604d
movl $0x1a, %edx
movq %r14, %rdi
callq 0x21b0
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq %r14, %rdi
callq 0x21b0
movq %rsp, %rdi
callq 0x29cc
jmp 0x2853
movl $0x2, (%rsp)
movq 0x6895(%rip), %rdi      # 0x8ff0
leaq 0x38be(%rip), %rsi      # 0x6020
movl $0x4, %edx
callq 0x21b0
movq 0x687d(%rip), %rdi      # 0x8ff0
leaq 0x38ab(%rip), %rsi      # 0x6025
movl $0x5, %edx
callq 0x21b0
movq 0x6865(%rip), %rdi      # 0x8ff0
leaq 0x3899(%rip), %rsi      # 0x602b
movl $0x3, %edx
callq 0x21b0
movq 0x684d(%rip), %rdi      # 0x8ff0
leaq 0x3885(%rip), %rsi      # 0x602f
movl $0xc, %edx
callq 0x21b0
movq 0x6835(%rip), %rdi      # 0x8ff0
leaq 0x3861(%rip), %rsi      # 0x6023
movl $0x1, %edx
callq 0x21b0
movq 0x681d(%rip), %rdi      # 0x8ff0
movl $0x45, %esi
callq 0x22a0
movq %rax, %r14
leaq 0x3855(%rip), %rsi      # 0x603c
movl $0x2, %edx
movq %rax, %rdi
callq 0x21b0
leaq 0x3844(%rip), %rsi      # 0x603f
movl $0xd, %edx
movq %r14, %rdi
callq 0x21b0
movslq (%r15), %rax
movq (%rbx,%rax,8), %rbx
testq %rbx, %rbx
je 0x282c
movq %rbx, %rdi
callq 0x20d0
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x21b0
jmp 0x2846
movq (%r14), %rax
movq -0x18(%rax), %rax
movq %r14, %rdi
addq %rax, %rdi
movl 0x20(%r14,%rax), %esi
orl $0x1, %esi
callq 0x2280
movq %rsp, %rdi
callq 0x29cc
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
leaq 0x30(%rsp), %rdi
callq 0x2af0
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x2879
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x21a0
movl %ebx, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%rbx), %rdi
callq 0x28de
jmp 0x28b7
movq %rax, %rbx
jmp 0x28a9
jmp 0x289e
movq %rax, %rbx
movq %rsp, %rdi
callq 0x29cc
leaq 0x30(%rsp), %rdi
callq 0x2af0
jmp 0x28ba
jmp 0x28b7
movq %rax, %rbx
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x28d6
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x21a0
movq %rbx, %rdi
callq 0x22b0