// File: fpavetic[P]lcskpp/test_lcskpp.cpp
// Function: test_lcskpp(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int)
int test_lcskpp(const string& a, const string& b, const int K) {
  int lcskpp_length = 0;
  lcskpp_slow(a, b, K, &lcskpp_length);

  int lcskpp_sparse_slow_len = 0;
  vector<pair<int, int> > lcskpp_sparse_slow_recon;
  lcskpp_sparse_slow(a, b, K, &lcskpp_sparse_slow_len,
                     &lcskpp_sparse_slow_recon);

  int lcskpp_sparse_fast_len = 0;
  vector<pair<int, int> > lcskpp_sparse_fast_recon;
  lcskpp_sparse_fast(a, b, K, &lcskpp_sparse_fast_len,
                     &lcskpp_sparse_fast_recon);
  
  // printf("%d %d %d\n", 
  //        lcskpp_length, 
  //        lcskpp_sparse_slow_len,
  //        lcskpp_sparse_fast_len);
  // printf("%s\n%s\n", a.c_str(), b.c_str());
  assert(lcskpp_length == lcskpp_sparse_slow_len);
  assert(lcskpp_length == lcskpp_sparse_fast_len);
  assert(valid_lcskpp(a, b, K, lcskpp_sparse_slow_len, 
		      lcskpp_sparse_slow_recon));
  assert(valid_lcskpp(a, b, K, lcskpp_sparse_fast_len,
    		      lcskpp_sparse_fast_recon));
  
  return lcskpp_length;
}

// Assembly:
subq $0x78, %rsp
movq %rdi, 0x70(%rsp)
movq %rsi, 0x68(%rsp)
movl %edx, 0x64(%rsp)
movl $0x0, 0x60(%rsp)
movq 0x70(%rsp), %rdi
movq 0x68(%rsp), %rsi
movl 0x64(%rsp), %edx
leaq 0x60(%rsp), %rcx
callq 0x6790
movl $0x0, 0x5c(%rsp)
leaq 0x40(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x2c20
movq 0x10(%rsp), %r8
movq 0x70(%rsp), %rdi
movq 0x68(%rsp), %rsi
movl 0x64(%rsp), %edx
leaq 0x5c(%rsp), %rcx
callq 0x49e0
jmp 0x2728
movl $0x0, 0x30(%rsp)
leaq 0x18(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x2c20
movq 0x8(%rsp), %r8
movq 0x70(%rsp), %rdi
movq 0x68(%rsp), %rsi
movl 0x64(%rsp), %edx
leaq 0x30(%rsp), %rcx
callq 0x5640
jmp 0x275e
movl 0x60(%rsp), %eax
cmpl 0x5c(%rsp), %eax
jne 0x276a
jmp 0x27b9
leaq 0xf91a(%rip), %rdi      # 0x1208b
leaq 0xf93b(%rip), %rsi      # 0x120b3
movl $0x39, %edx
leaq 0xf93f(%rip), %rcx      # 0x120c3
callq 0x20f0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x38(%rsp)
movl %eax, 0x34(%rsp)
jmp 0x28a1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x38(%rsp)
movl %eax, 0x34(%rsp)
leaq 0x18(%rsp), %rdi
callq 0x2c30
jmp 0x28a1
movl 0x60(%rsp), %eax
cmpl 0x30(%rsp), %eax
jne 0x27c5
jmp 0x27e4
leaq 0xf932(%rip), %rdi      # 0x120fe
leaq 0xf8e0(%rip), %rsi      # 0x120b3
movl $0x3a, %edx
leaq 0xf8e4(%rip), %rcx      # 0x120c3
callq 0x20f0
movq 0x70(%rsp), %rdi
movq 0x68(%rsp), %rsi
movl 0x64(%rsp), %edx
movl 0x5c(%rsp), %ecx
leaq 0x40(%rsp), %r8
callq 0x6350
movb %al, 0x7(%rsp)
jmp 0x2806
movb 0x7(%rsp), %al
testb $0x1, %al
jne 0x2810
jmp 0x2812
jmp 0x2831
leaq 0xf90d(%rip), %rdi      # 0x12126
leaq 0xf893(%rip), %rsi      # 0x120b3
movl $0x3c, %edx
leaq 0xf897(%rip), %rcx      # 0x120c3
callq 0x20f0
movq 0x70(%rsp), %rdi
movq 0x68(%rsp), %rsi
movl 0x64(%rsp), %edx
movl 0x30(%rsp), %ecx
leaq 0x18(%rsp), %r8
callq 0x6350
movb %al, 0x6(%rsp)
jmp 0x2853
movb 0x6(%rsp), %al
testb $0x1, %al
jne 0x285d
jmp 0x285f
jmp 0x287e
leaq 0xf908(%rip), %rdi      # 0x1216e
leaq 0xf846(%rip), %rsi      # 0x120b3
movl $0x3e, %edx
leaq 0xf84a(%rip), %rcx      # 0x120c3
callq 0x20f0
movl 0x60(%rsp), %eax
movl %eax, (%rsp)
leaq 0x18(%rsp), %rdi
callq 0x2c30
leaq 0x40(%rsp), %rdi
callq 0x2c30
movl (%rsp), %eax
addq $0x78, %rsp
retq
leaq 0x40(%rsp), %rdi
callq 0x2c30
movq 0x38(%rsp), %rdi
callq 0x2270
nopw %cs:(%rax,%rax)