// File: /workspace/github_cpp_makefile_star2_O2/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 0x89d6
movq (%r12), %rax
movzbl (%rax), %ecx
addl $-0x2a, %ecx
cmpl $0x5, %ecx
ja 0x6365
leaq 0x8d85(%rip), %rdx      # 0xf004
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
leaq -0x58(%rbp), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0xabf0
leaq -0x300(%rbp), %rdi
leaq -0x58(%rbp), %rdx
movq %rbx, %rsi
callq 0x9e42
leaq -0x300(%rbp), %rdi
jmp 0x65c1
movzbl 0x1(%rax), %ecx
leal -0x2a(%rcx), %eax
cmpl $0x5, %eax
ja 0x6432
leaq 0x8d4f(%rip), %rcx      # 0xf01c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %r15, %rdi
callq 0xbbca
leaq -0x58(%rbp), %rdi
movq %r14, %rsi
callq 0xac28
leaq -0x178(%rbp), %rdi
leaq -0x58(%rbp), %rdx
movq %rbx, %rsi
callq 0x9e42
leaq -0x178(%rbp), %rdi
jmp 0x65c1
leaq -0x58(%rbp), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0xa1b6
leaq -0x370(%rbp), %rdi
leaq -0x58(%rbp), %rdx
movq %rbx, %rsi
callq 0x9e42
leaq -0x370(%rbp), %rdi
jmp 0x65c1
leaq -0x58(%rbp), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0xa560
leaq -0x338(%rbp), %rdi
leaq -0x58(%rbp), %rdx
movq %rbx, %rsi
callq 0x9e42
leaq -0x338(%rbp), %rdi
jmp 0x65c1
movl 0x4(%r15), %eax
imull (%r15), %eax
cmpl $0x1, %eax
jne 0x65cf
movl 0x4(%r14), %eax
imull (%r14), %eax
cmpl $0x1, %eax
jne 0x647f
movq %r14, %rdi
callq 0xbbca
movsd %xmm0, -0x60(%rbp)
movq %r15, %rdi
callq 0xbbca
movaps %xmm0, %xmm1
movsd -0x60(%rbp), %xmm0
callq 0x34f0
leaq -0x258(%rbp), %rdi
movq %rbx, %rsi
callq 0x9a62
leaq -0x258(%rbp), %rdi
jmp 0x65ca
movl 0x4(%r15), %eax
imull (%r15), %eax
cmpl $0x1, %eax
jne 0x6404
movq %r15, %rdi
callq 0xbf54
leaq -0x58(%rbp), %rdi
movq %r14, %rsi
callq 0xade4
leaq -0x290(%rbp), %rdi
leaq -0x58(%rbp), %rdx
movq %rbx, %rsi
callq 0x9e42
leaq -0x290(%rbp), %rdi
jmp 0x65c1
leaq -0x58(%rbp), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0xacf6
leaq -0x2c8(%rbp), %rdi
leaq -0x58(%rbp), %rdx
movq %rbx, %rsi
callq 0x9e42
leaq -0x2c8(%rbp), %rdi
jmp 0x65c1
cmpl $0x5e, %ecx
jne 0x65cf
movl 0x4(%r15), %eax
imull (%r15), %eax
cmpl $0x1, %eax
jne 0x65cf
movq %r15, %rdi
callq 0xbbca
leaq -0x58(%rbp), %rdi
movq %r14, %rsi
callq 0xda00
leaq -0x98(%rbp), %rdi
leaq -0x58(%rbp), %rdx
movq %rbx, %rsi
callq 0x9e42
leaq -0x98(%rbp), %rdi
jmp 0x65c1
movq %r15, %rdi
callq 0xbbca
leaq -0x58(%rbp), %rdi
movq %r14, %rsi
callq 0xdb5a
leaq -0x220(%rbp), %rdi
leaq -0x58(%rbp), %rdx
movq %rbx, %rsi
callq 0x9e42
leaq -0x220(%rbp), %rdi
jmp 0x65c1
movq %r15, %rdi
callq 0xbbca
leaq -0x58(%rbp), %rdi
movq %r14, %rsi
callq 0xa598
leaq -0x1b0(%rbp), %rdi
leaq -0x58(%rbp), %rdx
movq %rbx, %rsi
callq 0x9e42
leaq -0x1b0(%rbp), %rdi
jmp 0x65c1
movl 0x4(%r15), %eax
imull (%r15), %eax
cmpl $0x1, %eax
jne 0x6555
movq %r15, %rdi
callq 0xbbca
leaq -0x58(%rbp), %rdi
movq %r14, %rsi
callq 0xade4
leaq -0x140(%rbp), %rdi
leaq -0x58(%rbp), %rdx
movq %rbx, %rsi
callq 0x9e42
leaq -0x140(%rbp), %rdi
jmp 0x65c1
movq %r15, %rdi
callq 0xbbca
leaq -0x58(%rbp), %rdi
movq %r14, %rsi
callq 0xa1ee
leaq -0x1e8(%rbp), %rdi
leaq -0x58(%rbp), %rdx
movq %rbx, %rsi
callq 0x9e42
leaq -0x1e8(%rbp), %rdi
jmp 0x65c1
movl 0x4(%r14), %eax
imull (%r14), %eax
cmpl $0x1, %eax
jne 0x6595
movq %r14, %rdi
callq 0xbbca
leaq -0x58(%rbp), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0xc274
leaq -0x108(%rbp), %rdi
leaq -0x58(%rbp), %rdx
movq %rbx, %rsi
callq 0x9e42
leaq -0x108(%rbp), %rdi
jmp 0x65c1
leaq -0x58(%rbp), %rdi
movq %r14, %rsi
movq %r14, %rdx
movq %r15, %rcx
callq 0xc3f2
leaq -0xd0(%rbp), %rdi
leaq -0x58(%rbp), %rdx
movq %rbx, %rsi
callq 0x9e42
leaq -0xd0(%rbp), %rdi
callq 0x8a24
leaq -0x58(%rbp), %rdi
callq 0x8a24
movq %rbx, %rax
addq $0x350, %rsp            # imm = 0x350
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x660e
jmp 0x660e
jmp 0x6622
jmp 0x660e
jmp 0x660e
jmp 0x6622
jmp 0x6622
jmp 0x660e
jmp 0x660e
jmp 0x660e
jmp 0x6622
jmp 0x660e
jmp 0x6622
jmp 0x6622
jmp 0x6622
jmp 0x660e
jmp 0x660e
jmp 0x6622
jmp 0x6622
jmp 0x6622
jmp 0x660e
jmp 0x660e
movq %rax, %r14
leaq -0x58(%rbp), %rdi
callq 0x8a24
jmp 0x6625
jmp 0x6622
jmp 0x6622
jmp 0x6622
movq %rax, %r14
movq %rbx, %rdi
callq 0x8a24
movq %r14, %rdi
callq 0x3520