// File: /workspace/github_c_makefile_star2_O2/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 0x12cc(%rip), %rax      # 0x3030
leaq 0x12d5(%rip), %rcx      # 0x3040
leaq 0x12ee(%rip), %rdx      # 0x3060
leaq 0x12d7(%rip), %rsi      # 0x3050
leaq 0x1280(%rip), %r9       # 0x3000
xorl %r10d, %r10d
cmpq $0x10, %r8
je 0x1dea
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
movl %r10d, %r15d
movslq (%r9,%r15,4), %r15
addq %r9, %r15
jmpq *%r15
rolb $0x4, %bpl
jmp 0x1dcd
rolb $0x4, %bl
jmp 0x1dcd
rolb $0x4, %r14b
jmp 0x1dcd
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
jmp 0x1d83
xorl %r8d, %r8d
cmpq $0x4, %r8
je 0x1e1f
movb -0x18(%rsp,%r8), %r9b
movb %r9b, (%rdi,%r8)
movb -0x14(%rsp,%r8), %r9b
movb %r9b, 0x8(%rdi,%r8)
movb -0x10(%rsp,%r8), %r9b
movb %r9b, 0x10(%rdi,%r8)
movb -0xc(%rsp,%r8), %r9b
movb %r9b, 0x18(%rdi,%r8)
incq %r8
jmp 0x1ded
xorl %r8d, %r8d
leaq 0x11e7(%rip), %r9       # 0x3010
xorl %r10d, %r10d
cmpq $0x10, %r8
je 0x1e94
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
movl %r10d, %r15d
movslq (%r9,%r15,4), %r15
addq %r9, %r15
jmpq *%r15
rolb $0x4, %r11b
jmp 0x1e77
rolb $0x4, %r14b
jmp 0x1e77
rolb $0x4, %bl
jmp 0x1e77
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
jmp 0x1e2c
movabsq $0xc, %rax
cmpq $0x10, %rax
je 0x1ec8
movb -0x24(%rsp,%rax), %cl
movb %cl, -0x8(%rdi,%rax)
movb -0x20(%rsp,%rax), %cl
movb %cl, (%rdi,%rax)
movb -0x1c(%rsp,%rax), %cl
movb %cl, 0x8(%rdi,%rax)
movb -0x18(%rsp,%rax), %cl
movb %cl, 0x10(%rdi,%rax)
incq %rax
jmp 0x1e9e
addq $0x4, %rdi
xorl %eax, %eax
movabsq $-0x4, %rcx
cmpq $0x1f, %rax
ja 0x1f07
movq %rcx, %rdx
testq %rdx, %rdx
je 0x1efd
movb (%rdi,%rdx), %sil
movb 0x4(%rdi,%rdx), %r8b
movb %r8b, (%rdi,%rdx)
movb %sil, 0x4(%rdi,%rdx)
incq %rdx
jmp 0x1ee1
addq $0x8, %rax
addq $0x8, %rdi
jmp 0x1ed8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq