// File: /workspace/github_cpp_makefile_star2_O1/bothaynahazem[P]AsuMathLabG13/main.cpp
// Function: replaceExp(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
string replaceExp(string s)
{
	if (s.find("exp") != string::npos)
	{
	    string mat_name ="ET";
		int begin = s.find('(', s.find("exp"));
		int end = s.find(')', begin+1);
		string x1 = s.substr(begin+1 , end-begin-1);
		int lengthOfExp = x1.length()+5;
		int start = (s.find("exp"));
		Matrix Y(evaluate(x1));
		Matrix x;
		x=Matrix::exp(Y);
//		char buffer[100];
//		sprintf(buffer, "%f", x);
//		string xstr = buffer;
        if(x.getn()==1)
		s.replace(start, lengthOfExp+1, x.getAltString());
		else
        {
            variables_names[in_cntr] = mat_name;
            mat_name+="X";
            input_matrices[in_cntr] = x;
            s.replace(start, lengthOfExp+1, variables_names[in_cntr]);
            in_cntr++;
        }
        return s;
	}
	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x198, %rsp            # imm = 0x198
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xa5f6(%rip), %rsi      # 0x11091
movl $0x3, %ecx
movq %r14, %rdi
xorl %edx, %edx
callq 0x34e0
cmpq $-0x1, %rax
je 0x6dab
leaq -0x38(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0xa5d2(%rip), %rsi      # 0x11095
leaq 0xa5cd(%rip), %rdx      # 0x11097
leaq -0x48(%rbp), %rdi
callq 0x9334
leaq 0xa5b7(%rip), %rsi      # 0x11091
movl $0x3, %ecx
movq %r14, %rdi
xorl %edx, %edx
callq 0x34e0
movq %r14, %rdi
movl $0x28, %esi
movq %rax, %rdx
callq 0x33b0
movq %rax, %r15
incl %eax
movslq %eax, %r12
movq %r14, %rdi
movl $0x29, %esi
movq %r12, %rdx
callq 0x33b0
notl %r15d
addl %r15d, %eax
movslq %eax, %rcx
leaq -0x68(%rbp), %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x3320
movq -0x60(%rbp), %r12
leaq 0xa55d(%rip), %rsi      # 0x11091
movl $0x3, %ecx
movq %r14, %rdi
xorl %edx, %edx
callq 0x34e0
movq %rax, %r15
leaq -0x78(%rbp), %r13
movq %r13, -0x10(%r13)
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
addq %rsi, %rdx
leaq -0x88(%rbp), %rdi
callq 0x929a
leaq -0xe0(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x4262
leaq -0x150(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
callq 0xa768
leaq -0xd0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6baa
movq -0xd0(%rbp), %rsi
incq %rsi
callq 0x3300
movq -0x88(%rbp), %rdi
cmpq %r13, %rdi
je 0x6bc2
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x3300
leaq -0x118(%rbp), %rdi
callq 0xa052
leaq -0xc0(%rbp), %rdi
leaq -0x150(%rbp), %rsi
callq 0xf72e
leaq -0x1c0(%rbp), %rdi
leaq -0x118(%rbp), %rsi
leaq -0xc0(%rbp), %rdx
callq 0xb80c
leaq -0x1c0(%rbp), %rdi
callq 0xa0be
leaq -0xc0(%rbp), %rdi
callq 0xa0be
movl -0x114(%rbp), %eax
imull -0x118(%rbp), %eax
cmpl $0x1, %eax
jne 0x6c80
leaq -0xc0(%rbp), %rdi
leaq -0x118(%rbp), %rsi
callq 0xb5ea
addl $0x6, %r12d
movslq %r12d, %rdx
movslq %r15d, %rsi
movq -0xc0(%rbp), %rcx
movq -0xb8(%rbp), %r8
movq %r14, %rdi
callq 0x3330
leaq -0xb0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6d0f
movq -0xb0(%rbp), %rsi
incq %rsi
callq 0x3300
jmp 0x6d0f
movslq 0xf6a1(%rip), %rdi      # 0x16328
shlq $0x5, %rdi
addq 0xf68e(%rip), %rdi      # 0x16320
leaq -0x48(%rbp), %rsi
callq 0x31c0
leaq 0xa3d1(%rip), %rsi      # 0x11073
leaq -0x48(%rbp), %rdi
callq 0x3590
movslq 0xf676(%rip), %rax      # 0x16328
imulq $0x38, %rax, %rsi
addq 0xf65b(%rip), %rsi      # 0x16318
leaq -0x188(%rbp), %rdi
leaq -0x118(%rbp), %rdx
callq 0xb80c
leaq -0x188(%rbp), %rdi
callq 0xa0be
movslq %r15d, %rsi
addl $0x6, %r12d
movslq %r12d, %rdx
movq 0xf633(%rip), %rax      # 0x16320
movslq 0xf634(%rip), %rdi      # 0x16328
shlq $0x5, %rdi
movq (%rax,%rdi), %rcx
movq 0x8(%rax,%rdi), %r8
movq %r14, %rdi
callq 0x3330
incl 0xf619(%rip)            # 0x16328
leaq 0x10(%rbx), %rcx
movq %rcx, (%rbx)
movq (%r14), %rdx
leaq 0x10(%r14), %rax
cmpq %rax, %rdx
je 0x6d2e
movq %rdx, (%rbx)
movq (%rax), %rcx
movq %rcx, 0x10(%rbx)
jmp 0x6d34
movups (%rax), %xmm0
movups %xmm0, (%rcx)
movq 0x8(%r14), %rcx
movq %rcx, 0x8(%rbx)
movq %rax, (%r14)
movq $0x0, 0x8(%r14)
movb $0x0, 0x10(%r14)
leaq -0x118(%rbp), %rdi
callq 0xa0be
leaq -0x150(%rbp), %rdi
callq 0xa0be
leaq -0x58(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6d7d
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x3300
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x6d96
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x3300
movq %rbx, %rax
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0xa33d(%rip), %rdi      # 0x110f6
callq 0x3220
movq %rax, %rbx
leaq -0xb0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6e4a
movq -0xb0(%rbp), %rsi
incq %rsi
callq 0x3300
jmp 0x6e4a
jmp 0x6e47
movq %rax, %rbx
leaq -0xc0(%rbp), %rdi
callq 0xa0be
jmp 0x6e4a
jmp 0x6e47
movq %rax, %rbx
jmp 0x6e56
movq %rax, %rbx
leaq -0xd0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6e23
movq -0xd0(%rbp), %rsi
incq %rsi
callq 0x3300
jmp 0x6e23
movq %rax, %rbx
movq -0x88(%rbp), %rdi
cmpq %r13, %rdi
je 0x6e62
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x3300
jmp 0x6e62
movq %rax, %rbx
jmp 0x6e62
movq %rax, %rbx
jmp 0x6e7b
movq %rax, %rbx
leaq -0x118(%rbp), %rdi
callq 0xa0be
leaq -0x150(%rbp), %rdi
callq 0xa0be
leaq -0x58(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6e7b
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x3300
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x6e94
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x3300
movq %rbx, %rdi
callq 0x3520