<commit_before>#include <stdlib.h>
#include<stdio.h>

void _start(void) {
	uint64_t count,i;
	char* argv[0];
	char* envp[0];
	int res;
	uint64_t *rsp;
	__asm__
	(
		"mov %%rsp,%0\n\t"
		:"=r" (rsp)
	);
//	printf("1) %x\n",*rsp);
	printf("2) %x\n",*(rsp+5));
	rsp=rsp+5;	//rsp+1 implies after 8 bits we have argc
	printf("3) %x\n",*rsp);
	count=*rsp;
	i=1;
	while(i<count){
//		printf("argc %s\n",*(rsp+i));
		i++;
	}
	res = main(*rsp, argv, envp);
	exit(res);
}

<commit_msg>crt1.c displays argv. TODO: put it into char* by address manipulations<commit_after>#include <stdlib.h>
#include<stdio.h>
uint64_t *get_rsp();

void _start(void) {
	uint64_t count,i;
	char* argv[0];
	char* envp[0];
	int res;
	uint64_t *rsp;
	__asm__
	(
		"mov %%rsp,%0\n\t"
		:"=r" (rsp)
	);
	printf("1) %x\n",&rsp);
	printf("2) %d\n",*(rsp+5));
	rsp=rsp+5;	//rsp+1 implies after 8 bits we have argc
	printf("3) %d\n",*rsp);
	printf("4) %x\n",*(rsp+5));
	count=*rsp;
	i=1;
	while(i<=count){
		printf("rsp val %s \n",*(rsp+i));
		i++;
	}
//	argv=*(rsp+1);

	printf("%s\n",argv);
	res = main(*rsp, argv, envp);
	exit(res);
}


{'fraction_non_alphanumeric': 0.25477707006369427, 'fraction_numerical': 0.03275705186533212, 'mean_word_length': 4.164319248826291, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 7, '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': '2421864', 'n_tokens_mistral': 564, 'n_tokens_neox': 567, 'n_words': 110}