// File: 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
subq $0x2f0, %rsp            # imm = 0x2F0
movq %rdx, -0x260(%rbp)
movq %rsi, -0x270(%rbp)
movq %rdi, %rax
movq -0x270(%rbp), %rdi
movq %rax, -0x288(%rbp)
movq %rax, %rcx
movq %rcx, -0x280(%rbp)
movq %rax, -0x8(%rbp)
movq %rdi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
callq 0x4650
movq -0x260(%rbp), %rdi
movq %rax, -0x278(%rbp)
callq 0x4650
movq -0x270(%rbp), %rdi
movq %rax, %rcx
movq -0x278(%rbp), %rax
subq %rcx, %rax
movl %eax, -0x1c(%rbp)
movslq -0x1c(%rbp), %rax
movq %rax, -0x268(%rbp)
callq 0x4650
movq -0x270(%rbp), %rsi
movq -0x268(%rbp), %rdx
movq %rax, %rcx
leaq -0x40(%rbp), %rdi
callq 0x4460
movq -0x260(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0xa2a0
movb %al, %cl
movb $0x0, -0x6d(%rbp)
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x251(%rbp)
jne 0x4e3e
jmp 0x4eb0
movq -0x270(%rbp), %rdi
callq 0x4650
movq %rax, %rcx
xorl %eax, %eax
cmpq $0x2, %rcx
movb %al, -0x251(%rbp)
jbe 0x4eb0
movq -0x260(%rbp), %rdi
callq 0x4650
movq %rax, %rcx
xorl %eax, %eax
cmpq $0x2, %rcx
movb %al, -0x251(%rbp)
jbe 0x4eb0
movq -0x270(%rbp), %rsi
movl -0x1c(%rbp), %eax
incl %eax
movslq %eax, %rcx
xorl %eax, %eax
movl %eax, %edx
leaq -0x60(%rbp), %rdi
callq 0x4460
jmp 0x4e96
movq -0x260(%rbp), %rsi
movb $0x1, -0x6d(%rbp)
leaq -0x60(%rbp), %rdi
callq 0xa330
movb %al, -0x251(%rbp)
movb -0x251(%rbp), %al
movb %al, -0x289(%rbp)
testb $0x1, -0x6d(%rbp)
jne 0x4ec4
jmp 0x4ecd
leaq -0x60(%rbp), %rdi
callq 0x48b8
leaq -0x40(%rbp), %rdi
callq 0x48b8
movb -0x289(%rbp), %al
testb $0x1, %al
jne 0x4ee2
jmp 0x4f1c
movq -0x270(%rbp), %rsi
movq -0x288(%rbp), %rdi
movslq -0x1c(%rbp), %rcx
xorl %eax, %eax
movl %eax, %edx
callq 0x4460
jmp 0x525a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x48b8
jmp 0x526a
leaq -0x1f8(%rbp), %rdi
callq 0x4310
movq -0x270(%rbp), %rdi
movl $0x0, -0x1fc(%rbp)
callq 0x4650
subq $0x1, %rax
movl %eax, -0x200(%rbp)
movl $0x0, -0x204(%rbp)
movq -0x260(%rbp), %rdi
movslq -0x204(%rbp), %rax
movq %rax, -0x298(%rbp)
callq 0x4650
movq %rax, %rcx
movq -0x298(%rbp), %rax
cmpq %rcx, %rax
jae 0x5015
movq -0x270(%rbp), %rdi
movslq -0x204(%rbp), %rsi
callq 0x4850
movq %rax, -0x2a0(%rbp)
jmp 0x4f9b
movq -0x260(%rbp), %rdi
movq -0x2a0(%rbp), %rax
movsbl (%rax), %eax
movl %eax, -0x2ac(%rbp)
movslq -0x204(%rbp), %rsi
callq 0x4850
movq %rax, -0x2a8(%rbp)
jmp 0x4fc7
movl -0x2ac(%rbp), %eax
movq -0x2a8(%rbp), %rcx
movsbl (%rcx), %ecx
cmpl %ecx, %eax
jne 0x4ffd
movl -0x1fc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1fc(%rbp)
jmp 0x4fff
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x524c
jmp 0x5015
jmp 0x5001
movl -0x204(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x204(%rbp)
jmp 0x4f52
movq -0x260(%rbp), %rdi
movslq -0x1fc(%rbp), %rax
movq %rax, -0x2b8(%rbp)
callq 0x4650
movq %rax, %rcx
movq -0x2b8(%rbp), %rax
cmpq %rcx, %rax
jne 0x50d6
movq -0x270(%rbp), %rdi
leaq -0x1e8(%rbp), %rax
movq %rax, -0x2c8(%rbp)
movslq -0x1fc(%rbp), %rax
movq %rax, -0x2c0(%rbp)
callq 0x4650
movq -0x270(%rbp), %rsi
movq -0x2c0(%rbp), %rdx
movq %rax, %rcx
movslq -0x1fc(%rbp), %rax
subq %rax, %rcx
leaq -0x228(%rbp), %rdi
callq 0x4460
jmp 0x5093
movq -0x2c8(%rbp), %rdi
leaq -0x228(%rbp), %rsi
callq 0x43c0
jmp 0x50a8
leaq -0x228(%rbp), %rdi
callq 0x48b8
jmp 0x5229
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x228(%rbp), %rdi
callq 0x48b8
jmp 0x524c
movq -0x260(%rbp), %rdi
callq 0x4650
movq -0x270(%rbp), %rdi
subq $0x1, %rax
movl %eax, -0x22c(%rbp)
callq 0x4650
subq $0x1, %rax
movl %eax, -0x230(%rbp)
cmpl $0x0, -0x22c(%rbp)
jle 0x51b3
movq -0x270(%rbp), %rdi
movslq -0x230(%rbp), %rsi
callq 0x4850
movq %rax, -0x2d0(%rbp)
jmp 0x512b
movq -0x260(%rbp), %rdi
movq -0x2d0(%rbp), %rax
movsbl (%rax), %eax
movl %eax, -0x2dc(%rbp)
movslq -0x22c(%rbp), %rsi
callq 0x4850
movq %rax, -0x2d8(%rbp)
jmp 0x5157
movl -0x2dc(%rbp), %eax
movq -0x2d8(%rbp), %rcx
movsbl (%rcx), %ecx
cmpl %ecx, %eax
jne 0x518c
movl -0x200(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x200(%rbp)
movl -0x22c(%rbp), %eax
cmpl -0x1fc(%rbp), %eax
jg 0x518a
jmp 0x51b3
jmp 0x518e
jmp 0x51b3
jmp 0x5190
movl -0x22c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x22c(%rbp)
movl -0x230(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x230(%rbp)
jmp 0x5102
movq -0x270(%rbp), %rsi
leaq -0x1e8(%rbp), %rax
movq %rax, -0x2e8(%rbp)
movslq -0x1fc(%rbp), %rdx
movl %edx, %ecx
movl -0x200(%rbp), %eax
subl %ecx, %eax
incl %eax
movslq %eax, %rcx
leaq -0x250(%rbp), %rdi
callq 0x4460
jmp 0x51ec
movq -0x2e8(%rbp), %rdi
leaq -0x250(%rbp), %rsi
callq 0x43c0
jmp 0x5201
leaq -0x250(%rbp), %rdi
callq 0x48b8
jmp 0x5229
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x250(%rbp), %rdi
callq 0x48b8
jmp 0x524c
movq -0x288(%rbp), %rdi
leaq -0x1f8(%rbp), %rsi
callq 0x4420
jmp 0x523e
leaq -0x1f8(%rbp), %rdi
callq 0x4330
jmp 0x525a
leaq -0x1f8(%rbp), %rdi
callq 0x4330
jmp 0x526a
movq -0x280(%rbp), %rax
addq $0x2f0, %rsp            # imm = 0x2F0
popq %rbp
retq
movq -0x68(%rbp), %rdi
callq 0x4770
nopw %cs:(%rax,%rax)