// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1538, %rsp           # imm = 0x1538
movq %rdx, 0x4f8(%rsp)
leaq 0x1906e(%rip), %rax     # 0x6c7b0
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x316bc
movq %rax, %rbp
cmpl $0x0, (%rax)
jle 0x541aa
xorl %ecx, %ecx
movq %rbp, 0x4b8(%rsp)
movq 0x20(%rbp), %r13
movq %rcx, 0x528(%rsp)
imulq $0x4a0, %rcx, %r14      # imm = 0x4A0
leaq (%r14,%r13), %r12
addq $0x88, %r12
movl -0x88(%r12), %r15d
movups -0x58(%r12), %xmm0
movups %xmm0, 0x68c(%rsp)
movups -0x64(%r12), %xmm0
movaps %xmm0, 0x680(%rsp)
movups -0x74(%r12), %xmm0
movaps %xmm0, 0x670(%rsp)
movups -0x84(%r12), %xmm0
movaps %xmm0, 0x660(%rsp)
movl -0x48(%r12), %ebp
movl -0x34(%r12), %eax
movl %eax, 0x560(%rsp)
movups -0x44(%r12), %xmm0
movaps %xmm0, 0x550(%rsp)
movl -0x30(%r12), %eax
movq %rax, 0x520(%rsp)
movups -0x1c(%r12), %xmm0
movaps %xmm0, 0x5d0(%rsp)
movq -0xc(%r12), %rax
movq %rax, 0x5e0(%rsp)
movdqu -0x2c(%r12), %xmm0
movdqa %xmm0, 0x5c0(%rsp)
movl -0x4(%r12), %eax
movq %rax, 0x4b0(%rsp)
movl $0x1b8, %edx            # imm = 0x1B8
leaq 0xd28(%rsp), %rdi
movq %r12, %rsi
callq 0x32b0
leaq (%r14,%r13), %rsi
addq $0x248, %rsi            # imm = 0x248
movl $0xd, %ecx
leaq 0x6e0(%rsp), %rdi
movq %rsi, 0x4c0(%rsp)
rep  movsq (%rsi), %es:(%rdi)
leaq 0x2c0(%r13,%r14), %rbx
movl $0x130, %edx            # imm = 0x130
leaq 0xac8(%rsp), %rdi
movq %rbx, %rsi
callq 0x32b0
movq 0x130(%rbx), %rax
movq %rax, 0x4c8(%rsp)
movq 0x138(%rbx), %rax
movq %rax, 0x4e0(%rsp)
movq 0x140(%rbx), %rax
movq %rax, 0x4d0(%rsp)
movq 0x148(%rbx), %rax
movq %rax, 0x4e8(%rsp)
movq 0x150(%rbx), %rax
movq %rax, 0x4d8(%rsp)
movq 0x158(%rbx), %rax
movq %rax, 0x4f0(%rsp)
movq %r14, 0x4a8(%rsp)
leaq 0x420(%r13,%r14), %r14
movl $0x10, %ecx
leaq 0x830(%rsp), %rdi
movq %r14, %rsi
rep  movsq (%rsi), %es:(%rdi)
movl %r15d, %eax
movl %ebp, 0x4a4(%rsp)
orl %ebp, %eax
movq 0x4b8(%rsp), %rbp
movl %r15d, 0x4a0(%rsp)
jne 0x53d5a
movq 0x4a8(%rsp), %rax
leaq (%rax,%r13), %rbp
addq $0x4, %rbp
movslq 0x4b0(%rsp), %r15
movups (%rbp), %xmm0
movups 0x10(%rbp), %xmm1
movdqu 0x20(%rbp), %xmm2
movdqu 0x2c(%rbp), %xmm3
movdqu %xmm3, 0x6cc(%rsp)
movdqa %xmm2, 0x6c0(%rsp)
movaps %xmm1, 0x6b0(%rsp)
movaps %xmm0, 0x6a0(%rsp)
movups 0x40(%rbp), %xmm0
movaps %xmm0, 0x570(%rsp)
movl 0x50(%rbp), %eax
movl %eax, 0x580(%rsp)
movdqu 0x58(%rbp), %xmm0
movdqu 0x68(%rbp), %xmm1
movdqa %xmm0, 0x5f0(%rsp)
movdqa %xmm1, 0x600(%rsp)
movq 0x78(%rbp), %rax
movq %rax, 0x610(%rsp)
movl $0x1b8, %edx            # imm = 0x1B8
leaq 0xee0(%rsp), %rdi
movq %r12, %rsi
callq 0x32b0
movl $0xd, %ecx
leaq 0x748(%rsp), %rdi
movq 0x4c0(%rsp), %rsi
rep  movsq (%rsi), %es:(%rdi)
movl $0x130, %edx            # imm = 0x130
leaq 0xbf8(%rsp), %rdi
movq %rbx, %rsi
callq 0x32b0
movl $0x10, %ecx
leaq 0x8b0(%rsp), %rdi
movq %r14, 0x518(%rsp)
movq %r14, %rsi
rep  movsq (%rsi), %es:(%rdi)
movl $0x4, %esi
movq %r15, %rdi
callq 0x3250
movq %rax, %r14
testl %r15d, %r15d
movdqa 0x1670(%rip), %xmm7     # 0x55090
pcmpeqd %xmm8, %xmm8
movdqa 0x1752(%rip), %xmm9     # 0x55180
movq %rbx, 0x500(%rsp)
jle 0x53b2e
movq 0x4b0(%rsp), %rcx
leal 0x3(%rcx), %eax
decq %rcx
movq %rcx, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
shrl $0x2, %eax
shlq $0x4, %rax
xorl %ecx, %ecx
movdqa 0x161b(%rip), %xmm1     # 0x55080
movdqa 0x1703(%rip), %xmm2     # 0x55170
movdqa %xmm0, %xmm3
pxor %xmm7, %xmm3
movdqa %xmm1, %xmm4
pxor %xmm7, %xmm4
movdqa %xmm4, %xmm5
pcmpgtd %xmm3, %xmm5
pcmpeqd %xmm3, %xmm4
pshufd $0xf5, %xmm4, %xmm6     # xmm6 = xmm4[1,1,3,3]
pand %xmm5, %xmm6
pshufd $0xf5, %xmm5, %xmm4     # xmm4 = xmm5[1,1,3,3]
por %xmm6, %xmm4
movd %xmm4, %edx
notl %edx
testb $0x1, %dl
je 0x53aae
movl $0x3f800000, (%r14,%rcx) # imm = 0x3F800000
pxor %xmm8, %xmm4
pextrw $0x4, %xmm4, %edx
testb $0x1, %dl
je 0x53ac6
movl $0x3f800000, 0x4(%r14,%rcx) # imm = 0x3F800000
movdqa %xmm2, %xmm4
pxor %xmm7, %xmm4
movdqa %xmm4, %xmm5
pcmpgtd %xmm3, %xmm5
pcmpeqd %xmm3, %xmm4
pshufd $0xf5, %xmm4, %xmm4     # xmm4 = xmm4[1,1,3,3]
pand %xmm5, %xmm4
pshufd $0xf5, %xmm5, %xmm3     # xmm3 = xmm5[1,1,3,3]
por %xmm4, %xmm3
pxor %xmm8, %xmm3
pextrw $0x0, %xmm3, %edx
testb $0x1, %dl
je 0x53b04
movl $0x3f800000, 0x8(%r14,%rcx) # imm = 0x3F800000
pextrw $0x4, %xmm3, %edx
testb $0x1, %dl
je 0x53b17
movl $0x3f800000, 0xc(%r14,%rcx) # imm = 0x3F800000
paddq %xmm9, %xmm1
paddq %xmm9, %xmm2
addq $0x10, %rcx
cmpq %rcx, %rax
jne 0x53a6d
addq 0x4a8(%rsp), %r13
movl $0x4, %esi
movq %r15, %rdi
callq 0x3250
movq %rax, 0x510(%rsp)
movl $0x4, %esi
movq %r15, %rdi
callq 0x3250
movq %rax, 0x508(%rsp)
movaps 0x6a0(%rsp), %xmm0
movaps 0x6b0(%rsp), %xmm1
movaps 0x6c0(%rsp), %xmm2
movaps %xmm0, 0x620(%rsp)
movaps %xmm1, 0x630(%rsp)
movaps %xmm2, 0x640(%rsp)
movups 0x6cc(%rsp), %xmm0
movups %xmm0, 0x64c(%rsp)
movaps 0x570(%rsp), %xmm0
movaps %xmm0, 0x530(%rsp)
movl 0x580(%rsp), %eax
movl %eax, 0x540(%rsp)
movaps 0x5f0(%rsp), %xmm0
movaps 0x600(%rsp), %xmm1
movaps %xmm0, 0x590(%rsp)
movaps %xmm1, 0x5a0(%rsp)
movq 0x610(%rsp), %rax
movq %rax, 0x5b0(%rsp)
movl $0x1b8, %edx            # imm = 0x1B8
leaq 0x1380(%rsp), %r15
movq %r15, %rdi
leaq 0xee0(%rsp), %rsi
callq 0x32b0
movl $0xd, %ecx
leaq 0x930(%rsp), %rbx
movq %rbx, %rdi
leaq 0x748(%rsp), %rsi
rep  movsq (%rsi), %es:(%rdi)
movl $0x130, %edx            # imm = 0x130
leaq 0x998(%rsp), %rdi
leaq 0xbf8(%rsp), %rsi
callq 0x32b0
movl $0x10, %ecx
leaq 0x7b0(%rsp), %rdi
leaq 0x8b0(%rsp), %rsi
rep  movsq (%rsi), %es:(%rdi)
movups 0x64c(%rsp), %xmm0
movups %xmm0, 0x2c(%rbp)
movaps 0x620(%rsp), %xmm0
movaps 0x630(%rsp), %xmm1
movdqa 0x640(%rsp), %xmm2
movdqu %xmm2, 0x20(%rbp)
movups %xmm1, 0x10(%rbp)
movups %xmm0, (%rbp)
movl $0x1, 0x40(%r13)
movl 0x540(%rsp), %eax
movl %eax, 0x50(%rbp)
movaps 0x530(%rsp), %xmm0
movups %xmm0, 0x40(%rbp)
movq 0x5b0(%rsp), %rax
movq %rax, 0x78(%rbp)
movdqa 0x590(%rsp), %xmm0
movdqa 0x5a0(%rsp), %xmm1
movdqu %xmm1, 0x68(%rbp)
movdqu %xmm0, 0x58(%rbp)
movl $0x1b8, %edx            # imm = 0x1B8
movq %r12, %rdi
movq %r15, %rsi
callq 0x32b0
movq %r14, 0x240(%r13)
movl $0xd, %ecx
movq 0x4c0(%rsp), %rdi
movq %rbx, %rsi
rep  movsq (%rsi), %es:(%rdi)
movq 0x510(%rsp), %rax
movq %rax, 0x2b0(%r13)
movq 0x508(%rsp), %rax
movq %rax, 0x2b8(%r13)
movl $0x130, %edx            # imm = 0x130
movq 0x500(%rsp), %rdi
leaq 0x998(%rsp), %rsi
callq 0x32b0
movl $0x10, %ecx
movq 0x518(%rsp), %rdi
leaq 0x7b0(%rsp), %rsi
rep  movsq (%rsi), %es:(%rdi)
movq 0x4b8(%rsp), %rbp
movl 0x4a0(%rsp), %r15d
movl %r15d, %eax
xorl $0x2, %eax
orl 0x4a4(%rsp), %eax
jne 0x54021
movq 0x520(%rsp), %r12
movslq %r12d, %r15
movq 0x20(%rbp), %rbx
addq 0x4a8(%rsp), %rbx
movl $0x4, %esi
movq %r15, %rdi
callq 0x3250
movq %rax, %r14
testl %r15d, %r15d
movdqa 0x12f1(%rip), %xmm6     # 0x55090
pcmpeqd %xmm7, %xmm7
movdqa 0x13d4(%rip), %xmm8     # 0x55180
jle 0x53e98
leal 0x3(%r12), %eax
decq %r12
movq %r12, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
shrl $0x2, %eax
shlq $0x4, %rax
pxor %xmm6, %xmm0
xorl %ecx, %ecx
movdqa 0x12a7(%rip), %xmm1     # 0x55080
movdqa 0x138f(%rip), %xmm2     # 0x55170
movdqa %xmm1, %xmm3
pxor %xmm6, %xmm3
movdqa %xmm3, %xmm4
pcmpgtd %xmm0, %xmm4
pcmpeqd %xmm0, %xmm3
pshufd $0xf5, %xmm3, %xmm5     # xmm5 = xmm3[1,1,3,3]
pand %xmm4, %xmm5
pshufd $0xf5, %xmm4, %xmm3     # xmm3 = xmm4[1,1,3,3]
por %xmm5, %xmm3
movd %xmm3, %edx
notl %edx
testb $0x1, %dl
je 0x53e1a
movl $0x3f800000, (%r14,%rcx) # imm = 0x3F800000
pxor %xmm7, %xmm3
pextrw $0x4, %xmm3, %edx
testb $0x1, %dl
je 0x53e31
movl $0x3f800000, 0x4(%r14,%rcx) # imm = 0x3F800000
movdqa %xmm2, %xmm3
pxor %xmm6, %xmm3
movdqa %xmm3, %xmm4
pcmpgtd %xmm0, %xmm4
pcmpeqd %xmm0, %xmm3
pshufd $0xf5, %xmm3, %xmm5     # xmm5 = xmm3[1,1,3,3]
pand %xmm4, %xmm5
pshufd $0xf5, %xmm4, %xmm3     # xmm3 = xmm4[1,1,3,3]
por %xmm5, %xmm3
pxor %xmm7, %xmm3
pextrw $0x0, %xmm3, %edx
testb $0x1, %dl
je 0x53e6e
movl $0x3f800000, 0x8(%r14,%rcx) # imm = 0x3F800000
pextrw $0x4, %xmm3, %edx
testb $0x1, %dl
je 0x53e81
movl $0x3f800000, 0xc(%r14,%rcx) # imm = 0x3F800000
paddq %xmm8, %xmm1
paddq %xmm8, %xmm2
addq $0x10, %rcx
cmpq %rcx, %rax
jne 0x53de1
movl $0x4, %esi
movq %r15, %rdi
callq 0x3250
movq %rax, %r12
movl $0x4, %esi
movq %r15, %rdi
callq 0x3250
movq %rax, %r13
movl $0x2, (%rbx)
movaps 0x660(%rsp), %xmm0
movaps 0x670(%rsp), %xmm1
movdqa 0x680(%rsp), %xmm2
movups %xmm0, 0x4(%rbx)
movups %xmm1, 0x14(%rbx)
movdqu %xmm2, 0x24(%rbx)
movups 0x68c(%rsp), %xmm0
movups %xmm0, 0x30(%rbx)
movl $0x1, 0x40(%rbx)
movl 0x560(%rsp), %eax
movl %eax, 0x54(%rbx)
movaps 0x550(%rsp), %xmm0
movups %xmm0, 0x44(%rbx)
movl %r15d, 0x58(%rbx)
movdqa 0x5c0(%rsp), %xmm0
movdqa 0x5d0(%rsp), %xmm1
movdqu %xmm0, 0x5c(%rbx)
movdqu %xmm1, 0x6c(%rbx)
movq 0x5e0(%rsp), %rax
movq %rax, 0x7c(%rbx)
movq 0x4b0(%rsp), %rax
movl %eax, 0x84(%rbx)
leaq 0x88(%rbx), %rdi
movl $0x1b8, %edx            # imm = 0x1B8
leaq 0xd28(%rsp), %rsi
callq 0x32b0
movq %r14, 0x240(%rbx)
leaq 0x248(%rbx), %rdi
movl $0xd, %ecx
leaq 0x6e0(%rsp), %rsi
rep  movsq (%rsi), %es:(%rdi)
movq %r12, 0x2b0(%rbx)
movq %r13, 0x2b8(%rbx)
leaq 0x2c0(%rbx), %rdi
movl $0x130, %edx            # imm = 0x130
leaq 0xac8(%rsp), %rsi
callq 0x32b0
movq 0x4c8(%rsp), %rax
movq %rax, 0x3f0(%rbx)
movq 0x4e0(%rsp), %rax
movq %rax, 0x3f8(%rbx)
movq 0x4d0(%rsp), %rax
movq %rax, 0x400(%rbx)
movq 0x4e8(%rsp), %rax
movq %rax, 0x408(%rbx)
movq 0x4d8(%rsp), %rax
movq %rax, 0x410(%rbx)
movq 0x4f0(%rsp), %rax
movq %rax, 0x418(%rbx)
addq $0x420, %rbx            # imm = 0x420
movl $0x10, %ecx
movq %rbx, %rdi
leaq 0x830(%rsp), %rsi
rep  movsq (%rsi), %es:(%rdi)
movl 0x4a0(%rsp), %r15d
cmpl $0x0, 0x4a4(%rsp)
setne %al
cmpl $0x10, %r15d
sete %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x54192
movq 0x4c8(%rsp), %r14
movl 0x58(%r14), %eax
movl $0x94, %ecx
movq %rsp, %rdi
movq %r14, %rsi
rep  movsq (%rsi), %es:(%rdi)
leaq 0xee0(%rsp), %rbx
movq %rbx, %rdi
movl %eax, %esi
callq 0x535a3
movl $0x4a0, %edx            # imm = 0x4A0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x32b0
movq 0x4d0(%rsp), %r14
movl 0x58(%r14), %eax
movl $0x94, %ecx
movq %rsp, %rdi
movq %r14, %rsi
rep  movsq (%rsi), %es:(%rdi)
movq %rbx, %rdi
movl %eax, %esi
callq 0x535a3
movl $0x4a0, %edx            # imm = 0x4A0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x32b0
movq 0x4d8(%rsp), %r14
movl 0x58(%r14), %eax
movl $0x94, %ecx
movq %rsp, %rdi
movq %r14, %rsi
rep  movsq (%rsi), %es:(%rdi)
movq %rbx, %rdi
movl %eax, %esi
callq 0x535a3
movl $0x4a0, %edx            # imm = 0x4A0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x32b0
movq 0x4e0(%rsp), %r14
movl 0x58(%r14), %eax
movl $0x94, %ecx
movq %rsp, %rdi
movq %r14, %rsi
rep  movsq (%rsi), %es:(%rdi)
movq %rbx, %rdi
movl %eax, %esi
callq 0x535a3
movl $0x4a0, %edx            # imm = 0x4A0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x32b0
movq 0x4e8(%rsp), %r14
movl 0x58(%r14), %eax
movl $0x94, %ecx
movq %rsp, %rdi
movq %r14, %rsi
rep  movsq (%rsi), %es:(%rdi)
movq %rbx, %rdi
movl %eax, %esi
callq 0x535a3
movl $0x4a0, %edx            # imm = 0x4A0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x32b0
movq 0x4f0(%rsp), %r14
movl 0x58(%r14), %eax
movl $0x94, %ecx
movq %rsp, %rdi
movq %r14, %rsi
rep  movsq (%rsi), %es:(%rdi)
movq %rbx, %rdi
movl %eax, %esi
callq 0x535a3
movl $0x4a0, %edx            # imm = 0x4A0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x32b0
movq 0x20(%rbp), %rax
movq 0x4a8(%rsp), %rcx
movl $0x1, 0x40(%rax,%rcx)
movq 0x528(%rsp), %rcx
incq %rcx
movslq (%rbp), %rax
cmpq %rax, %rcx
jl 0x53765
movq %rbp, %rdi
movq 0x4f8(%rsp), %rsi
addq $0x1538, %rsp           # imm = 0x1538
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6879