int main(void) {
  unsigned long a = 0xc00000000000000cllu;
  unsigned long b = 0x500000000000000allu;
  unsigned long e = 0x8000000000000004llu;
  unsigned long c;
  c = andc_vv(a, b);
  if (c != e)
    __builtin_abort();
  c = andc_pv(&a, b);
  if (c != e)
    __builtin_abort();
  c = andc_vp(a, &b);
  if (c != e)
    __builtin_abort();
  c = andc_pp(&a, &b);
  if (c != e)
    __builtin_abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movabs $0xc00000000000000c,%rax
mov    %rax,-0x10(%rbp)
movabs $0x500000000000000a,%rax
mov    %rax,-0x18(%rbp)
movabs $0x8000000000000004,%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x0,%al
call   1030 <andc_vv@plt>
cltq
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
cmp    -0x20(%rbp),%rax
je     11b1 <main+0x61>
call   1040 <abort@plt>
mov    -0x18(%rbp),%rsi
lea    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1050 <andc_pv@plt>
cltq
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
cmp    -0x20(%rbp),%rax
je     11d9 <main+0x89>
call   1040 <abort@plt>
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
mov    $0x0,%al
call   1060 <andc_vp@plt>
cltq
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
cmp    -0x20(%rbp),%rax
je     1201 <main+0xb1>
call   1040 <abort@plt>
lea    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
mov    $0x0,%al
call   1070 <andc_pp@plt>
cltq
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
cmp    -0x20(%rbp),%rax
je     1229 <main+0xd9>
call   1040 <abort@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movabs $0xc00000000000000c,%rdi
movabs $0x500000000000000a,%rsi
xor    %eax,%eax
call   1030 <andc_vv@plt>
call   1040 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store i32 0, i32* %1
store i64 -4611686018427387892, i64* %2
store i64 5764607523034234890, i64* %3
store i64 -9223372036854775804, i64* %4
%6 = load i64, i64* %2
%7 = load i64, i64* %3
%8 = call i32 (i64, i64, ...) bitcast (i32 (...)* @andc_vv to i32 (i64, i64, ...)*)(i64 %6, i64 %7)
%9 = sext i32 %8 to i64
store i64 %9, i64* %5
%10 = load i64, i64* %5
%11 = load i64, i64* %4
%12 = icmp ne i64 %10, %11
br i1 %12, label %13, label %14
13: ; preds = %0
unreachable
14: ; preds = %0
%15 = load i64, i64* %3
%16 = call i32 (i64*, i64, ...) bitcast (i32 (...)* @andc_pv to i32 (i64*, i64, ...)*)(i64* %2, i64 %15)
%17 = sext i32 %16 to i64
store i64 %17, i64* %5
%18 = load i64, i64* %5
%19 = load i64, i64* %4
%20 = icmp ne i64 %18, %19
br i1 %20, label %21, label %22
21: ; preds = %14
unreachable
22: ; preds = %14
%23 = load i64, i64* %2
%24 = call i32 (i64, i64*, ...) bitcast (i32 (...)* @andc_vp to i32 (i64, i64*, ...)*)(i64 %23, i64* %3)
%25 = sext i32 %24 to i64
store i64 %25, i64* %5
%26 = load i64, i64* %5
%27 = load i64, i64* %4
%28 = icmp ne i64 %26, %27
br i1 %28, label %29, label %30
29: ; preds = %22
unreachable
30: ; preds = %22
%31 = call i32 (i64*, i64*, ...) bitcast (i32 (...)* @andc_pp to i32 (i64*, i64*, ...)*)(i64* %2, i64* %3)
%32 = sext i32 %31 to i64
store i64 %32, i64* %5
%33 = load i64, i64* %5
%34 = load i64, i64* %4
%35 = icmp ne i64 %33, %34
br i1 %35, label %36, label %37
36: ; preds = %30
unreachable
37: ; preds = %30
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (i64, i64, ...) bitcast (i32 (...)* @andc_vv to i32 (i64, i64, ...)*)(i64 -4611686018427387892, i64 5764607523034234890)
tail call void @abort()
unreachable
}