int main() {
  int i;
  __asm__("movl $1,%0\n\txorl %%eax,%%eax" : "=r"(i) : : "eax");
  if (i != 1)
    abort();
  __asm__("movl $1,%0\n\txorl %%ebx,%%ebx" : "=r"(i) : : "ebx");
  if (i != 1)
    abort();
  __asm__("movl $1,%0\n\txorl %%ecx,%%ecx" : "=r"(i) : : "ecx");
  if (i != 1)
    abort();
  __asm__("movl $1,%0\n\txorl %%edx,%%edx" : "=r"(i) : : "edx");
  if (i != 1)
    abort();
  __asm__("movl $1,%0\n\txorl %%esi,%%esi" : "=r"(i) : : "esi");
  if (i != 1)
    abort();
  __asm__("movl $1,%0\n\txorl %%edi,%%edi" : "=r"(i) : : "edi");
  if (i != 1)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0x18,%rsp
movl   $0x0,-0xc(%rbp)
mov    $0x1,%ecx
xor    %eax,%eax
mov    %ecx,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x1,-0x10(%rbp)
je     113f <main+0x2f>
call   1030 <abort@plt>
mov    $0x1,%eax
xor    %ebx,%ebx
mov    %eax,-0x10(%rbp)
cmpl   $0x1,-0x10(%rbp)
je     1158 <main+0x48>
call   1030 <abort@plt>
mov    $0x1,%eax
xor    %ecx,%ecx
mov    %eax,-0x10(%rbp)
cmpl   $0x1,-0x10(%rbp)
je     1171 <main+0x61>
call   1030 <abort@plt>
mov    $0x1,%eax
xor    %edx,%edx
mov    %eax,-0x10(%rbp)
cmpl   $0x1,-0x10(%rbp)
je     118a <main+0x7a>
call   1030 <abort@plt>
mov    $0x1,%eax
xor    %esi,%esi
mov    %eax,-0x10(%rbp)
cmpl   $0x1,-0x10(%rbp)
je     11a3 <main+0x93>
call   1030 <abort@plt>
mov    $0x1,%eax
xor    %edi,%edi
mov    %eax,-0x10(%rbp)
cmpl   $0x1,-0x10(%rbp)
je     11bc <main+0xac>
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x1,%ecx
xor    %eax,%eax
cmp    $0x1,%ecx
jne    115d <main+0x4d>
mov    $0x1,%eax
xor    %ebx,%ebx
cmp    $0x1,%eax
jne    115d <main+0x4d>
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    $0x1,%eax
jne    115d <main+0x4d>
mov    $0x1,%eax
xor    %edx,%edx
cmp    $0x1,%eax
jne    115d <main+0x4d>
mov    $0x1,%eax
xor    %esi,%esi
cmp    $0x1,%eax
jne    115d <main+0x4d>
mov    $0x1,%eax
xor    %edi,%edi
cmp    $0x1,%eax
jne    115d <main+0x4d>
xor    %eax,%eax
pop    %rbx
ret
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 asm "movl $$1,$0\0A\09xorl %eax,%eax", "=r,~{eax},~{dirflag},~{fpsr},~{flags}"()
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = icmp ne i32 %4, 1
br i1 %5, label %6, label %7
6: ; preds = %0
unreachable
7: ; preds = %0
%8 = call i32 asm "movl $$1,$0\0A\09xorl %ebx,%ebx", "=r,~{ebx},~{dirflag},~{fpsr},~{flags}"()
store i32 %8, i32* %2
%9 = load i32, i32* %2
%10 = icmp ne i32 %9, 1
br i1 %10, label %11, label %12
11: ; preds = %7
unreachable
12: ; preds = %7
%13 = call i32 asm "movl $$1,$0\0A\09xorl %ecx,%ecx", "=r,~{ecx},~{dirflag},~{fpsr},~{flags}"()
store i32 %13, i32* %2
%14 = load i32, i32* %2
%15 = icmp ne i32 %14, 1
br i1 %15, label %16, label %17
16: ; preds = %12
unreachable
17: ; preds = %12
%18 = call i32 asm "movl $$1,$0\0A\09xorl %edx,%edx", "=r,~{edx},~{dirflag},~{fpsr},~{flags}"()
store i32 %18, i32* %2
%19 = load i32, i32* %2
%20 = icmp ne i32 %19, 1
br i1 %20, label %21, label %22
21: ; preds = %17
unreachable
22: ; preds = %17
%23 = call i32 asm "movl $$1,$0\0A\09xorl %esi,%esi", "=r,~{esi},~{dirflag},~{fpsr},~{flags}"()
store i32 %23, i32* %2
%24 = load i32, i32* %2
%25 = icmp ne i32 %24, 1
br i1 %25, label %26, label %27
26: ; preds = %22
unreachable
27: ; preds = %22
%28 = call i32 asm "movl $$1,$0\0A\09xorl %edi,%edi", "=r,~{edi},~{dirflag},~{fpsr},~{flags}"()
store i32 %28, i32* %2
%29 = load i32, i32* %2
%30 = icmp ne i32 %29, 1
br i1 %30, label %31, label %32
31: ; preds = %27
unreachable
32: ; preds = %27
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 asm "movl $$1,$0\0A\09xorl %eax,%eax", "=r,~{eax},~{dirflag},~{fpsr},~{flags}"()
%2 = icmp eq i32 %1, 1
br i1 %2, label %4, label %3
3: ; preds = %0
tail call void @abort()
unreachable
4: ; preds = %0
%5 = tail call i32 asm "movl $$1,$0\0A\09xorl %ebx,%ebx", "=r,~{ebx},~{dirflag},~{fpsr},~{flags}"()
%6 = icmp eq i32 %5, 1
br i1 %6, label %8, label %7
7: ; preds = %4
tail call void @abort()
unreachable
8: ; preds = %4
%9 = tail call i32 asm "movl $$1,$0\0A\09xorl %ecx,%ecx", "=r,~{ecx},~{dirflag},~{fpsr},~{flags}"()
%10 = icmp eq i32 %9, 1
br i1 %10, label %12, label %11
11: ; preds = %8
tail call void @abort()
unreachable
12: ; preds = %8
%13 = tail call i32 asm "movl $$1,$0\0A\09xorl %edx,%edx", "=r,~{edx},~{dirflag},~{fpsr},~{flags}"()
%14 = icmp eq i32 %13, 1
br i1 %14, label %16, label %15
15: ; preds = %12
tail call void @abort()
unreachable
16: ; preds = %12
%17 = tail call i32 asm "movl $$1,$0\0A\09xorl %esi,%esi", "=r,~{esi},~{dirflag},~{fpsr},~{flags}"()
%18 = icmp eq i32 %17, 1
br i1 %18, label %20, label %19
19: ; preds = %16
tail call void @abort()
unreachable
20: ; preds = %16
%21 = tail call i32 asm "movl $$1,$0\0A\09xorl %edi,%edi", "=r,~{edi},~{dirflag},~{fpsr},~{flags}"()
%22 = icmp eq i32 %21, 1
br i1 %22, label %24, label %23
23: ; preds = %20
tail call void @abort()
unreachable
24: ; preds = %20
ret i32 0
}