int main(int argc, const char **argv) {
  signed char res;
  if (__builtin_mul_overflow((signed char)0x0, (signed char)0x0, &res)) {
    return -1;
  }
  if (__builtin_mul_overflow((signed char)0x0, (signed char)0x7F, &res)) {
    return -1;
  }
  if (__builtin_mul_overflow((signed char)0x0, (signed char)0x80, &res)) {
    return -1;
  }
  if (__builtin_mul_overflow((signed char)0x1, (signed char)0x7F, &res)) {
    return -1;
  }
  if (__builtin_mul_overflow((signed char)0x1, (signed char)0x80, &res)) {
    return -1;
  }
  if (__builtin_mul_overflow((signed char)0x2, (signed char)0x3F, &res)) {
    return -1;
  }
  if (__builtin_mul_overflow((signed char)0x2, (signed char)0xC0, &res)) {
    return -1;
  }
  if (!__builtin_mul_overflow((signed char)0x2, (signed char)0x7F, &res)) {
    return -1;
  }
  if (!__builtin_mul_overflow((signed char)0x2, (signed char)0x80, &res)) {
    return -1;
  }
  if (__builtin_mul_overflow((signed char)0x0F, (signed char)0x8, &res)) {
    return -1;
  }
  if (!__builtin_mul_overflow((signed char)0x10, (signed char)0x8, &res)) {
    return -1;
  }
  if (__builtin_mul_overflow((signed char)0x7F, (signed char)0x0, &res)) {
    return -1;
  }
  if (__builtin_mul_overflow((signed char)0x7F, (signed char)0x1, &res)) {
    return -1;
  }
  if (!__builtin_mul_overflow((signed char)0x7F, (signed char)0x2, &res)) {
    return -1;
  }
  if (!__builtin_mul_overflow((signed char)0x7F, (signed char)0x7F, &res)) {
    return -1;
  }
  if (!__builtin_mul_overflow((signed char)0x7F, (signed char)0x80, &res)) {
    return -1;
  }
  if (__builtin_mul_overflow((signed char)0x80, (signed char)0x0, &res)) {
    return -1;
  }
  if (__builtin_mul_overflow((signed char)0x80, (signed char)0x1, &res)) {
    return -1;
  }
  if (!__builtin_mul_overflow((signed char)0x80, (signed char)0x2, &res)) {
    return -1;
  }
  if (!__builtin_mul_overflow((signed char)0x80, (signed char)0x7F, &res)) {
    return -1;
  }
  if (!__builtin_mul_overflow((signed char)0x80, (signed char)0x80, &res)) {
    return -1;
  }
  if (__builtin_mul_overflow((signed char)0xFF, (signed char)0x0, &res)) {
    return -1;
  }
  if (__builtin_mul_overflow((signed char)0xFF, (signed char)0x1, &res)) {
    return -1;
  }
  if (__builtin_mul_overflow((signed char)0xFF, (signed char)0xFF, &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    %al,%cl
mov    %cl,%al
imul   %cl
mov    %al,%cl
seto   %al
mov    %cl,-0x11(%rbp)
test   $0x1,%al
jne    112f <main+0x2f>
jmp    113b <main+0x3b>
movl   $0xffffffff,-0x4(%rbp)
jmp    1496 <main+0x396>
xor    %eax,%eax
mov    $0x7f,%cl
imul   %cl
mov    %al,%cl
seto   %al
mov    %cl,-0x11(%rbp)
test   $0x1,%al
jne    1156 <main+0x56>
jmp    1162 <main+0x62>
movl   $0xffffffff,-0x4(%rbp)
jmp    1496 <main+0x396>
xor    %eax,%eax
mov    $0x80,%cl
imul   %cl
mov    %al,%cl
seto   %al
mov    %cl,-0x11(%rbp)
test   $0x1,%al
jne    117d <main+0x7d>
jmp    1189 <main+0x89>
movl   $0xffffffff,-0x4(%rbp)
jmp    1496 <main+0x396>
mov    $0x1,%al
mov    $0x7f,%cl
imul   %cl
mov    %al,%cl
seto   %al
mov    %cl,-0x11(%rbp)
test   $0x1,%al
jne    11a4 <main+0xa4>
jmp    11b0 <main+0xb0>
movl   $0xffffffff,-0x4(%rbp)
jmp    1496 <main+0x396>
mov    $0x1,%al
mov    $0x80,%cl
imul   %cl
mov    %al,%cl
seto   %al
mov    %cl,-0x11(%rbp)
test   $0x1,%al
jne    11cb <main+0xcb>
jmp    11d7 <main+0xd7>
movl   $0xffffffff,-0x4(%rbp)
jmp    1496 <main+0x396>
mov    $0x2,%al
mov    $0x3f,%cl
imul   %cl
mov    %al,%cl
seto   %al
mov    %cl,-0x11(%rbp)
test   $0x1,%al
jne    11f2 <main+0xf2>
jmp    11fe <main+0xfe>
movl   $0xffffffff,-0x4(%rbp)
jmp    1496 <main+0x396>
mov    $0x2,%al
mov    $0xc0,%cl
imul   %cl
mov    %al,%cl
seto   %al
mov    %cl,-0x11(%rbp)
test   $0x1,%al
jne    1219 <main+0x119>
jmp    1225 <main+0x125>
movl   $0xffffffff,-0x4(%rbp)
jmp    1496 <main+0x396>
mov    $0x2,%al
mov    $0x7f,%cl
imul   %cl
mov    %al,%cl
seto   %al
mov    %cl,-0x11(%rbp)
test   $0x1,%al
jne    1247 <main+0x147>
movl   $0xffffffff,-0x4(%rbp)
jmp    1496 <main+0x396>
mov    $0x2,%al
mov    $0x80,%cl
imul   %cl
mov    %al,%cl
seto   %al
mov    %cl,-0x11(%rbp)
test   $0x1,%al
jne    1269 <main+0x169>
movl   $0xffffffff,-0x4(%rbp)
jmp    1496 <main+0x396>
mov    $0xf,%al
mov    $0x8,%cl
imul   %cl
mov    %al,%cl
seto   %al
mov    %cl,-0x11(%rbp)
test   $0x1,%al
jne    1284 <main+0x184>
jmp    1290 <main+0x190>
movl   $0xffffffff,-0x4(%rbp)
jmp    1496 <main+0x396>
mov    $0x10,%al
mov    $0x8,%cl
imul   %cl
mov    %al,%cl
seto   %al
mov    %cl,-0x11(%rbp)
test   $0x1,%al
jne    12b2 <main+0x1b2>
movl   $0xffffffff,-0x4(%rbp)
jmp    1496 <main+0x396>
mov    $0x7f,%al
xor    %ecx,%ecx
imul   %cl
mov    %al,%cl
seto   %al
mov    %cl,-0x11(%rbp)
test   $0x1,%al
jne    12cd <main+0x1cd>
jmp    12d9 <main+0x1d9>
movl   $0xffffffff,-0x4(%rbp)
jmp    1496 <main+0x396>
mov    $0x7f,%al
mov    $0x1,%cl
imul   %cl
mov    %al,%cl
seto   %al
mov    %cl,-0x11(%rbp)
test   $0x1,%al
jne    12f4 <main+0x1f4>
jmp    1300 <main+0x200>
movl   $0xffffffff,-0x4(%rbp)
jmp    1496 <main+0x396>
mov    $0x7f,%al
mov    $0x2,%cl
imul   %cl
mov    %al,%cl
seto   %al
mov    %cl,-0x11(%rbp)
test   $0x1,%al
jne    1322 <main+0x222>
movl   $0xffffffff,-0x4(%rbp)
jmp    1496 <main+0x396>
mov    $0x7f,%cl
mov    %cl,%al
imul   %cl
mov    %al,%cl
seto   %al
mov    %cl,-0x11(%rbp)
test   $0x1,%al
jne    1344 <main+0x244>
movl   $0xffffffff,-0x4(%rbp)
jmp    1496 <main+0x396>
mov    $0x7f,%al
mov    $0x80,%cl
imul   %cl
mov    %al,%cl
seto   %al
mov    %cl,-0x11(%rbp)
test   $0x1,%al
jne    1366 <main+0x266>
movl   $0xffffffff,-0x4(%rbp)
jmp    1496 <main+0x396>
mov    $0x80,%al
xor    %ecx,%ecx
imul   %cl
mov    %al,%cl
seto   %al
mov    %cl,-0x11(%rbp)
test   $0x1,%al
jne    1381 <main+0x281>
jmp    138d <main+0x28d>
movl   $0xffffffff,-0x4(%rbp)
jmp    1496 <main+0x396>
mov    $0x80,%al
mov    $0x1,%cl
imul   %cl
mov    %al,%cl
seto   %al
mov    %cl,-0x11(%rbp)
test   $0x1,%al
jne    13a8 <main+0x2a8>
jmp    13b4 <main+0x2b4>
movl   $0xffffffff,-0x4(%rbp)
jmp    1496 <main+0x396>
mov    $0x80,%al
mov    $0x2,%cl
imul   %cl
mov    %al,%cl
seto   %al
mov    %cl,-0x11(%rbp)
test   $0x1,%al
jne    13d6 <main+0x2d6>
movl   $0xffffffff,-0x4(%rbp)
jmp    1496 <main+0x396>
mov    $0x80,%al
mov    $0x7f,%cl
imul   %cl
mov    %al,%cl
seto   %al
mov    %cl,-0x11(%rbp)
test   $0x1,%al
jne    13f8 <main+0x2f8>
movl   $0xffffffff,-0x4(%rbp)
jmp    1496 <main+0x396>
mov    $0x80,%cl
mov    %cl,%al
imul   %cl
mov    %al,%cl
seto   %al
mov    %cl,-0x11(%rbp)
test   $0x1,%al
jne    141a <main+0x31a>
movl   $0xffffffff,-0x4(%rbp)
jmp    1496 <main+0x396>
mov    $0xff,%al
xor    %ecx,%ecx
imul   %cl
mov    %al,%cl
seto   %al
mov    %cl,-0x11(%rbp)
test   $0x1,%al
jne    1435 <main+0x335>
jmp    1441 <main+0x341>
movl   $0xffffffff,-0x4(%rbp)
jmp    1496 <main+0x396>
mov    $0xff,%al
mov    $0x1,%cl
imul   %cl
mov    %al,%cl
seto   %al
mov    %cl,-0x11(%rbp)
test   $0x1,%al
jne    145c <main+0x35c>
jmp    1468 <main+0x368>
movl   $0xffffffff,-0x4(%rbp)
jmp    1496 <main+0x396>
mov    $0xff,%cl
mov    %cl,%al
imul   %cl
mov    %al,%cl
seto   %al
mov    %cl,-0x11(%rbp)
test   $0x1,%al
jne    1483 <main+0x383>
jmp    148f <main+0x38f>
movl   $0xffffffff,-0x4(%rbp)
jmp    1496 <main+0x396>
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 i8
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call { i8, i1 } @llvm.smul.with.overflow.i8(i8 0, i8 0)
%8 = extractvalue { i8, i1 } %7, 1
%9 = extractvalue { i8, i1 } %7, 0
store i8 %9, i8* %6
br i1 %8, label %10, label %11
10: ; preds = %2
store i32 -1, i32* %3
br label %127
11: ; preds = %2
%12 = call { i8, i1 } @llvm.smul.with.overflow.i8(i8 0, i8 127)
%13 = extractvalue { i8, i1 } %12, 1
%14 = extractvalue { i8, i1 } %12, 0
store i8 %14, i8* %6
br i1 %13, label %15, label %16
15: ; preds = %11
store i32 -1, i32* %3
br label %127
16: ; preds = %11
%17 = call { i8, i1 } @llvm.smul.with.overflow.i8(i8 0, i8 -128)
%18 = extractvalue { i8, i1 } %17, 1
%19 = extractvalue { i8, i1 } %17, 0
store i8 %19, i8* %6
br i1 %18, label %20, label %21
20: ; preds = %16
store i32 -1, i32* %3
br label %127
21: ; preds = %16
%22 = call { i8, i1 } @llvm.smul.with.overflow.i8(i8 1, i8 127)
%23 = extractvalue { i8, i1 } %22, 1
%24 = extractvalue { i8, i1 } %22, 0
store i8 %24, i8* %6
br i1 %23, label %25, label %26
25: ; preds = %21
store i32 -1, i32* %3
br label %127
26: ; preds = %21
%27 = call { i8, i1 } @llvm.smul.with.overflow.i8(i8 1, i8 -128)
%28 = extractvalue { i8, i1 } %27, 1
%29 = extractvalue { i8, i1 } %27, 0
store i8 %29, i8* %6
br i1 %28, label %30, label %31
30: ; preds = %26
store i32 -1, i32* %3
br label %127
31: ; preds = %26
%32 = call { i8, i1 } @llvm.smul.with.overflow.i8(i8 2, i8 63)
%33 = extractvalue { i8, i1 } %32, 1
%34 = extractvalue { i8, i1 } %32, 0
store i8 %34, i8* %6
br i1 %33, label %35, label %36
35: ; preds = %31
store i32 -1, i32* %3
br label %127
36: ; preds = %31
%37 = call { i8, i1 } @llvm.smul.with.overflow.i8(i8 2, i8 -64)
%38 = extractvalue { i8, i1 } %37, 1
%39 = extractvalue { i8, i1 } %37, 0
store i8 %39, i8* %6
br i1 %38, label %40, label %41
40: ; preds = %36
store i32 -1, i32* %3
br label %127
41: ; preds = %36
%42 = call { i8, i1 } @llvm.smul.with.overflow.i8(i8 2, i8 127)
%43 = extractvalue { i8, i1 } %42, 1
%44 = extractvalue { i8, i1 } %42, 0
store i8 %44, i8* %6
br i1 %43, label %46, label %45
45: ; preds = %41
store i32 -1, i32* %3
br label %127
46: ; preds = %41
%47 = call { i8, i1 } @llvm.smul.with.overflow.i8(i8 2, i8 -128)
%48 = extractvalue { i8, i1 } %47, 1
%49 = extractvalue { i8, i1 } %47, 0
store i8 %49, i8* %6
br i1 %48, label %51, label %50
50: ; preds = %46
store i32 -1, i32* %3
br label %127
51: ; preds = %46
%52 = call { i8, i1 } @llvm.smul.with.overflow.i8(i8 15, i8 8)
%53 = extractvalue { i8, i1 } %52, 1
%54 = extractvalue { i8, i1 } %52, 0
store i8 %54, i8* %6
br i1 %53, label %55, label %56
55: ; preds = %51
store i32 -1, i32* %3
br label %127
56: ; preds = %51
%57 = call { i8, i1 } @llvm.smul.with.overflow.i8(i8 16, i8 8)
%58 = extractvalue { i8, i1 } %57, 1
%59 = extractvalue { i8, i1 } %57, 0
store i8 %59, i8* %6
br i1 %58, label %61, label %60
60: ; preds = %56
store i32 -1, i32* %3
br label %127
61: ; preds = %56
%62 = call { i8, i1 } @llvm.smul.with.overflow.i8(i8 127, i8 0)
%63 = extractvalue { i8, i1 } %62, 1
%64 = extractvalue { i8, i1 } %62, 0
store i8 %64, i8* %6
br i1 %63, label %65, label %66
65: ; preds = %61
store i32 -1, i32* %3
br label %127
66: ; preds = %61
%67 = call { i8, i1 } @llvm.smul.with.overflow.i8(i8 127, i8 1)
%68 = extractvalue { i8, i1 } %67, 1
%69 = extractvalue { i8, i1 } %67, 0
store i8 %69, i8* %6
br i1 %68, label %70, label %71
70: ; preds = %66
store i32 -1, i32* %3
br label %127
71: ; preds = %66
%72 = call { i8, i1 } @llvm.smul.with.overflow.i8(i8 127, i8 2)
%73 = extractvalue { i8, i1 } %72, 1
%74 = extractvalue { i8, i1 } %72, 0
store i8 %74, i8* %6
br i1 %73, label %76, label %75
75: ; preds = %71
store i32 -1, i32* %3
br label %127
76: ; preds = %71
%77 = call { i8, i1 } @llvm.smul.with.overflow.i8(i8 127, i8 127)
%78 = extractvalue { i8, i1 } %77, 1
%79 = extractvalue { i8, i1 } %77, 0
store i8 %79, i8* %6
br i1 %78, label %81, label %80
80: ; preds = %76
store i32 -1, i32* %3
br label %127
81: ; preds = %76
%82 = call { i8, i1 } @llvm.smul.with.overflow.i8(i8 127, i8 -128)
%83 = extractvalue { i8, i1 } %82, 1
%84 = extractvalue { i8, i1 } %82, 0
store i8 %84, i8* %6
br i1 %83, label %86, label %85
85: ; preds = %81
store i32 -1, i32* %3
br label %127
86: ; preds = %81
%87 = call { i8, i1 } @llvm.smul.with.overflow.i8(i8 -128, i8 0)
%88 = extractvalue { i8, i1 } %87, 1
%89 = extractvalue { i8, i1 } %87, 0
store i8 %89, i8* %6
br i1 %88, label %90, label %91
90: ; preds = %86
store i32 -1, i32* %3
br label %127
91: ; preds = %86
%92 = call { i8, i1 } @llvm.smul.with.overflow.i8(i8 -128, i8 1)
%93 = extractvalue { i8, i1 } %92, 1
%94 = extractvalue { i8, i1 } %92, 0
store i8 %94, i8* %6
br i1 %93, label %95, label %96
95: ; preds = %91
store i32 -1, i32* %3
br label %127
96: ; preds = %91
%97 = call { i8, i1 } @llvm.smul.with.overflow.i8(i8 -128, i8 2)
%98 = extractvalue { i8, i1 } %97, 1
%99 = extractvalue { i8, i1 } %97, 0
store i8 %99, i8* %6
br i1 %98, label %101, label %100
100: ; preds = %96
store i32 -1, i32* %3
br label %127
101: ; preds = %96
%102 = call { i8, i1 } @llvm.smul.with.overflow.i8(i8 -128, i8 127)
%103 = extractvalue { i8, i1 } %102, 1
%104 = extractvalue { i8, i1 } %102, 0
store i8 %104, i8* %6
br i1 %103, label %106, label %105
105: ; preds = %101
store i32 -1, i32* %3
br label %127
106: ; preds = %101
%107 = call { i8, i1 } @llvm.smul.with.overflow.i8(i8 -128, i8 -128)
%108 = extractvalue { i8, i1 } %107, 1
%109 = extractvalue { i8, i1 } %107, 0
store i8 %109, i8* %6
br i1 %108, label %111, label %110
110: ; preds = %106
store i32 -1, i32* %3
br label %127
111: ; preds = %106
%112 = call { i8, i1 } @llvm.smul.with.overflow.i8(i8 -1, i8 0)
%113 = extractvalue { i8, i1 } %112, 1
%114 = extractvalue { i8, i1 } %112, 0
store i8 %114, i8* %6
br i1 %113, label %115, label %116
115: ; preds = %111
store i32 -1, i32* %3
br label %127
116: ; preds = %111
%117 = call { i8, i1 } @llvm.smul.with.overflow.i8(i8 -1, i8 1)
%118 = extractvalue { i8, i1 } %117, 1
%119 = extractvalue { i8, i1 } %117, 0
store i8 %119, i8* %6
br i1 %118, label %120, label %121
120: ; preds = %116
store i32 -1, i32* %3
br label %127
121: ; preds = %116
%122 = call { i8, i1 } @llvm.smul.with.overflow.i8(i8 -1, i8 -1)
%123 = extractvalue { i8, i1 } %122, 1
%124 = extractvalue { i8, i1 } %122, 0
store i8 %124, i8* %6
br i1 %123, label %125, label %126
125: ; preds = %121
store i32 -1, i32* %3
br label %127
126: ; preds = %121
store i32 0, i32* %3
br label %127
127: ; preds = %126, %125, %120, %115, %110, %105, %100, %95, %90, %85, %80, %75, %70, %65, %60, %55, %50, %45, %40, %35, %30, %25, %20, %15, %10
%128 = load i32, i32* %3
ret i32 %128
}

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