// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x50(%rbp)
movq %rdi, -0x58(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
movq %rsi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x36515(%rip), %rsi     # 0x74b0c
movl $0x4, %edx
callq 0x42990
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x36448(%rip), %rsi     # 0x74a57
movl $0x14, %edx
callq 0x42990
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x36438(%rip), %rsi     # 0x74a5f
movl $0x1, %edx
callq 0x42990
movq -0x50(%rbp), %rdi
movl %eax, %ecx
movq -0x48(%rbp), %rax
movl %ecx, -0x14(%rbp)
movl (%rax), %esi
movl 0xc(%rax), %edx
movl 0x8(%rax), %ecx
movl -0x14(%rbp), %r8d
movl -0x10(%rbp), %r9d
movl -0xc(%rbp), %eax
movl %eax, (%rsp)
callq 0x4bc00
movq -0x50(%rbp), %rdi
movq -0x48(%rbp), %rcx
movl 0x58(%rdi), %eax
cmpl 0x4(%rcx), %eax
jne 0x3e66b
jmp 0x3e68a
leaq 0x363f1(%rip), %rdi     # 0x74a63
leaq 0x36405(%rip), %rsi     # 0x74a7e
movl $0x168, %edx            # imm = 0x168
leaq 0x3648e(%rip), %rcx     # 0x74b13
callq 0x3180
movq -0x8(%rbp), %rdi
leaq 0x364a6(%rip), %rsi     # 0x74b3b
xorl %edx, %edx
callq 0x42b50
movl %eax, %ecx
movq -0x50(%rbp), %rax
movl %ecx, 0x11c(%rax)
movq -0x8(%rbp), %rdi
leaq 0x3648c(%rip), %rsi     # 0x74b3f
xorl %edx, %edx
callq 0x42b50
movl %eax, %ecx
movq -0x50(%rbp), %rax
movl %ecx, 0xac(%rax)
movq -0x8(%rbp), %rdi
leaq 0x35ef4(%rip), %rsi     # 0x745c5
xorl %edx, %edx
callq 0x42990
movl %eax, %ecx
movq -0x50(%rbp), %rax
movl %ecx, 0xf8(%rax)
movq -0x8(%rbp), %rdi
leaq 0x36455(%rip), %rsi     # 0x74b44
xorl %edx, %edx
callq 0x42b50
movl %eax, %ecx
movq -0x50(%rbp), %rax
movl %ecx, 0x104(%rax)
movq -0x8(%rbp), %rdi
leaq 0x35ebc(%rip), %rsi     # 0x745c9
movl $0x1e, %edx
callq 0x42b50
movl %eax, %ecx
movq -0x50(%rbp), %rax
movl %ecx, 0x88(%rax)
movq -0x8(%rbp), %rdi
leaq 0x3637f(%rip), %rsi     # 0x74aad
movss 0x360aa(%rip), %xmm0    # 0x747e0
callq 0x42c00
movq -0x50(%rbp), %rax
movss %xmm0, 0xd8(%rax)
movq -0x8(%rbp), %rdi
leaq 0x363fd(%rip), %rsi     # 0x74b4f
xorl %edx, %edx
callq 0x42b50
movl %eax, %ecx
movq -0x50(%rbp), %rax
movl %ecx, 0x108(%rax)
movq -0x8(%rbp), %rdi
leaq 0x38134(%rip), %rsi     # 0x768a4
movss 0x32a74(%rip), %xmm0    # 0x711ec
callq 0x42c00
movq -0x50(%rbp), %rax
movss %xmm0, 0x164(%rax)
movq -0x8(%rbp), %rdi
leaq 0x363c3(%rip), %rsi     # 0x74b57
xorl %edx, %edx
callq 0x42b50
movl %eax, %ecx
movq -0x50(%rbp), %rax
movl %ecx, 0x16c(%rax)
movq -0x8(%rbp), %rdi
leaq 0x363ae(%rip), %rsi     # 0x74b60
xorl %edx, %edx
callq 0x42b50
movl %eax, %ecx
movq -0x50(%rbp), %rax
movl %ecx, 0x170(%rax)
movq -0x8(%rbp), %rdi
leaq 0x362ff(%rip), %rsi     # 0x74acf
xorl %edx, %edx
callq 0x42b50
movl %eax, %ecx
movq -0x50(%rbp), %rax
movl %ecx, 0x158(%rax)
movq -0x8(%rbp), %rdi
leaq 0x3637b(%rip), %rsi     # 0x74b69
movss 0x32816(%rip), %xmm0    # 0x7100c
callq 0x42c00
movq -0x50(%rbp), %rax
movss %xmm0, 0x140(%rax)
movq -0x8(%rbp), %rdi
leaq 0x36365(%rip), %rsi     # 0x74b77
movss 0x327f2(%rip), %xmm0    # 0x7100c
callq 0x42c00
movq -0x50(%rbp), %rax
movss %xmm0, 0x144(%rax)
movq -0x8(%rbp), %rdi
leaq 0x3633f(%rip), %rsi     # 0x74b75
movss 0x327ce(%rip), %xmm0    # 0x7100c
callq 0x42c00
movq -0x50(%rbp), %rax
movss %xmm0, 0x148(%rax)
movq -0x8(%rbp), %rdi
leaq 0x3632a(%rip), %rsi     # 0x74b84
movss 0x327aa(%rip), %xmm0    # 0x7100c
callq 0x42c00
movq -0x50(%rbp), %rax
movss %xmm0, 0x14c(%rax)
movq -0x8(%rbp), %rdi
leaq 0x36311(%rip), %rsi     # 0x74b8f
movss 0x32786(%rip), %xmm0    # 0x7100c
callq 0x42c00
movq -0x50(%rbp), %rax
movss %xmm0, 0x150(%rax)
movq -0x8(%rbp), %rdi
leaq 0x362f9(%rip), %rsi     # 0x74b9b
xorl %edx, %edx
callq 0x42b50
movl %eax, %ecx
movq -0x50(%rbp), %rax
movl %ecx, 0x154(%rax)
movq -0x8(%rbp), %rdi
leaq 0x36183(%rip), %rsi     # 0x74a43
xorl %eax, %eax
movl %eax, %edx
callq 0x42920
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x3e8eb
movq -0x20(%rbp), %rdi
callq 0x4f1c0
movq %rax, %rcx
movq -0x50(%rbp), %rax
movq %rcx, 0x490(%rax)
movq -0x8(%rbp), %rdi
leaq 0x361e0(%rip), %rsi     # 0x74ad6
xorl %eax, %eax
movl %eax, %edx
callq 0x42920
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x3e921
movq -0x28(%rbp), %rdi
callq 0x4070
movq %rax, %rcx
movq -0x50(%rbp), %rax
movq %rcx, 0x1b8(%rax)
movq -0x8(%rbp), %rdi
leaq 0x361ae(%rip), %rsi     # 0x74ada
xorl %eax, %eax
movl %eax, %edx
callq 0x42920
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x3e9ea
movq -0x30(%rbp), %rdi
callq 0x3110
movl %eax, -0x34(%rbp)
movl $0x1, -0x38(%rbp)
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x34(%rbp), %eax
jge 0x3e98d
movq -0x30(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x2c, %eax
jne 0x3e980
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x3e982
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x3e95e
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x38(%rbp), %eax
jge 0x3e9e8
movq -0x30(%rbp), %rdi
callq 0x30c0
movq -0x50(%rbp), %rax
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x40(%rbp)
movss -0x40(%rbp), %xmm0
movq 0x230(%rax), %rax
movslq -0x3c(%rbp), %rcx
movss %xmm0, (%rax,%rcx,4)
movq -0x30(%rbp), %rdi
movl $0x2c, %esi
callq 0x3120
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x3e994
jmp 0x3e9ea
movq -0x58(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)