int main() {
  signed char a, b, c;
  a = 0xFF;
  b = 0x01;
  c = a / b;
  c = 0;
  a = 0x0F;
  b = 0x03;
  c = a / b;
  c = 0;
  a = 0xAA;
  b = 0x55;
  c = a / b;
  c = 0;
  a = 0x7F;
  b = 0xFF;
  c = a / b;
  c = 0;
  a = 0x00;
  b = 0x80;
  c = a / b;
  c = 0;
  a = 0x30;
  b = 0x05;
  c = a / b;
  c = 0;
  a = 0xFF;
  b = 0xFF;
  c = a / b;
  c = 0;
  a = 0xFE;
  b = 0x10;
  c = a / b;
  c = 0;
  a = 0x20;
  b = 0xFE;
  c = a / b;
  c = 0;
  a = 0x00;
  b = 0xFF;
  c = a / b;
  c = 0;
  a = 0x78;
  c = a / 5;
  c = c / 4;
  c = c / 3;
  c = c / 2;
  c = 0;
  a = 0x10;
  c = a / (-1);
  c = 0;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movb   $0xff,-0x5(%rbp)
movb   $0x1,-0x6(%rbp)
movsbl -0x5(%rbp),%eax
movsbl -0x6(%rbp),%ecx
cltd
idiv   %ecx
mov    %al,-0x7(%rbp)
movb   $0x0,-0x7(%rbp)
movb   $0xf,-0x5(%rbp)
movb   $0x3,-0x6(%rbp)
movsbl -0x5(%rbp),%eax
movsbl -0x6(%rbp),%ecx
cltd
idiv   %ecx
mov    %al,-0x7(%rbp)
movb   $0x0,-0x7(%rbp)
movb   $0xaa,-0x5(%rbp)
movb   $0x55,-0x6(%rbp)
movsbl -0x5(%rbp),%eax
movsbl -0x6(%rbp),%ecx
cltd
idiv   %ecx
mov    %al,-0x7(%rbp)
movb   $0x0,-0x7(%rbp)
movb   $0x7f,-0x5(%rbp)
movb   $0xff,-0x6(%rbp)
movsbl -0x5(%rbp),%eax
movsbl -0x6(%rbp),%ecx
cltd
idiv   %ecx
mov    %al,-0x7(%rbp)
movb   $0x0,-0x7(%rbp)
movb   $0x0,-0x5(%rbp)
movb   $0x80,-0x6(%rbp)
movsbl -0x5(%rbp),%eax
movsbl -0x6(%rbp),%ecx
cltd
idiv   %ecx
mov    %al,-0x7(%rbp)
movb   $0x0,-0x7(%rbp)
movb   $0x30,-0x5(%rbp)
movb   $0x5,-0x6(%rbp)
movsbl -0x5(%rbp),%eax
movsbl -0x6(%rbp),%ecx
cltd
idiv   %ecx
mov    %al,-0x7(%rbp)
movb   $0x0,-0x7(%rbp)
movb   $0xff,-0x5(%rbp)
movb   $0xff,-0x6(%rbp)
movsbl -0x5(%rbp),%eax
movsbl -0x6(%rbp),%ecx
cltd
idiv   %ecx
mov    %al,-0x7(%rbp)
movb   $0x0,-0x7(%rbp)
movb   $0xfe,-0x5(%rbp)
movb   $0x10,-0x6(%rbp)
movsbl -0x5(%rbp),%eax
movsbl -0x6(%rbp),%ecx
cltd
idiv   %ecx
mov    %al,-0x7(%rbp)
movb   $0x0,-0x7(%rbp)
movb   $0x20,-0x5(%rbp)
movb   $0xfe,-0x6(%rbp)
movsbl -0x5(%rbp),%eax
movsbl -0x6(%rbp),%ecx
cltd
idiv   %ecx
mov    %al,-0x7(%rbp)
movb   $0x0,-0x7(%rbp)
movb   $0x0,-0x5(%rbp)
movb   $0xff,-0x6(%rbp)
movsbl -0x5(%rbp),%eax
movsbl -0x6(%rbp),%ecx
cltd
idiv   %ecx
mov    %al,-0x7(%rbp)
movb   $0x0,-0x7(%rbp)
movb   $0x78,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
mov    %al,-0x7(%rbp)
movsbl -0x7(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    %al,-0x7(%rbp)
movsbl -0x7(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %al,-0x7(%rbp)
movsbl -0x7(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %al,-0x7(%rbp)
movb   $0x0,-0x7(%rbp)
movb   $0x10,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
mov    $0xffffffff,%ecx
cltd
idiv   %ecx
mov    %al,-0x7(%rbp)
movb   $0x0,-0x7(%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 i8
store i32 0, i32* %1
store i8 -1, i8* %2
store i8 1, i8* %3
%5 = load i8, i8* %2
%6 = sext i8 %5 to i32
%7 = load i8, i8* %3
%8 = sext i8 %7 to i32
%9 = sdiv i32 %6, %8
%10 = trunc i32 %9 to i8
store i8 %10, i8* %4
store i8 0, i8* %4
store i8 15, i8* %2
store i8 3, i8* %3
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = load i8, i8* %3
%14 = sext i8 %13 to i32
%15 = sdiv i32 %12, %14
%16 = trunc i32 %15 to i8
store i8 %16, i8* %4
store i8 0, i8* %4
store i8 -86, i8* %2
store i8 85, i8* %3
%17 = load i8, i8* %2
%18 = sext i8 %17 to i32
%19 = load i8, i8* %3
%20 = sext i8 %19 to i32
%21 = sdiv i32 %18, %20
%22 = trunc i32 %21 to i8
store i8 %22, i8* %4
store i8 0, i8* %4
store i8 127, i8* %2
store i8 -1, i8* %3
%23 = load i8, i8* %2
%24 = sext i8 %23 to i32
%25 = load i8, i8* %3
%26 = sext i8 %25 to i32
%27 = sdiv i32 %24, %26
%28 = trunc i32 %27 to i8
store i8 %28, i8* %4
store i8 0, i8* %4
store i8 0, i8* %2
store i8 -128, i8* %3
%29 = load i8, i8* %2
%30 = sext i8 %29 to i32
%31 = load i8, i8* %3
%32 = sext i8 %31 to i32
%33 = sdiv i32 %30, %32
%34 = trunc i32 %33 to i8
store i8 %34, i8* %4
store i8 0, i8* %4
store i8 48, i8* %2
store i8 5, i8* %3
%35 = load i8, i8* %2
%36 = sext i8 %35 to i32
%37 = load i8, i8* %3
%38 = sext i8 %37 to i32
%39 = sdiv i32 %36, %38
%40 = trunc i32 %39 to i8
store i8 %40, i8* %4
store i8 0, i8* %4
store i8 -1, i8* %2
store i8 -1, i8* %3
%41 = load i8, i8* %2
%42 = sext i8 %41 to i32
%43 = load i8, i8* %3
%44 = sext i8 %43 to i32
%45 = sdiv i32 %42, %44
%46 = trunc i32 %45 to i8
store i8 %46, i8* %4
store i8 0, i8* %4
store i8 -2, i8* %2
store i8 16, i8* %3
%47 = load i8, i8* %2
%48 = sext i8 %47 to i32
%49 = load i8, i8* %3
%50 = sext i8 %49 to i32
%51 = sdiv i32 %48, %50
%52 = trunc i32 %51 to i8
store i8 %52, i8* %4
store i8 0, i8* %4
store i8 32, i8* %2
store i8 -2, i8* %3
%53 = load i8, i8* %2
%54 = sext i8 %53 to i32
%55 = load i8, i8* %3
%56 = sext i8 %55 to i32
%57 = sdiv i32 %54, %56
%58 = trunc i32 %57 to i8
store i8 %58, i8* %4
store i8 0, i8* %4
store i8 0, i8* %2
store i8 -1, i8* %3
%59 = load i8, i8* %2
%60 = sext i8 %59 to i32
%61 = load i8, i8* %3
%62 = sext i8 %61 to i32
%63 = sdiv i32 %60, %62
%64 = trunc i32 %63 to i8
store i8 %64, i8* %4
store i8 0, i8* %4
store i8 120, i8* %2
%65 = load i8, i8* %2
%66 = sext i8 %65 to i32
%67 = sdiv i32 %66, 5
%68 = trunc i32 %67 to i8
store i8 %68, i8* %4
%69 = load i8, i8* %4
%70 = sext i8 %69 to i32
%71 = sdiv i32 %70, 4
%72 = trunc i32 %71 to i8
store i8 %72, i8* %4
%73 = load i8, i8* %4
%74 = sext i8 %73 to i32
%75 = sdiv i32 %74, 3
%76 = trunc i32 %75 to i8
store i8 %76, i8* %4
%77 = load i8, i8* %4
%78 = sext i8 %77 to i32
%79 = sdiv i32 %78, 2
%80 = trunc i32 %79 to i8
store i8 %80, i8* %4
store i8 0, i8* %4
store i8 16, i8* %2
%81 = load i8, i8* %2
%82 = sext i8 %81 to i32
%83 = sdiv i32 %82, -1
%84 = trunc i32 %83 to i8
store i8 %84, i8* %4
store i8 0, i8* %4
ret i32 0
}

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