// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/parser.c
// Function: parse_region
layer parse_region(list *options, size_params params)
{
    int coords = option_find_int(options, "coords", 4);
    int classes = option_find_int(options, "classes", 20);
    int num = option_find_int(options, "num", 1);

    layer l = make_region_layer(params.batch, params.w, params.h, num, classes, coords);
    assert(l.outputs == params.inputs);

    l.log = option_find_int_quiet(options, "log", 0);
    l.sqrt = option_find_int_quiet(options, "sqrt", 0);

    l.softmax = option_find_int(options, "softmax", 0);
    l.background = option_find_int_quiet(options, "background", 0);
    l.max_boxes = option_find_int_quiet(options, "max",30);
    l.jitter = option_find_float(options, "jitter", .2);
    l.rescore = option_find_int_quiet(options, "rescore",0);

    l.thresh = option_find_float(options, "thresh", .5);
    l.classfix = option_find_int_quiet(options, "classfix", 0);
    l.absolute = option_find_int_quiet(options, "absolute", 0);
    l.random = option_find_int_quiet(options, "random", 0);

    l.coord_scale = option_find_float(options, "coord_scale", 1);
    l.object_scale = option_find_float(options, "object_scale", 1);
    l.noobject_scale = option_find_float(options, "noobject_scale", 1);
    l.mask_scale = option_find_float(options, "mask_scale", 1);
    l.class_scale = option_find_float(options, "class_scale", 1);
    l.bias_match = option_find_int_quiet(options, "bias_match",0);

    char *tree_file = option_find_str(options, "tree", 0);
    if (tree_file) l.softmax_tree = read_tree(tree_file);
    char *map_file = option_find_str(options, "map", 0);
    if (map_file) l.map = read_map(map_file);

    char *a = option_find_str(options, "anchors", 0);
    if(a){
        int len = strlen(a);
        int n = 1;
        int i;
        for(i = 0; i < len; ++i){
            if (a[i] == ',') ++n;
        }
        for(i = 0; i < n; ++i){
            float bias = atof(a);
            l.biases[i] = bias;
            a = strchr(a, ',')+1;
        }
    }
    return l;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x2a66b(%rip), %rsi     # 0x502a0
pushq $0x4
popq %rdx
movq %r14, %rdi
callq 0x2977d
movl %eax, %r15d
leaq 0x2a5a1(%rip), %rsi     # 0x501eb
pushq $0x14
popq %rdx
movq %r14, %rdi
callq 0x2977d
movl %eax, %r12d
leaq 0x2a594(%rip), %rsi     # 0x501f3
pushq $0x1
popq %rbp
movq %r14, %rdi
movl %ebp, %edx
callq 0x2977d
movl 0x4c(%rsp), %edx
movl 0x40(%rsp), %esi
movl 0x48(%rsp), %ecx
movl %r15d, (%rsp)
movq %rbx, %rdi
movl %eax, %r8d
movl %r12d, %r9d
callq 0x3047c
movl 0x58(%rbx), %eax
cmpl 0x44(%rsp), %eax
jne 0x25f2f
leaq 0x2a631(%rip), %rsi     # 0x502cf
movq %r14, %rdi
xorl %edx, %edx
callq 0x29884
movl %eax, 0x11c(%rbx)
leaq 0x2a61e(%rip), %rsi     # 0x502d3
movq %r14, %rdi
xorl %edx, %edx
callq 0x29884
movl %eax, 0xac(%rbx)
leaq 0x29fc5(%rip), %rsi     # 0x4fc91
movq %r14, %rdi
xorl %edx, %edx
callq 0x2977d
movl %eax, 0xf8(%rbx)
leaq 0x2a5f5(%rip), %rsi     # 0x502d8
movq %r14, %rdi
xorl %edx, %edx
callq 0x29884
movl %eax, 0x104(%rbx)
leaq 0x29f9b(%rip), %rsi     # 0x4fc95
pushq $0x1e
popq %rdx
movq %r14, %rdi
callq 0x29884
movl %eax, 0x88(%rbx)
leaq 0x2a52f(%rip), %rsi     # 0x50241
movss 0x2a196(%rip), %xmm0    # 0x4feb0
movq %r14, %rdi
callq 0x298c3
movss %xmm0, 0xd8(%rbx)
leaq 0x2a5b2(%rip), %rsi     # 0x502e3
movq %r14, %rdi
xorl %edx, %edx
callq 0x29884
movl %eax, 0x108(%rbx)
leaq 0x2c2d8(%rip), %rsi     # 0x52020
movss 0x264e4(%rip), %xmm0    # 0x4c234
movq %r14, %rdi
callq 0x298c3
movss %xmm0, 0x164(%rbx)
leaq 0x2a584(%rip), %rsi     # 0x502eb
movq %r14, %rdi
xorl %edx, %edx
callq 0x29884
movl %eax, 0x16c(%rbx)
leaq 0x2a576(%rip), %rsi     # 0x502f4
movq %r14, %rdi
xorl %edx, %edx
callq 0x29884
movl %eax, 0x170(%rbx)
leaq 0x2a4ce(%rip), %rsi     # 0x50263
movq %r14, %rdi
xorl %edx, %edx
callq 0x29884
movl %eax, 0x158(%rbx)
leaq 0x2a551(%rip), %rsi     # 0x502fd
movss 0x26254(%rip), %xmm0    # 0x4c008
movq %r14, %rdi
callq 0x298c3
movss %xmm0, 0x140(%rbx)
leaq 0x2a540(%rip), %rsi     # 0x5030b
movq %r14, %rdi
movss 0x26232(%rip), %xmm0    # 0x4c008
callq 0x298c3
movss %xmm0, 0x144(%rbx)
leaq 0x2a51f(%rip), %rsi     # 0x50309
movq %r14, %rdi
movss 0x26213(%rip), %xmm0    # 0x4c008
callq 0x298c3
movss %xmm0, 0x148(%rbx)
leaq 0x2a50f(%rip), %rsi     # 0x50318
movq %r14, %rdi
movss 0x261f4(%rip), %xmm0    # 0x4c008
callq 0x298c3
movss %xmm0, 0x14c(%rbx)
leaq 0x2a4fb(%rip), %rsi     # 0x50323
movq %r14, %rdi
movss 0x261d5(%rip), %xmm0    # 0x4c008
callq 0x298c3
movss %xmm0, 0x150(%rbx)
leaq 0x2a4e8(%rip), %rsi     # 0x5032f
movq %r14, %rdi
xorl %edx, %edx
callq 0x29884
movl %eax, 0x154(%rbx)
leaq 0x2a379(%rip), %rsi     # 0x501d7
movq %r14, %rdi
xorl %edx, %edx
callq 0x29737
testq %rax, %rax
je 0x25e7c
movq %rax, %rdi
callq 0x325a2
movq %rax, 0x490(%rbx)
leaq 0x2a3e7(%rip), %rsi     # 0x5026a
movq %r14, %rdi
xorl %edx, %edx
callq 0x29737
testq %rax, %rax
je 0x25ea1
movq %rax, %rdi
callq 0x3ca1
movq %rax, 0x1b8(%rbx)
leaq 0x2a3c6(%rip), %rsi     # 0x5026e
xorl %r15d, %r15d
movq %r14, %rdi
xorl %edx, %edx
callq 0x29737
testq %rax, %rax
je 0x25f1d
movq %rax, %r14
movq %rax, %rdi
callq 0x3140
testl %eax, %eax
cmovlel %r15d, %eax
cmpq %r15, %rax
je 0x25ee1
xorl %ecx, %ecx
cmpb $0x2c, (%r14,%r15)
sete %cl
addl %ecx, %ebp
incq %r15
jmp 0x25ecb
movq 0x230(%rbx), %r15
movl %ebp, %r12d
xorl %r13d, %r13d
pushq $0x2c
popq %rbp
cmpq %r13, %r12
je 0x25f1d
movq %r14, %rdi
callq 0x30f0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, (%r15,%r13,4)
movq %r14, %rdi
movl %ebp, %esi
callq 0x3150
movq %rax, %r14
incq %r14
incq %r13
jmp 0x25ef1
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2a2c1(%rip), %rdi     # 0x501f7
leaq 0x2a2d5(%rip), %rsi     # 0x50212
leaq 0x2a363(%rip), %rcx     # 0x502a7
movl $0x168, %edx            # imm = 0x168
callq 0x31b0