// File: /workspace/github_cpp_makefile_star2_O2/jBlinden[P]private-codis/./aes.h
// Function: AES_128_Key_Expansion(unsigned char const*, AESKey*)
static inline void AES_128_Key_Expansion(const unsigned char *userkey, AESKey *key) {
    __m128i x0, x1, x2;
    __m128i *kp = (__m128i *) key;
    kp[0] = x0 = _mm_loadu_si128((__m128i *) userkey);
    x2 = _mm_setzero_si128();
    EXPAND_ASSIST(x0, x1, x2, x0, 255, 1);
    kp[1] = x0;
    EXPAND_ASSIST(x0, x1, x2, x0, 255, 2);
    kp[2] = x0;
    EXPAND_ASSIST(x0, x1, x2, x0, 255, 4);
    kp[3] = x0;
    EXPAND_ASSIST(x0, x1, x2, x0, 255, 8);
    kp[4] = x0;
    EXPAND_ASSIST(x0, x1, x2, x0, 255, 16);
    kp[5] = x0;
    EXPAND_ASSIST(x0, x1, x2, x0, 255, 32);
    kp[6] = x0;
    EXPAND_ASSIST(x0, x1, x2, x0, 255, 64);
    kp[7] = x0;
    EXPAND_ASSIST(x0, x1, x2, x0, 255, 128);
    kp[8] = x0;
    EXPAND_ASSIST(x0, x1, x2, x0, 255, 27);
    kp[9] = x0;
    EXPAND_ASSIST(x0, x1, x2, x0, 255, 54);
    kp[10] = x0;

    key->rounds = 10;
}

