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

    char *a = option_find_str(options, "mask", 0);
    int *mask = parse_yolo_mask(a, &num);
    layer l = make_yolo_layer(params.batch, params.w, params.h, num, total, mask, classes);
    assert(l.outputs == params.inputs);

    l.max_boxes = option_find_int_quiet(options, "max",90);
    l.jitter = option_find_float(options, "jitter", .2);

    l.ignore_thresh = option_find_float(options, "ignore_thresh", .5);
    l.truth_thresh = option_find_float(options, "truth_thresh", 1);
    l.random = option_find_int_quiet(options, "random", 0);

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

    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 $0x70, %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 0x367a0(%rip), %rsi     # 0x74a57
movl $0x14, %edx
callq 0x42990
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x36790(%rip), %rsi     # 0x74a5f
movl $0x1, %edx
callq 0x42990
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x36076(%rip), %rsi     # 0x74363
xorl %eax, %eax
movl %eax, %edx
callq 0x42920
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
leaq -0x14(%rbp), %rsi
callq 0x3e1b0
movq -0x50(%rbp), %rdi
movq %rax, %rcx
movq -0x48(%rbp), %rax
movq %rcx, -0x28(%rbp)
movl (%rax), %esi
movl 0xc(%rax), %edx
movl 0x8(%rax), %ecx
movl -0x14(%rbp), %r8d
movl -0x10(%rbp), %r9d
movq -0x28(%rbp), %r10
movl -0xc(%rbp), %eax
movq %r10, (%rsp)
movl %eax, 0x8(%rsp)
callq 0x519d0
movq -0x50(%rbp), %rdi
movq -0x48(%rbp), %rcx
movl 0x58(%rdi), %eax
cmpl 0x4(%rcx), %eax
jne 0x3e34c
jmp 0x3e36b
leaq 0x36710(%rip), %rdi     # 0x74a63
leaq 0x36724(%rip), %rsi     # 0x74a7e
movl $0x13b, %edx            # imm = 0x13B
leaq 0x36721(%rip), %rcx     # 0x74a87
callq 0x3180
movq -0x8(%rbp), %rdi
leaq 0x36253(%rip), %rsi     # 0x745c9
movl $0x5a, %edx
callq 0x42b50
movl %eax, %ecx
movq -0x50(%rbp), %rax
movl %ecx, 0x88(%rax)
movq -0x8(%rbp), %rdi
leaq 0x36716(%rip), %rsi     # 0x74aad
movss 0x36441(%rip), %xmm0    # 0x747e0
callq 0x42c00
movq -0x50(%rbp), %rax
movss %xmm0, 0xd8(%rax)
movq -0x8(%rbp), %rdi
leaq 0x366f9(%rip), %rsi     # 0x74ab4
movss 0x32e29(%rip), %xmm0    # 0x711ec
callq 0x42c00
movq -0x50(%rbp), %rax
movss %xmm0, 0x15c(%rax)
movq -0x8(%rbp), %rdi
leaq 0x366e3(%rip), %rsi     # 0x74ac2
movss 0x32c25(%rip), %xmm0    # 0x7100c
callq 0x42c00
movq -0x50(%rbp), %rax
movss %xmm0, 0x160(%rax)
movq -0x8(%rbp), %rdi
leaq 0x366cc(%rip), %rsi     # 0x74acf
xorl %edx, %edx
callq 0x42b50
movl %eax, %ecx
movq -0x50(%rbp), %rax
movl %ecx, 0x158(%rax)
movq -0x8(%rbp), %rdi
leaq 0x366b5(%rip), %rsi     # 0x74ad6
xorl %eax, %eax
movl %eax, %edx
callq 0x42920
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x3e44c
movq -0x30(%rbp), %rdi
callq 0x4070
movq %rax, %rcx
movq -0x50(%rbp), %rax
movq %rcx, 0x1b8(%rax)
movq -0x8(%rbp), %rdi
leaq 0x36683(%rip), %rsi     # 0x74ada
xorl %eax, %eax
movl %eax, %edx
callq 0x42920
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x3e515
movq -0x20(%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 0x3e4b8
movq -0x20(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x2c, %eax
jne 0x3e4ab
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x3e4ad
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x3e489
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x38(%rbp), %eax
jge 0x3e513
movq -0x20(%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 -0x20(%rbp), %rdi
movl $0x2c, %esi
callq 0x3120
addq $0x1, %rax
movq %rax, -0x20(%rbp)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x3e4bf
jmp 0x3e515
movq -0x58(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
nop