#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int fail_real(int /*<<< orphan*/, int);
int mul_i16(int, int);
int mul_i32(int, int);
int mul_i64(int, int);
int mul_i8(int, int);
int test_mul(void) {
  if (mul_i8(-1, 1) != -1)
    return fail_real(0, 230);
  if (mul_i8(-1, -1) != 1)
    return fail_real(0, 232);
  if (mul_i8(1, 1) != 1)
    return fail_real(0, 234);
  if (mul_i8(17, 35) != 83)
    return fail_real(0, 236);
  if (mul_i16(-1, 1) != -1)
    return fail_real(0, 239);
  if (mul_i16(-1, -1) != 1)
    return fail_real(0, 241);
  if (mul_i16(1, 1) != 1)
    return fail_real(0, 243);
  if (mul_i16(179, 871) != 24837)
    return fail_real(0, 245);
  if (mul_i32(-1, 1) != -1)
    return fail_real(0, 248);
  if (mul_i32(-1, -1) != 1)
    return fail_real(0, 250);
  if (mul_i32(1, 1) != 1)
    return fail_real(0, 252);
  if (mul_i32(179536, 871912) != 1920770176)
    return fail_real(0, 254);
  if (mul_i64(-1, 1) != -1)
    return fail_real(0, 257);
  if (mul_i64(-1, -1) != 1)
    return fail_real(0, 259);
  if (mul_i64(1, 1) != 1)
    return fail_real(0, 261);
  if (mul_i64(17953621789, 8719125119) != 8965922127819204963)
    return fail_real(0, 263);
  return 0x10;
}


