int main() {
  unsigned long long int a, b, c;
  a = 0xFFFFFFFFFFFFFFFFULL;
  b = 0x0000000000000001ULL;
  c = a / b;
  c = 0;
  a = 0x000000000000000FULL;
  b = 0x0000000000000003ULL;
  c = a / b;
  c = 0;
  a = 0xAAAAAAAAAAAAAAAAULL;
  b = 0x5555555555555555ULL;
  c = a / b;
  c = 0;
  a = 0x7FFFFFFFFFFFFFFFULL;
  b = 0xFFFFFFFFFFFFFFFFULL;
  c = a / b;
  c = 0;
  a = 0x0000000000000000ULL;
  b = 0x8000000000000000ULL;
  c = a / b;
  c = 0;
  a = 0x0000000000000030ULL;
  b = 0x0000000000000005ULL;
  c = a / b;
  c = 0;
  a = 0xFFFFFFFFFFFFFFFFULL;
  b = 0xFFFFFFFFFFFFFFFFULL;
  c = a / b;
  c = 0;
  a = 0xFFFFFFFFFFFFFFFEULL;
  b = 0x0000000000000010ULL;
  c = a / b;
  c = 0;
  a = 0x0000000000000020ULL;
  b = 0xFFFFFFFFFFFFFFFEULL;
  c = a / b;
  c = 0;
  a = 0x0000000000000000ULL;
  b = 0xFFFFFFFFFFFFFFFFULL;
  c = a / b;
  c = 0;
  a = 0x78;
  c = a / 5;
  c = c / 4;
  c = c / 3;
  c = c / 2;
  c = 0;
  a = 0x1000000000000000ULL;
  c = a / 0xFFFFFFFFFFFFFFFFULL;
  c = 0;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movq   $0xffffffffffffffff,-0x10(%rbp)
ff
movq   $0x1,-0x18(%rbp)
mov    -0x10(%rbp),%rax
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x18(%rbp)
mov    %rax,-0x20(%rbp)
movq   $0x0,-0x20(%rbp)
movq   $0xf,-0x10(%rbp)
movq   $0x3,-0x18(%rbp)
mov    -0x10(%rbp),%rax
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x18(%rbp)
mov    %rax,-0x20(%rbp)
movq   $0x0,-0x20(%rbp)
movabs $0xaaaaaaaaaaaaaaaa,%rax
aa aa aa
mov    %rax,-0x10(%rbp)
movabs $0x5555555555555555,%rax
55 55 55
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x18(%rbp)
mov    %rax,-0x20(%rbp)
movq   $0x0,-0x20(%rbp)
movabs $0x7fffffffffffffff,%rax
ff ff 7f
mov    %rax,-0x10(%rbp)
movq   $0xffffffffffffffff,-0x18(%rbp)
ff
mov    -0x10(%rbp),%rax
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x18(%rbp)
mov    %rax,-0x20(%rbp)
movq   $0x0,-0x20(%rbp)
movq   $0x0,-0x10(%rbp)
movabs $0x8000000000000000,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x18(%rbp)
mov    %rax,-0x20(%rbp)
movq   $0x0,-0x20(%rbp)
movq   $0x30,-0x10(%rbp)
movq   $0x5,-0x18(%rbp)
mov    -0x10(%rbp),%rax
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x18(%rbp)
mov    %rax,-0x20(%rbp)
movq   $0x0,-0x20(%rbp)
movq   $0xffffffffffffffff,-0x10(%rbp)
ff
movq   $0xffffffffffffffff,-0x18(%rbp)
ff
mov    -0x10(%rbp),%rax
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x18(%rbp)
mov    %rax,-0x20(%rbp)
movq   $0x0,-0x20(%rbp)
movq   $0xfffffffffffffffe,-0x10(%rbp)
ff
movq   $0x10,-0x18(%rbp)
mov    -0x10(%rbp),%rax
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x18(%rbp)
mov    %rax,-0x20(%rbp)
movq   $0x0,-0x20(%rbp)
movq   $0x20,-0x10(%rbp)
movq   $0xfffffffffffffffe,-0x18(%rbp)
ff
mov    -0x10(%rbp),%rax
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x18(%rbp)
mov    %rax,-0x20(%rbp)
movq   $0x0,-0x20(%rbp)
movq   $0x0,-0x10(%rbp)
movq   $0xffffffffffffffff,-0x18(%rbp)
ff
mov    -0x10(%rbp),%rax
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x18(%rbp)
mov    %rax,-0x20(%rbp)
movq   $0x0,-0x20(%rbp)
movq   $0x78,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    $0x5,%ecx
xor    %edx,%edx
div    %rcx
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
shr    $0x2,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    $0x3,%ecx
xor    %edx,%edx
div    %rcx
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
shr    $0x1,%rax
mov    %rax,-0x20(%rbp)
movq   $0x0,-0x20(%rbp)
movabs $0x1000000000000000,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    $0xffffffffffffffff,%rcx
xor    %edx,%edx
div    %rcx
mov    %rax,-0x20(%rbp)
movq   $0x0,-0x20(%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 i64
%3 = alloca i64
%4 = alloca i64
store i32 0, i32* %1
store i64 -1, i64* %2
store i64 1, i64* %3
%5 = load i64, i64* %2
%6 = load i64, i64* %3
%7 = udiv i64 %5, %6
store i64 %7, i64* %4
store i64 0, i64* %4
store i64 15, i64* %2
store i64 3, i64* %3
%8 = load i64, i64* %2
%9 = load i64, i64* %3
%10 = udiv i64 %8, %9
store i64 %10, i64* %4
store i64 0, i64* %4
store i64 -6148914691236517206, i64* %2
store i64 6148914691236517205, i64* %3
%11 = load i64, i64* %2
%12 = load i64, i64* %3
%13 = udiv i64 %11, %12
store i64 %13, i64* %4
store i64 0, i64* %4
store i64 9223372036854775807, i64* %2
store i64 -1, i64* %3
%14 = load i64, i64* %2
%15 = load i64, i64* %3
%16 = udiv i64 %14, %15
store i64 %16, i64* %4
store i64 0, i64* %4
store i64 0, i64* %2
store i64 -9223372036854775808, i64* %3
%17 = load i64, i64* %2
%18 = load i64, i64* %3
%19 = udiv i64 %17, %18
store i64 %19, i64* %4
store i64 0, i64* %4
store i64 48, i64* %2
store i64 5, i64* %3
%20 = load i64, i64* %2
%21 = load i64, i64* %3
%22 = udiv i64 %20, %21
store i64 %22, i64* %4
store i64 0, i64* %4
store i64 -1, i64* %2
store i64 -1, i64* %3
%23 = load i64, i64* %2
%24 = load i64, i64* %3
%25 = udiv i64 %23, %24
store i64 %25, i64* %4
store i64 0, i64* %4
store i64 -2, i64* %2
store i64 16, i64* %3
%26 = load i64, i64* %2
%27 = load i64, i64* %3
%28 = udiv i64 %26, %27
store i64 %28, i64* %4
store i64 0, i64* %4
store i64 32, i64* %2
store i64 -2, i64* %3
%29 = load i64, i64* %2
%30 = load i64, i64* %3
%31 = udiv i64 %29, %30
store i64 %31, i64* %4
store i64 0, i64* %4
store i64 0, i64* %2
store i64 -1, i64* %3
%32 = load i64, i64* %2
%33 = load i64, i64* %3
%34 = udiv i64 %32, %33
store i64 %34, i64* %4
store i64 0, i64* %4
store i64 120, i64* %2
%35 = load i64, i64* %2
%36 = udiv i64 %35, 5
store i64 %36, i64* %4
%37 = load i64, i64* %4
%38 = udiv i64 %37, 4
store i64 %38, i64* %4
%39 = load i64, i64* %4
%40 = udiv i64 %39, 3
store i64 %40, i64* %4
%41 = load i64, i64* %4
%42 = udiv i64 %41, 2
store i64 %42, i64* %4
store i64 0, i64* %4
store i64 1152921504606846976, i64* %2
%43 = load i64, i64* %2
%44 = udiv i64 %43, -1
store i64 %44, i64* %4
store i64 0, i64* %4
ret i32 0
}

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