// File: /workspace/github_c_makefile_star2_O0/SimpleDoger[P]Darknet_CPU_Only/image.c
// Function: ghost_image
void ghost_image(image source, image dest, int dx, int dy)
{
    int x,y,k;
    float max_dist = sqrt((-source.w/2. + .5)*(-source.w/2. + .5));
    for(k = 0; k < source.c; ++k){
        for(y = 0; y < source.h; ++y){
            for(x = 0; x < source.w; ++x){
                float dist = sqrt((x - source.w/2. + .5)*(x - source.w/2. + .5) + (y - source.h/2. + .5)*(y - source.h/2. + .5));
                float alpha = (1 - dist/max_dist);
                if(alpha < 0) alpha = 0;
                float v1 = get_pixel(source, x,y,k);
                float v2 = get_pixel(dest, dx+x,dy+y,k);
                float val = alpha*v1 + (1-alpha)*v2;
                set_pixel(dest, dx+x, dy+y, k, val);
            }
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
leaq 0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
leaq 0x10(%rbp), %rcx
movq %rcx, -0x38(%rbp)
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
xorl %eax, %eax
subl (%rcx), %eax
cvtsi2sd %eax, %xmm0
movsd 0x6090a(%rip), %xmm1    # 0x71058
divsd %xmm1, %xmm0
movsd 0x626ee(%rip), %xmm1    # 0x72e48
addsd %xmm1, %xmm0
xorl %eax, %eax
subl (%rcx), %eax
cvtsi2sd %eax, %xmm1
movsd 0x608ea(%rip), %xmm2    # 0x71058
divsd %xmm2, %xmm1
movsd 0x626ce(%rip), %xmm2    # 0x72e48
addsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
callq 0x3430
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x18(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x38(%rbp), %rcx
movl -0x14(%rbp), %eax
cmpl 0x8(%rcx), %eax
jge 0x109a7
movl $0x0, -0x10(%rbp)
movq -0x38(%rbp), %rcx
movl -0x10(%rbp), %eax
cmpl 0x4(%rcx), %eax
jge 0x10997
movl $0x0, -0xc(%rbp)
movq -0x38(%rbp), %rcx
movl -0xc(%rbp), %eax
cmpl (%rcx), %eax
jge 0x10987
movq -0x38(%rbp), %rax
cvtsi2sdl -0xc(%rbp), %xmm0
cvtsi2sdl (%rax), %xmm1
movsd 0x6086f(%rip), %xmm2    # 0x71058
divsd %xmm2, %xmm1
subsd %xmm1, %xmm0
movsd 0x6264f(%rip), %xmm1    # 0x72e48
addsd %xmm1, %xmm0
cvtsi2sdl -0xc(%rbp), %xmm2
cvtsi2sdl (%rax), %xmm1
movsd 0x6084a(%rip), %xmm3    # 0x71058
divsd %xmm3, %xmm1
subsd %xmm1, %xmm2
movsd 0x6262a(%rip), %xmm1    # 0x72e48
addsd %xmm1, %xmm2
cvtsi2sdl -0x10(%rbp), %xmm1
cvtsi2sdl 0x4(%rax), %xmm3
movsd 0x60824(%rip), %xmm4    # 0x71058
divsd %xmm4, %xmm3
subsd %xmm3, %xmm1
movsd 0x62604(%rip), %xmm3    # 0x72e48
addsd %xmm3, %xmm1
cvtsi2sdl -0x10(%rbp), %xmm3
cvtsi2sdl 0x4(%rax), %xmm4
movsd 0x607fe(%rip), %xmm5    # 0x71058
divsd %xmm5, %xmm4
subsd %xmm4, %xmm3
movsd 0x625de(%rip), %xmm4    # 0x72e48
addsd %xmm4, %xmm3
mulsd %xmm3, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
callq 0x3430
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x1c(%rbp)
movss -0x1c(%rbp), %xmm1
divss -0x18(%rbp), %xmm1
movss 0x60772(%rip), %xmm0    # 0x7100c
subss %xmm1, %xmm0
movss %xmm0, -0x20(%rbp)
xorps %xmm0, %xmm0
ucomiss -0x20(%rbp), %xmm0
jbe 0x108b4
xorps %xmm0, %xmm0
movss %xmm0, -0x20(%rbp)
movq -0x38(%rbp), %rax
movl -0xc(%rbp), %edi
movl -0x10(%rbp), %esi
movl -0x14(%rbp), %edx
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0xe580
movq -0x40(%rbp), %rax
movss %xmm0, -0x24(%rbp)
movl -0x4(%rbp), %edi
addl -0xc(%rbp), %edi
movl -0x8(%rbp), %esi
addl -0x10(%rbp), %esi
movl -0x14(%rbp), %edx
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0xe580
movq -0x40(%rbp), %rax
movss %xmm0, -0x28(%rbp)
movss -0x20(%rbp), %xmm0
movss -0x24(%rbp), %xmm2
movss 0x606dc(%rip), %xmm1    # 0x7100c
subss -0x20(%rbp), %xmm1
mulss -0x28(%rbp), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x2c(%rbp)
movl -0x4(%rbp), %edi
addl -0xc(%rbp), %edi
movl -0x8(%rbp), %esi
addl -0x10(%rbp), %esi
movl -0x14(%rbp), %edx
movss -0x2c(%rbp), %xmm0
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0xe6b0
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x107c5
jmp 0x10989
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x107ae
jmp 0x10999
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x10797
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)