// File: /workspace/github_c_makefile_star2_O0/mjosaarinen[P]brutus/crypto_aead/scream10v3/sse/scream.c
// Function: tweak_expand
void tweak_expand(v16qi T[16], v16qi K[16], v16qi T3[48]) {
  int i;

  for (i = 0; i<16; i++)
    T3[i] = T[i];

  for (i = 0; i<8; i++) {
    T3[16+key_idx(i)]   = T[key_idx(i)] ^ T[key_idx(i+8)];
    T3[16+key_idx(i+8)] = T[key_idx(i)];
    T3[32+key_idx(i)]   = T[key_idx(i+8)];
    T3[32+key_idx(i+8)] = T[key_idx(i)] ^ T[key_idx(i+8)];
  }

  for (i = 0; i<48; i++)
    T3[i] ^= K[i%16];
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movq %rdx, -0x18(%rsp)
movl $0x0, -0x1c(%rsp)
cmpl $0x10, -0x1c(%rsp)
jge 0x5565
movq -0x8(%rsp), %rax
movslq -0x1c(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
vmovdqa (%rax), %xmm0
movq -0x18(%rsp), %rax
movslq -0x1c(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
vmovdqa %xmm0, (%rax)
movl -0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rsp)
jmp 0x5527
movl $0x0, -0x1c(%rsp)
cmpl $0x8, -0x1c(%rsp)
jge 0x5724
movq -0x8(%rsp), %rax
movl -0x1c(%rsp), %ecx
sarl %ecx
movl -0x1c(%rsp), %edx
andl $0x1, %edx
shll $0x3, %edx
addl %edx, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
vmovdqa (%rax), %xmm0
movq -0x8(%rsp), %rax
movl -0x1c(%rsp), %ecx
addl $0x8, %ecx
sarl %ecx
movl -0x1c(%rsp), %edx
addl $0x8, %edx
andl $0x1, %edx
shll $0x3, %edx
addl %edx, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
vpxor (%rax), %xmm0, %xmm0
movq -0x18(%rsp), %rax
movl -0x1c(%rsp), %ecx
sarl %ecx
movl -0x1c(%rsp), %edx
andl $0x1, %edx
shll $0x3, %edx
addl %edx, %ecx
addl $0x10, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
vmovdqa %xmm0, (%rax)
movq -0x8(%rsp), %rax
movl -0x1c(%rsp), %ecx
sarl %ecx
movl -0x1c(%rsp), %edx
andl $0x1, %edx
shll $0x3, %edx
addl %edx, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
vmovdqa (%rax), %xmm0
movq -0x18(%rsp), %rax
movl -0x1c(%rsp), %ecx
addl $0x8, %ecx
sarl %ecx
movl -0x1c(%rsp), %edx
addl $0x8, %edx
andl $0x1, %edx
shll $0x3, %edx
addl %edx, %ecx
addl $0x10, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
vmovdqa %xmm0, (%rax)
movq -0x8(%rsp), %rax
movl -0x1c(%rsp), %ecx
addl $0x8, %ecx
sarl %ecx
movl -0x1c(%rsp), %edx
addl $0x8, %edx
andl $0x1, %edx
shll $0x3, %edx
addl %edx, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
vmovdqa (%rax), %xmm0
movq -0x18(%rsp), %rax
movl -0x1c(%rsp), %ecx
sarl %ecx
movl -0x1c(%rsp), %edx
andl $0x1, %edx
shll $0x3, %edx
addl %edx, %ecx
addl $0x20, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
vmovdqa %xmm0, (%rax)
movq -0x8(%rsp), %rax
movl -0x1c(%rsp), %ecx
sarl %ecx
movl -0x1c(%rsp), %edx
andl $0x1, %edx
shll $0x3, %edx
addl %edx, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
vmovdqa (%rax), %xmm0
movq -0x8(%rsp), %rax
movl -0x1c(%rsp), %ecx
addl $0x8, %ecx
sarl %ecx
movl -0x1c(%rsp), %edx
addl $0x8, %edx
andl $0x1, %edx
shll $0x3, %edx
addl %edx, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
vpxor (%rax), %xmm0, %xmm0
movq -0x18(%rsp), %rax
movl -0x1c(%rsp), %ecx
addl $0x8, %ecx
sarl %ecx
movl -0x1c(%rsp), %edx
addl $0x8, %edx
andl $0x1, %edx
shll $0x3, %edx
addl %edx, %ecx
addl $0x20, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
vmovdqa %xmm0, (%rax)
movl -0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rsp)
jmp 0x556d
movl $0x0, -0x1c(%rsp)
cmpl $0x30, -0x1c(%rsp)
jge 0x5782
movq -0x10(%rsp), %rax
movq %rax, -0x28(%rsp)
movl -0x1c(%rsp), %eax
movl $0x10, %ecx
cltd
idivl %ecx
movq -0x28(%rsp), %rax
movslq %edx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
vmovdqa (%rax), %xmm0
movq -0x18(%rsp), %rax
movslq -0x1c(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
vpxor (%rax), %xmm0, %xmm0
vmovdqa %xmm0, (%rax)
movl -0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rsp)
jmp 0x572c
retq
nopw %cs:(%rax,%rax)