// File: /workspace/github_cpp_makefile_star2_O2/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 $0x1d8, %rsp            # imm = 0x1D8
movq %rdx, %r13
movq %rdi, %r15
movq 0x8(%rsi), %rcx
movq %rcx, %r14
subq 0x8(%rdx), %r14
movslq %r14d, %rbx
leaq -0x1f8(%rbp), %r12
movq %r12, %rdi
movq %rsi, -0x38(%rbp)
movq %rbx, %rdx
callq 0x3340
movq %r13, -0x30(%rbp)
movq %r13, %rdi
movq %r12, %rsi
callq 0x67eb
testb %al, %al
je 0x3ad3
movq -0x38(%rbp), %rax
cmpq $0x3, 0x8(%rax)
jb 0x3ad3
movq -0x30(%rbp), %rax
cmpq $0x3, 0x8(%rax)
jb 0x3ad3
shlq $0x20, %r14
movabsq $0x100000000, %rcx      # imm = 0x100000000
addq %r14, %rcx
sarq $0x20, %rcx
leaq -0x60(%rbp), %rdi
movq -0x38(%rbp), %r14
movq %r14, %rsi
xorl %edx, %edx
callq 0x3340
leaq -0x60(%rbp), %r12
movq %r12, %rdi
movq -0x30(%rbp), %rsi
callq 0x680e
movl %eax, %r13d
movq %r12, %rdi
callq 0x3668
leaq -0x1f8(%rbp), %rdi
callq 0x3668
testb %r13b, %r13b
je 0x3ae3
movq %r15, %rdi
movq %r14, %rsi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x3340
jmp 0x3c05
leaq -0x1f8(%rbp), %rdi
callq 0x3668
movq -0x38(%rbp), %r14
leaq -0x1f8(%rbp), %rdi
callq 0x3240
movl 0x8(%r14), %eax
decl %eax
movl %eax, -0x3c(%rbp)
xorl %r12d, %r12d
movq -0x30(%rbp), %rax
movq 0x8(%rax), %r13
cmpq %r12, %r13
jbe 0x3b32
movq %r14, %rdi
movq %r12, %rsi
callq 0x3620
movb (%rax), %bl
movq -0x30(%rbp), %rdi
movq %r12, %rsi
callq 0x3620
cmpb (%rax), %bl
jne 0x3b2a
incq %r12
jmp 0x3afb
movq -0x30(%rbp), %rax
movq 0x8(%rax), %r13
movl %r12d, %eax
cmpq %rax, %r13
jne 0x3b62
movq 0x8(%r14), %rcx
subq %r13, %rcx
leaq -0x60(%rbp), %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x3340
leaq -0x1e8(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x32c0
jmp 0x3be1
movq %rax, -0x70(%rbp)
movq %r15, -0x68(%rbp)
movl 0x8(%r14), %r14d
movl %r13d, %r15d
decq %r15
decl %r14d
decl %r13d
testl %r13d, %r13d
jle 0x3bb1
movslq %r14d, %rsi
movq -0x38(%rbp), %rdi
callq 0x3620
movb (%rax), %bl
movl %r15d, %esi
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
movq -0x30(%rbp), %rdi
callq 0x3620
cmpb (%rax), %bl
jne 0x3bb1
decl -0x3c(%rbp)
decq %r15
decl %r14d
cmpl %r12d, %r13d
jg 0x3b77
movl -0x3c(%rbp), %eax
subl %r12d, %eax
incl %eax
movslq %eax, %rcx
leaq -0x60(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x70(%rbp), %rdx
callq 0x3340
leaq -0x1e8(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x32c0
movq -0x68(%rbp), %r15
leaq -0x60(%rbp), %rdi
callq 0x3668
leaq -0x1e0(%rbp), %rsi
movq %r15, %rdi
callq 0x34d0
leaq -0x1f8(%rbp), %rdi
callq 0x3260
movq %r15, %rax
addq $0x1d8, %rsp            # imm = 0x1D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x1f8(%rbp), %rdi
callq 0x3668
jmp 0x3c52
jmp 0x3c2f
jmp 0x3c43
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0x3668
jmp 0x3c46
jmp 0x3c43
jmp 0x3c43
jmp 0x3c43
movq %rax, %rbx
leaq -0x1f8(%rbp), %rdi
callq 0x3260
movq %rbx, %rdi
callq 0x3590