// File: /workspace/github_cpp_makefile_star2_O1/establishment[P]sandman/src/bin.cpp
// Function: LevenshteinDistance(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 LevenshteinDistance(const string& a, const string& b) {
    vector<vector<int>> d(a.size() + 1, vector<int>(b.size() + 1, 0));
    for (int i = 1; i <= (int)a.size(); i += 1) {
        d[i][0] = i;
    }

    for (int i = 1; i <= (int)b.size(); i += 1) {
        d[0][i] = i;
    }

    for (int i = 1; i <= (int)a.size(); i += 1) {
        for (int j = 1; j <= (int)b.size(); j += 1) {
            d[i][j] = min({d[i - 1][j] + 1, d[i][j - 1] + 1, d[i - 1][j - 1] + (a[i - 1] == b[j - 1] ? 0 : 1)});
        }
    }

    return d[a.size()][b.size()];
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %r15
movq 0x8(%rdi), %r12
movq 0x8(%rsi), %rsi
incq %rsi
leaq 0x2c(%rsp), %rdx
movl $0x0, (%rdx)
leaq 0x8(%rsp), %rbx
leaq 0x7(%rsp), %rcx
movq %rbx, %rdi
callq 0x3739e
incq %r12
leaq 0x30(%rsp), %rdi
leaq 0x6(%rsp), %rcx
movq %r12, %rsi
movq %rbx, %rdx
callq 0x37512
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x2e481
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x27480
movq 0x8(%r15), %rax
testl %eax, %eax
jle 0x2e4ab
movq 0x30(%rsp), %rcx
leal 0x1(%rax), %edx
addq $0x18, %rcx
movl $0x1, %esi
movq (%rcx), %rdi
movl %esi, (%rdi)
incq %rsi
addq $0x18, %rcx
cmpq %rsi, %rdx
jne 0x2e49a
movq 0x8(%r14), %rcx
testl %ecx, %ecx
jle 0x2e560
movq 0x30(%rsp), %rdx
movq (%rdx), %rdx
leaq 0x1(%rcx), %rdi
movl %edi, %r8d
andl $0x1, %edi
movq %r8, %rsi
subq %rdi, %rsi
addq $-0x2, %r8
movq %r8, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
xorl %edi, %edi
movdqa 0x26b69(%rip), %xmm1    # 0x55050
movdqa 0x26b71(%rip), %xmm2    # 0x55060
pxor %xmm2, %xmm0
pcmpeqd %xmm3, %xmm3
movq %rdi, %xmm4
pshufd $0x44, %xmm4, %xmm4     # xmm4 = xmm4[0,1,0,1]
por %xmm1, %xmm4
pxor %xmm2, %xmm4
movdqa %xmm4, %xmm5
pcmpgtd %xmm0, %xmm5
pcmpeqd %xmm0, %xmm4
pshufd $0xf5, %xmm4, %xmm6     # xmm6 = xmm4[1,1,3,3]
pand %xmm5, %xmm6
pshufd $0xf5, %xmm5, %xmm4     # xmm4 = xmm5[1,1,3,3]
por %xmm6, %xmm4
movd %xmm4, %r8d
notl %r8d
testb $0x1, %r8b
je 0x2e53e
leal 0x1(%rdi), %r8d
movl %r8d, 0x4(%rdx,%rdi,4)
pxor %xmm3, %xmm4
pextrw $0x4, %xmm4, %r8d
testb $0x1, %r8b
je 0x2e557
leal 0x2(%rdi), %r8d
movl %r8d, 0x8(%rdx,%rdi,4)
addq $0x2, %rdi
cmpq %rdi, %rsi
jne 0x2e4f7
movq %rax, 0x20(%rsp)
testl %eax, %eax
jle 0x2e615
movq 0x30(%rsp), %rdx
movq (%r15), %rsi
movq (%r14), %rdi
leal 0x1(%rcx), %r8d
movq 0x20(%rsp), %rax
leal 0x1(%rax), %r9d
movl $0x1, %r10d
testl %ecx, %ecx
jle 0x2e609
leaq -0x1(%r10), %r11
leaq (%r10,%r10,2), %r15
movq -0x18(%rdx,%r15,8), %r14
movq (%rdx,%r15,8), %r15
movl $0x1, %r12d
movl (%r14,%r12,4), %ebp
incl %ebp
movl %ebp, 0x8(%rsp)
movl -0x4(%r15,%r12,4), %ebp
incl %ebp
movl %ebp, 0xc(%rsp)
movb (%rsi,%r11), %bpl
xorl %r13d, %r13d
cmpb -0x1(%rdi,%r12), %bpl
setne %r13b
addl -0x4(%r14,%r12,4), %r13d
movl %r13d, 0x10(%rsp)
movl $0x4, %r13d
movq %rbx, %rbp
movl 0x8(%rsp,%r13), %eax
cmpl (%rbp), %eax
jge 0x2e5f0
leaq (%rsp,%r13), %rbp
addq $0x8, %rbp
addq $0x4, %r13
cmpq $0xc, %r13
jne 0x2e5de
movl (%rbp), %eax
movl %eax, (%r15,%r12,4)
incq %r12
cmpq %r8, %r12
jne 0x2e5a6
incq %r10
cmpq %r9, %r10
jne 0x2e58b
leaq 0x30(%rsp), %rdi
movq (%rdi), %rdx
movq 0x20(%rsp), %rax
leaq (%rax,%rax,2), %rax
movq (%rdx,%rax,8), %rax
movl (%rax,%rcx,4), %ebx
callq 0x375aa
movl %ebx, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x2e65d
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x27480
movq %rbx, %rdi
callq 0x27830