// File: /workspace/github_cpp_makefile_star2_O2/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, %r14d
leaq 0x2ba6(%rip), %rsi      # 0x5010
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %r13
movq %r13, %rdx
callq 0x27da
pushq $0x3
popq %rax
movl %eax, 0xc(%rsp)
pushq $0x2
popq %rax
movl %eax, 0x8(%rsp)
movss 0x2b72(%rip), %xmm0     # 0x5004
movss %xmm0, 0x4(%rsp)
leaq 0x2b77(%rip), %rbp      # 0x5016
movq 0x5b12(%rip), %r12      # 0x7fb8
movq %rsp, %r15
movl %r14d, %edi
movq %rbx, %rsi
movq %rbp, %rdx
callq 0x2070
cmpl $0x6f, %eax
jne 0x24e2
movq (%r12), %rsi
movq %r13, %rdi
movq %r15, %rdx
callq 0x27da
leaq 0x10(%rsp), %rdi
movq %r13, %rsi
callq 0x21b0
movq %r13, %rdi
callq 0x20d0
jmp 0x24a9
cmpl $-0x1, %eax
je 0x2530
cmpl $0x74, %eax
je 0x250f
cmpl $0x64, %eax
je 0x251e
cmpl $0x43, %eax
jne 0x26f1
movq (%r12), %rdi
callq 0x21c0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x4(%rsp)
jmp 0x24a9
movq (%r12), %rdi
callq 0x2240
movl %eax, 0xc(%rsp)
jmp 0x24a9
movq (%r12), %rdi
callq 0x2240
movl %eax, 0x8(%rsp)
jmp 0x24a9
movq 0x5a99(%rip), %r15      # 0x7fd0
movl (%r15), %eax
incl %eax
cmpl %r14d, %eax
jne 0x26f1
leaq 0x30(%rsp), %rdi
callq 0x28e0
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 0x2c4c
testb %al, %al
je 0x2630
movq 0x10(%rsp), %rsi
leaq 0x30(%rsp), %rdi
callq 0x30b2
xorl %ebx, %ebx
testb %al, %al
jne 0x26c9
movl $0x2, (%rsp)
movq 0x5a4b(%rip), %rdi      # 0x7ff0
leaq 0x2a74(%rip), %rsi      # 0x5020
callq 0x2160
leaq 0x2a6d(%rip), %rsi      # 0x5025
movq %rax, %rdi
callq 0x2160
leaq 0x2a64(%rip), %rsi      # 0x502b
movq %rax, %rdi
callq 0x2160
leaq 0x2a59(%rip), %rsi      # 0x502f
movq %rax, %rdi
callq 0x2160
leaq 0x2a3e(%rip), %rsi      # 0x5023
movq %rax, %rdi
callq 0x2160
pushq $0x49
popq %rsi
movq %rax, %rdi
callq 0x2280
leaq 0x2a3d(%rip), %rsi      # 0x503c
movq %rax, %rdi
callq 0x2160
leaq 0x2a3f(%rip), %rsi      # 0x504d
movq %rax, %rdi
callq 0x2160
leaq 0x10(%rsp), %rsi
movq %rax, %rdi
callq 0x2150
movq %rsp, %rdi
callq 0x2816
jmp 0x26c9
movl $0x2, (%rsp)
movq 0x59b2(%rip), %rdi      # 0x7ff0
leaq 0x29db(%rip), %rsi      # 0x5020
callq 0x2160
leaq 0x29d4(%rip), %rsi      # 0x5025
movq %rax, %rdi
callq 0x2160
leaq 0x29cb(%rip), %rsi      # 0x502b
movq %rax, %rdi
callq 0x2160
leaq 0x29c0(%rip), %rsi      # 0x502f
movq %rax, %rdi
callq 0x2160
leaq 0x29a5(%rip), %rsi      # 0x5023
movq %rax, %rdi
callq 0x2160
pushq $0x45
popq %rsi
movq %rax, %rdi
callq 0x2280
leaq 0x29a4(%rip), %rsi      # 0x503c
movq %rax, %rdi
callq 0x2160
leaq 0x2998(%rip), %rsi      # 0x503f
movq %rax, %rdi
callq 0x2160
movslq (%r15), %rcx
movq (%rbx,%rcx,8), %rsi
movq %rax, %rdi
callq 0x2160
movq %rsp, %rdi
callq 0x2816
pushq $-0x1
popq %rbx
leaq 0x30(%rsp), %rdi
callq 0x2912
leaq 0x10(%rsp), %rdi
callq 0x20d0
movl %ebx, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%rbx), %rdi
callq 0x2730
jmp 0x271b
movq %rax, %rbx
jmp 0x270d
jmp 0x2702
movq %rax, %rbx
movq %rsp, %rdi
callq 0x2816
leaq 0x30(%rsp), %rdi
callq 0x2912
jmp 0x271e
jmp 0x271b
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x20d0
movq %rbx, %rdi
callq 0x2290