// File: /workspace/github_cpp_makefile_star2_O2/cannam[P]mini-cpp-convnet/flower.cpp
// Function: zeroPad(std::vector<std::vector<std::vector<float, std::allocator<float>>, std::allocator<std::vector<float, std::allocator<float>>>>, std::allocator<std::vector<std::vector<float, std::allocator<float>>, std::allocator<std::vector<float, std::allocator<float>>>>>> const&, unsigned long, unsigned long)
vector<vector<vector<float>>>
zeroPad(const vector<vector<vector<float>>> &in,
        size_t pad_y,
        size_t pad_x)
{
    size_t in_height = in.size();
    if (in_height == 0) {
        throw runtime_error("Input too small in zeroPad");
    }

    size_t in_width = in[0].size();
    if (in_width == 0) {
        throw runtime_error("Input too small in zeroPad");
    }
    
    size_t depth = in[0][0].size();
    
#ifdef VERBOSE
    cerr << "zeroPad: input size " << in_width << "x" << in_height
         << "; padding " << pad_x << "," << pad_y << "; output size "
         << in_width + 2 * pad_x << "x" << in_height + 2 * pad_y
         << " and depth " << depth << endl;
#endif
    
    auto out =
        vector<vector<vector<float>>>
        (in_height + 2 * pad_y,
         vector<vector<float>>
         (in_width + 2 * pad_x,
          vector<float>
          (depth,
           0.f)));

    for (size_t y = 0; y < in_height; ++y) {
        for (size_t x = 0; x < in_width; ++x) {
            for (size_t c = 0; c < depth; ++c) {
                out[y + pad_y][x + pad_x][c] = in[y][x][c];
            }
        }
    }

    return out;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rcx, 0x8(%rsp)
movq %rdx, %rbp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rsi
movq 0x8(%r14), %rdi
movq %rdi, %rax
subq %rsi, %rax
pushq $0x18
popq %rcx
cqto
idivq %rcx
cmpq %rsi, %rdi
je 0x1b6e9
movq %rax, %r15
movq (%rsi), %rdi
movq 0x8(%rsi), %rsi
movq %rsi, %rax
subq %rdi, %rax
cqto
idivq %rcx
cmpq %rdi, %rsi
je 0x1b705
movq %rax, %r12
movq 0x8(%rdi), %r13
subq (%rdi), %r13
sarq $0x2, %r13
leaq 0x14(%rsp), %rdx
andl $0x0, (%rdx)
leaq 0x18(%rsp), %rdi
leaq 0x7(%rsp), %rcx
movq %r13, %rsi
callq 0x1ca80
movq 0x8(%rsp), %rax
leaq (%r12,%rax,2), %rsi
leaq 0x30(%rsp), %rdi
leaq 0x18(%rsp), %rdx
leaq 0x6(%rsp), %rcx
callq 0x1cad6
leaq (%r15,%rbp,2), %rsi
leaq 0x30(%rsp), %rdx
leaq 0x5(%rsp), %rcx
movq %rbx, %rdi
callq 0x1cb2c
leaq 0x30(%rsp), %rdi
callq 0x1cb82
leaq 0x18(%rsp), %rdi
callq 0x1cef2
xorl %eax, %eax
imulq $0x18, %rbp, %rcx
imulq $0x18, 0x8(%rsp), %rdx
cmpq %r15, %rax
je 0x1b6d7
imulq $0x18, %rax, %rsi
xorl %edi, %edi
cmpq %r12, %rdi
je 0x1b6d2
movq (%r14), %r8
addq %rsi, %r8
movq (%rbx), %r9
addq %rsi, %r9
addq %rcx, %r9
imulq $0x18, %rdi, %r10
xorl %r11d, %r11d
cmpq %r11, %r13
je 0x1b6cd
movq (%r8), %rbp
movq (%rbp,%r10), %rbp
movss (%rbp,%r11,4), %xmm0
movq (%r9), %rbp
addq %r10, %rbp
movq (%rdx,%rbp), %rbp
movss %xmm0, (%rbp,%r11,4)
incq %r11
jmp 0x1b6a3
incq %rdi
jmp 0x1b688
incq %rax
jmp 0x1b67d
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x20e0
movq %rax, %r14
leaq 0x39bb(%rip), %rsi      # 0x1f0b6
movq %rax, %rdi
callq 0x2090
jmp 0x1b71f
pushq $0x10
popq %rdi
callq 0x20e0
movq %rax, %r14
leaq 0x399f(%rip), %rsi      # 0x1f0b6
movq %rax, %rdi
callq 0x2090
movq 0x968ca(%rip), %rsi     # 0xb1ff0
movq 0x96883(%rip), %rdx     # 0xb1fb0
movq %r14, %rdi
callq 0x22c0
jmp 0x1b737
movq %rax, %rbx
movq %r14, %rdi
callq 0x2160
jmp 0x1b765
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x1cb82
jmp 0x1b756
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x1cef2
jmp 0x1b765
movq %rax, %rbx
movq %rbx, %rdi
callq 0x22d0