// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/route_layer.c
// Function: resize_route_layer
void resize_route_layer(route_layer *l, network *net)
{
    int i;
    layer first = net->layers[l->input_layers[0]];
    l->out_w = first.out_w;
    l->out_h = first.out_h;
    l->out_c = first.out_c;
    l->outputs = first.outputs;
    l->input_sizes[0] = first.outputs;
    for(i = 1; i < l->n; ++i){
        int index = l->input_layers[i];
        layer next = net->layers[index];
        l->outputs += next.outputs;
        l->input_sizes[i] = next.outputs;
        if(next.out_w == first.out_w && next.out_h == first.out_h){
            l->out_c += next.out_c;
        }else{
            printf("%d %d, %d %d\n", next.out_w, next.out_h, first.out_w, first.out_h);
            l->out_h = l->out_w = l->out_c = 0;
        }
    }
    l->inputs = l->outputs;
    l->delta =  realloc(l->delta, l->outputs*l->batch*sizeof(float));
    l->output = realloc(l->output, l->outputs*l->batch*sizeof(float));

    
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x960, %rsp            # imm = 0x960
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rsi
movq -0x8(%rbp), %rax
movq 0x1a8(%rax), %rax
movslq (%rax), %rax
imulq $0x4a0, %rax, %rax      # imm = 0x4A0
addq %rax, %rsi
leaq -0x4b8(%rbp), %rdi
movl $0x4a0, %edx            # imm = 0x4A0
callq 0x3280
movl -0x43c(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x7c(%rax)
movl -0x440(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x78(%rax)
movl -0x438(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x80(%rax)
movl -0x460(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x58(%rax)
movl -0x460(%rbp), %ecx
movq -0x8(%rbp), %rax
movq 0x1b0(%rax), %rax
movl %ecx, (%rax)
movl $0x1, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x84(%rcx), %eax
jge 0x44471
movq -0x8(%rbp), %rax
movq 0x1a8(%rax), %rax
movslq -0x14(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x4bc(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rsi
movslq -0x4bc(%rbp), %rax
imulq $0x4a0, %rax, %rax      # imm = 0x4A0
addq %rax, %rsi
leaq -0x960(%rbp), %rdi
movl $0x4a0, %edx            # imm = 0x4A0
callq 0x3280
movl -0x908(%rbp), %ecx
movq -0x8(%rbp), %rax
addl 0x58(%rax), %ecx
movl %ecx, 0x58(%rax)
movl -0x908(%rbp), %edx
movq -0x8(%rbp), %rax
movq 0x1b0(%rax), %rax
movslq -0x14(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x8e4(%rbp), %eax
cmpl -0x43c(%rbp), %eax
jne 0x44416
movl -0x8e8(%rbp), %eax
cmpl -0x440(%rbp), %eax
jne 0x44416
movl -0x8e0(%rbp), %ecx
movq -0x8(%rbp), %rax
addl 0x80(%rax), %ecx
movl %ecx, 0x80(%rax)
jmp 0x44461
movl -0x8e4(%rbp), %esi
movl -0x8e8(%rbp), %edx
movl -0x43c(%rbp), %ecx
movl -0x440(%rbp), %r8d
leaq 0x30cf3(%rip), %rdi     # 0x75129
movb $0x0, %al
callq 0x3130
movq -0x8(%rbp), %rax
movl $0x0, 0x80(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x7c(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x78(%rax)
jmp 0x44463
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x44365
movq -0x8(%rbp), %rax
movl 0x58(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x54(%rax)
movq -0x8(%rbp), %rax
movq 0x260(%rax), %rdi
movq -0x8(%rbp), %rax
movl 0x58(%rax), %eax
movq -0x8(%rbp), %rcx
imull 0x48(%rcx), %eax
movslq %eax, %rsi
shlq $0x2, %rsi
callq 0x3310
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x260(%rax)
movq -0x8(%rbp), %rax
movq 0x268(%rax), %rdi
movq -0x8(%rbp), %rax
movl 0x58(%rax), %eax
movq -0x8(%rbp), %rcx
imull 0x48(%rcx), %eax
movslq %eax, %rsi
shlq $0x2, %rsi
callq 0x3310
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x268(%rax)
addq $0x960, %rsp            # imm = 0x960
popq %rbp
retq