// File: /workspace/github_c_makefile_star2_O1/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 0x244c5(%rip), %rsi     # 0x57250
movq %r14, %rdi
movl $0x4, %edx
callq 0x34d9f
movl %eax, %ebp
leaq 0x243fa(%rip), %rsi     # 0x5719b
movq %r14, %rdi
movl $0x14, %edx
callq 0x34d9f
movl %eax, %r15d
leaq 0x243eb(%rip), %rsi     # 0x571a3
movq %r14, %rdi
movl $0x1, %edx
callq 0x34d9f
movl 0x4c(%rsp), %edx
movl 0x40(%rsp), %esi
movl 0x48(%rsp), %ecx
movl %ebp, (%rsp)
movq %rbx, %rdi
movl %eax, %r8d
movl %r15d, %r9d
callq 0x80c9
movl 0x58(%rbx), %eax
cmpl 0x44(%rsp), %eax
jne 0x33097
leaq 0x24489(%rip), %rsi     # 0x5727f
movq %r14, %rdi
xorl %edx, %edx
callq 0x34e93
movl %eax, 0x11c(%rbx)
leaq 0x24476(%rip), %rsi     # 0x57283
movq %r14, %rdi
xorl %edx, %edx
callq 0x34e93
movl %eax, 0xac(%rbx)
leaq 0x23e1d(%rip), %rsi     # 0x56c41
movq %r14, %rdi
xorl %edx, %edx
callq 0x34d9f
movl %eax, 0xf8(%rbx)
leaq 0x2444d(%rip), %rsi     # 0x57288
movq %r14, %rdi
xorl %edx, %edx
callq 0x34e93
movl %eax, 0x104(%rbx)
leaq 0x23df3(%rip), %rsi     # 0x56c45
movq %r14, %rdi
movl $0x1e, %edx
callq 0x34e93
movl %eax, 0x88(%rbx)
leaq 0x24385(%rip), %rsi     # 0x571f1
movss 0x23fec(%rip), %xmm0    # 0x56e60
movq %r14, %rdi
callq 0x34ed2
movss %xmm0, 0xd8(%rbx)
leaq 0x24408(%rip), %rsi     # 0x57293
movq %r14, %rdi
xorl %edx, %edx
callq 0x34e93
movl %eax, 0x108(%rbx)
leaq 0x26166(%rip), %rsi     # 0x59008
movss 0x2038a(%rip), %xmm0    # 0x53234
movq %r14, %rdi
callq 0x34ed2
movss %xmm0, 0x164(%rbx)
leaq 0x243da(%rip), %rsi     # 0x5729b
movq %r14, %rdi
xorl %edx, %edx
callq 0x34e93
movl %eax, 0x16c(%rbx)
leaq 0x243cc(%rip), %rsi     # 0x572a4
movq %r14, %rdi
xorl %edx, %edx
callq 0x34e93
movl %eax, 0x170(%rbx)
leaq 0x24324(%rip), %rsi     # 0x57213
movq %r14, %rdi
xorl %edx, %edx
callq 0x34e93
movl %eax, 0x158(%rbx)
leaq 0x243a7(%rip), %rsi     # 0x572ad
movss 0x200fa(%rip), %xmm0    # 0x53008
movq %r14, %rdi
callq 0x34ed2
movss %xmm0, 0x140(%rbx)
leaq 0x24396(%rip), %rsi     # 0x572bb
movq %r14, %rdi
movss 0x200d8(%rip), %xmm0    # 0x53008
callq 0x34ed2
movss %xmm0, 0x144(%rbx)
leaq 0x24375(%rip), %rsi     # 0x572b9
movq %r14, %rdi
movss 0x200b9(%rip), %xmm0    # 0x53008
callq 0x34ed2
movss %xmm0, 0x148(%rbx)
leaq 0x24365(%rip), %rsi     # 0x572c8
movq %r14, %rdi
movss 0x2009a(%rip), %xmm0    # 0x53008
callq 0x34ed2
movss %xmm0, 0x14c(%rbx)
leaq 0x24351(%rip), %rsi     # 0x572d3
movq %r14, %rdi
movss 0x2007b(%rip), %xmm0    # 0x53008
callq 0x34ed2
movss %xmm0, 0x150(%rbx)
leaq 0x2433e(%rip), %rsi     # 0x572df
movq %r14, %rdi
xorl %edx, %edx
callq 0x34e93
movl %eax, 0x154(%rbx)
leaq 0x241cf(%rip), %rsi     # 0x57187
movq %r14, %rdi
xorl %edx, %edx
callq 0x34d5b
testq %rax, %rax
je 0x32fd6
movq %rax, %rdi
callq 0x3cd97
movq %rax, 0x490(%rbx)
leaq 0x2423d(%rip), %rsi     # 0x5721a
movq %r14, %rdi
xorl %edx, %edx
callq 0x34d5b
testq %rax, %rax
je 0x32ffb
movq %rax, %rdi
callq 0xe0bf
movq %rax, 0x1b8(%rbx)
leaq 0x2421c(%rip), %rsi     # 0x5721e
movq %r14, %rdi
xorl %edx, %edx
callq 0x34d5b
testq %rax, %rax
je 0x33085
movq %rax, %r14
movq %rax, %rdi
callq 0x3150
movl $0x1, %r15d
movl $0x1, %ecx
testl %eax, %eax
jle 0x33047
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
xorl %edx, %edx
xorl %esi, %esi
cmpb $0x2c, (%r14,%rdx)
sete %sil
addl %esi, %ecx
incq %rdx
cmpq %rdx, %rax
jne 0x33032
movq 0x230(%rbx), %r12
cmpl $0x2, %ecx
cmovgel %ecx, %r15d
xorl %r13d, %r13d
movq %r14, %rdi
callq 0x3100
cvtsd2ss %xmm0, %xmm0
movss %xmm0, (%r12,%r13,4)
movq %r14, %rdi
movl $0x2c, %esi
callq 0x3160
movq %rax, %r14
incq %r14
incq %r13
cmpq %r13, %r15
jne 0x33058
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x24109(%rip), %rdi     # 0x571a7
leaq 0x2411d(%rip), %rsi     # 0x571c2
leaq 0x241ab(%rip), %rcx     # 0x57257
movl $0x168, %edx            # imm = 0x168
callq 0x31c0