// File: /workspace/github_cpp_makefile_star2_O3/Eshaancoding[P]AutoDiff/src/Matrix/operations.cpp
// Function: Matrix::operator=(std::initializer_list<std::initializer_list<double>>)
void Matrix::operator= (initializer_list<initializer_list<double>> ar) {
    // find height / width
    int ar_height = ar.size();
    int ar_width = ar.begin()->size();
    for (int i = 1; i < ar_height; i++) {
        if (ar_width != (ar.begin()+i)->size()) {
            throw invalid_argument("array invalid");
        }
    }
    // check height / width
    if (this->height != ar_height) throw invalid_argument("height invalid. Expected " + to_string(this->height) + " got: " + to_string(ar_height));
    if (this->width != ar_width) throw invalid_argument("width invalid. Expected " + to_string(this->width) + " got: " + to_string(ar_width));
    // assign
    for (int i = 0; i < ar_height; i++) {
        this->array[i] = *(ar.begin() + i);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xa0, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r12
movq 0x8(%rsi), %r15
cmpl $0x2, %ebx
jl 0x2d0e
movslq %r15d, %rax
movl %ebx, %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
leaq 0x18(%r14), %rdx
decq %rcx
cmpq (%rdx), %rax
jne 0x2d5f
addq $0x10, %rdx
decq %rcx
jne 0x2d00
cmpl %ebx, 0x8(%r12)
jne 0x2d91
cmpl %r15d, 0xc(%r12)
jne 0x2df6
testl %ebx, %ebx
jle 0x2d4f
andl $0x7fffffff, %ebx       # imm = 0x7FFFFFFF
shlq $0x4, %rbx
xorl %r15d, %r15d
movq (%r14,%r15), %rsi
movq 0x8(%r14,%r15), %rdx
movq (%r12), %rdi
addq %r15, %rdi
callq 0x8b08
addq $0x10, %r15
cmpq %r15, %rbx
jne 0x2d31
addq $0xa0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x20c0
movq %rax, %r14
leaq 0x7291(%rip), %rsi      # 0xa004
movq %rax, %rdi
callq 0x2290
movq 0xc25e(%rip), %rsi      # 0xefe0
movq 0xc247(%rip), %rdx      # 0xefd0
movq %r14, %rdi
callq 0x2210
movl $0x10, %edi
callq 0x20c0
movq %rax, %r14
movl 0x8(%r12), %esi
leaq -0x60(%rbp), %rdi
callq 0x402d
leaq 0x725f(%rip), %rsi      # 0xa012
leaq -0xa0(%rbp), %rdi
leaq -0x60(%rbp), %rdx
callq 0x3fb3
leaq 0x7262(%rip), %rsi      # 0xa02c
leaq -0xa0(%rbp), %rdi
callq 0x22a0
leaq -0x30(%rbp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x2e5d
movups (%rcx), %xmm0
movups %xmm0, (%r15)
jmp 0x2e68
movl $0x10, %edi
callq 0x20c0
movq %rax, %r14
movl 0xc(%r12), %esi
leaq -0x60(%rbp), %rdi
callq 0x402d
leaq 0x721b(%rip), %rsi      # 0xa033
leaq -0xa0(%rbp), %rdi
leaq -0x60(%rbp), %rdx
callq 0x3fb3
leaq 0x71fd(%rip), %rsi      # 0xa02c
leaq -0xa0(%rbp), %rdi
callq 0x22a0
leaq -0x30(%rbp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x2ecb
movups (%rcx), %xmm0
movups %xmm0, (%r12)
jmp 0x2ed6
movq %rdx, -0x40(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x30(%rbp)
movq 0x8(%rax), %rdx
movq %rdx, -0x38(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq -0x80(%rbp), %rdi
movl %ebx, %esi
callq 0x402d
leaq -0xc0(%rbp), %rdi
leaq -0x40(%rbp), %rsi
leaq -0x80(%rbp), %rdx
callq 0x3f01
movb $0x1, %r12b
leaq -0xc0(%rbp), %rsi
movq %r14, %rdi
callq 0x2230
xorl %r12d, %r12d
movq 0xc126(%rip), %rsi      # 0xefe0
movq 0xc10f(%rip), %rdx      # 0xefd0
movq %r14, %rdi
callq 0x2210
jmp 0x2f38
movq %rdx, -0x40(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x30(%rbp)
movq 0x8(%rax), %rdx
movq %rdx, -0x38(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq -0x80(%rbp), %rdi
movl %r15d, %esi
callq 0x402d
leaq -0xc0(%rbp), %rdi
leaq -0x40(%rbp), %rsi
leaq -0x80(%rbp), %rdx
callq 0x3f01
movb $0x1, %r15b
leaq -0xc0(%rbp), %rsi
movq %r14, %rdi
callq 0x2230
xorl %r15d, %r15d
movq 0xc0b7(%rip), %rsi      # 0xefe0
movq 0xc0a0(%rip), %rdx      # 0xefd0
movq %r14, %rdi
callq 0x2210
movq %rax, %rbx
leaq -0xb0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2f58
callq 0x2170
jmp 0x2f58
movq %rax, %rbx
movb $0x1, %r15b
leaq -0x70(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2fa6
callq 0x2170
jmp 0x2fa6
movq %rax, %rbx
leaq -0xb0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2f8c
callq 0x2170
jmp 0x2f8c
movq %rax, %rbx
movb $0x1, %r12b
leaq -0x70(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2fbc
callq 0x2170
jmp 0x2fbc
movq %rax, %rbx
movb $0x1, %r15b
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x2fd2
callq 0x2170
jmp 0x2fd2
movq %rax, %rbx
movb $0x1, %r12b
movq -0x40(%rbp), %rdi
cmpq %r15, %rdi
je 0x3006
callq 0x2170
jmp 0x3006
movq %rax, %rbx
movb $0x1, %r15b
leaq -0x90(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2fe7
callq 0x2170
leaq -0x50(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2ff9
callq 0x2170
testb %r15b, %r15b
jne 0x3054
jmp 0x305c
movq %rax, %rbx
movb $0x1, %r12b
leaq -0x90(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x301b
callq 0x2170
leaq -0x50(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x302d
callq 0x2170
testb %r12b, %r12b
jne 0x3054
jmp 0x305c
jmp 0x3036
movq %rax, %rbx
leaq -0x50(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3054
callq 0x2170
jmp 0x3054
jmp 0x3051
jmp 0x3051
movq %rax, %rbx
movq %r14, %rdi
callq 0x2130
movq %rbx, %rdi
callq 0x2250