// Assembly:
vmovdqu (%rdi), %xmm1
vxorps %xmm0, %xmm0, %xmm0
vaeskeygenassist $0x1, %xmm1, %xmm2
vshufps $0x10, %xmm1, %xmm0, %xmm3 # xmm3 = xmm0[0,0],xmm1[1,0]
vmovdqa %xmm1, (%rsi)
vxorps %xmm3, %xmm1, %xmm1
vshufps $0x8c, %xmm1, %xmm3, %xmm3 # xmm3 = xmm3[0,3],xmm1[0,2]
vpshufd $0xff, %xmm2, %xmm2     # xmm2 = xmm2[3,3,3,3]
vpternlogq $0x96, %xmm3, %xmm1, %xmm2
vaeskeygenassist $0x2, %xmm2, %xmm1
vshufps $0x10, %xmm2, %xmm0, %xmm3 # xmm3 = xmm0[0,0],xmm2[1,0]
vmovdqa %xmm2, 0x10(%rsi)
vxorps %xmm3, %xmm2, %xmm2
vshufps $0x8c, %xmm2, %xmm3, %xmm3 # xmm3 = xmm3[0,3],xmm2[0,2]
vpshufd $0xff, %xmm1, %xmm1     # xmm1 = xmm1[3,3,3,3]
vpternlogq $0x96, %xmm3, %xmm2, %xmm1
vaeskeygenassist $0x4, %xmm1, %xmm2
vshufps $0x10, %xmm1, %xmm0, %xmm3 # xmm3 = xmm0[0,0],xmm1[1,0]
vmovdqa %xmm1, 0x20(%rsi)
vxorps %xmm3, %xmm1, %xmm1
vshufps $0x8c, %xmm1, %xmm3, %xmm3 # xmm3 = xmm3[0,3],xmm1[0,2]
vpshufd $0xff, %xmm2, %xmm2     # xmm2 = xmm2[3,3,3,3]
vpternlogq $0x96, %xmm3, %xmm1, %xmm2
vaeskeygenassist $0x8, %xmm2, %xmm1
vshufps $0x10, %xmm2, %xmm0, %xmm3 # xmm3 = xmm0[0,0],xmm2[1,0]
vmovdqa %xmm2, 0x30(%rsi)
vxorps %xmm3, %xmm2, %xmm2
vshufps $0x8c, %xmm2, %xmm3, %xmm3 # xmm3 = xmm3[0,3],xmm2[0,2]
vpshufd $0xff, %xmm1, %xmm1     # xmm1 = xmm1[3,3,3,3]
vpternlogq $0x96, %xmm3, %xmm2, %xmm1
vaeskeygenassist $0x10, %xmm1, %xmm2
vshufps $0x10, %xmm1, %xmm0, %xmm3 # xmm3 = xmm0[0,0],xmm1[1,0]
vmovdqa %xmm1, 0x40(%rsi)
vxorps %xmm3, %xmm1, %xmm1
vshufps $0x8c, %xmm1, %xmm3, %xmm3 # xmm3 = xmm3[0,3],xmm1[0,2]
vpshufd $0xff, %xmm2, %xmm2     # xmm2 = xmm2[3,3,3,3]
vpternlogq $0x96, %xmm3, %xmm1, %xmm2
vaeskeygenassist $0x20, %xmm2, %xmm1
vshufps $0x10, %xmm2, %xmm0, %xmm3 # xmm3 = xmm0[0,0],xmm2[1,0]
vmovdqa %xmm2, 0x50(%rsi)
vxorps %xmm3, %xmm2, %xmm2
vshufps $0x8c, %xmm2, %xmm3, %xmm3 # xmm3 = xmm3[0,3],xmm2[0,2]
vpshufd $0xff, %xmm1, %xmm1     # xmm1 = xmm1[3,3,3,3]
vpternlogq $0x96, %xmm3, %xmm2, %xmm1
vaeskeygenassist $0x40, %xmm1, %xmm2
vshufps $0x10, %xmm1, %xmm0, %xmm3 # xmm3 = xmm0[0,0],xmm1[1,0]
vmovdqa %xmm1, 0x60(%rsi)
vxorps %xmm3, %xmm1, %xmm1
vshufps $0x8c, %xmm1, %xmm3, %xmm3 # xmm3 = xmm3[0,3],xmm1[0,2]
vpshufd $0xff, %xmm2, %xmm2     # xmm2 = xmm2[3,3,3,3]
vpternlogq $0x96, %xmm3, %xmm1, %xmm2
vaeskeygenassist $0x80, %xmm2, %xmm1
vshufps $0x10, %xmm2, %xmm0, %xmm3 # xmm3 = xmm0[0,0],xmm2[1,0]
vmovdqa %xmm2, 0x70(%rsi)
vxorps %xmm3, %xmm2, %xmm2
vshufps $0x8c, %xmm2, %xmm3, %xmm3 # xmm3 = xmm3[0,3],xmm2[0,2]
vpshufd $0xff, %xmm1, %xmm1     # xmm1 = xmm1[3,3,3,3]
vpternlogq $0x96, %xmm3, %xmm2, %xmm1
vaeskeygenassist $0x1b, %xmm1, %xmm2
vshufps $0x10, %xmm1, %xmm0, %xmm3 # xmm3 = xmm0[0,0],xmm1[1,0]
vmovdqa %xmm1, 0x80(%rsi)
vxorps %xmm3, %xmm1, %xmm1
vshufps $0x8c, %xmm1, %xmm3, %xmm3 # xmm3 = xmm3[0,3],xmm1[0,2]
vpshufd $0xff, %xmm2, %xmm2     # xmm2 = xmm2[3,3,3,3]
vpternlogq $0x96, %xmm3, %xmm1, %xmm2
vaeskeygenassist $0x36, %xmm2, %xmm1
vshufps $0x10, %xmm2, %xmm0, %xmm0 # xmm0 = xmm0[0,0],xmm2[1,0]
vmovdqa %xmm2, 0x90(%rsi)
vxorps %xmm0, %xmm2, %xmm2
vshufps $0x8c, %xmm2, %xmm0, %xmm0 # xmm0 = xmm0[0,3],xmm2[0,2]
vpshufd $0xff, %xmm1, %xmm1     # xmm1 = xmm1[3,3,3,3]
vpternlogq $0x96, %xmm0, %xmm2, %xmm1
vmovdqa %xmm1, 0xa0(%rsi)
movl $0xa, 0xf0(%rsi)
retq
nop