int main() {
  unsigned short int a, b;
  unsigned int c;
  a = 0x0002;
  b = 0x0004;
  c = (unsigned int)(a) * (unsigned int)(b);
  c = 0;
  a = 0xFFFF;
  b = 0xFFFF;
  c = (unsigned int)(a) * (unsigned int)(b);
  c = 0;
  a = 0xFFFF;
  b = 0x0001;
  c = (unsigned int)(a) * (unsigned int)(b);
  c = 0;
  a = 0xFFFF;
  b = 0x000A;
  c = (unsigned int)(a) * (unsigned int)(b);
  c = 0;
  a = 0xFFFE;
  b = 0xFFFC;
  c = (unsigned int)(a) * (unsigned int)(b);
  c = 0;
  a = 0x000A;
  b = 0x000B;
  c = (unsigned int)(a) * (unsigned int)(b);
  c = 0;
  a = 0xFFF6;
  b = 0x000B;
  c = (unsigned int)(a) * (unsigned int)(b);
  c = 0;
  a = 0xF000;
  b = 0xF001;
  c = (unsigned int)(a) * (unsigned int)(b);
  c = 0;
  a = 0x5555;
  b = 0x3333;
  c = (unsigned int)(a) * (unsigned int)(b);
  c = 0;
  a = 0x5353;
  b = 0x8000;
  c = (unsigned int)(a) * (unsigned int)(b);
  c = 0;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movw   $0x2,-0x6(%rbp)
movw   $0x4,-0x8(%rbp)
movzwl -0x6(%rbp),%eax
movzwl -0x8(%rbp),%ecx
imul   %ecx,%eax
mov    %eax,-0xc(%rbp)
movl   $0x0,-0xc(%rbp)
movw   $0xffff,-0x6(%rbp)
movw   $0xffff,-0x8(%rbp)
movzwl -0x6(%rbp),%eax
movzwl -0x8(%rbp),%ecx
imul   %ecx,%eax
mov    %eax,-0xc(%rbp)
movl   $0x0,-0xc(%rbp)
movw   $0xffff,-0x6(%rbp)
movw   $0x1,-0x8(%rbp)
movzwl -0x6(%rbp),%eax
movzwl -0x8(%rbp),%ecx
imul   %ecx,%eax
mov    %eax,-0xc(%rbp)
movl   $0x0,-0xc(%rbp)
movw   $0xffff,-0x6(%rbp)
movw   $0xa,-0x8(%rbp)
movzwl -0x6(%rbp),%eax
movzwl -0x8(%rbp),%ecx
imul   %ecx,%eax
mov    %eax,-0xc(%rbp)
movl   $0x0,-0xc(%rbp)
movw   $0xfffe,-0x6(%rbp)
movw   $0xfffc,-0x8(%rbp)
movzwl -0x6(%rbp),%eax
movzwl -0x8(%rbp),%ecx
imul   %ecx,%eax
mov    %eax,-0xc(%rbp)
movl   $0x0,-0xc(%rbp)
movw   $0xa,-0x6(%rbp)
movw   $0xb,-0x8(%rbp)
movzwl -0x6(%rbp),%eax
movzwl -0x8(%rbp),%ecx
imul   %ecx,%eax
mov    %eax,-0xc(%rbp)
movl   $0x0,-0xc(%rbp)
movw   $0xfff6,-0x6(%rbp)
movw   $0xb,-0x8(%rbp)
movzwl -0x6(%rbp),%eax
movzwl -0x8(%rbp),%ecx
imul   %ecx,%eax
mov    %eax,-0xc(%rbp)
movl   $0x0,-0xc(%rbp)
movw   $0xf000,-0x6(%rbp)
movw   $0xf001,-0x8(%rbp)
movzwl -0x6(%rbp),%eax
movzwl -0x8(%rbp),%ecx
imul   %ecx,%eax
mov    %eax,-0xc(%rbp)
movl   $0x0,-0xc(%rbp)
movw   $0x5555,-0x6(%rbp)
movw   $0x3333,-0x8(%rbp)
movzwl -0x6(%rbp),%eax
movzwl -0x8(%rbp),%ecx
imul   %ecx,%eax
mov    %eax,-0xc(%rbp)
movl   $0x0,-0xc(%rbp)
movw   $0x5353,-0x6(%rbp)
movw   $0x8000,-0x8(%rbp)
movzwl -0x6(%rbp),%eax
movzwl -0x8(%rbp),%ecx
imul   %ecx,%eax
mov    %eax,-0xc(%rbp)
movl   $0x0,-0xc(%rbp)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i16
%3 = alloca i16
%4 = alloca i32
store i32 0, i32* %1
store i16 2, i16* %2
store i16 4, i16* %3
%5 = load i16, i16* %2
%6 = zext i16 %5 to i32
%7 = load i16, i16* %3
%8 = zext i16 %7 to i32
%9 = mul i32 %6, %8
store i32 %9, i32* %4
store i32 0, i32* %4
store i16 -1, i16* %2
store i16 -1, i16* %3
%10 = load i16, i16* %2
%11 = zext i16 %10 to i32
%12 = load i16, i16* %3
%13 = zext i16 %12 to i32
%14 = mul i32 %11, %13
store i32 %14, i32* %4
store i32 0, i32* %4
store i16 -1, i16* %2
store i16 1, i16* %3
%15 = load i16, i16* %2
%16 = zext i16 %15 to i32
%17 = load i16, i16* %3
%18 = zext i16 %17 to i32
%19 = mul i32 %16, %18
store i32 %19, i32* %4
store i32 0, i32* %4
store i16 -1, i16* %2
store i16 10, i16* %3
%20 = load i16, i16* %2
%21 = zext i16 %20 to i32
%22 = load i16, i16* %3
%23 = zext i16 %22 to i32
%24 = mul i32 %21, %23
store i32 %24, i32* %4
store i32 0, i32* %4
store i16 -2, i16* %2
store i16 -4, i16* %3
%25 = load i16, i16* %2
%26 = zext i16 %25 to i32
%27 = load i16, i16* %3
%28 = zext i16 %27 to i32
%29 = mul i32 %26, %28
store i32 %29, i32* %4
store i32 0, i32* %4
store i16 10, i16* %2
store i16 11, i16* %3
%30 = load i16, i16* %2
%31 = zext i16 %30 to i32
%32 = load i16, i16* %3
%33 = zext i16 %32 to i32
%34 = mul i32 %31, %33
store i32 %34, i32* %4
store i32 0, i32* %4
store i16 -10, i16* %2
store i16 11, i16* %3
%35 = load i16, i16* %2
%36 = zext i16 %35 to i32
%37 = load i16, i16* %3
%38 = zext i16 %37 to i32
%39 = mul i32 %36, %38
store i32 %39, i32* %4
store i32 0, i32* %4
store i16 -4096, i16* %2
store i16 -4095, i16* %3
%40 = load i16, i16* %2
%41 = zext i16 %40 to i32
%42 = load i16, i16* %3
%43 = zext i16 %42 to i32
%44 = mul i32 %41, %43
store i32 %44, i32* %4
store i32 0, i32* %4
store i16 21845, i16* %2
store i16 13107, i16* %3
%45 = load i16, i16* %2
%46 = zext i16 %45 to i32
%47 = load i16, i16* %3
%48 = zext i16 %47 to i32
%49 = mul i32 %46, %48
store i32 %49, i32* %4
store i32 0, i32* %4
store i16 21331, i16* %2
store i16 -32768, i16* %3
%50 = load i16, i16* %2
%51 = zext i16 %50 to i32
%52 = load i16, i16* %3
%53 = zext i16 %52 to i32
%54 = mul i32 %51, %53
store i32 %54, i32* %4
store i32 0, i32* %4
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}