int main() {
  int n = 6;
  long long a[] = {5, 6, 7, -5, -6, -7};
  long long b[] = {-5, -6, -7, 5, 6, 7};
  int i;
  for (i = 0; i < n; i++)
    do {
      if (!(LLneg(a[i]) == b[i]))
        asm volatile(".byte 0xd6" : : "a"(1));
    } while (0);
  asm volatile(".byte 0xd6" : : "a"(0));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x6,-0x8(%rbp)
lea    -0x40(%rbp),%rdi
xor    %esi,%esi
mov    $0x30,%edx
call   1030 <memset@plt>
movq   $0x5,-0x40(%rbp)
movq   $0x6,-0x38(%rbp)
movq   $0x7,-0x30(%rbp)
movq   $0xfffffffffffffffb,-0x28(%rbp)
ff
movq   $0xfffffffffffffffa,-0x20(%rbp)
ff
movq   $0xfffffffffffffff9,-0x18(%rbp)
ff
lea    -0x70(%rbp),%rdi
xor    %esi,%esi
mov    $0x30,%edx
call   1030 <memset@plt>
movq   $0xfffffffffffffffb,-0x70(%rbp)
ff
movq   $0xfffffffffffffffa,-0x68(%rbp)
ff
movq   $0xfffffffffffffff9,-0x60(%rbp)
ff
movq   $0x5,-0x58(%rbp)
movq   $0x6,-0x50(%rbp)
movq   $0x7,-0x48(%rbp)
movl   $0x0,-0x74(%rbp)
mov    -0x74(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1210 <main+0xf0>
jmp    11d1 <main+0xb1>
movslq -0x74(%rbp),%rax
mov    -0x40(%rbp,%rax,8),%rdi
mov    $0x0,%al
call   1040 <LLneg@plt>
cltq
movslq -0x74(%rbp),%rcx
cmp    -0x70(%rbp,%rcx,8),%rax
je     11f8 <main+0xd8>
mov    $0x1,%eax
(bad)
jmp    11fd <main+0xdd>
jmp    1202 <main+0xe2>
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    11c0 <main+0xa0>
xor    %eax,%eax
(bad)
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x5,%edi
xor    %eax,%eax
call   1030 <LLneg@plt>
cmp    $0xfffffffb,%eax
je     1128 <main+0x18>
mov    $0x1,%eax
(bad)
mov    $0x6,%edi
xor    %eax,%eax
call   1030 <LLneg@plt>
cmp    $0xfffffffa,%eax
je     113f <main+0x2f>
mov    $0x1,%eax
(bad)
mov    $0x7,%edi
xor    %eax,%eax
call   1030 <LLneg@plt>
cmp    $0xfffffff9,%eax
je     1156 <main+0x46>
mov    $0x1,%eax
(bad)
mov    $0xfffffffffffffffb,%rdi
xor    %eax,%eax
call   1030 <LLneg@plt>
cmp    $0x5,%eax
je     116f <main+0x5f>
mov    $0x1,%eax
(bad)
mov    $0xfffffffffffffffa,%rdi
xor    %eax,%eax
call   1030 <LLneg@plt>
cmp    $0x6,%eax
je     1188 <main+0x78>
mov    $0x1,%eax
(bad)
mov    $0xfffffffffffffff9,%rdi
xor    %eax,%eax
call   1030 <LLneg@plt>
cmp    $0x7,%eax
je     11a1 <main+0x91>
mov    $0x1,%eax
(bad)
xor    %eax,%eax
(bad)
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [6 x i64]
%4 = alloca [6 x i64]
%5 = alloca i32
store i32 0, i32* %1
store i32 6, i32* %2
%6 = bitcast [6 x i64]* %3 to i8*
%7 = bitcast i8* %6 to [6 x i64]*
%8 = getelementptr inbounds [6 x i64], [6 x i64]* %7, i32 0, i32 0
store i64 5, i64* %8
%9 = getelementptr inbounds [6 x i64], [6 x i64]* %7, i32 0, i32 1
store i64 6, i64* %9
%10 = getelementptr inbounds [6 x i64], [6 x i64]* %7, i32 0, i32 2
store i64 7, i64* %10
%11 = getelementptr inbounds [6 x i64], [6 x i64]* %7, i32 0, i32 3
store i64 -5, i64* %11
%12 = getelementptr inbounds [6 x i64], [6 x i64]* %7, i32 0, i32 4
store i64 -6, i64* %12
%13 = getelementptr inbounds [6 x i64], [6 x i64]* %7, i32 0, i32 5
store i64 -7, i64* %13
%14 = bitcast [6 x i64]* %4 to i8*
%15 = bitcast i8* %14 to [6 x i64]*
%16 = getelementptr inbounds [6 x i64], [6 x i64]* %15, i32 0, i32 0
store i64 -5, i64* %16
%17 = getelementptr inbounds [6 x i64], [6 x i64]* %15, i32 0, i32 1
store i64 -6, i64* %17
%18 = getelementptr inbounds [6 x i64], [6 x i64]* %15, i32 0, i32 2
store i64 -7, i64* %18
%19 = getelementptr inbounds [6 x i64], [6 x i64]* %15, i32 0, i32 3
store i64 5, i64* %19
%20 = getelementptr inbounds [6 x i64], [6 x i64]* %15, i32 0, i32 4
store i64 6, i64* %20
%21 = getelementptr inbounds [6 x i64], [6 x i64]* %15, i32 0, i32 5
store i64 7, i64* %21
store i32 0, i32* %5
br label %22
22: ; preds = %42, %0
%23 = load i32, i32* %5
%24 = load i32, i32* %2
%25 = icmp slt i32 %23, %24
br i1 %25, label %26, label %45
26: ; preds = %22
br label %27
27: ; preds = %26
%28 = load i32, i32* %5
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds [6 x i64], [6 x i64]* %3, i64 0, i64 %29
%31 = load i64, i64* %30
%32 = call i32 (i64, ...) bitcast (i32 (...)* @LLneg to i32 (i64, ...)*)(i64 %31)
%33 = sext i32 %32 to i64
%34 = load i32, i32* %5
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds [6 x i64], [6 x i64]* %4, i64 0, i64 %35
%37 = load i64, i64* %36
%38 = icmp eq i64 %33, %37
br i1 %38, label %40, label %39
39: ; preds = %27
br label %40
40: ; preds = %39, %27
br label %41
41: ; preds = %40
br label %42
42: ; preds = %41
%43 = load i32, i32* %5
%44 = add nsw i32 %43, 1
store i32 %44, i32* %5
br label %22
45: ; preds = %22
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (i64, ...) bitcast (i32 (...)* @LLneg to i32 (i64, ...)*)(i64 5)
%2 = icmp eq i32 %1, -5
br i1 %2, label %4, label %3
3: ; preds = %0
tail call void asm sideeffect ".byte 0xd6", "{ax},~{dirflag},~{fpsr},~{flags}"(i32 1)
br label %4
4: ; preds = %0, %3
%5 = tail call i32 (i64, ...) bitcast (i32 (...)* @LLneg to i32 (i64, ...)*)(i64 6)
%6 = icmp eq i32 %5, -6
br i1 %6, label %8, label %7
7: ; preds = %4
tail call void asm sideeffect ".byte 0xd6", "{ax},~{dirflag},~{fpsr},~{flags}"(i32 1)
br label %8
8: ; preds = %7, %4
%9 = tail call i32 (i64, ...) bitcast (i32 (...)* @LLneg to i32 (i64, ...)*)(i64 7)
%10 = icmp eq i32 %9, -7
br i1 %10, label %12, label %11
11: ; preds = %8
tail call void asm sideeffect ".byte 0xd6", "{ax},~{dirflag},~{fpsr},~{flags}"(i32 1)
br label %12
12: ; preds = %11, %8
%13 = tail call i32 (i64, ...) bitcast (i32 (...)* @LLneg to i32 (i64, ...)*)(i64 -5)
%14 = icmp eq i32 %13, 5
br i1 %14, label %16, label %15
15: ; preds = %12
tail call void asm sideeffect ".byte 0xd6", "{ax},~{dirflag},~{fpsr},~{flags}"(i32 1)
br label %16
16: ; preds = %15, %12
%17 = tail call i32 (i64, ...) bitcast (i32 (...)* @LLneg to i32 (i64, ...)*)(i64 -6)
%18 = icmp eq i32 %17, 6
br i1 %18, label %20, label %19
19: ; preds = %16
tail call void asm sideeffect ".byte 0xd6", "{ax},~{dirflag},~{fpsr},~{flags}"(i32 1)
br label %20
20: ; preds = %19, %16
%21 = tail call i32 (i64, ...) bitcast (i32 (...)* @LLneg to i32 (i64, ...)*)(i64 -7)
%22 = icmp eq i32 %21, 7
br i1 %22, label %24, label %23
23: ; preds = %20
tail call void asm sideeffect ".byte 0xd6", "{ax},~{dirflag},~{fpsr},~{flags}"(i32 1)
br label %24
24: ; preds = %23, %20
tail call void asm sideeffect ".byte 0xd6", "{ax},~{dirflag},~{fpsr},~{flags}"(i32 0)
ret i32 0
}