// File: iannisdezwart[P]forcefield-visualiser/./lib/png++-0.2.9/info.hpp
// Function: png::info::write() const
void write() const
        {
            assert(m_png);
            assert(m_info);

            sync_ihdr();
            if (m_color_type == color_type_palette)
            {
                if (! m_palette.empty())
                {
                    png_set_PLTE(m_png, m_info,
                                 const_cast< color* >(& m_palette[0]),
                                 (int) m_palette.size());
                }
                if (! m_tRNS.empty())
                {
#ifdef PNG_tRNS_SUPPORTED
                    png_set_tRNS(m_png, m_info,
                                 const_cast< byte* >(& m_tRNS[0]),
                                 m_tRNS.size(),
                                 NULL);
#else
                    throw error("attempted to write tRNS chunk; recompile with PNG_tRNS_SUPPORTED");
#endif
                }
            }

            if (m_gamma > 0)
            {
#ifdef PNG_gAMA_SUPPORTED
#ifdef PNG_FLOATING_POINT_SUPPORTED
                png_set_gAMA(m_png, m_info, m_gamma);
#else
                png_set_gAMA_fixed(m_png, m_info,
                                   (png_fixed_point)(m_gamma * 100000));
#endif
#else
                throw error("attempted to write gAMA chunk; recompile with PNG_gAMA_SUPPORTED");
#endif
            }

            png_write_info(m_png, m_info);
        }

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x38(%rsp)
cmpq $0x0, 0x8(%rax)
je 0xd93c
jmp 0xd95b
leaq 0x19cf(%rip), %rdi      # 0xf312
leaq 0x1a1b(%rip), %rsi      # 0xf365
movl $0x76, %edx
leaq 0x1a2a(%rip), %rcx      # 0xf380
callq 0x3210
movq 0x38(%rsp), %rax
cmpq $0x0, 0x10(%rax)
je 0xd969
jmp 0xd988
leaq 0x1a2e(%rip), %rdi      # 0xf39e
leaq 0x19ee(%rip), %rsi      # 0xf365
movl $0x77, %edx
leaq 0x19fd(%rip), %rcx      # 0xf380
callq 0x3210
movq 0x38(%rsp), %rdi
callq 0xdaf0
movq 0x38(%rsp), %rax
cmpl $0x3, 0x24(%rax)
jne 0xda7e
movq 0x38(%rsp), %rdi
addq $0x18, %rdi
addq $0x20, %rdi
callq 0xdb40
testb $0x1, %al
jne 0xda0c
movq 0x38(%rsp), %rdi
movq 0x8(%rdi), %rax
movq %rax, 0x20(%rsp)
movq 0x10(%rdi), %rax
movq %rax, 0x28(%rsp)
addq $0x18, %rdi
addq $0x20, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xdb90
movq 0x38(%rsp), %rdi
movq %rax, 0x30(%rsp)
addq $0x18, %rdi
addq $0x20, %rdi
callq 0xc330
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
movl %eax, %ecx
callq 0x30e0
movq 0x38(%rsp), %rdi
addq $0x18, %rdi
addq $0x38, %rdi
callq 0xdbb0
testb $0x1, %al
jne 0xda7c
movq 0x38(%rsp), %rdi
movq 0x8(%rdi), %rax
movq %rax, 0x8(%rsp)
movq 0x10(%rdi), %rax
movq %rax, 0x10(%rsp)
addq $0x18, %rdi
addq $0x38, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xdc00
movq 0x38(%rsp), %rdi
movq %rax, 0x18(%rsp)
addq $0x18, %rdi
addq $0x38, %rdi
callq 0xce90
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movl %eax, %ecx
xorl %eax, %eax
movl %eax, %r8d
callq 0x32d0
jmp 0xda7e
movq 0x38(%rsp), %rax
movsd 0x68(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0xdaa8
movq 0x38(%rsp), %rax
movq 0x8(%rax), %rdi
movq 0x10(%rax), %rsi
movsd 0x68(%rax), %xmm0
callq 0x35a0
movq 0x38(%rsp), %rax
movq 0x8(%rax), %rdi
movq 0x10(%rax), %rsi
callq 0x31e0
addq $0x48, %rsp
retq
nop