// File: /workspace/github_cpp_makefile_star2_O2/bothaynahazem[P]AsuMathLabG13/main.cpp
// Function: replaceSin(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
string replaceSin(string s)
{
	if (s.find("sin")!=string::npos)
	{
	    string mat_name ="ST";
		int begin = s.find('(', s.find("sin"));
		int end = s.find(')', begin+1);
		string x1 = s.substr(begin+1 , end-begin-1);
		int lengthOfSin = x1.length()+5;
		int start = (s.find("sin"));
		Matrix Y(evaluate(x1));
		Matrix x;
		x=Matrix::sin(Y);
//		char buffer[100];
//		sprintf(buffer, "%f", x);
//		string xstr = buffer;
        if(x.getn()==1)
		s.replace(start, lengthOfSin+1, x.getAltString());
		else
        {
            variables_names[in_cntr] = mat_name;
            mat_name+="X";
            input_matrices[in_cntr] = x;
            s.replace(start, lengthOfSin+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 0xb3c4(%rip), %rsi      # 0xf06f
movq %r14, %rdi
xorl %edx, %edx
callq 0x35e0
cmpq $-0x1, %rax
je 0x3e21
leaq 0xb3d8(%rip), %rsi      # 0xf09e
leaq -0x48(%rbp), %rdi
leaq -0x150(%rbp), %rdx
callq 0x7844
leaq 0xb392(%rip), %rsi      # 0xf06f
movq %r14, %rdi
xorl %edx, %edx
callq 0x35e0
pushq $0x28
popq %rsi
movq %r14, %rdi
movq %rax, %rdx
callq 0x33e0
movq %rax, %r15
incl %eax
movslq %eax, %r12
pushq $0x29
popq %rsi
movq %r14, %rdi
movq %r12, %rdx
callq 0x33e0
notl %r15d
addl %r15d, %eax
movslq %eax, %rcx
leaq -0x118(%rbp), %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x3360
leaq -0x118(%rbp), %r12
movq 0x8(%r12), %r13
leaq 0xb336(%rip), %rsi      # 0xf06f
movq %r14, %rdi
xorl %edx, %edx
callq 0x35e0
movq %rax, %r15
leaq -0xd8(%rbp), %rdi
movq %r12, %rsi
callq 0x3410
leaq -0xf8(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
callq 0x3f93
leaq -0x150(%rbp), %rdi
leaq -0xf8(%rbp), %rsi
callq 0x8fdc
leaq -0xf8(%rbp), %rdi
callq 0x3170
leaq -0xd8(%rbp), %rdi
callq 0x3170
leaq -0xb8(%rbp), %rdi
callq 0x89d6
leaq -0x80(%rbp), %rdi
leaq -0x150(%rbp), %rsi
callq 0xc9e2
leaq -0x1c0(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
leaq -0x80(%rbp), %rdx
callq 0x9e42
leaq -0x1c0(%rbp), %rdi
callq 0x8a24
leaq -0x80(%rbp), %rdi
callq 0x8a24
movl -0xb4(%rbp), %eax
imull -0xb8(%rbp), %eax
cmpl $0x1, %eax
jne 0x3e37
leaq -0x80(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0x9c7a
addl $0x6, %r13d
movslq %r13d, %rdx
movslq %r15d, %rsi
leaq -0x80(%rbp), %rcx
movq %r14, %rdi
callq 0x3130
leaq -0x80(%rbp), %rdi
callq 0x3170
jmp 0x3ebd
leaq -0x150(%rbp), %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x7844
jmp 0x3ef5
movslq 0x104fa(%rip), %rdi     # 0x14338
shlq $0x5, %rdi
addq 0x104e7(%rip), %rdi     # 0x14330
leaq -0x48(%rbp), %rsi
callq 0x3200
leaq 0xb21a(%rip), %rsi      # 0xf073
leaq -0x48(%rbp), %rdi
callq 0x3590
movslq 0x104cf(%rip), %rax     # 0x14338
imulq $0x38, %rax, %rsi
addq 0x104b4(%rip), %rsi     # 0x14328
leaq -0x188(%rbp), %rdi
leaq -0xb8(%rbp), %rdx
callq 0x9e42
leaq -0x188(%rbp), %rdi
callq 0x8a24
movslq %r15d, %rsi
addl $0x6, %r13d
movslq %r13d, %rdx
movslq 0x10494(%rip), %rcx     # 0x14338
shlq $0x5, %rcx
addq 0x10481(%rip), %rcx     # 0x14330
movq %r14, %rdi
callq 0x3130
incl 0x1047b(%rip)           # 0x14338
movq %rbx, %rdi
movq %r14, %rsi
callq 0x33d0
leaq -0xb8(%rbp), %rdi
callq 0x8a24
leaq -0x150(%rbp), %rdi
callq 0x8a24
leaq -0x118(%rbp), %rdi
callq 0x3170
leaq -0x48(%rbp), %rdi
callq 0x3170
movq %rbx, %rax
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x80(%rbp), %rdi
callq 0x3170
jmp 0x3f5e
jmp 0x3f5b
movq %rax, %rbx
leaq -0x80(%rbp), %rdi
callq 0x8a24
jmp 0x3f5e
jmp 0x3f5b
movq %rax, %rbx
jmp 0x3f6a
movq %rax, %rbx
leaq -0xf8(%rbp), %rdi
callq 0x3170
jmp 0x3f43
movq %rax, %rbx
leaq -0xd8(%rbp), %rdi
callq 0x3170
jmp 0x3f76
movq %rax, %rbx
jmp 0x3f76
movq %rax, %rbx
jmp 0x3f82
movq %rax, %rbx
leaq -0xb8(%rbp), %rdi
callq 0x8a24
leaq -0x150(%rbp), %rdi
callq 0x8a24
leaq -0x118(%rbp), %rdi
callq 0x3170
leaq -0x48(%rbp), %rdi
callq 0x3170
movq %rbx, %rdi
callq 0x3520