<commit_before>
#include <stdio.h>
#include <conio.h> /* this is where Open Watcom hides the outp() etc. functions */
#include <ctype.h>
#include <stdlib.h>
#include <unistd.h>
#include <assert.h>
#include <fcntl.h>
#include <math.h>
#include <dos.h>

#include <hw/cpu/cpu.h>
#include <hw/dos/dos.h>
#include <hw/vga/vga.h>
#include <hw/vga/vrl.h>

#if TARGET_MSDOS == 32
static inline void draw_vrl1_vgax_modex_stripystretch(unsigned char *draw,unsigned char *s,unsigned int ystretch/*10.6 fixed pt*/) {
#else
static inline void draw_vrl1_vgax_modex_stripystretch(unsigned char far *draw,unsigned char *s,unsigned int ystretch/*10.6 fixed pt*/) {
#endif
	unsigned char run,skip,b,fy=0;

	do {
		run = *s++;
		if (run == 0xFF) break;
		skip = *s++;
		while (skip > 0) {
			while (fy < (1 << 6)) {
				draw += vga_stride;
				fy += ystretch;
			}
			fy -= 1 << 6;
			skip--;
		}

		if (run & 0x80) {
			b = *s++;
			while (run > 0x80) {
				while (fy < (1 << 6)) {
					*draw = b;
					draw += vga_stride;
					fy += ystretch;
				}
				fy -= 1 << 6;
				run--;
			}
		}
		else {
			while (run > 0) {
				while (fy < (1 << 6)) {
					*draw = *s;
					draw += vga_stride;
					fy += ystretch;
				}
				fy -= 1 << 6;
				run--;
				s++;
			}
		}
	} while (1);
}

void draw_vrl1_vgax_modexystretch(unsigned int x,unsigned int y,unsigned int xstretch/*1/64 scale 10.6 fixed pt*/,unsigned int ystretch/*1/6 scale 10.6*/,struct vrl1_vgax_header *hdr,vrl1_vgax_offset_t *lineoffs/*array hdr->width long*/,unsigned char *data,unsigned int datasz) {
#if TARGET_MSDOS == 32
	unsigned char *draw;
#else
	unsigned char far *draw;
#endif<commit_msg>optimize y stretch vrl a bit<commit_after>
#include <stdio.h>
#include <conio.h> /* this is where Open Watcom hides the outp() etc. functions */
#include <ctype.h>
#include <stdlib.h>
#include <unistd.h>
#include <assert.h>
#include <fcntl.h>
#include <math.h>
#include <dos.h>

#include <hw/cpu/cpu.h>
#include <hw/dos/dos.h>
#include <hw/vga/vga.h>
#include <hw/vga/vrl.h>

#if TARGET_MSDOS == 32
static inline void draw_vrl1_vgax_modex_stripystretch(unsigned char *draw,unsigned char *s,unsigned int ystretch/*10.6 fixed pt*/) {
#else
static inline void draw_vrl1_vgax_modex_stripystretch(unsigned char far *draw,unsigned char *s,unsigned int ystretch/*10.6 fixed pt*/) {
#endif
	unsigned char run,skip,b;
	unsigned int fy=0,ym;

	do {
		run = *s++;
		if (run == 0xFF) break;
		skip = *s++;
		if (skip > 0) {
			ym = (unsigned int)skip << 6U;
			while (fy < ym) {
				draw += vga_stride;
				fy += ystretch;
			}
			fy -= ym;
		}

		if (run & 0x80) {
			b = *s++;
			ym = ((unsigned int)(run - 0x80)) << 6U;
			while (fy < ym) {
				*draw = b;
				draw += vga_stride;
				fy += ystretch;
			}
			fy -= ym;
		}
		else {
			while (run > 0) {
				while (fy < (1 << 6)) {
					*draw = *s;
					draw += vga_stride;
					fy += ystretch;
				}
				fy -= 1 << 6;
				run--;
				s++;
			}
		}
	} while (1);
}

void draw_vrl1_vgax_modexystretch(unsigned int x,unsigned int y,unsigned int xstretch/*1/64 scale 10.6 fixed pt*/,unsigned int ystretch/*1/6 scale 10.6*/,struct vrl1_vgax_header *hdr,vrl1_vgax_offset_t *lineoffs/*array hdr->width long*/,unsigned char *data,unsigned int datasz) {
#if TARGET_MSDOS == 32
	unsigned char *draw;
#else
	unsigned char far *draw;
#endif
{'fraction_non_alphanumeric': 0.16257947320617622, 'fraction_numerical': 0.02785346654556464, 'mean_word_length': 3.109452736318408, 'pattern_counts': {'":': 0, '<': 55, '<?xml version=': 0, '>': 36, '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': '2309883', 'n_tokens_mistral': 1587, 'n_tokens_neox': 1349, 'n_words': 355}