int main() {
  unsigned char a, b;
  unsigned short int c;
  a = 0x02;
  b = 0x04;
  c = (unsigned short int)(a) * (unsigned short int)(b);
  c = 0;
  a = 0xFF;
  b = 0xFF;
  c = (unsigned short int)(a) * (unsigned short int)(b);
  c = 0;
  a = 0xFF;
  b = 0x01;
  c = (unsigned short int)(a) * (unsigned short int)(b);
  c = 0;
  a = 0xFF;
  b = 0x0A;
  c = (unsigned short int)(a) * (unsigned short int)(b);
  c = 0;
  a = 0xFE;
  b = 0xFC;
  c = (unsigned short int)(a) * (unsigned short int)(b);
  c = 0;
  a = 0x0A;
  b = 0x0B;
  c = (unsigned short int)(a) * (unsigned short int)(b);
  c = 0;
  a = 0xF6;
  b = 0x0B;
  c = (unsigned short int)(a) * (unsigned short int)(b);
  c = 0;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movb   $0x2,-0x5(%rbp)
movb   $0x4,-0x6(%rbp)
movzbl -0x5(%rbp),%eax
movzwl %ax,%eax
movzbl -0x6(%rbp),%ecx
movzwl %cx,%ecx
imul   %ecx,%eax
mov    %ax,-0x8(%rbp)
movw   $0x0,-0x8(%rbp)
movb   $0xff,-0x5(%rbp)
movb   $0xff,-0x6(%rbp)
movzbl -0x5(%rbp),%eax
movzwl %ax,%eax
movzbl -0x6(%rbp),%ecx
movzwl %cx,%ecx
imul   %ecx,%eax
mov    %ax,-0x8(%rbp)
movw   $0x0,-0x8(%rbp)
movb   $0xff,-0x5(%rbp)
movb   $0x1,-0x6(%rbp)
movzbl -0x5(%rbp),%eax
movzwl %ax,%eax
movzbl -0x6(%rbp),%ecx
movzwl %cx,%ecx
imul   %ecx,%eax
mov    %ax,-0x8(%rbp)
movw   $0x0,-0x8(%rbp)
movb   $0xff,-0x5(%rbp)
movb   $0xa,-0x6(%rbp)
movzbl -0x5(%rbp),%eax
movzwl %ax,%eax
movzbl -0x6(%rbp),%ecx
movzwl %cx,%ecx
imul   %ecx,%eax
mov    %ax,-0x8(%rbp)
movw   $0x0,-0x8(%rbp)
movb   $0xfe,-0x5(%rbp)
movb   $0xfc,-0x6(%rbp)
movzbl -0x5(%rbp),%eax
movzwl %ax,%eax
movzbl -0x6(%rbp),%ecx
movzwl %cx,%ecx
imul   %ecx,%eax
mov    %ax,-0x8(%rbp)
movw   $0x0,-0x8(%rbp)
movb   $0xa,-0x5(%rbp)
movb   $0xb,-0x6(%rbp)
movzbl -0x5(%rbp),%eax
movzwl %ax,%eax
movzbl -0x6(%rbp),%ecx
movzwl %cx,%ecx
imul   %ecx,%eax
mov    %ax,-0x8(%rbp)
movw   $0x0,-0x8(%rbp)
movb   $0xf6,-0x5(%rbp)
movb   $0xb,-0x6(%rbp)
movzbl -0x5(%rbp),%eax
movzwl %ax,%eax
movzbl -0x6(%rbp),%ecx
movzwl %cx,%ecx
imul   %ecx,%eax
mov    %ax,-0x8(%rbp)
movw   $0x0,-0x8(%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 i8
%3 = alloca i8
%4 = alloca i16
store i32 0, i32* %1
store i8 2, i8* %2
store i8 4, i8* %3
%5 = load i8, i8* %2
%6 = zext i8 %5 to i16
%7 = zext i16 %6 to i32
%8 = load i8, i8* %3
%9 = zext i8 %8 to i16
%10 = zext i16 %9 to i32
%11 = mul nsw i32 %7, %10
%12 = trunc i32 %11 to i16
store i16 %12, i16* %4
store i16 0, i16* %4
store i8 -1, i8* %2
store i8 -1, i8* %3
%13 = load i8, i8* %2
%14 = zext i8 %13 to i16
%15 = zext i16 %14 to i32
%16 = load i8, i8* %3
%17 = zext i8 %16 to i16
%18 = zext i16 %17 to i32
%19 = mul nsw i32 %15, %18
%20 = trunc i32 %19 to i16
store i16 %20, i16* %4
store i16 0, i16* %4
store i8 -1, i8* %2
store i8 1, i8* %3
%21 = load i8, i8* %2
%22 = zext i8 %21 to i16
%23 = zext i16 %22 to i32
%24 = load i8, i8* %3
%25 = zext i8 %24 to i16
%26 = zext i16 %25 to i32
%27 = mul nsw i32 %23, %26
%28 = trunc i32 %27 to i16
store i16 %28, i16* %4
store i16 0, i16* %4
store i8 -1, i8* %2
store i8 10, i8* %3
%29 = load i8, i8* %2
%30 = zext i8 %29 to i16
%31 = zext i16 %30 to i32
%32 = load i8, i8* %3
%33 = zext i8 %32 to i16
%34 = zext i16 %33 to i32
%35 = mul nsw i32 %31, %34
%36 = trunc i32 %35 to i16
store i16 %36, i16* %4
store i16 0, i16* %4
store i8 -2, i8* %2
store i8 -4, i8* %3
%37 = load i8, i8* %2
%38 = zext i8 %37 to i16
%39 = zext i16 %38 to i32
%40 = load i8, i8* %3
%41 = zext i8 %40 to i16
%42 = zext i16 %41 to i32
%43 = mul nsw i32 %39, %42
%44 = trunc i32 %43 to i16
store i16 %44, i16* %4
store i16 0, i16* %4
store i8 10, i8* %2
store i8 11, i8* %3
%45 = load i8, i8* %2
%46 = zext i8 %45 to i16
%47 = zext i16 %46 to i32
%48 = load i8, i8* %3
%49 = zext i8 %48 to i16
%50 = zext i16 %49 to i32
%51 = mul nsw i32 %47, %50
%52 = trunc i32 %51 to i16
store i16 %52, i16* %4
store i16 0, i16* %4
store i8 -10, i8* %2
store i8 11, i8* %3
%53 = load i8, i8* %2
%54 = zext i8 %53 to i16
%55 = zext i16 %54 to i32
%56 = load i8, i8* %3
%57 = zext i8 %56 to i16
%58 = zext i16 %57 to i32
%59 = mul nsw i32 %55, %58
%60 = trunc i32 %59 to i16
store i16 %60, i16* %4
store i16 0, i16* %4
ret i32 0
}

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