The picture of the code about the structure of AES S-Box is as follows:
The three pictures are as follows: