// File: /workspace/github_cpp_makefile_star2_O3/bothaynahazem[P]AsuMathLabG13/main.cpp
// Function: solve(Matrix, Matrix, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
Matrix solve(Matrix op1,Matrix op2, string ch)
{
    Matrix X;
	switch (ch[0])
	{
	case '+':
	    X = op1+op2;
	     return X;
	case '-': X = op1-op2;
	     return X;
	case '*': X = op1*op2;
	     return X;
	case '/': if(op2.getn()!=1) X = op1.div(op2);
              else X = op1/op2.getdDeterminant();
         return X;
	case '^': if (op2.getn()==1 && op1.getn()==1)
        X = pow(op1.getDeterminant(),op2.getDeterminant());
        else if(op2.getn()==1)
	    X = Matrix::pow(op1,op2.getDeterminant());
	    return X;
    case '.': if(ch[1]=='+') X = op1+op2.getDeterminant();
	else if(ch[1]=='-') X = op1-op2.getDeterminant();
    else if(ch[1]=='*') X = op1*op2.getDeterminant();
    else if(ch[1]=='/')if(op2.getn()==1) X = op1/op2.getDeterminant();
                        else if(op1.getn()==1) X = op1.rdivide(op1.getDeterminant(),op2);
                        else X = op1.rdivide(op1,op2);
    else if(ch[1]=='^') if (op2.getn()==1)
        X = Matrix::rpow(op1,op2.getDeterminant());
    return X;

	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x350, %rsp            # imm = 0x350
movq %rcx, %r12
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
callq 0xa11a
movq (%r12), %rax
movzbl (%rax), %ecx
addl $-0x2a, %ecx
cmpl $0x5, %ecx
ja 0x742a
leaq 0x9cc0(%rip), %rdx      # 0x11004
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
leaq -0x58(%rbp), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0xc87c
leaq -0x300(%rbp), %rdi
leaq -0x58(%rbp), %rdx
movq %rbx, %rsi
callq 0xb8f2
leaq -0x300(%rbp), %rdi
jmp 0x7686
movzbl 0x1(%rax), %ecx
leal -0x2a(%rcx), %eax
cmpl $0x5, %eax
ja 0x74f7
leaq 0x9c8a(%rip), %rcx      # 0x1101c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %r15, %rdi
callq 0xd9be
leaq -0x58(%rbp), %rdi
movq %r14, %rsi
callq 0xc8b4
leaq -0x178(%rbp), %rdi
leaq -0x58(%rbp), %rdx
movq %rbx, %rsi
callq 0xb8f2
leaq -0x178(%rbp), %rdi
jmp 0x7686
leaq -0x58(%rbp), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0xbce4
leaq -0x370(%rbp), %rdi
leaq -0x58(%rbp), %rdx
movq %rbx, %rsi
callq 0xb8f2
leaq -0x370(%rbp), %rdi
jmp 0x7686
leaq -0x58(%rbp), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0xc0ec
leaq -0x338(%rbp), %rdi
leaq -0x58(%rbp), %rdx
movq %rbx, %rsi
callq 0xb8f2
leaq -0x338(%rbp), %rdi
jmp 0x7686
movl 0x4(%r15), %eax
imull (%r15), %eax
cmpl $0x1, %eax
jne 0x7694
movl 0x4(%r14), %eax
imull (%r14), %eax
cmpl $0x1, %eax
jne 0x7544
movq %r14, %rdi
callq 0xd9be
movsd %xmm0, -0x60(%rbp)
movq %r15, %rdi
callq 0xd9be
movaps %xmm0, %xmm1
movsd -0x60(%rbp), %xmm0
callq 0x34f0
leaq -0x258(%rbp), %rdi
movq %rbx, %rsi
callq 0xb47a
leaq -0x258(%rbp), %rdi
jmp 0x768f
movl 0x4(%r15), %eax
imull (%r15), %eax
cmpl $0x1, %eax
jne 0x74c9
movq %r15, %rdi
callq 0xdd76
leaq -0x58(%rbp), %rdi
movq %r14, %rsi
callq 0xcab6
leaq -0x290(%rbp), %rdi
leaq -0x58(%rbp), %rdx
movq %rbx, %rsi
callq 0xb8f2
leaq -0x290(%rbp), %rdi
jmp 0x7686
leaq -0x58(%rbp), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0xc9be
leaq -0x2c8(%rbp), %rdi
leaq -0x58(%rbp), %rdx
movq %rbx, %rsi
callq 0xb8f2
leaq -0x2c8(%rbp), %rdi
jmp 0x7686
cmpl $0x5e, %ecx
jne 0x7694
movl 0x4(%r15), %eax
imull (%r15), %eax
cmpl $0x1, %eax
jne 0x7694
movq %r15, %rdi
callq 0xd9be
leaq -0x58(%rbp), %rdi
movq %r14, %rsi
callq 0xfc74
leaq -0x98(%rbp), %rdi
leaq -0x58(%rbp), %rdx
movq %rbx, %rsi
callq 0xb8f2
leaq -0x98(%rbp), %rdi
jmp 0x7686
movq %r15, %rdi
callq 0xd9be
leaq -0x58(%rbp), %rdi
movq %r14, %rsi
callq 0xfe06
leaq -0x220(%rbp), %rdi
leaq -0x58(%rbp), %rdx
movq %rbx, %rsi
callq 0xb8f2
leaq -0x220(%rbp), %rdi
jmp 0x7686
movq %r15, %rdi
callq 0xd9be
leaq -0x58(%rbp), %rdi
movq %r14, %rsi
callq 0xc124
leaq -0x1b0(%rbp), %rdi
leaq -0x58(%rbp), %rdx
movq %rbx, %rsi
callq 0xb8f2
leaq -0x1b0(%rbp), %rdi
jmp 0x7686
movl 0x4(%r15), %eax
imull (%r15), %eax
cmpl $0x1, %eax
jne 0x761a
movq %r15, %rdi
callq 0xd9be
leaq -0x58(%rbp), %rdi
movq %r14, %rsi
callq 0xcab6
leaq -0x140(%rbp), %rdi
leaq -0x58(%rbp), %rdx
movq %rbx, %rsi
callq 0xb8f2
leaq -0x140(%rbp), %rdi
jmp 0x7686
movq %r15, %rdi
callq 0xd9be
leaq -0x58(%rbp), %rdi
movq %r14, %rsi
callq 0xbd1c
leaq -0x1e8(%rbp), %rdi
leaq -0x58(%rbp), %rdx
movq %rbx, %rsi
callq 0xb8f2
leaq -0x1e8(%rbp), %rdi
jmp 0x7686
movl 0x4(%r14), %eax
imull (%r14), %eax
cmpl $0x1, %eax
jne 0x765a
movq %r14, %rdi
callq 0xd9be
leaq -0x58(%rbp), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0xe0f0
leaq -0x108(%rbp), %rdi
leaq -0x58(%rbp), %rdx
movq %rbx, %rsi
callq 0xb8f2
leaq -0x108(%rbp), %rdi
jmp 0x7686
leaq -0x58(%rbp), %rdi
movq %r14, %rsi
movq %r14, %rdx
movq %r15, %rcx
callq 0xe29c
leaq -0xd0(%rbp), %rdi
leaq -0x58(%rbp), %rdx
movq %rbx, %rsi
callq 0xb8f2
leaq -0xd0(%rbp), %rdi
callq 0xa186
leaq -0x58(%rbp), %rdi
callq 0xa186
movq %rbx, %rax
addq $0x350, %rsp            # imm = 0x350
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x76d3
jmp 0x76d3
jmp 0x76e7
jmp 0x76d3
jmp 0x76d3
jmp 0x76e7
jmp 0x76e7
jmp 0x76d3
jmp 0x76d3
jmp 0x76d3
jmp 0x76e7
jmp 0x76d3
jmp 0x76e7
jmp 0x76e7
jmp 0x76e7
jmp 0x76d3
jmp 0x76d3
jmp 0x76e7
jmp 0x76e7
jmp 0x76e7
jmp 0x76d3
jmp 0x76d3
movq %rax, %r14
leaq -0x58(%rbp), %rdi
callq 0xa186
jmp 0x76ea
jmp 0x76e7
jmp 0x76e7
jmp 0x76e7
movq %rax, %r14
movq %rbx, %rdi
callq 0xa186
movq %r14, %rdi
callq 0x3520