// File: /workspace/github_c_makefile_star2_O1/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 0x24c67(%rip), %rsi     # 0x5716c
movq %r14, %rdi
movl $0x1, %edx
callq 0x34d9f
movl %eax, 0x14(%rsp)
leaq 0x260ad(%rip), %rsi     # 0x585ca
movq %r14, %rdi
movl $0x1, %edx
callq 0x34d9f
movl %eax, %r13d
leaq 0x24b4a(%rip), %rsi     # 0x5707e
movq %r14, %rdi
movl $0x1, %edx
callq 0x34d9f
movq %rax, 0x28(%rsp)
leaq 0x24b38(%rip), %rsi     # 0x57085
movq %r14, %rdi
xorl %edx, %edx
callq 0x34e93
movl %eax, (%rsp)
leaq 0x24b9a(%rip), %rsi     # 0x570fb
movq %r14, %rdi
xorl %edx, %edx
callq 0x34e93
movl %eax, %r15d
leaq 0x24b8e(%rip), %rsi     # 0x57103
movq %r14, %rdi
movl $0x1, %edx
callq 0x34e93
movq %rax, 0x20(%rsp)
leaq 0x24664(%rip), %rsi     # 0x56bf2
leaq 0x24103(%rip), %rdx     # 0x56698
movq %r14, %rdi
callq 0x34d5b
movq %rax, %rdi
callq 0x27092
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 0x325ea
leaq 0x24b25(%rip), %rdi     # 0x5710a
callq 0xe956
movl %r13d, %ebx
shrl $0x1f, %ebx
addl %r13d, %ebx
sarl %ebx
cmpl $0x0, (%rsp)
cmovel %r15d, %ebx
leaq 0x24ae7(%rip), %rsi     # 0x570eb
movq %r14, %rdi
xorl %edx, %edx
callq 0x34e93
movq %rax, (%rsp)
leaq 0x24b25(%rip), %rsi     # 0x5713e
movq %r14, %rdi
xorl %edx, %edx
callq 0x34e93
movl %eax, %r15d
leaq 0x24b18(%rip), %rsi     # 0x57145
movq %r14, %rdi
xorl %edx, %edx
callq 0x34e93
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 0x39e8
addq $0x50, %rsp
leaq 0x24ac2(%rip), %rsi     # 0x5714a
movq %r14, %rdi
xorl %edx, %edx
callq 0x34e93
movl %eax, 0x50(%r12)
leaq 0x24ab4(%rip), %rsi     # 0x57152
xorps %xmm0, %xmm0
movq %r14, %rdi
callq 0x34ead
movss %xmm0, 0xd0(%r12)
movq %r12, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq