// File: canzarlab[P]Trajan/src/Similarity.cpp
// Function: EditDistance(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&, std::vector<std::vector<double, std::allocator<double>>, std::allocator<std::vector<double, std::allocator<double>>>>&)
double EditDistance(const string & L1, const string & L2, std::vector<std::vector<double>> & cost_matrix)
{
    int i = stoi(L1);
    int j = stoi(L2);
    int n = (int) cost_matrix.size();
    int m = (int) cost_matrix[0].size();
    // cout << (cost_matrix[i][m-1] + cost_matrix[n-1][j] - cost_matrix[i][j]) << " ";
    assert(i < cost_matrix.size() && j < cost_matrix[0].size());
    return (cost_matrix[i][m-1] + cost_matrix[n-1][j] - cost_matrix[i][j]) < var_eps ? 0 : (cost_matrix[i][m-1] + cost_matrix[n-1][j] - cost_matrix[i][j]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xa, %edx
callq 0xe970
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xa, %edx
callq 0xe970
movl %eax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x9c200
movl %eax, -0x24(%rbp)
movq -0x18(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x9a070
movq %rax, %rdi
callq 0x9ce20
movl %eax, -0x28(%rbp)
movslq -0x1c(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rdi
callq 0x9c200
movq -0x38(%rbp), %rcx
movq %rax, %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
movb %al, -0x29(%rbp)
jae 0xdc001
movslq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x9a070
movq %rax, %rdi
callq 0x9ce20
movq %rax, %rcx
movq -0x40(%rbp), %rax
cmpq %rcx, %rax
setb %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
testb $0x1, %al
jne 0xdc00a
jmp 0xdc00c
jmp 0xdc02b
leaq 0x4ff75(%rip), %rdi     # 0x12bf88
leaq 0x4ffa2(%rip), %rsi     # 0x12bfbc
movl $0x2b, %edx
leaq 0x4ffa9(%rip), %rcx     # 0x12bfcf
callq 0xa2b0
movq -0x18(%rbp), %rdi
movslq -0x1c(%rbp), %rsi
callq 0x9a070
movq %rax, %rdi
movl -0x28(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0x9a090
movsd (%rax), %xmm0
movsd %xmm0, -0x50(%rbp)
movq -0x18(%rbp), %rdi
movl -0x24(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0x9a070
movq %rax, %rdi
movslq -0x20(%rbp), %rsi
callq 0x9a090
movsd -0x50(%rbp), %xmm0
addsd (%rax), %xmm0
movsd %xmm0, -0x48(%rbp)
movq -0x18(%rbp), %rdi
movslq -0x1c(%rbp), %rsi
callq 0x9a070
movq %rax, %rdi
movslq -0x20(%rbp), %rsi
callq 0x9a090
movsd -0x48(%rbp), %xmm1
subsd (%rax), %xmm1
movsd 0xc5498(%rip), %xmm0    # 0x1a1540
ucomisd %xmm1, %xmm0
jbe 0xdc0b8
xorps %xmm0, %xmm0
movsd %xmm0, -0x58(%rbp)
jmp 0xdc132
movq -0x18(%rbp), %rdi
movslq -0x1c(%rbp), %rsi
callq 0x9a070
movq %rax, %rdi
movl -0x28(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0x9a090
movsd (%rax), %xmm0
movsd %xmm0, -0x68(%rbp)
movq -0x18(%rbp), %rdi
movl -0x24(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0x9a070
movq %rax, %rdi
movslq -0x20(%rbp), %rsi
callq 0x9a090
movsd -0x68(%rbp), %xmm0
addsd (%rax), %xmm0
movsd %xmm0, -0x60(%rbp)
movq -0x18(%rbp), %rdi
movslq -0x1c(%rbp), %rsi
callq 0x9a070
movq %rax, %rdi
movslq -0x20(%rbp), %rsi
callq 0x9a090
movsd -0x60(%rbp), %xmm0
subsd (%rax), %xmm0
movsd %xmm0, -0x58(%rbp)
movsd -0x58(%rbp), %xmm0
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)