// File: /workspace/github_c_makefile_star2_O3/SimpleDoger[P]Darknet_CPU_Only/darknet.c
// Function: denormalize_net
void denormalize_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 == DECONVOLUTIONAL || l.type == CONVOLUTIONAL) && l.batch_normalize) {
            denormalize_convolutional_layer(l);
            net->layers[i].batch_normalize=0;
        }
        if (l.type == CONNECTED && l.batch_normalize) {
            denormalize_connected_layer(l);
            net->layers[i].batch_normalize=0;
        }
        if (l.type == GRU && l.batch_normalize) {
            denormalize_connected_layer(*l.input_z_layer);
            denormalize_connected_layer(*l.input_r_layer);
            denormalize_connected_layer(*l.input_h_layer);
            denormalize_connected_layer(*l.state_z_layer);
            denormalize_connected_layer(*l.state_r_layer);
            denormalize_connected_layer(*l.state_h_layer);
            l.input_z_layer->batch_normalize = 0;
            l.input_r_layer->batch_normalize = 0;
            l.input_h_layer->batch_normalize = 0;
            l.state_z_layer->batch_normalize = 0;
            l.state_r_layer->batch_normalize = 0;
            l.state_h_layer->batch_normalize = 0;
            net->layers[i].batch_normalize=0;
        }
    }
    save_weights(net, outfile);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x948, %rsp            # imm = 0x948
movq %rdx, 0x4a0(%rsp)
leaq 0x183eb(%rip), %rax     # 0x6c7b0
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
xorl %r13d, %r13d
xorl %edx, %edx
callq 0x316bc
movq %rax, %r14
cmpl $0x0, (%rax)
jle 0x545a3
movq 0x20(%r14), %r15
xorl %ebp, %ebp
xorl %ebx, %ebx
leaq (%r15,%rbp), %r12
movl $0x4a0, %edx            # imm = 0x4A0
leaq 0x4a8(%rsp), %rdi
movq %r12, %rsi
callq 0x32b0
movl 0x4a8(%rsp), %ecx
movl 0x4e8(%rsp), %eax
cmpl $0x2, %ecx
setb %dl
testl %eax, %eax
setne %sil
andb %dl, %sil
cmpb $0x1, %sil
jne 0x54453
movl $0x94, %ecx
movq %rsp, %rdi
movq %r12, %rsi
rep  movsq (%rsi), %es:(%rdi)
callq 0x1108d
movq 0x20(%r14), %r15
movl $0x0, 0x40(%r15,%rbp)
movl 0x4a8(%rsp), %ecx
movl 0x4e8(%rsp), %eax
cmpl $0x2, %ecx
sete %dl
testl %eax, %eax
setne %sil
andb %dl, %sil
cmpb $0x1, %sil
jne 0x5449b
movl $0x94, %ecx
movq %rsp, %rdi
leaq 0x4a8(%rsp), %rsi
rep  movsq (%rsi), %es:(%rdi)
callq 0x33949
movq 0x20(%r14), %r15
movl $0x0, 0x40(%r15,%rbp)
movl 0x4a8(%rsp), %ecx
movl 0x4e8(%rsp), %eax
cmpl $0x10, %ecx
jne 0x5458d
testl %eax, %eax
je 0x5458d
movq 0x898(%rsp), %rsi
movl $0x94, %ecx
movq %rsp, %rdi
rep  movsq (%rsi), %es:(%rdi)
callq 0x33949
movq 0x8a8(%rsp), %rsi
movl $0x94, %ecx
movq %rsp, %rdi
rep  movsq (%rsi), %es:(%rdi)
callq 0x33949
movq 0x8b8(%rsp), %rsi
movl $0x94, %ecx
movq %rsp, %rdi
rep  movsq (%rsi), %es:(%rdi)
callq 0x33949
movq 0x8a0(%rsp), %rsi
movl $0x94, %ecx
movq %rsp, %rdi
rep  movsq (%rsi), %es:(%rdi)
callq 0x33949
movq 0x8b0(%rsp), %rsi
movl $0x94, %ecx
movq %rsp, %rdi
rep  movsq (%rsi), %es:(%rdi)
callq 0x33949
movq 0x8c0(%rsp), %rsi
movl $0x94, %ecx
movq %rsp, %rdi
rep  movsq (%rsi), %es:(%rdi)
callq 0x33949
movq 0x898(%rsp), %rax
movl %r13d, 0x40(%rax)
movq 0x8a8(%rsp), %rax
movl %r13d, 0x40(%rax)
movq 0x8b8(%rsp), %rax
movl %r13d, 0x40(%rax)
movq 0x8a0(%rsp), %rax
movl %r13d, 0x40(%rax)
movq 0x8b0(%rsp), %rax
movl %r13d, 0x40(%rax)
movq 0x8c0(%rsp), %rax
movl %r13d, 0x40(%rax)
movq 0x20(%r14), %r15
movl %r13d, 0x40(%r15,%rbp)
incq %rbx
movslq (%r14), %rax
addq $0x4a0, %rbp            # imm = 0x4A0
cmpq %rax, %rbx
jl 0x543e9
movq %r14, %rdi
movq 0x4a0(%rsp), %rsi
addq $0x948, %rsp            # imm = 0x948
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6879