// File: kobanium[P]Ray/src/pattern/Pattern.cpp
// Function: MD5HorizontalMirror(unsigned long long)
unsigned long long
MD5HorizontalMirror( const unsigned long long md5 )
{
  return (md5 & 0x0000300003)
    | (REV18((md5 & 0xC00000000C) >> 2) << 2)
    | (REV16((md5 & 0x3000000030) >> 4) << 4)
    | (REV14((md5 & 0x0C000000C0) >> 6) << 6)
    | (REV12((md5 & 0x0300000300) >> 8) << 8)
    | (REV10((md5 & 0x00C0000C00) >> 10) << 10)
    | (REV8((md5 & 0x0030003000) >> 12) << 12)
    | (REV6((md5 & 0x000C00C000) >> 14) << 14)
    | (REV4((md5 & 0x0003030000) >> 16) << 16)
    | (REV2((md5 & 0x0000CC0000) >> 18) << 18);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
andq $0x300003, %rax         # imm = 0x300003
movabsq $0xc00000000c, %rcx     # imm = 0xC00000000C
andq -0x8(%rbp), %rcx
shrq $0x2, %rcx
shrq $0x24, %rcx
movabsq $0xc00000000c, %rdx     # imm = 0xC00000000C
andq -0x8(%rbp), %rdx
shrq $0x2, %rdx
andq $0x3, %rdx
shlq $0x24, %rdx
orq %rdx, %rcx
shlq $0x2, %rcx
orq %rcx, %rax
movabsq $0x3000000030, %rcx     # imm = 0x3000000030
andq -0x8(%rbp), %rcx
shrq $0x4, %rcx
shrq $0x20, %rcx
movabsq $0x3000000030, %rdx     # imm = 0x3000000030
andq -0x8(%rbp), %rdx
shrq $0x4, %rdx
andq $0x3, %rdx
shlq $0x20, %rdx
orq %rdx, %rcx
shlq $0x4, %rcx
orq %rcx, %rax
movabsq $0xc000000c0, %rcx      # imm = 0xC000000C0
andq -0x8(%rbp), %rcx
shrq $0x6, %rcx
shrq $0x1c, %rcx
movabsq $0xc000000c0, %rdx      # imm = 0xC000000C0
andq -0x8(%rbp), %rdx
shrq $0x6, %rdx
andq $0x3, %rdx
shlq $0x1c, %rdx
orq %rdx, %rcx
shlq $0x6, %rcx
orq %rcx, %rax
movabsq $0x300000300, %rcx      # imm = 0x300000300
andq -0x8(%rbp), %rcx
shrq $0x8, %rcx
shrq $0x18, %rcx
movabsq $0x300000300, %rdx      # imm = 0x300000300
andq -0x8(%rbp), %rdx
shrq $0x8, %rdx
andq $0x3, %rdx
shlq $0x18, %rdx
orq %rdx, %rcx
shlq $0x8, %rcx
orq %rcx, %rax
movabsq $0xc0000c00, %rcx       # imm = 0xC0000C00
andq -0x8(%rbp), %rcx
shrq $0xa, %rcx
shrq $0x14, %rcx
movabsq $0xc0000c00, %rdx       # imm = 0xC0000C00
andq -0x8(%rbp), %rdx
shrq $0xa, %rdx
andq $0x3, %rdx
shlq $0x14, %rdx
orq %rdx, %rcx
shlq $0xa, %rcx
orq %rcx, %rax
movq -0x8(%rbp), %rcx
andq $0x30003000, %rcx       # imm = 0x30003000
shrq $0xc, %rcx
shrq $0x10, %rcx
movq -0x8(%rbp), %rdx
andq $0x30003000, %rdx       # imm = 0x30003000
shrq $0xc, %rdx
andq $0x3, %rdx
shlq $0x10, %rdx
orq %rdx, %rcx
shlq $0xc, %rcx
orq %rcx, %rax
movq -0x8(%rbp), %rcx
andq $0xc00c000, %rcx        # imm = 0xC00C000
shrq $0xe, %rcx
shrq $0xc, %rcx
movq -0x8(%rbp), %rdx
andq $0xc00c000, %rdx        # imm = 0xC00C000
shrq $0xe, %rdx
andq $0x3, %rdx
shlq $0xc, %rdx
orq %rdx, %rcx
shlq $0xe, %rcx
orq %rcx, %rax
movq -0x8(%rbp), %rcx
andq $0x3030000, %rcx        # imm = 0x3030000
shrq $0x10, %rcx
shrq $0x8, %rcx
movq -0x8(%rbp), %rdx
andq $0x3030000, %rdx        # imm = 0x3030000
shrq $0x10, %rdx
andq $0x3, %rdx
shlq $0x8, %rdx
orq %rdx, %rcx
shlq $0x10, %rcx
orq %rcx, %rax
movq -0x8(%rbp), %rcx
andq $0xcc0000, %rcx         # imm = 0xCC0000
shrq $0x12, %rcx
shrq $0x4, %rcx
movq -0x8(%rbp), %rdx
andq $0xcc0000, %rdx         # imm = 0xCC0000
shrq $0x12, %rdx
andq $0x3, %rdx
shlq $0x4, %rdx
orq %rdx, %rcx
shlq $0x12, %rcx
orq %rcx, %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)