// File: /workspace/github_cpp_makefile_star2_O1/leobru[P]ACPUfont/averager.cc
// Function: Picture::add(Picture const&, int, int) const
Picture add(const Picture & other, int voff, int hoff) const {
	Picture ret = *this;
	for (int i = max(0, voff); i < min(height, height+voff); ++i)
	for (int j = max(0, hoff); j < min(width, width+hoff); ++j) {
            int pixel = other.p(i-voff,j-hoff);
            if (decontrast != -1) {
                // Experiment with decontrasting dot gain (useful for adding to the mean)
                double pivot = decontrast ? decontrast*other.weight : other.find_knee(true);
                if (pixel <= pivot) {
                    pixel = lround(pixel*255*other.weight/pivot);
                } else {
                    pixel = lround(255*other.weight + (pivot - pixel)/2);
                }
            }
            ret.p(i,j) += pixel; 
	}
        ret.weight += other.weight;
	return ret;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, 0x10(%rsp)
movl %ecx, %r12d
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
callq 0x2e0e
movupd 0x18(%r15), %xmm0
movupd %xmm0, 0x18(%rbx)
movq $0x0, 0x8(%rsp)
testl %r12d, %r12d
movl $0x0, %edx
cmovgl %r12d, %edx
movl 0x24(%r15), %eax
movq %r12, 0x18(%rsp)
leal (%rax,%r12), %ecx
cmpl %eax, %ecx
cmovll %ecx, %eax
movl %edx, 0x4(%rsp)
cmpl %eax, %edx
jge 0x2387
movq 0x10(%rsp), %rax
testl %eax, %eax
movq 0x8(%rsp), %rcx
cmovgl %eax, %ecx
movq %rcx, 0x8(%rsp)
movl 0x4(%rsp), %r12d
subl 0x18(%rsp), %r12d
negl %eax
movq %rax, 0x20(%rsp)
movl 0x20(%r15), %eax
movq 0x10(%rsp), %rcx
addl %eax, %ecx
cmpl %eax, %ecx
cmovll %ecx, %eax
movq 0x8(%rsp), %rcx
movq %rcx, %r13
cmpl %eax, %ecx
jge 0x2362
movl 0x20(%r14), %eax
imull %r12d, %eax
movq 0x20(%rsp), %rcx
addl %r13d, %ecx
addl %ecx, %eax
cltq
movq (%r14), %rcx
movl (%rcx,%rax,4), %ebp
movl 0x5e51(%rip), %eax      # 0x8108
cmpl $-0x1, %eax
je 0x2330
testl %eax, %eax
jne 0x22d6
movq %r14, %rdi
movl $0x1, %esi
callq 0x252c
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
jmp 0x22e3
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
mulsd 0x18(%r14), %xmm1
xorps %xmm0, %xmm0
cvtsi2sd %ebp, %xmm0
ucomisd %xmm0, %xmm1
jae 0x2310
subsd %xmm0, %xmm1
mulsd 0x2d34(%rip), %xmm1     # 0x5030
movsd 0x18(%r14), %xmm0
mulsd 0x2d2e(%rip), %xmm0     # 0x5038
addsd %xmm1, %xmm0
jmp 0x2328
movl %ebp, %eax
shll $0x8, %eax
subl %ebp, %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
mulsd 0x18(%r14), %xmm0
divsd %xmm1, %xmm0
callq 0x1030
movq %rax, %rbp
movslq 0x20(%rbx), %rax
movslq 0x4(%rsp), %rcx
imulq %rax, %rcx
addq %r13, %rcx
movq (%rbx), %rax
addl %ebp, (%rax,%rcx,4)
movl 0x20(%r15), %eax
movq 0x10(%rsp), %rcx
addl %eax, %ecx
cmpl %eax, %ecx
cmovll %ecx, %eax
incq %r13
cmpl %eax, %r13d
jl 0x2297
movl 0x4(%rsp), %edx
incl %edx
movl 0x24(%r15), %eax
movq 0x18(%rsp), %rcx
addl %eax, %ecx
cmpl %eax, %ecx
cmovll %ecx, %eax
incl %r12d
movl %edx, 0x4(%rsp)
cmpl %eax, %edx
jl 0x2277
movq %rbx, %rax
addq $0x18, %rax
movsd 0x18(%r14), %xmm0
addsd (%rax), %xmm0
movsd %xmm0, (%rax)
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x23c5
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x1100
movq %r14, %rdi
callq 0x11b0
nop