int main(int argc, const char **argv) {
  unsigned short res;
  if (__builtin_mul_overflow((unsigned short)0x0, (unsigned short)0x0, &res)) {
    return -1;
  }
  if (__builtin_mul_overflow((unsigned short)0x0, (unsigned short)0x7FFF,
                             &res)) {
    return -1;
  }
  if (__builtin_mul_overflow((unsigned short)0x0, (unsigned short)0x8000,
                             &res)) {
    return -1;
  }
  if (__builtin_mul_overflow((unsigned short)0x1, (unsigned short)0x7FFF,
                             &res)) {
    return -1;
  }
  if (__builtin_mul_overflow((unsigned short)0x1, (unsigned short)0x8000,
                             &res)) {
    return -1;
  }
  if (__builtin_mul_overflow((unsigned short)0x2, (unsigned short)0x3FFF,
                             &res)) {
    return -1;
  }
  if (!__builtin_mul_overflow((unsigned short)0x2, (unsigned short)0xC000,
                              &res)) {
    return -1;
  }
  if (__builtin_mul_overflow((unsigned short)0x2, (unsigned short)0x7FFF,
                             &res)) {
    return -1;
  }
  if (!__builtin_mul_overflow((unsigned short)0x2, (unsigned short)0x8000,
                              &res)) {
    return -1;
  }
  if (!__builtin_mul_overflow((unsigned short)0x4, (unsigned short)0x7FFF,
                              &res)) {
    return -1;
  }
  if (!__builtin_mul_overflow((unsigned short)0x4, (unsigned short)0x8000,
                              &res)) {
    return -1;
  }
  if (__builtin_mul_overflow((unsigned short)0x0F, (unsigned short)0x8, &res)) {
    return -1;
  }
  if (__builtin_mul_overflow((unsigned short)0x1000, (unsigned short)0x8,
                             &res)) {
    return -1;
  }
  if (!__builtin_mul_overflow((unsigned short)0x1000, (unsigned short)0x1000,
                              &res)) {
    return -1;
  }
  if (__builtin_mul_overflow((unsigned short)0x7FFF, (unsigned short)0x0,
                             &res)) {
    return -1;
  }
  if (__builtin_mul_overflow((unsigned short)0x7FFF, (unsigned short)0x1,
                             &res)) {
    return -1;
  }
  if (__builtin_mul_overflow((unsigned short)0x7FFF, (unsigned short)0x2,
                             &res)) {
    return -1;
  }
  if (!__builtin_mul_overflow((unsigned short)0x7FFF, (unsigned short)0x4,
                              &res)) {
    return -1;
  }
  if (!__builtin_mul_overflow((unsigned short)0x7FFF, (unsigned short)0x7FFF,
                              &res)) {
    return -1;
  }
  if (!__builtin_mul_overflow((unsigned short)0x7FFF, (unsigned short)0x8000,
                              &res)) {
    return -1;
  }
  if (__builtin_mul_overflow((unsigned short)0x8000, (unsigned short)0x0,
                             &res)) {
    return -1;
  }
  if (__builtin_mul_overflow((unsigned short)0x8000, (unsigned short)0x1,
                             &res)) {
    return -1;
  }
  if (!__builtin_mul_overflow((unsigned short)0x8000, (unsigned short)0x2,
                              &res)) {
    return -1;
  }
  if (!__builtin_mul_overflow((unsigned short)0x8000, (unsigned short)0x7FFF,
                              &res)) {
    return -1;
  }
  if (!__builtin_mul_overflow((unsigned short)0x8000, (unsigned short)0x8000,
                              &res)) {
    return -1;
  }
  if (__builtin_mul_overflow((unsigned short)0xFFFF, (unsigned short)0x0,
                             &res)) {
    return -1;
  }
  if (res != 0x0) {
    return -1;
  }
  if (__builtin_mul_overflow((unsigned short)0xFFFF, (unsigned short)0x1,
                             &res)) {
    return -1;
  }
  if (res != 0xFFFF) {
    return -1;
  }
  if (!__builtin_mul_overflow((unsigned short)0xFFFF, (unsigned short)0xFFFF,
                              &res)) {
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
mov    %ax,%cx
mov    %cx,%ax
mul    %cx
mov    %ax,%cx
seto   %al
mov    %cx,-0x12(%rbp)
test   $0x1,%al
jne    1134 <main+0x34>
jmp    1140 <main+0x40>
movl   $0xffffffff,-0x4(%rbp)
jmp    160b <main+0x50b>
xor    %eax,%eax
mov    $0x7fff,%cx
mul    %cx
mov    %ax,%cx
seto   %al
mov    %cx,-0x12(%rbp)
test   $0x1,%al
jne    1160 <main+0x60>
jmp    116c <main+0x6c>
movl   $0xffffffff,-0x4(%rbp)
jmp    160b <main+0x50b>
xor    %eax,%eax
mov    $0x8000,%cx
mul    %cx
mov    %ax,%cx
seto   %al
mov    %cx,-0x12(%rbp)
test   $0x1,%al
jne    118c <main+0x8c>
jmp    1198 <main+0x98>
movl   $0xffffffff,-0x4(%rbp)
jmp    160b <main+0x50b>
mov    $0x1,%ax
mov    $0x7fff,%cx
mul    %cx
mov    %ax,%cx
seto   %al
mov    %cx,-0x12(%rbp)
test   $0x1,%al
jne    11ba <main+0xba>
jmp    11c6 <main+0xc6>
movl   $0xffffffff,-0x4(%rbp)
jmp    160b <main+0x50b>
mov    $0x1,%ax
mov    $0x8000,%cx
mul    %cx
mov    %ax,%cx
seto   %al
mov    %cx,-0x12(%rbp)
test   $0x1,%al
jne    11e8 <main+0xe8>
jmp    11f4 <main+0xf4>
movl   $0xffffffff,-0x4(%rbp)
jmp    160b <main+0x50b>
mov    $0x2,%ax
mov    $0x3fff,%cx
mul    %cx
mov    %ax,%cx
seto   %al
mov    %cx,-0x12(%rbp)
test   $0x1,%al
jne    1216 <main+0x116>
jmp    1222 <main+0x122>
movl   $0xffffffff,-0x4(%rbp)
jmp    160b <main+0x50b>
mov    $0x2,%ax
mov    $0xc000,%cx
mul    %cx
mov    %ax,%cx
seto   %al
mov    %cx,-0x12(%rbp)
test   $0x1,%al
jne    124b <main+0x14b>
movl   $0xffffffff,-0x4(%rbp)
jmp    160b <main+0x50b>
mov    $0x2,%ax
mov    $0x7fff,%cx
mul    %cx
mov    %ax,%cx
seto   %al
mov    %cx,-0x12(%rbp)
test   $0x1,%al
jne    126d <main+0x16d>
jmp    1279 <main+0x179>
movl   $0xffffffff,-0x4(%rbp)
jmp    160b <main+0x50b>
mov    $0x2,%ax
mov    $0x8000,%cx
mul    %cx
mov    %ax,%cx
seto   %al
mov    %cx,-0x12(%rbp)
test   $0x1,%al
jne    12a2 <main+0x1a2>
movl   $0xffffffff,-0x4(%rbp)
jmp    160b <main+0x50b>
mov    $0x4,%ax
mov    $0x7fff,%cx
mul    %cx
mov    %ax,%cx
seto   %al
mov    %cx,-0x12(%rbp)
test   $0x1,%al
jne    12cb <main+0x1cb>
movl   $0xffffffff,-0x4(%rbp)
jmp    160b <main+0x50b>
mov    $0x4,%ax
mov    $0x8000,%cx
mul    %cx
mov    %ax,%cx
seto   %al
mov    %cx,-0x12(%rbp)
test   $0x1,%al
jne    12f4 <main+0x1f4>
movl   $0xffffffff,-0x4(%rbp)
jmp    160b <main+0x50b>
mov    $0xf,%ax
mov    $0x8,%cx
mul    %cx
mov    %ax,%cx
seto   %al
mov    %cx,-0x12(%rbp)
test   $0x1,%al
jne    1316 <main+0x216>
jmp    1322 <main+0x222>
movl   $0xffffffff,-0x4(%rbp)
jmp    160b <main+0x50b>
mov    $0x1000,%ax
mov    $0x8,%cx
mul    %cx
mov    %ax,%cx
seto   %al
mov    %cx,-0x12(%rbp)
test   $0x1,%al
jne    1344 <main+0x244>
jmp    1350 <main+0x250>
movl   $0xffffffff,-0x4(%rbp)
jmp    160b <main+0x50b>
mov    $0x1000,%cx
mov    %cx,%ax
mul    %cx
mov    %ax,%cx
seto   %al
mov    %cx,-0x12(%rbp)
test   $0x1,%al
jne    1378 <main+0x278>
movl   $0xffffffff,-0x4(%rbp)
jmp    160b <main+0x50b>
mov    $0x7fff,%ax
xor    %ecx,%ecx
mul    %cx
mov    %ax,%cx
seto   %al
mov    %cx,-0x12(%rbp)
test   $0x1,%al
jne    1398 <main+0x298>
jmp    13a4 <main+0x2a4>
movl   $0xffffffff,-0x4(%rbp)
jmp    160b <main+0x50b>
mov    $0x7fff,%ax
mov    $0x1,%cx
mul    %cx
mov    %ax,%cx
seto   %al
mov    %cx,-0x12(%rbp)
test   $0x1,%al
jne    13c6 <main+0x2c6>
jmp    13d2 <main+0x2d2>
movl   $0xffffffff,-0x4(%rbp)
jmp    160b <main+0x50b>
mov    $0x7fff,%ax
mov    $0x2,%cx
mul    %cx
mov    %ax,%cx
seto   %al
mov    %cx,-0x12(%rbp)
test   $0x1,%al
jne    13f4 <main+0x2f4>
jmp    1400 <main+0x300>
movl   $0xffffffff,-0x4(%rbp)
jmp    160b <main+0x50b>
mov    $0x7fff,%ax
mov    $0x4,%cx
mul    %cx
mov    %ax,%cx
seto   %al
mov    %cx,-0x12(%rbp)
test   $0x1,%al
jne    1429 <main+0x329>
movl   $0xffffffff,-0x4(%rbp)
jmp    160b <main+0x50b>
mov    $0x7fff,%cx
mov    %cx,%ax
mul    %cx
mov    %ax,%cx
seto   %al
mov    %cx,-0x12(%rbp)
test   $0x1,%al
jne    1451 <main+0x351>
movl   $0xffffffff,-0x4(%rbp)
jmp    160b <main+0x50b>
mov    $0x7fff,%ax
mov    $0x8000,%cx
mul    %cx
mov    %ax,%cx
seto   %al
mov    %cx,-0x12(%rbp)
test   $0x1,%al
jne    147a <main+0x37a>
movl   $0xffffffff,-0x4(%rbp)
jmp    160b <main+0x50b>
mov    $0x8000,%ax
xor    %ecx,%ecx
mul    %cx
mov    %ax,%cx
seto   %al
mov    %cx,-0x12(%rbp)
test   $0x1,%al
jne    149a <main+0x39a>
jmp    14a6 <main+0x3a6>
movl   $0xffffffff,-0x4(%rbp)
jmp    160b <main+0x50b>
mov    $0x8000,%ax
mov    $0x1,%cx
mul    %cx
mov    %ax,%cx
seto   %al
mov    %cx,-0x12(%rbp)
test   $0x1,%al
jne    14c8 <main+0x3c8>
jmp    14d4 <main+0x3d4>
movl   $0xffffffff,-0x4(%rbp)
jmp    160b <main+0x50b>
mov    $0x8000,%ax
mov    $0x2,%cx
mul    %cx
mov    %ax,%cx
seto   %al
mov    %cx,-0x12(%rbp)
test   $0x1,%al
jne    14fd <main+0x3fd>
movl   $0xffffffff,-0x4(%rbp)
jmp    160b <main+0x50b>
mov    $0x8000,%ax
mov    $0x7fff,%cx
mul    %cx
mov    %ax,%cx
seto   %al
mov    %cx,-0x12(%rbp)
test   $0x1,%al
jne    1526 <main+0x426>
movl   $0xffffffff,-0x4(%rbp)
jmp    160b <main+0x50b>
mov    $0x8000,%cx
mov    %cx,%ax
mul    %cx
mov    %ax,%cx
seto   %al
mov    %cx,-0x12(%rbp)
test   $0x1,%al
jne    154e <main+0x44e>
movl   $0xffffffff,-0x4(%rbp)
jmp    160b <main+0x50b>
mov    $0xffff,%ax
xor    %ecx,%ecx
mul    %cx
mov    %ax,%cx
seto   %al
mov    %cx,-0x12(%rbp)
test   $0x1,%al
jne    156e <main+0x46e>
jmp    157a <main+0x47a>
movl   $0xffffffff,-0x4(%rbp)
jmp    160b <main+0x50b>
movzwl -0x12(%rbp),%eax
cmp    $0x0,%eax
je     1593 <main+0x493>
movl   $0xffffffff,-0x4(%rbp)
jmp    160b <main+0x50b>
mov    $0xffff,%ax
mov    $0x1,%cx
mul    %cx
mov    %ax,%cx
seto   %al
mov    %cx,-0x12(%rbp)
test   $0x1,%al
jne    15b5 <main+0x4b5>
jmp    15c1 <main+0x4c1>
movl   $0xffffffff,-0x4(%rbp)
jmp    160b <main+0x50b>
movzwl -0x12(%rbp),%eax
cmp    $0xffff,%eax
je     15dc <main+0x4dc>
movl   $0xffffffff,-0x4(%rbp)
jmp    160b <main+0x50b>
mov    $0xffff,%cx
mov    %cx,%ax
mul    %cx
mov    %ax,%cx
seto   %al
mov    %cx,-0x12(%rbp)
test   $0x1,%al
jne    1604 <main+0x504>
movl   $0xffffffff,-0x4(%rbp)
jmp    160b <main+0x50b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i16
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call { i16, i1 } @llvm.umul.with.overflow.i16(i16 0, i16 0)
%8 = extractvalue { i16, i1 } %7, 1
%9 = extractvalue { i16, i1 } %7, 0
store i16 %9, i16* %6
br i1 %8, label %10, label %11
10: ; preds = %2
store i32 -1, i32* %3
br label %157
11: ; preds = %2
%12 = call { i16, i1 } @llvm.umul.with.overflow.i16(i16 0, i16 32767)
%13 = extractvalue { i16, i1 } %12, 1
%14 = extractvalue { i16, i1 } %12, 0
store i16 %14, i16* %6
br i1 %13, label %15, label %16
15: ; preds = %11
store i32 -1, i32* %3
br label %157
16: ; preds = %11
%17 = call { i16, i1 } @llvm.umul.with.overflow.i16(i16 0, i16 -32768)
%18 = extractvalue { i16, i1 } %17, 1
%19 = extractvalue { i16, i1 } %17, 0
store i16 %19, i16* %6
br i1 %18, label %20, label %21
20: ; preds = %16
store i32 -1, i32* %3
br label %157
21: ; preds = %16
%22 = call { i16, i1 } @llvm.umul.with.overflow.i16(i16 1, i16 32767)
%23 = extractvalue { i16, i1 } %22, 1
%24 = extractvalue { i16, i1 } %22, 0
store i16 %24, i16* %6
br i1 %23, label %25, label %26
25: ; preds = %21
store i32 -1, i32* %3
br label %157
26: ; preds = %21
%27 = call { i16, i1 } @llvm.umul.with.overflow.i16(i16 1, i16 -32768)
%28 = extractvalue { i16, i1 } %27, 1
%29 = extractvalue { i16, i1 } %27, 0
store i16 %29, i16* %6
br i1 %28, label %30, label %31
30: ; preds = %26
store i32 -1, i32* %3
br label %157
31: ; preds = %26
%32 = call { i16, i1 } @llvm.umul.with.overflow.i16(i16 2, i16 16383)
%33 = extractvalue { i16, i1 } %32, 1
%34 = extractvalue { i16, i1 } %32, 0
store i16 %34, i16* %6
br i1 %33, label %35, label %36
35: ; preds = %31
store i32 -1, i32* %3
br label %157
36: ; preds = %31
%37 = call { i16, i1 } @llvm.umul.with.overflow.i16(i16 2, i16 -16384)
%38 = extractvalue { i16, i1 } %37, 1
%39 = extractvalue { i16, i1 } %37, 0
store i16 %39, i16* %6
br i1 %38, label %41, label %40
40: ; preds = %36
store i32 -1, i32* %3
br label %157
41: ; preds = %36
%42 = call { i16, i1 } @llvm.umul.with.overflow.i16(i16 2, i16 32767)
%43 = extractvalue { i16, i1 } %42, 1
%44 = extractvalue { i16, i1 } %42, 0
store i16 %44, i16* %6
br i1 %43, label %45, label %46
45: ; preds = %41
store i32 -1, i32* %3
br label %157
46: ; preds = %41
%47 = call { i16, i1 } @llvm.umul.with.overflow.i16(i16 2, i16 -32768)
%48 = extractvalue { i16, i1 } %47, 1
%49 = extractvalue { i16, i1 } %47, 0
store i16 %49, i16* %6
br i1 %48, label %51, label %50
50: ; preds = %46
store i32 -1, i32* %3
br label %157
51: ; preds = %46
%52 = call { i16, i1 } @llvm.umul.with.overflow.i16(i16 4, i16 32767)
%53 = extractvalue { i16, i1 } %52, 1
%54 = extractvalue { i16, i1 } %52, 0
store i16 %54, i16* %6
br i1 %53, label %56, label %55
55: ; preds = %51
store i32 -1, i32* %3
br label %157
56: ; preds = %51
%57 = call { i16, i1 } @llvm.umul.with.overflow.i16(i16 4, i16 -32768)
%58 = extractvalue { i16, i1 } %57, 1
%59 = extractvalue { i16, i1 } %57, 0
store i16 %59, i16* %6
br i1 %58, label %61, label %60
60: ; preds = %56
store i32 -1, i32* %3
br label %157
61: ; preds = %56
%62 = call { i16, i1 } @llvm.umul.with.overflow.i16(i16 15, i16 8)
%63 = extractvalue { i16, i1 } %62, 1
%64 = extractvalue { i16, i1 } %62, 0
store i16 %64, i16* %6
br i1 %63, label %65, label %66
65: ; preds = %61
store i32 -1, i32* %3
br label %157
66: ; preds = %61
%67 = call { i16, i1 } @llvm.umul.with.overflow.i16(i16 4096, i16 8)
%68 = extractvalue { i16, i1 } %67, 1
%69 = extractvalue { i16, i1 } %67, 0
store i16 %69, i16* %6
br i1 %68, label %70, label %71
70: ; preds = %66
store i32 -1, i32* %3
br label %157
71: ; preds = %66
%72 = call { i16, i1 } @llvm.umul.with.overflow.i16(i16 4096, i16 4096)
%73 = extractvalue { i16, i1 } %72, 1
%74 = extractvalue { i16, i1 } %72, 0
store i16 %74, i16* %6
br i1 %73, label %76, label %75
75: ; preds = %71
store i32 -1, i32* %3
br label %157
76: ; preds = %71
%77 = call { i16, i1 } @llvm.umul.with.overflow.i16(i16 32767, i16 0)
%78 = extractvalue { i16, i1 } %77, 1
%79 = extractvalue { i16, i1 } %77, 0
store i16 %79, i16* %6
br i1 %78, label %80, label %81
80: ; preds = %76
store i32 -1, i32* %3
br label %157
81: ; preds = %76
%82 = call { i16, i1 } @llvm.umul.with.overflow.i16(i16 32767, i16 1)
%83 = extractvalue { i16, i1 } %82, 1
%84 = extractvalue { i16, i1 } %82, 0
store i16 %84, i16* %6
br i1 %83, label %85, label %86
85: ; preds = %81
store i32 -1, i32* %3
br label %157
86: ; preds = %81
%87 = call { i16, i1 } @llvm.umul.with.overflow.i16(i16 32767, i16 2)
%88 = extractvalue { i16, i1 } %87, 1
%89 = extractvalue { i16, i1 } %87, 0
store i16 %89, i16* %6
br i1 %88, label %90, label %91
90: ; preds = %86
store i32 -1, i32* %3
br label %157
91: ; preds = %86
%92 = call { i16, i1 } @llvm.umul.with.overflow.i16(i16 32767, i16 4)
%93 = extractvalue { i16, i1 } %92, 1
%94 = extractvalue { i16, i1 } %92, 0
store i16 %94, i16* %6
br i1 %93, label %96, label %95
95: ; preds = %91
store i32 -1, i32* %3
br label %157
96: ; preds = %91
%97 = call { i16, i1 } @llvm.umul.with.overflow.i16(i16 32767, i16 32767)
%98 = extractvalue { i16, i1 } %97, 1
%99 = extractvalue { i16, i1 } %97, 0
store i16 %99, i16* %6
br i1 %98, label %101, label %100
100: ; preds = %96
store i32 -1, i32* %3
br label %157
101: ; preds = %96
%102 = call { i16, i1 } @llvm.umul.with.overflow.i16(i16 32767, i16 -32768)
%103 = extractvalue { i16, i1 } %102, 1
%104 = extractvalue { i16, i1 } %102, 0
store i16 %104, i16* %6
br i1 %103, label %106, label %105
105: ; preds = %101
store i32 -1, i32* %3
br label %157
106: ; preds = %101
%107 = call { i16, i1 } @llvm.umul.with.overflow.i16(i16 -32768, i16 0)
%108 = extractvalue { i16, i1 } %107, 1
%109 = extractvalue { i16, i1 } %107, 0
store i16 %109, i16* %6
br i1 %108, label %110, label %111
110: ; preds = %106
store i32 -1, i32* %3
br label %157
111: ; preds = %106
%112 = call { i16, i1 } @llvm.umul.with.overflow.i16(i16 -32768, i16 1)
%113 = extractvalue { i16, i1 } %112, 1
%114 = extractvalue { i16, i1 } %112, 0
store i16 %114, i16* %6
br i1 %113, label %115, label %116
115: ; preds = %111
store i32 -1, i32* %3
br label %157
116: ; preds = %111
%117 = call { i16, i1 } @llvm.umul.with.overflow.i16(i16 -32768, i16 2)
%118 = extractvalue { i16, i1 } %117, 1
%119 = extractvalue { i16, i1 } %117, 0
store i16 %119, i16* %6
br i1 %118, label %121, label %120
120: ; preds = %116
store i32 -1, i32* %3
br label %157
121: ; preds = %116
%122 = call { i16, i1 } @llvm.umul.with.overflow.i16(i16 -32768, i16 32767)
%123 = extractvalue { i16, i1 } %122, 1
%124 = extractvalue { i16, i1 } %122, 0
store i16 %124, i16* %6
br i1 %123, label %126, label %125
125: ; preds = %121
store i32 -1, i32* %3
br label %157
126: ; preds = %121
%127 = call { i16, i1 } @llvm.umul.with.overflow.i16(i16 -32768, i16 -32768)
%128 = extractvalue { i16, i1 } %127, 1
%129 = extractvalue { i16, i1 } %127, 0
store i16 %129, i16* %6
br i1 %128, label %131, label %130
130: ; preds = %126
store i32 -1, i32* %3
br label %157
131: ; preds = %126
%132 = call { i16, i1 } @llvm.umul.with.overflow.i16(i16 -1, i16 0)
%133 = extractvalue { i16, i1 } %132, 1
%134 = extractvalue { i16, i1 } %132, 0
store i16 %134, i16* %6
br i1 %133, label %135, label %136
135: ; preds = %131
store i32 -1, i32* %3
br label %157
136: ; preds = %131
%137 = load i16, i16* %6
%138 = zext i16 %137 to i32
%139 = icmp ne i32 %138, 0
br i1 %139, label %140, label %141
140: ; preds = %136
store i32 -1, i32* %3
br label %157
141: ; preds = %136
%142 = call { i16, i1 } @llvm.umul.with.overflow.i16(i16 -1, i16 1)
%143 = extractvalue { i16, i1 } %142, 1
%144 = extractvalue { i16, i1 } %142, 0
store i16 %144, i16* %6
br i1 %143, label %145, label %146
145: ; preds = %141
store i32 -1, i32* %3
br label %157
146: ; preds = %141
%147 = load i16, i16* %6
%148 = zext i16 %147 to i32
%149 = icmp ne i32 %148, 65535
br i1 %149, label %150, label %151
150: ; preds = %146
store i32 -1, i32* %3
br label %157
151: ; preds = %146
%152 = call { i16, i1 } @llvm.umul.with.overflow.i16(i16 -1, i16 -1)
%153 = extractvalue { i16, i1 } %152, 1
%154 = extractvalue { i16, i1 } %152, 0
store i16 %154, i16* %6
br i1 %153, label %156, label %155
155: ; preds = %151
store i32 -1, i32* %3
br label %157
156: ; preds = %151
store i32 0, i32* %3
br label %157
157: ; preds = %156, %155, %150, %145, %140, %135, %130, %125, %120, %115, %110, %105, %100, %95, %90, %85, %80, %75, %70, %65, %60, %55, %50, %45, %40, %35, %30, %25, %20, %15, %10
%158 = load i32, i32* %3
ret i32 %158
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}