// File: /workspace/github_cpp_makefile_star2_O3/mshabbirhasan[P]ups-indel/include/utility.h
// Function: diff(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
string diff(string str1, string str2){
	//str1 is always longer than str2

    int length_difference = str1.length() - str2.length();

    if(str2== str1.substr(length_difference, str1.length()) && str1.length() > 2 && str2.length() > 2 && str1.substr(0,length_difference+1) != str2){
        return str1.substr(0, length_difference);
    }

	stringstream result;
    int left = 0, right = str1.length()-1;
    for(int j=0; j<str2.length(); j++){
        if(str1.at(j) == str2.at(j)){
            left++;
        }
        else{
            break;
        }
    }

    if(left == str2.length()){ //CACA CA
        result<<str1.substr(left, str1.length()-left);
    }
    else{
        for(int k = str2.length()-1, l = str1.length()-1; k>0; k--, l--){
            if(str1.at(l) == str2.at(k)){
                right--;
                if(k <= left){
                    break;
                }
            }
            else{
                break;
            }
        }

        result<<str1.substr(left,right-left+1);
    }

	return result.str();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1b8, %rsp            # imm = 0x1B8
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, -0x30(%rbp)
movq 0x8(%rsi), %rcx
movq %rcx, %r12
subq 0x8(%rdx), %r12
movslq %r12d, %rdx
leaq -0x1e0(%rbp), %r13
movq %r13, %rdi
movq %rdx, -0x58(%rbp)
callq 0x3360
movq 0x8(%r15), %rbx
movq (%r13), %r13
xorl %ecx, %ecx
testq %rbx, %rbx
je 0x3b62
cmpq -0x1d8(%rbp), %rbx
jne 0x3b62
movq (%r15), %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x3350
xorl %ecx, %ecx
testl %eax, %eax
jne 0x3b62
cmpq $0x3, %rbx
jb 0x3b62
cmpq $0x3, 0x8(%r14)
jb 0x3b62
shlq $0x20, %r12
movabsq $0x100000000, %rcx      # imm = 0x100000000
addq %r12, %rcx
sarq $0x20, %rcx
leaq -0x50(%rbp), %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x3360
movq -0x48(%rbp), %rdx
cmpq 0x8(%r15), %rdx
jne 0x3b3c
movq -0x50(%rbp), %r13
testq %rdx, %rdx
je 0x3b44
movq (%r15), %rsi
movq %r13, %rdi
callq 0x3350
testl %eax, %eax
setne %cl
jmp 0x3b46
movb $0x1, %cl
movq -0x50(%rbp), %r13
jmp 0x3b46
xorl %ecx, %ecx
leaq -0x40(%rbp), %rax
cmpq %rax, %r13
je 0x3b5b
movq %r13, %rdi
movl %ecx, %ebx
callq 0x32f0
movl %ebx, %ecx
movq -0x1e0(%rbp), %r13
leaq -0x1d0(%rbp), %rax
cmpq %rax, %r13
je 0x3b7a
movq %r13, %rdi
movl %ecx, %ebx
callq 0x32f0
movl %ebx, %ecx
testb %cl, %cl
je 0x3b98
movq -0x30(%rbp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
movq -0x58(%rbp), %rcx
callq 0x3360
jmp 0x3cc2
leaq -0x1e0(%rbp), %rdi
callq 0x3230
movq 0x8(%r14), %rcx
movq 0x8(%r15), %rdx
xorl %eax, %eax
testq %rdx, %rdx
je 0x3bd7
cmpq %rax, %rcx
je 0x3cd7
movq (%r14), %rsi
movb (%rsi,%rax), %sil
movq (%r15), %rdi
cmpb (%rdi,%rax), %sil
jne 0x3bd7
incq %rax
cmpq %rax, %rdx
jne 0x3bb3
movq %rdx, %rax
movl %eax, %eax
cmpq %rax, %rdx
jne 0x3c07
subq %rdx, %rcx
leaq -0x50(%rbp), %rdi
movq %r14, %rsi
callq 0x3360
leaq -0x1d0(%rbp), %rdi
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
callq 0x33a0
movq -0x30(%rbp), %rbx
jmp 0x3c82
leal -0x1(%rcx), %edi
movl %edx, %r8d
decq %r8
movl %edx, %r9d
decl %r9d
testl %r9d, %r9d
jle 0x3c54
movslq %edi, %rsi
cmpq %rsi, %rcx
jbe 0x3cf1
movl %r8d, %r10d
andl $0x7fffffff, %r10d      # imm = 0x7FFFFFFF
cmpq %r10, %rdx
jbe 0x3ceb
movq (%r14), %r11
movb (%r11,%rsi), %sil
movq (%r15), %r11
cmpb (%r11,%r10), %sil
jne 0x3c54
decl %edi
decq %r8
cmpl %r9d, %eax
jl 0x3c13
subl %eax, %edi
incl %edi
movslq %edi, %rcx
leaq -0x50(%rbp), %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x3360
leaq -0x1d0(%rbp), %rdi
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
callq 0x33a0
movq -0x30(%rbp), %rbx
leaq -0x40(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3c94
callq 0x32f0
leaq -0x1c8(%rbp), %rsi
movq %rbx, %rdi
callq 0x34f0
movq 0x122fe(%rip), %rsi     # 0x15fa8
leaq -0x1e0(%rbp), %rdi
callq 0x3260
leaq -0x160(%rbp), %rdi
callq 0x3120
movq %rbx, %rax
addq $0x1b8, %rsp            # imm = 0x1B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xd9f3(%rip), %rdi      # 0x116d1
movq %rcx, %rsi
movq %rcx, %rdx
xorl %eax, %eax
callq 0x34b0
movq %r10, %rsi
movq %rdx, %rcx
leaq 0xd9d9(%rip), %rdi      # 0x116d1
movq %rcx, %rdx
xorl %eax, %eax
callq 0x34b0
movq %rax, %rbx
leaq -0x1d0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3d5f
callq 0x32f0
jmp 0x3d5f
jmp 0x3d20
jmp 0x3d3d
movq %rax, %rbx
leaq -0x40(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3d40
callq 0x32f0
jmp 0x3d40
jmp 0x3d3d
jmp 0x3d3d
jmp 0x3d3d
movq %rax, %rbx
movq 0x12261(%rip), %rsi     # 0x15fa8
leaq -0x1e0(%rbp), %rdi
callq 0x3260
leaq -0x160(%rbp), %rdi
callq 0x3120
movq %rbx, %rdi
callq 0x35b0