void color(void) {
  int i, j;
  for (i = 0; i < 16; ++i)
    for (j = 0; j < 16; ++j)
      __asm__("int	$0x80" ::"S"(i), "D"(j), "b"('X'), "a"(0));
  for (;;)
    ;
}


x86 assembly (clang, -O0):
<color>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
movl   $0x0,-0xc(%rbp)
cmpl   $0x10,-0xc(%rbp)
jge    1157 <color+0x57>
movl   $0x0,-0x10(%rbp)
cmpl   $0x10,-0x10(%rbp)
jge    1144 <color+0x44>
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edi
mov    $0x58,%ebx
xor    %eax,%eax
int    $0x80
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    111d <color+0x1d>
jmp    1149 <color+0x49>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110c <color+0xc>
jmp    115c <color+0x5c>
jmp    115c <color+0x5c>

x86 assembly (clang, -O2):
<color>:
push   %rbx
xor    %esi,%esi
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xor    %edi,%edi
mov    $0x58,%ebx
xor    %eax,%eax
int    $0x80
mov    $0x1,%edi
mov    $0x58,%ebx
xor    %eax,%eax
int    $0x80
mov    $0x2,%edi
mov    $0x58,%ebx
xor    %eax,%eax
int    $0x80
mov    $0x3,%edi
mov    $0x58,%ebx
xor    %eax,%eax
int    $0x80
mov    $0x4,%edi
mov    $0x58,%ebx
xor    %eax,%eax
int    $0x80
mov    $0x5,%edi
mov    $0x58,%ebx
xor    %eax,%eax
int    $0x80
mov    $0x6,%edi
mov    $0x58,%ebx
xor    %eax,%eax
int    $0x80
mov    $0x7,%edi
mov    $0x58,%ebx
xor    %eax,%eax
int    $0x80
mov    $0x8,%edi
mov    $0x58,%ebx
xor    %eax,%eax
int    $0x80
mov    $0x9,%edi
mov    $0x58,%ebx
xor    %eax,%eax
int    $0x80
mov    $0xa,%edi
mov    $0x58,%ebx
xor    %eax,%eax
int    $0x80
mov    $0xb,%edi
mov    $0x58,%ebx
xor    %eax,%eax
int    $0x80
mov    $0xc,%edi
mov    $0x58,%ebx
xor    %eax,%eax
int    $0x80
mov    $0xd,%edi
mov    $0x58,%ebx
xor    %eax,%eax
int    $0x80
mov    $0xe,%edi
mov    $0x58,%ebx
xor    %eax,%eax
int    $0x80
mov    $0xf,%edi
mov    $0x58,%ebx
xor    %eax,%eax
int    $0x80
add    $0x1,%esi
cmp    $0x10,%esi
jne    1110 <color+0x10>
nopl   0x0(%rax)
jmp    1200 <color+0x100>

LLVM IR (-O0):
define void @color() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
br label %3
3: ; preds = %17, %0
%4 = load i32, i32* %1
%5 = icmp slt i32 %4, 16
br i1 %5, label %6, label %20
6: ; preds = %3
store i32 0, i32* %2
br label %7
7: ; preds = %13, %6
%8 = load i32, i32* %2
%9 = icmp slt i32 %8, 16
br i1 %9, label %10, label %16
10: ; preds = %7
%11 = load i32, i32* %1
%12 = load i32, i32* %2
br label %13
13: ; preds = %10
%14 = load i32, i32* %2
%15 = add nsw i32 %14, 1
store i32 %15, i32* %2
br label %7
16: ; preds = %7
br label %17
17: ; preds = %16
%18 = load i32, i32* %1
%19 = add nsw i32 %18, 1
store i32 %19, i32* %1
br label %3
20: ; preds = %3
br label %21
21: ; preds = %21, %20
br label %21
}

LLVM IR (-O2):
define void @color() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %3, %1 ]
tail call void asm sideeffect "int\09$$0x80", "{si},{di},{bx},{ax},~{dirflag},~{fpsr},~{flags}"(i32 %2, i32 0, i32 88, i32 0)
tail call void asm sideeffect "int\09$$0x80", "{si},{di},{bx},{ax},~{dirflag},~{fpsr},~{flags}"(i32 %2, i32 1, i32 88, i32 0)
tail call void asm sideeffect "int\09$$0x80", "{si},{di},{bx},{ax},~{dirflag},~{fpsr},~{flags}"(i32 %2, i32 2, i32 88, i32 0)
tail call void asm sideeffect "int\09$$0x80", "{si},{di},{bx},{ax},~{dirflag},~{fpsr},~{flags}"(i32 %2, i32 3, i32 88, i32 0)
tail call void asm sideeffect "int\09$$0x80", "{si},{di},{bx},{ax},~{dirflag},~{fpsr},~{flags}"(i32 %2, i32 4, i32 88, i32 0)
tail call void asm sideeffect "int\09$$0x80", "{si},{di},{bx},{ax},~{dirflag},~{fpsr},~{flags}"(i32 %2, i32 5, i32 88, i32 0)
tail call void asm sideeffect "int\09$$0x80", "{si},{di},{bx},{ax},~{dirflag},~{fpsr},~{flags}"(i32 %2, i32 6, i32 88, i32 0)
tail call void asm sideeffect "int\09$$0x80", "{si},{di},{bx},{ax},~{dirflag},~{fpsr},~{flags}"(i32 %2, i32 7, i32 88, i32 0)
tail call void asm sideeffect "int\09$$0x80", "{si},{di},{bx},{ax},~{dirflag},~{fpsr},~{flags}"(i32 %2, i32 8, i32 88, i32 0)
tail call void asm sideeffect "int\09$$0x80", "{si},{di},{bx},{ax},~{dirflag},~{fpsr},~{flags}"(i32 %2, i32 9, i32 88, i32 0)
tail call void asm sideeffect "int\09$$0x80", "{si},{di},{bx},{ax},~{dirflag},~{fpsr},~{flags}"(i32 %2, i32 10, i32 88, i32 0)
tail call void asm sideeffect "int\09$$0x80", "{si},{di},{bx},{ax},~{dirflag},~{fpsr},~{flags}"(i32 %2, i32 11, i32 88, i32 0)
tail call void asm sideeffect "int\09$$0x80", "{si},{di},{bx},{ax},~{dirflag},~{fpsr},~{flags}"(i32 %2, i32 12, i32 88, i32 0)
tail call void asm sideeffect "int\09$$0x80", "{si},{di},{bx},{ax},~{dirflag},~{fpsr},~{flags}"(i32 %2, i32 13, i32 88, i32 0)
tail call void asm sideeffect "int\09$$0x80", "{si},{di},{bx},{ax},~{dirflag},~{fpsr},~{flags}"(i32 %2, i32 14, i32 88, i32 0)
tail call void asm sideeffect "int\09$$0x80", "{si},{di},{bx},{ax},~{dirflag},~{fpsr},~{flags}"(i32 %2, i32 15, i32 88, i32 0)
%3 = add nuw nsw i32 %2, 1
%4 = icmp eq i32 %3, 16
br i1 %4, label %5, label %1
5: ; preds = %1, %5
br label %5
}