// File: /workspace/github_cpp_makefile_star2_O2/kazel1990[P]Inception-v4/generator.cpp
// Function: convolution(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, int, int, int, int, int)
void convolution(std::string name, std::string bot, std::string top,
        int output, int pad_h, int pad_w, int kernel_h, int kernel_w,
        int stride)
{
    print("layer {");
    sprintf(buf,"name: \"%s\"",name.c_str());
    print(buf);
    print("type: \"Convolution\"");
    in_out(bot,top);
    print("param {");
    print("lr_mult: 1");
    print("decay_mult: 1");
    print("}");
    print("param {");
    print("lr_mult: 2");
    print("decay_mult: 0");
    print("}");

    print("convolution_param {");
    sprintf(buf,"num_output: %d",output);
    print(buf);
    if(pad_h == pad_w)
    {
        sprintf(buf,"pad: %d",pad_h);
        print(buf);
    }
    else
    {
        sprintf(buf,"pad_h: %d",pad_h);
        print(buf);
        sprintf(buf,"pad_w: %d",pad_w);
        print(buf);
    }
    if(kernel_h == kernel_w)
    {
        sprintf(buf,"kernel_size: %d",kernel_h);
        print(buf);
    }
    else
    {
        sprintf(buf,"kernel_h: %d",kernel_h);
        print(buf);
        sprintf(buf,"kernel_w: %d",kernel_w);
        print(buf);
    }
    sprintf(buf,"stride: %d",stride);
    print(buf);

    print("weight_filler {");
    print("type: \"xavier\"");
    sprintf(buf,"std: %s",conv_xavier_std);
    print(buf);
    print("}");

    print("bias_filler {");
    print("type: \"constant\"");
    print("value: 0.2");
    print("}");

    print("}");

    print("}");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %r9d, %ebx
movl %r8d, %r14d
movl %ecx, %r12d
movq %rdx, %r15
movq %rsi, %r13
movq %rdi, %rbp
leaq 0x7c0f(%rip), %rdi      # 0x901e
callq 0x12ac
movq (%rbp), %rdx
leaq 0xbcf1(%rip), %rbp      # 0xd110
leaq 0x7c00(%rip), %rsi      # 0x9026
movq %rbp, %rdi
xorl %eax, %eax
callq 0x1040
movq %rbp, %rdi
callq 0x12ac
leaq 0x7bf2(%rip), %rdi      # 0x9031
callq 0x12ac
leaq 0x8(%rsp), %rdi
movq %r13, %rsi
callq 0x1130
leaq 0x28(%rsp), %rdi
movq %r15, %rsi
callq 0x1130
movl 0x80(%rsp), %r15d
leaq 0x8(%rsp), %r13
leaq 0x28(%rsp), %rbp
movq %r13, %rdi
movq %rbp, %rsi
callq 0x139b
movq %rbp, %rdi
callq 0x1090
movq %r13, %rdi
callq 0x1090
leaq 0x7e36(%rip), %r13      # 0x92c8
movq %r13, %rdi
callq 0x12ac
leaq 0x7ba4(%rip), %rdi      # 0x9045
callq 0x12ac
leaq 0x7ba3(%rip), %rdi      # 0x9050
callq 0x12ac
leaq 0x7ba5(%rip), %rbp      # 0x905e
movq %rbp, %rdi
callq 0x12ac
movq %r13, %rdi
callq 0x12ac
leaq 0x7b90(%rip), %rdi      # 0x9060
callq 0x12ac
leaq 0x7b8f(%rip), %rdi      # 0x906b
callq 0x12ac
movq %rbp, %rdi
callq 0x12ac
leaq 0x7b89(%rip), %rdi      # 0x9079
callq 0x12ac
leaq 0xbc14(%rip), %r13      # 0xd110
leaq 0x7b8a(%rip), %rsi      # 0x908d
movq %r13, %rdi
movl %r12d, %edx
xorl %eax, %eax
callq 0x1040
movq %r13, %rdi
callq 0x12ac
cmpl %ebx, %r14d
jne 0x1530
leaq 0xbbec(%rip), %rdi      # 0xd110
leaq 0x7b71(%rip), %rsi      # 0x909c
movl %r14d, %edx
jmp 0x155f
leaq 0xbbd9(%rip), %r12      # 0xd110
leaq 0x7b66(%rip), %rsi      # 0x90a4
movq %r12, %rdi
movl %r14d, %edx
xorl %eax, %eax
callq 0x1040
movq %r12, %rdi
callq 0x12ac
leaq 0x7b54(%rip), %rsi      # 0x90ae
movq %r12, %rdi
movl %ebx, %edx
xorl %eax, %eax
callq 0x1040
movl 0x90(%rsp), %ebx
leaq 0xbb9c(%rip), %rdi      # 0xd110
callq 0x12ac
movl 0x88(%rsp), %ebp
cmpl %ebp, %r15d
jne 0x1598
leaq 0xbb84(%rip), %rdi      # 0xd110
leaq 0x7b25(%rip), %rsi      # 0x90b8
movl %r15d, %edx
jmp 0x15c7
leaq 0xbb71(%rip), %r14      # 0xd110
leaq 0x7b22(%rip), %rsi      # 0x90c8
movq %r14, %rdi
movl %r15d, %edx
xorl %eax, %eax
callq 0x1040
movq %r14, %rdi
callq 0x12ac
leaq 0x7b13(%rip), %rsi      # 0x90d5
movq %r14, %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0x1040
leaq 0xbb3b(%rip), %r14      # 0xd110
movq %r14, %rdi
callq 0x12ac
leaq 0x7afe(%rip), %rsi      # 0x90e2
movq %r14, %rdi
movl %ebx, %edx
xorl %eax, %eax
callq 0x1040
movq %r14, %rdi
callq 0x12ac
leaq 0x7aee(%rip), %rdi      # 0x90ed
callq 0x12ac
leaq 0x7af2(%rip), %rdi      # 0x90fd
callq 0x12ac
leaq 0x7af5(%rip), %rsi      # 0x910c
leaq 0x8172(%rip), %rdx      # 0x9790
movq %r14, %rdi
xorl %eax, %eax
callq 0x1040
movq %r14, %rdi
callq 0x12ac
leaq 0x7a27(%rip), %rbx      # 0x905e
movq %rbx, %rdi
callq 0x12ac
leaq 0x7ace(%rip), %rdi      # 0x9114
callq 0x12ac
leaq 0x7ad0(%rip), %rdi      # 0x9122
callq 0x12ac
leaq 0x7ad5(%rip), %rdi      # 0x9133
callq 0x12ac
movq %rbx, %rdi
callq 0x12ac
movq %rbx, %rdi
callq 0x12ac
movq %rbx, %rdi
callq 0x12ac
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x1090
movq %rbx, %rdi
callq 0x1170