// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/nightmare.c
// Function: smooth
void smooth(image recon, image update, float lambda, int num)
{
    int i, j, k;
    int ii, jj;
    for(k = 0; k < recon.c; ++k){
        for(j = 0; j < recon.h; ++j){
            for(i = 0; i < recon.w; ++i){
                int out_index = i + recon.w*(j + recon.h*k);
                for(jj = j-num; jj <= j + num && jj < recon.h; ++jj){
                    if (jj < 0) continue;
                    for(ii = i-num; ii <= i + num && ii < recon.w; ++ii){
                        if (ii < 0) continue;
                        int in_index = ii + recon.w*(jj + recon.h*k);
                        update.data[out_index] += lambda * (recon.data[in_index] - recon.data[out_index]);
                    }
                }
            }
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movss %xmm0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x30(%rbp), %rcx
movl -0x14(%rbp), %eax
cmpl 0x8(%rcx), %eax
jge 0x6cb15
movl $0x0, -0x10(%rbp)
movq -0x30(%rbp), %rcx
movl -0x10(%rbp), %eax
cmpl 0x4(%rcx), %eax
jge 0x6cb05
movl $0x0, -0xc(%rbp)
movq -0x30(%rbp), %rcx
movl -0xc(%rbp), %eax
cmpl (%rcx), %eax
jge 0x6caf5
movq -0x30(%rbp), %rsi
movl -0xc(%rbp), %eax
movl (%rsi), %ecx
movl -0x10(%rbp), %edx
movl 0x4(%rsi), %esi
imull -0x14(%rbp), %esi
addl %esi, %edx
imull %edx, %ecx
addl %ecx, %eax
movl %eax, -0x20(%rbp)
movl -0x10(%rbp), %eax
subl -0x8(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %ecx
movl -0x10(%rbp), %edx
addl -0x8(%rbp), %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0x39(%rbp)
jg 0x6ca18
movq -0x30(%rbp), %rcx
movl -0x1c(%rbp), %eax
cmpl 0x4(%rcx), %eax
setl %al
movb %al, -0x39(%rbp)
movb -0x39(%rbp), %al
testb $0x1, %al
jne 0x6ca24
jmp 0x6cae5
cmpl $0x0, -0x1c(%rbp)
jge 0x6ca2f
jmp 0x6cad7
movl -0xc(%rbp), %eax
subl -0x8(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %ecx
movl -0xc(%rbp), %edx
addl -0x8(%rbp), %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0x3a(%rbp)
jg 0x6ca59
movq -0x30(%rbp), %rcx
movl -0x18(%rbp), %eax
cmpl (%rcx), %eax
setl %al
movb %al, -0x3a(%rbp)
movb -0x3a(%rbp), %al
testb $0x1, %al
jne 0x6ca62
jmp 0x6cad5
cmpl $0x0, -0x18(%rbp)
jge 0x6ca6a
jmp 0x6cac7
movq -0x38(%rbp), %rax
movq -0x30(%rbp), %rcx
movl -0x18(%rbp), %edx
movl (%rcx), %esi
movl -0x1c(%rbp), %edi
movl 0x4(%rcx), %r8d
imull -0x14(%rbp), %r8d
addl %r8d, %edi
imull %edi, %esi
addl %esi, %edx
movl %edx, -0x24(%rbp)
movss -0x4(%rbp), %xmm0
movq 0x10(%rcx), %rdx
movslq -0x24(%rbp), %rsi
movss (%rdx,%rsi,4), %xmm2
movq 0x10(%rcx), %rcx
movslq -0x20(%rbp), %rdx
subss (%rcx,%rdx,4), %xmm2
movq 0x10(%rax), %rax
movslq -0x20(%rbp), %rcx
movss (%rax,%rcx,4), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, (%rax,%rcx,4)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x6ca38
jmp 0x6cad7
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x6c9f6
jmp 0x6cae7
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x6c9c1
jmp 0x6caf7
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x6c9aa
jmp 0x6cb07
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x6c993
popq %rbp
retq
nopw (%rax,%rax)