// File: /workspace/github_c_makefile_star2_O2/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, %rbx
leaq 0x19968(%rip), %rax     # 0x647c0
orl $-0x1, (%rax)
xorl %r13d, %r13d
xorl %edx, %edx
callq 0x22658
movq %rax, %r14
leaq 0x4a8(%rsp), %r15
xorl %ebp, %ebp
movslq (%r14), %rax
cmpq %rax, %rbp
jge 0x4b025
movq 0x20(%r14), %r12
addq %r13, %r12
movl $0x4a0, %edx            # imm = 0x4A0
movq %r15, %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 0x4aee3
movl $0x94, %ecx
movq %rsp, %rdi
movq %r12, %rsi
rep  movsq (%rsi), %es:(%rdi)
callq 0x6a33
movq 0x20(%r14), %rax
andl $0x0, 0x40(%rax,%r13)
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 0x4af23
movl $0x94, %ecx
movq %rsp, %rdi
movq %r15, %rsi
rep  movsq (%rsi), %es:(%rdi)
callq 0x24823
movq 0x20(%r14), %rax
andl $0x0, 0x40(%rax,%r13)
movl 0x4a8(%rsp), %ecx
movl 0x4e8(%rsp), %eax
cmpl $0x10, %ecx
jne 0x4b016
testl %eax, %eax
je 0x4b016
movq 0x898(%rsp), %rsi
movl $0x94, %ecx
movq %rsp, %rdi
rep  movsq (%rsi), %es:(%rdi)
callq 0x24823
movq 0x8a8(%rsp), %rsi
movl $0x94, %ecx
movq %rsp, %rdi
rep  movsq (%rsi), %es:(%rdi)
callq 0x24823
movq 0x8b8(%rsp), %rsi
movl $0x94, %ecx
movq %rsp, %rdi
rep  movsq (%rsi), %es:(%rdi)
callq 0x24823
movq 0x8a0(%rsp), %rsi
movl $0x94, %ecx
movq %rsp, %rdi
rep  movsq (%rsi), %es:(%rdi)
callq 0x24823
movq 0x8b0(%rsp), %rsi
movl $0x94, %ecx
movq %rsp, %rdi
rep  movsq (%rsi), %es:(%rdi)
callq 0x24823
movq 0x8c0(%rsp), %rsi
movl $0x94, %ecx
movq %rsp, %rdi
rep  movsq (%rsi), %es:(%rdi)
callq 0x24823
movq 0x898(%rsp), %rax
andl $0x0, 0x40(%rax)
movq 0x8a8(%rsp), %rax
andl $0x0, 0x40(%rax)
movq 0x8b8(%rsp), %rax
andl $0x0, 0x40(%rax)
movq 0x8a0(%rsp), %rax
andl $0x0, 0x40(%rax)
movq 0x8b0(%rsp), %rax
andl $0x0, 0x40(%rax)
movq 0x8c0(%rsp), %rax
andl $0x0, 0x40(%rax)
movq 0x20(%r14), %rax
andl $0x0, 0x40(%rax,%r13)
incq %rbp
addq $0x4a0, %r13            # imm = 0x4A0
jmp 0x4ae72
movq %r14, %rdi
movq %rbx, %rsi
addq $0x948, %rsp            # imm = 0x948
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x28aed