x86 assembly (clang, -O0):
<test_mul>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xffffffff,%edi
mov    $0x1,%esi
call   1060 <mul_i8@plt>
cmp    $0xffffffff,%eax
je     1184 <test_mul+0x34>
xor    %edi,%edi
mov    $0xe6,%esi
call   1030 <fail_real@plt>
mov    %eax,-0x4(%rbp)
jmp    1417 <test_mul+0x2c7>
mov    $0xffffffff,%esi
mov    %esi,%edi
call   1060 <mul_i8@plt>
cmp    $0x1,%eax
je     11ad <test_mul+0x5d>
xor    %edi,%edi
mov    $0xe8,%esi
call   1030 <fail_real@plt>
mov    %eax,-0x4(%rbp)
jmp    1417 <test_mul+0x2c7>
mov    $0x1,%esi
mov    %esi,%edi
call   1060 <mul_i8@plt>
cmp    $0x1,%eax
je     11d6 <test_mul+0x86>
xor    %edi,%edi
mov    $0xea,%esi
call   1030 <fail_real@plt>
mov    %eax,-0x4(%rbp)
jmp    1417 <test_mul+0x2c7>
mov    $0x11,%edi
mov    $0x23,%esi
call   1060 <mul_i8@plt>
cmp    $0x53,%eax
je     1202 <test_mul+0xb2>
xor    %edi,%edi
mov    $0xec,%esi
call   1030 <fail_real@plt>
mov    %eax,-0x4(%rbp)
jmp    1417 <test_mul+0x2c7>
mov    $0xffffffff,%edi
mov    $0x1,%esi
call   1040 <mul_i16@plt>
cmp    $0xffffffff,%eax
je     122e <test_mul+0xde>
xor    %edi,%edi
mov    $0xef,%esi
call   1030 <fail_real@plt>
mov    %eax,-0x4(%rbp)
jmp    1417 <test_mul+0x2c7>
mov    $0xffffffff,%esi
mov    %esi,%edi
call   1040 <mul_i16@plt>
cmp    $0x1,%eax
je     1257 <test_mul+0x107>
xor    %edi,%edi
mov    $0xf1,%esi
call   1030 <fail_real@plt>
mov    %eax,-0x4(%rbp)
jmp    1417 <test_mul+0x2c7>
mov    $0x1,%esi
mov    %esi,%edi
call   1040 <mul_i16@plt>
cmp    $0x1,%eax
je     1280 <test_mul+0x130>
xor    %edi,%edi
mov    $0xf3,%esi
call   1030 <fail_real@plt>
mov    %eax,-0x4(%rbp)
jmp    1417 <test_mul+0x2c7>
mov    $0xb3,%edi
mov    $0x367,%esi
call   1040 <mul_i16@plt>
cmp    $0x6105,%eax
je     12ae <test_mul+0x15e>
xor    %edi,%edi
mov    $0xf5,%esi
call   1030 <fail_real@plt>
mov    %eax,-0x4(%rbp)
jmp    1417 <test_mul+0x2c7>
mov    $0xffffffff,%edi
mov    $0x1,%esi
call   1070 <mul_i32@plt>
cmp    $0xffffffff,%eax
je     12da <test_mul+0x18a>
xor    %edi,%edi
mov    $0xf8,%esi
call   1030 <fail_real@plt>
mov    %eax,-0x4(%rbp)
jmp    1417 <test_mul+0x2c7>
mov    $0xffffffff,%esi
mov    %esi,%edi
call   1070 <mul_i32@plt>
cmp    $0x1,%eax
je     1303 <test_mul+0x1b3>
xor    %edi,%edi
mov    $0xfa,%esi
call   1030 <fail_real@plt>
mov    %eax,-0x4(%rbp)
jmp    1417 <test_mul+0x2c7>
mov    $0x1,%esi
mov    %esi,%edi
call   1070 <mul_i32@plt>
cmp    $0x1,%eax
je     132c <test_mul+0x1dc>
xor    %edi,%edi
mov    $0xfc,%esi
call   1030 <fail_real@plt>
mov    %eax,-0x4(%rbp)
jmp    1417 <test_mul+0x2c7>
mov    $0x2bd50,%edi
mov    $0xd4de8,%esi
call   1070 <mul_i32@plt>
cmp    $0x727ca080,%eax
je     135a <test_mul+0x20a>
xor    %edi,%edi
mov    $0xfe,%esi
call   1030 <fail_real@plt>
mov    %eax,-0x4(%rbp)
jmp    1417 <test_mul+0x2c7>
mov    $0xffffffff,%edi
mov    $0x1,%esi
call   1050 <mul_i64@plt>
cmp    $0xffffffff,%eax
je     1386 <test_mul+0x236>
xor    %edi,%edi
mov    $0x101,%esi
call   1030 <fail_real@plt>
mov    %eax,-0x4(%rbp)
jmp    1417 <test_mul+0x2c7>
mov    $0xffffffff,%esi
mov    %esi,%edi
call   1050 <mul_i64@plt>
cmp    $0x1,%eax
je     13af <test_mul+0x25f>
xor    %edi,%edi
mov    $0x103,%esi
call   1030 <fail_real@plt>
mov    %eax,-0x4(%rbp)
jmp    1417 <test_mul+0x2c7>
mov    $0x1,%esi
mov    %esi,%edi
call   1050 <mul_i64@plt>
cmp    $0x1,%eax
je     13d8 <test_mul+0x288>
xor    %edi,%edi
mov    $0x105,%esi
call   1030 <fail_real@plt>
mov    %eax,-0x4(%rbp)
jmp    1417 <test_mul+0x2c7>
mov    $0x2e1e871d,%edi
mov    $0x7b34a7f,%esi
call   1050 <mul_i64@plt>
cltq
movabs $0x7c6d5aabf87a6963,%rcx
5a 6d 7c
cmp    %rcx,%rax
je     1410 <test_mul+0x2c0>
xor    %edi,%edi
mov    $0x107,%esi
call   1030 <fail_real@plt>
mov    %eax,-0x4(%rbp)
jmp    1417 <test_mul+0x2c7>
movl   $0x10,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_mul>:
push   %rax
mov    $0xffffffff,%edi
mov    $0x1,%esi
call   1060 <mul_i8@plt>
mov    $0xe6,%esi
cmp    $0xffffffff,%eax
jne    1308 <test_mul+0x1b8>
mov    $0xffffffff,%edi
mov    $0xffffffff,%esi
call   1060 <mul_i8@plt>
mov    $0xe8,%esi
cmp    $0x1,%eax
jne    1308 <test_mul+0x1b8>
mov    $0x1,%edi
mov    $0x1,%esi
call   1060 <mul_i8@plt>
mov    $0xea,%esi
cmp    $0x1,%eax
jne    1308 <test_mul+0x1b8>
mov    $0x11,%edi
mov    $0x23,%esi
call   1060 <mul_i8@plt>
mov    $0xec,%esi
cmp    $0x53,%eax
jne    1308 <test_mul+0x1b8>
mov    $0xffffffff,%edi
mov    $0x1,%esi
call   1040 <mul_i16@plt>
mov    $0xef,%esi
cmp    $0xffffffff,%eax
jne    1308 <test_mul+0x1b8>
mov    $0xffffffff,%edi
mov    $0xffffffff,%esi
call   1040 <mul_i16@plt>
mov    $0xf1,%esi
cmp    $0x1,%eax
jne    1308 <test_mul+0x1b8>
mov    $0x1,%edi
mov    $0x1,%esi
call   1040 <mul_i16@plt>
mov    $0xf3,%esi
cmp    $0x1,%eax
jne    1308 <test_mul+0x1b8>
mov    $0xb3,%edi
mov    $0x367,%esi
call   1040 <mul_i16@plt>
mov    $0xf5,%esi
cmp    $0x6105,%eax
jne    1308 <test_mul+0x1b8>
mov    $0xffffffff,%edi
mov    $0x1,%esi
call   1070 <mul_i32@plt>
mov    $0xf8,%esi
cmp    $0xffffffff,%eax
jne    1308 <test_mul+0x1b8>
mov    $0xffffffff,%edi
mov    $0xffffffff,%esi
call   1070 <mul_i32@plt>
mov    $0xfa,%esi
cmp    $0x1,%eax
jne    1308 <test_mul+0x1b8>
mov    $0x1,%edi
mov    $0x1,%esi
call   1070 <mul_i32@plt>
mov    $0xfc,%esi
cmp    $0x1,%eax
jne    1308 <test_mul+0x1b8>
mov    $0x2bd50,%edi
mov    $0xd4de8,%esi
call   1070 <mul_i32@plt>
mov    $0xfe,%esi
cmp    $0x727ca080,%eax
jne    1308 <test_mul+0x1b8>
mov    $0xffffffff,%edi
mov    $0x1,%esi
call   1050 <mul_i64@plt>
mov    $0x101,%esi
cmp    $0xffffffff,%eax
jne    1308 <test_mul+0x1b8>
mov    $0xffffffff,%edi
mov    $0xffffffff,%esi
call   1050 <mul_i64@plt>
mov    $0x103,%esi
cmp    $0x1,%eax
jne    1308 <test_mul+0x1b8>
mov    $0x1,%edi
mov    $0x1,%esi
call   1050 <mul_i64@plt>
mov    $0x105,%esi
cmp    $0x1,%eax
jne    1308 <test_mul+0x1b8>
mov    $0x2e1e871d,%edi
mov    $0x7b34a7f,%esi
call   1050 <mul_i64@plt>
mov    $0x107,%esi
xor    %edi,%edi
pop    %rax
jmp    1030 <fail_real@plt>

