// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/normalization_layer.c
// Function: make_normalization_layer
layer make_normalization_layer(int batch, int w, int h, int c, int size, float alpha, float beta, float kappa)
{
    fprintf(stderr, "Local Response Normalization Layer: %d x %d x %d image, %d size\n", w,h,c,size);
    layer layer = {0};
    layer.type = NORMALIZATION;
    layer.batch = batch;
    layer.h = layer.out_h = h;
    layer.w = layer.out_w = w;
    layer.c = layer.out_c = c;
    layer.kappa = kappa;
    layer.size = size;
    layer.alpha = alpha;
    layer.beta = beta;
    layer.output = calloc(h * w * c * batch, sizeof(float));
    layer.delta = calloc(h * w * c * batch, sizeof(float));
    layer.squared = calloc(h * w * c * batch, sizeof(float));
    layer.norms = calloc(h * w * c * batch, sizeof(float));
    layer.inputs = w*h*c;
    layer.outputs = layer.inputs;

    layer.forward = forward_normalization_layer;
    layer.backward = backward_normalization_layer;
    return layer;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x30(%rbp)
movq %rdi, -0x28(%rbp)
movl %esi, -0x4(%rbp)
movl %edx, -0x8(%rbp)
movl %ecx, -0xc(%rbp)
movl %r8d, -0x10(%rbp)
movl %r9d, -0x14(%rbp)
movss %xmm0, -0x18(%rbp)
movss %xmm1, -0x1c(%rbp)
movss %xmm2, -0x20(%rbp)
movq 0x3cb81(%rip), %rax     # 0x82ff8
movq (%rax), %rdi
movl -0x8(%rbp), %edx
movl -0xc(%rbp), %ecx
movl -0x10(%rbp), %r8d
movl -0x14(%rbp), %r9d
leaq 0x2ee61(%rip), %rsi     # 0x752f0
movb $0x0, %al
callq 0x3240
movq -0x30(%rbp), %rdi
xorl %esi, %esi
movl $0x4a0, %edx            # imm = 0x4A0
callq 0x3190
movq -0x30(%rbp), %rdi
movl $0xa, (%rdi)
movl -0x4(%rbp), %eax
movl %eax, 0x48(%rdi)
movl -0xc(%rbp), %eax
movl %eax, 0x78(%rdi)
movl %eax, 0x6c(%rdi)
movl -0x8(%rbp), %eax
movl %eax, 0x7c(%rdi)
movl %eax, 0x70(%rdi)
movl -0x10(%rbp), %eax
movl %eax, 0x80(%rdi)
movl %eax, 0x74(%rdi)
movss -0x20(%rbp), %xmm0
movss %xmm0, 0x13c(%rdi)
movl -0x14(%rbp), %eax
movl %eax, 0x90(%rdi)
movss -0x18(%rbp), %xmm0
movss %xmm0, 0x134(%rdi)
movss -0x1c(%rbp), %xmm0
movss %xmm0, 0x138(%rdi)
movl -0xc(%rbp), %eax
imull -0x8(%rbp), %eax
imull -0x10(%rbp), %eax
imull -0x4(%rbp), %eax
movslq %eax, %rdi
movl $0x4, %esi
callq 0x3220
movq -0x30(%rbp), %rdi
movq %rax, 0x268(%rdi)
movl -0xc(%rbp), %eax
imull -0x8(%rbp), %eax
imull -0x10(%rbp), %eax
imull -0x4(%rbp), %eax
movslq %eax, %rdi
movl $0x4, %esi
callq 0x3220
movq -0x30(%rbp), %rdi
movq %rax, 0x260(%rdi)
movl -0xc(%rbp), %eax
imull -0x8(%rbp), %eax
imull -0x10(%rbp), %eax
imull -0x4(%rbp), %eax
movslq %eax, %rdi
movl $0x4, %esi
callq 0x3220
movq -0x30(%rbp), %rdi
movq %rax, 0x278(%rdi)
movl -0xc(%rbp), %eax
imull -0x8(%rbp), %eax
imull -0x10(%rbp), %eax
imull -0x4(%rbp), %eax
movslq %eax, %rdi
movl $0x4, %esi
callq 0x3220
movq -0x30(%rbp), %rdi
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x280(%rdi)
movl -0x8(%rbp), %ecx
imull -0xc(%rbp), %ecx
imull -0x10(%rbp), %ecx
movl %ecx, 0x54(%rdi)
movl 0x54(%rdi), %ecx
movl %ecx, 0x58(%rdi)
leaq 0x1e(%rip), %rcx        # 0x465e0
movq %rcx, 0x10(%rdi)
leaq 0x3b3(%rip), %rcx       # 0x46980
movq %rcx, 0x18(%rdi)
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)