<commit_before>#include "gfx/blit.h"

void PixBufBlitNormal(PixBufT *dstBuf asm("a0"),
                      size_t x asm("d0"), size_t y asm("d1"),
                      PixBufT *srcBuf asm("a1"))
{
  size_t stride = dstBuf->width - srcBuf->width;

  uint8_t *src = srcBuf->data;
  uint8_t *dst = &dstBuf->data[y * dstBuf->width + x];

  y = srcBuf->height;

  do {
    x = srcBuf->width;

    do {
      *dst++ = *src++;
    } while (--x);

    dst += stride;
  } while (--y);
}

void PixBufBlitTransparent(PixBufT *dstBuf asm("a0"),
                           size_t x asm("d0"), size_t y asm("d1"),
                           PixBufT *srcBuf asm("a1"))
{
  size_t stride = dstBuf->width - srcBuf->width;

  uint8_t *src = srcBuf->data;
  uint8_t *dst = &dstBuf->data[y * dstBuf->width + x];

  uint8_t transparent = srcBuf->baseColor;

  y = srcBuf->height;

  do {
    x = srcBuf->width;
<commit_msg>Small fix.<commit_after>#include "gfx/blit.h"

void PixBufBlitNormal(PixBufT *dstBuf asm("a0"),
                      size_t x asm("d0"), size_t y asm("d1"),
                      PixBufT *srcBuf asm("a1"))
{
  size_t stride = dstBuf->width - srcBuf->width;

  uint8_t *src = srcBuf->data;
  uint8_t *dst = &dstBuf->data[y * dstBuf->width + x];

  /* If source image is longer, then copy only visible area. */
  if (y + srcBuf->height > dstBuf->height)
    y = dstBuf->height - y;
  else
    y = srcBuf->height;

  do {
    x = srcBuf->width;

    do {
      *dst++ = *src++;
    } while (--x);

    dst += stride;
  } while (--y);
}

void PixBufBlitTransparent(PixBufT *dstBuf asm("a0"),
                           size_t x asm("d0"), size_t y asm("d1"),
                           PixBufT *srcBuf asm("a1"))
{
  size_t stride = dstBuf->width - srcBuf->width;

  uint8_t *src = srcBuf->data;
  uint8_t *dst = &dstBuf->data[y * dstBuf->width + x];

  uint8_t transparent = srcBuf->baseColor;

  y = srcBuf->height;

  do {
    x = srcBuf->width;

{'fraction_non_alphanumeric': 0.16504356740133266, 'fraction_numerical': 0.013326499231163505, 'mean_word_length': 2.189542483660131, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 37, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7263104', 'n_tokens_mistral': 772, 'n_tokens_neox': 739, 'n_words': 167}