LLVM IR (-O0):
define i32 @test_mul() {
%1 = alloca i32
%2 = call i32 @mul_i8(i32 -1, i32 1)
%3 = icmp ne i32 %2, -1
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @fail_real(i32 0, i32 230)
store i32 %5, i32* %1
br label %83
6: ; preds = %0
%7 = call i32 @mul_i8(i32 -1, i32 -1)
%8 = icmp ne i32 %7, 1
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = call i32 @fail_real(i32 0, i32 232)
store i32 %10, i32* %1
br label %83
11: ; preds = %6
%12 = call i32 @mul_i8(i32 1, i32 1)
%13 = icmp ne i32 %12, 1
br i1 %13, label %14, label %16
14: ; preds = %11
%15 = call i32 @fail_real(i32 0, i32 234)
store i32 %15, i32* %1
br label %83
16: ; preds = %11
%17 = call i32 @mul_i8(i32 17, i32 35)
%18 = icmp ne i32 %17, 83
br i1 %18, label %19, label %21
19: ; preds = %16
%20 = call i32 @fail_real(i32 0, i32 236)
store i32 %20, i32* %1
br label %83
21: ; preds = %16
%22 = call i32 @mul_i16(i32 -1, i32 1)
%23 = icmp ne i32 %22, -1
br i1 %23, label %24, label %26
24: ; preds = %21
%25 = call i32 @fail_real(i32 0, i32 239)
store i32 %25, i32* %1
br label %83
26: ; preds = %21
%27 = call i32 @mul_i16(i32 -1, i32 -1)
%28 = icmp ne i32 %27, 1
br i1 %28, label %29, label %31
29: ; preds = %26
%30 = call i32 @fail_real(i32 0, i32 241)
store i32 %30, i32* %1
br label %83
31: ; preds = %26
%32 = call i32 @mul_i16(i32 1, i32 1)
%33 = icmp ne i32 %32, 1
br i1 %33, label %34, label %36
34: ; preds = %31
%35 = call i32 @fail_real(i32 0, i32 243)
store i32 %35, i32* %1
br label %83
36: ; preds = %31
%37 = call i32 @mul_i16(i32 179, i32 871)
%38 = icmp ne i32 %37, 24837
br i1 %38, label %39, label %41
39: ; preds = %36
%40 = call i32 @fail_real(i32 0, i32 245)
store i32 %40, i32* %1
br label %83
41: ; preds = %36
%42 = call i32 @mul_i32(i32 -1, i32 1)
%43 = icmp ne i32 %42, -1
br i1 %43, label %44, label %46
44: ; preds = %41
%45 = call i32 @fail_real(i32 0, i32 248)
store i32 %45, i32* %1
br label %83
46: ; preds = %41
%47 = call i32 @mul_i32(i32 -1, i32 -1)
%48 = icmp ne i32 %47, 1
br i1 %48, label %49, label %51
49: ; preds = %46
%50 = call i32 @fail_real(i32 0, i32 250)
store i32 %50, i32* %1
br label %83
51: ; preds = %46
%52 = call i32 @mul_i32(i32 1, i32 1)
%53 = icmp ne i32 %52, 1
br i1 %53, label %54, label %56
54: ; preds = %51
%55 = call i32 @fail_real(i32 0, i32 252)
store i32 %55, i32* %1
br label %83
56: ; preds = %51
%57 = call i32 @mul_i32(i32 179536, i32 871912)
%58 = icmp ne i32 %57, 1920770176
br i1 %58, label %59, label %61
59: ; preds = %56
%60 = call i32 @fail_real(i32 0, i32 254)
store i32 %60, i32* %1
br label %83
61: ; preds = %56
%62 = call i32 @mul_i64(i32 -1, i32 1)
%63 = icmp ne i32 %62, -1
br i1 %63, label %64, label %66
64: ; preds = %61
%65 = call i32 @fail_real(i32 0, i32 257)
store i32 %65, i32* %1
br label %83
66: ; preds = %61
%67 = call i32 @mul_i64(i32 -1, i32 -1)
%68 = icmp ne i32 %67, 1
br i1 %68, label %69, label %71
69: ; preds = %66
%70 = call i32 @fail_real(i32 0, i32 259)
store i32 %70, i32* %1
br label %83
71: ; preds = %66
%72 = call i32 @mul_i64(i32 1, i32 1)
%73 = icmp ne i32 %72, 1
br i1 %73, label %74, label %76
74: ; preds = %71
%75 = call i32 @fail_real(i32 0, i32 261)
store i32 %75, i32* %1
br label %83
76: ; preds = %71
%77 = call i32 @mul_i64(i32 773752605, i32 129190527)
%78 = sext i32 %77 to i64
%79 = icmp ne i64 %78, 8965922127819204963
br i1 %79, label %80, label %82
80: ; preds = %76
%81 = call i32 @fail_real(i32 0, i32 263)
store i32 %81, i32* %1
br label %83
82: ; preds = %76
store i32 16, i32* %1
br label %83
83: ; preds = %82, %80, %74, %69, %64, %59, %54, %49, %44, %39, %34, %29, %24, %19, %14, %9, %4
%84 = load i32, i32* %1
ret i32 %84
}

