void char_fill(x, y, level, contour, options) long x, y;
long level, contour;
long options;
{
  char ascii;
  long xy_color, status;
  long char_pointcolor();
  status = char_pointcolor(x, y, &xy_color, &ascii);
  switch (status) {
  case 256L:
    break;
  case 512L:
    switch (options) {
    case 4096L:
      break;
    case 2048L:
    default:
      (void)char_putpointp(x, y, level);
      char_fill((x + 1), y, level, contour, options);
      char_fill((x - 1), y, level, contour, options);
      char_fill(x, (y + 1), level, contour, options);
      char_fill(x, (y - 1), level, contour, options);
      break;
    }
    break;
  case 1024L:
    if ((xy_color != contour) && (xy_color != level)) {
      (void)char_putpointp(x, y, level);
      char_fill((x + 1), y, level, contour, options);
      char_fill((x - 1), y, level, contour, options);
      char_fill(x, (y + 1), level, contour, options);
      char_fill(x, (y - 1), level, contour, options);
    }
    break;
  }
  return;
}


x86 assembly (clang, -O0):
<char_fill>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
xor    %eax,%eax
lea    -0x38(%rbp),%rdx
lea    -0x29(%rbp),%rcx
call   1030 <char_pointcolor@plt>
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rax
mov    %rax,-0x48(%rbp)
sub    $0x100,%rax
je     11aa <char_fill+0x7a>
jmp    1180 <char_fill+0x50>
mov    -0x48(%rbp),%rax
sub    $0x200,%rax
je     11af <char_fill+0x7f>
jmp    1195 <char_fill+0x65>
mov    -0x48(%rbp),%rax
sub    $0x400,%rax
je     1273 <char_fill+0x143>
jmp    131b <char_fill+0x1eb>
jmp    131b <char_fill+0x1eb>
mov    -0x28(%rbp),%rax
mov    %rax,-0x50(%rbp)
sub    $0x800,%rax
je     11e2 <char_fill+0xb2>
jmp    11c8 <char_fill+0x98>
mov    -0x50(%rbp),%rax
sub    $0x1000,%rax
jne    11e7 <char_fill+0xb7>
jmp    11dd <char_fill+0xad>
jmp    126e <char_fill+0x13e>
jmp    11e7 <char_fill+0xb7>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    $0x0,%al
call   1050 <char_putpointp@plt>
mov    -0x8(%rbp),%rdi
add    $0x1,%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
call   1040 <char_fill@plt>
mov    -0x8(%rbp),%rdi
sub    $0x1,%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
call   1040 <char_fill@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
add    $0x1,%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
call   1040 <char_fill@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
sub    $0x1,%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
call   1040 <char_fill@plt>
jmp    131b <char_fill+0x1eb>
mov    -0x38(%rbp),%rax
cmp    -0x20(%rbp),%rax
je     1316 <char_fill+0x1e6>
mov    -0x38(%rbp),%rax
cmp    -0x18(%rbp),%rax
je     1316 <char_fill+0x1e6>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    $0x0,%al
call   1050 <char_putpointp@plt>
mov    -0x8(%rbp),%rdi
add    $0x1,%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
call   1040 <char_fill@plt>
mov    -0x8(%rbp),%rdi
sub    $0x1,%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
call   1040 <char_fill@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
add    $0x1,%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
call   1040 <char_fill@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
sub    $0x1,%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
call   1040 <char_fill@plt>
jmp    131b <char_fill+0x1eb>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<char_fill>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x10,%rsp
mov    %r8,%r14
mov    %rcx,%r15
mov    %rdx,%r12
mov    %rsi,%rbx
mov    %rdi,%r13
lea    0x8(%rsp),%rdx
lea    0x7(%rsp),%rcx
xor    %eax,%eax
call   1030 <char_pointcolor@plt>
cmp    $0x400,%rax
je     117c <char_fill+0x4c>
cmp    $0x200,%rax
jne    11f2 <char_fill+0xc2>
cmp    $0x1000,%r14
jne    118b <char_fill+0x5b>
jmp    11f2 <char_fill+0xc2>
mov    0x8(%rsp),%rax
cmp    %r15,%rax
je     11f2 <char_fill+0xc2>
cmp    %r12,%rax
je     11f2 <char_fill+0xc2>
mov    %r13,%rdi
mov    %rbx,%rsi
mov    %r12,%rdx
xor    %eax,%eax
call   1050 <char_putpointp@plt>
lea    0x1(%r13),%rdi
mov    %rbx,%rsi
mov    %r12,%rdx
mov    %r15,%rcx
mov    %r14,%r8
call   1040 <char_fill@plt>
lea    -0x1(%r13),%rdi
mov    %rbx,%rsi
mov    %r12,%rdx
mov    %r15,%rcx
mov    %r14,%r8
call   1040 <char_fill@plt>
lea    0x1(%rbx),%rsi
mov    %r13,%rdi
mov    %r12,%rdx
mov    %r15,%rcx
mov    %r14,%r8
call   1040 <char_fill@plt>
add    $0xffffffffffffffff,%rbx
mov    %r13,%rdi
mov    %rbx,%rsi
mov    %r12,%rdx
mov    %r15,%rcx
mov    %r14,%r8
call   1040 <char_fill@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @char_fill(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4) {
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
%11 = alloca i8
%12 = alloca i64
%13 = alloca i64
store i64 %0, i64* %6
store i64 %1, i64* %7
store i64 %2, i64* %8
store i64 %3, i64* %9
store i64 %4, i64* %10
%14 = load i64, i64* %6
%15 = load i64, i64* %7
%16 = call i64 (i64, i64, i64*, i8*, ...) bitcast (i64 (...)* @char_pointcolor to i64 (i64, i64, i64*, i8*, ...)*)(i64 %14, i64 %15, i64* %12, i8* %11)
store i64 %16, i64* %13
%17 = load i64, i64* %13
switch i64 %17, label %91 [
i64 256, label %18
i64 512, label %19
i64 1024, label %53
]
18: ; preds = %5
br label %91
19: ; preds = %5
%20 = load i64, i64* %10
switch i64 %20, label %23 [
i64 4096, label %21
i64 2048, label %22
]
21: ; preds = %19
br label %52
22: ; preds = %19
br label %23
23: ; preds = %19, %22
%24 = load i64, i64* %6
%25 = load i64, i64* %7
%26 = load i64, i64* %8
%27 = call i32 (i64, i64, i64, ...) bitcast (i32 (...)* @char_putpointp to i32 (i64, i64, i64, ...)*)(i64 %24, i64 %25, i64 %26)
%28 = load i64, i64* %6
%29 = add nsw i64 %28, 1
%30 = load i64, i64* %7
%31 = load i64, i64* %8
%32 = load i64, i64* %9
%33 = load i64, i64* %10
%34 = load i64, i64* %6
%35 = sub nsw i64 %34, 1
%36 = load i64, i64* %7
%37 = load i64, i64* %8
%38 = load i64, i64* %9
%39 = load i64, i64* %10
%40 = load i64, i64* %6
%41 = load i64, i64* %7
%42 = add nsw i64 %41, 1
%43 = load i64, i64* %8
%44 = load i64, i64* %9
%45 = load i64, i64* %10
%46 = load i64, i64* %6
%47 = load i64, i64* %7
%48 = sub nsw i64 %47, 1
%49 = load i64, i64* %8
%50 = load i64, i64* %9
%51 = load i64, i64* %10
br label %52
52: ; preds = %23, %21
br label %91
53: ; preds = %5
%54 = load i64, i64* %12
%55 = load i64, i64* %9
%56 = icmp ne i64 %54, %55
br i1 %56, label %57, label %90
57: ; preds = %53
%58 = load i64, i64* %12
%59 = load i64, i64* %8
%60 = icmp ne i64 %58, %59
br i1 %60, label %61, label %90
61: ; preds = %57
%62 = load i64, i64* %6
%63 = load i64, i64* %7
%64 = load i64, i64* %8
%65 = call i32 (i64, i64, i64, ...) bitcast (i32 (...)* @char_putpointp to i32 (i64, i64, i64, ...)*)(i64 %62, i64 %63, i64 %64)
%66 = load i64, i64* %6
%67 = add nsw i64 %66, 1
%68 = load i64, i64* %7
%69 = load i64, i64* %8
%70 = load i64, i64* %9
%71 = load i64, i64* %10
%72 = load i64, i64* %6
%73 = sub nsw i64 %72, 1
%74 = load i64, i64* %7
%75 = load i64, i64* %8
%76 = load i64, i64* %9
%77 = load i64, i64* %10
%78 = load i64, i64* %6
%79 = load i64, i64* %7
%80 = add nsw i64 %79, 1
%81 = load i64, i64* %8
%82 = load i64, i64* %9
%83 = load i64, i64* %10
%84 = load i64, i64* %6
%85 = load i64, i64* %7
%86 = sub nsw i64 %85, 1
%87 = load i64, i64* %8
%88 = load i64, i64* %9
%89 = load i64, i64* %10
br label %90
90: ; preds = %61, %57, %53
br label %91
91: ; preds = %5, %90, %52, %18
ret void
}

