<commit_before>/*
 * Allocates a C string on the stack, for
 * use within system calls, which is the only
 * place the Myrddin stack should need nul-terminated
 * strings.
 *
 * This is in assembly, because for efficiency we
 * allocate the C strings on the stack, and don't adjust
 * %rsp when returning.
 */
.globl std$cstring
.globl _std$cstring
_std$cstring:
std$cstring:
	movq (%rsp),%r15	/* ret addr */
	movq 8(%rsp),%rsi	/* src */
        movq %rsp,%rdi          /* dest */
	movq %rsp,%rax          /* ret val */
	movq 16(%rsp),%rcx	/* len */

	subq %rcx,%rsp          /* get stack */
        subq $1,%rsp            /* nul */
        andq $(~15),%rsp        /* align */

	cld
	rep movsb
        movb $0,(%rdi)          /* terminate */<commit_msg>Make sure we don't clobber cstring()'s ret val.<commit_after>/*
 * Allocates a C string on the stack, for
 * use within system calls, which is the only
 * place the Myrddin stack should need nul-terminated
 * strings.
 *
 * This is in assembly, because for efficiency we
 * allocate the C strings on the stack, and don't adjust
 * %rsp when returning.
 */
.globl std$cstring
.globl _std$cstring
_std$cstring:
std$cstring:
	movq (%rsp),%r15	/* ret addr */
	movq 8(%rsp),%rsi	/* src */
        movq %rsp,%rdi          /* dest */
	movq %rsp,%rax          /* ret val */
	movq 16(%rsp),%rcx	/* len */

        subq $16,%rsp           /* compensate for args */
	subq %rcx,%rsp          /* get stack */
        subq $1,%rsp            /* nul */
        andq $(~15),%rsp        /* align */

	cld
	rep movsb
        movb $0,(%rdi)          /* terminate */
{'fraction_non_alphanumeric': 0.14, 'fraction_numerical': 0.0125, 'mean_word_length': 2.102713178294574, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3043914', 'n_tokens_mistral': 571, 'n_tokens_neox': 557, 'n_words': 182}