void testfunc12(void) {
  const char *stringlit = "date should be in the form ??-??-??";
  short unsigned int port = 0x005aU;
  unsigned char portchar = 0x005aU;
  short unsigned int resultshort;
  const unsigned char charconst = 4U;
  unsigned int resultlong;
  unsigned int mode;
  resultshort = (~port) >> 4U;
  resultshort = port << 4U;
  resultshort = (short unsigned int)(port << 4U);
  resultshort = (short signed int)(port << 4U);
  resultshort = portchar << 4U;
  resultshort = (unsigned char)(portchar << charconst);
  resultshort = ((short unsigned int)(~port)) >> 4U;
  resultlong = ((int)(~(int)port)) >> 4U;
  resultlong = ((port << 4U) & mode) >> 6U;
  resultlong = ((unsigned int)((unsigned int)port << 4U) & mode) >> 6U;
}


x86 assembly (clang, -O0):
<testfunc12>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
mov    %rax,-0x8(%rbp)
movw   $0x5a,-0xa(%rbp)
movb   $0x5a,-0xb(%rbp)
movb   $0x4,-0xf(%rbp)
movzwl -0xa(%rbp),%eax
xor    $0xffffffff,%eax
sar    $0x4,%eax
mov    %ax,-0xe(%rbp)
movzwl -0xa(%rbp),%eax
shl    $0x4,%eax
mov    %ax,-0xe(%rbp)
movzwl -0xa(%rbp),%eax
shl    $0x4,%eax
mov    %ax,-0xe(%rbp)
movzwl -0xa(%rbp),%eax
shl    $0x4,%eax
mov    %ax,-0xe(%rbp)
movzbl -0xb(%rbp),%eax
shl    $0x4,%eax
mov    %ax,-0xe(%rbp)
movzbl -0xb(%rbp),%eax
shl    $0x4,%eax
movzbl %al,%eax
mov    %ax,-0xe(%rbp)
movzwl -0xa(%rbp),%eax
xor    $0xffffffff,%eax
movzwl %ax,%eax
sar    $0x4,%eax
mov    %ax,-0xe(%rbp)
movzwl -0xa(%rbp),%eax
xor    $0xffffffff,%eax
sar    $0x4,%eax
mov    %eax,-0x14(%rbp)
movzwl -0xa(%rbp),%eax
shl    $0x4,%eax
and    -0x18(%rbp),%eax
shr    $0x6,%eax
mov    %eax,-0x14(%rbp)
movzwl -0xa(%rbp),%eax
shl    $0x4,%eax
and    -0x18(%rbp),%eax
shr    $0x6,%eax
mov    %eax,-0x14(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<testfunc12>:
ret

LLVM IR (-O0):
@.str = [36 x i8] c"date should be in the form ??-??-??\00"
define void @testfunc12() {
%1 = alloca i8*
%2 = alloca i16
%3 = alloca i8
%4 = alloca i16
%5 = alloca i8
%6 = alloca i32
%7 = alloca i32
store i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8** %1
store i16 90, i16* %2
store i8 90, i8* %3
store i8 4, i8* %5
%8 = load i16, i16* %2
%9 = zext i16 %8 to i32
%10 = xor i32 %9, -1
%11 = ashr i32 %10, 4
%12 = trunc i32 %11 to i16
store i16 %12, i16* %4
%13 = load i16, i16* %2
%14 = zext i16 %13 to i32
%15 = shl i32 %14, 4
%16 = trunc i32 %15 to i16
store i16 %16, i16* %4
%17 = load i16, i16* %2
%18 = zext i16 %17 to i32
%19 = shl i32 %18, 4
%20 = trunc i32 %19 to i16
store i16 %20, i16* %4
%21 = load i16, i16* %2
%22 = zext i16 %21 to i32
%23 = shl i32 %22, 4
%24 = trunc i32 %23 to i16
store i16 %24, i16* %4
%25 = load i8, i8* %3
%26 = zext i8 %25 to i32
%27 = shl i32 %26, 4
%28 = trunc i32 %27 to i16
store i16 %28, i16* %4
%29 = load i8, i8* %3
%30 = zext i8 %29 to i32
%31 = shl i32 %30, 4
%32 = trunc i32 %31 to i8
%33 = zext i8 %32 to i16
store i16 %33, i16* %4
%34 = load i16, i16* %2
%35 = zext i16 %34 to i32
%36 = xor i32 %35, -1
%37 = trunc i32 %36 to i16
%38 = zext i16 %37 to i32
%39 = ashr i32 %38, 4
%40 = trunc i32 %39 to i16
store i16 %40, i16* %4
%41 = load i16, i16* %2
%42 = zext i16 %41 to i32
%43 = xor i32 %42, -1
%44 = ashr i32 %43, 4
store i32 %44, i32* %6
%45 = load i16, i16* %2
%46 = zext i16 %45 to i32
%47 = shl i32 %46, 4
%48 = load i32, i32* %7
%49 = and i32 %47, %48
%50 = lshr i32 %49, 6
store i32 %50, i32* %6
%51 = load i16, i16* %2
%52 = zext i16 %51 to i32
%53 = shl i32 %52, 4
%54 = load i32, i32* %7
%55 = and i32 %53, %54
%56 = lshr i32 %55, 6
store i32 %56, i32* %6
ret void
}

LLVM IR (-O2):
define void @testfunc12() {
ret void
}