// File: /workspace/github_cpp_makefile_star2_O1/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, %r15
movq %rsi, %r14
movq %rdi, -0x30(%rbp)
movq 0x8(%rsi), %rcx
movq %rcx, %r12
subq 0x8(%rdx), %r12
movslq %r12d, %rdx
leaq -0x200(%rbp), %rbx
movq %rbx, %rdi
movq %rdx, -0x58(%rbp)
callq 0x3360
movq 0x8(%r15), %r13
cmpq 0x8(%rbx), %r13
jne 0x3ae0
testq %r13, %r13
je 0x3ba5
movq -0x200(%rbp), %rsi
movq (%r15), %rdi
movq %r13, %rdx
callq 0x3350
testl %eax, %eax
je 0x3ba5
xorl %ebx, %ebx
xorl %r13d, %r13d
testb %bl, %bl
je 0x3afb
leaq -0x68(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3afb
callq 0x32f0
leaq -0x1f0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3b10
callq 0x32f0
testb %r13b, %r13b
je 0x3b2f
movq -0x30(%rbp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
movq -0x58(%rbp), %rcx
callq 0x3360
jmp 0x3ccd
leaq -0x200(%rbp), %rdi
callq 0x3230
movq 0x8(%r14), %rcx
movq 0x8(%r15), %rax
xorl %edx, %edx
testq %rax, %rax
je 0x3b6e
cmpq %rdx, %rcx
je 0x3cea
movq (%r14), %rsi
movb (%rsi,%rdx), %sil
movq (%r15), %rdi
cmpb (%rdi,%rdx), %sil
jne 0x3b6e
incq %rdx
cmpq %rdx, %rax
jne 0x3b4a
movq %rax, %rdx
movl %edx, %edx
cmpq %rdx, %rax
jne 0x3c15
subq %rdx, %rcx
leaq -0x50(%rbp), %rdi
movq %r14, %rsi
callq 0x3360
leaq -0x1f0(%rbp), %rdi
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
callq 0x33a0
movq -0x30(%rbp), %rbx
jmp 0x3c8d
xorl %ebx, %ebx
cmpq $0x3, %r13
jb 0x3ae2
cmpq $0x3, 0x8(%r14)
movl $0x0, %r13d
jb 0x3ae5
shlq $0x20, %r12
movabsq $0x100000000, %rcx      # imm = 0x100000000
addq %r12, %rcx
sarq $0x20, %rcx
leaq -0x78(%rbp), %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x3360
movq -0x70(%rbp), %rdx
movb $0x1, %bl
cmpq 0x8(%r15), %rdx
jne 0x3ce2
testq %rdx, %rdx
je 0x3ae2
movq (%r15), %rsi
movq -0x78(%rbp), %rdi
callq 0x3350
testl %eax, %eax
setne %r13b
jmp 0x3ae5
leal -0x1(%rcx), %edi
movl %eax, %r8d
decq %r8
movl %eax, %r9d
decl %r9d
testl %r9d, %r9d
jle 0x3c62
movslq %edi, %rsi
cmpq %rsi, %rcx
jbe 0x3d04
movl %r8d, %r10d
andl $0x7fffffff, %r10d      # imm = 0x7FFFFFFF
cmpq %r10, %rax
jbe 0x3cfe
movq (%r14), %r11
movb (%r11,%rsi), %sil
movq (%r15), %r11
cmpb (%r11,%r10), %sil
jne 0x3c62
decl %edi
decq %r8
cmpl %r9d, %edx
jl 0x3c21
subl %edx, %edi
incl %edi
movslq %edi, %rcx
leaq -0x50(%rbp), %rdi
movq %r14, %rsi
callq 0x3360
leaq -0x1f0(%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 0x3c9f
callq 0x32f0
leaq -0x1e8(%rbp), %rsi
movq %rbx, %rdi
callq 0x34f0
movq 0x122f3(%rip), %rsi     # 0x15fa8
leaq -0x200(%rbp), %rdi
callq 0x3260
leaq -0x180(%rbp), %rdi
callq 0x3120
movq %rbx, %rax
addq $0x1d8, %rsp            # imm = 0x1D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movb $0x1, %r13b
jmp 0x3ae5
leaq 0xda1a(%rip), %rdi      # 0x1170b
movq %rcx, %rsi
movq %rcx, %rdx
xorl %eax, %eax
callq 0x34b0
movq %r10, %rsi
movq %rax, %rcx
leaq 0xda00(%rip), %rdi      # 0x1170b
movq %rcx, %rdx
xorl %eax, %eax
callq 0x34b0
movq %rax, %rbx
leaq -0x1f0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3d72
callq 0x32f0
jmp 0x3d72
jmp 0x3d33
jmp 0x3d50
movq %rax, %rbx
leaq -0x40(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3d53
callq 0x32f0
jmp 0x3d53
jmp 0x3d50
jmp 0x3d50
jmp 0x3d50
movq %rax, %rbx
movq 0x1224e(%rip), %rsi     # 0x15fa8
leaq -0x200(%rbp), %rdi
callq 0x3260
leaq -0x180(%rbp), %rdi
callq 0x3120
movq %rbx, %rdi
callq 0x35b0