// File: aronszanto[P]strassen/main.cpp
// Function: strassenMult(Matrix*, Matrix*, Matrix*, int, int, int, int, int, int, int)
void strassenMult(Matrix* A, Matrix* B, Matrix* C, int topA, int leftA, int topB, int leftB, int topC, int leftC, int dimension) {
    
    // C12 = A21 - A11
    subtract(A, A, C, topA + dimension/2, leftA, topA, leftA, topC, leftC + dimension/2, dimension/2);
    // C21 = B11 + B12
    add(B,B,C,topB,leftB,topB,leftB + dimension/2,topC + dimension/2,leftC,dimension/2);
    // C22 = C12 * C21

    multiply(C,C,C,topC,leftC + dimension/2,topC + dimension/2,leftC,topC + dimension/2,leftC + dimension/2,dimension/2);

    //C12 = A12 - A22
    subtract(A,A,C,topA,leftA + dimension/2,topA + dimension/2,leftA + dimension/2,topC,leftC + dimension/2,dimension/2);
    //C21 = B21 + B22
    add(B, B, C, topB + dimension/2,leftB,topB + dimension/2,leftB + dimension/2,topC + dimension/2,leftC,dimension/2);
    //C11 = C12 * C21

    multiply(C,C,C,topC,leftC + dimension/2,topC + dimension/2,leftC,topC,leftC,dimension/2);

    //C12 = A11 + A22
    add(A, A, C, topA, leftA, topA + dimension/2, leftA + dimension/2, topC, leftC + dimension/2, dimension/2);
    //C21 = B11 + B22
    add(B,B,C,topB,leftB,topB + dimension/2,leftB + dimension/2,topC + dimension/2,leftC,dimension/2);
    
    Matrix* T1 = new Matrix();
    initMatrix(T1, dimension/2); // TODO deal with non-power of 2 case
    
    
    //T1 = C12*C21
    multiply(C,C,T1,topC,leftC + dimension/2,topC + dimension/2,leftC,0,0,dimension/2);
    //C11 = T1 + C11
    add(T1,C,C,0,0,topC,leftC,topC,leftC,dimension/2);
    //C22 = T1 + C22
    add(T1,C,C,0,0,topC + dimension/2,leftC + dimension/2,topC + dimension/2,leftC + dimension/2,dimension/2);
    
    Matrix* T2 = new Matrix();
    initMatrix(T2, dimension/2); // TODO deal with non-power of 2 case
    //T2 = A21 + A22
    add(A,A,T2,topA + dimension/2,leftA,topA + dimension/2,leftA + dimension/2,0,0,dimension/2);
    //C21 = T2 * B11

    multiply(T2,B,C,0,0,topB,leftB,topC + dimension/2,leftC,dimension/2);

    //C22 = C22 - C21
    subtract(C,C,C,topC + dimension/2,leftC + dimension/2,topC + dimension/2,leftC,topC + dimension/2,leftC + dimension/2,dimension/2);
    //T1 = B21 - B11
    subtract(B,B,T1,topB + dimension/2,leftB,topB,leftB,0,0,dimension/2);
    //T2 = A22 * T1

    multiply(A,T1,T2,topA + dimension/2,leftA + dimension/2,0,0,0,0,dimension/2);

    //C21 = C21 + T2
    add(C,T2,C,topC + dimension/2,leftC,0,0,topC + dimension/2,leftC,dimension/2);
    //C11 = C11 + T2
    add(C,T2,C,topC,leftC,0,0,topC,leftC,dimension/2);
    //T1 = B12 - B22
    subtract(B,B,T1,topB,leftB + dimension/2,topB + dimension/2,leftB + dimension/2,0,0,dimension/2);
    //C12 = A11 * T1

    multiply(A,T1,C,topA,leftA,0,0,topC,leftC + dimension/2,dimension/2);

    //C22 = C22 + C12
    add(C,C,C,topC + dimension/2,leftC + dimension/2,topC,leftC + dimension/2,topC + dimension/2,leftC + dimension/2,dimension/2);
    //T2 = A11 + A12
    add(A,A,T2,topA,leftA,topA,leftA + dimension/2,0,0,dimension/2);
    //T1 = T2 * B22

    multiply(T2,B,T1,0,0,topB + dimension/2,leftB + dimension/2,0,0,dimension/2);

    //C12 = C12 + T1
    add(C,T1,C,topC,leftC + dimension/2,0,0,topC,leftC + dimension/2,dimension/2);
    //C11 = C11 - T1
    subtract(C,T1,C,topC,leftC,0,0,topC,leftC,dimension/2);
    
    delete(T1);
    delete(T2);
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x148, %rsp            # imm = 0x148
movl 0x178(%rsp), %eax
movl 0x170(%rsp), %eax
movl 0x168(%rsp), %eax
movl 0x160(%rsp), %eax
movq %rdi, 0x140(%rsp)
movq %rsi, 0x138(%rsp)
movq %rdx, 0x130(%rsp)
movl %ecx, 0x12c(%rsp)
movl %r8d, 0x128(%rsp)
movl %r9d, 0x124(%rsp)
movq 0x140(%rsp), %rdi
movq 0x140(%rsp), %rsi
movq 0x130(%rsp), %rax
movq %rax, 0x30(%rsp)
movl 0x12c(%rsp), %ecx
movl 0x178(%rsp), %eax
movl $0x2, %r8d
cltd
idivl %r8d
addl %eax, %ecx
movl 0x128(%rsp), %r8d
movl 0x12c(%rsp), %r9d
movl 0x128(%rsp), %ebx
movl 0x168(%rsp), %r11d
movl 0x170(%rsp), %r10d
movl 0x178(%rsp), %eax
movl $0x2, %ebp
cltd
idivl %ebp
addl %eax, %r10d
movl 0x178(%rsp), %eax
movl $0x2, %ebp
cltd
idivl %ebp
movq 0x30(%rsp), %rdx
movl %ebx, (%rsp)
movl %r11d, 0x8(%rsp)
movl %r10d, 0x10(%rsp)
movl %eax, 0x18(%rsp)
callq 0x28f0
movq 0x138(%rsp), %rdi
movq 0x138(%rsp), %rsi
movq 0x130(%rsp), %rax
movq %rax, 0x38(%rsp)
movl 0x124(%rsp), %ecx
movl 0x160(%rsp), %r8d
movl 0x124(%rsp), %r9d
movl 0x160(%rsp), %ebx
movl 0x178(%rsp), %eax
movl $0x2, %r10d
cltd
idivl %r10d
addl %eax, %ebx
movl 0x168(%rsp), %r11d
movl 0x178(%rsp), %eax
movl $0x2, %r10d
cltd
idivl %r10d
addl %eax, %r11d
movl 0x170(%rsp), %r10d
movl 0x178(%rsp), %eax
movl $0x2, %ebp
cltd
idivl %ebp
movq 0x38(%rsp), %rdx
movl %ebx, (%rsp)
movl %r11d, 0x8(%rsp)
movl %r10d, 0x10(%rsp)
movl %eax, 0x18(%rsp)
callq 0x27c0
movq 0x130(%rsp), %rdi
movq 0x130(%rsp), %rsi
movq 0x130(%rsp), %rax
movq %rax, 0x40(%rsp)
movl 0x168(%rsp), %ecx
movl 0x170(%rsp), %r8d
movl 0x178(%rsp), %eax
movl $0x2, %r9d
cltd
idivl %r9d
addl %eax, %r8d
movl 0x168(%rsp), %r9d
movl 0x178(%rsp), %eax
movl $0x2, %r10d
cltd
idivl %r10d
addl %eax, %r9d
movl 0x170(%rsp), %ebx
movl 0x168(%rsp), %r11d
movl 0x178(%rsp), %eax
movl $0x2, %r10d
cltd
idivl %r10d
addl %eax, %r11d
movl 0x170(%rsp), %r10d
movl 0x178(%rsp), %eax
movl $0x2, %ebp
cltd
idivl %ebp
addl %eax, %r10d
movl 0x178(%rsp), %eax
movl $0x2, %ebp
cltd
idivl %ebp
movq 0x40(%rsp), %rdx
movl %ebx, (%rsp)
movl %r11d, 0x8(%rsp)
movl %r10d, 0x10(%rsp)
movl %eax, 0x18(%rsp)
callq 0x3d50
movq 0x140(%rsp), %rdi
movq 0x140(%rsp), %rsi
movq 0x130(%rsp), %rax
movq %rax, 0x48(%rsp)
movl 0x12c(%rsp), %ecx
movl 0x128(%rsp), %r8d
movl 0x178(%rsp), %eax
movl $0x2, %r9d
cltd
idivl %r9d
addl %eax, %r8d
movl 0x12c(%rsp), %r9d
movl 0x178(%rsp), %eax
movl $0x2, %r10d
cltd
idivl %r10d
addl %eax, %r9d
movl 0x128(%rsp), %ebx
movl 0x178(%rsp), %eax
movl $0x2, %r10d
cltd
idivl %r10d
addl %eax, %ebx
movl 0x168(%rsp), %r11d
movl 0x170(%rsp), %r10d
movl 0x178(%rsp), %eax
movl $0x2, %ebp
cltd
idivl %ebp
addl %eax, %r10d
movl 0x178(%rsp), %eax
movl $0x2, %ebp
cltd
idivl %ebp
movq 0x48(%rsp), %rdx
movl %ebx, (%rsp)
movl %r11d, 0x8(%rsp)
movl %r10d, 0x10(%rsp)
movl %eax, 0x18(%rsp)
callq 0x28f0
movq 0x138(%rsp), %rdi
movq 0x138(%rsp), %rsi
movq 0x130(%rsp), %rax
movq %rax, 0x50(%rsp)
movl 0x124(%rsp), %ecx
movl 0x178(%rsp), %eax
movl $0x2, %r8d
cltd
idivl %r8d
addl %eax, %ecx
movl 0x160(%rsp), %r8d
movl 0x124(%rsp), %r9d
movl 0x178(%rsp), %eax
movl $0x2, %r10d
cltd
idivl %r10d
addl %eax, %r9d
movl 0x160(%rsp), %ebx
movl 0x178(%rsp), %eax
movl $0x2, %r10d
cltd
idivl %r10d
addl %eax, %ebx
movl 0x168(%rsp), %r11d
movl 0x178(%rsp), %eax
movl $0x2, %r10d
cltd
idivl %r10d
addl %eax, %r11d
movl 0x170(%rsp), %r10d
movl 0x178(%rsp), %eax
movl $0x2, %ebp
cltd
idivl %ebp
movq 0x50(%rsp), %rdx
movl %ebx, (%rsp)
movl %r11d, 0x8(%rsp)
movl %r10d, 0x10(%rsp)
movl %eax, 0x18(%rsp)
callq 0x27c0
movq 0x130(%rsp), %rdi
movq 0x130(%rsp), %rsi
movq 0x130(%rsp), %rax
movq %rax, 0x58(%rsp)
movl 0x168(%rsp), %ecx
movl 0x170(%rsp), %r8d
movl 0x178(%rsp), %eax
movl $0x2, %r9d
cltd
idivl %r9d
addl %eax, %r8d
movl 0x168(%rsp), %r9d
movl 0x178(%rsp), %eax
movl $0x2, %r10d
cltd
idivl %r10d
addl %eax, %r9d
movl 0x170(%rsp), %ebx
movl 0x168(%rsp), %r11d
movl 0x170(%rsp), %r10d
movl 0x178(%rsp), %eax
movl $0x2, %ebp
cltd
idivl %ebp
movq 0x58(%rsp), %rdx
movl %ebx, (%rsp)
movl %r11d, 0x8(%rsp)
movl %r10d, 0x10(%rsp)
movl %eax, 0x18(%rsp)
callq 0x3d50
movq 0x140(%rsp), %rdi
movq 0x140(%rsp), %rsi
movq 0x130(%rsp), %rax
movq %rax, 0x60(%rsp)
movl 0x12c(%rsp), %ecx
movl 0x128(%rsp), %r8d
movl 0x12c(%rsp), %r9d
movl 0x178(%rsp), %eax
movl $0x2, %r10d
cltd
idivl %r10d
addl %eax, %r9d
movl 0x128(%rsp), %ebx
movl 0x178(%rsp), %eax
movl $0x2, %r10d
cltd
idivl %r10d
addl %eax, %ebx
movl 0x168(%rsp), %r11d
movl 0x170(%rsp), %r10d
movl 0x178(%rsp), %eax
movl $0x2, %ebp
cltd
idivl %ebp
addl %eax, %r10d
movl 0x178(%rsp), %eax
movl $0x2, %ebp
cltd
idivl %ebp
movq 0x60(%rsp), %rdx
movl %ebx, (%rsp)
movl %r11d, 0x8(%rsp)
movl %r10d, 0x10(%rsp)
movl %eax, 0x18(%rsp)
callq 0x27c0
movq 0x138(%rsp), %rdi
movq 0x138(%rsp), %rsi
movq 0x130(%rsp), %rax
movq %rax, 0x68(%rsp)
movl 0x124(%rsp), %ecx
movl 0x160(%rsp), %r8d
movl 0x124(%rsp), %r9d
movl 0x178(%rsp), %eax
movl $0x2, %r10d
cltd
idivl %r10d
addl %eax, %r9d
movl 0x160(%rsp), %ebx
movl 0x178(%rsp), %eax
movl $0x2, %r10d
cltd
idivl %r10d
addl %eax, %ebx
movl 0x168(%rsp), %r11d
movl 0x178(%rsp), %eax
movl $0x2, %r10d
cltd
idivl %r10d
addl %eax, %r11d
movl 0x170(%rsp), %r10d
movl 0x178(%rsp), %eax
movl $0x2, %ebp
cltd
idivl %ebp
movq 0x68(%rsp), %rdx
movl %ebx, (%rsp)
movl %r11d, 0x8(%rsp)
movl %r10d, 0x10(%rsp)
movl %eax, 0x18(%rsp)
callq 0x27c0
movl $0x20, %edi
callq 0x2190
movq %rax, %rdi
movq %rdi, 0x70(%rsp)
xorl %esi, %esi
movl $0x20, %edx
callq 0x20e0
movq 0x70(%rsp), %rdi
callq 0xd950
movq 0x70(%rsp), %rax
movq %rax, 0x118(%rsp)
movq 0x118(%rsp), %rdi
movl 0x178(%rsp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %esi
callq 0x2440
movq 0x130(%rsp), %rdi
movq 0x130(%rsp), %rsi
movq 0x118(%rsp), %rax
movq %rax, 0x78(%rsp)
movl 0x168(%rsp), %ecx
movl 0x170(%rsp), %r8d
movl 0x178(%rsp), %eax
movl $0x2, %r9d
cltd
idivl %r9d
addl %eax, %r8d
movl 0x168(%rsp), %r9d
movl 0x178(%rsp), %eax
movl $0x2, %r10d
cltd
idivl %r10d
addl %eax, %r9d
movl 0x170(%rsp), %r10d
movl 0x178(%rsp), %eax
movl $0x2, %r11d
cltd
idivl %r11d
movq 0x78(%rsp), %rdx
xorl %r11d, %r11d
movl %r10d, (%rsp)
movl $0x0, 0x8(%rsp)
movl $0x0, 0x10(%rsp)
movl %eax, 0x18(%rsp)
callq 0x3d50
movq 0x118(%rsp), %rdi
movq 0x130(%rsp), %rsi
movq 0x130(%rsp), %rax
movq %rax, 0x80(%rsp)
movl 0x168(%rsp), %r9d
movl 0x170(%rsp), %ebx
movl 0x168(%rsp), %r11d
movl 0x170(%rsp), %r10d
movl 0x178(%rsp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movq 0x80(%rsp), %rdx
xorl %r8d, %r8d
movl %r8d, %ecx
movl %ebx, (%rsp)
movl %r11d, 0x8(%rsp)
movl %r10d, 0x10(%rsp)
movl %eax, 0x18(%rsp)
callq 0x27c0
movq 0x118(%rsp), %rdi
movq 0x130(%rsp), %rsi
movq 0x130(%rsp), %rax
movq %rax, 0x88(%rsp)
movl 0x168(%rsp), %r9d
movl 0x178(%rsp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
addl %eax, %r9d
movl 0x170(%rsp), %ebx
movl 0x178(%rsp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
addl %eax, %ebx
movl 0x168(%rsp), %r11d
movl 0x178(%rsp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
addl %eax, %r11d
movl 0x170(%rsp), %r10d
movl 0x178(%rsp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
addl %eax, %r10d
movl 0x178(%rsp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movq 0x88(%rsp), %rdx
xorl %r8d, %r8d
movl %r8d, %ecx
movl %ebx, (%rsp)
movl %r11d, 0x8(%rsp)
movl %r10d, 0x10(%rsp)
movl %eax, 0x18(%rsp)
callq 0x27c0
movl $0x20, %edi
callq 0x2190
movq %rax, %rdi
movq %rdi, 0x90(%rsp)
xorl %esi, %esi
movl $0x20, %edx
callq 0x20e0
movq 0x90(%rsp), %rdi
callq 0xd950
movq 0x90(%rsp), %rax
movq %rax, 0x110(%rsp)
movq 0x110(%rsp), %rdi
movl 0x178(%rsp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %esi
callq 0x2440
movq 0x140(%rsp), %rdi
movq 0x140(%rsp), %rsi
movq 0x110(%rsp), %rax
movq %rax, 0x98(%rsp)
movl 0x12c(%rsp), %ecx
movl 0x178(%rsp), %eax
movl $0x2, %r8d
cltd
idivl %r8d
addl %eax, %ecx
movl 0x128(%rsp), %r8d
movl 0x12c(%rsp), %r9d
movl 0x178(%rsp), %eax
movl $0x2, %r10d
cltd
idivl %r10d
addl %eax, %r9d
movl 0x128(%rsp), %r10d
movl 0x178(%rsp), %eax
movl $0x2, %r11d
cltd
idivl %r11d
addl %eax, %r10d
movl 0x178(%rsp), %eax
movl $0x2, %r11d
cltd
idivl %r11d
movq 0x98(%rsp), %rdx
xorl %r11d, %r11d
movl %r10d, (%rsp)
movl $0x0, 0x8(%rsp)
movl $0x0, 0x10(%rsp)
movl %eax, 0x18(%rsp)
callq 0x27c0
movq 0x110(%rsp), %rdi
movq 0x138(%rsp), %rsi
movq 0x130(%rsp), %rax
movq %rax, 0xa0(%rsp)
movl 0x124(%rsp), %r9d
movl 0x160(%rsp), %ebx
movl 0x168(%rsp), %r11d
movl 0x178(%rsp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
addl %eax, %r11d
movl 0x170(%rsp), %r10d
movl 0x178(%rsp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movq 0xa0(%rsp), %rdx
xorl %r8d, %r8d
movl %r8d, %ecx
movl %ebx, (%rsp)
movl %r11d, 0x8(%rsp)
movl %r10d, 0x10(%rsp)
movl %eax, 0x18(%rsp)
callq 0x3d50
movq 0x130(%rsp), %rdi
movq 0x130(%rsp), %rsi
movq 0x130(%rsp), %rax
movq %rax, 0xa8(%rsp)
movl 0x168(%rsp), %ecx
movl 0x178(%rsp), %eax
movl $0x2, %r8d
cltd
idivl %r8d
addl %eax, %ecx
movl 0x170(%rsp), %r8d
movl 0x178(%rsp), %eax
movl $0x2, %r9d
cltd
idivl %r9d
addl %eax, %r8d
movl 0x168(%rsp), %r9d
movl 0x178(%rsp), %eax
movl $0x2, %r10d
cltd
idivl %r10d
addl %eax, %r9d
movl 0x170(%rsp), %ebx
movl 0x168(%rsp), %r11d
movl 0x178(%rsp), %eax
movl $0x2, %r10d
cltd
idivl %r10d
addl %eax, %r11d
movl 0x170(%rsp), %r10d
movl 0x178(%rsp), %eax
movl $0x2, %ebp
cltd
idivl %ebp
addl %eax, %r10d
movl 0x178(%rsp), %eax
movl $0x2, %ebp
cltd
idivl %ebp
movq 0xa8(%rsp), %rdx
movl %ebx, (%rsp)
movl %r11d, 0x8(%rsp)
movl %r10d, 0x10(%rsp)
movl %eax, 0x18(%rsp)
callq 0x28f0
movq 0x138(%rsp), %rdi
movq 0x138(%rsp), %rsi
movq 0x118(%rsp), %rax
movq %rax, 0xb0(%rsp)
movl 0x124(%rsp), %ecx
movl 0x178(%rsp), %eax
movl $0x2, %r8d
cltd
idivl %r8d
addl %eax, %ecx
movl 0x160(%rsp), %r8d
movl 0x124(%rsp), %r9d
movl 0x160(%rsp), %r10d
movl 0x178(%rsp), %eax
movl $0x2, %r11d
cltd
idivl %r11d
movq 0xb0(%rsp), %rdx
xorl %r11d, %r11d
movl %r10d, (%rsp)
movl $0x0, 0x8(%rsp)
movl $0x0, 0x10(%rsp)
movl %eax, 0x18(%rsp)
callq 0x28f0
movq 0x140(%rsp), %rdi
movq 0x118(%rsp), %rsi
movq 0x110(%rsp), %rax
movq %rax, 0xb8(%rsp)
movl 0x12c(%rsp), %ecx
movl 0x178(%rsp), %eax
movl $0x2, %r8d
cltd
idivl %r8d
addl %eax, %ecx
movl 0x128(%rsp), %r8d
movl 0x178(%rsp), %eax
movl $0x2, %r9d
cltd
idivl %r9d
addl %eax, %r8d
movl 0x178(%rsp), %eax
movl $0x2, %r9d
cltd
idivl %r9d
movq 0xb8(%rsp), %rdx
xorl %r9d, %r9d
movl $0x0, (%rsp)
movl $0x0, 0x8(%rsp)
movl $0x0, 0x10(%rsp)
movl %eax, 0x18(%rsp)
callq 0x3d50
movq 0x130(%rsp), %rdi
movq 0x110(%rsp), %rsi
movq 0x130(%rsp), %rax
movq %rax, 0xc0(%rsp)
movl 0x168(%rsp), %ecx
movl 0x178(%rsp), %eax
movl $0x2, %r8d
cltd
idivl %r8d
addl %eax, %ecx
movl 0x170(%rsp), %r8d
movl 0x168(%rsp), %r11d
movl 0x178(%rsp), %eax
movl $0x2, %r9d
cltd
idivl %r9d
addl %eax, %r11d
movl 0x170(%rsp), %r10d
movl 0x178(%rsp), %eax
movl $0x2, %r9d
cltd
idivl %r9d
movq 0xc0(%rsp), %rdx
xorl %r9d, %r9d
movl $0x0, (%rsp)
movl %r11d, 0x8(%rsp)
movl %r10d, 0x10(%rsp)
movl %eax, 0x18(%rsp)
callq 0x27c0
movq 0x130(%rsp), %rdi
movq 0x110(%rsp), %rsi
movq 0x130(%rsp), %rax
movq %rax, 0xc8(%rsp)
movl 0x168(%rsp), %ecx
movl 0x170(%rsp), %r8d
movl 0x168(%rsp), %r11d
movl 0x170(%rsp), %r10d
movl 0x178(%rsp), %eax
movl $0x2, %r9d
cltd
idivl %r9d
movq 0xc8(%rsp), %rdx
xorl %r9d, %r9d
movl $0x0, (%rsp)
movl %r11d, 0x8(%rsp)
movl %r10d, 0x10(%rsp)
movl %eax, 0x18(%rsp)
callq 0x27c0
movq 0x138(%rsp), %rdi
movq 0x138(%rsp), %rsi
movq 0x118(%rsp), %rax
movq %rax, 0xd0(%rsp)
movl 0x124(%rsp), %ecx
movl 0x160(%rsp), %r8d
movl 0x178(%rsp), %eax
movl $0x2, %r9d
cltd
idivl %r9d
addl %eax, %r8d
movl 0x124(%rsp), %r9d
movl 0x178(%rsp), %eax
movl $0x2, %r10d
cltd
idivl %r10d
addl %eax, %r9d
movl 0x160(%rsp), %r10d
movl 0x178(%rsp), %eax
movl $0x2, %r11d
cltd
idivl %r11d
addl %eax, %r10d
movl 0x178(%rsp), %eax
movl $0x2, %r11d
cltd
idivl %r11d
movq 0xd0(%rsp), %rdx
xorl %r11d, %r11d
movl %r10d, (%rsp)
movl $0x0, 0x8(%rsp)
movl $0x0, 0x10(%rsp)
movl %eax, 0x18(%rsp)
callq 0x28f0
movq 0x140(%rsp), %rdi
movq 0x118(%rsp), %rsi
movq 0x130(%rsp), %rax
movq %rax, 0xd8(%rsp)
movl 0x12c(%rsp), %ecx
movl 0x128(%rsp), %r8d
movl 0x168(%rsp), %r11d
movl 0x170(%rsp), %r10d
movl 0x178(%rsp), %eax
movl $0x2, %r9d
cltd
idivl %r9d
addl %eax, %r10d
movl 0x178(%rsp), %eax
movl $0x2, %r9d
cltd
idivl %r9d
movq 0xd8(%rsp), %rdx
xorl %r9d, %r9d
movl $0x0, (%rsp)
movl %r11d, 0x8(%rsp)
movl %r10d, 0x10(%rsp)
movl %eax, 0x18(%rsp)
callq 0x3d50
movq 0x130(%rsp), %rdi
movq 0x130(%rsp), %rsi
movq 0x130(%rsp), %rax
movq %rax, 0xe0(%rsp)
movl 0x168(%rsp), %ecx
movl 0x178(%rsp), %eax
movl $0x2, %r8d
cltd
idivl %r8d
addl %eax, %ecx
movl 0x170(%rsp), %r8d
movl 0x178(%rsp), %eax
movl $0x2, %r9d
cltd
idivl %r9d
addl %eax, %r8d
movl 0x168(%rsp), %r9d
movl 0x170(%rsp), %ebx
movl 0x178(%rsp), %eax
movl $0x2, %r10d
cltd
idivl %r10d
addl %eax, %ebx
movl 0x168(%rsp), %r11d
movl 0x178(%rsp), %eax
movl $0x2, %r10d
cltd
idivl %r10d
addl %eax, %r11d
movl 0x170(%rsp), %r10d
movl 0x178(%rsp), %eax
movl $0x2, %ebp
cltd
idivl %ebp
addl %eax, %r10d
movl 0x178(%rsp), %eax
movl $0x2, %ebp
cltd
idivl %ebp
movq 0xe0(%rsp), %rdx
movl %ebx, (%rsp)
movl %r11d, 0x8(%rsp)
movl %r10d, 0x10(%rsp)
movl %eax, 0x18(%rsp)
callq 0x27c0
movq 0x140(%rsp), %rdi
movq 0x140(%rsp), %rsi
movq 0x110(%rsp), %rax
movq %rax, 0xe8(%rsp)
movl 0x12c(%rsp), %ecx
movl 0x128(%rsp), %r8d
movl 0x12c(%rsp), %r9d
movl 0x128(%rsp), %r10d
movl 0x178(%rsp), %eax
movl $0x2, %r11d
cltd
idivl %r11d
addl %eax, %r10d
movl 0x178(%rsp), %eax
movl $0x2, %r11d
cltd
idivl %r11d
movq 0xe8(%rsp), %rdx
xorl %r11d, %r11d
movl %r10d, (%rsp)
movl $0x0, 0x8(%rsp)
movl $0x0, 0x10(%rsp)
movl %eax, 0x18(%rsp)
callq 0x27c0
movq 0x110(%rsp), %rdi
movq 0x138(%rsp), %rsi
movq 0x118(%rsp), %rax
movq %rax, 0xf0(%rsp)
movl 0x124(%rsp), %r9d
movl 0x178(%rsp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
addl %eax, %r9d
movl 0x160(%rsp), %r10d
movl 0x178(%rsp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
addl %eax, %r10d
movl 0x178(%rsp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movq 0xf0(%rsp), %rdx
xorl %r8d, %r8d
movl %r8d, %ecx
movl %r10d, (%rsp)
movl $0x0, 0x8(%rsp)
movl $0x0, 0x10(%rsp)
movl %eax, 0x18(%rsp)
callq 0x3d50
movq 0x130(%rsp), %rdi
movq 0x118(%rsp), %rsi
movq 0x130(%rsp), %rax
movq %rax, 0xf8(%rsp)
movl 0x168(%rsp), %ecx
movl 0x170(%rsp), %r8d
movl 0x178(%rsp), %eax
movl $0x2, %r9d
cltd
idivl %r9d
addl %eax, %r8d
movl 0x168(%rsp), %r11d
movl 0x170(%rsp), %r10d
movl 0x178(%rsp), %eax
movl $0x2, %r9d
cltd
idivl %r9d
addl %eax, %r10d
movl 0x178(%rsp), %eax
movl $0x2, %r9d
cltd
idivl %r9d
movq 0xf8(%rsp), %rdx
xorl %r9d, %r9d
movl $0x0, (%rsp)
movl %r11d, 0x8(%rsp)
movl %r10d, 0x10(%rsp)
movl %eax, 0x18(%rsp)
callq 0x27c0
movq 0x130(%rsp), %rdi
movq 0x118(%rsp), %rsi
movq 0x130(%rsp), %rax
movq %rax, 0x100(%rsp)
movl 0x168(%rsp), %ecx
movl 0x170(%rsp), %r8d
movl 0x168(%rsp), %r11d
movl 0x170(%rsp), %r10d
movl 0x178(%rsp), %eax
movl $0x2, %r9d
cltd
idivl %r9d
movq 0x100(%rsp), %rdx
xorl %r9d, %r9d
movl $0x0, (%rsp)
movl %r11d, 0x8(%rsp)
movl %r10d, 0x10(%rsp)
movl %eax, 0x18(%rsp)
callq 0x28f0
movq 0x118(%rsp), %rax
movq %rax, 0x108(%rsp)
cmpq $0x0, %rax
je 0x3d16
movq 0x108(%rsp), %rdi
callq 0xd970
movq 0x108(%rsp), %rdi
callq 0x2170
movq 0x110(%rsp), %rax
movq %rax, 0x28(%rsp)
cmpq $0x0, %rax
je 0x3d3d
movq 0x28(%rsp), %rdi
callq 0xd970
movq 0x28(%rsp), %rdi
callq 0x2170
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %rbp
retq
nopw (%rax,%rax)