// File: /workspace/github_c_makefile_star2_O3/SimpleDoger[P]Darknet_CPU_Only/parser.c
// Function: parse_convolutional
convolutional_layer parse_convolutional(list *options, size_params params)
{
    int n = option_find_int(options, "filters",1);
    int size = option_find_int(options, "size",1);
    int stride = option_find_int(options, "stride",1);
    int pad = option_find_int_quiet(options, "pad",0);
    int padding = option_find_int_quiet(options, "padding",0);
    int groups = option_find_int_quiet(options, "groups", 1);
    if(pad) padding = size/2;

    char *activation_s = option_find_str(options, "activation", "logistic");
    ACTIVATION activation = get_activation(activation_s);

    int batch,h,w,c;
    h = params.h;
    w = params.w;
    c = params.c;
    batch=params.batch;
    if(!(h && w && c)) error("Layer before convolutional layer must output image.");
    int batch_normalize = option_find_int_quiet(options, "batch_normalize", 0);
    int binary = option_find_int_quiet(options, "binary", 0);
    int xnor = option_find_int_quiet(options, "xnor", 0);

    convolutional_layer layer = make_convolutional_layer(batch,h,w,c,n,groups,size,stride,padding,activation, batch_normalize, binary, xnor, params.net->adam);
    layer.flipped = option_find_int_quiet(options, "flipped", 0);
    layer.dot = option_find_float_quiet(options, "dot", 0);

    return layer;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r14
movq %rdi, 0x30(%rsp)
leaq 0x70(%rsp), %r12
leaq 0x24da7(%rip), %rsi     # 0x5926c
movq %r14, %rdi
movl $0x1, %edx
callq 0x36eed
movl %eax, 0x14(%rsp)
leaq 0x26245(%rip), %rsi     # 0x5a722
movq %r14, %rdi
movl $0x1, %edx
callq 0x36eed
movl %eax, %r13d
leaq 0x24c8a(%rip), %rsi     # 0x5917e
movq %r14, %rdi
movl $0x1, %edx
callq 0x36eed
movq %rax, 0x28(%rsp)
leaq 0x24c78(%rip), %rsi     # 0x59185
movq %r14, %rdi
xorl %edx, %edx
callq 0x37008
movl %eax, (%rsp)
leaq 0x24cda(%rip), %rsi     # 0x591fb
movq %r14, %rdi
xorl %edx, %edx
callq 0x37008
movl %eax, %r15d
leaq 0x24cce(%rip), %rsi     # 0x59203
movq %r14, %rdi
movl $0x1, %edx
callq 0x37008
movq %rax, 0x20(%rsp)
leaq 0x247a4(%rip), %rsi     # 0x58cf2
leaq 0x24213(%rip), %rdx     # 0x58768
movq %r14, %rdi
callq 0x36e77
movq %rax, %rdi
callq 0x28746
movq %rax, 0x18(%rsp)
movl (%r12), %eax
movl %eax, 0x8(%rsp)
movl 0x8(%r12), %eax
movl 0xc(%r12), %ecx
movl 0x10(%r12), %ebp
movl %eax, 0x10(%rsp)
testl %eax, %eax
setne %al
movl %ecx, 0xc(%rsp)
testl %ecx, %ecx
setne %cl
andb %al, %cl
testl %ebp, %ebp
setne %al
testb %al, %cl
jne 0x345aa
leaq 0x24c65(%rip), %rdi     # 0x5920a
callq 0xf141
movl %r13d, %ebx
shrl $0x1f, %ebx
addl %r13d, %ebx
sarl %ebx
cmpl $0x0, (%rsp)
cmovel %r15d, %ebx
leaq 0x24c27(%rip), %rsi     # 0x591eb
movq %r14, %rdi
xorl %edx, %edx
callq 0x37008
movq %rax, (%rsp)
leaq 0x24c65(%rip), %rsi     # 0x5923e
movq %r14, %rdi
xorl %edx, %edx
callq 0x37008
movl %eax, %r15d
leaq 0x24c58(%rip), %rsi     # 0x59245
movq %r14, %rdi
xorl %edx, %edx
callq 0x37008
movq 0x20(%r12), %rcx
movl 0x70(%rcx), %r10d
subq $0x8, %rsp
movq 0x38(%rsp), %r12
movq %r12, %rdi
movl 0x10(%rsp), %esi
movl 0x18(%rsp), %edx
movl 0x14(%rsp), %ecx
movl %ebp, %r8d
movl 0x1c(%rsp), %r9d
pushq %r10
pushq %rax
pushq %r15
pushq 0x20(%rsp)
pushq 0x40(%rsp)
pushq %rbx
pushq 0x60(%rsp)
pushq %r13
pushq 0x68(%rsp)
callq 0x3ac3
addq $0x50, %rsp
leaq 0x24c02(%rip), %rsi     # 0x5924a
movq %r14, %rdi
xorl %edx, %edx
callq 0x37008
movl %eax, 0x50(%r12)
leaq 0x24bf4(%rip), %rsi     # 0x59252
xorps %xmm0, %xmm0
movq %r14, %rdi
callq 0x37065
movss %xmm0, 0xd0(%r12)
movq %r12, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq