// File: /workspace/github_cpp_makefile_star2_O3/matteotiziano[P]simple-wavelet/wavelet.cpp
// Function: Wavelet<double>::Upconv(Matrix<double> const&, std::vector<double, std::allocator<double>> const&, std::vector<double, std::allocator<double>> const&, MatrixSize const&) const
Matrix<T> Wavelet<T>::Upconv(const Matrix<T>& x, const std::vector<T>& f1, const std::vector<T>& f2, const MatrixSize& s) const {
  // Upsample each column
  Matrix<T> tmp(s[0], x.GetNumColumns());
  for (size_t j = 0; j < x.GetNumColumns(); j++) {
    tmp.SetColumn(Upconv(x.GetColumn(j), f1, s.GetNumRows()), j);
  }
  // Upsample each row of tmp Matrix
  Matrix<T> y(s.GetNumRows(), s.GetNumColums());
  for (size_t i = 0; i < y.GetNumRows(); i++) {
    y.SetRow(Upconv(tmp.GetRow(i), f2, s.GetNumColums()), i);
  }
  return y;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %r9, %r14
movq %r8, 0x40(%rsp)
movq %rcx, 0x48(%rsp)
movq %rdx, %rbp
movq %rsi, %r12
movq %rdi, 0x8(%rsp)
movq (%r9), %rbx
movq %rdx, %rdi
callq 0x6394
leaq 0x50(%rsp), %rdi
xorps %xmm0, %xmm0
movq %rbx, %rsi
movq %rax, %rdx
callq 0x6218
xorl %r15d, %r15d
leaq 0x10(%rsp), %rbx
leaq 0x28(%rsp), %r13
movq %rbp, %rdi
callq 0x6394
cmpq %rax, %r15
jae 0x4ceb
movq %rbx, %rdi
movq %rbp, %rsi
movq %r15, %rdx
callq 0x6912
movq (%r14), %r8
movq %r13, %rdi
movq %r12, %rsi
movq %rbx, %rdx
movq 0x48(%rsp), %rcx
callq 0x4164
leaq 0x50(%rsp), %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x6752
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x4ccf
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x21d0
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x4ce6
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x21d0
incq %r15
jmp 0x4c77
movq (%r14), %rsi
movq 0x8(%r14), %rdx
xorps %xmm0, %xmm0
movq 0x8(%rsp), %rdi
callq 0x6218
xorl %r15d, %r15d
leaq 0x10(%rsp), %r13
leaq 0x50(%rsp), %rbp
leaq 0x28(%rsp), %rbx
movq 0x8(%rsp), %rdi
callq 0x6390
cmpq %rax, %r15
jae 0x4d88
movq %r13, %rdi
movq %rbp, %rsi
movq %r15, %rdx
callq 0x6866
movq 0x8(%r14), %r8
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq 0x40(%rsp), %rcx
callq 0x4164
movq 0x8(%rsp), %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x6670
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x4d6c
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x21d0
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x4d83
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x21d0
incq %r15
jmp 0x4d11
leaq 0x50(%rsp), %rdi
callq 0x6376
movq 0x8(%rsp), %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4e2e
movq %rax, %r14
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x4dca
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x21d0
jmp 0x4dca
movq %rax, %r14
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x4e22
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x21d0
jmp 0x4e22
jmp 0x4e1f
movq %rax, %r14
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x4e04
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x21d0
jmp 0x4e04
movq %rax, %r14
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x4e31
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x21d0
jmp 0x4e31
jmp 0x4e2e
movq %rax, %r14
movq 0x8(%rsp), %rdi
callq 0x6376
jmp 0x4e31
movq %rax, %r14
leaq 0x50(%rsp), %rdi
callq 0x6376
movq %r14, %rdi
callq 0x22d0
nop