// File: /workspace/github_cpp_makefile_star2_O1/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 0xa052
movq (%r12), %rax
movzbl (%rax), %ecx
addl $-0x2a, %ecx
cmpl $0x5, %ecx
ja 0x743f
leaq 0x9cab(%rip), %rdx      # 0x11004
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
leaq -0x58(%rbp), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0xc780
leaq -0x300(%rbp), %rdi
leaq -0x58(%rbp), %rdx
movq %rbx, %rsi
callq 0xb80c
leaq -0x300(%rbp), %rdi
jmp 0x76a4
movzbl 0x1(%rax), %ecx
leal -0x2a(%rcx), %eax
cmpl $0x5, %eax
ja 0x750c
leaq 0x9c75(%rip), %rcx      # 0x1101c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %r15, %rdi
callq 0xd896
leaq -0x58(%rbp), %rdi
movq %r14, %rsi
callq 0xc7b8
leaq -0x178(%rbp), %rdi
leaq -0x58(%rbp), %rdx
movq %rbx, %rsi
callq 0xb80c
leaq -0x178(%rbp), %rdi
jmp 0x76a4
leaq -0x58(%rbp), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0xbc00
leaq -0x370(%rbp), %rdi
leaq -0x58(%rbp), %rdx
movq %rbx, %rsi
callq 0xb80c
leaq -0x370(%rbp), %rdi
jmp 0x76a4
leaq -0x58(%rbp), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0xbffc
leaq -0x338(%rbp), %rdi
leaq -0x58(%rbp), %rdx
movq %rbx, %rsi
callq 0xb80c
leaq -0x338(%rbp), %rdi
jmp 0x76a4
movl 0x4(%r15), %eax
imull (%r15), %eax
cmpl $0x1, %eax
jne 0x76b2
movl 0x4(%r14), %ecx
imull (%r14), %ecx
cmpl $0x1, %ecx
jne 0x7559
movq %r14, %rdi
callq 0xd896
movsd %xmm0, -0x60(%rbp)
movq %r15, %rdi
callq 0xd896
movaps %xmm0, %xmm1
movsd -0x60(%rbp), %xmm0
callq 0x34f0
leaq -0x258(%rbp), %rdi
movq %rbx, %rsi
callq 0xb3a0
leaq -0x258(%rbp), %rdi
jmp 0x76ad
movl 0x4(%r15), %eax
imull (%r15), %eax
cmpl $0x1, %eax
jne 0x74de
movq %r15, %rdi
callq 0xdc52
leaq -0x58(%rbp), %rdi
movq %r14, %rsi
callq 0xc9ba
leaq -0x290(%rbp), %rdi
leaq -0x58(%rbp), %rdx
movq %rbx, %rsi
callq 0xb80c
leaq -0x290(%rbp), %rdi
jmp 0x76a4
leaq -0x58(%rbp), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0xc8c2
leaq -0x2c8(%rbp), %rdi
leaq -0x58(%rbp), %rdx
movq %rbx, %rsi
callq 0xb80c
leaq -0x2c8(%rbp), %rdi
jmp 0x76a4
cmpl $0x5e, %ecx
jne 0x76b2
movl 0x4(%r15), %eax
imull (%r15), %eax
cmpl $0x1, %eax
jne 0x76b2
movq %r15, %rdi
callq 0xd896
leaq -0x58(%rbp), %rdi
movq %r14, %rsi
callq 0xfad0
leaq -0x98(%rbp), %rdi
leaq -0x58(%rbp), %rdx
movq %rbx, %rsi
callq 0xb80c
leaq -0x98(%rbp), %rdi
jmp 0x76a4
cmpl $0x1, %eax
jne 0x76b2
movq %r15, %rdi
callq 0xd896
leaq -0x58(%rbp), %rdi
movq %r14, %rsi
callq 0xfc56
leaq -0x220(%rbp), %rdi
leaq -0x58(%rbp), %rdx
movq %rbx, %rsi
callq 0xb80c
leaq -0x220(%rbp), %rdi
jmp 0x76a4
movq %r15, %rdi
callq 0xd896
leaq -0x58(%rbp), %rdi
movq %r14, %rsi
callq 0xc034
leaq -0x1b0(%rbp), %rdi
leaq -0x58(%rbp), %rdx
movq %rbx, %rsi
callq 0xb80c
leaq -0x1b0(%rbp), %rdi
jmp 0x76a4
movl 0x4(%r15), %eax
imull (%r15), %eax
cmpl $0x1, %eax
jne 0x7638
movq %r15, %rdi
callq 0xd896
leaq -0x58(%rbp), %rdi
movq %r14, %rsi
callq 0xc9ba
leaq -0x140(%rbp), %rdi
leaq -0x58(%rbp), %rdx
movq %rbx, %rsi
callq 0xb80c
leaq -0x140(%rbp), %rdi
jmp 0x76a4
movq %r15, %rdi
callq 0xd896
leaq -0x58(%rbp), %rdi
movq %r14, %rsi
callq 0xbc38
leaq -0x1e8(%rbp), %rdi
leaq -0x58(%rbp), %rdx
movq %rbx, %rsi
callq 0xb80c
leaq -0x1e8(%rbp), %rdi
jmp 0x76a4
movl 0x4(%r14), %eax
imull (%r14), %eax
cmpl $0x1, %eax
jne 0x7678
movq %r14, %rdi
callq 0xd896
leaq -0x58(%rbp), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0xdfd4
leaq -0x108(%rbp), %rdi
leaq -0x58(%rbp), %rdx
movq %rbx, %rsi
callq 0xb80c
leaq -0x108(%rbp), %rdi
jmp 0x76a4
leaq -0x58(%rbp), %rdi
movq %r14, %rsi
movq %r14, %rdx
movq %r15, %rcx
callq 0xe17a
leaq -0xd0(%rbp), %rdi
leaq -0x58(%rbp), %rdx
movq %rbx, %rsi
callq 0xb80c
leaq -0xd0(%rbp), %rdi
callq 0xa0be
leaq -0x58(%rbp), %rdi
callq 0xa0be
movq %rbx, %rax
addq $0x350, %rsp            # imm = 0x350
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x76f1
jmp 0x76f1
jmp 0x7705
jmp 0x76f1
jmp 0x76f1
jmp 0x7705
jmp 0x76f1
jmp 0x7705
jmp 0x76f1
jmp 0x76f1
jmp 0x76f1
jmp 0x7705
jmp 0x7705
jmp 0x7705
jmp 0x7705
jmp 0x7705
jmp 0x76f1
jmp 0x76f1
jmp 0x7705
jmp 0x7705
jmp 0x76f1
jmp 0x76f1
movq %rax, %r14
leaq -0x58(%rbp), %rdi
callq 0xa0be
jmp 0x7708
jmp 0x7705
jmp 0x7705
jmp 0x7705
movq %rax, %r14
movq %rbx, %rdi
callq 0xa0be
movq %r14, %rdi
callq 0x3520