// File: /workspace/github_c_makefile_star2_O1/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 0x188e2(%rip), %rax     # 0x6a7c0
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
xorl %r13d, %r13d
xorl %edx, %edx
callq 0x2f9e4
movq %rax, %r14
cmpl $0x0, (%rax)
jle 0x52096
leaq 0x4a8(%rsp), %r15
xorl %ebp, %ebp
xorl %ebx, %ebx
movq 0x20(%r14), %r12
addq %rbp, %r12
movl $0x4a0, %edx            # imm = 0x4A0
movq %r15, %rdi
movq %r12, %rsi
callq 0x32c0
cmpl $0x1, 0x4a8(%rsp)
ja 0x51f50
cmpl $0x0, 0x4e8(%rsp)
je 0x51f50
movl $0x94, %ecx
movq %rsp, %rdi
movq %r12, %rsi
rep  movsq (%rsi), %es:(%rdi)
callq 0x10705
movq 0x20(%r14), %rax
movl $0x0, 0x40(%rax,%rbp)
cmpl $0x2, 0x4a8(%rsp)
jne 0x51f83
cmpl $0x0, 0x4e8(%rsp)
je 0x51f83
movl $0x94, %ecx
movq %rsp, %rdi
movq %r15, %rsi
rep  movsq (%rsi), %es:(%rdi)
callq 0x3198b
movq 0x20(%r14), %rax
movl $0x0, 0x40(%rax,%rbp)
cmpl $0x10, 0x4a8(%rsp)
jne 0x52080
cmpl $0x0, 0x4e8(%rsp)
je 0x52080
movq 0x898(%rsp), %rsi
movl $0x94, %ecx
movq %rsp, %rdi
rep  movsq (%rsi), %es:(%rdi)
callq 0x3198b
movq 0x8a8(%rsp), %rsi
movl $0x94, %ecx
movq %rsp, %rdi
rep  movsq (%rsi), %es:(%rdi)
callq 0x3198b
movq 0x8b8(%rsp), %rsi
movl $0x94, %ecx
movq %rsp, %rdi
rep  movsq (%rsi), %es:(%rdi)
callq 0x3198b
movq 0x8a0(%rsp), %rsi
movl $0x94, %ecx
movq %rsp, %rdi
rep  movsq (%rsi), %es:(%rdi)
callq 0x3198b
movq 0x8b0(%rsp), %rsi
movl $0x94, %ecx
movq %rsp, %rdi
rep  movsq (%rsi), %es:(%rdi)
callq 0x3198b
movq 0x8c0(%rsp), %rsi
movl $0x94, %ecx
movq %rsp, %rdi
rep  movsq (%rsi), %es:(%rdi)
callq 0x3198b
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), %rax
movl %r13d, 0x40(%rax,%rbp)
incq %rbx
movslq (%r14), %rax
addq $0x4a0, %rbp            # imm = 0x4A0
cmpq %rax, %rbx
jl 0x51f06
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 0x66cd