#include <stdio.h>
#include <stdint.h>
 
uint32_t reverse_bytes(uint32_t bytes)
{
    uint32_t aux = 0;
    uint8_t byte;
    int i;
 
    for(i = 0; i < 4; ++i)
    {
        byte = (bytes >> 8 * i) & 0xff;
        aux |= byte << (24 - 8 * i);
    }
    return aux;
}
 
int main(void) {
	// your code goes here
	uint32_t input = 0x123456;
	printf("input: 0x%08x\n", input);
	input = reverse_bytes(input);
	printf("input: 0x%08x\n", input);
	return 0;
}