LLVM IR (-O2):
define i32 @test_mul() {
%1 = tail call i32 @mul_i8(i32 -1, i32 1)
%2 = icmp eq i32 %1, -1
br i1 %2, label %3, label %47
3: ; preds = %0
%4 = tail call i32 @mul_i8(i32 -1, i32 -1)
%5 = icmp eq i32 %4, 1
br i1 %5, label %6, label %47
6: ; preds = %3
%7 = tail call i32 @mul_i8(i32 1, i32 1)
%8 = icmp eq i32 %7, 1
br i1 %8, label %9, label %47
9: ; preds = %6
%10 = tail call i32 @mul_i8(i32 17, i32 35)
%11 = icmp eq i32 %10, 83
br i1 %11, label %12, label %47
12: ; preds = %9
%13 = tail call i32 @mul_i16(i32 -1, i32 1)
%14 = icmp eq i32 %13, -1
br i1 %14, label %15, label %47
15: ; preds = %12
%16 = tail call i32 @mul_i16(i32 -1, i32 -1)
%17 = icmp eq i32 %16, 1
br i1 %17, label %18, label %47
18: ; preds = %15
%19 = tail call i32 @mul_i16(i32 1, i32 1)
%20 = icmp eq i32 %19, 1
br i1 %20, label %21, label %47
21: ; preds = %18
%22 = tail call i32 @mul_i16(i32 179, i32 871)
%23 = icmp eq i32 %22, 24837
br i1 %23, label %24, label %47
24: ; preds = %21
%25 = tail call i32 @mul_i32(i32 -1, i32 1)
%26 = icmp eq i32 %25, -1
br i1 %26, label %27, label %47
27: ; preds = %24
%28 = tail call i32 @mul_i32(i32 -1, i32 -1)
%29 = icmp eq i32 %28, 1
br i1 %29, label %30, label %47
30: ; preds = %27
%31 = tail call i32 @mul_i32(i32 1, i32 1)
%32 = icmp eq i32 %31, 1
br i1 %32, label %33, label %47
33: ; preds = %30
%34 = tail call i32 @mul_i32(i32 179536, i32 871912)
%35 = icmp eq i32 %34, 1920770176
br i1 %35, label %36, label %47
36: ; preds = %33
%37 = tail call i32 @mul_i64(i32 -1, i32 1)
%38 = icmp eq i32 %37, -1
br i1 %38, label %39, label %47
39: ; preds = %36
%40 = tail call i32 @mul_i64(i32 -1, i32 -1)
%41 = icmp eq i32 %40, 1
br i1 %41, label %42, label %47
42: ; preds = %39
%43 = tail call i32 @mul_i64(i32 1, i32 1)
%44 = icmp eq i32 %43, 1
br i1 %44, label %45, label %47
45: ; preds = %42
%46 = tail call i32 @mul_i64(i32 773752605, i32 129190527)
br label %47
47: ; preds = %42, %39, %36, %33, %30, %27, %24, %21, %18, %15, %12, %9, %6, %3, %0, %45
%48 = phi i32 [ 263, %45 ], [ 230, %0 ], [ 232, %3 ], [ 234, %6 ], [ 236, %9 ], [ 239, %12 ], [ 241, %15 ], [ 243, %18 ], [ 245, %21 ], [ 248, %24 ], [ 250, %27 ], [ 252, %30 ], [ 254, %33 ], [ 257, %36 ], [ 259, %39 ], [ 261, %42 ]
%49 = tail call i32 @fail_real(i32 0, i32 %48)
ret i32 %49
}