// File: asd00012334[P]Abstract-Algebra-2018/main.cpp
// Function: testMod()
void testMod(){
    using namespace std;
    using namespace prime;
    Polynomial<prime::IntType, int> x(
        &intType,
        vector<int>{2,0,0,0,0,1}
    );
    Polynomial<prime::IntType, int> y(
        &intType,
        vector<int>{0,0,0,1}
    );
    Zp zp(7);
    auto xp = x % zp, yp = y % zp;
    auto z = gcd(xp,yp);
    std::cout<<"("<<xp<<") / ("<<yp<<") = ("<<z<<")\n";


}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1b0, %rsp            # imm = 0x1B0
movups 0x119c2(%rip), %xmm0    # 0x15004
movaps %xmm0, -0x70(%rbp)
movabsq $0x100000000, %rax      # imm = 0x100000000
movq %rax, -0x60(%rbp)
leaq -0x70(%rbp), %rax
movq %rax, -0x50(%rbp)
movq $0x6, -0x48(%rbp)
leaq -0x71(%rbp), %rdi
movq %rdi, -0x178(%rbp)
callq 0x4f10
movq -0x178(%rbp), %rcx
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
leaq -0x40(%rbp), %rdi
callq 0x4f30
jmp 0x368e
leaq 0x1001cb2f(%rip), %rsi  # 0x100201c4
leaq -0x28(%rbp), %rdi
leaq -0x40(%rbp), %rdx
callq 0x4fb0
jmp 0x36a4
leaq -0x40(%rbp), %rdi
callq 0x5020
leaq -0x71(%rbp), %rdi
callq 0x5080
movl $0x0, -0xe8(%rbp)
movl $0x0, -0xe4(%rbp)
movl $0x0, -0xe0(%rbp)
movl $0x1, -0xdc(%rbp)
leaq -0xe8(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq $0x4, -0xd0(%rbp)
leaq -0xe9(%rbp), %rdi
movq %rdi, -0x180(%rbp)
callq 0x4f10
movq -0x180(%rbp), %rcx
movq -0xd8(%rbp), %rsi
movq -0xd0(%rbp), %rdx
leaq -0xc8(%rbp), %rdi
callq 0x4f30
jmp 0x372d
leaq 0x1001ca90(%rip), %rsi  # 0x100201c4
leaq -0xb0(%rbp), %rdi
leaq -0xc8(%rbp), %rdx
callq 0x4fb0
jmp 0x3749
leaq -0xc8(%rbp), %rdi
callq 0x5020
leaq -0xe9(%rbp), %rdi
callq 0x5080
leaq -0xf8(%rbp), %rdi
movl $0x7, %esi
callq 0x2550
jmp 0x3774
leaq -0x120(%rbp), %rdi
leaq -0x28(%rbp), %rsi
leaq -0xf8(%rbp), %rdx
callq 0x2840
jmp 0x378d
leaq -0x148(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
leaq -0xf8(%rbp), %rdx
callq 0x2840
jmp 0x37a9
leaq -0x170(%rbp), %rdi
leaq -0x120(%rbp), %rsi
leaq -0x148(%rbp), %rdx
callq 0x5540
jmp 0x37c5
movq 0x1c7ec(%rip), %rdi     # 0x1ffb8
leaq 0x1184e(%rip), %rsi     # 0x15021
callq 0x21c0
movq %rax, -0x188(%rbp)
jmp 0x37e1
movq -0x188(%rbp), %rdi
leaq -0x120(%rbp), %rsi
callq 0x61e0
movq %rax, -0x190(%rbp)
jmp 0x37fd
movq -0x190(%rbp), %rdi
leaq 0x11812(%rip), %rsi     # 0x1501d
callq 0x21c0
movq %rax, -0x198(%rbp)
jmp 0x3819
movq -0x198(%rbp), %rdi
leaq -0x148(%rbp), %rsi
callq 0x61e0
movq %rax, -0x1a0(%rbp)
jmp 0x3835
movq -0x1a0(%rbp), %rdi
leaq 0x117e0(%rip), %rsi     # 0x15023
callq 0x21c0
movq %rax, -0x1a8(%rbp)
jmp 0x3851
movq -0x1a8(%rbp), %rdi
leaq -0x170(%rbp), %rsi
callq 0x61e0
movq %rax, -0x1b0(%rbp)
jmp 0x386d
movq -0x1b0(%rbp), %rdi
leaq 0x117ae(%rip), %rsi     # 0x15029
callq 0x21c0
jmp 0x3882
leaq -0x170(%rbp), %rdi
callq 0x49b0
leaq -0x148(%rbp), %rdi
callq 0x49b0
leaq -0x120(%rbp), %rdi
callq 0x49b0
leaq -0xb0(%rbp), %rdi
callq 0x4e30
leaq -0x28(%rbp), %rdi
callq 0x4e30
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x38ed
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x5020
leaq -0x71(%rbp), %rdi
callq 0x5080
jmp 0x39b0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x3927
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x5020
leaq -0xe9(%rbp), %rdi
callq 0x5080
jmp 0x39a7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x399b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x398f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x3983
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x170(%rbp), %rdi
callq 0x49b0
leaq -0x148(%rbp), %rdi
callq 0x49b0
leaq -0x120(%rbp), %rdi
callq 0x49b0
leaq -0xb0(%rbp), %rdi
callq 0x4e30
leaq -0x28(%rbp), %rdi
callq 0x4e30
movq -0x80(%rbp), %rdi
callq 0x22f0
nopl (%rax)