#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 */
char CHAR_MIN;
unsigned char UCHAR_MAX;
int UINT_MAX;
int main(int argc, char **argv) {
  unsigned char appleCharOp1, appleCharOp2, appleCharOp3;
  unsigned char appleCharResult;
  unsigned char appleCharWrongResult;
  appleCharOp1 = 80;
  appleCharOp2 = 70;
  appleCharOp3 = 100;
  appleCharResult = appleCharOp1 * appleCharOp2 / appleCharOp3;
  appleCharWrongResult =
      (unsigned char)(appleCharOp1 * appleCharOp2) / appleCharOp3;
  unsigned char bananaChar1 = UCHAR_MAX;
  int bananaInt1 = bananaChar1;
  char bananaChar2 = CHAR_MIN;
  unsigned int bananaInt2 = bananaChar2;
  char bananaChar3 = CHAR_MIN;
  int bananaInt3 = bananaChar3;
  unsigned int cantaloupeInt1 = UINT_MAX / 4;
  unsigned int cantaloupeInt2 = UINT_MAX / 8;
  unsigned int cantaloupeInt3 = UINT_MAX / 16;
  unsigned long long cantaloupeLongLongResult1 =
      cantaloupeInt1 * cantaloupeInt2 / cantaloupeInt3;
  unsigned long long cantaloupeLongLongResult2 =
      (unsigned long long)cantaloupeInt1 * (unsigned long long)cantaloupeInt2 /
      (unsigned long long)cantaloupeInt3;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movb   $0x50,-0x11(%rbp)
movb   $0x46,-0x12(%rbp)
movb   $0x64,-0x13(%rbp)
movzbl -0x11(%rbp),%eax
movzbl -0x12(%rbp),%ecx
imul   %ecx,%eax
movzbl -0x13(%rbp),%ecx
cltd
idiv   %ecx
mov    %al,-0x14(%rbp)
movzbl -0x11(%rbp),%eax
movzbl -0x12(%rbp),%ecx
imul   %ecx,%eax
movzbl %al,%eax
movzbl -0x13(%rbp),%ecx
cltd
idiv   %ecx
mov    %al,-0x15(%rbp)
mov    0x2ea5(%rip),%rax
mov    (%rax),%al
mov    %al,-0x16(%rbp)
movzbl -0x16(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    0x2e82(%rip),%rax
mov    (%rax),%al
mov    %al,-0x1d(%rbp)
movsbl -0x1d(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    0x2e6f(%rip),%rax
mov    (%rax),%al
mov    %al,-0x25(%rbp)
movsbl -0x25(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    0x2e54(%rip),%rax
mov    (%rax),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    %eax,-0x30(%rbp)
mov    0x2e40(%rip),%rax
mov    (%rax),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    %eax,-0x34(%rbp)
mov    0x2e2c(%rip),%rax
mov    (%rax),%eax
mov    $0x10,%ecx
cltd
idiv   %ecx
mov    %eax,-0x38(%rbp)
mov    -0x30(%rbp),%eax
imul   -0x34(%rbp),%eax
xor    %edx,%edx
divl   -0x38(%rbp)
mov    %eax,%eax
mov    %rax,-0x40(%rbp)
mov    -0x30(%rbp),%eax
mov    -0x34(%rbp),%ecx
imul   %rcx,%rax
mov    -0x38(%rbp),%ecx
xor    %edx,%edx
div    %rcx
mov    %rax,-0x48(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@UCHAR_MAX = global i8 0
@CHAR_MIN = global i8 0
@UINT_MAX = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
%10 = alloca i8
%11 = alloca i32
%12 = alloca i8
%13 = alloca i32
%14 = alloca i8
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i64
%20 = alloca i64
store i32 %0, i32* %3
store i8** %1, i8*** %4
store i8 80, i8* %5
store i8 70, i8* %6
store i8 100, i8* %7
%21 = load i8, i8* %5
%22 = zext i8 %21 to i32
%23 = load i8, i8* %6
%24 = zext i8 %23 to i32
%25 = mul nsw i32 %22, %24
%26 = load i8, i8* %7
%27 = zext i8 %26 to i32
%28 = sdiv i32 %25, %27
%29 = trunc i32 %28 to i8
store i8 %29, i8* %8
%30 = load i8, i8* %5
%31 = zext i8 %30 to i32
%32 = load i8, i8* %6
%33 = zext i8 %32 to i32
%34 = mul nsw i32 %31, %33
%35 = trunc i32 %34 to i8
%36 = zext i8 %35 to i32
%37 = load i8, i8* %7
%38 = zext i8 %37 to i32
%39 = sdiv i32 %36, %38
%40 = trunc i32 %39 to i8
store i8 %40, i8* %9
%41 = load i8, i8* @UCHAR_MAX
store i8 %41, i8* %10
%42 = load i8, i8* %10
%43 = zext i8 %42 to i32
store i32 %43, i32* %11
%44 = load i8, i8* @CHAR_MIN
store i8 %44, i8* %12
%45 = load i8, i8* %12
%46 = sext i8 %45 to i32
store i32 %46, i32* %13
%47 = load i8, i8* @CHAR_MIN
store i8 %47, i8* %14
%48 = load i8, i8* %14
%49 = sext i8 %48 to i32
store i32 %49, i32* %15
%50 = load i32, i32* @UINT_MAX
%51 = sdiv i32 %50, 4
store i32 %51, i32* %16
%52 = load i32, i32* @UINT_MAX
%53 = sdiv i32 %52, 8
store i32 %53, i32* %17
%54 = load i32, i32* @UINT_MAX
%55 = sdiv i32 %54, 16
store i32 %55, i32* %18
%56 = load i32, i32* %16
%57 = load i32, i32* %17
%58 = mul i32 %56, %57
%59 = load i32, i32* %18
%60 = udiv i32 %58, %59
%61 = zext i32 %60 to i64
store i64 %61, i64* %19
%62 = load i32, i32* %16
%63 = zext i32 %62 to i64
%64 = load i32, i32* %17
%65 = zext i32 %64 to i64
%66 = mul i64 %63, %65
%67 = load i32, i32* %18
%68 = zext i32 %67 to i64
%69 = udiv i64 %66, %68
store i64 %69, i64* %20
ret i32 0
}

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