// File: aronszanto[P]strassen/main.cpp
// Function: testInitPadding()
void testInitPadding(){
    Matrix* A = new Matrix();
    initMatrix(A,2);
    Matrix* B = new Matrix();
    initMatrix(B,4);
    A->matrix = {{1,1},{1,1}};
    B->matrix = {{1,1,0,0},{1,1,0,0},{0,0,0,0},{0,0,0,0}};

    initPadding(A,4);
    assert(isEqual(A,B));
    cout << "all initPadding tests pass" << endl;
}

// Assembly:
subq $0x2c8, %rsp            # imm = 0x2C8
movl $0x20, %edi
movq %rdi, 0xd8(%rsp)
callq 0x2190
movq %rax, %rdi
movq %rdi, 0xd0(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0xe0(%rsp)
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, (%rdi)
callq 0xd950
movq 0xd0(%rsp), %rax
movq %rax, 0x2c0(%rsp)
movq 0x2c0(%rsp), %rdi
movl $0x2, %esi
callq 0x2440
movq 0xd8(%rsp), %rdi
callq 0x2190
movaps 0xe0(%rsp), %xmm0
movq %rax, %rdi
movq %rdi, 0xf0(%rsp)
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, (%rdi)
callq 0xd950
movq 0xf0(%rsp), %rax
movq %rax, 0x2b8(%rsp)
movq 0x2b8(%rsp), %rdi
movl $0x4, %esi
callq 0x2440
movb $0x1, 0x226(%rsp)
leaq 0x278(%rsp), %rax
movq %rax, 0xf8(%rsp)
movq %rax, 0x270(%rsp)
movl $0x1, 0x258(%rsp)
movl $0x1, 0x25c(%rsp)
leaq 0x258(%rsp), %rax
movq %rax, 0x260(%rsp)
movq $0x2, 0x268(%rsp)
leaq 0x257(%rsp), %rdi
movq %rdi, 0x100(%rsp)
callq 0xeab0
movq 0xf8(%rsp), %rdi
movq 0x100(%rsp), %rcx
movq 0x260(%rsp), %rsi
movq 0x268(%rsp), %rdx
callq 0xeac0
jmp 0xc689
leaq 0x290(%rsp), %rax
movq %rax, 0xc0(%rsp)
movq %rax, 0x270(%rsp)
movl $0x1, 0x228(%rsp)
movl $0x1, 0x22c(%rsp)
leaq 0x228(%rsp), %rax
movq %rax, 0x230(%rsp)
movq $0x2, 0x238(%rsp)
leaq 0x227(%rsp), %rdi
movq %rdi, 0xc8(%rsp)
callq 0xeab0
movq 0xc0(%rsp), %rdi
movq 0xc8(%rsp), %rcx
movq 0x230(%rsp), %rsi
movq 0x238(%rsp), %rdx
callq 0xeac0
jmp 0xc70f
movb $0x0, 0x226(%rsp)
leaq 0x278(%rsp), %rax
movq %rax, 0x2a8(%rsp)
movq $0x2, 0x2b0(%rsp)
movq 0x2c0(%rsp), %rdi
addq $0x8, %rdi
movq 0x2a8(%rsp), %rsi
movq 0x2b0(%rsp), %rdx
callq 0xeb50
jmp 0xc756
leaq 0x278(%rsp), %rax
movq %rax, 0xb0(%rsp)
addq $0x30, %rax
movq %rax, 0xb8(%rsp)
movq 0xb8(%rsp), %rdi
addq $-0x18, %rdi
movq %rdi, 0xa8(%rsp)
callq 0xebb0
movq 0xb0(%rsp), %rcx
movq 0xa8(%rsp), %rax
cmpq %rcx, %rax
movq %rax, 0xb8(%rsp)
jne 0xc772
leaq 0x227(%rsp), %rdi
callq 0xec10
leaq 0x257(%rsp), %rdi
callq 0xec10
movb $0x1, 0x10e(%rsp)
leaq 0x1b0(%rsp), %rax
movq %rax, 0x98(%rsp)
movq %rax, 0x1a8(%rsp)
movl $0x1, 0x188(%rsp)
movl $0x1, 0x18c(%rsp)
movl $0x0, 0x190(%rsp)
movl $0x0, 0x194(%rsp)
leaq 0x188(%rsp), %rax
movq %rax, 0x198(%rsp)
movq $0x4, 0x1a0(%rsp)
leaq 0x187(%rsp), %rdi
movq %rdi, 0xa0(%rsp)
callq 0xeab0
movq 0x98(%rsp), %rdi
movq 0xa0(%rsp), %rcx
movq 0x198(%rsp), %rsi
movq 0x1a0(%rsp), %rdx
callq 0xeac0
jmp 0xc866
leaq 0x1c8(%rsp), %rax
movq %rax, 0x88(%rsp)
movq %rax, 0x1a8(%rsp)
movl $0x1, 0x160(%rsp)
movl $0x1, 0x164(%rsp)
movl $0x0, 0x168(%rsp)
movl $0x0, 0x16c(%rsp)
leaq 0x160(%rsp), %rax
movq %rax, 0x170(%rsp)
movq $0x4, 0x178(%rsp)
leaq 0x15f(%rsp), %rdi
movq %rdi, 0x90(%rsp)
callq 0xeab0
movq 0x88(%rsp), %rdi
movq 0x90(%rsp), %rcx
movq 0x170(%rsp), %rsi
movq 0x178(%rsp), %rdx
callq 0xeac0
jmp 0xc902
leaq 0x1e0(%rsp), %rax
movq %rax, 0x78(%rsp)
movq %rax, 0x1a8(%rsp)
movl $0x0, 0x138(%rsp)
movl $0x0, 0x13c(%rsp)
movl $0x0, 0x140(%rsp)
movl $0x0, 0x144(%rsp)
leaq 0x138(%rsp), %rax
movq %rax, 0x148(%rsp)
movq $0x4, 0x150(%rsp)
leaq 0x137(%rsp), %rdi
movq %rdi, 0x80(%rsp)
callq 0xeab0
movq 0x78(%rsp), %rdi
movq 0x80(%rsp), %rcx
movq 0x148(%rsp), %rsi
movq 0x150(%rsp), %rdx
callq 0xeac0
jmp 0xc998
leaq 0x1f8(%rsp), %rax
movq %rax, 0x68(%rsp)
movq %rax, 0x1a8(%rsp)
movl $0x0, 0x110(%rsp)
movl $0x0, 0x114(%rsp)
movl $0x0, 0x118(%rsp)
movl $0x0, 0x11c(%rsp)
leaq 0x110(%rsp), %rax
movq %rax, 0x120(%rsp)
movq $0x4, 0x128(%rsp)
leaq 0x10f(%rsp), %rdi
movq %rdi, 0x70(%rsp)
callq 0xeab0
movq 0x68(%rsp), %rdi
movq 0x70(%rsp), %rcx
movq 0x120(%rsp), %rsi
movq 0x128(%rsp), %rdx
callq 0xeac0
jmp 0xca28
movb $0x0, 0x10e(%rsp)
leaq 0x1b0(%rsp), %rax
movq %rax, 0x210(%rsp)
movq $0x4, 0x218(%rsp)
movq 0x2b8(%rsp), %rdi
addq $0x8, %rdi
movq 0x210(%rsp), %rsi
movq 0x218(%rsp), %rdx
callq 0xeb50
jmp 0xca6f
leaq 0x1b0(%rsp), %rax
movq %rax, 0x58(%rsp)
addq $0x60, %rax
movq %rax, 0x60(%rsp)
movq 0x60(%rsp), %rdi
addq $-0x18, %rdi
movq %rdi, 0x50(%rsp)
callq 0xebb0
movq 0x58(%rsp), %rcx
movq 0x50(%rsp), %rax
cmpq %rcx, %rax
movq %rax, 0x60(%rsp)
jne 0xca85
leaq 0x10f(%rsp), %rdi
callq 0xec10
leaq 0x137(%rsp), %rdi
callq 0xec10
leaq 0x15f(%rsp), %rdi
callq 0xec10
leaq 0x187(%rsp), %rdi
callq 0xec10
movq 0x2c0(%rsp), %rdi
movl $0x4, %esi
callq 0x26e0
movq 0x2c0(%rsp), %rdi
movq 0x2b8(%rsp), %rsi
callq 0x2570
testb $0x1, %al
jne 0xcb0d
jmp 0xcb12
jmp 0xcd58
leaq 0xc276(%rip), %rdi      # 0x18d8f
leaq 0xc160(%rip), %rsi      # 0x18c80
movl $0x288, %edx            # imm = 0x288
leaq 0xc270(%rip), %rcx      # 0x18d9c
callq 0x2110
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x248(%rsp)
movl %eax, 0x244(%rsp)
jmp 0xcbbd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x248(%rsp)
movl %eax, 0x244(%rsp)
jmp 0xcbb0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x248(%rsp)
movl %eax, 0x244(%rsp)
leaq 0x278(%rsp), %rax
movq %rax, 0x40(%rsp)
addq $0x30, %rax
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rdi
addq $-0x18, %rdi
movq %rdi, 0x38(%rsp)
callq 0xebb0
movq 0x40(%rsp), %rcx
movq 0x38(%rsp), %rax
cmpq %rcx, %rax
movq %rax, 0x48(%rsp)
jne 0xcb87
jmp 0xcbb0
leaq 0x227(%rsp), %rdi
callq 0xec10
leaq 0x257(%rsp), %rdi
callq 0xec10
testb $0x1, 0x226(%rsp)
jne 0xcbd6
jmp 0xcc1c
movq 0x270(%rsp), %rax
leaq 0x278(%rsp), %rcx
cmpq %rax, %rcx
movq %rax, 0x30(%rsp)
je 0xcc1a
movq 0x30(%rsp), %rdi
addq $-0x18, %rdi
movq %rdi, 0x28(%rsp)
callq 0xebb0
movq 0x28(%rsp), %rax
leaq 0x278(%rsp), %rcx
cmpq %rcx, %rax
movq %rax, 0x30(%rsp)
jne 0xcbf0
jmp 0xcc1c
jmp 0xcd82
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x248(%rsp)
movl %eax, 0x244(%rsp)
jmp 0xccf9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x248(%rsp)
movl %eax, 0x244(%rsp)
jmp 0xccec
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x248(%rsp)
movl %eax, 0x244(%rsp)
jmp 0xccdf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x248(%rsp)
movl %eax, 0x244(%rsp)
jmp 0xccd2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x248(%rsp)
movl %eax, 0x244(%rsp)
leaq 0x1b0(%rsp), %rax
movq %rax, 0x18(%rsp)
addq $0x60, %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rdi
addq $-0x18, %rdi
movq %rdi, 0x10(%rsp)
callq 0xebb0
movq 0x18(%rsp), %rcx
movq 0x10(%rsp), %rax
cmpq %rcx, %rax
movq %rax, 0x20(%rsp)
jne 0xcca9
jmp 0xccd2
leaq 0x10f(%rsp), %rdi
callq 0xec10
leaq 0x137(%rsp), %rdi
callq 0xec10
leaq 0x15f(%rsp), %rdi
callq 0xec10
leaq 0x187(%rsp), %rdi
callq 0xec10
testb $0x1, 0x10e(%rsp)
jne 0xcd12
jmp 0xcd56
movq 0x1a8(%rsp), %rax
leaq 0x1b0(%rsp), %rcx
cmpq %rax, %rcx
movq %rax, 0x8(%rsp)
je 0xcd54
movq 0x8(%rsp), %rdi
addq $-0x18, %rdi
movq %rdi, (%rsp)
callq 0xebb0
movq (%rsp), %rax
leaq 0x1b0(%rsp), %rcx
cmpq %rcx, %rax
movq %rax, 0x8(%rsp)
jne 0xcd2c
jmp 0xcd56
jmp 0xcd82
movq 0x12271(%rip), %rdi     # 0x1efd0
leaq 0xc04d(%rip), %rsi      # 0x18db3
callq 0x2180
movq %rax, %rdi
movq 0x12243(%rip), %rsi     # 0x1efb8
callq 0x21a0
addq $0x2c8, %rsp            # imm = 0x2C8
retq
movq 0x248(%rsp), %rdi
callq 0x22a0
nop