LLVM IR (-O2):
define void @char_fill(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4) {
%6 = alloca i8
%7 = alloca i64
%8 = bitcast i64* %7 to i8*
%9 = call i64 (i64, i64, i64*, i8*, ...) bitcast (i64 (...)* @char_pointcolor to i64 (i64, i64, i64*, i8*, ...)*)(i64 %0, i64 %1, i64* %7, i8* %6)
switch i64 %9, label %23 [
i64 1024, label %12
i64 512, label %10
]
10: ; preds = %5
%11 = icmp eq i64 %4, 4096
br i1 %11, label %23, label %17
12: ; preds = %5
%13 = load i64, i64* %7
%14 = icmp eq i64 %13, %3
%15 = icmp eq i64 %13, %2
%16 = or i1 %14, %15
br i1 %16, label %23, label %17
17: ; preds = %12, %10
%18 = call i32 (i64, i64, i64, ...) bitcast (i32 (...)* @char_putpointp to i32 (i64, i64, i64, ...)*)(i64 %0, i64 %1, i64 %2)
%19 = add nsw i64 %0, 1
%20 = add nsw i64 %0, -1
%21 = add nsw i64 %1, 1
%22 = add nsw i64 %1, -1
br label %23
23: ; preds = %17, %10, %12, %5
ret void
}