// File: /workspace/github_cpp_makefile_star2_O1/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, %ebp
movl %ecx, %r14d
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
leaq 0xca36(%rip), %rdi      # 0xe01e
callq 0x147c
movq (%r13), %rdx
leaq 0x10b08(%rip), %r13     # 0x12100
leaq 0xca27(%rip), %rsi      # 0xe026
movq %r13, %rdi
xorl %eax, %eax
callq 0x1040
movq %r13, %rdi
callq 0x147c
leaq 0xca19(%rip), %rdi      # 0xe031
callq 0x147c
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%r12), %rsi
movq 0x8(%r12), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rdi
callq 0xd204
leaq 0x38(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %rdi
callq 0xd204
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %r15
movq %r15, %rsi
callq 0x1574
movq (%r15), %rdi
cmpq %r12, %rdi
je 0x1681
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x10f0
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x1698
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x10f0
movl 0x80(%rsp), %r12d
leaq 0xcc21(%rip), %r13      # 0xe2c8
movq %r13, %rdi
callq 0x147c
leaq 0xc98f(%rip), %rdi      # 0xe045
callq 0x147c
leaq 0xc98e(%rip), %rdi      # 0xe050
callq 0x147c
leaq 0xc990(%rip), %r15      # 0xe05e
movq %r15, %rdi
callq 0x147c
movq %r13, %rdi
callq 0x147c
leaq 0xc97b(%rip), %rdi      # 0xe060
callq 0x147c
leaq 0xc97a(%rip), %rdi      # 0xe06b
callq 0x147c
movq %r15, %rdi
callq 0x147c
leaq 0xc974(%rip), %rdi      # 0xe079
callq 0x147c
leaq 0x109ef(%rip), %r15     # 0x12100
leaq 0xc975(%rip), %rsi      # 0xe08d
movq %r15, %rdi
movl %r14d, %edx
xorl %eax, %eax
callq 0x1040
movq %r15, %rdi
callq 0x147c
cmpl %ebx, %ebp
jne 0x1743
leaq 0x109c8(%rip), %rdi     # 0x12100
leaq 0xc95d(%rip), %rsi      # 0xe09c
movl %ebp, %edx
jmp 0x1771
leaq 0x109b6(%rip), %r14     # 0x12100
leaq 0xc953(%rip), %rsi      # 0xe0a4
movq %r14, %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0x1040
movq %r14, %rdi
callq 0x147c
leaq 0xc942(%rip), %rsi      # 0xe0ae
movq %r14, %rdi
movl %ebx, %edx
xorl %eax, %eax
callq 0x1040
movl 0x90(%rsp), %ebx
leaq 0x1097a(%rip), %rdi     # 0x12100
callq 0x147c
movl 0x88(%rsp), %ebp
cmpl %ebp, %r12d
jne 0x17aa
leaq 0x10962(%rip), %rdi     # 0x12100
leaq 0xc913(%rip), %rsi      # 0xe0b8
movl %r12d, %edx
jmp 0x17d9
leaq 0x1094f(%rip), %r14     # 0x12100
leaq 0xc910(%rip), %rsi      # 0xe0c8
movq %r14, %rdi
movl %r12d, %edx
xorl %eax, %eax
callq 0x1040
movq %r14, %rdi
callq 0x147c
leaq 0xc901(%rip), %rsi      # 0xe0d5
movq %r14, %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0x1040
leaq 0x10919(%rip), %r14     # 0x12100
movq %r14, %rdi
callq 0x147c
leaq 0xc8ec(%rip), %rsi      # 0xe0e2
movq %r14, %rdi
movl %ebx, %edx
xorl %eax, %eax
callq 0x1040
movq %r14, %rdi
callq 0x147c
leaq 0xc8dc(%rip), %rdi      # 0xe0ed
callq 0x147c
leaq 0xc8e0(%rip), %rdi      # 0xe0fd
callq 0x147c
leaq 0xc8e3(%rip), %rsi      # 0xe10c
leaq 0xcf60(%rip), %rdx      # 0xe790
movq %r14, %rdi
xorl %eax, %eax
callq 0x1040
movq %r14, %rdi
callq 0x147c
leaq 0xc815(%rip), %rbx      # 0xe05e
movq %rbx, %rdi
callq 0x147c
leaq 0xc8bc(%rip), %rdi      # 0xe114
callq 0x147c
leaq 0xc8be(%rip), %rdi      # 0xe122
callq 0x147c
leaq 0xc8c3(%rip), %rdi      # 0xe133
callq 0x147c
movq %rbx, %rdi
callq 0x147c
movq %rbx, %rdi
callq 0x147c
movq %rbx, %rdi
callq 0x147c
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x18b6
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x10f0
movq %rbx, %rdi
callq 0x1160