// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/png/pngwtran.c
// Function: png_do_write_transformations
void /* PRIVATE */
png_do_write_transformations(png_structp png_ptr)
{
   png_debug(1, "in png_do_write_transformations");

   if (png_ptr == NULL)
      return;

#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED
   if (png_ptr->transformations & PNG_USER_TRANSFORM)
      if (png_ptr->write_user_transform_fn != NULL)
        (*(png_ptr->write_user_transform_fn)) /* User write transform
                                                 function */
          (png_ptr,                    /* png_ptr */
           &(png_ptr->row_info),       /* row_info:     */
             /*  png_uint_32 width;          width of row */
             /*  png_uint_32 rowbytes;       number of bytes in row */
             /*  png_byte color_type;        color type of pixels */
             /*  png_byte bit_depth;         bit depth of samples */
             /*  png_byte channels;          number of channels (1-4) */
             /*  png_byte pixel_depth;       bits per pixel (depth*channels) */
           png_ptr->row_buf + 1);      /* start of pixel data for row */
#endif
#ifdef PNG_WRITE_FILLER_SUPPORTED
   if (png_ptr->transformations & PNG_FILLER)
      png_do_strip_filler(&(png_ptr->row_info), png_ptr->row_buf + 1,
         png_ptr->flags);
#endif
#ifdef PNG_WRITE_PACKSWAP_SUPPORTED
   if (png_ptr->transformations & PNG_PACKSWAP)
      png_do_packswap(&(png_ptr->row_info), png_ptr->row_buf + 1);
#endif
#ifdef PNG_WRITE_PACK_SUPPORTED
   if (png_ptr->transformations & PNG_PACK)
      png_do_pack(&(png_ptr->row_info), png_ptr->row_buf + 1,
         (png_uint_32)png_ptr->bit_depth);
#endif
#ifdef PNG_WRITE_SWAP_SUPPORTED
   if (png_ptr->transformations & PNG_SWAP_BYTES)
      png_do_swap(&(png_ptr->row_info), png_ptr->row_buf + 1);
#endif
#ifdef PNG_WRITE_SHIFT_SUPPORTED
   if (png_ptr->transformations & PNG_SHIFT)
      png_do_shift(&(png_ptr->row_info), png_ptr->row_buf + 1,
         &(png_ptr->shift));
#endif
#ifdef PNG_WRITE_SWAP_ALPHA_SUPPORTED
   if (png_ptr->transformations & PNG_SWAP_ALPHA)
      png_do_write_swap_alpha(&(png_ptr->row_info), png_ptr->row_buf + 1);
#endif
#ifdef PNG_WRITE_INVERT_ALPHA_SUPPORTED
   if (png_ptr->transformations & PNG_INVERT_ALPHA)
      png_do_write_invert_alpha(&(png_ptr->row_info), png_ptr->row_buf + 1);
#endif
#ifdef PNG_WRITE_BGR_SUPPORTED
   if (png_ptr->transformations & PNG_BGR)
      png_do_bgr(&(png_ptr->row_info), png_ptr->row_buf + 1);
#endif
#ifdef PNG_WRITE_INVERT_SUPPORTED
   if (png_ptr->transformations & PNG_INVERT_MONO)
      png_do_invert(&(png_ptr->row_info), png_ptr->row_buf + 1);
#endif
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x842c8
movq %rdi, %rbx
movl 0x124(%rdi), %eax
btl $0x14, %eax
jae 0x841a9
movq 0x108(%rbx), %rcx
testq %rcx, %rcx
je 0x841a9
leaq 0x218(%rbx), %rsi
movq 0x1f0(%rbx), %rdx
incq %rdx
movq %rbx, %rdi
callq *%rcx
movl 0x124(%rbx), %eax
testw %ax, %ax
jns 0x841d0
leaq 0x218(%rbx), %rdi
movq 0x1f0(%rbx), %rsi
incq %rsi
movl 0x120(%rbx), %edx
callq 0x8eeab
movl 0x124(%rbx), %eax
btl $0x10, %eax
jae 0x841f2
leaq 0x218(%rbx), %rdi
movq 0x1f0(%rbx), %rsi
incq %rsi
callq 0x8ee60
movl 0x124(%rbx), %eax
testb $0x4, %al
je 0x84219
leaq 0x218(%rbx), %rdi
movq 0x1f0(%rbx), %rsi
incq %rsi
movzbl 0x24f(%rbx), %edx
callq 0x842e4
movl 0x124(%rbx), %eax
testb $0x10, %al
je 0x84239
leaq 0x218(%rbx), %rdi
movq 0x1f0(%rbx), %rsi
incq %rsi
callq 0x8ee42
movl 0x124(%rbx), %eax
testb $0x8, %al
je 0x84260
leaq 0x218(%rbx), %rdi
movq 0x1f0(%rbx), %rsi
incq %rsi
leaq 0x2cd(%rbx), %rdx
callq 0x84433
movl 0x124(%rbx), %eax
btl $0x11, %eax
jae 0x84282
leaq 0x218(%rbx), %rdi
movq 0x1f0(%rbx), %rsi
incq %rsi
callq 0x84636
movl 0x124(%rbx), %eax
btl $0x13, %eax
jae 0x842a4
leaq 0x218(%rbx), %rdi
movq 0x1f0(%rbx), %rsi
incq %rsi
callq 0x846c0
movl 0x124(%rbx), %eax
testb $0x1, %al
je 0x842c4
leaq 0x218(%rbx), %rdi
movq 0x1f0(%rbx), %rsi
incq %rsi
callq 0x8f0da
movl 0x124(%rbx), %eax
testb $0x20, %al
jne 0x842ca
popq %rbx
retq
movq 0x1f0(%rbx), %rsi
addq $0x218, %rbx            # imm = 0x218
incq %rsi
movq %rbx, %rdi
popq %rbx
jmp 0x8edec