// File: /workspace/github_cpp_makefile_star2_O3/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, %r15d
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
callq 0x2e3e
movupd 0x18(%r12), %xmm0
movupd %xmm0, 0x18(%rbx)
movq $0x0, (%rsp)
testl %r15d, %r15d
movl $0x0, %r13d
cmovgl %r15d, %r13d
movq %r12, 0x8(%rsp)
movl 0x24(%r12), %ecx
movq %r15, 0x18(%rsp)
leal (%rcx,%r15), %eax
cmpl %ecx, %eax
cmovgel %ecx, %eax
cmpl %eax, %r13d
jge 0x23e0
movq 0x10(%rsp), %rdx
testl %edx, %edx
movq (%rsp), %rax
cmovgl %edx, %eax
movq %rax, (%rsp)
movq 0x8(%rsp), %rax
movl 0x20(%rax), %eax
movl %r13d, %r12d
subl 0x18(%rsp), %r12d
negl %edx
movq %rdx, 0x20(%rsp)
movq 0x10(%rsp), %rdx
addl %eax, %edx
cmpl %eax, %edx
cmovgel %eax, %edx
movq (%rsp), %rsi
movq %rsi, %r15
cmpl %edx, %esi
jge 0x23c5
movl 0x20(%r14), %eax
imull %r12d, %eax
movq 0x20(%rsp), %rcx
addl %r15d, %ecx
addl %ecx, %eax
cltq
movq (%r14), %rcx
movl (%rcx,%rax,4), %ebp
movl 0x5df8(%rip), %eax      # 0x8108
cmpl $-0x1, %eax
je 0x2389
testl %eax, %eax
jne 0x232f
movq %r14, %rdi
movl $0x1, %esi
callq 0x2594
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
jmp 0x233c
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
mulsd 0x18(%r14), %xmm1
xorps %xmm0, %xmm0
cvtsi2sd %ebp, %xmm0
ucomisd %xmm0, %xmm1
jae 0x2369
subsd %xmm0, %xmm1
mulsd 0x2cdb(%rip), %xmm1     # 0x5030
movsd 0x18(%r14), %xmm0
mulsd 0x2cd5(%rip), %xmm0     # 0x5038
addsd %xmm1, %xmm0
jmp 0x2381
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 %r13d, %rcx
imulq %rax, %rcx
addq %r15, %rcx
movq (%rbx), %rax
addl %ebp, (%rax,%rcx,4)
movq 0x8(%rsp), %rax
movl 0x20(%rax), %eax
movq 0x10(%rsp), %rcx
addl %eax, %ecx
cmpl %eax, %ecx
cmovgel %eax, %ecx
incq %r15
cmpl %ecx, %r15d
jl 0x22f0
movq 0x8(%rsp), %rcx
movl 0x24(%rcx), %ecx
incl %r13d
movq 0x18(%rsp), %rdx
addl %ecx, %edx
cmpl %ecx, %edx
cmovgel %ecx, %edx
incl %r12d
cmpl %edx, %r13d
jl 0x22d5
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 0x241e
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x1100
movq %r14, %rdi
callq 0x11b0