// File: /workspace/github_cpp_makefile_star2_O3/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 0x91944
movq %rdi, %rbx
movl 0x124(%rdi), %eax
btl $0x14, %eax
jae 0x91825
movq 0x108(%rbx), %rcx
testq %rcx, %rcx
je 0x91825
leaq 0x218(%rbx), %rsi
movq 0x1f0(%rbx), %rdx
incq %rdx
movq %rbx, %rdi
callq *%rcx
movl 0x124(%rbx), %eax
testw %ax, %ax
jns 0x9184c
leaq 0x218(%rbx), %rdi
movq 0x1f0(%rbx), %rsi
incq %rsi
movl 0x120(%rbx), %edx
callq 0x9d510
movl 0x124(%rbx), %eax
btl $0x10, %eax
jae 0x9186e
leaq 0x218(%rbx), %rdi
movq 0x1f0(%rbx), %rsi
incq %rsi
callq 0x9d4c2
movl 0x124(%rbx), %eax
testb $0x4, %al
je 0x91895
leaq 0x218(%rbx), %rdi
movq 0x1f0(%rbx), %rsi
incq %rsi
movzbl 0x24f(%rbx), %edx
callq 0x91960
movl 0x124(%rbx), %eax
testb $0x10, %al
je 0x918b5
leaq 0x218(%rbx), %rdi
movq 0x1f0(%rbx), %rsi
incq %rsi
callq 0x9d4a0
movl 0x124(%rbx), %eax
testb $0x8, %al
je 0x918dc
leaq 0x218(%rbx), %rdi
movq 0x1f0(%rbx), %rsi
incq %rsi
leaq 0x2cd(%rbx), %rdx
callq 0x91af3
movl 0x124(%rbx), %eax
btl $0x11, %eax
jae 0x918fe
leaq 0x218(%rbx), %rdi
movq 0x1f0(%rbx), %rsi
incq %rsi
callq 0x91ced
movl 0x124(%rbx), %eax
btl $0x13, %eax
jae 0x91920
leaq 0x218(%rbx), %rdi
movq 0x1f0(%rbx), %rsi
incq %rsi
callq 0x91d91
movl 0x124(%rbx), %eax
testb $0x1, %al
je 0x91940
leaq 0x218(%rbx), %rdi
movq 0x1f0(%rbx), %rsi
incq %rsi
callq 0x9d785
movl 0x124(%rbx), %eax
testb $0x20, %al
jne 0x91946
popq %rbx
retq
movq 0x1f0(%rbx), %rsi
addq $0x218, %rbx            # imm = 0x218
incq %rsi
movq %rbx, %rdi
popq %rbx
jmp 0x9d440