// File: /workspace/github_cpp_makefile_star2_O1/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 0x2aee(%rip), %rsi      # 0x5010
leaq 0x2aec(%rip), %rdx      # 0x5015
leaq 0x10(%rsp), %rdi
callq 0x2a24
movl $0x3, 0xc(%rsp)
movl $0x2, 0x8(%rsp)
movss 0x2ab9(%rip), %xmm0     # 0x5004
movss %xmm0, 0x4(%rsp)
leaq 0x2abe(%rip), %r13      # 0x5016
movq 0x5a51(%rip), %r12      # 0x7fb0
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 0x59bc(%rip), %r15      # 0x7fd0
movl (%r15), %eax
incl %eax
cmpl %ebp, %eax
jne 0x288d
leaq 0x30(%rsp), %rdi
callq 0x2ab4
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 0x2f4a
testb %al, %al
je 0x274d
movq 0x10(%rsp), %rsi
leaq 0x30(%rsp), %rdi
callq 0x34f4
xorl %ebx, %ebx
testb %al, %al
jne 0x2853
movl $0x2, (%rsp)
movq 0x596f(%rip), %rdi      # 0x7ff0
leaq 0x2998(%rip), %rsi      # 0x5020
movl $0x4, %edx
callq 0x21b0
movq 0x5957(%rip), %rdi      # 0x7ff0
leaq 0x2985(%rip), %rsi      # 0x5025
movl $0x5, %edx
callq 0x21b0
movq 0x593f(%rip), %rdi      # 0x7ff0
leaq 0x2973(%rip), %rsi      # 0x502b
movl $0x3, %edx
callq 0x21b0
movq 0x5927(%rip), %rdi      # 0x7ff0
leaq 0x295f(%rip), %rsi      # 0x502f
movl $0xc, %edx
callq 0x21b0
movq 0x590f(%rip), %rdi      # 0x7ff0
leaq 0x293b(%rip), %rsi      # 0x5023
movl $0x1, %edx
callq 0x21b0
movq 0x58f7(%rip), %rdi      # 0x7ff0
movl $0x49, %esi
callq 0x22a0
movq %rax, %r14
leaq 0x292f(%rip), %rsi      # 0x503c
movl $0x2, %edx
movq %rax, %rdi
callq 0x21b0
leaq 0x292c(%rip), %rsi      # 0x504d
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 0x5895(%rip), %rdi      # 0x7ff0
leaq 0x28be(%rip), %rsi      # 0x5020
movl $0x4, %edx
callq 0x21b0
movq 0x587d(%rip), %rdi      # 0x7ff0
leaq 0x28ab(%rip), %rsi      # 0x5025
movl $0x5, %edx
callq 0x21b0
movq 0x5865(%rip), %rdi      # 0x7ff0
leaq 0x2899(%rip), %rsi      # 0x502b
movl $0x3, %edx
callq 0x21b0
movq 0x584d(%rip), %rdi      # 0x7ff0
leaq 0x2885(%rip), %rsi      # 0x502f
movl $0xc, %edx
callq 0x21b0
movq 0x5835(%rip), %rdi      # 0x7ff0
leaq 0x2861(%rip), %rsi      # 0x5023
movl $0x1, %edx
callq 0x21b0
movq 0x581d(%rip), %rdi      # 0x7ff0
movl $0x45, %esi
callq 0x22a0
movq %rax, %r14
leaq 0x2855(%rip), %rsi      # 0x503c
movl $0x2, %edx
movq %rax, %rdi
callq 0x21b0
leaq 0x2844(%rip), %rsi      # 0x503f
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 0x2ae8
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 0x2ae8
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