#include <stdio.h>

#define uint8 unsigned char
#define uint32 unsigned int

#define pg_compiler_barrier()      __asm__ __volatile__("" ::: "memory")

static uint8 un_pbox[32];
static uint8 pbox[32] = {
	16, 7, 20, 21, 29, 12, 28, 17, 1, 15, 23, 26, 5, 18, 31, 10,
	2, 8, 24, 14, 32, 27, 3, 9, 19, 13, 30, 6, 22, 11, 4, 25
};

static void
des_init(void)
{
	int		i;
	/*
	 * Invert the P-box permutation, and convert into OR-masks for handling
	 * the output of the S-box arrays setup above.
	 */
	for (i = 0; i < 32; i++)
{

		un_pbox[pbox[i] - 1] = i;
//pg_compiler_barrier();
}

fprintf(stderr, "!!!des_init| un_pbox:");
	for (i = 0; i < 32; i++)
		fprintf(stderr, " %d", un_pbox[i]);
fprintf(stderr, "\n");

}

int main()
{
	des_init();
}
