// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/darknet.c
// Function: normalize_net
void normalize_net(char *cfgfile, char *weightfile, char *outfile)
{
    gpu_index = -1;
    network *net = load_network(cfgfile, weightfile, 0);
    int i;
    for(i = 0; i < net->n; ++i){
        layer l = net->layers[i];
        if(l.type == CONVOLUTIONAL && !l.batch_normalize){
            net->layers[i] = normalize_layer(l, l.n);
        }
        if (l.type == CONNECTED && !l.batch_normalize) {
            net->layers[i] = normalize_layer(l, l.outputs);
        }
        if (l.type == GRU && l.batch_normalize) {
            *l.input_z_layer = normalize_layer(*l.input_z_layer, l.input_z_layer->outputs);
            *l.input_r_layer = normalize_layer(*l.input_r_layer, l.input_r_layer->outputs);
            *l.input_h_layer = normalize_layer(*l.input_h_layer, l.input_h_layer->outputs);
            *l.state_z_layer = normalize_layer(*l.state_z_layer, l.state_z_layer->outputs);
            *l.state_r_layer = normalize_layer(*l.state_r_layer, l.state_r_layer->outputs);
            *l.state_h_layer = normalize_layer(*l.state_h_layer, l.state_h_layer->outputs);
            net->layers[i].batch_normalize=1;
        }
    }
    save_weights(net, outfile);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2ef0, %rsp           # imm = 0x2EF0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq 0x14492(%rip), %rax     # 0x83e40
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
xorl %edx, %edx
callq 0x39a70
movq %rax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x6fd55
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rsi
movslq -0x24(%rbp), %rax
imulq $0x4a0, %rax, %rax      # imm = 0x4A0
addq %rax, %rsi
leaq -0x4c8(%rbp), %rdi
movl $0x4a0, %edx            # imm = 0x4A0
callq 0x3280
cmpl $0x0, -0x4c8(%rbp)
jne 0x6fa7b
cmpl $0x0, -0x488(%rbp)
jne 0x6fa7b
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x24(%rbp), %rcx
imulq $0x4a0, %rcx, %rcx      # imm = 0x4A0
addq %rcx, %rax
movq %rax, -0x29d0(%rbp)
movl -0x444(%rbp), %eax
movl %eax, -0x29d4(%rbp)
movq %rsp, %rdi
movl $0x94, %ecx
leaq -0x4c8(%rbp), %rsi
rep  movsq (%rsi), %es:(%rdi)
movl -0x29d4(%rbp), %esi
leaq -0x968(%rbp), %rdi
callq 0x6f8c0
movq -0x29d0(%rbp), %rdi
leaq -0x968(%rbp), %rsi
movl $0x4a0, %edx            # imm = 0x4A0
callq 0x3280
cmpl $0x2, -0x4c8(%rbp)
jne 0x6faf2
cmpl $0x0, -0x488(%rbp)
jne 0x6faf2
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x24(%rbp), %rcx
imulq $0x4a0, %rcx, %rcx      # imm = 0x4A0
addq %rcx, %rax
movq %rax, -0x29e0(%rbp)
movl -0x470(%rbp), %eax
movl %eax, -0x29e4(%rbp)
movq %rsp, %rdi
movl $0x94, %ecx
leaq -0x4c8(%rbp), %rsi
rep  movsq (%rsi), %es:(%rdi)
movl -0x29e4(%rbp), %esi
leaq -0xe08(%rbp), %rdi
callq 0x6f8c0
movq -0x29e0(%rbp), %rdi
leaq -0xe08(%rbp), %rsi
movl $0x4a0, %edx            # imm = 0x4A0
callq 0x3280
cmpl $0x10, -0x4c8(%rbp)
jne 0x6fd45
cmpl $0x0, -0x488(%rbp)
je 0x6fd45
movq -0xd8(%rbp), %rax
movq %rax, -0x2a40(%rbp)
movq -0xd8(%rbp), %rsi
movq -0xd8(%rbp), %rax
movl 0x58(%rax), %eax
movl %eax, -0x2a44(%rbp)
movq %rsp, %rdi
movl $0x94, %ecx
rep  movsq (%rsi), %es:(%rdi)
movl -0x2a44(%rbp), %esi
leaq -0x12a8(%rbp), %rdi
callq 0x6f8c0
movq -0x2a40(%rbp), %rdi
leaq -0x12a8(%rbp), %rsi
movl $0x4a0, %edx            # imm = 0x4A0
callq 0x3280
movq -0xc8(%rbp), %rax
movq %rax, -0x2a30(%rbp)
movq -0xc8(%rbp), %rsi
movq -0xc8(%rbp), %rax
movl 0x58(%rax), %eax
movl %eax, -0x2a34(%rbp)
movq %rsp, %rdi
movl $0x94, %ecx
rep  movsq (%rsi), %es:(%rdi)
movl -0x2a34(%rbp), %esi
leaq -0x1748(%rbp), %rdi
callq 0x6f8c0
movq -0x2a30(%rbp), %rdi
leaq -0x1748(%rbp), %rsi
movl $0x4a0, %edx            # imm = 0x4A0
callq 0x3280
movq -0xb8(%rbp), %rax
movq %rax, -0x2a20(%rbp)
movq -0xb8(%rbp), %rsi
movq -0xb8(%rbp), %rax
movl 0x58(%rax), %eax
movl %eax, -0x2a24(%rbp)
movq %rsp, %rdi
movl $0x94, %ecx
rep  movsq (%rsi), %es:(%rdi)
movl -0x2a24(%rbp), %esi
leaq -0x1be8(%rbp), %rdi
callq 0x6f8c0
movq -0x2a20(%rbp), %rdi
leaq -0x1be8(%rbp), %rsi
movl $0x4a0, %edx            # imm = 0x4A0
callq 0x3280
movq -0xd0(%rbp), %rax
movq %rax, -0x2a10(%rbp)
movq -0xd0(%rbp), %rsi
movq -0xd0(%rbp), %rax
movl 0x58(%rax), %eax
movl %eax, -0x2a14(%rbp)
movq %rsp, %rdi
movl $0x94, %ecx
rep  movsq (%rsi), %es:(%rdi)
movl -0x2a14(%rbp), %esi
leaq -0x2088(%rbp), %rdi
callq 0x6f8c0
movq -0x2a10(%rbp), %rdi
leaq -0x2088(%rbp), %rsi
movl $0x4a0, %edx            # imm = 0x4A0
callq 0x3280
movq -0xc0(%rbp), %rax
movq %rax, -0x2a00(%rbp)
movq -0xc0(%rbp), %rsi
movq -0xc0(%rbp), %rax
movl 0x58(%rax), %eax
movl %eax, -0x2a04(%rbp)
movq %rsp, %rdi
movl $0x94, %ecx
rep  movsq (%rsi), %es:(%rdi)
movl -0x2a04(%rbp), %esi
leaq -0x2528(%rbp), %rdi
callq 0x6f8c0
movq -0x2a00(%rbp), %rdi
leaq -0x2528(%rbp), %rsi
movl $0x4a0, %edx            # imm = 0x4A0
callq 0x3280
movq -0xb0(%rbp), %rax
movq %rax, -0x29f0(%rbp)
movq -0xb0(%rbp), %rsi
movq -0xb0(%rbp), %rax
movl 0x58(%rax), %eax
movl %eax, -0x29f4(%rbp)
movq %rsp, %rdi
movl $0x94, %ecx
rep  movsq (%rsi), %es:(%rdi)
movl -0x29f4(%rbp), %esi
leaq -0x29c8(%rbp), %rdi
callq 0x6f8c0
movq -0x29f0(%rbp), %rdi
leaq -0x29c8(%rbp), %rsi
movl $0x4a0, %edx            # imm = 0x4A0
callq 0x3280
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x24(%rbp), %rcx
imulq $0x4a0, %rcx, %rcx      # imm = 0x4A0
addq %rcx, %rax
movl $0x1, 0x40(%rax)
jmp 0x6fd47
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x6f9ce
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x41980
addq $0x2ef0, %rsp           # imm = 0x2EF0
popq %rbp
retq
nopl (%rax,%rax)