// File: /workspace/github_c_makefile_star2_O2/SimpleDoger[P]Darknet_CPU_Only/parser.c
// Function: parse_net_options
void parse_net_options(list *options, network *net)
{
    net->batch = option_find_int(options, "batch",1);
    net->learning_rate = option_find_float(options, "learning_rate", .001);
    net->momentum = option_find_float(options, "momentum", .9);
    net->decay = option_find_float(options, "decay", .0001);
    int subdivs = option_find_int(options, "subdivisions",1);
    net->time_steps = option_find_int_quiet(options, "time_steps",1);
    net->notruth = option_find_int_quiet(options, "notruth",0);
    net->batch /= subdivs;
    net->batch *= net->time_steps;
    net->subdivisions = subdivs;
    net->random = option_find_int_quiet(options, "random", 0);

    net->adam = option_find_int_quiet(options, "adam", 0);
    if(net->adam){
        net->B1 = option_find_float(options, "B1", .9);
        net->B2 = option_find_float(options, "B2", .999);
        net->eps = option_find_float(options, "eps", .0000001);
    }

    net->h = option_find_int_quiet(options, "height",0);
    net->w = option_find_int_quiet(options, "width",0);
    net->c = option_find_int_quiet(options, "channels",0);
    net->inputs = option_find_int_quiet(options, "inputs", net->h * net->w * net->c);
    net->max_crop = option_find_int_quiet(options, "max_crop",net->w*2);
    net->min_crop = option_find_int_quiet(options, "min_crop",net->w);
    net->max_ratio = option_find_float_quiet(options, "max_ratio", (float) net->max_crop / net->w);
    net->min_ratio = option_find_float_quiet(options, "min_ratio", (float) net->min_crop / net->w);
    net->center = option_find_int_quiet(options, "center",0);
    net->clip = option_find_float_quiet(options, "clip", 0);

    net->angle = option_find_float_quiet(options, "angle", 0);
    net->aspect = option_find_float_quiet(options, "aspect", 1);
    net->saturation = option_find_float_quiet(options, "saturation", 1);
    net->exposure = option_find_float_quiet(options, "exposure", 1);
    net->hue = option_find_float_quiet(options, "hue", 0);

    if(!net->inputs && !(net->h && net->w && net->c)) error("No input parameters supplied");

    char *policy_s = option_find_str(options, "policy", "constant");
    net->policy = get_policy(policy_s);
    net->burn_in = option_find_int_quiet(options, "burn_in", 0);
    net->power = option_find_float_quiet(options, "power", 4);
    if(net->policy == STEP){
        net->step = option_find_int(options, "step", 1);
        net->scale = option_find_float(options, "scale", 1);
    } else if (net->policy == STEPS){
        char *l = option_find(options, "steps");
        char *p = option_find(options, "scales");
        if(!l || !p) error("STEPS policy must have steps and scales in cfg file");

        int len = strlen(l);
        int n = 1;
        int i;
        for(i = 0; i < len; ++i){
            if (l[i] == ',') ++n;
        }
        int *steps = calloc(n, sizeof(int));
        float *scales = calloc(n, sizeof(float));
        for(i = 0; i < n; ++i){
            int step    = atoi(l);
            float scale = atof(p);
            l = strchr(l, ',')+1;
            p = strchr(p, ',')+1;
            steps[i] = step;
            scales[i] = scale;
        }
        net->scales = scales;
        net->steps = steps;
        net->num_steps = n;
    } else if (net->policy == EXP){
        net->gamma = option_find_float(options, "gamma", 1);
    } else if (net->policy == SIG){
        net->gamma = option_find_float(options, "gamma", 1);
        net->step = option_find_int(options, "step", 1);
    } else if (net->policy == POLY || net->policy == RANDOM){
    }
    net->max_batches = option_find_int(options, "max_batches", 0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x29a06(%rip), %rsi     # 0x504e9
pushq $0x1
popq %r13
movl %r13d, %edx
callq 0x2977d
movl %eax, 0x4(%rbx)
leaq 0x299f6(%rip), %rsi     # 0x504ef
movss 0x28aa3(%rip), %xmm0    # 0x4f5a4
movq %r14, %rdi
callq 0x298c3
movss %xmm0, 0x34(%rbx)
leaq 0x2b8d8(%rip), %rsi     # 0x523ed
movss 0x28ddf(%rip), %xmm0    # 0x4f8fc
movq %r14, %rdi
callq 0x298c3
movss %xmm0, 0x38(%rbx)
leaq 0x299cc(%rip), %rsi     # 0x504fd
movss 0x2937b(%rip), %xmm0    # 0x4feb4
movq %r14, %rdi
callq 0x298c3
movss %xmm0, 0x3c(%rbx)
leaq 0x299b6(%rip), %rsi     # 0x50503
movq %r14, %rdi
movl %r13d, %edx
callq 0x2977d
movl %eax, %ebp
leaq 0x299af(%rip), %rsi     # 0x50510
movq %r14, %rdi
movl %r13d, %edx
callq 0x29884
movl %eax, 0x4c(%rbx)
leaq 0x299a5(%rip), %rsi     # 0x5051b
movq %r14, %rdi
xorl %edx, %edx
callq 0x29884
movl %eax, 0x8c(%rbx)
movl 0x4(%rbx), %eax
cltd
idivl %ebp
imull 0x4c(%rbx), %eax
movl %eax, 0x4(%rbx)
movl %ebp, 0x1c(%rbx)
leaq 0x296c6(%rip), %rsi     # 0x50263
movq %r14, %rdi
xorl %edx, %edx
callq 0x29884
movl %eax, 0xc4(%rbx)
leaq 0x2996f(%rip), %rsi     # 0x50523
movq %r14, %rdi
xorl %edx, %edx
callq 0x29884
movl %eax, 0x70(%rbx)
testl %eax, %eax
je 0x26c19
leaq 0x2995c(%rip), %rsi     # 0x50528
movss 0x28d28(%rip), %xmm0    # 0x4f8fc
movq %r14, %rdi
callq 0x298c3
movss %xmm0, 0x74(%rbx)
leaq 0x29943(%rip), %rsi     # 0x5052b
movss 0x292cc(%rip), %xmm0    # 0x4febc
movq %r14, %rdi
callq 0x298c3
movss %xmm0, 0x78(%rbx)
leaq 0x29913(%rip), %rsi     # 0x50517
movss 0x292b4(%rip), %xmm0    # 0x4fec0
movq %r14, %rdi
callq 0x298c3
movss %xmm0, 0x7c(%rbx)
leaq 0x27e6f(%rip), %rsi     # 0x4ea8f
movq %r14, %rdi
xorl %edx, %edx
callq 0x29884
movl %eax, 0x90(%rbx)
leaq 0x27df7(%rip), %rsi     # 0x4ea2e
movq %r14, %rdi
xorl %edx, %edx
callq 0x29884
movl %eax, 0x94(%rbx)
leaq 0x298e0(%rip), %rsi     # 0x5052e
movq %r14, %rdi
xorl %edx, %edx
callq 0x29884
movl %eax, 0x98(%rbx)
imull 0x90(%rbx), %eax
imull 0x94(%rbx), %eax
leaq 0x29b93(%rip), %rsi     # 0x50806
movq %r14, %rdi
movl %eax, %edx
callq 0x29884
movl %eax, 0x80(%rbx)
movl 0x94(%rbx), %edx
addl %edx, %edx
leaq 0x298a5(%rip), %rsi     # 0x50537
movq %r14, %rdi
callq 0x29884
movl %eax, 0x9c(%rbx)
movl 0x94(%rbx), %edx
leaq 0x29893(%rip), %rsi     # 0x50540
movq %r14, %rdi
callq 0x29884
movl %eax, 0xa0(%rbx)
cvtsi2ssl 0x9c(%rbx), %xmm0
cvtsi2ssl 0x94(%rbx), %xmm1
divss %xmm1, %xmm0
leaq 0x29873(%rip), %rsi     # 0x50549
movq %r14, %rdi
callq 0x2989e
movss %xmm0, 0xa4(%rbx)
cvtsi2ssl 0xa0(%rbx), %xmm0
cvtsi2ssl 0x94(%rbx), %xmm1
divss %xmm1, %xmm0
leaq 0x29852(%rip), %rsi     # 0x50553
movq %r14, %rdi
callq 0x2989e
movss %xmm0, 0xa8(%rbx)
leaq 0x29845(%rip), %rsi     # 0x5055d
movq %r14, %rdi
xorl %edx, %edx
callq 0x29884
movl %eax, 0xac(%rbx)
leaq 0x29835(%rip), %rsi     # 0x50564
xorps %xmm0, %xmm0
movq %r14, %rdi
callq 0x2989e
movss %xmm0, 0x108(%rbx)
leaq 0x2961f(%rip), %rsi     # 0x50368
xorps %xmm0, %xmm0
movq %r14, %rdi
callq 0x2989e
movss %xmm0, 0xb0(%rbx)
leaq 0x29806(%rip), %rsi     # 0x50569
movss 0x2529d(%rip), %xmm0    # 0x4c008
movq %r14, %rdi
callq 0x2989e
movss %xmm0, 0xb4(%rbx)
leaq 0x295ec(%rip), %rsi     # 0x5036e
movq %r14, %rdi
movss 0x2527b(%rip), %xmm0    # 0x4c008
callq 0x2989e
movss %xmm0, 0xbc(%rbx)
leaq 0x295d8(%rip), %rsi     # 0x50379
movq %r14, %rdi
movss 0x2525c(%rip), %xmm0    # 0x4c008
callq 0x2989e
movss %xmm0, 0xb8(%rbx)
leaq 0x297b0(%rip), %rsi     # 0x50570
xorps %xmm0, %xmm0
movq %r14, %rdi
callq 0x2989e
movss %xmm0, 0xc0(%rbx)
cmpl $0x0, 0x80(%rbx)
jne 0x26e03
cmpl $0x0, 0x90(%rbx)
je 0x26df7
cmpl $0x0, 0x94(%rbx)
je 0x26df7
cmpl $0x0, 0x98(%rbx)
jne 0x26e03
leaq 0x29776(%rip), %rdi     # 0x50574
callq 0x43df
leaq 0x29787(%rip), %rsi     # 0x50591
leaq 0x29690(%rip), %rdx     # 0x504a1
movq %r14, %rdi
callq 0x29737
movq %rax, %rdi
callq 0x269fd
movl %eax, 0x30(%rbx)
leaq 0x2976d(%rip), %rsi     # 0x50598
movq %r14, %rdi
xorl %edx, %edx
callq 0x29884
movl %eax, 0x6c(%rbx)
leaq 0x29761(%rip), %rsi     # 0x505a0
movss 0x25411(%rip), %xmm0    # 0x4c258
movq %r14, %rdi
callq 0x2989e
movss %xmm0, 0x48(%rbx)
movl 0x30(%rbx), %eax
decl %eax
cmpl $0x4, %eax
ja 0x27018
leaq 0x2905b(%rip), %rcx     # 0x4fec4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x29631(%rip), %rsi     # 0x504aa
pushq $0x1
popq %rdx
movq %r14, %rdi
callq 0x2977d
movl %eax, 0x50(%rbx)
leaq 0x29475(%rip), %rsi     # 0x50303
movss 0x25172(%rip), %xmm0    # 0x4c008
movq %r14, %rdi
callq 0x298c3
movss %xmm0, 0x44(%rbx)
jmp 0x27018
leaq 0x29666(%rip), %rsi     # 0x50515
movq %r14, %rdi
callq 0x2983b
movq %rax, %r15
leaq 0x2980d(%rip), %rsi     # 0x506ce
movq %r14, %rdi
callq 0x2983b
movq %rax, %r12
testq %r15, %r15
setne %al
testq %r12, %r12
setne %cl
testb %cl, %al
jne 0x26ee8
leaq 0x296c3(%rip), %rdi     # 0x505a6
callq 0x43df
movq %r15, %rdi
callq 0x3140
xorl %ecx, %ecx
testl %eax, %eax
cmovlel %ecx, %eax
cmpq %rcx, %rax
je 0x26f0e
xorl %edx, %edx
cmpb $0x2c, (%r15,%rcx)
sete %dl
addl %edx, %r13d
incq %rcx
jmp 0x26ef7
movq %r14, 0x10(%rsp)
movq %rbx, 0x18(%rsp)
movl %r13d, (%rsp)
movl %r13d, %ebx
pushq $0x4
popq %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3250
movq %rax, 0x8(%rsp)
movq %rbx, 0x20(%rsp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3250
movq %rax, %r14
xorl %ebx, %ebx
pushq $0x2c
popq %r13
cmpq %rbx, 0x20(%rsp)
je 0x26faa
movq %r15, %rdi
callq 0x3400
movl %eax, %ebp
movq %r12, %rdi
callq 0x30f0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x4(%rsp)
movq %r15, %rdi
movl %r13d, %esi
callq 0x3150
movq %rax, %r15
incq %r15
movq %r12, %rdi
movl %r13d, %esi
callq 0x3150
movq %rax, %r12
incq %r12
movq 0x8(%rsp), %rax
movl %ebp, (%rax,%rbx,4)
movss 0x4(%rsp), %xmm0
movss %xmm0, (%r14,%rbx,4)
incq %rbx
jmp 0x26f4c
movq 0x18(%rsp), %rbx
movq %r14, 0x58(%rbx)
movq 0x8(%rsp), %rax
movq %rax, 0x60(%rbx)
movl (%rsp), %eax
movl %eax, 0x68(%rbx)
movq 0x10(%rsp), %r14
jmp 0x27018
leaq 0x2960a(%rip), %rsi     # 0x505da
movss 0x25030(%rip), %xmm0    # 0x4c008
movq %r14, %rdi
callq 0x298c3
movss %xmm0, 0x40(%rbx)
jmp 0x27018
leaq 0x295ec(%rip), %rsi     # 0x505da
movss 0x25012(%rip), %xmm0    # 0x4c008
movq %r14, %rdi
callq 0x298c3
movss %xmm0, 0x40(%rbx)
leaq 0x294a0(%rip), %rsi     # 0x504aa
pushq $0x1
popq %rdx
movq %r14, %rdi
callq 0x2977d
movl %eax, 0x50(%rbx)
leaq 0x295c1(%rip), %rsi     # 0x505e0
movq %r14, %rdi
xorl %edx, %edx
callq 0x2977d
movl %eax, 0x54(%rbx)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq