// File: 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 %rax
movq %rdi, (%rsp)
cmpq $0x0, (%rsp)
jne 0x111f21
jmp 0x11215b
movq (%rsp), %rax
movl 0x124(%rax), %eax
andq $0x100000, %rax         # imm = 0x100000
cmpq $0x0, %rax
je 0x111f72
movq (%rsp), %rax
cmpq $0x0, 0x108(%rax)
je 0x111f70
movq (%rsp), %rax
movq 0x108(%rax), %rax
movq (%rsp), %rdi
movq (%rsp), %rsi
addq $0x218, %rsi            # imm = 0x218
movq (%rsp), %rcx
movq 0x1f0(%rcx), %rdx
addq $0x1, %rdx
callq *%rax
jmp 0x111f72
movq (%rsp), %rax
movl 0x124(%rax), %eax
andq $0x8000, %rax           # imm = 0x8000
cmpq $0x0, %rax
je 0x111fb1
movq (%rsp), %rdi
addq $0x218, %rdi            # imm = 0x218
movq (%rsp), %rax
movq 0x1f0(%rax), %rsi
addq $0x1, %rsi
movq (%rsp), %rax
movl 0x120(%rax), %edx
callq 0x12a470
movq (%rsp), %rax
movl 0x124(%rax), %eax
andq $0x10000, %rax          # imm = 0x10000
cmpq $0x0, %rax
je 0x111fe6
movq (%rsp), %rdi
addq $0x218, %rdi            # imm = 0x218
movq (%rsp), %rax
movq 0x1f0(%rax), %rsi
addq $0x1, %rsi
callq 0x12a3a0
movq (%rsp), %rax
movl 0x124(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x112022
movq (%rsp), %rdi
addq $0x218, %rdi            # imm = 0x218
movq (%rsp), %rax
movq 0x1f0(%rax), %rsi
addq $0x1, %rsi
movq (%rsp), %rax
movzbl 0x24f(%rax), %edx
callq 0x112160
movq (%rsp), %rax
movl 0x124(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x112053
movq (%rsp), %rdi
addq $0x218, %rdi            # imm = 0x218
movq (%rsp), %rax
movq 0x1f0(%rax), %rsi
addq $0x1, %rsi
callq 0x12a310
movq (%rsp), %rax
movl 0x124(%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x11208f
movq (%rsp), %rdi
addq $0x218, %rdi            # imm = 0x218
movq (%rsp), %rax
movq 0x1f0(%rax), %rsi
addq $0x1, %rsi
movq (%rsp), %rdx
addq $0x2cd, %rdx            # imm = 0x2CD
callq 0x1124d0
movq (%rsp), %rax
movl 0x124(%rax), %eax
andq $0x20000, %rax          # imm = 0x20000
cmpq $0x0, %rax
je 0x1120c4
movq (%rsp), %rdi
addq $0x218, %rdi            # imm = 0x218
movq (%rsp), %rax
movq 0x1f0(%rax), %rsi
addq $0x1, %rsi
callq 0x1129c0
movq (%rsp), %rax
movl 0x124(%rax), %eax
andq $0x80000, %rax          # imm = 0x80000
cmpq $0x0, %rax
je 0x1120f9
movq (%rsp), %rdi
addq $0x218, %rdi            # imm = 0x218
movq (%rsp), %rax
movq 0x1f0(%rax), %rsi
addq $0x1, %rsi
callq 0x112e10
movq (%rsp), %rax
movl 0x124(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x11212a
movq (%rsp), %rdi
addq $0x218, %rdi            # imm = 0x218
movq (%rsp), %rax
movq 0x1f0(%rax), %rsi
addq $0x1, %rsi
callq 0x12abc0
movq (%rsp), %rax
movl 0x124(%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x11215b
movq (%rsp), %rdi
addq $0x218, %rdi            # imm = 0x218
movq (%rsp), %rax
movq 0x1f0(%rax), %rsi
addq $0x1, %rsi
callq 0x12a190
popq %rax
retq
nopl (%rax)