mirror of
https://gitlab.com/80486DX2-66/gists
synced 2024-12-27 05:40:17 +05:30
39 lines
946 B
C
39 lines
946 B
C
|
/*
|
||
|
* bytebeat-cryptic.c
|
||
|
*
|
||
|
* NOTE: PulseAudio: Pipe STDOUT of this program to aplay -c 1 -f U8 -r 44100
|
||
|
*
|
||
|
* Author: Intel A80486DX2-66
|
||
|
* License: Unlicense
|
||
|
*/
|
||
|
|
||
|
#include <stdio.h>
|
||
|
#include <stdlib.h>
|
||
|
#include <time.h>
|
||
|
|
||
|
int main(void) {
|
||
|
srand(time(NULL));
|
||
|
|
||
|
volatile float k[] = {0.7088250000000000f, 0.9451000000000000f,
|
||
|
1.2601333301830002f, 1.4176500000000000f};
|
||
|
|
||
|
unsigned A = 4294967295, B = rand();
|
||
|
|
||
|
for (unsigned i = 0; i < 3; i++) {
|
||
|
for (unsigned j = 1; j < 4; j++) {
|
||
|
if (rand() & 1) {
|
||
|
k[i] = *(float*)(unsigned[]){(*(unsigned*)&k[i]) ^ (*(unsigned*)&k[j])};
|
||
|
k[j] = *(float*)(unsigned[]){(*(unsigned*)&k[j]) ^ (*(unsigned*)&k[i])};
|
||
|
k[i] = *(float*)(unsigned[]){(*(unsigned*)&k[i]) ^ (*(unsigned*)&k[j])};
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
while (1) {
|
||
|
float C = k[(A / 65536) & 0b11];
|
||
|
C *= ((B >> ((7 & A >> 13) << 1)) & 6);
|
||
|
unsigned D = ++A * C / 4;
|
||
|
putchar(D);
|
||
|
}
|
||
|
}
|