// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/minalpherv11/ref/minalpher.c
// Function: T
static void T( 
  unsigned char *_m_      /* I/O  Message     */
  )
{
  int i,j;
  unsigned char t0,t1,t2,t3,temp[16];

  /*--- ShuffleRows ---*/
  for( i=0; i<4; i++ ){
    t0 = _m_[SR1[i]];
    t1 = _m_[SR2[i]+8];
    t2 = _m_[iSR1[i]+16];
    t3 = _m_[iSR2[i]+24];

    if( i == 0 ){
      t2 = (t2>>4) | (t2<<4);
    }else if( i == 1 ){
      t0 = (t0>>4) | (t0<<4);
    }else if( i == 2 ){
      t1 = (t1>>4) | (t1<<4);
    }else if( i == 3 ){
      t3 = (t3>>4) | (t3<<4);
    }

    temp[i]    = t0;
    temp[i+4]  = t1;
    temp[i+8]  = t2;
    temp[i+12] = t3;
  }

  for( i=0; i<4; i++ ){
    _m_[i]    = temp[i];
    _m_[i+8]  = temp[i+4];
    _m_[i+16] = temp[i+8];
    _m_[i+24] = temp[i+12];
  }       

  for( i=0; i<4; i++ ){
    t0 = _m_[iSR1[i]+4];
    t1 = _m_[iSR2[i]+8+4];
    t2 = _m_[SR1[i]+16+4];
    t3 = _m_[SR2[i]+24+4];

    if( i == 0 ){
      t0 = (t0>>4) | (t0<<4);
    }else if( i == 1 ){
      t2 = (t2>>4) | (t2<<4);
    }else if( i == 2 ){
      t3 = (t3>>4) | (t3<<4);
    }else if( i == 3 ){
      t1 = (t1>>4) | (t1<<4);
    }

    temp[i]    = t0;
    temp[i+4]  = t1;
    temp[i+8]  = t2;
    temp[i+12] = t3;
  }

  for( i=0; i<4; i++ ){
    _m_[i+4]    = temp[i];
    _m_[i+8+4]  = temp[i+4];
    _m_[i+16+4] = temp[i+8];
    _m_[i+24+4] = temp[i+12];
  }       

  /*=== SwapMatrices ===*/
  for( i=0; i<BLOCK_SIZE; i+=8 ){
    for( j=0; j<4; j++ ){
      t0 = _m_[i+j];
      _m_[i+j] = _m_[i+j+4];
      _m_[i+j+4] = t0;
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
xorl %r8d, %r8d
leaq 0x810(%rip), %rax       # 0x3150
leaq 0x819(%rip), %rcx       # 0x3160
leaq 0x862(%rip), %rdx       # 0x31b0
leaq 0x81b(%rip), %rsi       # 0x3170
leaq 0x718(%rip), %r9        # 0x3074
xorl %r10d, %r10d
movslq (%r8,%rax), %r11
movb (%rdi,%r11), %r11b
movslq (%r8,%rcx), %rbx
movb 0x8(%rdi,%rbx), %bl
movslq (%r8,%rdx), %r14
movb 0x10(%rdi,%r14), %bpl
movslq (%r8,%rsi), %r14
movb 0x18(%rdi,%r14), %r14b
cmpl $0x3, %r10d
ja 0x29a9
movl %r10d, %r15d
movslq (%r9,%r15,4), %r15
addq %r9, %r15
jmpq *%r15
rolb $0x4, %bpl
jmp 0x29a9
rolb $0x4, %bl
jmp 0x29a9
rolb $0x4, %r14b
jmp 0x29a9
rolb $0x4, %r11b
movb %r11b, -0x18(%rsp,%r10)
movb %bl, -0x14(%rsp,%r10)
movb %bpl, -0x10(%rsp,%r10)
movb %r14b, -0xc(%rsp,%r10)
incq %r10
addq $0x4, %r8
cmpq $0x4, %r10
jne 0x295f
movl -0x18(%rsp), %r8d
movl %r8d, (%rdi)
movl -0x14(%rsp), %r8d
movl %r8d, 0x8(%rdi)
movl -0x10(%rsp), %r8d
movl %r8d, 0x10(%rdi)
movl -0xc(%rsp), %r8d
movl %r8d, 0x18(%rdi)
xorl %r8d, %r8d
leaq 0x68d(%rip), %r9        # 0x3084
xorl %r10d, %r10d
movslq (%r8,%rdx), %r11
movb 0x4(%rdi,%r11), %r11b
movslq (%r8,%rsi), %rbx
movb 0xc(%rdi,%rbx), %bl
movslq (%r8,%rax), %r14
movb 0x14(%rdi,%r14), %bpl
movslq (%r8,%rcx), %r14
movb 0x1c(%rdi,%r14), %r14b
cmpl $0x3, %r10d
ja 0x2a45
movl %r10d, %r15d
movslq (%r9,%r15,4), %r15
addq %r9, %r15
jmpq *%r15
rolb $0x4, %r11b
jmp 0x2a45
rolb $0x4, %r14b
jmp 0x2a45
rolb $0x4, %bl
jmp 0x2a45
rolb $0x4, %bpl
movb %r11b, -0x18(%rsp,%r10)
movb %bl, -0x14(%rsp,%r10)
movb %bpl, -0x10(%rsp,%r10)
movb %r14b, -0xc(%rsp,%r10)
incq %r10
addq $0x4, %r8
cmpq $0x4, %r10
jne 0x29fa
movl -0x18(%rsp), %eax
movl %eax, 0x4(%rdi)
movl -0x14(%rsp), %eax
movl %eax, 0xc(%rdi)
movl -0x10(%rsp), %eax
movl %eax, 0x14(%rdi)
movl -0xc(%rsp), %eax
movl %eax, 0x1c(%rdi)
movq $-0x8, %rax
rolq $0x20, 0x8(%rdi,%rax)
addq $0x8, %rax
cmpq $0x18, %rax
jb 0x2a89
popq %rbx
popq %r14
popq %r15
popq %rbp
retq